12 Rules To Learn To Code By Angela Yu
Table of contents
- Part 1: Mindset
- 1. It's ok to Not Know:
- 2. Trick Your Brain with 20min Rule:
- 3. Be a copycat:
- 4. Get into the Habit of chunking:
- 5. Play foosball:
- 🧠 Mastering the art of sarcasm 🫡
- Part 2: Skills
- 6. Understanding what you're writing:
- 7. Code for a Purpose:
- 8. There is no “perfect language to learn”:
- 9. Keep Learning:
- 10. Break someone else's code:
- Part 3: Support
- 12. Be Accountable to someone. Show your work:
- 12. Get a Mentor:
Part 1: Mindset
1. It's ok to Not Know:
Software engineers are known to have a high incidence of Imposter Syndrome, which causes people to underestimate their abilities. Many programmers fear being caught using resources like StackOverflow as they believe it will reveal their incompetence. However, using references and seeking help is encouraged in the industry as no one can remember all the code required. The most important skill for employers is the ability to think, not memorize information. While it's important to try to solve problems on your own, using Google and StackOverflow is recommended. These resources allow programmers to benefit from the community's knowledge and contribute back to it in the future.
2. Trick Your Brain with 20min Rule:
Learning to code is similar to going to the gym because it takes time and practice to get better. However, finding time to code every day can be challenging. The author found a trick to start coding every day by using their inertia. They tell themselves they will only code for 20 minutes, but they usually end up coding for much longer. To make coding a daily habit, the author suggests using a calendar and drawing a line for each day you code. Seeing a long, unbroken line can motivate you to keep coding every day.
3. Be a copycat:
The author shares their experience of starting to learn coding by reading multiple books on various programming languages but found it confusing and unhelpful. Instead, she suggests that beginners should focus on making something to learn. They recommend starting with simple projects like creating a notepad or a game, such as Tetris. By doing so, learners can gain practical experience in finding help and figuring out how to do things. The author also suggests copying existing applications as it maximizes the chances of receiving guidance from others who have walked a similar path.
4. Get into the Habit of chunking:
The article discusses the importance of breaking down a complex programming problem into smaller, more manageable chunks. The author uses the example of creating a robot that can butter toast to illustrate the process of chunking. The more you break down problems and define the issue that you’re trying to solve, the easier it is to package your code into bite-sized chunks. The simpler the chunk, the easier it is to tackle. So the next time that you’re trying to make that “cross between Snapchat and Evernote”, remember to break down the problem into solvable chunks.
5. Play foosball:
Do you have a bug in your code that you can’t work out? Sleep on it, play foosball, go for a walk. In 9 out of 10 cases, the solution will become apparent. In the remaining 1 out of 10 cases, you’re just screwed. This may sound unintuitive, but my advice is always to code less, and think more. Once the poorly thought-out code is written and brought into the world, you’ll inevitably have to go back and comb through your code, line-by-line, refactoring and deleting things. This is always a painful experience. So remember, the easiest code to get rid of is the code that was never written.
🧠 Mastering the art of sarcasm 🫡
Part 2: Skills
6. Understanding what you're writing:
Sometimes people create tutorials to teach others how to code. But some of these tutorials can be too difficult for beginners or they don't explain things clearly enough. This can make it hard for students to learn and they might end up just copying the code without understanding it. It's important to find tutorials that are at the right level for you, so you can keep learning and building your skills. Learning to code is like climbing a ramp, you want it to be challenging but not too hard or too easy. You can also adjust the speed of the tutorial to help you understand better.
7. Code for a Purpose:
Learning to code can be difficult if you don't have a clear purpose or goal. It's important to have an end goal to keep going and improve your skills. One way to do this is to start by following tutorials that teach you how to create something, like a simple game or app. Once you have the basic skills, you can think of your own ideas for apps or tools that you want to make. These personal projects will help you improve even more, and you might end up making something that can be useful to yourself or others. The important thing is to have fun and be creative while learning to code.
8. There is no “perfect language to learn”:
When people ask me which programming language they should learn first, I say it doesn't matter because all programming languages are just tools, like hammers or spanners. What matters is what you want to do with the tool. If you want to make apps for iPhones, then you should learn Swift, and if you want to make websites, then you should learn JavaScript. But the good news is that the basic concepts of programming are the same in all languages, like loops and functions.
9. Keep Learning:
Technology will keep evolving. In order to stay relevant, you have to keep re-inventing yourself. There are always new trends and new languages. Great programmers relish learning new things, even if it means they become a beginner again. The world will keep moving, if you stay in one place, you’ll eventually be left behind.
10. Break someone else's code:
Transitioning from a beginner coder to a proficient programmer requires effective help-seeking skills. Simply copying and pasting code without understanding it can hinder skill development. Instead, breaking down code line-by-line and testing it is crucial for comprehending functionality and improving problem-solving skills. GitHub is an excellent resource for learning, collaborating, and modifying open-source code. Reverse engineering a project to compare code and improve efficiency is the ultimate goal for programmers.
Part 3: Support
12. Be Accountable to someone. Show your work:
Accountability and commitment are crucial for learning to code. Online courses often lack accountability, which can lead to a lack of motivation and progress. Finding a coding buddy or joining a community can help introduce accountability. The financial commitment can also be a motivator for some learners. Getting assessed and receiving feedback is important for improvement. Online courses may offer self-assessment or peer-review systems, but finding a code mentor can also be helpful.
12. Get a Mentor:
The author shares how having language exchanges over Skype helped them improve their French speaking abilities, and draws parallels with pair programming in software development. Pair programming involves a mentor reviewing a learner's code line-by-line, asking good questions, and providing accumulated wisdom to improve their ability. The author emphasizes the importance of learning to think and approach problems, rather than simple memorization and regurgitation of information. They suggest finding a mentor through programming meetups and exchanging expertise, rather than directly asking someone to be a mentor.
Thanks for reading my blog! I hope you found some value in it, especially if you're a fellow programmer, you can definitely relate to many rules. Let me know your thoughts on this blog and share your stories with me.