Skip to main content

SWIFT / Swift Playground App

I installed the iOS 10 Beta on my iPad today and just like mentioned at WWDC 2016, with iOS 10 we now have a NEW app called "Swift Playground" that allows users to start digging into programming in Apple Swift language.

When I first saw the presentation about "Swift Playground app for iOS 10", I was totally mind blown. That is exactly what I have been asking for many years. A good coding app on iPad.

Well, actually we are already able to do some coding on iPad and iPhone using 3rd party apps like Pythonista and Procoding (Processing, Python, etc). But now, we finally got the Apple official coding app built in for iPad.

The app is using Swift iOS programming language, and Swift is a kind of nice blend of Python, Lua, and few other high level programming languages.

Heard that many programmers are liking Swift, which is a good sign!

FIRST TEST SWIFT PLAYGROUND

Swift Playground app comes with some tutorials and I guess anyone will definitely start from here. Step by step beginner tutorial is always good fun.

Each tutorial needs to be downloaded before it can be loaded. So give it some time to load the program from the net and once it is completed, you are good to go.

The first coding tutorial for Swift is really colorful with cute character we can control using code. The tutorial will feel slow for intermediate programmer, but anyhow, it is worth checking.

It starts from the very basic of running premade functions (COMMANDS) to move and orient a character on screen in it's environment. Then it goes into creating custom function.

func () {

}

Then goes into concept of LOOP in Swift and so on, each with example puzzle to solve.

for i in 1...4 {

}

Experience programmers can certainly go through each puzzle real quick, but what is fun is to actually make mistake and try things or variety of solutions. By doing so, you will learn the Swift syntax.

It comes to my surprise that the provided puzzle and examples goes pretty far and working out our logic. Even though basics, it will start to get into more interesting areas. Apple has made one really good programming tutorial available on every iPad running iOS 10 and this is fantastic!

FURTHER ON...

As you go along the Swift Tutorial App, you will discover that soon you started to think all kind of programming logic, even using few simple tools such as:
  • Functions
  • For Loops
  • Conditional If, If Else, Else
  • NOT, OR, and AND operators
  • While Loops

The last few levels will give more challenge. Beginner and experience programmers could find joy in going through this example for sure.

This is only the beginning, but I think I started to like Swift, thanks to the Playground app!


Comments

Popular posts from this blog

PYTHON PROCESSING / It only really begins ...

Back into Processing again, with Python! While Daniel Shiffman is continuously inspiring us with his CODING TRAIN series on YouTube, using Processing with Java and Javascript language, I decided to free my mind and trying to really do something using Processing and Python language. Installing Python language version on Processing 3 is easy enough, just first download the latest Processing and install the Python language mode via Add Mode button. Other link that might help: https://github.com/jdf/processing.py http://py.processing.org/tutorials/ BLANK MODE As soon as Processing Python Mode, opens up and running I am presented with a  blank environment. Suddenly I recalled my journey in learning programming from zero until now... With Python, outside Processing, commonly people will be introduced to Python IDE or IDLE environment. Something that looks like Console Window or Command Prompt, where we type single liners command. Python Command Line and IDE normally have t

PYTHON / OpenCV, Recreate Uncanny Manga - Anime Style

Can you tell what it is? Computer Vision. Yesterday, I spend almost whole day exploring this opencv module using Python. What I discovered was revealing. Even at the very basic level, I could produce some interesting Image and Video manipulation using all the code collected from documentation and many, many blog tutorials. If you are a total noob like me, I am still getting used to knowing that the CV in OpenCV means Computer Vision! Actuallly, I recalled that I did try to get into OpenCV few years back ago, when I knew no Python and when Python opencv module was probably still early. It was all C++ code and it was a little bit too hard for me. I read a couple of books about opencv at the library, I did not understand a single thing. That was back then. Today, for strange reason, with a bit of knowledge of Python, I can go a little further. EDGE DETECT IN OPENCV Me holding you know what. What leads me this far is my curiosity on how we can replicate Wolfram Langu

WOLFRAM / Making Text With Rainbow Color

Continuing with my Wolfram Mathematica Trial Experience... I watched and went through some more Mathematica introduction videos, read lots of Mathematica documentation and also going through the Wolfram Lab Online again a few times. There are some major learning curves and Mathematica is a lot different from normal programming language. Sometimes there is a lot of interesting "shortcuts", say like: FindFaces[] , WordCloud[] . Sometimes I got a little confused on how one can do iterations. Normally FOR LOOP concept is introduced early, but in Wolfram, because everything is EXPRESSIONS and ENTITY (like OBJECTS), sometimes it gets quite quirky. Mind you I am still in the first impression and having to look at many tutorials. Lots of NEAT EXAMPLES from documentation, but sometimes I got lost. I found Wolfram to be really awesome with LIST and generating list. It's almost too easy when it works visually. I cannot explain them with my own words yet, but there are