Wednesday, October 12, 2016

Humans don't read code and indentation matters not

When was the last time you wrote and read a piece of software in cursive hand writing, on some paper?  How about never.

It is the computer that is reading  and lighting up the pixels on your screen, and the editor and computer do all the work of presentation.  There is no reason the computer, the editor, cannot present Python code in a readable indented manner.

Then why did Python use indentation marks for software delimiters?  It was some sort of attempt to discipline the software engineers.

But the solution, quite simply, is to change the delimiter by settings on the editor/interpreter,  as the engineer desires.  We will get an IDE that allow free form c style block delimiters, it then executes a transformation, restoring default delimiters.  A simple trick, no different than  specifying different line terminators in your editor. In fact, a good editer, IDE could change the Python delimiter set to and from c like syntax.  At the block level, the IDE could transform one language to the other, just make sure c isn't doing any trick with pointers and bits.

And talk canout readability, most good software engineers can read a hex file and extract the list of decimal numbers, to some accuracy,even swapping bytes.  Dunno how many times I looked at hex executable, locating the call and return,identifying for loops and the rest, as part of some debug.

So, someone made an issue out of a non-issue.  Disciplining software engineers don't work, we know how to defeat the walls.


Knowing that software engineers will soon defeat the indent system, I am willing to use Python, especially because of class and import control it gives me. I like try and catch., break and continue I found useful in c and c++. And I am really excited about the lambda operator, I think it is pure macro definition and expansion, I always found defs useful in c. But, I am still playing with the Python system.

In my career, I always considered language specifics hullaballo, unless I was nibbling at bytes and bits.  I always considered that what ever I did was  moving into a different framework or language,.  And for large systems moving out of the lab, you make sure there is almost a direct translation of the basics to another language.  My Basic code, for example.  I would need all of a day or so to 'search and replace' on the code to make Python.  I mean I have already segmented out as much nest as I attempted to defeat the Open Office macro bug.

No comments: