Chapter 9
In This Chapter
Assessing time and money needed to learn to code
Finding resources to learn coding on your own
Using tips to keep progressing even when you get stuck
I am always doing that which I cannot do, in order that I may learn how to do it.
— Pablo Picasso
When you decide that a career in coding is for you, there are many ways to take the plunge and start learning. You can learn by yourself, in modern high-intensity coding schools, in traditional environments such as a university or college, or on the job.
Unlike learning subjects like biology or chemistry, learning to code doesn’t require lots of expensive equipment or many years before you see results. You can learn how to code a feature or a function, and start implementing it right away. No matter what route you take to learn how to code, it’s a good idea to try learning a little bit on your own to see how you like it.
In this chapter, you choose a goal, discover the hardware and software you’ll need to start coding, and see the various free and low-cost resources available to learn coding on your own. Learning to code, especially on your own, is not easy — this chapter provides a roadmap to make the journey easier.
Whenever you start learning any new subject you should ask yourself the following questions”
The goal for many people is to do their existing job more efficiently. Chapter 2 covered different ways coding could improve your ability to do your job across a variety of roles. For example, you may love your job in sales, and you want to analyze the large volumes of data that your company has on which product the customers use the most, so you can find similar customers and build a list of prospects to solicit. Gradually, as you increase your proficiency, other companies may ask you to consult for them and build some similar capabilities. The commitment and resources required for a gradual change like this are low and constant, because you are learning over a long period of time.
For others, the goal might be more dramatic. You may want a full career change in the next six to twelve months. The commitment and resources required to make this type of switch are significant, but employers are becoming more comfortable with self-taught programmers.
To achieve your goal it is important to understand how much time is required in total and how you will plan your learning. If your goal is to learn a tool or complete a task at work more efficiently, you may need only a day to a week of training, along with some practice, to start seeing results. Learning to code in a week or less to complete simple tasks is possible for many coding fields, including web development, data analysis, and database management.
To switch careers and be employable as a full-time developer requires between 700 to 1,000 hours. That sounds like a lot, but you can complete that in about ten weeks with intense practice, or in six months to one year with less commitment.
When learning introductory coding topics, which take 50 hours to complete, the time you spend can be more sporadic — an hour between meetings at work, an hour each weeknight at home, and several hours during the weekend. As the topics become more complex, you’ll need dedicated blocks of time for learning and for debugging.
Learning how to code on your own is the cheapest option in terms of cash spent, though you’ll need more time to set up your system and troubleshoot issues that arise. The good news is that putting aside hardware costs, the software and learning resources are free or inexpensive. In addition, you’ll find a community of experts and people learning like you who want to share information and support each other.
Computer hardware can be expensive, but options exist at a variety of price ranges. Here are some options when purchasing a computer to learn to code:
Cheapest: Use your existing computer, whether PC or Macintosh. The software is usually harder to install on Windows-based systems than on computers running Linux, Unix, or Mac OS (which runs a version of Unix).
For $89, Symple (at www.symplepc.com
) sells a computer with a preinstalled Linux-based operating system and enough power to perform your coding tasks. You need to supply your own monitor, keyboard, and mouse.
Cheap: Chromebook laptops (see Figure 9-1) are portable and light but powerful enough to run coding software. They run Google’s Chrome operating system and are designed to be used while connected to the Internet. You can’t install traditional Mac, PC, or Linux applications, but you can install extensions made for the Chrome browser. These laptops typically retail for $200, and are manufactured by major companies such as Acer, HP, and Samsung.
Codestarter (at Codestarter.org
), a nonprofit that provides laptops to kids learning to code, has publicly released the script to turn a Chromebook Acer C720 into a coding machine complete with modern programming languages such as Python, Ruby, and NodeJS. Use the script by visiting github.com/codestarterorg/ubuntu-chromebook-installer
.
After you have a computer, you need to install software to help you write computer programs. The software is basically free, though it can take longer than expected to make sure it installs correctly.
Initially, you should install the following types of software:
Programming languages: Popular programming languages such as Rails and Python are used for everything from web development to data analysis. These languages are usually free to download, install, and use. Use a search engine to find installation guides for the Windows, Mac, or Linux environment.
To install Ruby, Rails, Git, Sublime Text, and more on Windows, Mac, or Linux machines, use the guide at installrails.com
. Thousands of people have used this guide; if you get stuck, check out the comments at each step.
Code editors: You can start programming right away with built-in applications such as Notepad on Windows and TextEdit on a Mac. Notepad and TextEdit were not designed for coding, and other code editors provide enhancements such as code syntax highlighting and code autocomplete such as Notepad++ on a PC, Text Wrangler on a Mac, and Geany on Linux environments. To develop mobile applications, you can download and use XCode from Apple for iOS apps, or Android Studio from Google for Android apps. All of this software is freely available for you to use.
Some popular and useful code editors are not free. Sublime Text (www.sublimetext.com
), which sells for $70, works across multiple platforms and includes advanced editing, highlighting, and code completion features. You can download and trial an unrestricted copy before purchasing. Another code editor is Cloud9 (c9.io
), which you access in the browser without downloading anything. The main advantage here is that everything is automatically updated, always works, and you can access your work and code from any Internet-connected machine. Cloud9 has a free plan, and paid plans start at $9 per month.
git-scm.com
) is a popular free tool to manage backups, versioning, and multiple versions of code when working on a team.An incredible number of resources are available for learning how to code. Do a Google search for learn to code, and you will find millions of websites and more content than you could ever consume. To not feel overwhelmed, first ask yourself what kind of coder or coding job you want. Would you like to learn to be a
This section presents resources you can use to learn more about each of these subject areas.
Traditionally, a self-learner used blog posts to dip a toe into a topic, and books to dive deeper into a programming language. Blogs highlight inspirational stories that document people’s journeys, and books serve as valuable reference tools. The following are some favorite blogs and books in each subject area:
blog.jenniferdewalt.com
: An artist by trade, Jennifer Dewalt (see Figure 9-2) learned to code by building a different website every day for 180 days, writing a blog post about it, and posting the code publicly on GitHub. On day 52, she created an Etch a Sketch program; on day 97 she created a text-to-Braille converter.joshuakemp.blogspot.com
: Joshua Kemp, a blacksmith, seriously injured his hand while shoeing a horse. He decided to learn to code, and wrote about going from a blacksmith to a developer.learncodethehardway.org
: Zed Shaw has written two books for back-end developers titled Learn Ruby the Hard Way and Learn Python the Hard Way. Both, which are freely available online, provide instructions and real coding examples aimed at beginners.
For a community-sourced list of all freely available, online programming books, visit http://github.com/vhf/free-programming-books
. The list covers over 25 programming languages and environments, so focus first on the popular and easier languages such as HTML, CSS, Ruby, and Python.
app.itize.us
: Half the challenge when creating a mobile app is cramming the functionality you need into a small mobile screen. Visit this site for a curated selection of the best-designed apps.twotoasters.com/blogs/ideas
: TwoToasters creates mobile apps for some of the largest brands in the country. They maintain an iOS and Android blog on industry news and programming tidbits.ibmbigdatahub.com/blogs
, IBM’s blog has consistent coverage of big data trends, industry news, and the latest technologies.moz.com/learn/seo
, this blog is the best place to go to start your SEO education. You’ll learn all the factors that influence search rankings.cutroni.com
: To track and measure the effectiveness of any SEO campaign, you need an analytics tool such as Google Analytics. Google’s Analytics Advocate blogs about cohort analysis, user identifiers, and other analytics-specific topics.With the demand for coders so high, many companies have created websites with engaging and interactive experiences that are easier to complete than just reading a blog post or a book. Some sites gamify the experience, encouraging you to keep learning by earning points and badges. Most sites have community support, which can include discussion boards, live chat, or tutors to help when needed. The cost for these services varies per website; some are free and others charge a monthly or per-course fee.
When choosing a resource, check how much content is on the site, whether the materials are up-to-date, and the level of community engagement. Nothing beats having a strong online community to answer your questions quickly, and nothing is worse than spending hours trying to debug a problem with your code only to discover that the website you were using had a typo in the instructions.
Here are some favorite online websites in each subject area:
codecademy.com
(free): Learn basic web programming languages to create complete websites from front end to back end (see Figure 9-3). You can start immediately with only a web browser; you don’t have to download or installing any software.codeschool.com
($29/month): Initially, Code School became popular with its Rails for Zombies series, but the site also has a niche among intermediate developers. The site features video lessons with in-browser coding challenges for a wide range of programming topics and languages. There are also screencasts (recoded coding sessions) with guest speakers teaching various skills.teamtreehouse.com
($25 or $45/month): Treehouse has a slightly larger content library than Code School, and includes all the usual front-end and back-end courses along with mobile app courses for iOS and Android as well as business classes on how to freelance and market your app or business.
Bento (bentobox.io
) is a community-sourced curated listing of the best free resources for learning how to program and, most importantly, the order in which to take these topics to maximize your learning. The site has grown to include over 100 lessons on programming languages, frameworks, libraries, and APIs.
itunes.apple.com/us/course/developing-ios-8-apps-swift
.www.udacity.com/course/ud585
.bitfountain.io
.datasciencemasters.org
(free): This open-source data-science curriculum has curated free and paid online courses, books, and tutorials.www.coursera.org/course/datasci
.datacamp.com
(free to $25/month): This interactive online course teaches you R, a statistical programming language, in the browser. Courses include introductory lessons to advanced data manipulation and visualization using R and specialized libraries.As you can see, there is no shortage of content or coding topics to learn. As you start your path down any one of these roads, you’ll have questions, get stuck, or just need encouragement. Although you are learning by yourself, you can find mentors to support you on your journey and help you make progress.
Mentoring can be expensive, but the cost depends on how much time and assistance you need. If you’re taking a Codecademy course or viewing a lecture on Coursera and need an hour or two of ad-hoc help occasionally, check out these hourly services to connect with a mentor:
airpair.com
: Over 2,000 expert developers are available to help you debug and review your code. Experts set their own rates, which range from $60 to $300 per hour.codementor.io
: Experts in over 800 categories, including HTML, JavaScript, and Ruby, connect with you instantly for one-on-one help. Rates start at $10 for a 15-minute session, and the website displays experts who are online and available to help. (See Figure 9-5.)hackhands.com
: Users pay $1 per minute for on-demand help across a variety of programming languages. After you connect to an expert, you have an initial 5-minute grace period at no charge to assess whether the expert is the right person to assist with your problem.You may want to occasionally ask for help from mentoring sites such as AirPair. Expert-led coding instruction typically involves a curriculum along with mentor check-ins, office hours, a discussion group, and live chat. These fuller and more supported services work well if you have some money to spend on your coding education but don’t want to pay $10,000 for a high-intensity coding boot camp (discussed in Chapter 10).
Some options for mentor-led coding instruction include the following:
thinkful.com
: Along with courses in web development, design, data science, iOS, and Android programming, Thinkful matches you with a mentor for weekly 45-minute sessions and offers open office hours. Students pay $500 per month, and typically finish one subject in three months.careerfoundry.com
: Similar to Thinkful but with fewer classes, CareerFoundry has a custom curriculum for web development and design, along with weekly mentor sessions and a group chat. The course includes 12 mentor sessions and costs $1,680.bloc.io
: Bloc has programs in web and mobile development as well as design. The fee is $4,500 per course and includes 36 mentor sessions over 12 to 36 weeks.You have a computer, found a website, and even did a few lessons, but you feel stuck. Learning anything on your own, especially coding, can be tough! It’s easy to lose motivation, get frustrated, feel confused, and spend way more time on a concept or topic than you had planned. All these feelings are normal when learning a new subject.
This section provides some tips to keep your learning on track and a process to help you get going again when you’re stuck.
As a novice coder, you may not be sure where to start. Should you learn Python, Java, Swift, Ruby, PHP, and JavaScript at the same time or sequentially? Or should you just choose a few?
If you’ve never programmed before, I recommend learning a language used to create web pages, because it’s easy to get started and publish work for others to see. Start with HTML and CSS. These are markup languages, which are the easiest to learn. You put content on a web page with HTML, and style that content with CSS.
After you understand some of the basics of presenting content, learn a programming language to manipulate that content. Keep in mind that you don’t need to learn every programming language — JavaScript, which adds interactivity to a web page, is a common starting point for beginners, along with either Ruby or Python, which add advanced features such as user accounts and logins.
Learning to code is similar to learning to drive a car. When you first learned to drive, you probably didn’t worry too much about the type of car you were driving. After passing the driving test, you could operate just about any car, even one you hadn’t driven before, because you knew to look for the ignition, accelerator, and brake. Learning a programming language works the same way: After you learn one language, you know what to look for, and learning and using another language becomes easier. Just start somewhere!
To stay motivated, create a concrete, well-defined goal. You can choose any goal you like, but make sure it’s something you would be excited to accomplish. Good goals for beginners include the following:
You can start practicing by doing small coding tasks, such as bolding a headline. At first, you may feel disconnected from your goal. But as you start to piece together individual coding skills, you’ll see a path towards accomplishing your goal.
At some point, you’ll get stuck — your program won’t run, or it runs but returns incorrect results. Professional developers face these same problems. Developers constantly use the Google search engine to research general questions on how to code a feature or specific questions on syntax for a command or a tag. For example, imagine that a few months from now, you need to add an image to a website. You remember that HTML has a tag to insert images on a website, but you don’t recall the syntax. To quickly and efficiently find the answer, follow these steps:
www.google.com
.Search for HTML image syntax.
The programming language, the intended command, and the word syntax should be sufficient to find a good set of resources.
Review trusted websites for answers.
For many coding questions you’ll likely see the following domain names in the top ten search results:
www.w3schools.com
is one of the best resources for beginners who want to find basic information on developing web pages.https://developer.mozilla.org
is a crowd-sourced documentation and tutorial site for developing web pages. Its documentation is accurate, although some content is not beginner friendly.http://stackexchange.com
and http://stackoverflow.com
are crowd-sourced discussion sites where developers can ask and answer questions about a variety of coding topics. You can find information on everything from front-end and back-end web development to data analysis and operating systems.You can use this same process to research questions in other coding languages, or to find code examples from other developers who are building programs similar to yours.
While you’re doing all this coding you will inevitably create errors, commonly referred to as bugs. There are three types of errors:
Some programming languages such as HTML or CSS code work even in the presence of syntax errors. However, in other programming languages, such as JavaScript, code with syntax errors won’t run.
The best way to find and eliminate bugs is to first check your code syntax and then check the logic. Review your code line by line, and if you still can’t find the error, ask another person to take a look at your code, or post it on an online community forum such as http://stackoverflow.com
.
When you start coding, you will likely be reluctant to show others your creations, whether it’s your first basic website or something more complex Reid Hoffman, the founder of LinkedIn, famously said, “If you are not embarrassed by the first version of your product, you’ve launched too late.” Hoffman was commenting on this desire to keep trying to perfect what you have built, and says instead to release (or “ship”) your code to public view even if you feel embarrassed. Regardless of the size of your website or app, it is better to receive feedback early and learn from your mistakes than to continue heading in the wrong direction.
Also, remember that the highly trafficked, highly polished websites you use today started from humble beginning and simple prototypes. Google’s first home page, for example, had only a fraction of the functionality or style of its home page today, as you can see in Figure 9-6.
After you finish coding the first version of your website or app, collect feedback on your code and on the final product. Even if everything is working and your website looks great, that doesn’t mean your code was written correctly or that your site solves a problem. For example, YouTube initially started as a video-dating site but changed to a general video-sharing website based on user feedback.
The best way to obtain this information is to collect quantitative and qualitative data on your code and the product. For example, measuring the places where visitors click on a website and how long they stay on each web page gives you quantitative information, which helps you diagnose and improve low performing pages. You can collect qualitative information by surveying users, either by emailing them survey questions or by watching people in-person use your website and then asking questions.
Often this data will surprise you — users may find confusing the features you thought were obvious and easily understood, and vice versa. Similarly, if possible, have someone examine your code, in a process called a code review, to ensure that you didn’t overlook any major problems.
After you’ve collected feedback, the next step is to iterate on that feedback: Keep coding until the major issues in your feedback have been addressed and you have improved both the code and the product. Keep in mind that it’s usually best to confirm the usefulness of your product first, before spending time improving the code.
This process — building a product with a minimum set of essential features, collecting feedback on the product, and then iterating on that feedback — is sometimes referred to as a lean startup methodology. These days, changing software is as simple as modifying a few lines of code in real time. This contrasts with the way products used to be coded, which involved longer development cycles, less upfront feedback, and documentation for any software change in the product.
While coding, you may have come across documentation you found confusing or just plain wrong. Maybe you found a great resource or a tool that worked especially well for a product you were building. Or perhaps the no one used the features you coded, and you had to give up the project.
In all these situations, the best thing you can do for yourself and the larger community is to blog about your successes and failures. Blogging benefits you because it shows others the issues you’re thinking about and trying to solve. Similarly, blogging benefits others who used Google to search for and read about your experiences, just as you used Google to search for ideas and solve problems. Many nontechnical entrepreneurs, such as Dennis Crowley of Foursquare and Kevin Systrom of Instagram, taught themselves enough coding to build small, working prototypes and successful products, and then shared that journey with others.
Writing about your failures is important too. An honest account of what you learned will generate support from others and may reach a wider audience than those who initially used your product. For example, the CEO of Earbits, a music-streaming service for independent artists, wrote a blog post about shutting down the service after four and a half years and their failure to find a working business model. Within three days, his post became so popular than an investor stepped in to allow the company to operate indefinitely. See the original blog posts at blog.earbits.com/online_radio/earbits-will-be-shutting-down-june-16th
.