Where to begin for Swift

Discussion in 'iOS Programming' started by Dj64Mk7, Jun 2, 2014.

  1. Dj64Mk7, Jun 2, 2014
    Last edited: Jun 5, 2014

    Dj64Mk7 macrumors 65816

    Sep 15, 2013
    EDIT 2: I found "Start Developing Apps Today." There are versions for both OS X and iOS. I know that both OS's are programmed with Obj. C, but I don't know which tutorial to do first. Which one would be the better stating point, iOS or OS X?


    EDIT: I'm sorry if this wasn't clear from the start, but here's what I meant from my original post:

    Which programming language (or resources like courses, books, etc.) should I start with so that I have a good foundation for Swift and/or Obj. C? Not necessarily a powerful or easy to learn language, but one that can ease me into the art of programming gradually.


    Original post:

    I'm an aspiring programmer, who's just starting to code. I'd really like to get into iOS development sometime. Where do you suggest that I start? I don't really have any programming experience, but I do have a tiny bit of experience with some very basic HTML.

    Any help is greatly appreciated! Thanks.

    P.S. - While we're all in the WWDC mindset, I'll mention that if you can Write the Code, you can Change the World.
  2. MICHAELSD macrumors 68040


    Jul 13, 2008
    I'm sure you know this already but the only documentation available are the resources provided by apple on iBooks and the Xcode site.

    Not to hijack this thread, but how long would it take someone with no programming experience to learn Swift fluently enough to code without a guide? I'd assume hundreds of hours. This seems like a good time to start since swift should be around for 5-10 years at least unless it flops (unlikely.)
  3. TallManNY macrumors 601


    Nov 5, 2007

    I'm not a programmer, so take this with a healthy dose of salt. But I do think we are shifting to a post-PC world. I suspect that already a significant percentage of the applications used today are on the iOS platform. Sure Windows is the dominant form. But how many people in this world use their Windows PC at work to use Word, Excel and send email with Outlook, but then spend the rest of their day using Apps on their iPhone? I suspect the folks that this basically describes in the 100s of millions. And it is the most affluent 100s of millions.

    If you want to influence the world, write the next version of Word. 100s of millions will use your program. But assuming you find that boring (and also you suspect Bill Gates won't share the profit from Word 2018 with you), then I would learn to program iOS Apps. And if Swift makes it easier to program iOS Apps and everyone is starting from scratch on this language, then this is a literal gold rush. Get the book and get coding.
  4. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    Without a guide? Care to elaborate?

    Anyways, it seems clear to me that this single Swift book is not intended for people with no programming experience. There are concepts very early on that, I feel, it just assumes you have prior knowledge of.
  5. MattInOz macrumors 68030


    Jan 19, 2006
    No need to write the next Word, you could concentrate on just the mundane tasks computers promised so much to help us with but instead we got Word and new frustrations. 20 years of main stream computing and it seems all that time has been spent picking off the fun parts of the working and adding more mundane distraction.
  6. MICHAELSD macrumors 68040


    Jul 13, 2008
    I have no tangible fluent programming experience so I assume I'd have to use guides and documentation for quite a while before I can open Xcode and just start toying around with getting mechanics down for an app; although each type of app is a completely different ballpark of possibilities and potential issues. How long in the process can you start making apps without consulting documentation, etc. (unless issues arise)?


    A gold rush implies profitability; an easier programming language does not alter the potential profitability of a market. There could certainly be more people vying for a spot in a segment of the App Store, although I don't believe a new programming language with (for all intent-and-purposes) the same end result as Objective-C is equatable to a gold rush. Was wondering where you were going with that analogy?
  7. sfwalter macrumors 68000


    Jan 6, 2004
    Dallas Texas
    I really wish they would have called it something else. I don't have anything wrong with the name "Swift" but there's already minor obscur language called "Swift" used for parallel processing.

    When they first announced it I did some Googling and found this http://swift-lang.org/main/ which is not the same.

    I think its just going to cause confusion.
  8. TallManNY macrumors 601


    Nov 5, 2007
    With gold rush I was thinking that there are going to be rewards for those who master Swift quickly. I'm assuming that it is significantly easier to use than Objective-C (which is quite old, I understand). If it isn't easier, then there is no point. But let's assume Apple knows how to improve on Objective-C significantly. If that is the case, then new and more powerful Apps will become viable. iOS continues to grow and the A7 chip is an undertapped powerhouse. There is a tremendous amount of iOS users and I suspect we will continue to see significant growth year over year for the foreseeable future. As Swift allows better Apps to be made faster, iOS will get a further advantage, perhaps leading to further adoption growth. And don't forget the tablet market. I believe that has huge growth potential.

    So if you can master Swift, and that makes you a faster programmer than folks using Objective-C, and you are programming for what may quickly become the OS used the most by the most affluent people in the world (once you set aside Windows devices that are used nearly exclusively for Office Suite programs), then I think the potential for profit becomes huge.

    Yes, you need ideas for your App. That is the main gating issue with any programming language. But I suspect a new programming language is going to open up and suggest new programs and there will be some absolute mega hits coming out of those Apps. It might be Flappybird or it might be SnapChat. But I'm pretty sure some folks are going to learn Swift and become very rich.

    And on a lesser scale, every development shop will want to have folks who know Swift. So it might just get you a programming job.
  9. Dookieman macrumors 6502

    Oct 12, 2009
    I doesn't work like that. Apple thought they needed a newer, more modern language that builds off the advancements of other languages, so they did.

    Swift won't open the door to new types of applications, it's just a language. Anything you could write in Swift, you can write in Objective-C, it may make things a bit easier/harder depending on the task.

    I feel the transition to Swift will be slower then what you're expecting, there are a ton of programmers out there now that are comfortable making apps using Objective-C, so that's what they'll use. Companies may want an app out ASAP and transitioning to Swift may not be the quickest way to achieve that since the language is approximately 24 hours old.
  10. TallManNY macrumors 601


    Nov 5, 2007
    I'm not a programmer, so I'm probably wrong. But if this new language makes certain things easier and faster, then I suspect that will push toward or inspire new Apps. I'm pretty sure that the feasibility of programming solutions has a large influence on what programs are actually developed.

    The language is new and won't be useable until iOS 8 comes out, I think. But if it is a significant improvement, then one had best get cracking to learn it. Sure in six months the Objective-C programmer might be just as fast as the Swift programmer. But what happens when the Swift programmer has a year's experience at Swift? Will he be significantly faster? Does the Objective-C programmer then start learning Swift to compete against the programmers who now have a year's head start? And if you are worried about that result, then you are probably downloading the Swift book now and thinking that this might be a good portion of your weekends for the next few months.
  11. Dookieman, Jun 3, 2014
    Last edited: Jun 3, 2014

    Dookieman macrumors 6502

    Oct 12, 2009
    Easier is a relative term. What do you mean by "faster"? Faster at coding? Having an app perform faster? Objective-C is plenty fast for most tasks, so I'm confused what you mean.

    Like I said, there is nothing that Swift can do that Objective-C can't, it's just a different language.
  12. TallManNY macrumors 601


    Nov 5, 2007
    I mean faster at coding and debugging; hours worked until product is ready to be shipped. If the Swift programmer can complete the App in 100 hours of work that it takes the O-C programmer 150 hours of work, then there is a huge advantage. The product can ship sooner or it can have another 50 hours of features in it.
  13. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    You've left out individual programmer productivity. Not all programmers are equally productive. In fact, there's probably more variation in the productivity of commercial programmers than any other profession I can think of. I've seen enormous differences in practice, easily 20:1, and pretty consistently in excess of the 10:1 range.

    Also, production of code alone isn't a useful measure. Production of reliable code is the correct measure. Someone can spend design time up front, with little to show for it halfway to the deadline, while someone who's "75% done" at the same point ends up being late to the deadline.

    Language has a bearing on reliability, but so does design, experience, testability, and other factors. And that's not considering the individual differences.

    The classic book on this is "The Mythical Man-Month". It's worth looking into, not least for all its successors.
  14. Dookieman macrumors 6502

    Oct 12, 2009
    Like Chown33 said, it doesn't work like that. It depends on the person and the up front work/design. There could be someone who can pump out an app in Objective-C in 3 days and a Swift programmer in a week. The language has little to do with productivity or completion rate.
  15. TallManNY macrumors 601


    Nov 5, 2007
    So do you think Swift will only be slowly adopted or perhaps not at all? Objective C isn't being dropped. So everyone can keep using it. So I guess you are saying that even if Swift is fast, a good programmer might feel that they are "fast enough" in Objective C and not want to go through the effort of learning a new language.

    Do you think that students will start learning Swift in school?
  16. Dookieman, Jun 3, 2014
    Last edited: Jun 3, 2014

    Dookieman macrumors 6502

    Oct 12, 2009
    Swift will be adopted and Objective-C will still work, correct. Programmers will learn Swift because Apple will be focusing on that in the future to create new Mac/iOS applications.

    I think you are still confused by the meaning of "fast". When Apple says Swift is fast, that aren't referring to coding time, they are referring to app execution, such as sorting an array or performing a mathematical equation. C/C++/Assembly is also very fast in code execution.

    I have no idea, if students will learn Swift in school. I doubt it, most CS programs I've seen focus with C languages or Java, but the same concepts can be brought over to any language.
  17. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    That seems unlikely except in one case: if the class being taught is specifically about iOS programming. Even if the class is about Mac programming, there's already a variety of languages for OS X, so Swift would just be another one.

    Education is notably slow in adopting new languages for teaching programming. It took them years to switch to teaching with Java. It will take them additional years to switch again, but only if there were a compelling reason. Absent such a reason, they won't switch.

    And they won't switch to Swift unless it's multi-platform (which Java and its edu predecessors are). That could happen, since the 'clang' compiler is what compiles Swift (AFAIK). But until there's also runtime support across platforms, Swift is an Apple-only language.

    If you want an existing example, look at C#. It's a Microsoft-only language for most practical purposes, it isn't taught in schools except for Windows-oriented programming classes, and Microsoft is who determines what happens to C# (features, additions, deprecations, etc.). Replace C# with Swift, and Microsoft with Apple, and it's the same story with different players.
  18. crossi81, Jun 3, 2014
    Last edited: Jun 3, 2014

    crossi81 macrumors member

    Aug 13, 2012
    To be honest, Apple own guide is pretty easy to understand, even if you don't have prior knowledge of Obj-C. It helps, too (and knowing things like Javascript helps even more, but still :) ), but I think people should have AT LEAST a basic familiarity with basic programming concepts like control flow (loops, conditional statements, and so on), class, methods, inheritance... before starting with Swift.

    Start point:

    Edit: MAIN starting point (Apple official guide)
  19. thekev macrumors 604


    Aug 5, 2010
    Students do a lot on their own time, but most schools use primarily C++ or Java for the majority of their curriculum. Certain courses naturally lend themselves to other languages such as C or occasionally Fortran.
  20. 1458279 Suspended


    May 1, 2010
    Suggesting that an easier language will lead to better apps or a gold rush is false.

    Imagine if the made English easier, all that means is that more people can speak it or more can speak it with less learning. It doesn't mean the poems and novels will be better.

    The language is only ONE aspect of a profitable app. What does this do for marketing, design, graphics, support, idea creation?

    IIRC, they said there are 9 million developer accounts and 1.2 million apps. So nearly 9 developers for each app? ... and somehow we need MORE developers? ... and making the language easier is going to lead to higher quality?

    If a programmer is not willing to take the time/effort to learn ObjC then what makes us think that they ARE willing to put forth the effort to design great graphics or outstanding apps?

    Do outstanding apps come from less dedication, less effort? Sometime, yes, but do we really need another million flappy bird re-skins?

    More apps in the app store won't lead to another gold rush from the apps. Will people be able to handle 10X more apps on their phone? _IF_ someone were to fit 10,000 apps on their phone, would they have enough time to spend using each app to see enough ads to make each one rich?


    The market is beyond flooded with garbage apps, scam-n-spam. Apps have become the new pop-up ads. Remember, few got rich in the gold rush.

    The app store has had a massive race to the bottom, free apps are far more common and it's near impossible for an app to be noticed without heavy marketing.

    Apple just made things worse for developers because the LAST thing we needed was more apps by people not willing to learn a hard language. What happens when we have 20 million apps in the app store? What about 100 million apps each written in 1 hour.

    Why would a quality developer bother spending a year on an innovative app when they could just toss out a re-skin? What happens when business say "I can have that app written in 1 hour by someone overseas for $3"

    This is going the way of the web in the late 90's ... everyone put up a website and rushed after all the .com names. How many of them were hits?

    How many different website do you visit each day? What about the 99% of the web you've never seen?

    ... The bottom line is there are a very very small percentage of web pages that most visit. You could kill off 1/2 the internet and most people would never know the difference.

    How many forums do you go to each day? 10... 20...? How many tweets do you follow? 100... 10,000... Do you have enough time to read thru 10,000 tweets every day?

    Point, the market is beyond flooded, don't expect this to lead to a gold rush. We don't need every man, woman, and child on the planet to be an app developer...

    Do a google search on some popular subject and then go thru each and every page google found in that search... not enough hours in the day... only the 1st few pages matter, the rest go unseen.

    What if that same google search got 10 million pages... would 10 trillion pages help make the search better?
  21. TallManNY macrumors 601


    Nov 5, 2007
    Hmm. Well let's see. I do think we are headed to the post PC world. I will not be surprised if iOS devices in use reach a billion by the end of the decade. Actually, I will be surprised if that is not the case well before the end of the decade. Also, while PCs will still be the more numerous, the vast majority of those PCs will be work related with limited uses focused on the job at which they are installed.

    My assumption is that basically EVERY computer science major in school kind of wants to be the guy who programs the next Snapchat. Well maybe the guys who want to make the next Call of Duty don't. But lots of folks do want to make the next great App. That App will get created first for iOS. If Swift is the faster way to get the App shipped, I think folks will gravitate to it. Once the App is shipped on iOS and has become a success, the port to Android is just a process. It might be harder because you started with Swift, but I assume it is still going to be very doable.


    Well programming is very hard, so I suspect it constrains App development.
    The "developers" numbers are just filled with folks who want access to the beta program. I'm a developer just so I could use iOS 7 when it was in beta. It cost $100 and it looked cool showing off the new OS for a few months.

    But making programming easier should lead to higher quality. I assume application development is a constant dialogue between the idea folks and the programming folks with one saying "can you do this?" and the other saying "no, I can't program that (not within the time I have to implement or the resources of the devices), but I can program something close to it." A faster programming language will result in less no's, right?
  22. chrono1081 macrumors 604


    Jan 26, 2008
    Isla Nublar
    Psst, there's no such thing ;)

    Sure many people learn the basics of a language and can often use it without reference, as well as some of the more major points of an API but in reality a lot of development time is spent referencing documentation.
  23. Zwopple macrumors regular

    Dec 27, 2008
    I'm a seasoned Objective-C developer having started back when the first iOS SDK was announced and having several years programming before that in ActionScript 3.0.

    Good software developers take years to hone their skills in new languages. Swift is going to be no different, while faster to learn and adopt it will take time to build highly reliable and efficient code.

    Developers vary a ton in skill and passion and nothing is more detrimental to a business than a bad developer as poor decisions can take years to rectify in some apps.

    How fast you can write code is completely irrelevant as more code just means more mess to sort through and more potential for bugs. Swift gives us a huge amount of power to write less code and accomplish the same thing which is great.

    As far as learning it goes, for new developers I always recommend finding a simple idea and building it to production. Tutorials and books often go over very many pieces of the language but rarely are a guide for a complete app start to finish. At the end of the day if you want to transfer the skills to your career you'll need to know how to write production quality apps.

    On the other side, if you don't have a solid background in design patterns for programming any popular book in any language around design patterns is of huge importance!

    Good luck! We're all starting off at nearly ground zero.


    I'd say most seasoned developers spend a huge portion of their time testing and debugging. Documentation is referenced a fair amount but compared to say Ruby or Python it's referenced far less as we can thank good code completion in the IDE for that.

    For new developers to Cocoa/Cocoa Touch I feel your pain, it takes awhile to really learn the standard views and view controller API's. Once you get them down pat you can easily code up a large portion of apps without touching the docs though.
  24. atrevers macrumors regular


    May 24, 2007
    Possibly, but when you look at obj-c compared vs Java or C# vs Swift, Java and C# are much closer to Swift and therefore (by your definition) "faster" than obj-c. Are apps developed for Windows Phone or Android higher quality than their iOS counterparts? I don't think so - and the reason for that comes back to points raised earlier in the thread, i.e. productivity of the developer is far more important than how many lines of code it takes to produce a result.

    Also, the cynic in me says that a faster programming language won't lead to fewer "nos" - developers are inherently lazy (I'm allowed to say that - I am one; also, laziness in developers is a good thing) and will be wary of setting higher expectations to clients / employers. If expectations are set higher, then deadlines will be brought forward and timescales shortened resulting in quality remaining the same or even dropping.
  25. Zwopple macrumors regular

    Dec 27, 2008
    What's unfortunate is that most computer science grads are also the worst programmers. These days they teach these kids a bit of C and a bit of Java and a whole hell of a lot of theory which is really unfortunate. Computer Science though really is just as it says the science of computers. Programming is not a science, it's a skill just like plumbing or any other trade skill and self taught, apprenticeships and trade schools are much more geared towards skilling up programmers.

    Programming takes years to learn regardless of language, so yes it is hard. Most constraints come down to time and budget, a lot of the reason isn't because of how long the code takes to write though and more so about how long the research and thinking to ensure reliable code is written. Swift will help in some areas, mostly it will reduce time spent debugging I reckon as it's a much much safer language than Objective-C. Still it's not going to greatly change how long it takes to write a lot of things.

Share This Page