My Think Runtime Principle

I realized that while working I always take care of a thought which now has a name: Thing Runtime Principe.

While programming the implementation details of Your current task You should keep a performace-guard-thread in Your mind. You should always think about how Your code will be executed. It will accomplish what in You specs is, but will it be optimal?

Nowadays we have high level programming languages, our code will be compiled with clever compilers, will be executed under clever runtimes on a fast computers so we dont really need to think about CPU, memory exhausement, etc. But some years ago programmers use punch cards, did you know? Processor’s speeds were messured in Mhz and not Ghz. And a man who is very reach now said, that 640kb should be enought for everything… Programmers of those ages had the ability to write programs which fullfill their specs and were optimal in aspect of hardware too.

I understand, that today it isnt so important to think about the hardware. But I am not talking about the hardware at all. I am talking about philosophy of thinking about the runtime environment of Your product. If You dont think about it You lost or never grow up a skill. A skill which has a place in our head in the panthenon of skills which help use to design and write good code. Without that skill there will be a growing distance between You and the device You write for. You may never used in the real life some of the maths You learned in the elementary school, but they helped to organize You thoughts, learn algorithmic thinking, etc.

What kind of music will born from a composer who dont really knows a note how will be sound from a piano or from a violin? My favorite church has a chime. The organist realized that a lot of songs simply cannot be played on a chime because of the bells sounds for seconds after he played them and that sound may be not harmonic with those he plays later. He must take care of device he worked on.

Caution! I didnt said You should write code which somehow relies on implemetation details of underlying classes, runtime or hardware! That whould break OOP rules in a wider sense. Do You remember Your favorite PC games which become unplayable fast after You changed Your PC to a faster one?

I said You should write code which relies on contracts of underlying things appropriatelly!

You should be not only a programmer but an engineer!

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.