The Rambling Programmer

Random musings on programming, mostly.

Why CS for Web Devs?

Data Structures & Algorithms

If your a web developer you probably have pretty strong feelings about whether or not one needs a foundation in Computer Science, Data Structures, or Algorithms. A quick google search brings up countless results lamenting the current hiring process for web devs. Most arguing that web developers don’t need an understanding of data structures and algorithms, and never will. A significantly smaller number of articles exist extolling the benefits of a strong base in Computer Science for web developers.

I’m somewhere in the middle. There is no doubt that every web developer uses algorithms on a daily basis. If you have ever manipulated a string or an array in JavaScript, or any other language for that matter, you have used an algorithm, whether or not you knew how the algorithm actually accomplished its task. Ever written some code inside a for loop, yeah, you wrote an algorithm, even if it was as simple as logging the output of each value in the for loop. Do I, as a web developer need to know the inner workings of Ruby’s array sort algorithm to use it effectively? Of course not. Am I a better programmer in general when I understand how my tools work, and probably more importantly, why they don’t work in certain situations. I believe so.

As programmers, whether we are systems developers, full stack developers, mobile developers, embedded developers, or one of the countless other types of programmers, we deal with patterns.

Patterns

The most fundamental patterns in Computer Science are the data structures and algorithms used to manipulate data at a low level. Whether it be stacks, queues, linked lists, or arrays, understanding these fundamental patterns allows us to identify similar patterns on a larger, or more abstract level. Clearly, at least a cursory understanding of the fundamentals of CS, can help us see patterns and solutions that we might otherwise not see.

As web development evolves, it tends toward more complexity, rather than less. Sure HTML and CSS are powerful tools that every front end web dev should master, in today’s landscape they simply aren’t enough. We need access to ever more powerful and complex tools to keep up with the ever changing landscape that is software development on the web. It’s difficult to be a good React, Angular, etc… developer without first understanding the basics of JavaScript. Similarly, it’s hard to really be a good JavaScript, Ruby, PHP, Python, etc… developer without understanding the fundamentals those languages are built on. These fundamentals, aka data structures and algorithms, get a bad rap. Many assume that since they are taught in university CS courses they are purely academic and difficult to learn. This is unfortunate. Although the concepts can be abstract, they don’t have to be difficult.

Maybe I’ve convinced you that having at least a basic understanding of the fundamentals of CS can help you be a better web developer, maybe you already knew, or maybe you are just eager to learn something new. Perhaps you’ve seen posts about CS concepts before written in a way that is too academic, or implemented in a language you don’t understand? If that’s the case stick with me, I aim to show you that these fundamental CS concepts can be learned in a way that gets away from the overly academic and more towards the fun stuff, that is, actually coding. Either way, join me in exploring a new topic in CS with each post. We will not only cover the basics but we will implement those basics. Get some hands on experience with these things to really understand them. Hope to see you next time.

F9cdf0bf2eed2e8d61eb5816d2f7688e
This is the best blog post I've ever read in my life! Brilliant!
Posted by Scott over 3 years ago