Before asking a question, try it. I keep a script around just for testing things quickly, but you can try it directly in the interactive prompt if it’s simple. Does 1 == true in Ruby? Open the irb interactive shell and find out! If solving one question just produces more questions (like does 0 == false in Ruby), then you can find out instantly without more searching or waiting for responses to a new question.
Go straight to the source.
Asking StackOverflow can be a quick fix to your problem, but going through the actual language’s documentation will build your core knowledge. You may even learn the solutions to problems you haven’t encountered yet. Search for a direct answer to your question if you don’t know where to start or you’ve spent 10 minutes in the documentation without a clue, but then make sure you understand the answer. Go back to the documentation to learn about any functions, objects, or standards you haven’t heard of.
Work on your own projects.
Come up with an idea. It can be as ridiculous as you like. Just find something that pushes your skills and do it. The best way to learn is by doing. You’ll make mistakes, but you’ll figure them out and be that much more prepared for the next challenge.
Try to see the world through code.
Think about the basic activities of day to day life or the programs you use everyday. How would you write the code to do that task? How does Netflix know what other movies you might like? How do computer players in video games know how to get around obstacles? What is the difference between a Tic-Tac-Toe AI and a chess AI? You may not know the answers yet and I don’t expect you to, but every time you hear a problem or use a piece of software try to think about how you would accomplish the same thing or maybe even how you would do it better?
Jump in the rabbit hole.
Did some of the questions in the last paragraph arouse your interest? Follow your curiosity. Make a few Google searches and see where you end up. You may not always find the answer you’re looking for, but you will always learn something.
DRY stands for don’t repeat yourself. This is the key to making maintainable projects. If you notice two chunks of code are fairly similar then think about how you could add a variable or move them into a separate function to get rid of that duplication. This means that each change in the future will only have to be done in a single place and you won’t have to worry about remember all the similar places of code that need the same changes.
Abstraction is the basis behind all re-usable code. It silos functionality to each object, so that any change in one file does not require additional changes in other files. Think about how you can abstract each new piece of code. Create additional objects to store related information, separate out your login functions, and abstract how data is retrieved and stored to get started and move on from there.
Focus on code structure.
The difference between beginner programmers and expert programmers is in their code structure. Expert programmers know how to create well-made objects in an organized architecture, so they can instantly know where any change needs to be made or a bug may be found. This is a skill requires knowledge and experience. Read about design patterns to form a knowledge baseline and then think about how each of your projects could be better organized each time your revisit them.
Have your own tips for budding developers? Confused by some lingo? Just want to say hi? Leave a comment! I would be happy to hear from you.