Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iHorseHead

macrumors 68000
Original poster
Jan 1, 2021
1,579
1,998
Hello,
I just wanted to ask when and how did you start programming? Am I too old for this? I mean I'm 30 and I'd like to get into Swift development and I've been trying to create my own app for awhile now, but I often struggle with Xcode. I've never had such issues with Visual Studio or Unity. With Xcode I really struggle.
It often gives me some random errors and I often have to go to library and delete all the cache and more than once I've had to delete Xcode and reinstall it to get my project to work properly again.
Sometimes when I open a brand new project it's full of random errors, preview isn't working either and I have to clean build a lot. Development with Xcode is really demotivating me and it's difficult for me and I don't really understand whether I'm stupid or it's actually the Xcode.
Very often, like now I have to delete my own project and just start from the scratch. I've made games with Unity and it seemed way easier. Visual Studio and C# seem to be a lot easier as well and ''it just works''.
I kinda struggle a lot with Swift. I don't find it any easier than C# to be honest.

CoreData is a hit or miss as well. Sometimes I get it to work perfectly and a month later I come back to the project and for whatever reason Core Data isn't working anymore etc…

What would be your recommendations to start programming in Swift / Xcode?
It even gets worse when you try to program for macOS. Also, when I look at job ads it seems to be rather difficult to get a job as an iOS, Mac developer as many of them have high requirements. Like experience with Objective-C for a thousand years and Swift. I even struggle to understand Objective-C and nowadays I can barely find any information on Objective-C.
 
  • Love
Reactions: ctjack

casperes1996

macrumors 604
Jan 26, 2014
7,593
5,764
Horsens, Denmark
So I think I wrote my first program in 7th grade? I'm not entirely sure but it was around then. Some simple C++ thing to do exponential growth math equations cause apparently I struggled with that back then :p

I didn't really do it seriously until university though. Made very very trivial and simple things. Though I tended to focus on macOS and iOS development as that was generally where my interests laid. Took a Udemy course on iOS development which I retrospectively feel was **** and glossed over the fundamentals in a way that was hard to use to make anything yourself with, but on the other hand still gave me some building blocks to Apple-specific development.


I took a master's degree in computer science at university and that's when it really kicked in for me. Wrote a lot of code both for uni and spare time, made several programming languages myself, an operating system, made a CPU instruction set and an assembler and emulator for it for fun.

I now work professionally as an iOS developer, in fact getting the job straight out of university. Though it is in a department where I got the job not specifically for my iOS skills but because I am versatile and at any moment could switch to working with Android or web or something else, and have touched Android code written in Kotlin at work too.

We are almost entirely Swift on the platform I work on but there is some Objective-C in there. I cannot competently write Obj-C, but reading it is fine. I can write it too, just not idiomatically I assume :p
I really got into development pretty much at the same time Swift was released - had written a bit before then, but Swift was when I first started properly trying out Apple development.
I don't like Objective-C as a language, and it feels like two separate languages rolled into one competing for space. The C way and the [Objective] way don't feel very well integrated with each other and it feels very tacked on.
However, if you learn to get good at UIKit through Swift, a lot of that knowledge is transferrable to Objective-C. The frameworks are the same anyway - well, learning SwiftUI might not help, but UIKit will. Similarly, CoreData will work the same regardless if you interact with it through Swift or Obj-C.

I definitely don't think you're too old, buddy. I know people who started learning programming when they were 40 and got a job in the industry.

But do you specifically want to be an 'Apple platform' developer? If you prefer C#, you could just continue down that path.

You also do not explicitly need to use Xcode to develop for Apple. If you prefer working through VSCode or Jetbrains or any other tools, you can do that too. Although Xcode makes it easier to push to devices, test and the like.

Xcode can frustrate me at times too, although I don't struggle with the specific things you mention, but Xcode can be slow and especially Xcode 15 has a tendency to give UI glitches and the LSP just stops every now and then for minutes at a time. But overall I do like working with it. It sure beats Android Studio :p
 

Red Menace

macrumors 6502a
May 29, 2011
583
230
Colorado, USA
30? pfft. I have shirts older than that.

I guess I was lucky in that I started way back in ancient times, when about the only thing available was assembly language or BASIC.

Xcode has always been problematic. Apple tries to throw the new shiny into every version, and wants to keep everything in one gigantic app for whatever reason, so it winds up like some evil version of Jenga. Your experience with Swift is also not unique; it started out okay but with every new version more crap was added, until we get to the "guess what you need to put here that doesn't show an error" language we have today. The resulting combination is less than optimal, and probably the reason a lot of programmers quickly start looking old and what little hair they have left is gray.

A new(er) programmer also has to deal with the three things happening at once - you need to know the language, the development system, and the API, each of which has its own quirks and can take a while to be proficient.

At this point I'm thinking that all this is an attempt to weed out those that are not serious about programming, as the alternative doesn't inspire much confidence. But what do I know, I'm just an old guy slowly going bald.

There are other languages that you can use, even some of the higher level languages such as Ruby or Python have compilers available. You also don't need to use an integrated development system, so if Swift/Xcode gives you a headache, just take a look around and see if something else is to your liking.
 

mfram

Contributor
Jan 23, 2010
1,353
396
San Diego, CA USA
I don't like Objective-C as a language, and it feels like two separate languages rolled into one competing for space. The C way and the [Objective] way don't feel very well integrated with each other and it feels very tacked on.

You already know the answer: C wasn't designed as an object-oriented language. But it's easy to use and portable. Thus why it became popular. Then in the 1970s and 1980s the object-oriented programming paradigm became the "next big thing" so people wanted to add object-oriented features to C. Objective-C and C++ were two different ways of accomplishing that goal.
To me, C++ also feels very tacked on. But in order to try and make it more integrated into the language they had to make it really, really complicated with features like embedded types, overloaded operators, overloaded function prototypes, and eventually function lambas, etc. You end up with the huge complicated monstrosity that's become modern C++.
Objective-C didn't try to "embed" itself in the language. Instead they kept the object-oriented parts a separate part of the language. It even has a unique syntax; it's obvious when you're doing OO stuff and when you're not. It's much less complicated. But I like it because it doesn't have all the crazy type conversion and performance complexities of C++. Objective C is a more dynamic OO implementation.
Both designs have tradeoffs with the ultimate goal of tacking on object-oriented capabilities to a non-object-oriented language like C.

As for the O.P., I agree that Xcode is a mess. Every time a new version comes out I have go back and change things just to get my previous programs to compile. You don't know if its because of bugs in Xcode or just general Apple Developer "we've moved on" decisions. Apple has proven that backwards compatibility is not a priority in their corporate culture for better and for worse.
 

Iwavvns

macrumors 6502a
Dec 11, 2023
654
915
Earth
I started programming decades ago on a Commodore 64, then I went on to learn how to write entire webpages in Microsoft notepad when the internet took off. I got such a kick out of that that I learned other programming languages. No, you are not too old for this.. I am 60 years old and I still program, though these days it’s in Python and JavaScript.
 
Last edited:
  • Like
Reactions: iHorseHead

casperes1996

macrumors 604
Jan 26, 2014
7,593
5,764
Horsens, Denmark
You already know the answer: C wasn't designed as an object-oriented language. But it's easy to use and portable. Thus why it became popular. Then in the 1970s and 1980s the object-oriented programming paradigm became the "next big thing" so people wanted to add object-oriented features to C. Objective-C and C++ were two different ways of accomplishing that goal.
To me, C++ also feels very tacked on. But in order to try and make it more integrated into the language they had to make it really, really complicated with features like embedded types, overloaded operators, overloaded function prototypes, and eventually function lambas, etc. You end up with the huge complicated monstrosity that's become modern C++.
Objective-C didn't try to "embed" itself in the language. Instead they kept the object-oriented parts a separate part of the language. It even has a unique syntax; it's obvious when you're doing OO stuff and when you're not. It's much less complicated. But I like it because it doesn't have all the crazy type conversion and performance complexities of C++. Objective C is a more dynamic OO implementation.
Both designs have tradeoffs with the ultimate goal of tacking on object-oriented capabilities to a non-object-oriented language like C.
Absolutely. I also dislike C++. Pure C is elegant and consistent. C++ is a cluster****. Though I do think C++ had the potential to be lovely and lean if the committee dared make some bold breaking changes.
That said even as is I do prefer C++. It would have been interesting to see what objective C could be without C. Simply Objective if you will. Cause I also feel like a lot of decisions were made in the OO side of the language to not conflict with C syntax that makes it an uglier and harder to use language. Some say syntax doesn’t matter and it’s more about semantics. But if we take that to the extreme we would need special keyboards for each language unless we want to bring up the character picker every time and that’s not pleasant either, though APL folks might disagree :p
In some sense the clear separation with objective C helps readability. You know what to expect from things. Will it be dynamic or static dispatch. In other ways it just adds a lot of cognitive load to parse. At least it still does to me.

Both definitely follow the principle that complex things should be possible. I believe neither follows the principle of simple things being simple
 

iHorseHead

macrumors 68000
Original poster
Jan 1, 2021
1,579
1,998
So I think I wrote my first program in 7th grade? I'm not entirely sure but it was around then. Some simple C++ thing to do exponential growth math equations cause apparently I struggled with that back then :p

I didn't really do it seriously until university though. Made very very trivial and simple things. Though I tended to focus on macOS and iOS development as that was generally where my interests laid. Took a Udemy course on iOS development which I retrospectively feel was **** and glossed over the fundamentals in a way that was hard to use to make anything yourself with, but on the other hand still gave me some building blocks to Apple-specific development.


I took a master's degree in computer science at university and that's when it really kicked in for me. Wrote a lot of code both for uni and spare time, made several programming languages myself, an operating system, made a CPU instruction set and an assembler and emulator for it for fun.

I now work professionally as an iOS developer, in fact getting the job straight out of university. Though it is in a department where I got the job not specifically for my iOS skills but because I am versatile and at any moment could switch to working with Android or web or something else, and have touched Android code written in Kotlin at work too.

We are almost entirely Swift on the platform I work on but there is some Objective-C in there. I cannot competently write Obj-C, but reading it is fine. I can write it too, just not idiomatically I assume :p
I really got into development pretty much at the same time Swift was released - had written a bit before then, but Swift was when I first started properly trying out Apple development.
I don't like Objective-C as a language, and it feels like two separate languages rolled into one competing for space. The C way and the [Objective] way don't feel very well integrated with each other and it feels very tacked on.
However, if you learn to get good at UIKit through Swift, a lot of that knowledge is transferrable to Objective-C. The frameworks are the same anyway - well, learning SwiftUI might not help, but UIKit will. Similarly, CoreData will work the same regardless if you interact with it through Swift or Obj-C.

I definitely don't think you're too old, buddy. I know people who started learning programming when they were 40 and got a job in the industry.

But do you specifically want to be an 'Apple platform' developer? If you prefer C#, you could just continue down that path.

You also do not explicitly need to use Xcode to develop for Apple. If you prefer working through VSCode or Jetbrains or any other tools, you can do that too. Although Xcode makes it easier to push to devices, test and the like.

Xcode can frustrate me at times too, although I don't struggle with the specific things you mention, but Xcode can be slow and especially Xcode 15 has a tendency to give UI glitches and the LSP just stops every now and then for minutes at a time. But overall I do like working with it. It sure beats Android Studio :p
Hello again!
Thank you so much for your reply.
I've been actually trying to get into Mac development using Swift for years, but I've actually always given up. The Udemy courses I've bought were either too confusing or outdated and my programming teachers that were using a Mac didn't help me either when I once showed them my code.

It's not that I prefer C# specifically, but the university classes and bootcamps I've taken have only taught us C# and when I took game development classes we were taught only Unity in there and C#. To be frank with you, C# seems easier and it makes more sense and I haven't ran into as many issues as with Swift and Xcode specifically. In all honesty, when I look around the Mac App Store it seems to be kinda empty and there are still apps out there that haven't been updated for 5 years and are still on top sold apps and I kind of bought MacBook to learn Xcode and Swift specifically, but it hasn't been going that great, but I do have an app idea, which I believe I can do better than others and I'd like to create something that I'm proud of and something that works well on an iPhone as well as Macs and iPads, but the Xcode has been acting up lately. I think Xcode works worse now than it did 2 years ago and most importantly, I want to create an app that I would use myself. Also, I'd like to change my jobs in the future, since I really can't handle 12 hour shifts that well and we always get so much extra work. I currently work in IT Support and believe it or not, it can be exhausting and I feel like I need a change in my life sooner or later. Of course, programming is very stressful and it isn't easier at all and at best it'd be nice to have extra-income (that is if I get lucky that is).

The last time I used Android Studio must've been back in 2015.

Your story is interesting, but unfortunately I wouldn't be able to even go to a Bootcamp, since I work such long shifts and am often exhausted and school requires a lot from you. I tried that awhile back and it simply was not just possible and work comes first, since I have to pay my bills. I've learned coding before, but I've had such big caps and even now that I've noticed when I have big caps I have to start everything from scratch and re-learn things. I have no idea how some people manage to do this.

I'm proud of you anyway and you're really intelligent. I'll never be as intelligent as you, but I'd sure be proud of myself if I could release something someday and move on from there.

Thanks a lot for your help and Happy New Year! :)
 

casperes1996

macrumors 604
Jan 26, 2014
7,593
5,764
Horsens, Denmark
Hello again!
Thank you so much for your reply.
I've been actually trying to get into Mac development using Swift for years, but I've actually always given up. The Udemy courses I've bought were either too confusing or outdated and my programming teachers that were using a Mac didn't help me either when I once showed them my code.

It's not that I prefer C# specifically, but the university classes and bootcamps I've taken have only taught us C# and when I took game development classes we were taught only Unity in there and C#. To be frank with you, C# seems easier and it makes more sense and I haven't ran into as many issues as with Swift and Xcode specifically. In all honesty, when I look around the Mac App Store it seems to be kinda empty and there are still apps out there that haven't been updated for 5 years and are still on top sold apps and I kind of bought MacBook to learn Xcode and Swift specifically, but it hasn't been going that great, but I do have an app idea, which I believe I can do better than others and I'd like to create something that I'm proud of and something that works well on an iPhone as well as Macs and iPads, but the Xcode has been acting up lately. I think Xcode works worse now than it did 2 years ago and most importantly, I want to create an app that I would use myself. Also, I'd like to change my jobs in the future, since I really can't handle 12 hour shifts that well and we always get so much extra work. I currently work in IT Support and believe it or not, it can be exhausting and I feel like I need a change in my life sooner or later. Of course, programming is very stressful and it isn't easier at all and at best it'd be nice to have extra-income (that is if I get lucky that is).

The last time I used Android Studio must've been back in 2015.

Your story is interesting, but unfortunately I wouldn't be able to even go to a Bootcamp, since I work such long shifts and am often exhausted and school requires a lot from you. I tried that awhile back and it simply was not just possible and work comes first, since I have to pay my bills. I've learned coding before, but I've had such big caps and even now that I've noticed when I have big caps I have to start everything from scratch and re-learn things. I have no idea how some people manage to do this.

I'm proud of you anyway and you're really intelligent. I'll never be as intelligent as you, but I'd sure be proud of myself if I could release something someday and move on from there.

Thanks a lot for your help and Happy New Year! :)

Not everyone needs to take the same road to success. My story doesn't need to be yours to get to a similar point :)

The Mac App Store is not where most Mac apps are distributed. While the App Store is key to success on mobile platforms, the desktop is still predominantly ruled by vendor distribution, or for games, Steam, Epic and GOG.
I would not look to the Mac App Store and I would barely have it under consideration for distribution - iOS is different, but on the Mac you might as well distribute yourself.

For Swift I can highly recommend Paul Hudson on YouTube and his HackingWithSwift website and books. More than anything I recommend learning software engineering patterns and architectural fundamentals. I believe that if you understand that at a deep level, all programming languages become a lot easier to learn and transition between. When you look at a concept and can just go "Ah, and observer pattern". "Ah, a strategy pattern". "Ah, a state pattern", and so on. Spend some time writing pure OO, pure C procedural and pure functional - then armed with the thought processes required for each pure pattern, architect around what makes most sense for each specific situation. Learn data structures so you understand the trade-offs at play when picking a hash map versus an array versus a tree structure.

That sort of knowledge transcends languages.

But if you're comfortable with C#, just use C#. I believe Xamarin still exists in some form though maybe under a new name, so you can use it for iOS apps too if you so desire.

If you want to learn more Swift, feel free to send me code if you want opinions, review or help with anything particular. If you want you can DM me and get Discord or whatever too. Happy to help where I can. But while you'd probably want to know Swift to get a job as an Apple developer (and probably some basic Obj-C), it might be easier to get C# based jobs in your area working with Blazor for web or something if that's what the systems generally train for. Or maybe you can carve a niche with less competition by becoming a master at something that there's maybe less demand for but also less market supply. Above all I think it's just important you find it fun and enjoyable, especially if you have to do it on your own time after work. Don't kill the spark :)
 

robertosh

macrumors 65816
Mar 2, 2011
1,140
962
Switzerland
I have a computer science background (master degree) but due to my career path (more DevOps oriented) I never had to to a big development thing (but I had the knowledge). But, few years ago (2021) I started developing a SwiftUI game after following the amazing Standford online swiftui course. It was my first approach with Xcode/mobile/game development and I struggled a lot to get the things done. Specially with CoreData, as my game uses a rather large DB (57 entities) and was hard to find good tutorials on that regard (most YT videos are just teaching simple relations, etc). In fact I'm still developing that game today, almost 3 years of work :D :D but I quite proud of it and it's almost ready for TestFlight. Now I feel quite confident with SwiftUI, as I did everything myself without using any external library. CoreData is still a bit mistery to me, but at least I know how to make things that do not break, do things in the background, etc. As long as you do not mess with the different contexts, you are fine. XCode well, is not the best IDE but having the simulator is really useful. I'm sure that many things are not done in the proper way, but I'm more than happy of what I've achieved (there were A TON of hours from my free time though).

Keep going, at the end things get more easy and it's quite enjoyable visualizing an interface and just start coding SwiftUI and get exactly that.
 
  • Like
Reactions: iHorseHead

lloyddean

macrumors 65816
May 10, 2009
1,047
19
Des Moines, WA
I recommend locating like minded developers in your area who are willing to share knowledge and exchange ideas.

The librarians at local public libraries and colleges are often aware of computer development clubs, and similar resources, that they may be able to point you at.
 

MisterSavage

macrumors 601
Nov 10, 2018
4,841
5,739
OMG, you're 30. You're not even remotely too old to learn a new skill.

SwiftUI Previews can be finicky. I know some devs that swear by them and some that comment them out and don't deal with them.

CoreData has a complement (notice I didn't say replacement) called Swift Data you could look into learning.

There are plenty of free courses such as the Stanford course, the 100 Days of SwiftUI, etc.
 
  • Like
Reactions: iHorseHead

Senor Cuete

macrumors 6502
Nov 9, 2011
429
31
This was a thread about when you started programming but has been hijacked to be a referendum on Languages and IDEs.

I started programming because I was a surveyor and RPN calculators like the HP 41-C were a huge leap forward for us because we could do complex math/trigonometry in the field but there wasn't enough software out there so you often wrote your own. This was true of the Mac as well. Then it was much more common for you write software that you needed. I started programming the Mac with C. At that time there was no OOP so you would have to write things like an event handler in your program. When XCode came out with Objective C this was a great leap forward but learning XCode and Interface builder was a huge task. Objective C was just a small group of extensions that made it so you could C for OOP and you could literally learn it in a few hours.

Now as noted, Apple has combined XCode and interface builder and applied the more features is always better approach to turn XCode into a bloated mess. This is a common problem with software for everything: add every conceivable feature until the program is horribly complex, full of bugs and impossible to use.

Swift was going to be a great language, clear, concise and expressive and easy to use but now it has fallen victim to the above software philosophy. It's a mess and contains horrible syntax like implied typing, ambiguous dot notation, etc. var myVar = someObject.something. What does this even mean? Operator precedence - use a lot of parentheses to be sure it works right. Integers? Are these objects with properties? Arrays? Forget it they were just too scary to the guy inventing Swift. This segues into the only thing that Swift actually does. It prevents stupid programmers from making some stupid mistakes, at the expense of clarity and performance. An experienced programmer would never make these mistakes and the llvm compiler and the static code analyzer would catch them during development so the safety features of Swift were never needed anyway. Swift runs 80% faster than Objective C. Sure, I believe that and I have some land in Florida you should invest in too.

Someone is always trying to make programming a no brainer but it will never happen. It will always be a brainer.
 
  • Like
Reactions: iHorseHead
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.