data

The Exploration of Programming Languages - Standards of a Coder

Having been involved in IT for 30 years I have often been left bemused by the standards used by some programmers and sometimes imposed by programming languages.I started on Cobol. There were strict naming standards for file division, working storage and linkage section variables so you knew what you were dealing with.Indentations were mandatory, mainly for the purposes of readability but also to show structure.Mickey Mouse constructs using GOTO were banned – mainly because flat coding is decidedly unreadable and in some instances undecipherable.Example of Python Code Coding was in upper case only or lower case only. No-one cared as long as it was one case but the ruling was mainly site based. Mainframe sites tended to be in upper case because it was easier to read on a green screen. Lowercase seems to have become more popular since PCs were introduced with colour screens. It also tends to be easier to read, possibly because most of what we read is in lower case by convention. Kids today must think we typed in upper case so the computer realised it was being given a bunch of commands.I remember someone trying to impose his will by introducing a mixed case standard. The reason was that no-one else was doing it and we needed to be different. He was almost burned at the stake until someone pointed out that such actions may have repercussions, even if we were in Lancashire.There is also a reason for having single case as well. Not only is it easily readable, especially when used with underscores to separate words, but it reduces the number of times you use the shift button and is, therefore, quicker, especially for beginners to the torture known as typing.Process documentation was non-existent – the only place to look was in the code itself. Almost all languages have a provision for comments. This is a good thing as files, either on paper or disc, tend to get lost or can become outdated if there are different versions of the code. Comments in the code, as long as they reflect reality, are the best way to document a process. The excuse of ‘I didn’t have time to find the documentation and update it’ can’t exist.Linux | Open-Source Software Operating SystemI moved on to Linux and SQL. Standards are used with these languages as well. For the same reasons.By now, you should be getting the idea that if all code in a workplace looks like it was coded by the same person then everyone will be familiar with the style, methods, layout etc. This makes life easy for everyone.There are those who maintain that as coding is a creative expression then such standards shouldn’t be applied. Nazi state, the SS and all that carry on.However, building a car is a creative expression and you don’t see Ford letting everyone decide where to put holes, wheels etc. Production environments thrive on having a standard approach.I was introduced to VB back in the ’90s and quickly learned to avoid it. In the '00s I was re-introduced via .NET and hated it even more.The reasons? Variable names beginning with an underscore and camel case naming standards. Whoever thought any of that was a good idea should be tried for crimes against humanity (in my opinion).Moving on to more recent times, I have been dragged kicking and screaming into the 21st century. I have had to start learning Python. Python | Software | FoundationAt first, there was the usual confusion and associated frustration. I tried reading books but they didn’t explain stuff the way I like it explained. I hated it.Then I found out why Python is like it is. It is designed to be used in a production environment. It has enforced standards to make it readable and uses indentation to limit sections. e.g. no if --- fi type constructs where the fi is necessary to show the end of a block.Python 3 is even easier to use. There is, for example, only one numeric type with all the difficult stuff being done in the background. The same goes for assigning data types to variables.It is also (like .NET) based on OO methodology (a library of subroutines to us older duffers) so is understood by just about everyone in terms of functionality.Most importantly, it doesn’t make me use the despised camel case. Even as a committed atheist, I am beginning to believe there may be a God!Source-Linux - https://www.linux.org/Python Code - https://commons.wikimedia.org/wiki/File:Python.pngPython - https://www.python.org/community/logos/