Live data from Hacker News

No, You are not Dumb. Programmers do spend a lot of time Understanding Code…

blog.architexa.com

1–10 of 28 posts

Re: No, You are not Dumb. Programmers do spend a lot of time Understanding Code…

#5
post #3

Making your code open source is also a great way to make sure your code is easy to understand.

Please expand?

Most good programmers I know have some measure of Larry Wall's three great virtues: laziness, impatience, and hubris.[1]

Hubris is defined by Larry as:

"Excessive pride, the sort of thing Zeus zaps you for. Also the quality that makes you write (and maintain) programs that other people won’t want to say bad things about. Hence, the third great virtue of a programmer."

When your code is open source, anyone can see it. A prideful programmer isn't going to want to hear others badmouthing his/her code. Thus, the hubris this open source programmer feels will compel him/her to write code that is easy to understand and easy to maintain.

At least, hopefully :-)

[1] http://en.wikipedia.org/wiki/Larry_Wall#Virtues_of_a_program...

Re: No, You are not Dumb. Programmers do spend a lot of time Understanding Code…

#6
Part of the problem is how much "infrastructure" you need to learn too. What I like about Python is that a lot of the infrastructure is common and so all Python coders know it. In C and C++ every team seems to use a different set of tools, libraries and debug macros which makes it harder to dive into a project quickly.

On another note: is there any decent open source code study tool? I only know of Source Navigator but it always felt bloated to me and the UI was always quite tedious.

Re: No, You are not Dumb. Programmers do spend a lot of time Understanding Code…

#7
post #4

Making your code open source is also a great way to make sure your code is easy to understand.

Having anyone review your code is a good way to make sure it is easy to understand.

Very true. I didn't mean open source is the only way.

Code reviews, extreme/paired programming, personal discipline, and lots of experience on development teams are also great ways. I'm sure there are others too.

Re: No, You are not Dumb. Programmers do spend a lot of time Understanding Code…

#8
post #3

Earlier quoted context omitted.

Please expand?

Most good programmers I know have some measure of Larry Wall's three great virtues: laziness, impatience, and hubris.[1] Hubris is defined by Larry as: "Excessive pride, the sort of thing Zeus zaps you for. Also the quality that makes you write (and maintain) programs that other people won’t want to say bad things about. Hence, the third great virtue of a programmer." When your code is open source, anyone can see it.…

I suppose the same effect would happen in a organization, perhaps even more because the ones reviewing have power over you...

Re: No, You are not Dumb. Programmers do spend a lot of time Understanding Code…

#9
post #4

Earlier quoted context omitted.

Having anyone review your code is a good way to make sure it is easy to understand.

Very true. I didn't mean open source is the only way. Code reviews, extreme/paired programming, personal discipline, and lots of experience on development teams are also great ways. I'm sure there are others too.

These all are very good points but well written code is not easy to find and tools which help one to quickly understand code become really important in such cases.

Re: No, You are not Dumb. Programmers do spend a lot of time Understanding Code…

#10

Earlier quoted context omitted.

Very true. I didn't mean open source is the only way. Code reviews, extreme/paired programming, personal discipline, and lots of experience on development teams are also great ways. I'm sure there are others too.

These all are very good points but well written code is not easy to find and tools which help one to quickly understand code become really important in such cases.

In my experience, I've found that processes that influence the desired behavior (through the use of incentives) have been more effective than tools. But I'm certainly no expert and am always looking for better ways to do things.

Have you used any tools that you've found to encourage well written code? I'd really love to give them a try.

Post reply on HN