[Requesting Suggestions] Me, A begineer's first attempt at learning to write "professional" code, using Swift

[Requesting Suggestions]
Me, A begineer's first attempt at learning to write "professional" code, using Swift.

Hi, thank you for taking a timeout from your busy day for reading this post :-)
Please correct if this is posted at a potentially wrong place.

In short

I am writing this [long] post to ask the amazing, swift opensource community to direct a newbie software programmer, me, with a few things that will help me in my initial days with this great opensource general purpose programing language. I would be really greatfull, if you could read through the entire post and help me with best of your knowledge and suggestions.

1. A little bit of my background -

  • I am a recent graduate, completed my BSc. in Computer Applications from Symbiosis International University, India. I have worked as a Senior Analyst - Machine Learning at Deloitte India, naturally i have worked extensively with several 'python libraries' like pandas, sklearn, tf.keras (etc)

Connect with me on Linkedin

  • That being said, for most of my experience I have mostly just re-used packages, followed high-level tutorials, and always learned data science on a 'need-to-know' basis. I did not have an opportunity to learn and write my own software packages, high-quality, "professional" code and the challanges/learnings that come along with them.

2. Why am i here, writing this post ?

  • In my pursuit to dig deeper, i discovered alot of python packages were using c++ under the hood, (for several reasons). Alot of machine learning codebase is essentially c++ wrapped in python.

  • Upon further exploration I found out that the Scientific computing community is plagued with a 2 language problem - https://www.quora.com/What-is-the-2-language-problem-in-data-science.

This was the very reason that led to the project: Swift for tensorflow. But even more interesting is why swift for TF ? why not julia or Rust etc. This post by the google brain team, explains the reason of why swift for tensorflow.

In short the answer was, swift is a really great general purpose programing language, where we can achieve speeds of c and abstraction level of python. Though i was sold on the idea for learning swift after watching a fast.ai demo, by no other than Chris Lattner himself, where he shows, what general purpose swift has to offer, along with its potential.

After watching this AMAZING intro to General purpose swift, i've decided to learn and master this language, not just for using it for data science, but rather as problem solving tool for anything.

3. So where did i start with my first steps in swift ? (Your suggestions would be great on this part)

So now, I went though alot the following resources [overview]

  1. https://swift.org/ - Sections: About, Getting Started, Documentations
  2. Swift on redit, medium, random blogs etc

At this point I would like to ask for suggestions on

  • any/best course on general purpose programing in swift (strictly non apple platforms based development)
  • Official/ Strong-unofficial beginner friendly communities on redit, meduim publications, blogs etc
  • Strong Beginner friendly Github repos
  • Who is who in the swift opensource world - their twitter handles, linkedin etc
  • Open source libs etc

And some point down the line i would love to start contributing on github/ stackoverflow and learn by helping the community to grow.

And once again, thank you for reading this long post and providing your valuable suggestion.


  • any/best course on general purpose programing in swift (strictly non apple platforms based development)

This really depends on your level of knowledge/experience. Most of what would be considered programming or computer science "basics" are pretty language agnostic which you may already have experience using (e.g. control flow, algorithms, OOP, Memory Stack/Heap, etc.).
If you're looking for a general knowledge base and/or refresher, edX and Udemy have some great (often free) courses.

For more Swift-specific knowledge, I'm unaware of many "pure swift" sites but Most iOS/Server focused sites also have resources focussed on the language itself.
My "go to"s are rayWenderlich and HackingWithSwift

As far as personalities/blogs, Swift by Sundell and Erica Sadun are a couple that come to mind.

If you're wanting to find good quality libraries on Github, I'm guessing it will be hard to find a lot of "pure Swift" libraries, but my approach would be to search around and find libraries you'd be interested in using, download them, and look at how they do things. Other than the API Design Guidelines there isn't much of an official or generally accepted way people organize/write their code. Applications/libraries can vary pretty wildly while still being profession and not "wrong". With time you'll develop your own opinions and preferences, but following the lead of the popular open source Swift libraries is a good place to start.


There's also swiftpm.co which is not an exhaustive list of packages, but it contains a pretty decent registry of what's out there.

1 Like

Out of many 'pure' swift intro on the internet here are a few i found really helpful.

  1. A swifty introduction to swift
  • A 20 min. talk by Kaitlin Mahar [senior s/w eng, MongoDB] given at MongoDB World 2018
  • She talks about Optionals, Extensions, Protocols and Generics
  • Explains individuals pieces and beautifully use an single example to demonstrate them together.
  1. Pure Swift Collab Tutorials from Learn section of Tensorflow website
    a) A swift tour
    b) Protocol-oriented programming & generics
    c) Python interoperability

I'll update the post as i find more simple and pure swift tutorials.

1 Like