Computer Science for Front End Developers?
I am primarily a front end web developer, and I have a Computer Science degree. In my experience, this is neither rare nor particularly common. Folks seem to get into front end dev because they’re trying to solve particular problems, and those problems exist whether you have a PhD in high performance computing or you’ve never written a line of code before. Front end web development is how you make code real to people, and it is the minimal requirement for making something that people can actually interact with in a web browser. As a result, a dizzying array of folks get into Front end dev, and you’ll find a broader set of experience levels than devs who work further “down the stack”. All of which means that many front end devs have never had any sort of “formal” Computer Science education.
I’ve been thinking for a while about what Computer Science topics are actually useful for front end developers. It’s not obvious to me where to draw the lines, because you’ll never directly encounter many of the concepts that are covered in a typical Computer Science curriculum while making web applications. But I still have an intuition that my background in these subjects is helping me in my day to day. This weekend I decided to ask Twitter about it.
Pondering what a blog series on “Computer Science for Front End Devs” would look like.— Ben McCormick (@_benmccormick) February 18, 2018
Thinking this would be a high level of “what you missed if you don’t have a CS degree”, focusing on a subset relevant to FE devs.
Would love input. What would you expect to be covered?
I got a high degree of interest from that tweet, and so decided to keep digging into the idea. I did some research into the typical structure of a modern Computer Science curriculum, and came up with the lists below. Depending on the school, certain topics may be elevated or diminished, grouped or split, but the general shape tends to look the same for most schools I’ve looked at.
Generally there is an intro class or 2 that can be skipped by students with previous experience that covers core programming concepts, usually with an Object-oriented philosophical tilt.
- Basic Data Structures
- Control Structures/Recursion/Iteration
- Object Oriented Programming principles
There are also often 3-5 other “core” classes that all CS majors must take. They generally break down something like this:
Data Structures and Algorithms
- Big O analysis
- Common Data Structures - Linked Lists, Stacks, Queues Trees, Heaps, Graphs, etc
- Common Algorithms - Searches, Sorts, Graph algorithms, etc
- Start at the hardware level
- Memory Models
- Operating Systems
- File Systems
- Proofs and logic
- Formal lanugages/Context Free Grammars/Turing Machines
- Probability Theory
- Bayes Theorem
Software Engineering (not always core)
- Architecture of larger programs
- Balancing risk/quality/cost
- Design Patterns
- Designing for security/robustness/scalability
Finally, programs usually have a selection of electives that students can take to dive deeper into different specialty areas. These electives usually mirror the research interests of the faculty of the school but may include some of the following:
- Systems Design
- Human-Computer Interaction
- Computer Networking
- Artificial Intelligence and Machine Learning
- Computer Vision
Computer Science for the web
So how much of this is relevant to your average front end developer? Some of it is more tightly tied to web programming than others. Most of the basics will be picked up through osmosis for a typical front end dev, but a rigorous look at concepts like object-oriented programming and recursion might be beneficial. While most can usually get by with simple data structures, a background in common “intermediate” data structures like stacks, trees, and graphs can be quite useful in day to day web dev. Software Engineering principles are as obviously useful when building web sites as they are when you’re building firmware or operating systems. On the other hand, Computer Systems and Mathematical foundation concepts are usually not directly applicable in front end work. In my own experience, they serve as useful background for understanding the abstractions that my day to day work is built on. It’s good to have an intuition as to how browsers work, what is happening when we send data to a file, or what “text encoding” means. And you may end up in a crazy situation where you need to understand the code behind Babel or V8, and knowledge of compilers becomes a real part of your job.
I’m trying to figure out the best way to teach some of this stuff to somebody who hasn’t and is never going to spend 4 years taking these classes. So I’d love help from anyone reading:
- If you have a CS degree and write front end code, how has it helped you?
- If you were going to try and share part of that education with somebody with different experiences, which parts would you say are important? What resources would you recommend?
- If you don’t have a CS degree, do you feel like you’re missing out on anything? What useful-seeming concepts have you heard about but found it hard to find resources on?