Coding for Apple's Swift Student Challenge: Q&A with 2 young Singaporean coders

Coding for Apple's Swift Student Challenge: Q&A with 2 young Singaporean coders

As part of the WWDC 2022 event, Apple has launched another edition of the Swift Student Challenge so that young developers can be awarded due to their projects created with Apple's Swift Playgrounds 4. After being notified last week, the winning students are now receiving AirPods Pro and WWDC 2022 outerwear as a gift.

We spoke with two young Singaporean participants who started coding and making practical apps in their youth to learn about their passion, expectations, and desires for app development to see further traction in Singapore.

Karandeep Sigh

Karandeep is a 17-year-old Singaporean student at Singapore Polytechnic where he is pursuing a Diploma in Information Technology. 

A self taught coder who started with Python and then progressed to Swift, he attended the Swift Accelerator Programme that was hosted by Apple and Tinker Academy where he learnt how to build iOS apps and his project was showcased to Tim Cook during his Singapore visit in 2019.

He already has three apps on the App Store and aims to build apps that are useful to people and the wider community.

His latest app BookSwap is a free platform that aims to reduce waste by making it easy to swap the books you have for the ones you want and he would like to partner with community organisations and library to grow it. 

"My app is called ASLearn and makes use of Machine Learning (CoreML and Vision), ARKit, SwiftUI and UIKit. After having multiple interactions with people with hearing impairments, I realised that very few people could communicate in Sign Language and this could cause them to feel isolated.

ASLearn aims to teach sign language in an interactive manner to make life a little easier for those among us with hearing impairments. I plan to bring ASLearn to the App Store at some point in the hope of bringing sign language to more people.

I first had to build an Image Classifier so I obtained a dataset from Kaggle (https://www.kaggle.com/datasets/grassknoted/asl-alphabet) and built my own image classifier with python and tensorflow. Unfortunately, I ran into issues with low accuracy so I decided to try the Image Classifier provided by Create ML instead.

This image classifier was slightly more accurate but still not ideal, even after I made sure that it was not overfitting my data.

To resolve this, I used the DeepLabV3 machine learning model (https://developer.apple.com/machine-learning/models/) to remove the background of every image in my dataset and then trained Create ML's image classifier again, greatly improving the model's accuracy.

The main processing occurs inside a UIViewController embedded in a UIViewControllerRepresentable. The user is directed to imitate a hand gesture on screen corresponding to an alphabet.

Using AVCaptureSession, I take a picture of the user's hand gesture, feed it to DeepLabV3 and obtain the same image sans background. I then provide this image to ASL, the previously mentioned image classifier.

ASL then attempts to predict the accuracy of the gesture. Most of the UI was built using SwiftUI. Only the UIViewController containing the camera was built in UIKit."

Don Chia

Don is a 19-year-old Singaporean graduate who is currently serving his National Service. He was a WWDC 2021 Scholar and is taking part in the Swift Student Challenge again this year, with an innovative art inspired virtual experience that he coded while doing his National Service.

Incredibly, Don writes his code by hand in his notebook at night, and would then transcribe it on his Mac over weekends. His project in particular is very interesting as it's focused on 20th century art movements and aims to blur the line between art and coding.

"Recursion is the concept of having a function that calls itself within the said function, and it is most often used to generate Fibonacci sequences or create sorting algorithms.

However, untapped potential in recursion lies in its usage for generative art. By using recursive functions, I was able to create functions that could accept parameters to recursively tweak certain values in a recursive pattern.

For example, by changing the X displacement (translate) value in the function's parameter, I can displace each subsequent shape by a specific value along the X-axis.

As the Playground Apps relies on basic shapes to create artwork, one can explore a few different ideas within it; Supremus, Pattern, and Random Generated Art are some ideas one can create from the software.

By using a recursive function to draw out each shape, one will find that there will be gaps between each outline and by making use of displacements, I can also create motion (and pseudo-3D) while still keeping the usage of basic shapes, a programming twist to the century-old movement.

To begin creating, one can click on one of the four shapes available and hit generate. The canvas will draw a recursively generated shape, tap on the shape on the canvas itself and select 'Quick Edit'. A modal with some variables should appear, go wild and play around with the values.

Further edit the canvas by dragging the shape around. Users can also generate randomised parameters by toggling 'Random Parameter' and selecting any shape. If you would like to re-arrange the layers, tap and hold a layer and drag along the list, duplication of layers can be done by holding a layer and selecting the tooltip."

What inspired you to pick up Swift coding and develop apps?

Don: I picked up Swift, Python and JavaScript during the circuit breaker period. My mentor in school encouraged us to work on external projects during this period and I made use of the time to work on my personal project, NOSSAFLEX, which was an app for analog photographers like myself.

I started the idea back in 2020 and it eventually expanded into a group of developers from the US and Australia. We worked on the app, eventually launching in 2021 and registering it as a business in Australia.

The bulk of my circuit breaker time was also dedicated to picking up web development and I had the chance to work with many developers locally as well as overseas during my JC years with regards to web development.

I furthered my Swift journey by winning WWDC 2021, where I submitted a project that taught users basic web development skills and showcased my love for both web and app development.

To really answer the question, I would say my mentors, both locally and internationally, and fellow colleagues that I've worked with in my various international projects, were my inspirations.

I learnt a lot about not just the technical aspects of programming from them but also the soft skills involved in working as a team during projects. 

Where and how do you learn your basic coding skills?

Don: For app development (iOS), I mostly followed tutorials on YouTube and practiced while also applying the skills in my projects. On the other hand, web development was mostly learnt through reading documentation and lots of trial and error with personal projects. 

Karandeep: I participated in the Swift Accelerator Programme in 2019 and that got me started with Swift. I've since worked in a few other programming languages, but the basics are generally transferrable between languages, with just a few differences.

To learn about the fundamentals of a new language, I usually try to build something with it and if I run into issues, I look them up on the Internet. This way, I'm motivated to continue learning because there's a clear reward at the end.

Most young adults your age would prefer to develop games. What made you decide to create the apps that you did?

Don: To be frank, I just didn't play too many games during my schooling years and didn't find it appealing to develop games due to my lack of interests in them at that time.

I have however tried my hand at game development in recent years and it's something worth pursuing. But I must admit that it's much tougher and has a lot more components to it as compared to an app or web development. 

I create my apps with a purpose in mind, in a way, my apps usually help to solve an issue that I am experiencing. For my first startup, NOSSAFLEX, I created it to log metadata for mechanical analog cameras that I frequently used.

The app was originally meant for my personal usage, and I managed to expand it further with the help of developers around the world. 

Karandeep: I prefer building things that I personally need. Problems are rarely unique. If I'm facing an issue, it's likely that others are too. Building apps that I need ensures that I know my target audience well and that there is a genuine need for the solution.

For example, I had trouble keeping my devices charged and did not enjoy my battery running out at important times, so I built PowerToYou.

PowerToYou is an app that syncs the battery levels of all your devices and notifies you if any of them needs charging. I've never run out of battery since.

I don't play many games though.

How do you manage/split the time between your National Service and creating/maintaining your apps?

Don: I make use of my weekends to work on my projects. I usually find time to partake in photo walks with my fellow analog enthusiasts on Saturdays, and I will work on my projects on Saturday nights or on Sundays before booking into camp.

Time is extremely limited for me, but thankfully my various teams have been extremely supportive. 

Karandeep: I split my schoolwork up over multiple days, depending on how much work there is to do. This way, I usually have some time each day to work on my apps.

If the workload is particularly heavy, for example if an assignment is due soon, I focus solely on my schoolwork and get back to my apps after submitting my work.

Are there any apps (be it utility or gaming ones) or app developers that you look up to — and why?

Don: Eric Barone's Stardew Valley, an RPG built entirely by a single developer. Full stack web or full stack app development is already considered highly impressive and highly sought after by many.

Stardew Valley's entire codebase, music score, character and map design and storyboard were created entirely by a single developer. He took four years to pull this off by himself as a side project and it's now considered to be one of the best Indie games. 

Karandeep: I look up to the team responsible for the Apple Notes app. I use it every day to manage my time and work and it's really important to me. I especially love how all my notes sync from my Mac to my iPhone so I can edit them even when I don't have my computer with me.

In what ways do you think Swift can be improved for developers like yourself?

Don: I hope to see more improvements to SwiftUI, the new frontend framework for iOS. It's something I work extensively with and there's definitely a lot more APIs that many developers would love to see. 

Karandeep: Swift is being actively maintained and improved. Swift 5.5 brought async/await to Swift, which makes the code responsible for large network calls much cleaner.

I'd like to see SwiftUI get better and reach feature parity with UIKit (which is the older framework for developing iOS apps) and it does seem to be doing so with every release.

And what would you like to see at Apple's WWDC 2022 (can be anything)?

Don: New AR/VR headsets!

Karandeep: I'm hoping to see updates to the WidgetKit framework, which allows building Widgets for iOS apps. Specifically, I'd love Interactive Widgets to be introduced as they could be an entire new way of interacting with iOS.

Also, hopefully a new framework for developers to be able to build faces for the Apple Watch. While the default Apple Watch faces are very well designed, my natural urge to tinker with my devices can only be satisfied with Watch faces I build myself.

As shared by some developers on Twitter, they have just received their awards for winning this year's Swift Student Challenge.

Those who have been selected by the company are getting a free year of Apple Developer Program membership, as well as an exclusive sweater and black beanie with WWDC branding and the Apple logo in yellow.

In addition to the outerwear, the winning developers also received a pack of exclusive WWDC 2022 themed pins. But more than that, for the first time ever, this year's Swift Student Challenge winners also got AirPods Pro as gifts.

ALSO READ: Child's play: Coding booms among Chinese children

This article was first published in HardwareZone.

This website is best viewed using the latest versions of web browsers.