Article Written By: Kenneth Nwanganga
=====
As an experienced Enterprise Architect with a proven track record of successfully aligning technology with business goals. I have identified some technical ways to gain a better understanding of how software code syntax and code structure work and how to easily pick up the new programming language.
Business owners most times don’t care about what programming language developers use in delivering their projects, they care more about functionality, usability, security, and scalability. We need to get a deeper understanding of what code syntaxes and code structures are.
When I started as a front-end developer, I learnt how to make use of notepad to write my codes, I hardly use IDEs, the IDEs available then were Dreamweaver and Microsoft FrontPage but I chose to write using notepad so that I can understand what the browser is interpreting to the user.
If you are thinking of becoming a senior developer or you are thinking about getting into software development, my advice to you is that, always make use of code editors, it’s easier these days with the availability of code editors like Visual Studio Code, Notepad ++ and so on.
Knowing the meaning of each word that makes up the language is not enough; you must also understand how to put those words together in order to communicate.
Imagine having access to the definitions of every word used in the English language without being aware of how sentences are put together. Despite having a very large vocabulary, you would be unable to put it to use.
Programming languages follow the same rule. You must comprehend a programming language’s syntax in order to use it.
During the development of a bus booking platform which I was heavily involved in as the architect of the said application, there was little struggle with the understanding of the .NET core framework due to the fact that this was new framework released by Microsoft at that time, but one thing that gave the team breakthrough was the fact that the team members were already familiar with the .NET framework.
Most times these syntaxes are always very similar to each other, just a few changes on how to make use of it within an application.
My foundation in programming is solid because I took my time to understand what basic code syntaxes are, it’s not even enough to just know syntax, you must also understand the possible errors that come with invalid syntax which occur when the code does not conform to the rules of the language.
Syntax can vary between programming languages and the best way to learn the syntax of a language is by taking a look at sample codes, understanding the data types (int, char, var, string etc) you will always find several videos and articles of any programming language on the internet today. I have talked about code structure a bit but let’s talk more about this.
Code structure, on the other hand, refers to the way in which the code is organized and the relationships between different parts of the codebase. It is the overall design and architecture of the code.
I remember the first major ERP I built in my early days as a developer, I often time hear the project manage and some senior developers talk about structuring the codes in a way that if anyone picks up the project they will be able to understand what has been written, this is a very good example of what a good code structure will do for you. If you have good code structure, it’ll be easier to debug the code and make changes faster.
A well-structured codebase is usually easy to understand, even if you haven’t seen the code before. It follows a consistent style and naming conventions, during the period I was learning advanced software engineering, we all got used to naming our buttons with btn, naming text with txt, Labels with lbl, once I pick up a project and I go to the backend if I see things like this, I already know what those controls are for. During the ERP I was working on, the MVC framework was used for the user-interface. With MVC, you already have a structure and separation of concerns.
What code structure does in programming is to create an easy way to make modifications, locate code syntax and make your entire application easily understandable. Imagine a code structure where your code logic is bundled inside the interface, this will look very messy.
For people trying to learn new programming languages, the first thing you need to consider is the code syntax. Once you understand the way the programming language expects its variables, arguments, parameters and so on, it’ll be easy for you to quickly gain full understanding of how that language works.
Let’s take a look at the various ways to output “Hello World” in few programming languages.
In the above example, all a developer needs to understand is how these programming languages compile and run its code snippets.
Programming is all about problem solving, as long as you understand what the problem is, you are one step away from getting a solution.
We’ve already established how output from different programming languages looks like, when writing in another programming language, the developer will be conscious of rendering his/her output the right way.
I have listed some of the most important things you need to understand to be able to pick up any programming language easily:
Data Types:
Data types is the fundamental thing everyone needs to learn and understand when picking up a new programming language, you will need to learn how that new programming uses its data types. A full list of data types can be found here
Selection statements
Selection statements such as if, switch, etc. are very important, you need to be able to know how to use them and where to use them.
Let’s look at the examples below:
Once you are able to understand the different data types each programming language uses and how they are used, you won’t struggle with any of the languages you want to code in.
Having been involved in several projects which were written in different programming languages, I have always found it easy to work with any developer regardless of the programming language he/she is using simply because I understand code structure and syntax.
In summary, understanding code syntax and structure is crucial for writing efficient and maintainable software.
Knowing the rules of the language you’re working with and organizing the code in a logical and consistent way can make a big difference in how easy it is to develop, test, and debug your code.
About the Author:
Kenneth Nwangangais the Chief Technical Officer (CTO) at GIGM; a Nigerian-based technologically powered transportation company that operates in many African countries. He is responsible for the company’s technical operations and plays a key role in the development and implementation of new technologies and systems to improve the company’s services and operations.
Kenneth holds a first class degree in Computing from the University of Greenwich in London and an Advanced Diploma in Software Engineering from APTECH Computer Institute in Nigeria.