On Mar 13, 2005, at 7:50 PM, Stewart Stremler wrote:

1) Don't hard-code data. Constants aren't. Besides, it's hard to know
   why the magic value of 6.28 works.  Paths to dependent programs may
   change.  You never know when something on the system will be moved,
   and your program should still work if everything is moved around.

This is probably more an artifact of programming. I hardcode a lot of things as I am building up a prototype. Overgeneralization kills projects, too. As I need more flexibility, I start building it in.


While I never know if something will be moved, I also never know if something *won't* be moved. Adding unneeded generalization also adds bugs.

2) Don't spread out your platform-dependent code.  Put it all one file.
   That way you can rewrite just one file for each system, and porting
   involves selecting the appropriate machine-specific file to link in
   to the rest of the system.

Who cares? Everything is x86 running Windows.

While that sentiment is a bit harsh, it is pretty much true. As a software developer, there is *zero* reason for me to acknowledge the existence of anything else.

Actually, the biggest breakthrough in this arena is probably the fact that games programmers now have to target Windows *and* Playstation 2.

3) Comment.  Explain your intent.  "Self-documenting code" is a myth
   promulgated by the lazy and/or illiterate.  It's better to have
   well-documented but non-working code than to have undocumented but
   working code -- because then someone else can fix your code instead
   of having to rewrite it.  80% of the lifetime of a program is spent
   in maintenance mode.

Disagree. *Strongly*. All comments eventually become obsolete.

As a consequence, I have to disregard comments *anyway*. Don't waste the time putting them in as I don't believe you anyhow.

I cannot *make* anyone do anything. I can write MY code so that it is
as "clean" as possible. Otherwise, I can only argue. Create memes and
set them loose. Alas, it seems that my memes aren't terribly infectious.

Well, your memes cost developers time but don't gain them much, by and large. They clearly aren't going to be very infectious.


The current meme is that it's my machine, not yours, not theirs, but
mine.  I should get to decide where things go, how things are arranged,
and I should be able to do this whenever.

Maybe. But I think the bigger meme is going to be that PC's need to go away. Most users would rather have a closed box that is the responsibility of someone else and would likely pay for the privilege.


They will not realize what they just gave up, but I bet that most wouldn't care anyway.

Yes, I'm being intentionally antagonistic. I actually *agree* with your points to a certain extent (except for the comments thing). However, Microsoft has now conditioned everyone to believe that computers/software are crappy. Creating non-crappy hardware/software has no market advantage for the moment. Therefore, your memes garner no traction.

Actually, one of my hypotheses about open-source is that it only gains traction in areas where being able to fix a bug *today* is an advantage; otherwise it fails or, more likely, just flounders indefinitely.

-a

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to