How to learn programming

I could have sworn we had a thread on this, but search yields nothing for me.

Anyways - Since I have a LOT of time on my hands these days, I wanted to get into programming. I used Delphi, and some Pascal and very very little machine language when I was in school (And BASIC in commodore 64) , so I understand the basics of how things work, but I’d like to try out some more recent languages.

Does anyone have any good ideas as to both language and/or courses / resources to use? I just want to be able to make smaller stuff, like - Tabletop Character generator, maybe a small adventure game, or just a small gimmick or useful tool - who knows.

Any input is much appreciated!

Having done some Delphi and Pascal, I would highly recommend C#. It’s MS’s flagship language these days and is in many ways similar to those. You can use it to create console applications as you learn, or full blown API’s or websites (though many people might use other technologies for the front end). It’s a dev friendly language and you should find what you learned before should port to it quite easily.

It’s also got a huge user base. So you will never be lacking for learning resources. And you won’t have to deal with the silliness of trying to learn how to create a react or Angular front end. Keep front end work for after you feel like you understand the concepts of programming well enough.

Resources

As a starting point, I would recommend using your MS account (can be the same one you use for Live or your Windows account, …) to log in to https://my.visualstudio.com/

Then go to Benefits:

https://my.visualstudio.com/Benefits

They have all kinds of courses and trials you can register for. The one you want to look for is “Pluralsight. Free for 1 month”

As a developer, this is one of the best curated and highest quality series of courses I’ve found. And being able to use it free for a month while in confinement should be a nice way to learn and see how you like it.

C# is pretty great. You can also look at Python or Javascript, see if you prefer them, also huge userbase, should be easy to find answers for most stuff, Youtube videos, all of that.

If you go with C#, you’ll probably be using Visual Studio, it’s a great IDE, other languages you might need to look around for a tool that’s equivalent, probably Visual Studio Code (also from Microsoft).

We also develop C# in VS Code on Linux. It’s not as nice as Visual Studio (for which you can download a free version on Windows. See Benefits tab). But, with a few add-ons, it does the trick quite well. Like you mentioned, it’s also easy to use for other languages. Both would be good choices. But Visual Studio would indeed be my first choice for C# on Windows.

I bet your school stuff was long ago… how much you recall? ;)

If you’re just looking to tinker with small bits and pieces and have a bit of fun getting stuff going quickly, I’d use something simple, flexible, and interpreted like Python.

But really you want a clearer goal. :)

Thanks for the excellent suggestions, guys.

It WAS a long time ago, and I dont remember much specifics no, that is true. I just meant that I understood how programming works :-)

I am unsure, in that perspective, if C# is a bit much to learn?

As for clearer goal - thats absolutely right. My primary idea was to have something to do that didnt involve cleaning, physical training or playing videogames which is primarily what my days are right now, and will be until at least 8th of July.
So - I figured why not spend the time doing some useful and interesting, and I have toyed with this idea before. Both for fun, but really also to be more attractive if I am going to look for another job eventually.

So, Python may be more realistic to learn I take it, but C# would be more interesting commercially.

Both would be good choices. C#, when used to develop console apps is very much like Pascal. No pointers. Strongly typed (so won’t let you do silly things). Nice support for a lot of language features. But there is a lot you can then learn about once you start diving into all the .net core framework. The language itself is syntactically very approachable though.

Python might be a nice way to dive back into programming and relearn the basics. It is flexible and is equally popular.

I wouldn’t use JavaScript as a learner’s language.

Another vote for Python here - I think it’s great as a first language, it’s really expressive (if that’s the right word - you can do a lot in a few lines of code, if you know what I mean!) and fun to use. It’s typically what I would reach for if I wanted to prototype something, or knock up a quick tool for my own use.

It’s got a pretty huge standard library of extra functionality as well, and lots of 3rd-party stuff you can add on really easily. Lots of support and courses online, every few months Humble seem to put out Python book bundles as well (there’s one on now, I can’t speak to the quality of these though).

Anyway, whichever you choose, good luck with it, I think it’s an excellent use of time.

I’m no expert in C# but from being around people who use it, it’s like any language In that you can learn the basics with very little trouble. Once you’ve got that under your belt then you can go as far as you’d like into more advanced topics.

Tell the truth, all programming languages are similar in the basics, so I wouldn’t worry too much about learning one vs the other. Pick one that interests you.

Well said and agreed.

You could find a game you like, with a strong modding scene, and get into programming that way. Best would be a game that has a dedicated modding board, with people helping each other and offering advice on each others’ code, or helping you if you have a problem. Mount & Blade used to be pretty great for this back in the day but I don’t know how it is now.

So look for games that have total conversion mods, or where you can get stuck in to the scripting aspect, and that is a fun way to do things.

Edit: I should say that the benefits of this approach is that you can work on problem solving without it being overly abstract, see your results in-game, which is really cool, and you will likely feel really engaged while doing it.

JavaScript, without a doubt.

It’s a terrible language that will happily give you more than enough rope with which to hang both yourself and your entire family, isn’t type safe nor is it even compiled. It also has taken over the entire world (and as a result will not be going anywhere for the next 2 decades at least) and the barrier to entry is so low you can get started, right now, just by pressing F12.

I can think of no fire that will as quickly* smelt any impurity from you and cast you to either the damning depths of development hell, or deliver you to glorious salvation on the basis that you are able to keep your code simple and concise enough to deserve it.

* save the Recursively Named One which we do not mention in polite conversation.

I’ll buck the “useful programming language” trend here. I recommend that you learn the Python-like GDScript while also learning to make 2D games in the Godot game engine. Find one of the deals where you can get this Udemy course for $9 and follow it.

  1. You’ll have fun and will be able to have a game-based project
  2. It’s far simpler than Unity/C# for beginning.
  3. The course is good (I followed it a few yrs ago).
  4. You’ll easily be able to apply what you learn with GDScript to work in Python, which will allow you to branch out into more practical projects.

The other fun way to learn is with Processing. @Dave_Perkins teaches programming intro classes with it and probably can provide you some direction.

oh wow - That looks really, really interesting! And, to make sure I follow through on this idea, I bought the course now! Awesome - Should serve as an interesting springboard into more, if I so choose!
Thanks!

edit - Are the Udemy courses often on sale? I see others that are really interesting, and are 90 percent off - Was I just lucky, or is this normal?

Personally, I disagree about C# given that you haven’t done any programming in a while (more than a decade, if I had to guess?). I think you need something that will get you off the ground quickly so that you don’t get frustrated, and I think Python is the best for that.

@Clay’s recommendation for Godot/gdscript is solid because gdscript is basically “python-lite” and there are some good tutorials for getting a Godot game off the ground quickly. (I’d say it is great for a “small adventure game”.)

False!

True!

This is the best evidence that we live in the dumbest of all possible timelines.

When you get good at whatever language you choose, Project Euler is good if you want to do some math. (Though I can’t help but feel you should really learn Haskell before doing it.)

It’s not lucky. It’s to tempt you in. The first time you register, or when you are logged out, you will see tons of courses on sale. Once you have bought courses and log in a while later, a lot of those “sales” suddenly disappear though. :(

I think you mean === false

Ah! Well, its fairly cheap right now at least, so took another one where you learn to make 2D art with GIMP - I’ve been looking into photoshop like programs for a while, so that seems like a good match.

C# in Unity is a different beast than C# proper. Unity treats C# as a scripting language with a restricted API.

I also recommend the mod scene as a way to get started with programming again. It provides a concrete project to work on, is a way you can make an actual contribution to something, often you can get started by looking at someone else’s code, and there’s usually a community of people to help you. I’ve recently been tinkering with writing a Discord bot to manage hands of cards for online gaming. It’s fun!

wat