by Collin Green, Principal Software Engineer at OneSignal
Many people don't realize that they can start writing code or don't know how and where to begin. On many occasions at OneSignal, coworkers from other departments would casually mention that they wanted to know how to code, but that it seemed impossibly complicated to learn — almost like magic. To answer their curiosity and disprove their fears, our engineering team decided to host weekly “Coding Superpowers” sessions during our Friday lunch hour.
Throughout these recurring sessions, our team covered everything from high-level technical topics to writing code and solving real problems. We let our own curiosity and the challenges we and our customers were facing guide our conversations, which made these sessions more fun and interesting than traditional lectures.
Below, I've outlined some of the basic themes we discussed, the projects we tackled, as well as tips and testimonials to help you create your own coding superpower sessions at your company.
- Fundamental Coding Principles for Beginners
- Real-World Coding Exercises
- Employee Testimonials
- Tips for Hosting Coding Classes at Your Company
Fundamental Coding Principles for Beginners
As we talked, certain ideas came up repeatedly and eventually became the cornerstone topics of our “Superpowers” hangouts. Understanding these three major principles unlocks the path to taking big ideas and being able to program them. We've outlined these three cornerstone coding themes below.
1. Code isn't magic
The first and most important theme that emerged from our “Coding Superpowers” sessions was that code is not magic! Yes, there are amazing machines and a tower of cool things we are building upon, but at the end of the day, all software is made up of smaller bits that we can piece apart and examine individually. Even the most complicated, magic-seeming applications are built out in sequential steps and based on the same concepts under the hood.
Breaking problems down into smaller pieces and then creating simple, sequential rules for solving them is how all software works. It’s amazing how much you can accomplish by applying the same building blocks in new ways to construct all the different software out there. You too can do this— you just need a little practice and a little bit of code to help you express it!
2. Destructuring is just a fancy Word
Taking a single problem and realizing it can be split into two smaller problems is the secret sauce to making things that are impressively (or intimidatingly) big. This is a concept most people are familiar with, but in programming, we take it to a level most people are not familiar with.
Almost everything can be conceptually simplified or diluted if you think about it in the right way, so this was the first step we always took when discussing any programming topic or potential project/problem. If you aren't at the point where you can easily start writing step-by-step instructions, then you need to break it down into smaller chunks.
Even the code itself can be thought of as one of these smaller chunks. Our standard group approach to each problem or project was to first identify the ”algorithm” we needed, without any concept of code at all. After we felt confident about solving a particular subproblem, it then became an easier job to simply figure out how to make the code say what we already knew.
Focusing on problem-solving wiped away much of the group’s uncertainty and fear, allowing us to dive into the critical thinking bit and worry about the coding step later on. This was a lightbulb moment!
3. Think like a computer
A top goal we had for the project was to help the group understand the step-by-step problem-solving that’s inherent to coding. Everyone thinks they're being meticulous as they solve problems, but it’s amazing how many things humans just kind of skip over. This is actually something humans are awesome at — insight, logical leaps, thinking outside the box, and creativity.
Computers are terrible at this, but they’re amazing at following exact instructions and repeating something the same way every time — very, very quickly. People can accomplish incredible things by letting computers handle the algorithmic bits and instead focusing their energy on thinking and creative problem-solving — this is what "Coding Superpowers" is all about!
This shift in thinking s is the first hill for new developers to climb, so we made a point of practicing this skill so often that it became almost a mantra. Every time we had an idea as a group, we would write it down, then go back through it and break each step into a series of smaller steps.
This often prompted a series of what really is X? style questions that make programmers seem like jerks, but actually help get to the heart of the task. For example, when making hangman we wanted to start with a word, but then we had to stop and ask ourselves and ask, what really IS a word?
Eventually, this led us to randomly pick a four to 10-letter word from a list of common lowercase English words we found online — but what is random? The list of questions went on and on.
Having a limited set of things we knew how to write — variables, basic math, simple loops, and functions — actually helped, because it was easier to see when we’d simplified enough and when we still needed to break something down further.
Mapping out problems like this is the most important and valuable insight that emerged from the overall “Superpowers” experience!
Real-World Coding Exercises
The Secret Message Treasure Hunt
One fascinating topic we covered in our meetups was encryption and how math and computers create the internet security we all know and love. We talked about simple cyphers and discussed how classic, real-life encryption works. We brainstormed around how we could implement our own caesar / rot13-style substitution cypher to write messages that our group could read but others in the company could not.
Together, we wrote the first step — a list of letters and symbols we wanted to use and a function to rotate them a certain number of steps. This process also gave rise to the perfect "edge case" example, because we had to solve “wrap around” when rotating a letter too close to the end of our list. After that, each member of the group had to figure out and implement the decoding step themselves!
This was the first time our group applied what we’d been talking about and practicing, which was both exciting and scary. Using the decode function in the homework was a great way to give participants a manageable task to solve alongside all the reference code needed in order to piece together a solution together, plus built-in tests. This task was a stretch for the group, especially folks who were busy and couldn’t commit to an unknown amount of time to figure it out. Thinking this through with participants individually helped, but the greater motivator was a treasure hunt built around this decryption process. Writing code for code’s sake is boring, but writing code so you can chase the next clue or solve a bigger problem is exciting!
Decode the following message with offset 13 for the next step:
Now finishing that decode function feels less like homework and more like a stepping stone to accomplishing something else that would’ve otherwise been extremely tedious to do by hand (superpowers!).
You can go through all the clues yourself (or just read them and their solutions) plus see all the behind-the-scenes tools used to create the clues in our Coding Superpowers Github repository.
Hangman Web Game
After the treasure hunt, we discussed different spinoff ideas. One interesting topic we came upon was how we could crack the encryption without knowing the offset upfront, which led us to play with a list of common English words and compare them against potentially decoded messages. This inspired our next group project — hangman!
Hangman was a perfect project choice because it’s a simple game that most people recognize and understand, which gave us a good way to practice breaking ideas down into step-by-step instructions we could use to make a computer run. It also illustrates just how complicated something can be, despite seeming simple at first glance. This opened a whole new world to consider — the user interface (UI). Up until this point, we had written only local scripts that we could simply run, perhaps with some initial input. But hangman was a different story because it included a large visual component, lots of "state," and had to account for a variety of ways that someone might interact with the game.
Although it was a heftier set of tasks, the exercise provided a more realistic example of what projects look like end-to-end, because we covered everything from browsers to react to building and hosting. We also got to scratch the surface of product design, as we thought through questions like, what makes a game fun? — which is much more nuanced than it seems! The act of building a project with an actual interface helped showcase just how much code goes into the UI/UX that isn’t required to make the game itself work.
Employee Testimonials from Coding Superpowers Sessions
I like that the coding superpowers sessions forced you to think like a coder, as opposed to just learning code syntax. It helped me to train my brain to focus on solving the problem and even when I thought it was solved to then think about what other problems may now arise. That latter part is something I realize I don't do enough — I like to just think I solve things and then move on, but is helpful to do outside of coding of course, in my current role as well.
I think it's so easy to think of coding as some super complex, unknowable thing unless you have a degree and years of dedicated study under your belt. This was so useful in showing that (A) literally anyone can code when given the tools to think in the right way, and (B) thinking in the right way doesn't have to be that hard. If you can reason through a problem in English, you can easily translate it into any coding language. Not everyone needs to be a software engineer, but everyone, no matter their job function should (and easily can!) have some basic software engineering knowledge to automate functions of their roles and make their lives easier.
Tips for Hosting Coding Classes at Your Company
Thinking about starting your own Coding Superpowers program at your company? Do it! Here are a few tips based on our experience:
- Make it easy to get started — people are busy!
- Working, editable, codepen examples were useful because folks could click a link and immediately edit code in the same way they saw me editing it
- Low dependency, local things made it easier (like running js scripts directly via node)
- Installing or signing up for services like GitHub are major friction points that will lose people
- Pick something that’s interesting enough for people to chase — the secret message treasure hunt kept people engaged while they figured out how to make the code work.
- Long projects that last over multiple weeks are boring and cause very high attrition — be careful!
- Go down the rabbit holes! When people ask questions, answer them and dig in! We went in many unexpected) directions in our sessions and had cooler conversations as a result of genuine curiosity. Our encryption conversation, for example, led to our secret messages.
- Remember that everyone has access to online tutorials and textbooks. Our advantages in this collaborative format are 1) being able to dynamically respond to the group’s interests or questions and 2) gauging how well people are understanding things as you go. Similarly, you are uniquely positioned to teach via a project that is super relevant to your learners, so leverage that!
- Focus on breaking ideas into smaller pieces until everything is easy to code. This was the most foreign concept to new programmers and was also their most valuable takeaway, especially when they went off to write code on their own.
- Teach people to be programmer-lazy. Manually doing things repeatedly is tedious. Figure out how to make the computer do it for you instead!
- Celebrate the wins! We announced everyone who finished the treasure hunt in a company-wide all-hands!
Join Our Team!
If you're interested in joining our team and taking advantage of professional growth and learning opportunities like these, check out our current job openings or reach out to us at firstname.lastname@example.org.