Tuesday, March 27, 2012

The Infinite Puzzle

Programming is a unique world of it's own. A lot of the programmers out there, that includes myself before i knew better, will happily tell you that the number one thing you need to know to succeed at programming is a very broad math knowledge. This is somewhat true due to the fact that the most basic form of programming, binary, is all ones and zeros and the programmer needs to know how to interpret every one and zero mathematically to create a program that actually works.

However what is even more important as a programmer or a software engineer is the ability to think logically. If you can thing logically, programming will come very easy to you. For those of you who aren't programmers or have no prior experience in programming, allow me to elaborate. Almost ever modern programming language is what we call a high-level programming language. This means that it very closely resembles a spoken language of some sort and it does all of the conversion and mathematics for you. The lower the level of the programming language the more work you have to do to make it compile. However in every high level programming language there are a few basic elements that are always outline as the foundation for good programming knowledge. The foundation which everything else in that programming language is built upon later on.

The core components are: variables and logical comparisons. This extremely short list will, without a doubt, send the heads of seasoned programmers spinning endlessly, however, if you break a language down into it's core elements, those are the only two. Variables are place holders for information. A string variable is nothing more than a place holder for a line of characters, an integer is a place holder for numbers without decimals. Doubles and floats are place holders for numbers with decimals, etc.

For the logical comparisons, if statements logically compare two variables and return a logical answer (boolean[which is another placeholder]). For loops, logically compare two variables and depending on the returned boolean value, compare them again. While loops repeat comparisons until something is changed. Without beating a horse to death, you get the general idea. Everything encompassed in a programming language can be torn down into these two fundamental categories. So be it as it may, logic is 50% of programming.

When you traverse the gap into Object Oriented Programming which is a more specific type of programming (think class hierarchy programmers) we add another core component that does not apply to all programming language types, but only to OOP. That is methods. Methods are simply placeholders for logical comparisons. A wise teacher once told me that a class is the blueprint for an object and an object is an instance of a class. If a class is a blueprint, then the methods are the rooms on that blueprint. they don't serve any ulterior purpose other than to house contents more specifically.

I digress though. Logic is a huge part of programming and one that must be emphasized more in schools. I have taken 4 years of programming classes so far and not a single one has ever outlined the importance of using logic to solve. They've all gone through the motions of teaching the content but never stopping to explain why it's significant, how to understand it's logic. Maybe that is why there are so many internet horror stories of applicants to Microsoft and other big-wig software firms getting turned down because they can't write an iterative statement that goes from 1 to 10.

8 comments:

  1. Critical thinking and logical thought processes are a must...

    ReplyDelete
  2. Aye, yet i can't begin to explain how scarce they both are in the handout society we live in

    ReplyDelete
  3. I really want to be a philosophy major in college, do you know if it's hard or not?

    ReplyDelete
  4. Programming sounds a little hard :P

    ReplyDelete
  5. Tracy; unfortunately i do not know if it's hard to be a philosophy major.
    Josh: it's a pretty difficult skill to master.

    ReplyDelete
  6. Programming is really difficult. I tried to learn it but I stepped down from it because of my university classes :p

    ReplyDelete
  7. 010101010 wait what??? Haha great read bro

    ReplyDelete
  8. They teach programming in some schools in England now, I wish they did when I was a kid

    ReplyDelete