Linked by Thom Holwerda on Tue 18th Dec 2012 23:12 UTC
Thread beginning with comment 545788
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
RE: "the code was completely uncommented"
by Laurence on Wed 19th Dec 2012 00:19
in reply to ""the code was completely uncommented""
Ha! A good developer knows how to read code.
I good developer knows how to write readable code (and still keep it efficient).
Sadly not all developers can be bothered to do so and if they've used nondescript variable / functions names as well as weird developer logic, then the code might as well have been deliberately obfuscated.
I've worked on plenty of projects where debugging other peoples code worked out just as time consuming than if I had rewritten the code from scratch. Albeit we're talking smallish projects in those instances.
But a good and well placed comment is better than a 1000 page manual.
I love finding humour comments in other peoples code (comments I'd forgotten about in my own code).
I remember once stumbling across the following within one of Oracle's own APIs for Java / Oracle RMDBS Forms: "This is a terrible kludge". It pretty much summed up the entire product in one line hehe
Edited 2012-12-19 00:24 UTC
RE[2]: "the code was completely uncommented"
by HappyGod on Wed 19th Dec 2012 05:19
in reply to "RE: "the code was completely uncommented""
I once had to maintain an old VB6 app, which had features such as a Sub that traversed 12 pages! If that wasn't enough the original dev used the same handful of (badly named) variables all the way through this epic subroutine for different purposes!
But back to the comment thing; this same dev would insist on adding a comment every third or fourth line, for no reason at all that I could fathom. Highlights included things like:
' Check this out Mike!!
' Processing ...
and my personal favourite:
' Say hello to my little friend!
He would also always (and I mean always) end every Function and Sub with:
'And done.
When I find him, there will be blood.
RE[2]: "the code was completely uncommented"
by Neolander on Wed 19th Dec 2012 07:57
in reply to "RE: "the code was completely uncommented""
I good developer knows how to write readable code (and still keep it efficient).
Sadly not all developers can be bothered to do so and if they've used nondescript variable / functions names as well as weird developer logic, then the code might as well have been deliberately obfuscated.
I've worked on plenty of projects where debugging other peoples code worked out just as time consuming than if I had rewritten the code from scratch. Albeit we're talking smallish projects in those instances.
Sadly not all developers can be bothered to do so and if they've used nondescript variable / functions names as well as weird developer logic, then the code might as well have been deliberately obfuscated.
I've worked on plenty of projects where debugging other peoples code worked out just as time consuming than if I had rewritten the code from scratch. Albeit we're talking smallish projects in those instances.
From personal experience, even good devs who have a pretty good idea of what good code looks like can write pretty unreadable code if they are...
1/Coding under strong time constraints, a burst of inspiration, or something else that puts their minds' focus elsewhere.
2/Not able to notice the mess left around until they try to read through it again after a few months without touching it.
The human brain's content indexing abilities are truly a thing of magic, but they become a hindrance when you try to distinguish what's clean from what isn't.
I love finding humour comments in other peoples code (comments I'd forgotten about in my own code).
I remember once stumbling across the following within one of Oracle's own APIs for Java / Oracle RMDBS Forms: "This is a terrible kludge". It pretty much summed up the entire product in one line hehe
I remember once stumbling across the following within one of Oracle's own APIs for Java / Oracle RMDBS Forms: "This is a terrible kludge". It pretty much summed up the entire product in one line hehe
These clever snippets become much less funny when you try to figure out what the code actually does, though
Edited 2012-12-19 08:09 UTC
RE: "the code was completely uncommented"
by henderson101 on Wed 19th Dec 2012 09:43
in reply to ""the code was completely uncommented""
RE[2]: "the code was completely uncommented"
by f0dder on Thu 20th Dec 2012 13:55
in reply to "RE: "the code was completely uncommented""





Member since:
2009-06-02
Ha! A good developer knows how to read code. But a good and well placed comment is better than a 1000 page manual.
And it can bring good games to your new OS too!!!