Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
What are you coding for? Coding for coding sakes will just get you frustrated. I am a PHP developer, build web apps, general websites and so on, that is my reason to code and use PHP, what is yours?
Ideally, I'd like to develop iOS apps.

However, I found Swift to be too complicated, so I switched to Python, which is meant to be much more accessible.

I thought I could learn Python (thus learn programming concepts) then move onto Swift.
 
  • Like
Reactions: LeeW
You might want to try an online course where they walk you through the lessons, step by step. One that I did to learn Python was from Udemy. Check it out here: Automate the Boring Stuff with Python Programming Course

It's based on Al Sweigart's book, Automate the Boring Stuff with Python. The great thing about this book (and Udemy course) is that it teaches you how to program from the point of view of a person who has a particular project in mind. If shows you how to do specific tasks using Python programming, an easier way to learn than to try to learn it from scratch with no specific goals or projects.

Another great Python book for beginners is Python Crash Course, by Eric Matthes.

One more very good Udemy course is The Modern Python 3 Bootcamp by Colt Steele.

Oh, and make sure you wait for a Udemy sale before you purchase any of those courses!! They can retail for ridiculously high prices, but you should never have to pay more than $20 (US dollars) if you buy them on sale. In fact, they occasionally go as low as $11 or $12. So, do NOT pay $50-$100 for any course on that site!

Good luck with everything!
 
As an Amazon Associate, MacRumors earns a commission from qualifying purchases made through links in this post.
  • Like
Reactions: The Cockney Rebel
You might want to try an online course where they walk you through the lessons, step by step. One that I did to learn Python was from Udemy. Check it out here: Automate the Boring Stuff with Python Programming Course

It's based on Al Sweigart's book, Automate the Boring Stuff with Python. The great thing about this book (and Udemy course) is that it teaches you how to program from the point of view of a person who has a particular project in mind. If shows you how to do specific tasks using Python programming, an easier way to learn than to try to learn it from scratch with no specific goals or projects.

Another great Python book for beginners is Python Crash Course, by Eric Matthes.

One more very good Udemy course is The Modern Python 3 Bootcamp by Colt Steele.

Oh, and make sure you wait for a Udemy sale before you purchase any of those courses!! They can retail for ridiculously high prices, but you should never have to pay more than $20 (US dollars) if you buy them on sale. In fact, they occasionally go as low as $11 or $12. So, do NOT pay $50-$100 for any course on that site!

Good luck with everything!
Hey, thanks for the info.

I really appreciate the advice, and I’ll be sure to check out what you’ve suggested.
 
As an Amazon Associate, MacRumors earns a commission from qualifying purchases made through links in this post.
I started coding in BASIC in 1981 on a Commodore VIC 20. I currently develop iOS apps using Swift.

If you've not done any coding before there is a MOUNTAIN of stuff to learn. And it's not at all like you see "hackers" in the movies. Everything is difficult. Nothing works. It's a hard slog. You will feel stupid. Learning computer programming is really, really hard. So, the fact that you're finding it difficult is just like, yeah, that's right. That's how it is.

However, I learnt to do it and I'm really not particularly clever. Average intelligence probably. If you want to learn, you absolutely can. 100%. I'd say it's roughly as hard as becoming fluent in a foreign language like French.

My advice is this:

  1. Decide on what you want to create. If you want to create apps for iPhone/Android and applications for the Mac/PC pick a rigorous, compiled language like Swift (iOS), Kotlin (Android) or C# (.NET)
  2. If you want to create websites learn HTML/CSS, and perhaps you can then progress onto a scripting language like PHP or Javascript
  3. Find a really good tutorial book and stick with it. Go through it from beginning to end doing all the exercises. Don't be tempted to switch to another cool language because it might be "easier". They're ALL hard
  4. It might take you a good 6 months before you start to feel confident. But that's just the start...
And finally, make sure that you enjoy learning, tinkering and playing with ideas. ALL programmers are constantly learning, experimenting and trying new things. It never stops. If that doesn't appeal then don't waste you time, do something else with your computer!
 
I started coding in BASIC in 1981 on a Commodore VIC 20. I currently develop iOS apps using Swift.

If you've not done any coding before there is a MOUNTAIN of stuff to learn. And it's not at all like you see "hackers" in the movies. Everything is difficult. Nothing works. It's a hard slog. You will feel stupid. Learning computer programming is really, really hard. So, the fact that you're finding it difficult is just like, yeah, that's right. That's how it is.

However, I learnt to do it and I'm really not particularly clever. Average intelligence probably. If you want to learn, you absolutely can. 100%. I'd say it's roughly as hard as becoming fluent in a foreign language like French.

My advice is this:

  1. Decide on what you want to create. If you want to create apps for iPhone/Android and applications for the Mac/PC pick a rigorous, compiled language like Swift (iOS), Kotlin (Android) or C# (.NET)
  2. If you want to create websites learn HTML/CSS, and perhaps you can then progress onto a scripting language like PHP or Javascript
  3. Find a really good tutorial book and stick with it. Go through it from beginning to end doing all the exercises. Don't be tempted to switch to another cool language because it might be "easier". They're ALL hard
  4. It might take you a good 6 months before you start to feel confident. But that's just the start...
And finally, make sure that you enjoy learning, tinkering and playing with ideas. ALL programmers are constantly learning, experimenting and trying new things. It never stops. If that doesn't appeal then don't waste you time, do something else with your computer!
Hello bud,

I really appreciate the detailed response.

It's nice to know that someone else found it difficult to begin with.

I studies computing at college (89-92) and we started with basic, then moved onto COBOL. however, that was a long time ago, and I've forgotten everything.

I feel like my age is going against me. being 47, by brain isn't like a teenager's anymore. Their brains are like sponges, and they can absorb information relatively easily.

I may persevere a bit more, then decide if it's for me or not. My dream was to learn to develop iOS apps, then to travel the world whilst coding along the way. However, I found Swift to be tricky to pick up. That's why I switch my attention to Python.

Thanks again for your advice.

By the way, which iOS apps have you developed? I'd be intrigued to check them out ...
 
If you want to create iOS apps I'd see if you can try again with Swift. Learning Python will be hard and won't take you in the direction you need.

Why not try and learn Swift (i.e. just the language, not the UIKit/SwiftUI frameworks) using Swift Apprentice from Ray Wenderlich: https://www.raywenderlich.com/books/swift-apprentice/v6.0

That takes you through everything you need to learn.

And being 47 is no barrier. I'm in my 60s and currently learning SwiftUI (a new way of creating iOS/Mac apps)!

If you wanted to check out one of my apps, then "Writerly" (an app for learning creative writing) is my most successful one: https://apps.apple.com/app/writerly/id1143101981?ls=1
 
If you want to create iOS apps I'd see if you can try again with Swift. Learning Python will be hard and won't take you in the direction you need.

Why not try and learn Swift (i.e. just the language, not the UIKit/SwiftUI frameworks) using Swift Apprentice from Ray Wenderlich: https://www.raywenderlich.com/books/swift-apprentice/v6.0

That takes you through everything you need to learn.

And being 47 is no barrier. I'm in my 60s and currently learning SwiftUI (a new way of creating iOS/Mac apps)!

If you wanted to check out one of my apps, then "Writerly" (an app for learning creative writing) is my most successful one: https://apps.apple.com/app/writerly/id1143101981?ls=1
Thanks for the vote of confidence, buddy.

Your time is appreciated.

I'll be sure to check out that book, and I'll also have a look at your app.

Happy coding!

* I just downloaded your app: Very well presented, and fluid. Well done! *
 
Last edited:
I’m also in my 60’s, and still learning this stuff (I started in 1978, and it is still changing). Swift was interesting until about version 3, then I ran away screaming. Probably just me, but I think that language is a mess.

I just program as a hobby and can’t remember half this stuff either, so now I use a scripting language that has documentation that isn’t too convoluted (Ruby), use an off-line documentation browser to find stuff (Dash), and also keep a browser handy to look stuff up (Google, StackOverflow, etc).

You just need to pick a project and do it, whether that is rock-paper-scissors or a first-person shooter (probably better to start small), looking up how to do stuff as you need to (don’t forget to take notes). I think this is the important part - you tend to be a bit more focused and retain more when you have a problem to solve, rather than just wandering around trying to figure out what features a particular language has.
 
Find a really good tutorial book and stick with it. Go through it from beginning to end doing all the exercises. Don't be tempted to switch to another cool language because it might be "easier". They're ALL hard

So much this. You’ll be more productive faster focusing on an end goal, and using the right language for that.

There are really two types of learning involved here. There’s the learning of how to structure logic into code, and how to describe what you want in terms of logic and code. There’s also learning the syntax and grammar of a particular language, and the quirks it adds to how you describe your logic in code.

Both evolve over time. But I’d say that it also means there’s enough commonality between things that you can carry learning in one area elsewhere with some effort. So learning Swift won’t stop you from being able to learn Java/Kotlin later, for example, and will even help you.

It’s a bit like learning a Romance language and being able to ply that knowledge into learning other Romance languages due to the similar background.

But always is it beneficial to be building something you actually want to build. I wanted to see how well Swift worked on Linux, and I wanted to learn how to use a Raspberry Pi to control hardware since I hadn’t done low level stuff in nearly 2 decades. So I built an aquarium light controller in Swift, on a Raspberry Pi. I still use it today.

It also gives you the opportunity to articulate the scope of the problem to yourself. If the scope seems huge, it probably is. Break it down into smaller problems where you can demonstrate things are complete. Test apps and prototypes that prove out one piece of a larger puzzle are my bread and butter when it comes to tackling very large, seemingly intractable projects.

I studies computing at college (89-92) and we started with basic, then moved onto COBOL. however, that was a long time ago, and I've forgotten everything.

Honestly, the mental model of how to build software have changed a lot since then. My father is familiar with COBOL and ALGOL and had issues adapting to C++. It wasn’t so much the syntax, but the difference in the mindset behind the design of modern languages versus early languages. Memory management, libraries, structuring logic (procedural vs object oriented vs protocol oriented), and things like that.

Meanwhile, I dipped my toes into ALGOL a bit when I was younger, and while proficient at modern languages like Swift, C#, etc... I don’t think I could handle ALGOL all that well these days. Modern computing is just too far removed from those days, that while I’d pick up the language easily enough, I would be constantly tripping over myself doing it until I got used to that mental model of how code was expected to work.
 
  • Like
Reactions: The Cockney Rebel
I’m also in my 60’s, and still learning this stuff (I started in 1978, and it is still changing). Swift was interesting until about version 3, then I ran away screaming. Probably just me, but I think that language is a mess.

I just program as a hobby and can’t remember half this stuff either, so now I use a scripting language that has documentation that isn’t too convoluted (Ruby), use an off-line documentation browser to find stuff (Dash), and also keep a browser handy to look stuff up (Google, StackOverflow, etc).

You just need to pick a project and do it, whether that is rock-paper-scissors or a first-person shooter (probably better to start small), looking up how to do stuff as you need to (don’t forget to take notes). I think this is the important part - you tend to be a bit more focused and retain more when you have a problem to solve, rather than just wandering around trying to figure out what features a particular language has.
Maybe I just don't have the passion for it?

I really appreciate your advice, and your tip re focusing on a project.

Thanks, buddy, and good luck with your own journey.
 
So much this. You’ll be more productive faster focusing on an end goal, and using the right language for that.

There are really two types of learning involved here. There’s the learning of how to structure logic into code, and how to describe what you want in terms of logic and code. There’s also learning the syntax and grammar of a particular language, and the quirks it adds to how you describe your logic in code.

Both evolve over time. But I’d say that it also means there’s enough commonality between things that you can carry learning in one area elsewhere with some effort. So learning Swift won’t stop you from being able to learn Java/Kotlin later, for example, and will even help you.

It’s a bit like learning a Romance language and being able to ply that knowledge into learning other Romance languages due to the similar background.

But always is it beneficial to be building something you actually want to build. I wanted to see how well Swift worked on Linux, and I wanted to learn how to use a Raspberry Pi to control hardware since I hadn’t done low level stuff in nearly 2 decades. So I built an aquarium light controller in Swift, on a Raspberry Pi. I still use it today.

It also gives you the opportunity to articulate the scope of the problem to yourself. If the scope seems huge, it probably is. Break it down into smaller problems where you can demonstrate things are complete. Test apps and prototypes that prove out one piece of a larger puzzle are my bread and butter when it comes to tackling very large, seemingly intractable projects.



Honestly, the mental model of how to build software have changed a lot since then. My father is familiar with COBOL and ALGOL and had issues adapting to C++. It wasn’t so much the syntax, but the difference in the mindset behind the design of modern languages versus early languages. Memory management, libraries, structuring logic (procedural vs object oriented vs protocol oriented), and things like that.

Meanwhile, I dipped my toes into ALGOL a bit when I was younger, and while proficient at modern languages like Swift, C#, etc... I don’t think I could handle ALGOL all that well these days. Modern computing is just too far removed from those days, that while I’d pick up the language easily enough, I would be constantly tripping over myself doing it until I got used to that mental model of how code was expected to work.
Really appreciate your lengthy and detailed response: Thank you.

I think the whole thing has just "flopped" on me. I've gone in, thinking I'd follow lessons/guides and everything would make sense ... not so.

I may leave it alone for a little while, then try again. I've been jumping from one book to another, from one course to another and from site to site: All to little progress.

Thanks again for your time, it's much appreciated.
 
Python is a great place to get a feel for the basics: functions/methods, basic var handling, control flow, code structure and organization. You can start with any text editor and a couple of terminal commands, it's interpreted so you don't even have to deal with a compilation phase :)

Avoid getting into any kind of framework or IDE. That's the problem with Swift, is people jump into trying to understand the language basics, plus the iOS SDKs, __plus__ a vastly complex IDE (integrated dev environment). Python is a general purpose language, but if you dig on it, you can always move on to something like a Web Framework for Python, for example, Flask or Django.

Once you learn a decent amount of any language fundamentals, get a few concepts down, switching languages becomes a change in syntax (OK, that's a bit simplified, but I think you get what I'm saying). I can/have/do code in several languages/frameworks, and can pick up new ones, because of my existing expertise. If I've been coding in C#/Swift/Python, I can learn Go or Elixir because I know there's a way to declare a class, instantiate an object, pass parameters, parse a string or date, iterate through some JSON, etc., so I know how to find what I need in the available reference materials.

There's kind of a sweet spot where you learn enough to know what you don't, and how to research, find answers, when first starting, it's kind of hard to know what you don't know so to speak.

My 12 year old is actually taking a "coding basics" class, they started with some HTML/CSS, and have moved on to doing some Python, she's really enjoying it.
 
Python is a great place to get a feel for the basics: functions/methods, basic var handling, control flow, code structure and organization. You can start with any text editor and a couple of terminal commands, it's interpreted so you don't even have to deal with a compilation phase :)

Avoid getting into any kind of framework or IDE. That's the problem with Swift, is people jump into trying to understand the language basics, plus the iOS SDKs, __plus__ a vastly complex IDE (integrated dev environment). Python is a general purpose language, but if you dig on it, you can always move on to something like a Web Framework for Python, for example, Flask or Django.

Once you learn a decent amount of any language fundamentals, get a few concepts down, switching languages becomes a change in syntax (OK, that's a bit simplified, but I think you get what I'm saying). I can/have/do code in several languages/frameworks, and can pick up new ones, because of my existing expertise. If I've been coding in C#/Swift/Python, I can learn Go or Elixir because I know there's a way to declare a class, instantiate an object, pass parameters, parse a string or date, iterate through some JSON, etc., so I know how to find what I need in the available reference materials.

There's kind of a sweet spot where you learn enough to know what you don't, and how to research, find answers, when first starting, it's kind of hard to know what you don't know so to speak.

My 12 year old is actually taking a "coding basics" class, they started with some HTML/CSS, and have moved on to doing some Python, she's really enjoying it.
Thanks a lot, D.T.

Your advice is very much appreciated.

And good luck to your little 12 year old :).
 
  • Like
Reactions: D.T.
I also want to learn to program. I had a book to learn C about 15 years ago, and it was a lot of fun but I forgot everything by now (it was a very basic introduction anyway).

Does someone have a book or a video tutorial about C to recommend? I would love to learn more again.

Or does Apple also have some kind of videos/introductions included in Xcode? I remember following an Apple tutorial for making a currency converter with Xcode and Interface Builder back then. Which was also fun, though that was Objective-C if I remember correctly.
 
  • Like
Reactions: The Cockney Rebel
I also want to learn to program. I had a book to learn C about 15 years ago, and it was a lot of fun but I forgot everything by now (it was a very basic introduction anyway).

Does someone have a book or a video tutorial about C to recommend? I would love to learn more again.

Or does Apple also have some kind of videos/introductions included in Xcode? I remember following an Apple tutorial for making a currency converter with Xcode and Interface Builder back then. Which was also fun, though that was Objective-C if I remember correctly.

One of the BEST free general introductory programming courses around is the CS50 course from Harvard University, taught by Professor David Malan. He teaches the basics of Scratch, C, Python, and the general logic of how computers work, binary code, and some fundamental algorithms used in all computer languages. If you want to understand computer programming fundamentals, I highly recommend this one.

Check it out here: CS50's Introduction to Computer Science

As far as Apple goes, the best thing they have for learning programming is their "Develop in Swift" series of books, available for free at the Apple Book Store:

Book 1: Develop in Swift Explorations
Book 2: Develop in Swift Fundamentals
Book 3: Develop in Swift Data Collections

From what I can tell, the books walk you through everything from learning the basics of Swift through how to use XCode to develop your own iOS apps. And they're written at a high school level, so any reasonably intelligent adult should be able to understand them.
 
As someone who has been completely out for 15 years, I learned:
Rexx (at Home on OS/2) > Pascal (High School on 68k Mac) > Java (High School on PPC Mac) > Borland C++ (College on Windows 2000)

Worked fine for me, but I remember absolutely none of it.

Also played with Modula-2 for DOS on an ancient hand-me-down Mitsubishi computer waaay back (early 90s?). It's what my dad learned in University many years earlier.
 
  • Like
Reactions: The Cockney Rebel
The reason I moved onto Python is because I thought I'd start with something a bit more high level (language) then move on from there. I found Swift to be very convoluted.

If you only gave it a week I would say to stick with trying to learn Swift. If your goal is to develop iOS apps then everything you learn with Swift is going to be helping you get to your goal and can be used to build that app.

Swift is soooo much more beginner friendly IMO than other languages. With C when you're adding to an array you have to be careful not to go past the bounds of the array. And if you want to make the array bigger there's more pain involved. With Swift you just call "arrayname.append", as an example, and you're done.
 
  • Like
Reactions: The Cockney Rebel
1. It’s difficult.
2. It’s going to take repetition and muscle memory
3. The goal isn’t to memorize the language, it is to solve problems
4. You will constantly need to look up syntax or us a good IDE with auto completion
5. If / then, loops, reading and writing data is 90% of coding

This tutorial for iOS app is fantastic. I would say if you can’t follow along to this, programming may not be for you.

It says time to complete is 4 hours. I’d give it a week. Do it in chunks.

 
  • Like
Reactions: The Cockney Rebel
If you want to start simple, try HTML and JavaScript for making web pages. You might check out JavaScript: Absolute Beginners Guide by Kirupa. It’s very helpful and will help you grasp the core concepts of programming. Another good reference is W3schools.com. After you’re comfortable with JS, you can move on to trying Swift.
 
  • Like
Reactions: The Cockney Rebel
I want to teach myself to code.

However, I'm not finding Swift very "friendly," so I've restarted with Python.

If you were starting to learn to code, which language would you go with, and why?

Thanks in advance for any advice/help.
fyi: I teach software development (and other related stuff) as my main occupation

Imo Swift isn‘t a bad language, I find it way easier than quite a substantial number of other languages (C/++); admittedly Python might be slightly easier for but absolute beginners.

That said I‘d still recommend Swift: its not that difficult to start, but tremendously efficient once you get to know it better.
And: as others already mentioned, there‘s Swift Playgrounds. Try it.
It is intended for abolute beginners; lots of different modules for beginners as well as more advanced programmers are available. Its free. Its from the the source of Mac/iOS dev wisdom (Apple), and since iOS programming is your main motivation I‘d go with that.

Most importantly though: its fun (as is Python of course). And that you have to find: Fun! It really is fun to develop, and seriously satisfying to get your stuff to do what you want it to.

Bottom line: Its not all that important what language you use. Much more important is to find a way to make learning playful and fun.
Python and Swift are both great in that regard. For the reasons mentioned I‘d go with Swift/Playgrounds. Of course Python is a good choice too
 
Last edited:
One of the BEST free general introductory programming courses around is the CS50 course from Harvard University, taught by Professor David Malan. He teaches the basics of Scratch, C, Python, and the general logic of how computers work, binary code, and some fundamental algorithms used in all computer languages. If you want to understand computer programming fundamentals, I highly recommend this one.

Check it out here: CS50's Introduction to Computer Science

As far as Apple goes, the best thing they have for learning programming is their "Develop in Swift" series of books, available for free at the Apple Book Store:

Book 1: Develop in Swift Explorations
Book 2: Develop in Swift Fundamentals
Book 3: Develop in Swift Data Collections

From what I can tell, the books walk you through everything from learning the basics of Swift through how to use XCode to develop your own iOS apps. And they're written at a high school level, so any reasonably intelligent adult should be able to understand them.
Hey buddy,

I enrolled on CS50 and watched the first video, which was superb.

Then, I didn't know what to do?

There were no exercises for me to complete, or any information re direction.

The next video was straight onto C, which left me completely lost.

Am I doing something wrong?
 
Avoid getting into any kind of framework or IDE. That's the problem with Swift, is people jump into trying to understand the language basics, plus the iOS SDKs, __plus__ a vastly complex IDE (integrated dev environment).

To be honest, Swift has had a good command-line compiler and package manager for years now. It was required to support Linux, and has always been there on the Mac as well, if not integrated with Xcode until recently. You don’t have to take on all the complexity iOS/Mac development requires just to learn Swift, or use Xcode (beyond the fact that it is the easiest way to install CLI dev tools on a Mac).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.