What is the easiest way to learn new programming languages?
I am a freshman at Cal Poly Pomona majoring in Computer Information Systems. I would like to develop my technical skills but I am not quite sure where to start. Any advice would be helpful, thank you. programming
Attitude is important too. Curiosity is what drew me into programming to begin with. Questions like
How do I...
What would happen if I...
How does this tie into that...
Would it be possible to...
What would happen if I...
These will lead you into corners of the language there isn't time to cover in class.
Finally, look for your tools in the new language. If you're going to solve a logic problem, you'll need basic tools like branches, comparisons, and collections. Different languages have different approaches to the needs of a programmer but the needs of a programmer don't change.
Mark recommends the following next steps:
After you have a mental image of your project, think of the logical steps to implement the functionality and rephrase them as questions to use in a search engine (i.e how to write to a text file). Refine your search terms with your programming language of choice (i.e how to write to a database in Python). Choose the results that you find easier to understand and implement them in your project. See how it works together and if it does what you expected it to do.
The next phase is to read about programming best practices and software design patterns. This knowledge will help you distinguish between good code and poorly written code.
Jorge recommends the following next steps:
There’s also many different ways to learn online. YouTube or freecodecamp, or W3 schools, all have a lot of content that isn’t too hard to follow.
The library is another good resource. You can borrow books on different skills you’re interested in, without spending a fortune. Some libraries also have partnerships with Lynda.com, which has a lot of tutorials, and usually has a fee, but with a library card you can get free access.
One thing I recommend is try taking everyday tasks, and breaking them down into the simplest steps. This helps you get an idea of the logic behind the task.
Another thing I recommend is maybe try starting with HTML. While it’s not technically a programming language, it’s a good way to start learning syntax and keywords, and how they repeat and fit together. It’s also an easy thing to start working on, without having to set up special development tools first.
Hope that answers the question and is some help. Good luck!
So, to kind of piggy-back off of some of these amazing responses, the hardest part about learning a new programming language is it's syntax. The flow of execution is the same for a lot of things. Like making a sandwich: we know the beginning is prepping your station, the middle is the procedure of working with those ingredients, and the last part is combining those pieces together. Output is always the same. The flow is always the same. Maybe instead of a PB&J, you decide to make a BLT. Same flow, different ingredients. The same can be said for programming languages and their syntax.
EXAMPLE: At a high level, I want the flow of my program to print "Hello World." but there are many different ingredients (i.e. Python, Java, C, etc.) to use. So I can either create a sandwich with:
- Python: print('Hello World.')
- Java: System.out.print("Hello World.");
- C: printf("Hello World.");
The flow with these languages all work the same, but the syntax, as you notice, is different. Some require more steps and dependencies. How I would suggest handling going about learning different programming languages and how to use their ingredients to create your sandwich, is what Mark said in his answer. Find something that you understand well and how it flows logically then try recreating it using different languages. If interested, a good game I would suggest trying this technique out with is Pong. Where you have two sliders, one on each side, and a ball that you pass back and forth. And, if you're feeling really crazy and up for it, throw in some razzle dazzle and create a pointing system that keeps track of every time a slider hits the ball over back and forth. Then find more ways to change it up and expand your knowledge. Maybe make the background change colors for every hit, The more you mess with it and add onto your logic, the more ways you'll discover how to manage your code.
Another awesome suggestion given by Jorge which was phrase your questions accurately in a search engine. It can be very daunting when searching 'How to code in Python' and then you are thrown 500+ different resources. So it is nice to have an idea of what it is you are looking for and minimize your search by tailoring your question specifically to what it is you are trying to learn or find more about.
One key thing to note, when going about any implementation process, write down your thought process before just hitting the ground running starting to code. I mean, some people work better that way, it's a gift. For me, I find it easier to write out what I am trying to accomplish, work out it's flow, then start to code building off that foundation I laid out for myself. There are also some good online tools to practice that. There's something called UML (Unified Modeling Language) that is a type of software design that is very nice for taking on challenges and helping you to better visualize what it is you plan to implement. So instead of already coding while trying to focus on both what logic needs to go into and learning a language's syntax, write down your logic flow so while you code all you're focusing on is interpreting the language correctly.
Good luck making code sandwiches! Have fun with it.
For example I am really into tabletop role playing games. So my very first app in React Native was a d20 dice roller. Very simple concept but it taught me a ton of different things. Package management, animation, rendering, state management , the list goes on.
Besides taking the training I had, I have learned other languages for database coding on my own by reading some how to Java type of books, SQL and even Lotus Notes Domino designing. Some applications have a help section to look up how the coding statements work and examples of them. So helps when trying to figure something out. If you can find a company that is taking interns, that is a great way to get your foot in the door as well as learn from someone who has experience. Good luck! We REALLY need some good programmers out here!