“So I’m allowed to cheat?”
Shocked and confused, this is what my wife, Lauren, asked me late last year. Earlier that day she told me she’d like to code. I thought this would be an amazing opportunity for me as a Treehouse Teacher to watch someone walk through the Treehouse app and watch their learning experience.
She started like many people do on the Front-end Web Development Track. I watched her make her way through Nick Pettit’s How to Build a Website and take her first code challenge. She had the project she had been working on open in one window and the code challenge in another.
She asked, “Can I copy and paste this?”
I said, “Of course!”
She confirmed, “So I’m allowed to cheat?”
I replied, “Yeah, developers do it all the time.”
Likening the time-saving activity of copying and pasting code rather than typing it all out to cheating is like saying flying to France from Iceland is cheating by not walking.
As someone who started to code you may feel inadequate that you haven’t memorized everything or that you have to fall back on things, but there’s no need to feel bad. There are several time–saving techniques that people use all the time, that may feel like “cheating” but it’s really not!
Copy and Pasting
I went on to explain that copying and pasting code and changing it to meet the requirements is what developers do all the time. It shows you have an understanding of the code if you can alter it. Many people create reusable code snippets that they paste into projects to get things done quicker. In fact many if not all developers reuse significant amounts of code on a daily basis in the form of libraries and frameworks like jQuery and Ruby on Rails.
Using the Documentation
In many of my courses, like Database Foundations, jQuery Basics and Node.js Basics, I heavily rely on looking at the documentation. Why? Because it’s a skill you need to develop. You’re not a robot with a perfect memory – no one is. We’re all human. And going to the documentation is absolutely vital in order to be productive and get stuff done.
“Teach a person to use an API, they’ll code for a day; teach them to read the documentation and they’ll code for a lifetime” – Andrew Chalkley
As a professional developer, I’m constantly in the documentation, looking for things I’ve done many times over, but I’ve slept a good number of nights since I’ve used them. Your brain will naturally memorize things the more you use them and more you specialize. But the life of a developer means you’re jumping from one thing to another often requiring different, skills, languages and frameworks meaning you’ll start getting “foggy” on those things that were becoming second nature to you. Don’t worry, there’s always the documentation to refresh your memory. Also, it’s handy to go back and look as things may have changed or improved.
Several students have thanked me for helping them learn to use documentation, as they thought that they were cheating. Quite the opposite, they’re just being totally awesome, wonderful human beings, not robots!
It’s also ok to copy and paste from the documentation sites!
Using a Search Engine
Another skill, which can feel like cheating is using a search engine. If you’re getting an error on your screen for the first time, it feels like you’ve done something wrong. Well, you may have, but it’s not the first time someone has made that mistake, and it may not be your mistake. It could be the people who brought you your programming language or framework. But how do you know where the problem lies?
Copy and paste (there it is again) the error into your favorite search engine, and hit “search”. If you don’t see an answer you’re hoping for in the results, keep editing your search term until it yields the most compelling results. It’s a bit of a hit-and-miss, trial-by-fire situation until you get the answer you need. The more you do it, the more you hone your Search-Engine-Fu.
Using an IDE
Integrated Development Environments or IDEs are awesome tools that help you be super productive. Some examples of IDEs are IntelliJ, RubyMine, PyCharm, Xcode, Visual Studio and WebStorm. They offer things like code completion, code improvement suggestions, debugging and lots of other cool tools to help you be less like a robot and more like the human you are!
Don’t pay attention to those people who’re using some text editor that looks like it was developed in the 70’s; I’m sure they’re happy with their tools, but one size doesn’t fit all.
Saving time and treating yourself like a human is not cheating. It’s being smart and productive. In the end, you’ve got to do what you’ve got to do. Making computers work in the way you want them to is difficult enough without beating yourself up for using the tools that are there to actually help you!
Here at Treehouse we put a human face on technology. It’s not the daunting ones and zeros that the popular press would have you believe. It’s a human experience learning to code and we want to help you. Sign up today for your free trial and give it a go! Cheat all you want!