Computers

I want to learn how to code [Part 2]

When non-programmers hear about programming, some of the first things that usually come to their minds is how some big names in "Computer Programming" (actually technology) such as Mark Zuckerberg who created a revolutionary website; Facebook, Bill Gates who built a tech empire; Microsoft.

I want to learn how to code [Part 2]

So yeah! the "literature lecture" in part 1 of this series on deciding whether you should really learn how to code is gone! You are now well versed with the reason why you have decide to learn coding and I hope that generates more passion in you. If you are here, you are most likely on a path to become a computer programmer. Congratulations! Let's go ahead and now answer the first question that usually come up : So, where do I start, what language do I learn first?!  Well, pause.

When non-programmers hear about programming, some of the first things that usually come to their minds is how some big names in "Computer Programming" (actually technology) such as Mark Zuckerberg who created a revolutionary website; Facebook, Bill Gates who built a tech empire; Microsoft, maybe because he could code and all the others like Steve Jobs who wielded some form of innovation with tech. It's a talk of disruption.

Yes, there is some correlation. It makes sense to hear of programming and think in that way maybe because you don't have the details; but wait, most of these people are big names in Technology and Entrepreneurship not exactly computer programming. For example among the 3 mentioned names only Bill Gates is a computer programmer doubling as an entrepreneur. Steve Jobs was a business magnet, industrial designer, investor and entrepreneur. Oops, someone looks surprised. It was Steve Wozniak who championed technical innovation at Apple and what Steve Jobs had to offer was his "design and business" expertise while Mark Zuckerberg is a psychology major who learned programming and created something that changed the world. Wikipedia describes him as an American internet entrepreneur and philanthropist. (Which icons do we have then in programming? Google up Guido Von Rossum or James Gosling or maybe Linus Torvalds. Well well, that's not the point but it does give you an idea! They are so many of them!)

So whenever people who get inspired by these tech innovators decide to start learning programming, What they would expect at first from a Computer programming introduction is a lecture like maybe "first steps in building mobile apps" or maybe "introduction to programming websites". They want to get up to speed fast and change the world like Zuckerberg or Bill Gates. Well I am sorry! Introduction to Computer Programming is in fact synonyms to Introduction to Computer Science. The good news is, all what you expected is buried in Computer Science. So finally! welcome to I want to learn Computer Science and Programming part 2! Let's start.

Following our new perspective, the questions Where do I start and What programming language do I learn first! can be answered separately which implies the first step to learning programming it not learning a programming language but learning how to solve problems. But, as you can already guess the questions and their answers look like;

1. Where do I start Fundermentals of Computer Science.
2. What language should I learn first Usually easier to answer after Learning "Fundermentals of Computer Science". Also, opinions on what is best to learn first are divided but in this article I exploit some common choices and promote languages that are near computer architecture for beginners. Of coures each option has it's pro and cons.

Fundamentals

If you’re a self-taught engineer or bootcamp grad, you owe it to yourself to learn computer science. Thankfully, you can give yourself a world-class CS education without investing years and a small fortune in a degree program. -TeachYourselfCS.com

If you already tried programing in the past and "stopped growing" at some point, "have built some websites in the past" or learned how to do some very specific kind of programming task like building an app from a bootcamp, you might have come across certain words and or concepts that really really got you confused and lost somewhere along the line as your knowledge grew after such a training. Unless you are pretty smart, you may have noticed your inability to try or take on certain kinds of tasks or problems that other elite programmers would. There's something missing.

Also, when or if you start learning programing, there are lots of "jargons" (actually terms) that usually come up when explaining concepts that usually would require going back to computer science or computer architecture. Proceeding to teach programming without at least giving the learner these basics from computer science would always mean watering down the meaning of such concepts.

A good example is when we try to explain what a Variable is. When explaining the concept of variables to someone who does not understand what Memory and Memory Locations are, it's highly possible to create a false abstract view or way of seeing variables in the learners mind.  Well well, we may simply define a variable as a value or entity that can change just as we know and see it in common sense. This could work at first but things would get nasty when you try to go deeper.

Actually for someone to understand concretely, what a variable with respect to computers and programming means, this person must understand the concept of memory, addressing and naming (bother not about them for now). You may know a variable in anyway that allows you proceed with the basics. That's ok, but what is wrong with learning the accurate thing? or building on the very foundations that determine whether the structure you build collapses or stands?

So if you want to learn how to program, it then, makes more sense to first of all understand how what you would be programming (the computer) works. Yeah yeah, so what are the things taught in Computer Science and what are the benefits, you ask.

Well, you would learn Computer Architecture, Data Structures and Algorithms, Operating Systems, Computer Networking, Databases, Languages and Compilers, Computer Systems (like clouds) and Programming! This does not follow an order but CSC courses are usually organized in a way that would permit you use, your previous knowledge to learn the new concepts being introduced. At the end everything would connect. You only need the basics, I mean the very basic of these topics which are of course non-exhaustive to develop fulfilling and well-remunerated engineering skills over time, it may be valuable commercial work, a breakthrough open-source project like Linux, Firefox or another programming framework like Laravel? :), becoming a great technical leader or making high-quality individual contributions.

A good place to start with Computer Science? Well there are a couple of great online courses, if you are okay with reading, which I strongly recommend, the Open Source Society University has a great CSC course  or you can also follow the great recommendations at TeachYourselfCS.com. If you prefer videos you can follow CrashCourses' Computer Science Series or maybe FreeCodeCamp's Computer Science and Software Engineering Theory with Briana.

Don't get it twisted. The Computer Scientist and the Programmer are NOT exactly the same and the role of computer science is not to teach you programming specifically, the Programmer, I mean that elite programmer, just have to understand "very very" well the fundamentals of Computer Science to be able to perform his craft nobly.


What language to learn first?

I did mention that there's no designated language to start with and the decision is influenced by opinions (mostly academic ones not random opinions, like gossip on footballers. For example what language would Harvard or MIT use?). So, there's no fixed rules. However, there are widely accepted and commonly used languages such as Python, Java, C and now Javascript used in introducing programing.

One of the most favored criterion that is used in picking introductory programming languages is simplicity since it's usually for beginners, however the criteria I recommend is generality (a general-purpose language), architectural closeness of a language to computer organization and sufficient human friendliness together over simplicity, let's review some top choices with the arguments for why you should pick any of them.

Last stop before we review the programming languages, I have mentioned the term Computer Architecture and or Computer Organization a couple of times. You may ask, "what do you mean by understanding architecture.",  "Should I know where the hard drive is, or be able to tear down the motherboard and locate the C-MOS battery before I can learn programming?" Well, no.

Computer organization is an important first look at computing below the surface of software. In our experience, it’s the most neglected area among self-taught software engineers. - TeachYourSelfCS.com

It's just basically understanding how the computer is organized conceptually at the level of the hardware, which eventually allows software to run. So technically it would help you among other things, know where a hard drive falls in the organization of a computer, conceptually.

C/C++

Machine language is the only language the computer understands! It's just working with a couple of electric bits, it's complex and suicidal to program in machine language, so high level programming languages like C were created to save your head. So basically, all code you write in any programming language is converted to machine language. Despite its difficulty is the fastest and most efficient language, it follows the exact architecture of the computer with near zero abstraction. Our insufficient "intelligence" is the only thing drawing us back, otherwise all programs would be written in Machine Language (At first, they were, that's why programmers where extremely few and highly gifted individuals).

C/C++ considered the bread and butter of programming, a language in which almost all low level systems such as your Mac OS, or Windows is written in. Infact C is the language that was used the create the Python programming language, which is undoubtedly the most popular language used in introducing programming. So why C? You sure  is not interested in making another OS or programming language or maybe you are but it's the most popular choice so why would I advocate for it first?

C is the closest programming language to machine language which is flexible enough for humans to easily work with, it models problems from the perspective of a computer and remember the goal is to learn programming while understanding the basics of computers and its science. At some point, you part would change and you might get into game development, web development, or machine learning applications, your choice of language would now be influenced by its application. Starting to learn programming with C means, you would hardly get surprised by the way other languages are organized and works. Many languages including Python, Java and Google's Go and recently Dart and C-Styled. Meaning they learn syntax and semantics from C. It might not be the simplest language to start with, but it would help you understand a lot of things that would help in other programming languages when you pick them up.

Usually when you start with a certain programming language and move to another one, your brain would expect the new programming language to work like the first one you learnt and hence think of the new language in terms of the old one. If you think all that is cool, well then start with C otherwise, let look at python :).

Python

Python is widely accepted as the best  programming language to learn first. Python is extremely simple to begin with and its fast. Unlike C, Python is an interpreted language and can be more forgiving with errors. Python is implemented in C and as a result,  borrows from the C power. Python is more abstracted than C, provides a simpler syntax, much faster to debug but generally slower (the significance of speed here is quite low though). Python makes it way simpler to implement various data structures and carry out computations on them. Due to this, python is a great language to learn ALGORITHMS which is basically what gives "thought" to computers.

Python is highly used in the field of Machine Learning and AI. It also has the advantage that it works on more platforms that C, for example we build web applications in Python but this is not the case with C.

Python versus C/C++ error messages.

Java


Java is a general purpose platform independent language which enforces Object Oriented Patterns in which almost everything is modelled as an object which is closed to the way we humans see, understand and think about things. Java is widely used for building  enterprise applications such as banking systems and is known to be extremely powerful though a little slower than counterparts like C because it runs on a virtual machine (the Java Virtual Machine - JVM) for this reason, Java programs need to be "interpreted" to first run on the JVM before being finally being "interpreted" to run on the actual machine.

Java intentionally hides several details that C exposes and does work that you are required do to yourself in a language like C automatically (for example Garbage Collection).

Java looks a lot like C/C++ but has fewer low-level facilities which helps to hide the underlying computer architecture. For this reason, Java is a good language to learn after C as it would help you better understand ABSTRACTION (the way implementation details are hidden)  a core computer science concept.

Moving with the tides.

We could say time moved fast but no! Technological evolution moved so fast. Computing technology improved and worrying about certain things like speed has become lesser burdens. The industry has grown also, many tools sprout out, new domains have been created and languages to match these specificities have come up. So away from sorely prioritising architecture over everything, we would consider some of these changes and get into another set of possibilities.

I don't particularly recommend "moving with the tides" as a beginner way to learn programming but if learning to program is not purely motivated by the drive to truly understand the facets or computer science and programming, but is more inclined towards factors such as usability, adoption and job market then here are some languages you can learn first;

GoLang

Go is a statically typed, compiled, general purpose programming language that specializes in concurrency developed at Google. Go is syntactically similar to C, but includes facilities for  memory safety, garbage collection and structural typing. (If you don't understand these words then Go as predicted may be a bad choice for a starting programming language, but moving with the tides still.)

Golang is very much like C but has facets that has seen it being mostly used and promoted as DevOps language due to its highly concurrent nature and sleekness in problems involving distributed networks, cloud services, and other complex back-end-type implementations. You can do pretty much anything with Go.

Ruby

Ruby is an interpreted, high-level, general-purpose programming language. It has grown in popularity over time and the author Yukihiro "Matz" Matsumoto said he made because the object oriented modules in python "felt" like plugins and that he did not like that so he decided to make a genuine object-oriented, easy-to-use scripting language. Many successful projects including github.com, gitlab.com, airbnb and dribble were built on Ruby.

JavaScript

Javascript initially design to work within the browser as a frontend language has grown not only in the frontend sector but has grown beyond the browser it was initially designed for.  Even though javascript is mentioned here, it is, according to my chosen criteria the worst language to learn first. So because, it fails the very first criteria by not being a general-purpose language and the second by being highly abstracted, however it's still a good domain specific language to start with if to say, you, for example simply want to be a web developer.

There are a handful of other languages including PHP and C# (pronounced C-Sharp) that you might find being recommended as first learns, most of them are specialised and or highly abstracted so do not fit as good recommendations according to our chosen criteria and by the way, we can't even mention all of them.

One thing you might have noted is that, Python, Java, Go and many other languages  have C-like syntax and borrowed concepts from it! Even JavaScript has a C-like syntax but is almost completely nothing like C conceptually. You conclude but when doing so, remember that new languages would always come up and the languages in "moving with the tides" section should ideally be updated as things change (dynamic). What would never change, is the fundamentals of Computer Science and Programming. :)

Watch article video on YouTube: https://youtu.be/VwEvoGS4KEc

0 Comments 0 Comments
0 Comments 0 Comments