Functions! Functions are easy!
Breaking things is the best way to learn, actively putting out more to solidify a learned concept. In other words, I believe that the brain can better store concepts in long-term memory when one gets practical with a concept. This process is usually very fun for me and is the main reason why I was extremely excited when I started learning to code.
The Genesis - How it all started
As a young boy, I was intrigued by computers. I took old system units from family and friends and repaired them by replacing damaged parts such as hard drives and memory as well as kept the machines updated. Though the internet was young then, I would find resources online to read to help with any task I was trying to solve. I even went to the library some Saturdays to find books to explore on things computer. Books today are still very relevant. My exploratory readings gave me an advantage while in High School computer classes, as I was always assisting my peers with assignments. High school is where my coding passion was first teased with algorithms and pseudo-code.
An algorithm is a step-by-step set of instructions for completing a task, whereas, a pseudo code is simply a way or method of implementing an algorithm. The pseudo-code gives more details of the actual implementation to solve a problem generally using natural language.
FERNCOURT HIGH SCHOOL
The focus in High school was not to dive into writing code, but rather to set the foundation of any good coder. To develop the skill to think like a coder and to solve problems. I would later learn that coding is mainly about solving problems, and the solutions implemented using a programming language. But to get to an efficient solution, a good understanding of algorithms and pseudo-code is crucial.
Coding at College
C++ How To Program: My First Programming Book
Breaking things is the best way to learn, actively putting out more to solidify a learned concept. My first line of code was written in C++ in College. My first whole program written on my own was to find the factorial of a number using recursion. The usual Hello World program written in C++ kicked started my journey into the coding world. Using Deitel and Deitel, I started learning the syntax of the C++ language. I recall after writing and compiling some C++ code, I saw lots and lots of red messages (errors) in my code editor, and reading the messages trying to understand what exactly they were saying. It took hours and a lot of time to work through the errors, but, I was learning key concepts of coding and the syntax of the C++ language. So, breaking things is the best way to learn, actively putting out more to solidify a learned concept.
To help grasp the concepts of coding using C++; I worked along with my peers to cover the fundamentals such as variables, data types, operators, and control structures. At this point, I was still getting errors, but was better able to resolve them as they came up. Errors such as type casting errors, I had gotten the concept of what data types were and the fact that C++ was a strongly typed language. But then we went unto the topic called Functions. I just did not get functions when I was first introduced to it, and the red messages all came back in my code editor on my functions assignment. I spent more hours in the computer lab trying to wrap my head around the topic called functions. I had issues with what exactly it was and how to use it. I presume now it may have been because functions took me away from the sequential code writing I was doing thus far and gave me a more modular approach to writing my code. Then, there was the concept of functions accepting or not accepting a value. I just didn’t get it. One day, a colleague and I were talking about our struggles with functions. Our Mathematics teacher overheard us and said, “Functions! Functions are easy!”. This was the turnaround point for myself and my colleague in understanding functions. For me also, this was the turnaround point for me in understanding coding generally.
My college mathematics teacher took the time to explain to my colleague and me in a simple way what functions were. That day we fully understood the concept of function declarations, and within the declaration, there is a parenthesis that can hold values to be used within a function. We learned the purpose of a function and how to call a function for execution. Our mathematics teacher used phrases such as, “This is not hard…”, “This is a simple concept…” and “All you are doing is…”. What started as explaining functions turned out to be a crash course on coding. This was the same mathematics teacher who taught me along with some other colleagues how to play Chess.
After spending hours practicing and working through errors, I developed the habit of learning but more importantly, how to learn new concepts. So as I progressed to more advanced topics like struts, objects, and classes (OOP), and having set my foundation from High school with algorithms and pseudo-code, my mind was fully developed into that of a coder. The more I coded and made mistakes, the more fun it was and the more I learned. This was realized in my final project, which was a stock-keeping inventory for an auto parts store. I used all the concepts learned throughout the semester, and yes, I used those pesky functions, along with Object Oriented Programming and different C++ header files.
Consistent effort and determination with valuable help from my mathematics teacher got me through my first programming language, C++. I know a lot of people today would not choose a C-based language to teach programming, but I believe going through a lower-level language has its benefits in producing a coder that understands what is happening under the hood – what exactly is happening within the computer. This knowledge may help in writing more efficient codes. So my recommendation today would be to still work through a lower level language such as C/C++ at some point even if your main language is a higher level language such as Python.
As I became more comfortable with C++, I also decided to learn HTML. I quickly recognized that HTML was a lot easier than C++ and I picked it up quite fast as it is very intuitive. HTML was my second language to learn as I was interested in the Web as it was expanding.
Coding at University
Haskell: My Second Programming Book
I went to University to continue my computer studies where I did Electronics and Computer Science. In electronics, I used C language to program micro-controllers, and in computer science mainly JAVA to explore programming more deeply. However, I started university using Haskell, a functional programming language. I Started slowly adopting the functional approach of writing programs, but again spending time with the material in the computer lab, and working through errors, I eventually grasped Haskell concepts. My final Haskell project was a text editor, where I was able to write text in a GUI and save the text as a Microsoft Word document or a text file. One of the challenges the class had with this project was the undo functionality. Here is when I grasped the purpose of another core concept of coding, Data Structures. The undo feature was achieved using Stacks – a Last-In-First-Out (LIFO) data structure. So the last operation done in the editor was stored on the Stack, then removed from the stack if the undo button was clicked.
Introduction to Java and Software Design: My Third Programming Book
After Haskell, I learned JAVA. I recall one JAVA class session when multiple students were confused. Arrays were the topic, another data structure that thankfully due to my college C++ days of errors I already knew. The confusion was around indexing and the fact that Arrays start from zero (0). At least 30 minutes were spent deliberating this one concept, and the same happened when the topic of Object Oriented Programming was reached. Truthfully, looking back, programming concepts as a whole were not explained properly at the University. I can say this now as I know the concepts and like my college mathematics teacher can explain to someone so they “get it”. “An object is a running instance of a class”, this was the definition given to us students. Today, I know exactly what this means, but initially, myself and other students didn’t quite get what it meant. I eventually found the blueprint explanation whereby a class is like a blueprint for a house, and from that one blueprint, I can get many houses (objects) built with different properties such as color. Constructors, Inheritance, Polymorphism, all concepts then that seemed complicated I learned to be simple concepts with big names. Craps game was one project I had to complete using JAVA.
My next language was the language of databases, Structured Query Language (SQL). SQL was fun to learn, I got the basics down quickly to select data from a database but had a short period of confusion about how to use the WHERE clause and especially when and how to use the HAVING clause. All of which I was able to overcome again by practicing using the MYSQL Relational Database Management System (RDBMS). I recall writing mysql -u root -p countless times at a prompt to enter my test databases for practice and to complete assignments. While learning SQL with MYSQL, I recognized that MYSQL was usually used with the PHP programming language. I had already learned HTML and gained programming skills, thus, getting up and running with PHP on the web was not a challenge for me. I enjoyed learning PHP on my own time to incorporate its use with my MYSQL learning. Now I use MariaDB instead of MYSQL on my Linux machine or I use PostgreSQL, but the database concepts I learned years ago are still relevant today. Today daily I also use MS SQL Server.
My final year project was written in ActionScript 3.0. The project was a mathematics program focused on helping people with number/numeric challenges. This is called Dyscalculia. The program was presented in a game format to provide individuals with high numeric interactions in easy formats. At this point, I knew how to learn any programming language, so for the fun of it, I decided to learn ActionScript for my project. The project was a success, I received a well earned A.
Coding in St. Vincent and the Grenadines
Object-Oriented Programming with Visual Basic.NET: My Fourth Programming Book
So I have been through a few years of coding, in which time I was introduced to all the core programming concepts. But I truly learned coding after leaving University and started my first job. I left Jamaica for St. Vincent and the Grenadines for a coding job where I started off using VB.NET with Visual Studio 2003. I have never learned VB in school, but at this point, I would have learned that the concepts of coding are similar across languages, I just needed to learn the syntax of VB.NET. My core function at the time was to use VB.NET to interface with Microsoft Office Documents such as Excel and Word to extract data from those documents as image files. To achieve this I used the Office SDKs provided by Microsoft. My main achievement was to implement the extraction of data from Viso documents which also consisted of embedded shape objects. This is where the recursion concept of my first complete program written in C++ came in handy. I had a problem getting data from embedded shapes in Visio, and the solution was to create a recursive function.
It was not all work in St. Vincent, I was in a new country with so much to explore. I stayed in the capital Kingstown, but most weekends I went hiking on the other side of the island with co-workers to the La Soufriere Volcano. We stacked up on fruits and water but still, three hours later when we got to the volcano dome, everything was finished. The smell of sulfur was very pungent in the air. Steam was continuously moving into the air from within the dome, yet it was very windy and chilly. To date, the best water I have ever drank is from off a rock at the top of the La Soufriere. The water was perfectly chilled and smooth.
The Grenadine islands were simply magnificent. The closest island to the mainland is Bequia, where I did some scuba diving lessons. It was a joy swimming with the fish. Even on my way to Bequia via a Ferry, I remember seeing dolphins splashing through the waters. I did an entire tour of the Grenadine Islands, and my favorite island was Mustique. My co-workers and I rode ATVs around the island of Mustique which was pure fun. I am Jamaican, and in Jamaica, we have some nice beaches, but I am not biased. The best beaches I have been to were on the island of Mustique, clean beaches with crystal clear water and white sand. The beaches then also were opened to all to freely enjoy. I also explored other islands such as Palm Island, Canouan Island, Mayreau, and more.
When C# started gaining traction, I decided to start learning C# and implemented small C# programs at work. However, after 18 months of working overseas, I returned home (Jamaica) to pursue my Masters in Computer Science. During my master’s program, I was introduced to Ruby and Rails and went deeper with JavaScript and CSS.
Further Development
I went on to use different development stacks: Java Struts framework, Java Server Pages and Hibernate ORM, PHP ZendFramework, NETCore – writing mainly REST APIs, and Vue.js Javascript Framework.
Today I still enjoy coding mainly in Python and C#.
My coding journey is the typical one, in that I was exposed to coding through the formal education system. I will quickly say that the formal approach is not a necessity. I have seen free resources online that explain the domain a lot clearer and yet faster than the formal education system. Most of these resources are also self-paced. Anyone can get into coding, but coding is not for everyone. It requires great focus and consistent determination to always learn new concepts. The good thing is that the core Programming concepts are easily applicable across multiple languages once learned. Start the learning journey with one language to grasp the core concepts of coding, then move on to another language. My sequence was C++, HTML, Haskell, C, Java, SQL, PHP, ActionScript 3.0, VB.NET, C#.NET, Ruby, CSS, Javascript and Python. Remember, breaking things is the best way to learn, putting out more to solidify a learned concept. Practice is a must with coding, coding is a practical domain.
Reading keeps the mind fit, and books are still very relevant today. If you are interested in getting into coding, here are a few good resources:
Python
Python is a high-level language which is fairly easy to learn. It uses more human-friendly syntax compared to other C-based languages. For this reason, Python is generally used as a first language to teach programming concepts to new coders.
This book covers all the fundamentals needed to grasp the syntax of the Python language as well as fundamental programming concepts.