Internship at Metalworks – Week 5 [22 June to 26 June 2015]

The world of iOS programming is huge and I’m definitely right at the tip of the iceberg. I dove in naïvely, taking it step by step, and taking good notes, but it’s almost like walking up a really long staircase and not knowing where you are at the moment. At the end of a long week, I still probably don’t know how skilled I really am at it, but I know what I know, and I know what I need to do next. I guess this post will be more about documenting my journey through iOS programming and how talking to other people in the office helped me along.

Monday: Finishing up iOS course on Udemy
Tuesday: Implementing news feed / Facebook integration with Parse (in Swift)
Wednesday: Facebook integration / Changing usernames
Thursday: Facebook integration testing / Implementing direct messaging
Friday: Walkabout.sg

Office Culture

While I spent the week coding, I really appreciated how there were always people asking me how I was doing. It was in a more concerned way instead of like an intrusive way. By intrusive, sometimes I get the feeling that you’re asked “how you’re doing” for the sake of checking up instead of you really being asked how you’re doing. I feel like people here care. As I was open more about my work, not only could others help me out, but articulating what challenges I was facing also put my work into perspective. Is this problem worth fixing? Should I move onto something else first? Are there other features of a higher priority? Sometimes delaying the search for the solution helps me out because I can take time away and find a proper answer for it. This is my key takeaway for this week:

Opening up about your work is important. By being transparent about your struggles, you gain clarity from the process and helps you be more efficient.

Working with new updates is tough

It’s feeling like I have very little support. I’m using Swift 2.0, and most code was written for v1.2, meaning that the difference between me succeeding at implementing a certain feature may very well just be a syntax difference, because Apple’s language conversion from Swift 1.2 to Swift 2.0 isn’t perfect, and there are plenty of things to debug. Problem being that there aren’t many solutions out there, and the solutions haven’t been tried and tested, so I also need to go through the process of experimenting. The good thing is that experimenting gave me some insight into the fundamentals of class inheritance, libraries, closures, type declaration, view controllers etc. I needed to read up on lots of documentation to gain clarity on what I was actually dealing with, and that was good practice. Also, translating from one language to another can be quite rewarding, especially if it’s Objective C, which is quite horrible a language to read really.

Case study: Facebook integration with Parse.

Login is difficult because Parse and Facebook weren’t aligned. When integrating with Parse, I had to update my info.plist file. Essentially the info.plist file is a document for Parse to go through in order to understand how to utilise the Facebook ID and name for the app. I had to add an array called “URL types” with an inner array called “URL Schemes”, but it wasn’t updated to match with the Parse SDK. So I could not activate the actual login. Little did I know, upon more Googling, that I could use “CFBundleURLTypes” and “CFBundleURLSchemes” in order to activate native log-in, which is using a website instead of a pop up. Refer to this for more info, code is as below:

Screen Shot 2015-06-26 at 6.32.37 pm

Username problems: I always thought it was possible to pull a user’s username from Facebook and use it for the database, so I went scouring the web for methods to do so. I couldn’t find it. Eventually stackoverflow redirected me to Facebook’s changelog in the developer’s page. Apparently they removed the /me/ method which allowed me to pull the user’s username and profile picture. Instead, I had to find other ways around it. So I went to create a new view controller that allowed a person logging in through Facebook to update his username in Parse, because only the objectId remains constant. However even the method to accomplish that wasn’t clear to me because I initially thought all I needed to do was query the object from Parse first, and then do a simple replacement using “=”. Nope. You need to use the method “setValue”. And then you need to “saveInBackground” right after that. These aren’t immediately obvious, but searching on stackoverflow really helps. This told me about Facebook’s changelog and this gave me the idea of having a new view controller to change the person’s username.

A general iOS beginner problem

Documentation is huge, and it definitely isn’t easy to down everything and still pick up what you need. It’s almost like learning a foreign language and reading the dictionary to know what you need to know. Usually you go situation by situation and pick it up along the way until you get to where you are.

Except that in going situation by situation, I really needed to know how to pace myself, and monitor my progress. It can be hard, when to understand a concept, you need to understand its pre-requisites, and before the pre-requisites, there are more pre-requisites to understand. It gets tiring, and recording everything down on paper makes the experience a lot better. An example is regarding view controllers. I followed the tutorials online, and along the way I was wondering what was the difference between the different types of view controllers, and this gave me some perspective. In a nutshell: Having specific view controllers make your life easier by importing certain delegates that you need, but you sacrifice flexibility.

That being said, here are some things I’ve managed to come up with so far:

01 Log In06 Facebook Login 02 User List07 Edit Profile04 Post Image05 Alert08 News Feed

All functionality to this date, works well. But there will be more tinkering to be done.

Walkabout.sg

I could talk about iOS programming in a lot more detail, but I think it’s also worth documenting my journey at walkabout.sg. walkabout.sg is an open house for start-ups and whoever is interested in it. Participants are able to speak to different companies and understand what they do. Half the time, I found myself speaking to companies more interested in funding, and companies who were more focused on working rather than welcoming visitors.

Fair enough, I joined walkabout.sg as a part of Metalworks’ field day where we made connections, understand what was current, and perhaps get some inspiration. We didn’t quite fall into the category most start-ups were looking for so there were quite a few uninspired conversations. However, I will talk about a few companies that made me really excited.

Smove

Smove is what you can call a car-sharing company. They have a fleet of about 15 hybrid cars, and 6 electric cars, in around 25 different locations. One signs up using their ez-link card (as a key for the car), credit card (for payment) and driver’s license, and they’re good to go! They have an interesting philosophy of standardizing their fleet for best user experience, and have a really smart way of monitoring their cars. In every car there is a black box which sends data to a control centre, where they can monitor the condition of the car. This is really smart as it makes maintenance efficient as tracking can be done pretty much real-time. That’s sweet. They plan to expand their fleet to 100 cars by the end of this year, and I can’t wait. Currently, I just wonder what more they could do with data from their blackbox and there are many things they could do to improve user experience (geo-location, usage frequency, hotspots etc.)

Thoughtworks

20150626_171102

Upon recommendation by Jayden, we went to Thoughtworks, located along Amoy street. They are a consulting agency, but it’s not just about consulting. They receive client briefs and often come up with completed products. From their presentation and Q&A, they seemed a rather intense bunch, people who code for fun after their office hours, hold meet-ups in pretty much any discipline, and even have a graduate program to inculcate fresh graduates into their special brand of thinking. I’m curious to find out more, and will probably drop by their meet-ups to find out more.

IDA Labs

We got a chance to see the government funded IDA Labs, an incubator for interesting projects. We chanced upon this guy called Grey, who is the co-founder of TinyMos, a camera development company that is currently dabbling with astronomy photography. They’ve made a really neat portable version that takes beautiful photos of galaxies and planets. One of them being Andromeda, which they took from Mersing in Malaysia. The camera is so small it’s ridiculous. They’re planning to present it at TechCrunch so I shall say no further, but there you have it.

20150626_143220
Grey showing us a demo of the camera

Grey was also hospitable enough and showed us to the IDA Labs below, where other groups could use the facilities. Such groups include start-ups, students working on final year projects etc. Take a look at some of the 3-D printing jobs people have done:

Just take a look at the scale. This took around a week to finish

And cheap thrills, we got to the Uber office!

Really, cheap thrills. We didn't really talk to anyone else there.
Really, cheap thrills. We didn’t really talk to anyone else there.

Hopes for next week

I really hope to strive on with my iOS development. It has spanned about 1.5 weeks so far, and I’m really enthusiastic in diving deeper. I’m slowly uncovering Swift, and hopefully, I’ll be able to document enough to sustain my understanding over a longer period of time.

See y’all next week!

Advertisements

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 )

Google+ photo

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

Connecting to %s