I wanted to teach myself computer programming.

Questions on how we spend our money and our time - consumer goods and services, home and vehicle, leisure and recreational activities
Topic Author
rai
Posts: 1289
Joined: Tue Apr 06, 2010 7:11 am

I wanted to teach myself computer programming.

Post by rai » Wed Aug 14, 2019 9:16 am

Any advice, books or online courses to recommend?

Back in the 80s I took a semester of COBAL and now I’m thinking just for fun to learn something new to me.

What language and what types of activity should I do?
Last edited by rai on Wed Aug 14, 2019 9:36 am, edited 1 time in total.
"Life is what happens to you while you're busy making other plans" - John Lennon. | | "You say that money, isn't everything | But I'd like to see you live without it." - Silverchair

dglover00
Posts: 1
Joined: Mon Jul 31, 2017 8:55 am

Re: I wanted to teach myself computer programming.

Post by dglover00 » Wed Aug 14, 2019 9:18 am

My recommendation would be Python or Java. There are free learning courses online, and some paid courses that are a little more intense but allows you to gain certifications that can be placed on your resume.

typical.investor
Posts: 2041
Joined: Mon Jun 11, 2018 3:17 am

Re: I wanted to teach myself computer programming.

Post by typical.investor » Wed Aug 14, 2019 9:21 am

rai wrote:
Wed Aug 14, 2019 9:16 am
Any advice, books or online courses to recommend?

Back in the 80s I took a semester of COBAL and now I’m thinking just for fun to learn something new to me.

What’s language and what types of activity should I do?
Try this https://github.com/freeCodeCamp/freeCod ... /README.md

renue74
Posts: 1870
Joined: Tue Apr 07, 2015 7:24 pm

Re: I wanted to teach myself computer programming.

Post by renue74 » Wed Aug 14, 2019 9:22 am

TreeHouse and CodeAcademy

User avatar
sunny_socal
Posts: 2223
Joined: Tue Mar 24, 2015 4:22 pm

Re: I wanted to teach myself computer programming.

Post by sunny_socal » Wed Aug 14, 2019 9:29 am

Maybe download the Android development kit (SDK)

https://developer.android.com/studio

Oh make sure you have a decent PC (16G RAM, SSD), if you buy any 'gaming' system you should be ok. Seriously.

User avatar
tc101
Posts: 3333
Joined: Tue Feb 20, 2007 3:18 pm
Location: Atlanta - Retired in 2004 at age 54

Re: I wanted to teach myself computer programming.

Post by tc101 » Wed Aug 14, 2019 9:35 am

freeCodeCamp: Learn to Code and Help Nonprofits

https://www.freecodecamp.org/

Just follow their instructions step by step. This is all you need.
. | The most important thing you should know about me is that I am not an expert.

rich126
Posts: 1557
Joined: Thu Mar 01, 2018 4:56 pm

Re: I wanted to teach myself computer programming.

Post by rich126 » Wed Aug 14, 2019 10:04 am

Although I've never much with it, I did learn Python rather quickly. I found it much easier to learn despite the stupid reliance on white space. The other big annoyance with it is the division between the 2.7 and the 3.0+ versions. Usually computer languages change over the years but are backward compatible but Python made some changes that are not backward compatible and it, as expected, created issues.
Just be aware of it in case you do something like I did, picked up a book started doing some examples and then couldn't get something simple to work. Then after googling realized the syntax for some basic commands had changed. This was a good 8 years ago.

As far as what to do, that depends on your interest. Python is often used as a replacement for Perl and with Perl you can parse, reformat all kinds of data. If you get a Raspberry Pi and have something you want to do with it then maybe you can use Python for that as well.

User avatar
8foot7
Posts: 2111
Joined: Mon Jan 05, 2015 7:29 pm

Re: I wanted to teach myself computer programming.

Post by 8foot7 » Wed Aug 14, 2019 10:05 am

You will either love or hate this book: https://www.amazon.com/Head-First-Learn ... way&sr=8-1

Work through a couple of chapters and see how you feel. If you hate it, return it.

User avatar
nisiprius
Advisory Board
Posts: 41108
Joined: Thu Jul 26, 2007 9:33 am
Location: The terrestrial, globular, planetary hunk of matter, flattened at the poles, is my abode.--O. Henry

Re: I wanted to teach myself computer programming.

Post by nisiprius » Wed Aug 14, 2019 10:06 am

I would say everything depends on being able to find a comfortable, modern, well-supported IDE (integrated development environment) that run on whatever equipment you have or can easily get. And I would suggest any reasonably modern language, that is used in the real world and shows up in job requirements descriptions. Not something bleeding-edge with an over-intense fan base.

Probably a good choice would be an interpreted language, because although debuggers for compiled environments have gotten to be amazingly capable, in my experience debugging is still, consistently better in an interpreted environment. Compilers, debuggers, and code optimization is a poisonous combination.

Because so many languages nowadays are using C-like syntax, maybe it should be one of them.

I would explicitly recommend against C++ because it intentionally makes every compromise in favor of execution speed and against comfort, safety, and easy of use.

I think it should be an object-oriented language.

I really liked C# when I was working with it (for about four years), and a Microsoft has a very capable no-cost "community edition." "I really liked C#" is a very strong statement for me, because it is a Microsoft proprietary language for Windows only, and I hate Windows and I hate Microsoft.

C# might be considered a sort of Java imitation, but I did not much like Java, and I found the world of competing Java IDEs difficult to navigate. You have to be careful with the open-source fan base. All too often someone has told me "oh, it's just as easy to use as [some commercial enviroment], it has a GUI," have tried to use it, have run into problems with the GUI, have asked for help, and had the same person tell me "I don't know, I never use it, just use the command line instead.") In the open-source world you will get conflicting advice about favorite editors, favorite IDEs, favorite source-code control systems, favorite distros, etc. Maybe that's good, but it does make it hard to get started.
Annual income twenty pounds, annual expenditure nineteen nineteen and six, result happiness; Annual income twenty pounds, annual expenditure twenty pounds ought and six, result misery.

User avatar
funktor
Posts: 37
Joined: Wed May 29, 2019 4:25 pm

Re: I wanted to teach myself computer programming.

Post by funktor » Wed Aug 14, 2019 10:09 am

I think Automate the Boring Stuff with Python is a fun start that can help you solve some real practical problems.
It's easy to believe in something when you win all the time. The losses are what define a man's faith

User avatar
oldcomputerguy
Moderator
Posts: 8363
Joined: Sun Nov 22, 2015 6:50 am
Location: In the middle of five acres of woods in East Tennessee

Re: I wanted to teach myself computer programming.

Post by oldcomputerguy » Wed Aug 14, 2019 10:22 am

I'm sort of in the same boat as the OP, not so much looking for a career path (I'm retired) but just looking to learn new things.

My computer experience began with FORTRAN IV on punchcards run on an IBM System/360 mainframe, and BASIC (and assembler - I'm a glutton for punishment) on an SDS (later Xerox) Sigma 7 mainframe (thus my BH username :wink: ). Other than that, my strongest proficiency is in C, which is still very widely used, so if you've never used C I strongly suggest you start there. (Other languages such as Javascript and Python use some similar principles, and if you know C really well you'll be able to make sense of some of the architectural differences between more modern languages).

I've recently begun trying to learn Python. Over my years, typically the O'Reilly book series has been the "go-to" series for learning new computer things, so I bought Mark Lutz's "Learning Python". I recommend you stay away from it. It's 1,400 pages and is IMHO not written for the person trying to learn the language, it's more appropriate as a reference after you have some exposure.

Since a lot of web presence still is based on the LAMP stack (Linux-Apache-MySQL-PHP), it might be worth it to get some PHP exposure (which, incidentally, will be easier if you already know C :wink: ). While you're at it, familiarize yourself with SQL database concepts, it'll help down the road whether you're dealing with MySQL, Microsoft SQL Server, or another product.

All that being said, I'm speaking from a technical knowledge point of view, not from any knowledge of what the current market for programmers might be asking for. I'm sure others can chime in with that.
"I’ve come around to this: If you’re dumb, surround yourself with smart people; and if you’re smart, surround yourself with smart people who disagree with you." (Aaron Sorkin)

User avatar
Hayden
Posts: 1320
Joined: Tue Apr 16, 2013 5:13 pm

Re: I wanted to teach myself computer programming.

Post by Hayden » Wed Aug 14, 2019 11:20 am

Take a look at the online courses available from Coursera and edX. There are a huge number to choose from.

The course Python for Everyone on Coursera is excellent. But I'm sure many of the other offerings are excellent as well.

user9532
Posts: 33
Joined: Sun Dec 18, 2016 10:08 pm

Re: I wanted to teach myself computer programming.

Post by user9532 » Wed Aug 14, 2019 11:26 am

I have been an hobbyist programmer for almost 30 years now. It is a great hobby, keeps your mind active.

When I bought my first computer in 1990, it came with a program called 'Gorilla' which was written in QBasic. I got interested in how to create such a program and learned QBasic. I was working as an accountant then and tried to write an accounting program in QBasic. I started getting error messages like "stack overflow", "buffer overflow" etc. That is when I learned real programmers never wrote code in QBasic, instead they all used a language called C. Suddenly I wanted to learn C. I bought a copy of Turbo C\C++ ver 3.0 for DOS and a book on C\C++ programming and started learning C. Every five minutes I had to reboot my computer, but I learned to write code in C. Then I learned the basics of C++ and took a course at the local community college in C++ programming.

Then Windows came. I bought a copy of Charles Petzold's "Programming Windows 3.1" and learned to create Windows programs in C. Then I learned MFC. And then .Net came and I learned C#, WPF and ASP.Net. Now my favorite is writing C# programs using WPF and the sqlite database engine using ADO.NET.

rj342
Posts: 726
Joined: Tue Apr 30, 2019 12:21 pm

Re: I wanted to teach myself computer programming.

Post by rj342 » Wed Aug 14, 2019 11:49 am

nisiprius wrote:
Wed Aug 14, 2019 10:06 am
...
I really liked C# when I was working with it (for about four years), and a Microsoft has a very capable no-cost "community edition." "I really liked C#" is a very strong statement for me, because it is a Microsoft proprietary language for Windows only, and I hate Windows and I hate Microsoft.
...
Python is starting to show up more as a first programming language in colleges and high schools. Not sure if it has beat out Java yet though. Python is also very hot in Machine Learning in the real world.

Javascript is also very broadly used, and is not just for the web browser any more, but has some nasty quirks. If you do Javascript I strongly suggest the book JavaScript The Good Parts or something similar to focus on the safer subset.

I do second the vote for C#, and the free Community edition of Visual Studio. I'm sure there will be one or two vi reverse-snobs here but a modern IDE makes coding SO much easier. Console programs are where to start, and WinForms makes it VERY simple to create basic Windows GUI apps (WPF is the newer gen UI tools)). Also do web back ends, etc.

Stay away from VB.NET !! Slightly simpler in some trivial ways, it does not set you up to make easy lateral jumps to C/C++, Java, Javascript, Lua etc like C# does.

I did find the Java ecosystem to be annoyingly fragmented. Am spoiled with .NET having built-in libraries for almost everything, while you're still free to use 3rd party open source as alternatives if you wish.

And making one important correction -- with .NET Core out already (which is officially going to replace .NET Framework) -- C# console apps and web services can run on Linux and Mac OS.

MS also has the very well received VS Code cross platform, multi-language lighter weight IDE with versions for Windows, Linux and Mac OS.

If you want to learn Python (do 3.0!) or Javascript as a starting point, you can use VS Code for them.
Last edited by rj342 on Wed Aug 14, 2019 12:13 pm, edited 1 time in total.

StandingRock
Posts: 344
Joined: Sat Feb 02, 2019 6:54 pm

Re: I wanted to teach myself computer programming.

Post by StandingRock » Wed Aug 14, 2019 12:01 pm

rj342 wrote:
Wed Aug 14, 2019 11:49 am

I did find the Java ecosystem to be annoyingly fragmented. Am spoiled with .NET having built-in libraries for almost everything, while you're still free to use 3rd party open source as alternatives if you wish.
The consequences of open source mentality. In my opinion, Microsoft is great for business developers. They take ideas from open source and incorporate them into the seamless practical environment that is more productive.

User avatar
whodidntante
Posts: 8367
Joined: Thu Jan 21, 2016 11:11 pm
Location: outside the echo chamber

Re: I wanted to teach myself computer programming.

Post by whodidntante » Wed Aug 14, 2019 12:17 pm

Books and courses are helpful, but you learn to write code by coding. Apply what you have learned early and often.

User avatar
vitaflo
Posts: 1273
Joined: Sat Sep 03, 2011 3:02 pm

Re: I wanted to teach myself computer programming.

Post by vitaflo » Wed Aug 14, 2019 12:27 pm

rai wrote:
Wed Aug 14, 2019 9:16 am
Any advice, books or online courses to recommend?

Back in the 80s I took a semester of COBAL and now I’m thinking just for fun to learn something new to me.

What language and what types of activity should I do?
Personally I would try to learn the concepts of computer science rather than just a language. Obviously you'll need a learn these concepts with a programming language (so you'll have to pick one), but I've seen too many people attempt to learn the language and not the science behind it. Once you learn computer science, you can apply it to any language. It will make you a much better programmer.

rj342
Posts: 726
Joined: Tue Apr 30, 2019 12:21 pm

Re: I wanted to teach myself computer programming.

Post by rj342 » Wed Aug 14, 2019 12:30 pm

vitaflo wrote:
Wed Aug 14, 2019 12:27 pm
rai wrote:
Wed Aug 14, 2019 9:16 am
Any advice, books or online courses to recommend?

Back in the 80s I took a semester of COBAL and now I’m thinking just for fun to learn something new to me.

What language and what types of activity should I do?
Personally I would try to learn the concepts of computer science rather than just a language. Obviously you'll need a learn these concepts with a programming language (so you'll have to pick one), but I've seen too many people attempt to learn the language and not the science behind it. Once you learn computer science, you can apply it to any language. It will make you a much better programmer.
THIS, particularly if you potentially want to make money doing it.
Its one of the problems with the coding bootcamp mentality, that all too often stops at "What commands do I type to do X?"
You can be a creator, an engineer... or just a technician.

User avatar
Elric
Posts: 278
Joined: Sat Dec 08, 2018 12:23 am
Location: Virginia
Contact:

Re: I wanted to teach myself computer programming.

Post by Elric » Wed Aug 14, 2019 12:39 pm

funktor wrote:
Wed Aug 14, 2019 10:09 am
I think Automate the Boring Stuff with Python is a fun start that can help you solve some real practical problems.
+1 for both that book in particular and python.

As someone else mentioned, Python 2.x and 3.x have some fundamental differences. There is no reason to start any new project or start learning with Python 2. The above book uses Python 3.
Python is much easier to pick up and use than compiled languages like C, and easier than Java. Python is, by several surveys, the fastest growing language in the world, and already has a huge user base. I turned to it decades ago when I wanted to pick up a new language for a hobby, and then also used it professionally.

Similar to another poster, I started in junior high and high school with Basic, assembler, and a Fortran like language called Focal. I learned Fortran in college and used it to help program the space shuttle mission simulator as my first job. I know a little C. I DON'T recommend starting with it. Syntax will bite you, and if you haven't dealt with pointers or done assembly, they are hard to grasp. The really nice thing about python is that you can pick up the basics easily, but it's used to handle really complex challenges as well. Because of the Pandas library, it's popular in finance as well.

If you want a course, I'd go with one based on a real college course (through Coursera, or MIT's free online course, or similar), rather than some of the others, which are too rote, in my opinion.
"No man is free who works for a living." | Illya Kuryakin

otinkyad
Posts: 206
Joined: Wed Jun 01, 2016 5:35 pm

Re: I wanted to teach myself computer programming.

Post by otinkyad » Wed Aug 14, 2019 12:45 pm

rai wrote:
Wed Aug 14, 2019 9:16 am
What language and what types of activity should I do?
I would put figuring out an interesting activity first. Take a class at a local community college or similar, or identify something that you actually want to tinker with.

Learning Python, JavaScript, or anything else online with no idea what to do with it seems too sterile to me. Better to enjoy a class and interact with others.

You might think about web development, Raspberry Pi, or Arduino to see if tinkering with those is interesting. Or, is there someone in your life, especially teens, that you could connect with over something (MineCraft, iOS or Android development, web development, or yeah, Python or Java, etc.).

Dottie57
Posts: 8674
Joined: Thu May 19, 2016 5:43 pm
Location: Earth Northern Hemisphere

Re: I wanted to teach myself computer programming.

Post by Dottie57 » Wed Aug 14, 2019 1:06 pm

oldcomputerguy wrote:
Wed Aug 14, 2019 10:22 am
I'm sort of in the same boat as the OP, not so much looking for a career path (I'm retired) but just looking to learn new things..
Me too. Python sounds good. I think this forum is in PHP.

Java is very different than COBOL I its thought process. Don’t know enough about python to compare.

Programming is fun. Hope OP finds it fun too.

User avatar
whodidntante
Posts: 8367
Joined: Thu Jan 21, 2016 11:11 pm
Location: outside the echo chamber

Re: I wanted to teach myself computer programming.

Post by whodidntante » Wed Aug 14, 2019 5:56 pm

oldcomputerguy wrote:
Wed Aug 14, 2019 10:22 am
My computer experience began with FORTRAN IV on punchcards run on an IBM System/360 mainframe, and BASIC (and assembler - I'm a glutton for punishment) on an SDS (later Xerox) Sigma 7 mainframe (thus my BH username :wink: ).
I confirm. Username checks out. :beer

Fun fact. I tested out of Fortran in college. They said no one had asked to do that before. :D

User avatar
oldcomputerguy
Moderator
Posts: 8363
Joined: Sun Nov 22, 2015 6:50 am
Location: In the middle of five acres of woods in East Tennessee

Re: I wanted to teach myself computer programming.

Post by oldcomputerguy » Wed Aug 14, 2019 6:07 pm

whodidntante wrote:
Wed Aug 14, 2019 5:56 pm
oldcomputerguy wrote:
Wed Aug 14, 2019 10:22 am
My computer experience began with FORTRAN IV on punchcards run on an IBM System/360 mainframe, and BASIC (and assembler - I'm a glutton for punishment) on an SDS (later Xerox) Sigma 7 mainframe (thus my BH username :wink: ).
I confirm. Username checks out. :beer

Fun fact. I tested out of Fortran in college. They said no one had asked to do that before. :D
I tutored.
"I’ve come around to this: If you’re dumb, surround yourself with smart people; and if you’re smart, surround yourself with smart people who disagree with you." (Aaron Sorkin)

palaheel
Posts: 313
Joined: Wed Mar 22, 2017 7:35 am

Re: I wanted to teach myself computer programming.

Post by palaheel » Wed Aug 14, 2019 7:12 pm

I recommend a community college course, if spending a little money is not an issue.

If you really want to go it yourself,

For Java:
book: google "How to think like a computer scientist java"
There are free electronic versions.
for a development environment, get Java 8 from Oracle. It's free for personal use. Yes, I'm aware of OpenJDK and Java 11; get Java 8 from Oracle.
For a development environment, JetBrains' IntelliJ IDEA Community edition is free. It seems a bit more solid than Eclipse for some of the later Java editions, though Eclipse and Java 8 are fine.
For videos on youtube, Mark Dexter's "Eclipse and Java for Total Beginners" is really excellent. It's a bit dated--I think it uses Java 6, but it'll be quite some time before you really care.

Python will be easier for the beginner:
book: google "How to think like a computer scientist python"
For a development environment, make sure you get Python 3.6 or later. It's easy to slip and get Python 2.something. You don't want that. For an IDE, JetBrains' PyCharm, either Community or Educational edition. The educational edition has wonderful "see and do" projects.

All of this stuff is free. I still can't get over it.

My first job was rewriting a database so that we could move from Sigma 7 machines with fixed head disks to DEC PDP 11s. College involved an IBM 1130, punch cards and FORTRAN.
Markets crash. Markets recover. Inflation takes your money FOREVER.

dboeger1
Posts: 216
Joined: Fri Jan 13, 2017 7:32 pm

Re: I wanted to teach myself computer programming.

Post by dboeger1 » Wed Aug 14, 2019 8:40 pm

palaheel wrote:
Wed Aug 14, 2019 7:12 pm
For Java:
...
for a development environment, get Java 8 from Oracle. It's free for personal use. Yes, I'm aware of OpenJDK and Java 11; get Java 8 from Oracle.
I'm curious why you recommend Java 8 from Oracle? The only reason I could think of for picking that up at this point would be to learn specifics related to a particular job or work environment that depends on a certain version. For personal use, the OpenJDK is for all intents and purposes the full official Java implementation going forward, with Oracle versions adding very little related to branding and integration with other Oracle products. A lot has changed with regards to how OpenJDK is developed, built, and distributed, so I would think learning the latest stuff would be immensely valuable for general purposes. For example, I use JavaFX in some personal projects. Originally, I believe it was a separate project within Sun/Oracle. Then it became part of the official Oracle JDKs, and there was also an open source project that provided it as a separate library for OpenJDK. Now with modular JVM, it's distributed as a completely separate module, and is no longer "owned" by Oracle (I'm not too sure if they still sponsor its development though). My point is that depending on which features OP intends to use, things and practices from as little as a year or two ago could be drastically out of date.

To OP, personally, for a first programming language, I would recommend either C or Python depending on what it is you intend to do/learn. C is still pretty much industry standard for low level software, operating systems, embedded systems, and even high performance stuff. I've heard it referred to as machine language for humans, because it's readable but for the most part exposes and preserves many of the same ideas that you would need to know and understand to write assembly instructions. Just learning C gives you a better understanding of computers and how many of the underlying features in other languages work.

It's also pretty straightforward to learn C++ after C, and while I don't really see C++ as a top choice for many use cases anymore, it's still an excellent language and can be used for many things, so it only makes sense to pick it up after learning C, much like learning French and Spanish together. The main problem with C++ is that it's a bit like a street bike as opposed to a mountain bike or a racing bike; it's somewhere in the middle, so it's usable for everything but not necessarily the best at any particular thing. There was probably a time when C++ was a no-brainer for higher-level object-oriented programming that weren't mission critical and didn't rely on extreme performance, but I feel like those days are mostly gone. Nowadays, speed and ease of development are all the rage, and there are plenty of high-level languages which are just easier to work with. With C++, you still need to understand compilers, linkers, Makefiles, type safety, memory management, and all kinds of other things that other newer languages help out with. And for really performance-sensitive stuff that you need to debug at a low level, C is generally good enough, and you don't have to learn things like templates. There are certain applications which kind of fit in that middle ground though, of benefitting from object-oriented programming features while still relying on high performance and integration with OS libraries. This is why C++ is the standard in the video games industry, and I'm sure it sees a lot of use in distributed systems development, databases, etc. Golang is a really strong newer alternative that I personally like better than C++, but being the much newer language, there are far less resources for it. It is becoming quite popular though, so I would strongly encourage it as a good 2nd language for beginners.

The reason I recommend Python for higher-level applications is that it prioritizes speed and ease of development, and despite being a scripting language at its core, is a strong contender for most general purpose programming language due to its wide use. I know there are still plenty of people who love languages like Perl and Ruby, but honestly, I have a hard time justifying using any of those when Python exists. It has a ton of great libraries, is widely used in industry, is quick to develop with, and is very readable so you can learn and share example code with ease. So much of modern Linux OS environments is built with Python. Lots of automation is done with Python. It's what most people use with those little hobby computers such as Raspberry Pi. It has web frameworks that can be used to build web sites. It can be used to make some games (though I wouldn't use it for every class of games). Honestly if all you want to do is hop into a language interpreter and start typing up commands and seeing what happens within a few minutes, while still being able to scale that up to real production use, then Python is really hard to beat. It also feels very natural to use it for both scripting and OOP purposes, which is something I've noticed a lot of languages struggle with. While you can technically write a Java program that just executes a single main method like a script, it just feels awkward doing it, as OOP is really built into the structure of the language. Likewise, while you can build some pretty intricate bash libraries, it'll always feel like a script-first language.

My honorable mentions would be Java, Golang, and bash.

I personally don't think Java is a great first language, and I strongly believe it should not be anyone's only programming language. Java's biggest problems are that it has a lot of idioms and its own versions of challenges with old compiled languages, and isn't particularly straightforward to integrate with other languages and technologies. For example, there are several commonly used build systems in Java which have entire books of their own, and the platform independence and the way the JVM sits between you and the underlying system can get annoying when developing certain things like rich client applications that depend on new OS-level features that have not been exposed by the core JVM libraries or some other module. That being said, the language has gotten easier to work with in just the past year or so. I haven't used all the latest features, but my understanding is that there is now a command-line interpreter similar to Python's which could be useful for quick experimentation, and packaging and deployment of executables is now more straightforward. These things have historically been big barriers for newbies learning the language for the first time. For the sake of completeness, I should also mention that Java is the primary development language for Android applications, so if you're specifically interested in those, then it's an obvious choice. There are other languages that can be used to develop Android applications, but it's not as straightforward for a beginner.

Golang is really an excellent modern language that is quickly gaining traction in industry with the adoption of technologies like Kubernetes. The main reason I hesitate to recommend it as a first language is that you simply might not appreciate how revolutionary it is without learning some of its predecessors first. The syntax alone is quite different, so it's not quite as easy to transition between it and other languages on command, but I think it's a good enough language that it's worth learning, and it would qualify you for some pretty high quality industry positions that aren't as easy to fill because it has a smaller user base still.

And finally, bash is just supremely useful for general Linux scripting purposes. If all you want to do is learn some basic Linux server administration tasks and the like, then bash is a must. I thought I recently saw a headline about some major Linux distribution and/or Mac OS switching to zsh by default, but maybe that was just in a dream. I'd have to search to verify that. But regardless, there are pretty much infinite bash scripts that keep organizations running day to day. It's not the first thing that comes to mind when people think of programming languages, but so many daily tasks involve chaining together a number of smaller command-line utilities, so it really is a workhorse. If you're not really interested in developing large applications or studying algorithms and the like, but you just want to develop some useful little utilities, then bash is fantastic. I have no idea what exists in the Windows world, but I'm sure it has shell scripts too.

srj
Posts: 56
Joined: Thu Apr 16, 2015 10:18 pm

Re: I wanted to teach myself computer programming.

Post by srj » Wed Aug 14, 2019 9:19 pm

Great advice in here. I'd say there are many right ways to learn, you will get used to the manner of thinking and the patterns you see will for the most part become broadly applicable.

I wouldn't fret too much over the exact language, you can write a great program in many of the ones mentioned here. Python has a lot going for it in terms of being relatively easy to pick up, and it's in a renaissance period right now. I would probably steer away from functional (scheme, haskell) or systems (C) languages to start. Any of the imperative languages with deep library support could be a good choice (python, Java, C#).

I learned to program by coming up with small projects for myself and using the language / tooling I wanted to learn to accomplish it.

bstewie
Posts: 180
Joined: Wed Oct 04, 2017 8:16 pm

Re: I wanted to teach myself computer programming.

Post by bstewie » Wed Aug 14, 2019 9:24 pm

srj wrote:
Wed Aug 14, 2019 9:19 pm
Great advice in here. I'd say there are many right ways to learn, you will get used to the manner of thinking and the patterns you see will for the most part become broadly applicable.

I wouldn't fret too much over the exact language, you can write a great program in many of the ones mentioned here. Python has a lot going for it in terms of being relatively easy to pick up, and it's in a renaissance period right now. I would probably steer away from functional (scheme, haskell) or systems (C) languages to start. Any of the imperative languages with deep library support could be a good choice (python, Java, C#).

I learned to program by coming up with small projects for myself and using the language / tooling I wanted to learn to accomplish it.
Assuming you actually want to learn something, I would steer towards functional and systems.

MathIsMyWayr
Posts: 1815
Joined: Mon Mar 27, 2017 10:47 pm
Location: CA

Re: I wanted to teach myself computer programming.

Post by MathIsMyWayr » Wed Aug 14, 2019 9:51 pm

oldcomputerguy wrote:
Wed Aug 14, 2019 6:07 pm
whodidntante wrote:
Wed Aug 14, 2019 5:56 pm
oldcomputerguy wrote:
Wed Aug 14, 2019 10:22 am
My computer experience began with FORTRAN IV on punchcards run on an IBM System/360 mainframe, and BASIC (and assembler - I'm a glutton for punishment) on an SDS (later Xerox) Sigma 7 mainframe (thus my BH username :wink: ).
I confirm. Username checks out. :beer

Fun fact. I tested out of Fortran in college. They said no one had asked to do that before. :D
I tutored.
I never took any programming courses, but somehow became quite good with FORTRAN IV and 77(?). I programmed mainly for number crunching. There is nothing particular to learn about FORTRAN besides recognizing how various data types (integers, real*4, real*8, complex, arrays) are stored in memory. Nowadays, they use matlab in place of FORTRAN. But I do not consider matlab as a programming language. Again, I use matlab mostly for number crunching. I should learn real programming languages when I find time.

bmr12
Posts: 44
Joined: Mon Sep 07, 2015 2:27 pm

Re: I wanted to teach myself computer programming.

Post by bmr12 » Wed Aug 14, 2019 9:59 pm

I’ll throw in my two cents here.

If you want to learn the basics and don’t have a background in programming, I’d start with Python and a free IDE (sorry, haven’t done much Python beyond helping my kid, so no obvious recommendation).

Java would be next—several free self-contained compiler/IDEs which would help, but Java is relatively complex as a starting point for learning the basics of programming. If you have some background in programming and object-oriented design, then start here.

I’d avoid JavaScript, C++, and C out of the gate as alternatives.

I’m not as old as oldcomputerguy, but my first college compiler for FORTRAN IV did end with “# of cards read” as I hacked away with a line editor, and my favorite professor had specially designed card filing cabinets for his programs....

ARoseByAnyOtherName
Posts: 1000
Joined: Wed Apr 26, 2017 12:03 am

Re: I wanted to teach myself computer programming.

Post by ARoseByAnyOtherName » Wed Aug 14, 2019 10:25 pm

rai wrote:
Wed Aug 14, 2019 9:16 am
Any advice, books or online courses to recommend?

Back in the 80s I took a semester of COBAL and now I’m thinking just for fun to learn something new to me.

What language and what types of activity should I do?
If you want to learn programming generally - and by that I mean you don’t have a specific goal in mind like say making a video game - I strongly recommend that you start with learning Python. Personally I really like Learn Python the Hard Way book/class: https://learnpythonthehardway.org/

I recommend Python because the syntax is as close as you’ll reasonably get to plain English, and it’s a general-purpose language that’s famous for having “batteries included”. Meaning it’s suitable for a wide range of tasks, has a lot of useful functionality built-in, and it’s relatively very easy to understand what the code is doing by looking at it.

Please ignore everyone who recommends starting with programming languages such as C, C++, Java, and Haskell. These are complicated, industrial-scale languages that are in no way suitable for someone wanting to learn something new for fun.

Best of luck.

killjoy2012
Posts: 1105
Joined: Wed Sep 26, 2012 5:30 pm

Re: I wanted to teach myself computer programming.

Post by killjoy2012 » Wed Aug 14, 2019 10:30 pm

OP - It depends on what kind of software development you want to do.

Back end stuff? Python or C++. Maybe Java but its getting dated.
Front end? AngularJS, HTML, CSS

Dottie57
Posts: 8674
Joined: Thu May 19, 2016 5:43 pm
Location: Earth Northern Hemisphere

Re: I wanted to teach myself computer programming.

Post by Dottie57 » Wed Aug 14, 2019 10:34 pm

ARoseByAnyOtherName wrote:
Wed Aug 14, 2019 10:25 pm
rai wrote:
Wed Aug 14, 2019 9:16 am
Any advice, books or online courses to recommend?

Back in the 80s I took a semester of COBAL and now I’m thinking just for fun to learn something new to me.

What language and what types of activity should I do?
If you want to learn programming generally - and by that I mean you don’t have a specific goal in mind like say making a video game - I strongly recommend that you start with learning Python. Personally I really like Learn Python the Hard Way book/class: https://learnpythonthehardway.org/

I recommend Python because the syntax is as close as you’ll reasonably get to plain English, and it’s a general-purpose language that’s famous for having “batteries included”. Meaning it’s suitable for a wide range of tasks, has a lot of useful functionality built-in, and it’s relatively very easy to understand what the code is doing by looking at it.

Please ignore everyone who recommends starting with programming languages such as C, C++, Java, and Haskell. These are complicated, industrial-scale languages that are in no way suitable for someone wanting to learn something new for fun.

Best of luck.
I agree with this. Learn a more straight forward language first. If you want, you can move on to other types of languages after the easier ones.

palaheel
Posts: 313
Joined: Wed Mar 22, 2017 7:35 am

Re: I wanted to teach myself computer programming.

Post by palaheel » Thu Aug 15, 2019 5:01 am

dboeger1 wrote:
Wed Aug 14, 2019 8:40 pm
palaheel wrote:
Wed Aug 14, 2019 7:12 pm
For Java:
...
for a development environment, get Java 8 from Oracle. It's free for personal use. Yes, I'm aware of OpenJDK and Java 11; get Java 8 from Oracle.
I'm curious why you recommend Java 8 from Oracle?
It's the installation complexity with the OpenJDK stuff. For real product development, I agree with you: go Java 11. But for someone just wanting to learn how to program, Oracle's Java 8 JDK installs easily and you're ready to go without figuring out if you need this extra thing or that. As you mentioned, you had to install JavaFX. One of the most frustrating problems a newbie has to face is "what is this optional-thing (like JavaFX), and do I need it or not? Even if I don't need it, do I want it?" Java 8 takes care of that; install it, you're done.

I'm always amused by the programming language wars. I view them as different tools in the box. There are many projects where C++ would be the obvious choice. Others where choosing Java or Python is a no-brainer.

A scripting language such as Python is easier for a beginner, clearly. The biggest downside is that moving to a more rigorous environment (such as Java or C++) really exposes how much of a crutch that interactive interpreter can become.
Markets crash. Markets recover. Inflation takes your money FOREVER.

HawkeyePierce
Posts: 1326
Joined: Tue Mar 05, 2019 10:29 pm
Location: Colorado

Re: I wanted to teach myself computer programming.

Post by HawkeyePierce » Thu Aug 15, 2019 5:07 am

killjoy2012 wrote:
Wed Aug 14, 2019 10:30 pm
OP - It depends on what kind of software development you want to do.

Back end stuff? Python or C++. Maybe Java but its getting dated.
Front end? AngularJS, HTML, CSS
IME Java (or at least the JVM) still rules the back end at shops worried about scale. It's not going anywhere.

I wouldn't suggest that Java is a great choice as a first language since it has so much baggage but it's the lingua franca of big data applications.
Last edited by HawkeyePierce on Thu Aug 15, 2019 5:23 am, edited 1 time in total.

User avatar
oldcomputerguy
Moderator
Posts: 8363
Joined: Sun Nov 22, 2015 6:50 am
Location: In the middle of five acres of woods in East Tennessee

Re: I wanted to teach myself computer programming.

Post by oldcomputerguy » Thu Aug 15, 2019 5:20 am

HawkeyePierce wrote:
Thu Aug 15, 2019 5:07 am
killjoy2012 wrote:
Wed Aug 14, 2019 10:30 pm
OP - It depends on what kind of software development you want to do.

Back end stuff? Python or C++. Maybe Java but its getting dated.
Front end? AngularJS, HTML, CSS
IME Java (or at least the JVM) still rules the back end at shops worried about scale. It's not going anywhere.
In addtion to use in the back end, I would note that knowledge of Java and the JVM directly transfers to writing apps for Android, since Android is based on them.
"I’ve come around to this: If you’re dumb, surround yourself with smart people; and if you’re smart, surround yourself with smart people who disagree with you." (Aaron Sorkin)

User avatar
Elric
Posts: 278
Joined: Sat Dec 08, 2018 12:23 am
Location: Virginia
Contact:

Re: I wanted to teach myself computer programming.

Post by Elric » Thu Aug 15, 2019 7:58 am

If you do go the python route, and especially of you're on a Windows machine, I recommend installing the Anaconda distribution (https://www.anaconda.com/ ). It gives you many of the libraries you might use later and handles a lot of the installation "gotchas" that can trouble a beginner using Windows.

For a tongue in cheek, now a bit dated,.view of the various languages, Check out God Wrote in Lisp: https://youtu.be/5-OjTPj7K54
"No man is free who works for a living." | Illya Kuryakin

Topic Author
rai
Posts: 1289
Joined: Tue Apr 06, 2010 7:11 am

Re: I wanted to teach myself computer programming.

Post by rai » Thu Aug 15, 2019 8:01 am

Thanks for all the replies!! I knew this forum would be of help. As I said not sure of what I wanted to program more than just learn how to, but I got to thinking I would like to try to fool around with game making if that makes a difference to the recommendations. Sorry that I didn’t lead with that.

:oops:
"Life is what happens to you while you're busy making other plans" - John Lennon. | | "You say that money, isn't everything | But I'd like to see you live without it." - Silverchair

User avatar
Elric
Posts: 278
Joined: Sat Dec 08, 2018 12:23 am
Location: Virginia
Contact:

Re: I wanted to teach myself computer programming.

Post by Elric » Thu Aug 15, 2019 2:40 pm

rai wrote:
Thu Aug 15, 2019 8:01 am
As I said not sure of what I wanted to program more than just learn how to, but I got to thinking I would like to try to fool around with game making if that makes a difference to the recommendations. Sorry that I didn’t lead with that.
Games can cover a lot of territory. Python is not good for major game development, 3D games, real-time shooters, etc. However for hobby use for other types of games, there's a good gaming library for it (Pygame).
"No man is free who works for a living." | Illya Kuryakin

MindBogler
Posts: 992
Joined: Wed Apr 17, 2013 12:05 pm

Re: I wanted to teach myself computer programming.

Post by MindBogler » Thu Aug 15, 2019 2:45 pm

nisiprius wrote:
Wed Aug 14, 2019 10:06 am
I would say everything depends on being able to find a comfortable, modern, well-supported IDE (integrated development environment) that run on whatever equipment you have or can easily get. And I would suggest any reasonably modern language, that is used in the real world and shows up in job requirements descriptions. Not something bleeding-edge with an over-intense fan base.
Visual Studio Code is free and works on Mac/PC/Linux.

https://code.visualstudio.com/

BoggledUp
Posts: 14
Joined: Fri Jan 05, 2018 10:38 am

Re: I wanted to teach myself computer programming.

Post by BoggledUp » Thu Aug 15, 2019 3:19 pm

Gaming also has its own development tools. Unity is one well known one.

dboeger1
Posts: 216
Joined: Fri Jan 13, 2017 7:32 pm

Re: I wanted to teach myself computer programming.

Post by dboeger1 » Thu Aug 15, 2019 3:42 pm

rai wrote:
Thu Aug 15, 2019 8:01 am
Thanks for all the replies!! I knew this forum would be of help. As I said not sure of what I wanted to program more than just learn how to, but I got to thinking I would like to try to fool around with game making if that makes a difference to the recommendations. Sorry that I didn’t lead with that.

:oops:
Game development is a whole world of its own. It's the reason I got into computer science, although I went down a very different career path and didn't return to game development until many years later as a side hobby. The thing you need to recognize is that programming and game development are 2 different things. It's kind of like comparing engine-making to car-making. Yes, the engine is an important piece of a working car. But somebody works on the electronics, somebody works on the aerodynamics, somebody works on the interior design, somebody works on the handling, somebody works on transmission, etc.

Games are a product composed of many different pieces involving many different skills. If you want to learn game-making in general, understand that it's not just going to be programming. I remember thinking I'd be able to make games by just learning programming when I was young, until I tried my hand at 3D modeling and realized I was a terrible artist. There's also a huge difference between trying to program games from scratch and simply programming within an established game engine or other development environment. Does developing a game with Unreal Engine involve programming to some degree? Yes. But I would not equate Unreal game programming with programming as a general skill. There is overlap, but they are not the same thing.

If you really do want to learn game development, my best bit of advice would be to start EXTREMELY small. This is the #1 bit of advice people in game development give because we all fail tremendously at this when starting out. Everyone wants to build their dream masterpiece on the first try, and it's impossible. And no, you won't get there faster by starting on it early. That's because a substantial amount of learning and understanding comes from completing multiple projects. For this reason, you should start by coding something like tic-tac-toe from scratch, learning the basics of game loops and event-driven programming models, and move your way up from there. For something super basic like that, Python is really hard to beat, although again, Java would be the de facto choice on Android.

A small game in Python or Java would actually be an excellent starter project, because it would give you enough of a taste of the language and programming in general to help you decide where you want to go from there. You may decide you hate working on games, or you'd prefer a different style of language.

almostretired1965
Posts: 221
Joined: Mon Nov 13, 2017 2:02 pm

Re: I wanted to teach myself computer programming.

Post by almostretired1965 » Thu Aug 15, 2019 3:55 pm

Someone mentioned java or python. Having picked up both over the years, Java around 2000 and Python around 2010, I think Python is definitely the better choice if you have little to no background in programming. You might want to consider signing up for this class in Coursera:

https://www.coursera.org/learn/interactive-python-1?

I took it about 5/6 years ago to get an intro into event driven programming, something I've not had to do much with over the years before or since. (I'm a data scientist.) They have since turned it into a 7 course sequence so you can go as deep as you want. But that first class was incredibly engaging and I imaging it has gotten better since.

A
Last edited by almostretired1965 on Thu Aug 15, 2019 4:15 pm, edited 1 time in total.

rj342
Posts: 726
Joined: Tue Apr 30, 2019 12:21 pm

Re: I wanted to teach myself computer programming.

Post by rj342 » Thu Aug 15, 2019 4:00 pm

HawkeyePierce wrote:
Thu Aug 15, 2019 5:07 am
killjoy2012 wrote:
Wed Aug 14, 2019 10:30 pm
OP - It depends on what kind of software development you want to do.

Back end stuff? Python or C++. Maybe Java but its getting dated.
Front end? AngularJS, HTML, CSS
IME Java (or at least the JVM) still rules the back end at shops worried about scale. It's not going anywhere.

I wouldn't suggest that Java is a great choice as a first language since it has so much baggage but it's the lingua franca of big data applications.
Also the last couple versions of java have added some of the more modern language features, making up for some of the ground they lost to C# for a bit (functional, streams similar to .NET LINQ, etc).

mxs
Posts: 507
Joined: Tue Mar 24, 2015 1:54 pm

Re: I wanted to teach myself computer programming.

Post by mxs » Thu Aug 15, 2019 4:02 pm

Years ago I took a class in Java, C++, and Visual Basic. I haven't used them in years, but I relearned a little bit of C++ using a program called AutoHotkey by automating multiple video game accounts to run 24/7 on a Windows computer. I would open an online video game six times over and login six different accounts and have the accounts work together and cycle between the accounts to do in game actions and keep the accounts/game logged in. If you want to dabble in some C++ and possibly automate or macro things you can give that a try. There is a side program someone made to purposely record key clicks and mouse clicks for ease of duplication.

nyclon
Posts: 357
Joined: Fri Oct 02, 2015 5:30 pm

Re: I wanted to teach myself computer programming.

Post by nyclon » Thu Aug 15, 2019 4:10 pm

rai wrote:
Wed Aug 14, 2019 9:16 am
Any advice, books or online courses to recommend?

Back in the 80s I took a semester of COBAL and now I’m thinking just for fun to learn something new to me.

What language and what types of activity should I do?
Yes - Khan Academy which is free. I'd recommend learning computer science and computer programming at the same time. As for language, if you go with Khan Academy you'll learn JavaScript, which will help you with most web applications via React/Angular/Node - and, you can take the syntax you learn and apply it to new languages if you ever need to.
https://www.khanacademy.org/computing/c ... rogramming
https://www.khanacademy.org/computing/computer-science

Enjoy

rj342
Posts: 726
Joined: Tue Apr 30, 2019 12:21 pm

Re: I wanted to teach myself computer programming.

Post by rj342 » Thu Aug 15, 2019 4:13 pm

nisiprius wrote:
Wed Aug 14, 2019 10:06 am
...
Not something bleeding-edge with an over-intense fan base.
...
Like the latest javascript library flavor of the month?

User avatar
Watty
Posts: 19763
Joined: Wed Oct 10, 2007 3:55 pm

Re: I wanted to teach myself computer programming.

Post by Watty » Thu Aug 15, 2019 4:26 pm

I have not used it for over ten years so I may be a bit out of date but one other option to consider would be to learn Visual Basic for Applications (VBA) which is the macro language that Excel uses.

I found it sort of fun to use and even for your personal stuff you could do do some useful things with it fairly easily.

It would not be of much use for games but if you have Excel then you should already have it.

CppCoder
Posts: 917
Joined: Sat Jan 23, 2016 9:16 pm

Re: I wanted to teach myself computer programming.

Post by CppCoder » Thu Aug 15, 2019 8:57 pm

What do you really want to learn, how to hack some code together or how to really program? What is your domain: computation, data science, web programming, operating systems, basic task automation? If you just way to play, like others recommended, just learn some python. If you really want to learn to program, pick up a data structures and algorithms book; I recommend the one by Cormen et al.

CppCoder
Posts: 917
Joined: Sat Jan 23, 2016 9:16 pm

Re: I wanted to teach myself computer programming.

Post by CppCoder » Thu Aug 15, 2019 9:00 pm

nisiprius wrote:
Wed Aug 14, 2019 10:06 am
I would explicitly recommend against C++ because it intentionally makes every compromise in favor of execution speed and against comfort, safety, and easy of use.
I feel I should be offended by this comment. Alas, for the OP's scenario, it is likely true... :beer

Edit: I would add that those are not the language designer's intentions, and I think Stroustrup would definitely take offense to that (well, in reality, he probably wouldn't care about posts on Bogleheads) and label it a mischaracterization.

rj342
Posts: 726
Joined: Tue Apr 30, 2019 12:21 pm

Re: I wanted to teach myself computer programming.

Post by rj342 » Thu Aug 15, 2019 9:08 pm

I always get a kick out of this
Object-oriented programming is an exceptionally bad idea which could only have originated in California
.

--Edsger Dijkstra

Post Reply