Here at Codeminer we use Ruby and Ruby on Rails as our main technologies, but we also deal with other ones such as Java, Swift, Objective C, Go and Node.js, when there’s an opportunity to do so. We’re also keeping an eye on the wonderful Elixir technology, which is getting more and more mature each day. As a web consultancy and outsourcing company we also take a lot of care with our frontend code.
Although technologies such as Ruby tend to shape and mold the way we think, there are some kinds of knowledge which are more unlikely than others to get outdated. You can make good use of them in any project, it doesn’t matter which language or paradigm you use.
Learning these topics will certainly benefit you throughout your whole career, so follows a small list of important foundational knowledge to have as a developer.
General Computer Science
Computer science is a huge field of knowledge. If you don’t have a formal background in computer science, just like me, I advise you to go after the basics. It’s OK if you are not acquainted with heavy maths, which permeates the theoretical part of the field. Actually you just need to understand how things work in a practical way, but it would do you no harm to understand some theory as well.
Be aware that most of the tools we use everyday are highly grounded on computer science knowledge. There is a wide range of deeply interesting subjects, such as Finite State Machines, Formal Language Theory, Computability Theory, Artificial Intelligence, and so on. You will be surprised to know how much we use things like Finite State Machines day to day, in and out of our code, without even noticing. A Coca Cola machine, for instance, is a kind of a Finite State Machine. Some specialized knowledge about the subject would sure help you out a lot on making good decisions.
You may be interested in learning how to create your own programming language, and there’s a great introductory book for that, written by Marc-André Cournoyer. Even if you don’t want to create a programming language, topics like Abstract Syntax Trees and Visitor Pattern are utterly useful and have applications outside of that domain.
Some classical computer science textbooks are great reads, such as Structure and Interpretation of Computer Programs. If you have some programming experience, you will find out that this book is a relatively easy read, and provides a wealth of foundational knowledge on understanding computers as abstract machines.
Understanding Computation is a great book by Tom Stuart that’s tailored for Rubyists. With this book you will learn about what programming languages can and can’t do, and get introduced to some computer science topics with a very accessible language. Hopefully that’ll make you hungry to learn even more.
Algorithms and Big O Notation
You can’t have a serious career in programming without knowing about algorithms. Algorithms are one of the basis of everything we do, and one trick to be a good developer is to learn about how computers think at a deeper level — so that when you look at some code you know exactly what’s going on behind the scenes.
You may not be aware, but our day to day programming languages implement lots of algorithms. How many times have you needed to sort elements in your programs? We already have a lot of this stuff available for us at a high level, but that doesn’t mean we don’t need to get our hands dirty and learn about the subject.
Do you know what the Hash Table algorithm is? Did you know that the majority of programming languages implement a data structure that’s based on the hash table algorithm, which in Ruby, for example, is simply known as Hash? Do you know what a B-tree algorithm is and how it works, and why it’s so used in databases?
All developers would benefit from knowing what the most common algorithms are and how they work. If you want to be able to solve difficult problems in our career, this is a must have knowledge. And trust me, you will have to solve difficult problems.
Big O Notation is a knowledge that’s commonly used in practice, though it’s ignored by lots of professionals. There may come a time in your career when you may need to build a critical routine that needs to be highly optimized — and that’s where Big O knowledge comes in handy. In that case, it’s unlikely that you will make an informed decision or will have the knowledge to come out with the right algorithm without knowing about the subject.
Grokking Algorithms is a good book to get you introduced to algorithms and Big O Notation. It’s currently in beta, but it covers some interesting algorithms for you to get started with.
When I talk about clean code, I’m not necessarily referring to the former book with the same title written by Robert C. Martin, which is nevertheless a highly recommended read.
The important thing to understand here is that, although it is run by machines, code is written for humans and by humans, so programmers must take care in order to use clear and effective language/constructs in their code. One could likely write a complex program in a single file, with one or two letter identifiers everywhere, and the computer would still run it and understand it — but I doubt a human would.
The object oriented paradigm, for example, was developed to allow humans to write understandable programs, therefore it is not meant to satisfy computers. It’s mostly about the human. That said, programming languages already offer the tools we need to write modular and understandable programs, so we should learn how to use them effectively.
Always keep in mind that code is more often read than written, so badly written code accounts for an immeasurable amount of lost hours in human time. Every programmer should develop a particular kind of sensitivity when writing programs, by putting himself in the shoes of other people who read the code. This is difficult to do with excellence, and requires a lot of practice, so keep on practicing. Note that even if you do it very well, there will always be some other developer who doesn’t get it.
Finally, the abilities you learn on this subject will be useful throughout your whole career — it doesn’t matter which language or paradigm you use. Whether you’re working with an object oriented, functional, or some other kind of language, this is an essential sensitivity to develop.
Although it’s very old, Unix has proven to be a very mature and highly extensible technology. It’s one of the most battle tested, stable, secure and reliable operating systems out there, and powers most of our internet. A lot of specialized software we use today is meant to run on Unix systems, and take advantage of unique Unix features.
The philosophy of having small but composable programs is very helpful, and makes Unix suitable for things that we can’t even imagine. Did you know that we still use programs that were written decades ago? Unix skills that you learn today will transcend any programming language, and will likely be useful for a long time to come.
There are some great introductory books by Jesse Storimer, which I highly recommend you read: Working with Unix Processes, Working with Unix Threads and Working with TCP Sockets. These books use Ruby as a programming language, so they should be a great introduction if you are a Rubyist. Of course, they don’t even scratch the surface of what Unix can do, so don’t get stuck on them 🙂
Also remember that your Unix OS is self-documenting and has great man pages just waiting for you to explore them.
Databases and SQL
The SQL language, which is based on Relational Algebra, is used by a significant number of databases. It has been around for decades and is here to stay for a long time. In case you haven’t ever thought about it, databases are specialized technologies which allow us to work efficiently with big volumes of data, with the use of sophisticated algorithms. A programming language is not meant to work with big volumes of data, but a database is, and as such we should use it for what it does with excellence.
As Ruby and Rails developers, we are backed up by ActiveRecord, Sequel, ROM and other great libraries, which help us implement an object oriented abstraction layer around some of our SQL needs. Unfortunately those libraries don’t exempt developers from having to actually learn how a database works internally and how to maintain it.
A developer will highly benefit on learning what algorithms a database uses internally, what are the available ways to query data, what feature set a database offers and so on. It’s sad, but lots of developers only know the most basic SQL commands, if any at all. Some of them don’t even know indexes exist.
Databases are not magical, but they try to be smart about choosing the most performant query plans for any given query. When data grows to a certain volume, queries can benefit from having indexes, in order to quickly return results. Unfortunately, as everything in computing, there are tradeoffs to having indexes. To allow data to be easily found, they end up duplicating the same data on disk. Also, writes tend get very slow, because writing to an index is considerably expensive. So it’s obvious that a database can’t make all decisions for the developer, so the developer still needs to manually tune his database in order to suit evolving needs around the data.
And of course, knowing how to perform queries efficiently can make a considerable difference in performance, because not always the query planner gets to choose an appropriate plan, besides its best intentions.
All that said, SQL and RDBMS are not the final word on database technology. There are databases optimized for various use cases: NoSQL document oriented databases, in-memory databases, big data databases, and so on.
If you want to get started on making good use of your database with Ruby, I highly recommend you watch Your Database is Your Friend, by Xavier Shay. If you signed up for Code School, you can find this course at the bottom of the Screencasts link. That course will likely open your mind to SQL knowledge applied to Rails, and you will be surprised to know that you may not be doing some things the right way.
Another great book to help you advance your SQL knowledge is SQL Performance Explained, by Marcus Winand. This book is free to read online and will teach you about indexes and database performance. You can also buy the PDF if you like the content. Marcus has a great way of explaining things, so I highly recommend you read his book.
Version Control Systems
The widespread use of Version Control Systems is relatively recent, but these tools have already proven that they are invaluable for any developer process, independent of the technology stack. At a basic level, VCSs allow you to do the following: document the history of a project; provide security when making changes; provide means to rollback to any previous state; improve the communication of your team and your project, and improve the overall development process. They are the standard way to store source code, and services like GitHub are out there to prove this out.
You should get a glimpse on what’s possible to do with VCSs, and learn about the differences between today’s existing tools. A lot of programmers only know about the very basics, but the best thing they can do for theirselves, their team and their project is to learn how to work effectively with these tools.
Today’s most advanced VCS is Git, and no other comes even close. Git can be confusing at the surface, but once you learn its object model everything becomes obvious, and you can even predict how certain features work.
Be Curious and Open Minded
Always be on the lookout to learn more, and never allow yourself to stagnate. I doubt you know everything there is to know.
It’s unlikely that the topics presented in this blog post will get outdated, but it doesn’t mean they can’t. Don’t be too religious about your tools. Who knows one day a better programming model comes, and it’s not Unix based? You can even help out building one.
If you have an interest in learning and applying your knowledge to practical projects, we are hiring.
We want to work with you! Check out our "What We Do" page.