As IT trainers, should we be installing and promoting “good practice” and “ethics” alongside the coding and theory?
With the absence of a professional regulatory body in I.T. and web development, it is up to us to self-regulate. In doing so, it is essential that we pass on ethics and good practice to the next generation of developers and coders. It is not enough to just teach “good code” and computational thinking, we must provide the wisdom and morals to allow our students to implement their code in an ethical way.
Hacking, espionage, directed advertisements, ransomware, cyber-terrorism, fake news, fraud, spam, SQL injections, sexting, legacy content, the right to be forgotten -etc. are the headline threats to the future of our “on-line” world. However, beyond the obvious are the underlying ethics that affect our daily interactions in the digital age. It is crucial, I believe, that we create a culture of “best practice” within the IT industry to maintain our integrity and elicit trust from our clients and the wider public.
So, if I am not talking about the headline threats to online and digital ethics, what am I talking about?
I am referring to the need for standards and collaboration across the industry. The simple things that make life easier for us all:
- Indenting your code so others can read your code
- Commenting on your code so others can understand it
- Personalising your code so others can’t plagiarise it
- Make your code efficient and elegant to inspire others
- Share code snippets with others so we can learn from your code and you from ours
- Develop your code to be neutral of external influences (no politics, race, borders)
Let us now break these points down.
Indenting code has its advantages and disadvantages, but I will argue the positives far outweigh the negatives. Just as we use white space and paragraph in the written language to add emphasis and separate concepts, written code also benefits from this. Placing blocks of code separate from other blocks, or indented within a larger or parent block, helps others to read your code. Not only that, it makes it much easier for the developer themselves to isolate blocks of code when it comes to debugging or showcasing the code to the client or other team members. Different coding languages will have different levels of indentation built in – Python for example – whereas HTML will not enforce indentation (unless you are using a dedicated code editor or IDE). The W3C does go some way to highlight the need for indentation in their style guide by suggesting
· Do not add blank lines without a reason.
· For readability, add blank lines to separate large or logical code blocks.
· For readability, add two spaces of indentation.
· Do not use the tab key.
· Do not use unnecessary blank lines and indentation. It is not necessary to indent every element.
Sublime Text 3 has a really innovative way of helping with indentation, it places gridlines that connect the levels of indent so you can visualise related blocks of code. This also helps with ensuring you properly </close> your elements. As mentioned before though, these are just “best practice” at the most, and are neither enforced nor necessary. This naturally causes ambiguity in code with various editors creating different indent depths, some automatically create indents (Dreamweaver etc) whilst others do not (Notepad++, Sublime Text, Brackets). The point I make here is, someone new to the coding environment using a free editor will not necessarily be aware of indenting. Does this make their code wrong? Does it stop it from working? Will it stop them from being paid? The answer is no! However, it may not endear them to their colleagues and will place them apart as “noobs” and will hopefully imply they are not certified developers – a theme we shall return to later.
<!– Commenting your code –>
I understand that commenting your code is more associated with teachers wanting their students to show their understanding when compiling code, but its use is far more important than that. If you are being paid to write code for a company, they will often own the intellectual property rights to the code. Therefore, they have a right to understand what parts of the code are doing. That aside, if you are working as part of a team, other members of your team will need to know what parts of the code are doing. I am certainly not suggesting you comment every line or element, but you should comment a block, function, iteration, concept, external file etc – for your own understanding and sanity if not that of others. I am not referring to putting in an <alt> text for an image – although clearly, that is good practice too – I am more concerned about professional ethics and good practice rather than semantics.
Personalising your code so others can’t plagiarise it so easily.
Ok, this may seem sneaky, but using another developers code as your own is far sneakier! It may also be prudent to add comments to code to try and catch those plagiarising your code, or using it for financial gain and infringing your intellectual property rights. Beyond commenting, you could also add a few “false” lines of code. I am all for sharing code or examining others code as a starting point or inspiration, but within that, you should <!–comment–> in a #reference to the original code and thus, credit the author.
Share code snippets with others so we can learn from your code and you from ours.Finally – join a forum! Learn, share, create, collaborate, ask, tell, say, question, expand. There are plenty of places to get involved. Stack Overflow is simply amazing and a must join for any budding or professional developer. Join “roughly 40 million developers who visit the site every month” and ask more than 8,000 questions a day! Another great resource is GitHub where you can share and collaborate.
I hope this article has gone some way in helping you understand the importance of Industry ethics and “good practice”. If it has…or hasn’t… please LIKE, SHARE or FEEDBACK the post. Thank you.
About the Author, – Dr Richard Haddlesey is the founder and Webmaster of English Medieval Architecture in which he gained a Ph.D. in 2010 and holds Qualified Teacher Status relating to I.C.T. and Computer Science. Richard is a professional Web Developer and Digital Archaeologist and holds several degrees relating to this. He is passionate about the dissemination of research and advancement of digital education and Continued Professional Development #CPD. Driven by a desire to better prepare students for industry, Richard left mainstream teaching to focus on a career in tutoring I.T. professionals with real industry ready skills that matter at The Training Room.
#ttrIT #ttrcareerinIT #ttrLearnToCode