Programs: For Me, For You, For All

I just read an interesting article, A Different Approach to Coding. One of the authors, Mitchel Resnick (MIT Media Lab), is one of the inventors of Scratch, a universally used graphical programming language.  Their thesis is that coding is a new form of literacy.

BTW, Last December’s, Hour of Code, used Scratch and some other graphical approaches to get kids excited about programming.  If this is new to you, go to that site, spend a few minutes.  Just click the “Start Learning” button.  You’ll see immediately how it all works.  It’s fun.

Their programs are aimed at grade school kids.  That’s the main market. But, older kids and grown ups are not excluded and many get their first programming exposure via the graphical languages.

Besides the entertainment, all of this training falls in the “For Me” category.  By that I mean the these techniques are for programs that you write just for yourself.  Could be for fun or to solve a particular problem.  You know what data that you have and what you want the program to do.

A good example of this activity is that spread sheet that you build to sum up some numbers or to calculate something specific that you do over and over with a calculator.  (Can you still add up a column of numbers by hand?  Why is the answer different the second time through?)

You need very little documentation and in many cases will use the program for awhile and then “throw it away”.  (Well, it’s probably still there, on your computer somewhere, unless you needed the space and deleted it.)

All of the training that I’ve seen in schools and in most of the on-line offerings to teach programming, result in learning how to build “For Me” programs.

For these programs, standards are not very important. Naming conventions, documentation, and proper structuring can be ignored because no one else will see that program and even you will probably scrap it after awhile. It’s probably not that large, either.

But, suppose you ask me to build you a program to input some sales numbers from a web database, calculate the average gross profit by product and print out a bar graph showing comparative results.

We’re now into the “For You” category, and several questions immediately come to mind, like, Where is the database? How many products? Where are the cost numbers needed to calculate the gross profit? What do you really want the output to look like?

That will take some time to sort out and then I’ll figure out how to organize the program and then code it — understanding that you will be running it.  Key, is “you” not “me”.

Oops, what if you try to run and the database is unavailable?  I see a phone call coming.  So I better put in some code that checks to see if the database is there and working properly.  If not, print you a message that says, “Sorry, data base not available — try later”, or something like that.

Then, what if there is an entry in the database that’s supposed to be a number but is $%#, a “corrupted” number?

Lots of things like that come to mind, but because we are friends and you can call me, I just have to take care of the most obvious and annoying items.  You can call if something “weird” happens.

All of the “extra work” will take about three times the work to just do the calculations.  Yes, THREE!  Hard to believe, but if you are a programmer, you are nodding. (underestimate?)

Ok, It’s later and you are so happy with that program, you say, “It’s great and we should turn that into a product and get rich and famous.”  (been there, done that — not the last part))

Now we have the “For All” case.  We won’t know the users. If something goes wrong, they will be on the help line and probably mad.  Some will, that’s reality, but you want to cover as many of the errors as possible.  They come in two varieties. those inside our product and those outside.

The customer/user could care less who’s to blame, they just want it fixed — and yesterday, please!

By proper design, coding, and testing (lots!) I can minimize the internal errors in the product — but external? Very tricky.  Just have to anticipate as many as possible. You can only blame Bill Gates or Steve Jobs for so many.  (I’ve tried — it doesn’t get you far.)

Without going into detail we have another factor of THREE here.  So the original “For Me” program takes NINE times the time and money to turn it into a “For All” product.

If you have been through this software product process before, I bet you are thinking, “Only NINE times?  In my experience it’s more!”

Whatever that factor is, the initial design and programming is a small part (maybe 20%) of the lifetime resources needed.  Also, the product might need fixing or enhancing.

All of that is ignored in the myriad of available programming courses.

The 80% part is critical.  It’s there — the elephant (gorilla?) in the room.  Good methods, standards, etc. make that “doable” — meaning, with out going bankrupt.

Why not learn those from the beginning? Hey, it even makes the 20% part “smaller”.

Print Friendly, PDF & Email