Subscribe to Stuck in an Infiniteloop        RSS Feed
-----

Do It The Hard Way, At Least Once

Icon 3 Comments
We often get threads asking if one language is "easier" then another, if a language makes programmers lazy, or if a language has too much abstraction. By and large the answers to these questions are no. However, the benefits they provide may be lost on an individual if the underlying concepts are not understood.

Why?

Abstraction is there for us, the programmers. Gone are the days where we would need to punch holes into a card and then insert it into a machine. And unless your job calls for it, spending the majority of your day neck deep in assembly code isn't a common occurrence either. Each successive generation of programming languages adds a layer of abstraction. Consider the following sequence [over a large period of time]:

Punch Cards[Machine Code]->Assembly Code->C

The level of tedium is significantly decreased from the move of one language/generation to another. You will also notice a transition from pure sequential directions to a structural layout. Fast forward to today and we have a variety of paradigms to work with all of which are based off of or were spun off previously existing ones.

A small sidetrack for those interested in the history:
Caspers Jones's function point analysis is one way people have measured productivity increases between the generations of programming languages.


Several of today's "popular" languages are part of the third generation. Even within this one group there are radical differences, in terms of level of abstraction, available to the programmer.

For example, if you've done most of your work with say Java or C# you haven't had to do any explicit memory management. Is that bad? Some might say yes [language fanboys, but that is out of the scope of this post]. I am under the notion that if you understand the benefits that a particular feature/abstraction is offering, then by all means use it. People get into trouble when they move from, say, Java->C++ and try to code the same way they have been. Which brings up the whole other topic of treating each language as a tool for specific needs, etc... but I won't get into that today.

What does 'do it the hard way, at least once' mean?

If you have the opportunity, I encourage you to program in something "lower" then what you use the most. The best choice would be a language that doesn't have a certain feature or abstraction that you are accustomed to. A quick example within the third generation of languages: Java/C# -> C++/C. Especially play around with memory management. If it seems I'm hammering this point hard, it's because I've seen people have gross misunderstandings about memory, it's allocation/de-allocation, and ultimately its affect on the program. Considering that quite a few mission critical systems are written in C/C++, this is truly a life or death situation.


Ultimately, the issue is that there is no foundation on which individuals build their programming experience. This is often the reason CS programs include at least on hardware concepts course. How can you write software without a basic(at least) grasp on how the computer itself is running your programs? The answer is you can't.

If at any point you have a "fuzzy" moment on how something works, immediately find a venue [i.e. a language] in which you can experiment with until you "get it".

3 Comments On This Entry

Page 1 of 1

elgose 

18 March 2010 - 01:18 PM
Very nice post. I've been working my way through sorting and searching algorithms and after plenty of headaches and really feeling like I understand it I stumble upon different sorting functions already featured in the language. I'm confident I'll never misuse those features because I have a grasp of what it's doing.

Plus - I don't like magic in my code (this goes in, somehow it comes out the other end with exactly what I want but I don't know how!)
0

danny_kay1710 

19 March 2010 - 03:37 AM
Good point well made.

I can't say that I am brilliant at memory management working mostly with .NET languages but I do have an understanding of C++ and the need to destroy all items created in code and the need to ensure you don't go outside the bounds of arrays causing your application to write to memory it shouldn't plus much more I am probably not even aware of yet....
0

alias120 

19 March 2010 - 10:43 AM
Great post KYA, glad to see someone still supporting this paradigm of learning. Many people won't waste their time with languages like C/C++ due to the rapid growth of Java, C# and .NET technologies. C++ is where I started and I know when I make the eventual move to .NET I won't regret it.

-alias
0
Page 1 of 1

January 2022

S M T W T F S
      1
2345678
9101112131415
161718192021 22
23242526272829
3031     

Tags

    Recent Entries

    Recent Comments

    Search My Blog

    20 user(s) viewing

    20 Guests
    0 member(s)
    0 anonymous member(s)