Skip navigation.

exploreopera

| Help

Sign up | Help

Memel

Infinite Power Computing Theory & Practics

Programming as Phylosophy. Part 2.

, ,

2. When you think you're programming...

And what it really is:

  • Tweaking the code to run innermost loops a little faster: this is preparing for competition in the market;
  • Resolving border conditions, fencepost errors and race conditions: debugging
  • Rearranging and structuring the code, merging duplicated parts, making functions shorter and clearer: preparing for better product maintenance
  • Indenting code, providing comments: preparing for presentation
  • Optimizing the code, rewriting parts of code: consequences of bad initial design
  • Fighting with tools and frameworks, making workarounds, avoiding known bugs: debugging, testing
  • Creating sophisticated constructs, such like "one-liners" in Perl: no point at all; overcomplicates further maintenance
  • Writing the initial code from scratch: yes - this is a part of programming!



To be continued...

Programming as PhylosophyHave you already installed IE8?

Comments

avatar
My favourite part about programming is the third one. I don't know why this is. You'd think it'd be boring. But I can't get enough of it. Especially deleting code. Deleting code and still have the software retain its full functionality is unusually satisfying. Almost like a drug.

By Vorlath, # 20. March 2008, 12:33:30

avatar
Btw, this is my least favourite one. Probably I'm not normal programmer. I prefer to foresee and overcome this phase at design moment. That's probably why I "walk down" my code for 2-3 months before sitting and coding. :smile:

By vladas, # 22. March 2008, 20:19:26

avatar
Actually, I don't know too many people who like this step. I just like simplifying code and making it shorter and easier to use because as the code gets larger, I like having the core small and simple.

By Vorlath, # 23. March 2008, 16:34:47

avatar
It's ok. Nothing bad with this. Actually I do it too; when my code gets to big or too complicated this usually means that it's time to rewrite it from scratch. So, I only to say that this is not what I like much. And I don't count it as programming. It is more like correcting the previous programming errors. :smile:

By vladas, # 23. March 2008, 19:52:30

avatar
Good points, I like them. The 7th one is a good one, and I also believe in the 8th, even though someone says that it's never a good idea (Joel: I'm looking at you :p).

I think the 3rd one is a lot of fun. It's kinda like the 7th in reverse. Looking through and investigating your code, getting an overview so that you can make it even better, and more maintainable. I also believe in planning before you program (even though exploratory programming is also a lot of fun), but there will always be aspects that you don't catch before you are knee deep in your code.

Another term I recently discovered, and fell in love with, is Habitability. From Patterns of software:


"Habitability is the characteristic of source code that enables programmers, coders, bug-fixers, and people coming to the code later in its life to understand its construction and intentions and to change it comfortably and confidently."


I'm not sure about the first one though, but I guess it depends on the kind of project you are working on. Remember:


“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson


And the 4th is one of the reasons I fell in love with Python :)

By sverre, # 23. May 2008, 14:41:08

Write a comment

You must be logged in to write a comment. if you're not a registered member, please sign up.

October 2008
MTWTFSS
September 2008November 2008
12345
6789101112
13141516171819
20212223242526
2728293031