Ask Slashdot: How To Get Started With Programming? [2017 Edition]
Reader joshtops writes: I know this is a question that must have been asked -- and answered -- on Slashdot several times, but I am hoping to listen from the community again (fresh perspective, if you will). I'm in my 20s, and have a day job that doesn't require any programming skills. But I want to learn it nonetheless. I have done some research but people have varied opinions. Essentially my question is: What is perhaps the best way to learn programming for my use case? I am looking for best possible resources -- perhaps tutorials on the internet, the right books and the order in which I should read/watch them. Some people have advised me to start with C language, but I was wondering if I could kickstart things with other languages such as perhaps Apple's Swift as well?
Get a PC computer. Install Ubuntu. Connect to Internet. Google free tutorial. Start programming.
exercism.io is a good starting point. The site has a lot of languages to choose from, and it presents you with a bunch of exercises you can complete for each language. Once you complete an exercise and submit it, you can visit the site, and see your code there. You can also see how others solved the same problem, and comment on their solutions, as well as read comments from other people.
Always remember the chickens that have gone before
I suspect you're referring to Larry Wall's three great virtues of a programmer: Laziness, Impatience and Hubris
http://threevirtues.com/
I like Java, C++, C#, and Python, and think they all work great as introductory languages. C++ gets shit on a bit because there's a lot of bad memories from the 80s and 90s when you had to do a lot of things by hand, but modern C++ is a joy to code in. In fact, if it was up to me I'd say that colleges should teach C++ as their intro language for three reasons:
1) It's as powerful and expressive as Java and Python (with some notable exceptions like split() which you need to invoke Boost for). Smart pointers (instead of raw pointers), vectors (instead of C style arrays) and range-based for loops (to never have out of bounds errors) allows for very fast and safe programming.
2) It is a lot easier to go from C++ to Java/Python than vice versa. Java programmers tend to have a vague grasp on how memory actually works.
3) C is only one step away from assembly. C++ is two steps away (due to name mangling). Java and Python are three or more steps away. Assembly programming, while rare enough these days, is still the gateway to really understanding computer architecture and writing code that works with your architecture instead of against it. Success in assembly should be the goal for a lower-division computer science program.
I also agree with you that most languages take their cues from C++/Java in that they either follow the conventions or deliberately break them. So learning C++ or Java is a really good choice for new programmers for that reason as well.