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?
How to get started in programing. Well, I get started each morning by starting the kettle. Whilst the kettle boils, I wash out the French Press and my mug. I drink my coffee whilst reading Slashdot to see if there is anything I should be kept up-to-date on. By the time I finish it is time for another cup of coffee, so the process begins again, by that time, I have to reply to some troll who thinks climate change is a myth and that man never went to the moon.
I usually have three or four cups of coffee- and then it is time for lunch.
After lunch, I find myself able to start programming.
"That's the way to do it" - Punch
Get a PC computer. Install Ubuntu. Connect to Internet. Google free tutorial. Start programming.
First I must wonder what your existing background is with respect to computing. Depending on this I would have different answers. If you have never programmed so much as an Excel spreadsheet or "Hello, world!" in BASIC, I would then ask what is your objective? The language you want to learn will be dictated by this more than anything, as there exist "total beginner" tutorials for any language imaginable and they're all pretty easy (and don't apply to any real problem solving beyond that).
If you are interested in programming for its own sake, I would recommend something like The Structure and Interpretation of Computer Programs by Abelson and Sussman (https://mitpress.mit.edu/sicp/full-text/book/book.html). For something that covers a lot of bases top-to-bottom very quickly, the book Thinking In Java by Eckel can be very informative (even if you never make it more than 1/3 of the way through it). If you like the logical and linguistic side of things, you may be interested in ANSI Common Lisp by Graham.
I would only recommend starting in C if you have a significant breadth of computer knowledge but want to understand more of how things work "under the hood". Be warned, this journey is not trivial.
Find something routine or complicated that you do and automate it. Maybe your job involves TPS reports. Well, automate adding the coversheet. Maybe you like gaming. Look into modding.
Or you could go to school where you have deadlines and lab classes. Whatever the case, avoid trying to learn a bunch of theory in a vacuum.
The Daddy casts sleep on the Baby. The Baby resists!
...then solve it using a program.
If your day-job is doing stuff with Excel, then perhaps automate something. Write a script to extract stuff out of a .csv file, etc. If your job is non-tech, then perhaps use your tech skills to build on hobbies.... e.g. if you're into video games, build a tiny game in JavaScript... if you're into sci-fi books, write a program that finds stuff in text of sci-fi books, if you're into finance, write a program to find correlations between closing prices of various companies, or extract anything useful out of earning reports---automation is the key. Find something you're interested in, then automate it (or a part-of-it), etc.
Note that language/platform doesn't matter much. Yes, you can do complicated ``programming'' in Excel. It's just not something most people do, but that's what you're into, then go for it.
Started languages I'd suggest: JavaScript (mostly because you can get started quickly, show off your work quickly, and go from nothing to something fun quickly). As second language, learn SQL... yes, you can do wonderful analysis in SQL. Then I'd suggest PHP... and/or Perl (yah, lots of folks would object, but if you learn Perl, you'll never have to learn another "useful" language ever again), then learn C/C++, since you don't start appreciating the ease-of-use nor overhead of other languages until you learn C/C++.
Although I started with BASIC myself, I wouldn't consider it an ideal starting place for people today.
For one, no one uses it. Even most die-hard Visual Basic programmers use C# instead nowadays. BASIC is too dissimilar from most other languages to be a good starting one anyway.
I'd start with Java or C#. Both easy to use, both use fairly common skills that will translate to other languages easily. Both are employable languages. If you don't mind being Microsoft's biatch C# has the nicer IDE to get developing against- but you're pretty much guaranteed to be doing purely windows based stuff. Java gives you the opportunity to work on anything.
"That's the way to do it" - Punch
At this point I would skip on BASIC simply because there are so many fewer real-world applications for it. I would start with a conventional shell scripting language. On a Windows box that would be batch files, on a Linux box, probably bash. Both have direct applications in addition to being functional for rudimentary understanding of programming.
In my own case I grew up with a computer with MS-DOS 3.3 and GW Basic 3.22, and I spent a lot more time in MS-DOS batch files than I ever spent in Basic. Granted, my application for them in setting variables and then launching programs doesn't apply a whole lot these days, but some file processing can be handled with it.
I am not going to express an opinion about Power Shell from Microsoft because I have no experience with it other than coworkers raving how great some new feature to them is, when we've had that feature in bash for almost 30 years, so my judgement is admittedly tainted for the negative.
Do not look into laser with remaining eye.
Why's Poignant Guide to Ruby
... even though it was written for a now-obsolete version of Ruby.
Why? Because it is entertaining enough to get you through many important basic concepts without falling asleep.
Otherwise, I recommend the approach that was common at one time and fallen out of favor. Start with machine language. Not even assembly code. Machine language. Best thing ever: punching IBM 1620 (decimal, thank goodness!) instructions one at a time on punch cards! That was high school. In college, we started with MIX. I prefer a real machine code to a made-up assembly code, though.
Still, some in high school thought "the compiler" was some bit of hardware in the computer, once we moved-on to Fortran. At least the instructor tried!
If you don't begin at the beginning, many will be forever-befuddled at what really goes on.
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
That you need to ask this question at all might be an indicator that programming is not for you. While I really hate to roll out this tired and over-used meme, if this solution has not already answered your question, there is no hope: GOOGLE IS YOUR FRIEND.
If you want news from today, you have to come back tomorrow.
There's no need for analysis paralysis. Try out some Python (I enjoyed reading Python Crashcourse by Eric Matthes). I would recommend Learn Python the Hard Way, but it hasn't been updated to cover Python 3. If you enjoyed Python programming, take a look at Apples's (imo) excellent Swift resources and guides. That language actually isn't a lot harder than Python to get started in. If you have an iPad, check out Swift Playgrounds. It is a game, but gives you a good feeling for basic programming concepts.
My language of choice would be Python.
Dead easy, powerful, interactive, fun.
1) Get some kids' coding books (on paper) and read through them to get the basics.
2) Get python - the plain IDLE from python.org will do, no need for pycharm or other fancy environments.
3) Code some simple stuff to get the basics. Try out graphics (tkinter if in python) - you will get immediate rewards by nice visuals. Bounce balls around the screen, draw gradients or simple animations.
4) Connect coding with your hobby or work and figure out a more serious project to go deeper into the language with a real goal.
Get a book and read it to get the basics of the lanugage. I would pick a language such as Java or C# unless you want to focus on web development. I recommend C# because I think Visual Studio is pretty easy to work with and debug. There's lots of near-religious debate about languages and some people try to steer noobs into languages like C which is a terrible idea IMHO. Once you get the basics, set a goal for yourself...make a calculator or a poker game, etc. Build it one step at a time using sites like StackOverflow to ask questions when you get stuck. Then just keep doing it...automate stuff at work, look for opportunities to keep building your skill set...expand into other languages or database stuff.
I wrote a couple of blog posts just over a year ago that I think are still relevant:
* Getting started with programming
* Getting better at programming
But it's a really personal thing. Some people hate reading through books, others couldn't do without them. Try as much as you can until you find something that really peaks your interest, that you can't put down, and follow it to see where it goes. Good luck!
I recommend you learn C and C++, especially if you want to become a highly paid Data Scientist or some useful career.
You'll be forced to take other classes anyway, good to start out with the one that will be most useful year in and year out.
-- Tigger warning: This post may contain tiggers! --
I think there are three paths to follow.
Question - where do you want to end up?
1) Find a project you are interested in such as an open source project, game, tool, etc. Figure out how you can contribute be in HTML, web pages, Javascript, database work such as MySQL, PHP etc. Learn whatever tool(s) they are using and figure out how to contribute. The key is to be interested in the project, not neccesarely the tool or language.
2) Pick a language and go through some tutorials. There are tons of stuff on almost every language. Pick one that interests you but stick to something mainstream. This is a good reference to Python for example: http://www.openbookproject.net.... I recommend something that is cross platform and machine independent.
3) Get an Arduino or Raspberry PI and build something. Flash the lights, read the temp, make the propeller spin, etc.
In any of the above - Have fun and don't make it a chore!
"I say we take off, nuke the site from orbit. It's the only way to be sure."
All iPads with iOS10 either come with, or can have installed for free the Playgrounds app into which you can install playgrounds that teach programming.
It sounds silly and at first it may seem like it as you play through a programming a kind of game figure. But the lessons get more and more advanced, and along the way you are learning Swift.
As you can far enough along you can decide if you like programming enough to really get serious, then perhaps investigate stuff like the Stanford programming course videos (free), including a course just on iOS development... but you don't have to go that way, the concepts you learn learning Swift apply to most languages pretty well.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
> If you don't mind being Microsoft's biatch C# has the nicer IDE to get developing against- but you're pretty much guaranteed to be doing purely windows based stuff.
Did you miss Visual Studio Code altogether? No, not the full-blown Visual Studio, but Visual Studio Code. The IDE runs on Windows, Linux and Mac, as well as the apps you write with it.
https://code.visualstudio.com/
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
Last year, I'd have told you avoid languages like Ruby, Python, etc, and work on the latest greatest: node.js, Swift, and, of course, Java. However, it's a year later, so don't learn any of that rubbish, you need to learn iLng, Visiwo, G, and, of course, Java.
As long as you have a good grounding in those languages, many of which are so new they literally don't exist yet, you should be fine for the next three to four months.
You are not alone. This is not normal. None of this is normal.
Start with C. Learn how to compile / link without the help of an IDE. Two birds with one stone here, you'll learn important concepts about how resources are used, and you'll avoid being vendorlocked into a single IDE.
An internal system operation returned the error "The operation completed successfully.".
Then get a good copy of the 7400 line data sheets.
Python gets you producing stuff fast, lets you concentrate on learning to program rather than learning to compile.
Then, C. Build a Python extension which gets you up to speed with C (and serves as a base for many other languages as well). C Is a good starting point for C++ or Java or Objective C.
This stuff is all free on Linux. If you don't have a dedicated Linux machine, download Virtual Box and install Linux on a VM and use that. After than then go ahead and pay Microsoft if that is your desire.
I am very small, utmostly microscopic.
That's so 1990's. Here's an updated Linux book. Enjoy!
http://www.linuxfromscratch.org/lfs/
I had exposure to computer programming as a teenager in the 1980's but wasn't interested in being a computer programmer in college in 1990's. I graduated with A.A. degree in General Education. After I was video game tester for three years, I went back to school after the dot com bust in 2001, got an A.S. degree in computer programming and went into IT support contract work. Today I'm doing InfoSec in government IT. I'm 47-years-old, making $50K+ per year and living in Silicon Valley. I'll do something different when I retire in 30 years.
Start with a goal, the end of which will be something you either need or will be proud of and can show others. Like a personal website or a game. There are many programming paradigms. You can't learn them all. Start with something that will make you feel like you achieved something which will give you the positive feedback loop to keep you interested. That way programming becomes an interest rather than something that you want to do to better your career, earn more money etc. If you do it for the love, other things will follow. I was an electronics engineer who got into programming through modding and game development. If I had gone the route of my peers who learnt to program as a need for the job, I would have hated it and would have been thinking about how to move into management. With my skills and more importantly - interest, I like my job and hence do better at it. TLDR : Start with something fun
I feel your confusion. This may be "old school" but I feel it's solid (or has been for me). Start with learning the basic rules.
:D Again, to reduce your learning curve later on, I'd start with C/C++/Java. You'll be glad you did.
A lot of people like Python but because most languages use certain characters to enclose blocks of code (and python only uses indents) I would suggest starting with Java or C/C++. Many here will say Python is easier (ruby is probably easiest for many), but your goal will be to have room to grow. You'll find more languages conform to the C/C++ or Java syntax style rules than Python or Ruby. I find it easier to ready than Python myself.
Do yourself a favor and skip VB.net. If you want pure Microsoft (and I would advise against that, would have saved me much grief early in my career) you can do C# and you'll be better prepared for languages with more platforms.
Java, for example you can use in many enterprise system and embedded systems, including Android. C/C++ you can use for robotic controllers, IPhones (objective-c), real-time critical applications (and gaming!!).
Some may suggest starting with scripting languages like PHP, Python or Ruby. there is faster "joy", but I'd sooner suggest starting with MIT's Scratch https://scratch.mit.edu/ (GUI language for teaching children basic of programming). It's a great teaching tool for anyone I think. Hey, it's still valid basics which converts the GUI instructs into 'C'. the reason
I'm so "hung up" on starting with C/C++ or Java is most newer languages take a lot of their cues from the concepts widely used in C/C++/Java. once you learn one of these (especially C++/Java) you can step into any other language out there with relative ease. Some good sites to start would include:
http://lifehacker.com/five-bes...
Note: These are all free or have free options
http://www.learn-c.org/
http://landofcode.com/programm...
https://ocw.mit.edu/courses/el...
https://ocw.mit.edu/courses/el...
https://www.codecademy.com/lea...
http://www.coursera.org/ (real university level courses, a little intimidating at first, but worth it)
http://www.cplusplus.com/doc/t...
For python:
https://www.python.org/
For Ruby:
https://www.ruby-lang.org/en/
the courses as udemy are a little light so I'd only go there for review.
I've given many options here although I've stated my preference. The other advantage to using C/C++ or Java is they make using these invaluable books easier to read:
Writing Solid Code: Microsoft Techniques for Developing Bug-free C. Programs (Microsoft Programming Series) by Maguire, Steve
Code Complete by Steve McConnell
Yes, these books are from MS and old, but I found them invaluable (and I wish MS had actually practice what came from their own publishing companies when writing the code for W2K and XP). Was required reading at one workplace. You'll want to learn about Object-Oriented approaches as well as syntax. It's a lot to take in and this is just the beginning, but it's fun journey. Oh, I would agree, don't bother with Basic. You are better off with Python or Ruby.
"Imagination is more important than knowledge" - Einstein
If you find a full on professional IDE is a bit intimidating, then start with something like Processing.org until you feel comfortable with the basic language constructs (variables, functions etc). I know when I started out many many years ago, the wall of information you had to wade through just to get some text to print out somewhere was a bigger battle than learning the actual language semantics. I think those of us who know the tools inside out don't realise how intimidating it can be for someone who is starting from scratch and just wants to paint pixels.
If you've never programmed before, the first thing I'd recommend is learning html and write a basic web page. Play around with the formatting and css...
This is solid advice for a starter because you don't need anything more than a good text editor and a web browser. No need for a complicated IDE, where learning the intricacies of how the IDE works is half the battle. Plus you're not platform bound, like you would be with C# or Swift. Sure, they're "open source," but the best tools for either of those is on a specific platform.
If you really want to get a good idea of how you're doing, you could always sign up for CodeCademy's HTML & CSS course first, then their JavaScript course. It's free, and you earn badges to show your progress. As an added bonus, there's forums where you can ask for help if you're stuck on something, and the community is fairly helpful. There are a ton of other free sites out there, but this one is probably the best approach for newbies IMHO.
Taking guns away from the 99% gives the 1% 100% of the power.
I don't understand the constant "programming jobs are going away" comments. They're really not, and there are a lot of us in the US with a good salary.
https://www.bls.gov/ooh/comput...
In 2014 there were 1,114,000 software developer jobs. Projections are that it will grow 17% between 2014 and 2024, meaning we plan to add 186,600 jobs. Which, incidentally, is a much higher rate of growth than other jobs.
If I can just reach out with my words and touch a butthole, just one, it will all be worth it.
If learning go for something like Basic, Ada, Pascal. Learn with books that are all about teaching good habits and have lots of educational support.
Then work hard at understanding the steps needed to get data in, have a computer do something and display the result.
If a person has a hobby and wants to create an app to help with some hobby then find some good books on creating apps in 2017.
Learn programming and then look at what is trending in 2017.
Or build an app around todays hardware and enjoy the results of having a solution to some problem.
Domestic spying is now "Benign Information Gathering"
Several here have suggested starting with C, C++, C# or Java. That is one option, but you should know that these languages have rather steep learning curves. Each requires you to learn a lot before you can do much. In the case of C you need to thoroughly understand pointers before you can write meaningful programs and will spend a lot of time debugging which, at a minimum, is discouraging to newcomers. Java requires you spend a lot of time learning its libraries and perhaps 100s of APIs and how they relate before you can write more than just simple programs. All four languages are powerful, but there is, IMO, a smarter way to learn the basics.
Begin by learning data structures and how and when you can use them to good advantage. Learn to program the basic constructs (loops, conditionals, classes, etc) and how to develop algorithms. Integrate those concepts and write a few programs. Use a language that is easy to learn. You don't need to get tripped up early with nuances not related to what you are trying to learn. Numerous books and free tutorials are available.
After mastering the basics it is time to decide in what area(s) you'd like to specialize. What do you envision yourself doing eventually, web development, robotics, financial applications, user interfaces, networking, image processing, cryptography, artificial intelligence, databases, GIS, games, or ??? The list is endless. Learn the languages best suited for that domain.
Personally, I've used 30+ languages over the last 55 years and IHMO, the clear winner is Python. It is easy to learn and your programs will come to life sooner with less effort. At the same time, Python is powerful with rich libraries supporting pretty much anything programming students would want to do. I could go on but the important take-a-way is that while Python is an excellent choice for learning programing concepts and data structures, you need not learn another language to experiment with advanced computer science concepts. Once the basics are under your belt, I would suggest you take the time to become acquainted with C. It will teach most of the other concepts that Python cannot. Between them the world can be your playground.
Learning your toolset is just as important as the languages. Your #1 tool will be your text editor. Find one you are really comfortable with. Learn how to write good comments and documentation. A debugger, an IDE, and a version control system also have their proper place.
After you master the basics you can move into your area of specialty. You should now be well prepared to transition into C, C++, C#, Java, SQL, HTML, JavaScript, PHP, or ??? In fact, some of these languages integrate nicely with Python allowing programs to enjoy the strengths of each.
And remember to come up for air periodically. Some folks forget that.
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.
"Learning programming" is a bit like looking at box full of tools, is a hammer or a saw or a screwdriver best for the job? Well the question doesn't really make any sense until you've defined what you want to accomplish. Unless you just want to learn general concepts, in which case it doesn't really matter. Assign values, calculate values, create functions, acquire resources (like open a file), release resources (like closing a file), control flows like if/case statements, for/while loops, events, state etc. exists in pretty much all languages for a reason, the syntactic sugar may be a little different but the concepts are pretty generic.
Live today, because you never know what tomorrow brings
Being a programer is not like it used to be. In the early days there were only a handful of languages and it was fairly easy to learn them and the computers were not that powerful by todays standards. Nowadays there are so very many different languages all geared to help solve different problems. That is what programming al all about, solving problems. Add to that all the frameworks and API's out there. The choices boggle the mind. The profession is very wide and stretches from embedded devices to mainframes and everything in between. No one can learn it all, most veteran developers have mastered 5-6 languages but there are deep concepts that are found across languages.
The question one should ask oneself is what sort of programming interests you? Web, Application, Mobile, Systems, etc., etc. There's a new field called DevOps where you are a Developer but you are also an Operations engineer. The DevOps lies between the programmers and the production systems. They help bring the two worlds together. Just because it runs on your laptop doesn't mean it will run on the production system scaled out across a thousand nodes in a giant data center. DevOps also helps setup code repositories, automated testing, how things push to production, how production is orchestrated, etc.
Starting with a scripting language such as Ruby or Python might be up your alley as neither requires compiling and both are pretty easy to read and understand. See if you like the idea of coding for long periods of time and banging your head against the desk in frustration. Jumping feet first into K&C ANSI C is a big leap into a shark tank, same with C++, Java, etc. All languages have a place in the scheme of things. It all depends on where you want to go. Pursuing some traditional college classes in software design can tune you into the big picture. It is a lot to wrap your head around everything.
The world needs more developers, go for it. Just realize it's a whole lot of work and the learning never ever stops. You will write code and look back at it years later and scratch your head wondering how you could have been so stupid. It truly is a non-stop learning experience that most talented people get better at over time.
... are probably the best way to start. Python is the only PL that is used professionally in all industries. It' s also modern and easyto learn.
Good luck.
We suffer more in our imagination than in reality. - Seneca
Hi, you may never read this as you will probably have to wade through 3 feet of shit infested talk about american politics, but if you do this would be my advice. As someone who has learned coding while not being a programmer this has been incredibly useful to me in my career. Just because we are not "professional" programmers it does not mean that we don't have problems to solve for which small programs and scripts can work wonders.
If your goal is to become a full time programmer then you will probably have to learn multiple languages. The best programmers have a whole set of tools they can use and should not be boxed into one language. You still need to start somewhere though and I don't think it really matters as long as you start. More importantly learn how to think like a programmer, breaking down problems, understanding the problems you are trying to solve. Syntax will be a bitch when you start but don't get too down if you struggle with that.
If you just want to pick up a language to increase your career skills I don't think you can go wrong with Python. It has a vast community, is probably easier to learn than anything out there and has an incredible about of libraries that you can import and use in your own scripts and programs. If you are looking to make programming a career you will want to broaden your horizons beyond just the one language. The important thing is to pick one and stick with it.
There are tonnes of good resources for getting started with Python. Beware that the arguments around which are best is a bit of religious war in the community with strong opinions for and against each. (examples: Learn Python the Hard Way, Automate the Boring Stuff, Code Academy etc etc). I have a clear preference but will not recommend one. Research it, read the flame wars, try them all, use what works best for your learning style. That is really the heart of it, we all learn differently so you should be suspicious of anyone who says this or that resource is shit and only idiots use it. They are most likely the idiot.
Good Luck