Learning Swift — Day 165

AP Computer Science Principles with Swift

1.4 Playground Basics

This will be a good, and hopefully quick, review.

We should open the “PlaygroundBasics.playground” file and complete it.

The first 6 pages were almost ridiculously easy and at the same time filled with that Apple prosaic rhetoric that you either love or loathe!

The only interesting part, i.e. something I had never seen before, was the page on binary numbers:

…and this:

… and this is my birth year (oh goodness, I gave away my age!!)

At the end of this unit we encounter a more precise definito of bit:

A bit is the most basic element of digital data. Bits are represented in a computer using the values 0 and 1. By combining bits into groups and stringing them together, computers can represent any concept—from numbers to text to more complex data like vide.

1.5 Naming and Identifiers

From the introduction to this chapter I recognised some of the exercises I had done more than one year ago when I started reading, for pure fun, the book Intro to App Development with Swift. I am quite disappointed they are reusing their own material like this, but fine, I am just a learner.

Now we should open the “Naming.playground” file and complete it.

What I found most unnerving here was that whoever wrote this book made some typos in the code and in the text … I mean… seriously Apple?

After a few pages of that playground I stopped because I found it depressing. It was exactly the same of the other book, come on…!

1.6 Strings

Let’s now open the “Strings.playground” file and hope, really hope with all my heart, that it won’t be a copy of the previous one.

Indeed, it was exactly the same. Also, after a certain page, clicking Next made Xcode crash … amazing, right?

1.7 Hello, world!

Are you scared to death like me of where this is going to lead?

Open the “HelloWorld.playground” file and help me not give up this part!

My poor goodness … the video in page 4/11 is misplaced and badly cut … 🤦‍♂️

This was boring… and badly made. I really prefer Ray Wenderlich’s Swift Apprentice book, which I should take back and continue.

The only nice part was a comparison between Swift, Objective-C, C and Assembly … impressive!

1.8 First App

Maybe something interesting here?

Create a new Single View App called SinglePhoto, uncheck the testing part and create it.

In the text we are introduced to the various types of files: .swift, which tell our app what to do and when and how to do it, .storyboard, which tell our app where to display information on the screen, .xcassets, which holds all the images for the app, including the app icon, .plist, which manage the app’s setup information.

Then there is the project file, at the top of the navigator, which manages information like the display name under the app icon or whether the app can handle different orientations.

We stop here for today, see you tomorrow. I will now go to try to fix a very idiot bug in the app I’m developing: without Internet connection it is not displaying data … ahah!


Open Main.storyboard. Select the View from the Document Outline. Go to the Attributes Inspector, open the Background menu, click on Custom and select a new colour of your liking for the background of the view.

Open the Assets.xcassets section and drag an image of your liking into that, then go back to the storyboard, select the View and remove it (what?! Then why changing its background colour before?! Crazy!).

Now drag an UIImageView onto it.

It is absolutely incredible and unacceptable that this tutorial is not up-to-date! It still thinks that the view’s content mode is set to Scale to Fill, while it was at least since Xcode 10.2, if not much before, I don’t remember, that it was set to default to Aspect Fit. OUTRAGEOUS! And people should learn from this material? Oh no!

This concludes the first unit of this course. I could say that even for complete beginner, anything but the first chapter is an insult. Quality is very low, the material is exactly the same as another, not-updated-anymore, book (Intro to App Development with Swift), Apple’s rhetoric is to the limit of nausea here…

I wonder if they will ever publish some truly great teaching material for programming or if they will keep trying to make people believe that this is what it is all about.

Signing off for today on this course, I really cannot continue anymore!


If you like what I’m doing here please consider liking this article and sharing it with some of your peers. If you are feeling like being really awesome, please consider making a small donation to support my studies and my writing (please appreciate that I am not using advertisement on my articles).

If you are interested in my music engraving and my publications don’t forget visit my Facebook page and the pages where I publish my scores (Gumroad, SheetMusicPlus, ScoreExchange and on Apple Books).

You can also support me by buying Paul Hudson’s books from this Affiliate Link.

Anyways, thank you so much for reading!

Till the next one!

Published by Michele Galvagno

Professional Musical Scores Designer and Engraver Graduated Classical Musician (cello) and Teacher Tech Enthusiast and Apprentice iOS / macOS Developer Grafico di Partiture Musicali Professionista Musicista classico diplomato (violoncello) ed insegnante Appassionato di tecnologia ed apprendista Sviluppatore iOS / macOS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: