Skills needed to write code - First things first
It will be worthwhile to note that Coding (or programming) is ONLY just one of the many aspects of software development. There are many variables to software development. More often than not, many people do not care to do an analysis of alternative solutions. The first solution that comes to mind wins.?Many tend to bypass any architectural aspects.
This in my opinion is one of the most significant contributors to stagnancy in developers. Many software developers?get stuck on one level of expertise for years, if not decades because they’re not fully exposed to the beautiful art of software development.
I’d personally like to see a few 'AfrikanCoders' daring and getting to know software development?and expressing?themselves at a much deeper level, so we can reach that stage of developing meaningful and relevant solutions for Africa. That’s just our passion at AfrikanCoder.
Before you go to learn any programming language, you need to understand that there are different programming philosophies.
Let’s look at different programming paradigms?in next:
Common programming paradigms
Before you even look at any programming languages, it is quite imperative that you know there are different programming languages, and each of those languages heavily leans towards a specific style of programming, otherwise called a programming paradigm. There are many programming paradigms, but let’s?look at a few of the most commonly used, which most programming languages fall under:
Imperative programming paradigm
This is the type of programming where you have an explicit sequence of commands that are used to update the state of an object or entity.
This programming paradigm is based on the concept of procedure calls. Procedures are sometimes referred to as methods, functions, or subroutines.
If a language follows a procedural programming paradigm, it means that its statements will be bundled up into ‘procedures’, which simply refers to a list of instructions that are designed to command a computing device on what to do on a step-by-step basis.
This is exactly the reason why procedural programming languages?are known as top-down languages.
Most of the early programming languages?designed in the 1970s mostly use this procedural programming paradigm.
Examples of procedural languages include C, FORTRAN,?and COBOL. I hardly expect any of the readers to ever use FORTRAN or COBOL in their software development?career ever, so I won’t dwell on this paradigm. You may however at a point come across C programming?language, or at least its influence in some modern programming languages.
I introduced object-oriented programming?in the Solution Designing skills?section in my previous article, and if you're a beginner you may want to go back for a re-cap.
This paradigm is important because you’re probably going to spend 90% of your software development?career working in and around the object-oriented programming?paradigm, and therefore it will be vital to pay extra attention here.
In object-oriented programming, all real-world entities are represented by Classes. Objects are instances (or live appearances) of the classes. Each object encapsulates or holds in itself a state and behavior.
An object state inhabits the fields or attributes?of the object. An object behavior is what you do with the state of the object and this is normally achieved with the object’s methods. Objects interact with each other by passing messages.
There are several features on which Object Oriented programming is built. These are Encapsulation, Inheritance, and Abstraction, and I’ll briefly describe them below:
Encapsulation – With encapsulation, you hide unnecessary details in a class, to be accessed by that class only, and not any other class that does not necessarily need those details.
It describes the idea of bundling data and methods?that work on that data within one unit. This concept is also often used to hide the internal representation, or state, of an object from the outside.
Inheritance - This is a mechanism where you can derive a class?from another class for a hierarchy of classes that share a set of attributes?and methods. One clear advantage of using inheritance?in code is the fact that the class hierarchies develop code readability and also give support to the reuse of already written functionality. Resulting in less code and therefore a bit more conciseness, and less clutter. This leads to better maintainability of an application solution.
Abstraction?- this is a process of hiding the inner workings of an object. There comes a time when it is?not necessary to expose all the complexity of an object, but just what is necessary. It allows you to concentrate on what an object does, and not necessarily how it does what it does.
Fig 1.2 above is a simplistic class?diagram, but here you can see an example of abstraction in practice: The class Publication exposes the common properties like title, and price that can be used by both the Book and Magazine class.?
Polymorphism?- this is an object-oriented programming concept that refers to the ability of a variable, function, or object to take on multiple forms.
Some of the most common Programming languages that implement the Object Oriented paradigm include C#, Java, C++, and Python.
Example of a class?called 'Employee':
public class?Employee
??? {
??????? public int EmployeeNumber { get; set; }
??????? public string FullName { get; set; }
??????? public string Department { get; set; }
??????? public string Gender { get; set; }
??????? public bool IsMarried { get; set; }
??????? public int Age { get; set; }
??????? public void DoSomething()
??????? {
??????????? // Internal method that will 'DoSomething'
??????? }
??? }
Never mind if you don’t understand anything here for now, but please make sure you go back to the class?'Employee' example I gave in the Solution Designing skills?section in the previous article, and see if things start to make sense here now.
As I said, don’t worry about the details too much for now. This is just a placeholder in your mind. Get through these article series with the aim to understand the ecosystem around software development. When you finish the series, your mind will have been prepared to take the next lesson in learning a programming language in a proper way.
Declarative programming paradigm
Declarative programming?is my favorite approach to solving problems, and many senior developers’ favorite too, and in this paradigm you specify in your code the result you are looking for, and not necessarily how to get it.?Frankly, that's how life was designed to be. You specify the 'what' you want in life, and the 'how' takes care of itself.
This is an approach when a wanted result is declared as the value of a series of function elements or values. This is the most popular declarative paradigm. There are pure functional programming?languages?like Haskell, but you can also get languages like F#?from Microsoft, and OCaml, which are classified as functional programming languages but may also cater to an object-oriented approach, which is Imperative in its nature.
The inverse is also true, that you may get an object-oriented language like C#, but with the capacity to cater to the functional way of writing code. The main point to consider is the fact that F#?is by default a functional language and C# by default an object-oriented language.
Query languages, data query languages, or database query languages (DQLs) are computer languages used to make queries in databases and information systems. A well-known example is the Structured Query Language?(SQL).
As a software developer, you will need to learn and understand SQL?for your database management systems, which I will introduce to you in?a later article. Please follow my profile to get a notification when the article is up.
Another popular example of a query language is GraphQL, which was developed by Facebook?(nowadays known as Meta), by its internal team. This was their answer to their own internal problems that couldn't be effectively solved by the existing REST API?architecture that everyone else was using.
GraphQL?is also worth researching and learning, but if you are just a beginner software developer you might want to leave it until a later stage when you have had some experience first.
'Outroduction'
Many software developers?make the mistake of not even knowing there are other types of approaches to programming. When you know there are different paradigms and understand in what scenarios they work best, it gives you the power to think differently when coming up with solutions.
In complex solutions, you sometimes borrow a thought process from a different paradigm to approach a problem. Most of the time you will be providing a solution, you will be working under the confines of architecture frameworks like Microsoft’s .Net platform. Which 99% of the time you will be conforming to. But these frameworks are there for just that ... A framework.
These frameworks give you the freedom to architect your own solutions on top of them.
You are now aware of the fact that there are different programming paradigms, but am afraid it’s not time yet to even look at programming languages?themselves.
I gave examples, for example in the object-oriented paradigm, that there are several programming languages?that are based on this paradigm, including C#, C++, Java,?and Python.
You will quickly learn that there are different software architectural patterns that are programming language?agnostic, that work pretty much in a similar way in C#, as they do in Java?or Python.
Then you will also find out that next there are object-oriented design patterns?that work in a similar way across the object-oriented family of languages.
Thereafter you will also see that there are widely accepted design principles that work the same way across the languages.
A fully baked software developer will know these concepts first before going into the nitty gritty of an individual programming language, in this order.
I’ll repeat, many software developers?that struggle may have gone through shortcuts, for example going for a Bootcamp or picking a book that teaches the C#?programming language, or Python, etc, and learning code without understanding language-agnostic concepts behind.
When you understand these concepts, you can pretty much function in any set of similar languages.
I have come across short-sighted hiring managers who think just because you are a C#?programmer, then they shouldn’t consider you for a job in Java. When you meet such kinds of people in the future, explain to them the concepts that apply across the object-oriented family of languages, and expose their short-sightedness.
I'll tackle some of the common architectures, patterns, and principles in the next article. From this point on I will be focusing mainly on the object-oriented programming paradigm, as I expound on architectures, patterns, and principles because it is the most commonly used paradigm. See you in the next article.