I’ve previously written about using deep work to build and strengthen your skills as a developer. Here’s a speech I gave on it recently.
Learning to code
This past week as I continued learning about algorithms and data structures, I jumped into wrapping my mind around time complexity. Making this video was hard, but worth it. Given the task of trying to explain time complexity to someone else, I become determined to truly understand the fundamentals of the topic and attempt to convey it in a simple way. Here’s my shot at it. Time complexity! And I finally know what big-O notation really means.
What did I explain well in this video? What could I have explained better?
When I started my first job as a developer, I realized I needed to learn several hard things–and fast.
Before that point, I had only worked on small apps. In my new job, I was suddenly faced with a huge, complex application that an entire team of people worked on. I barely knew how to navigate through this app, let alone how to add to it.
I decided to create a habit of doing Deep work.
Deep work, Cal Newport writes, is the ability to focus on and learn hard things. It can be done in many different ways, but the idea is to put yourself in a distraction-free environment and work on tasks that push your cognitive capabilities to the limit.
I chose a time each day to sit down at my desk. I turned off all notifications. I hid my phone and put on noise-canceling headphones. I set a timer on my computer for two hours. Then I concentrated for those two hours on trying to solve one coding problem.
Or I tried to.
After two minutes of focusing on a hard problem, my thoughts drifted away. My mind felt like a toddler that kept crawling away from me to look at whatever shiny new thought popped up. I constantly had the urge to check social media or think of something easier than the task at hand. Focusing felt impossible.
As Newport points out, our minds have become addicted to new stimuli and we’re constantly looking for what’s next. We use rushing from task to task and being ‘busy’ as a proxy for productivity. Yet it is by focusing deeply for long uninterrupted periods of time that we usually best learn the difficult skills that are most valuable.
Today, doing deep work is a little easier. I still have to actively bring my thoughts back to what I’m working on. I still have the same urges to check my phone or chase after a new, easier thought than the hard problem that I’m facing. Each time that I resist the urge to follow after a new thought or grab my phone, I train my mind to focus. Slowly, I can focus a little bit longer each day. As a result, I’m learning the things that previously seemed so difficult to understand.
From coding to writing to drawing, doing deep work helps me hone my ability to focus and learn hard things. It’s not about natural talent or being a certain kind of smart. It’s about how well I can focus deeply on the task at hand.
Myth 1) You’re bad at programming so it’s not meant for you. For most of us, when we start coding we quickly realize how hard it is. We begin to think that we’re bad at programming and that it’s just not for us. However, learning to program is much like learning to write or learning any other skill. It can take a lot of time of being bad at it before you’re good at it. Programming has a steep learning curve, so often we turn away from it before we realize that it could indeed be something we’ll be great at and enjoy.
Myth 2) Programming is not creative. Coding is actually creative because it’s all about problem-solving. When you code, you’re figuring out ways to do something that couldn’t have been done before, or you’re figuring out how to do something much better than before. Facing a screen waiting to be filled with your code is much like facing a piece of paper waiting for your words to be written. You can create anything you want. If you’re a highly creative person, coding might be something you love.
Myth 3) I have to have a Computer Science degree to program. According to Stack Overflow’s survey, almost half of the developers surveyed do not have Computer Science degrees. While for some a CS degree might still be useful, there are many options today that are cheaper and more efficient. There are tons of coding boot camps and online courses you can do if you’re motivated enough to become a developer. There’s also the argument to be made that many colleges teach out of date programming languages and do not use the best, most relevant practices and techniques commonly used on engineering teams today.
This post has been published on Udacity’s medium publication. Click here to check it out!
When you’re learning to code it’s easy to be overwhelmed by all of the different resources out there. Where to begin? While the best way to start learning to code is to just start coding, having a program centered around completing projects that slowly builds up your skills can be helpful. I chose Udacity when learning to code because their courses focus not only on programming but on the mindset, skills and traits of a successful web developer. I recently took Udacity’s Responsive Web Design Fundamentals course and throughout this review of it, I’ve touched on these mindsets and skills that Udacity emphasizes. This is what sets Udacity apart from any other online program and makes it the best resource to use when learning to code.
Lesson 1: Why responsive?
Learn by doing
Within the first fifteen minutes of lesson one of the course, it’s made clear that we’ll learn why responsive web design solves a problem you’ll face as a web developer and how to use different responsive web design skills to solve this problem. We’re shown the tools to get started. The key emphasis in this course is to learn by doing. Instead of the way it’s done in traditional classrooms when you’re memorizing seemingly random information to perhaps use in some distant future, Udacity focuses on starting this lesson by almost immediately having you learn by doing. Instructors Cameron Pittman and Pete LePage lay out this course for us by essentially saying: here’s this problem you’ll run into when creating your websites. Here’s some ways to combat this problem. Go experiment.
Why learn responsive web design? The mobile market is taking over. Instructor Pete LePage puts it bluntly: “If you’re a web developer and you’re not building for mobile devices, you’re going to lose all your users.” Cameron Pittman made me laugh as he demonstrates how horrible it can be when you’re accessing a website from your phone and you have to pinch and zoom just to read anything. Nothing on your website matters if the website isn’t responsive on different devices.
How to solve your problem. In the lesson before this one, I built a website. Yet I quickly noticed that when my site is on my iPhone or Android, it looks terrible. Lesson one of the course dives into the various ways I can fix this problem. I experiment with using simulators and emulators, learn to use these dev tools to see how my site looks on different devices. I learn how to make my website responsive on any kind of device. Instead of listening to long lectures on things that I someday will regurgitate onto a test, I’m fixing a real problem within something I created. Udacity presents one or two minutes of new material before you’re back to fixing or doing something. Create something and learn as you experiment with your creation. Learn by doing.
Lessons 2 & 3: Starting small and building up
Hard work and enthusiasm trump all
In Lessons Two and Three, the instructors show us that starting small is the first step when designing a responsive site. Don’t start big and design down. Prioritize content and work up by planning what you want a mobile user to see first. Throughout this lesson, the instructors are enthusiastic and supportive. They leave you with the impression that you can learn to code no matter who you are, all you need is to work hard and take small steps to build your skills.
Instead of a professor or authority figure who knows all and must be revered, Udacity instructors often talk about how they’ve struggled with the same problems that you have, or bring up examples of how they’ve messed up. Udacity’s instructors are usually asking each other questions that I’ll be asking myself at the same time. One instructor often breaks down a concept for the other. When I took a traditional computer science class in college, it struck me that the professor seemed to purposefully present content in a difficult way. In school there is a myth that “hard” skills like coding are difficult, stressful, and tedious to learn.
Udacity shatters this myth. This is what sets Udacity apart. Everything in their curriculum is based on the idea that Udacians learn best by playing, creating, and experimenting. Yes, it can be difficult and stressful, yet it’s the kind of stress you feel when you can’t get your Lego house to look exactly how you want it. It’s not a question of acing a test or getting through ‘grunt work’. It’s a question of how you can make your creation better.
Lessons 4 & 5: Common Responsive Patterns and Optimizations
Develop the Web Developer’s mindset by teaching yourself
Lessons 4 and 5 get harder. We’ve learned about breakpoints, different kinds of pixels and how to optimize your page. There are many different ways to do all of this. Here is something that took a second to get my mind around: a pixel is not a pixel anymore. Then we’re talking about tech specs and then we’re talking about CSS pixels and then… “What!?!” Pittman says to the other instructor, accurately describing what I’m thinking.
I saw that another student had asked, “Why didn’t Udacity explain further about this?” when it came to learning more about pixels. The answer is that Udacity intentionally chose not to dive deeper into this subject. As Udacity describes in their course ‘Establishing a Web Developer’s Mindset’, a web developer spends a ton of time every day googling and finding the solution on their own. While the more passive version of me in college may have gone to ask the professor or a classmate for help with the answer, now I seek it out for myself.
The creators of Udacity have recognized that as a web developer (and in any career) your success depends on how much you can teach yourself. In the real world, you can’t go to your boss and say that the test was unfair because he didn’t prepare you for what would be on it. In the real world you have to search for your own answers. Udacity doesn’t ‘teach’ you so much as nudge you towards learning things on your own. In doing so, they nudge you towards becoming a better web developer.