WWDC 16 – Past and Future

I can’t believe it’s already been three years since I visited San Francisco for the first and only time. In the same way that the tickets that year were sold out in 70 seconds, that unforgettable week, where Apple announced iOS 7 and Mavericks, passed like lightning. It’s hard to to express how much I’m excited for the next week, both as a member of the iOS worldwide community and as a programmer. Yes, Dub Dub is already in the next week!

In three years, generally speaking, a lot can happen in someone’s life. But in tech, things move faster, and in three years things change a LOT more. Just to understand to what degree iOS is maturing and the community is evolving together, I’ll list a few jaw dropping facts that were reality right before WWDC 13.

In the iOS/OS X world:

  • UIAlertViews and UIActionSheets and their delegates weren’t deprecated yet ūüė©
  • Skeumorphism was awesome
  • AutoLayout in Interface Builder wasn’t as easy as it is today and had tons of bugs
  • Stack Views? I’m still using Auto Resizing masks ūüôą
  • Creating a CGRect with a 320 width was “ok”
  • The sandbox world was merciless and app extensions was a mere dream
  • Hosted Parse.com (RIP ūüėĘ) was the best option to effortlessly save data in the cloud, and there was no CloudKit
  • Networking was done with NSURLConnection
  • And of course… There was no Swift ūüėĪ

And in the iOS community:

  • CocoaPods was around version 0.20 – it took a lot of effort to reach 1.0 a few weeks ago. Congratulations to the CocoaPods team for reaching this huge milestone!
  • Fastlane would be crazier than any dream – yes, or you had to write ugly scripts, or to do it manually, again and again. Felix, you rock! In the name of the iOS community: we ‚̧ԳŹ you.
  • Realm didn’t exist yet – congratulations to the team for the 1.0 launch! The incredible work they do for the iOS community, posting good quality videos (with captions and summary!) also needs to be mentioned. Thank you ūüĎŹ
  • Crashlytics was still in Beta
  • We didn’t have Little Bites Of Cocoa to sweeten our days ūüćę
  • You or the designer you work with, probably still used Photoshop. Sketch FTW!
  • NSScreencast had almost 25% the amount of videos available today
  • Carthage also didn’t exist!

Is it only me, or when you look back to all these changes, knowing how things were different and hard before, you are also proud to experience all these changes while they happen? How cool is to watch this video again and again, and to remember the excitement for the new iOS that was coming?

As a pre-WWDC post, I also can’t skip my (humble, I admit) wishlist:

  • A dark mode on iOS. Is the updated WWDC app a hint for that? Like the feature we have in Tweetbot: if the ambient is dark, the app automatically transitions to the dark mode;
  • Some way to customize UIAlertController’s appearance, like what happens in the Apple Music app and similar to Dropbox. (As a side note, I remember that, in 2013, Apple announced that the first beta of iOS 7 would have some property that would allow adding custom views, like a image view, to UIAlertView. No one heard about it anymore in the other betas ūüôä);
  • Customize the haptic feedback for notifications on the Watch. For example, only Messages, Calendar and Health notifications have that subtle tap in your wrist; what if we could identify which app wants our attention only by the pattern of the feedback? Besides that, having the default “vibration” is too obnoxious when happens frequently in other messaging apps;
  • What everybody is talking about: Siri on OS X and some sort of Siri API for 3rd party apps;
  • Better implementations and discoverability of 3D Touch. I believe that the low usage (both by users and developers) of the 3D Touch APIs are related to Apple not using it enough in their own apps, and for not marketing/making it visible enough;
  • More system apps implementing multitasking on the iPad. Again, how Apple wants us to make apps using some technologies, when they don’t adopt it completely?
  • Handoff on Apple Music? (Again, I’m looking at you, Apple!)

Of course, the Keynote and the State of the Union presentations will come and (I hope) surprise everyone. This is part of the magic. In the last days I’ve been literally dreaming about this magic.

I can’t wait to meet personally the people who I only know from the internet; to see other friends who I’ve met before and I’m in touch with; and specially to meet new people. Thousands of different people, from different backgrounds and locations, with a shared passion.

I can’t wait to hear in first hand what’s coming to iOS 10, OS X, watchOS,  tvOS, Xcode and Swift 3. I can’t wait to get emotional for making a dream come true, once again, after being present on a Keynote with more than 5 thousand people. I can’t wait for WWDC to start! 

PS: If you want to start getting into the mood, I recommend this playlist on Apple Music: https://itunes.apple.com/br/playlist/wwdc-waiting-list/idpl.6c523103c9944b358a5f40e65af038f9

Advertisements

Migrating My Data From Parse

As you probably already know, Parse announced it’s ending their hosting services on January 28, 2017. The migration plan was divided in two steps: first, we need to host the databases of our apps, and later on we should deploy our own, open source, Parse Server. During the first stage, the clients (iOS, Android, etc.) will keep hitting Parse’s servers, and they will access the newly migrated data; after the second stage is done and your server is up and running, the clients should be updated to point to the new server. The recommended schedule by the Parse team is to migrate the database by April 28, and finish setting up your self-hosted Parse Server by July 28. Yes, you read it right Рif you haven’t migrated your database, you have less than a month to do so.

‚ÄúBut where should I start from?‚ÄĚ, you may ask. As any decision, the pros and cons must to be taken into account, also considering the different conditions: do you have only one or multiple apps on Parse? They store huge amounts of data, or not so much? Do you have experience managing databases, specially MongoDB? How sensitive is your data? What is your budget?

As most of my apps have a small, niche audience, the amounts of data are really small. None of the databases is higher than 10 MB, even with a few thousand users, installation, and other objects. Also, most of them are free, with some humble contributions or donations occasionally. Therefore, I have a small budget to keep them functioning. As I have zero experience managing databases, I can’t build all the MongoDB server by myself (for example, I didn’t even know of some concepts like sharding, replica sets, and more). I started researching all the different options available in the market, to find what would fit my needs.

Ok, so what are my options now?

Suggested by the Parse Team, there are mLab and ObjectRocket, who provide Рfrom what I’ve read Рexcellent DB-as-a-service. mLab would be a good fit for me, their prices start from U$15 per GB/database/month (the free tier is not intended for production usage). I have around 6 apps in production, and they require different databases, so the monthly cost would be almost U$100 per month, and we aren’t even talking about hosting the Parse Server yet. (Actually, if you are using only Parse Server, and not migrating from hosted Parse, you can use only one database for different apps, by defining a collectionPrefix).

Unfortunately, the prices and sizes that ObjectRocket offer aren‚Äôt for indie/side projects, so I needed to cross them as well from my list, together with mLab and Compose.io. While reading the community links and googling more, I‚Äôve found Clever Cloud. I almost chose them to host my DBs: you can host as many mongo dbs you want, and it‚Äôs free up to 500 MB; but if you need more than that, it jumps from a free 500 MB, to a 75 ‚ā¨/month for 30 GB, and I needed something in the middle.

Also, as an option for a replacement of all Parse services, there are also NodeChef, ParseGround, Backand and Back4app. But as now I have the possibility to have control over the whole parse stack, I preferred not to depend too much again on another service. It’s a personal decision; check them out because they may be a good fit for you, if you don’t want to worry at all with the backend.

After a few weeks, when I was about to give up, I found Scalegrid.io, that provided exactly what I needed: a place where I can create many Mongo DBs under the same infrastructure (a cluster). Someone to manage the hard part, but with the control that I want. Similarly, there is also MongoDB Cloud Manager, which is an excellent product from MongoDB Inc. itself. I preferred to go with Scalegrid, but the process I describe in the next section is very similar for both solutions.

Setting up my first MongoDB server

After signing up for a 30 day free trial, I checked which one of the services would fit me better: (1) hosting, where I provide my AWS keys or own hardware, and they manage it, or (2) management, where I don’t need to worry about the hardware that will host the dbs. In my case, I preferred to have control also over the underlying instances, so I chose the first option. Price-wise, they are very similar at the end of the day Рin the first, you need to pay AWS and Scalegrid.io, while in the second you pay a little more but only for Scalegrid.io. According to my calculations, it would be something very close. So this is what I did, and what you should do to set it up:

  1. Create a new user the AWS account and generate the keys (Acces Key Id and Secret Acces Key). Remember to save this keys, as you won’t get them again from AWS.
  2. Created a new ‚ÄúCloud Profile‚ÄĚ in the Scalegrid console using the AWS keys.
  3. Created a new cluster using this profile. It means that the AWS EC2 instances will be created, by Scalegrid, in your AWS account. Bear in mind that you will need to choose a few options:
    1. Size (micro gives you 10GB of storage);
    2. The version of Mongo (Parse only supports officially 2.6 and 3.0 for now);
    3. To enable replica sets and sharding Рif you don’t have high traffic and don’t need redundancy, you probably don’t need;
    4. To encrypt and compress the data – I suggest to set both to yes;
    5. To enable SSL (more on the last paragraph) Рit’s recommended, but not required.
  4. Wait for a few minutes (you can see the instance being created in the AWS console), and your cluster will be ready to go.
  5. Now you should be able to get the connection string, needed for migrating your Parse apps, but we are almost done.
  6. For each app, you will need a new database in your cluster. So for each app you have:
    1. Create a new database
    2. add a user (I called mine parse-access) and set a password
  7. Get the connection string, and append the database name at the end. For example, if the database name is SuperApp, your connection string should be: mongodb://user:password@hostaddress:port/SuperApp. (the default port is 27017, and remember to append ?ssl=true at the end).

Finally, an important detail: as one of my apps stores medical data, I wanted SSL to be required. Scalegrid offers two options: self-signed certificates, or use your own, trusted certificates. If you are running only your own Parse Server, the self-signed certificate is enough; if you are migrating from Parse, you will need to get a certificate from a trusted Certificate Authority, or disable SSL at all in your mongo server. I chose the first option:

  1. Purchase a certificate for a subdomain that you own:
    1. You can get a wildcard certificate, for more than one subdomain, or get a certificate for a specific subdomain. (The latter is cheaper and may be enough, so that’s what I did: a $10 certificate via Namecheap/Comodo);
    2. In order to create the certificate, you will need to create a .csr file. Use ssh to connect to the AWS instance and create the .csr;
    3. Provide the .csr file to the Certificate Authority;
    4. Prove that you own the domain (this can be done by e-mail @yourdomain, or using DNS records).
    5. In a few minutes you should receive the certificate files.
  2. In your DNS records, make the certified subdomain point to the Scalegrid server
  3. Finally, install the certificate in the mongo server. (the great Scalegrid support team helped me doing so)
  4. When I thought the SSL journey was over, the migration tool from Parse still wasn‚Äôt reaching the servers, showing ‚ÄúNo reachable servers‚ÄĚ, because the setup wasn‚Äôt complete. After researching for a few hours, I discovered that we forgot to add the intermediate certificate.

I’m very happy with the solution I’ve found, but my advice to you is: study the available options, define your priorities and budget, and start the migration process once you chose how to store your data. Be prepared and don’t leave it to the last minute!

Unknown-2.jpeg

If you have any troubles, you can ping me @natanrolnik, or e-mail: me at natanrolnik.me
Thanks to @newFosco, @MarcioK and @ofermorag24  for reviewing this post

Thoughts on the Parse shutdown – how the terrible news became the best thing to happen to my app

Friday morning, Israel time. After I wake up and look to my iPhone, I see 3 notifications from friends (fellow developers that know how much I love Parse), sending me the link to Kevin Lacker’s post. When I saw the title, “Moving On”, I froze. Only a few days after releasing my side project, an app I’ve worked on for over than a year and a half, using Parse as backend, would I read the worst thing to happen to that and to a few other smaller projects?

Why I loved it so much?

In the last two years, I’ve been using it in almost every single project, in many different ways for each app:

  • as a complete backend for user management, data and file storage in the cloud, including Cloud Code functions and Background Jobs;
  • hosting in app purchases content;
  • as a simple and quick tool that gives powerful analytics;
  • to send Push notifications in a relatively very simple way;
  • and more using the other solutions and products they provide.

For me, nothing describes Parse better than the following quote from their last marketing video, part of a complete and recent redesign and rebranding: “You can definitely handle the frontend, but what about the backend? Configuring servers, managing databases, writing APIs, storing videos, authenticating users, building deployment processes, and so on, and so on. Sure, you can figure out how to do that stuff yourself, maybe hire someone to deal with it for you, but here is a better way: Parse”. For sure, if I had all the time and resources in the world, of course I would like to take care of every single part of my app, doesn’t matter if it’s frontend or backend. I am, more than an iOS developer, a programmer. We deal with solving problems, no matter the language or the ecosystem. But our resources and time are limited.

There are two main reasons developers liked it so much and got pissed off with the news. First, it allowed us to make more complex apps in a easy, fast, and reliable way, even without the need to master another programming language. Additionally, if you are working in a side project where you may even know how to build the server side – you may be constrained by time and need to get out with something faster, focusing on the app experience. We loved Parse because it made the heavy lifting. If my side project took an year and a half with client code only (and minimal Cloud Code), I don’t think I would have ever finished it if I needed to take care of writing the API, managing databases and deploy processes.

In total, 6 friends have sent me the link to the shutdown post, and they all did it because I’m sure I’ve talked enough about it (recommending) and telling how much it helped me accomplishing this app. Even a few of my friends who don’t code know what is Parse.

What now?

Of course, the first thing that popped in my mind as I read the shut down post was: “Ok, what should I do now?!”. I couldn’t believe what my eyes were reading. In the following hours, I got really sad (ask my wife!)and felt as if I was loosing something cherished – after all, I’ve been a user for almost 3 years since I first heard about in the WWDC 2013 party, and after following how much it changed and improved since then.

Finally, I reached the stage of acceptance and tried to follow the excellent migration guide they prepared. After around one hour, I had the development database migrated to mongolab, and after around another hour I had the Parse Server deployed in Heroku.

So why is it good news?

Well, it’s definitely not yet there, and the server has still a few limitations and issues, but I started feeling that the “backup plan” may end up being a better solution in the end of the day (specially if you client app is mostly done):

  • Parse Server is open source: now, every one of us can contribute to improve the server side (go and create your first PR!), and not only that – we can deploy the same Cloud Code app and logic to wherever we want: AWS, DigitalOcean, Heroku, and more;
  • We own the stack: we can create our own deployment processes, connect them to the app source repo; not satisfied with the server? change it to some other place;
  • We have greater control over the database: now, there is no one between you and the access to the database. With mongoldb, for example, there is an option to schedule recurring or one off backups;
  • In case you need to scale, it will propably be much cheaper;
  • And finally, and most important, you don’t depend anymore on Facebook’s volatile strategic interests.

(This, considering you won’t do significant API changes and still want to use Parse’s SDK in the client code. If your client app’s architecture is not tied to PFObjects everywhere, even better.)

It’s more work, for sure. Deploying, monitoring, scaling. But that’s an amazing opportunity to learn more stuff, and keep using the same client code (only changing the server URL).

A huge thanks to everyone who was involved in creating the idea, implementing the initial products, and the ones who took it to another level. With the tool you created, I did apps that could do much more, and also I could focus and finish a big project I’ve been dreaming of for around 3 years. Another special thanks to the folks (Fosco Marotto et al) who are working around the clock to make Parse Server and the migration stable and reliable, and as smooth as possible for us!

Hosted Parse, I’ll miss you! Long live Parse-Server!

Other interesting reads/links:

 

Integrating fastlane with CircleCI to deploy with Crashlytics (Fabric)

Why fastlane? (Or better – why would you not use fastlane?!)

Since the creation of CocoaPods, the best thing to happen to the iOS community, by the iOS community, is fastlane. Developed mostly by Felix Krause, with the contribution of tens of people, it allows developers to automate a bunch of tasks that are done manually, repeatedly, each and every time we wanted to release an update for our apps. If you aren’t familiar with fastlane, I suggest you to watch this presentation by the author.

But better than running a lane in the command line in your local computer, is setting up a Continuous Integration to do it for you. For example, every time you merge your code to the master branch, submit to the AppStore; every time you merge your code to the develop branch, upload a new beta to Crashlytics. This can be done with services like Jenkins (if you have a dedicated machine to do so), Travis CI, or CircleCI. Because CircleCI basically allows you to run iOS builds for free (check the pricing here), I wanted to use it to set up the deployment cycle for my current indie project. And as I encountered a few hurdles on the way, and had a lot of failing builds until it succeeded, I learned a lot and wanted to share in this post (Ah, don’t miss the bonus in the end!)

The Fastfile

When fastlane runs, it will look for a few files inside the fastlane folder. This folder is created when you run fastlane init in the command line and configure the project. The most important is called Fastfile, where you configure different lanes you want, each one with different series of actions. For example, the lane can run tests, submit the app to TestFlight, submit to the App Store, and so on. The documentation for the Fastfile can be found here.

To start, let’s tell fastlane which platform we are talking about, what is the minimum version of fastlane required for this one, and what are the initial environment variables that will be used in the lanes. Everything inside before_all will run before any lane is started.

Now, let’s define the Fabric lane. Basically, every time fastlane runs it, the following steps will happen:

‚ėĎÔłŹ Run pod install via fastlane action cocoapods
‚ėĎÔłŹ Run our own method import_certificates, that will add the certificate and the key related to the provisioning profile used to distribute the app;
‚ėĎÔłŹ Run sigh (another part of the fastlane tools), that will create and/or download the necessary AdHoc provisioning profile;
‚ėĎÔłŹ Set the environment variable PROFILE_UDID, that fastlane uses to associate the build with the correct provisioning profile;
‚ėĎÔłŹ Run gym, that will build the app (with my specific parameters; in my case, the AdHoc version should to be built, so I use the correct scheme for it).
‚ėĎÔłŹ Upload to Crashlytics (in my case, I didn’t want notifications, so I turned them off by passing the notifications: false parameter.

Oh, Certificates and Provisioning Profiles…

Now, the tricky part: as CircleCI creates a new instance, temporary, for every build, it needs to be able to access the certificate and add it to the keychain of the CircleCI instance – we don’t want to create a new certificate for every build! Taking this into account, create a new folder called certificates inside your fastlane directory; find the certificate you are using (or the one associated to the provisioning profile) and add it there. The other file you will need, is the .p12 key. To get it, open the Keychain Access app in your Mac, find the certificate, find the key, and select Export as shown in this image. Save as a .p12 file.ExportCertificate

Don’t forget that the password you use to export the key, needs to be defined as an environment variable – I’ll explain later how to do it.

This is how your certificates folder should look like:

Screen Shot 2015-10-21 at 1.58.01 PM

We are almost done with the Fastfile. Finally, add the import_certificates method. It will create the keychain in the temporary CircleCI instance, and import to it the files we just put in the folder. Don’t forget that we are using environment variables here like KEYCHAIN_NAME and KEYCHAIN_PASSWORD that must be setup in the before_all method – again, I’ll explain below how to do it.

The full gist for this Fastfile can be found here. I also added a beta lane for sending to TestFlight (in my case, I wanted it not to submit the app to review, so I set pilot(skip_submission: true), and an appstore lane.

Configuring the circle.yml file

Now, the easy part. We just need to tell CircleCI which lanes we want it to run in which conditions.

(If you are using a tool like mogenerator and your build process depends on it, you must add the lines 5-7. Otherwise, ignore it.) In the deployment part, we defined 3 different commands:

‚ö™ÔłŹ Staging: whenever there is new code in the develop branch, it should run the lane fabric_silent
‚ö™ÔłŹ Beta: whenever there is a new tag in my repository like beta-v0.7.3 or beta-v0.8, run the beta lane and send to TestFlight
‚ö™ÔłŹ Release: whenever there is a new tag in my repository like release-v1.0 or release-v1.1, run the App Store lane to submit it.

Important note: In order to make fastlane available, you need to add a Gemfile to your project root:

Configuring the Environment Variables

As we don’t want to store the certificate as plain text in the Fastfile, we will use the CircleCI environment variables, that are stored correctly. Add the CERT_PASSWORD name and value (your .p12 certificate password). Also, if you are using sigh as we mentioned above, also setup FASTLANE_PASSWORD as your Apple ID login password, to download the provisioning profiles. You should also set here the KEYCHAIN_PASSWORD to create and unlock the keychain for storing the certificate.

fastlane-environment-variables

In case you want to run fastlane locally (and not in CircleCI) , you can store these variables in the ~/.bashrc file. To do it, you should do the following:

‚ėĎÔłŹ Open the ~./bashrc file with your preferred text editor (I like using Atom, so in Terminal, do the following): atom ~./bashrc;
‚ėĎÔłŹ Add the environment variables this way:

export CERT_PASSWORD=your_p12_password
export KEYCHAIN_PASSWORD=temp_keychain_password
export FASTLANE_PASSWORD=your_apple_id_password

‚ėĎÔłŹ Save the ~./bashrc file;
‚ėĎÔłŹ Enter source ~/.bashrc in Terminal to reload it without the need to restart it.

(You can also check this guide on GitHub for more options on how to set the environment variables)

Now you should have your most recent app waiting for you in the Crashlytics Beta app! Hooray! You can ping me @natanrolnik if you find any problems and I’ll try to help.

Bonus – push notifications!

Wouldn’t it be cool if I could be notified every time a build finishes or fails? I created a small Parse app (with custom Cloud Code after save triggers) to send push notifications to my phone. You will need to setup Cloud Code and create an iOS app (to install on your phone) that will receive the notification.

Whenever a lane succeeds, the after_all method is called, and whenever a lane fails, the error method is called:

And using the Parse Rest API, I defined my own push_notify method that adds the LaneResult object to Parse. (Don’t forget to add your parse keys at lines 9 and 10 – in this case, you can also set them as environment variables to keep it more secure, but I don’t think it’s needed here, as these are the keys of my own notifier app):

This is how the after save method looks like in the main.js file of the Parse app Cloud Code:

(You can also use fast lane’s action slack to post the result to your Slack channel or group. Check out here how to do it)

The result?

Screen Shot 2015-10-21 at 2.47.40 PM

That’s it! I hope you enjoyed reading this article. Happy coding! And easy shipping!

Empathy

This weekend I had the opportunity to host someone for the weekend who I know since I was 16 years old (and my guest was around 8 back then). After talking about different things, I got very happy to hear the following: “When I was little, you were one of the few, if not the only, older guy who always said hello to me”. How easy is to make people feel special? A simple hello was enough. More than 10 years later, that made me feel gleeful.

It doesn’t matter whether you are designing a product, showing someone what you do for living and the reasons why you love it (possibly inspiring him/her), or simply if you come accross your neighbor. What makes us more connected to others is expressing how much we care about their needs, and acting towards it. A little kid just wants to be noticed, specially by those who are bigger than him. By taking people’s needs into account, we can be better in every aspect of life.

Better partners, better friends, better professionals. Better anything. This may sound trivial, but transforming this feeling into daily actions, or into long term projects, demands persistency and a lot of effort.

When talking about software and design, this is extremely valid. Understand what your users need, and allow them to do it easily, seamlessly and reliably.

Think about it. How will your friends (or clients, users, patients, or simply random people you get to know) think about you? What do you want to be remembered for in the future?

PS: Coincidentally, this talk that I watched today (by Dave Wiskus, a musician and designer), explains this very well, and made me think more about it.

(slides and video together here)

You may ask yourself “How can I start developing apps?” and I can answer.

When people¬†find out that I’m a programmer and that I have an academic background in a completely different area,¬†the¬†most frequent questions they¬†ask me are:

– “No way! You went from Pharmacy & Biochemistry to Computer Science?”

– “Wow, how did you become a programmer? Where did you get your motivation to learn it from zero?”

– “As someone that made a big shift professionally, what are your tips for someone who want to become a software developer?”

Due to the amount of times I have heard questions like these recently, I decided to come back here (after a few months) and answer all of them. After all, maybe I can help, encourage and inspire more people to try learning new stuff as I did.

How it all began

In January 2007 Apple announced the original iPhone.¬†Officially, it was sold and supposed to work only in the United States with AT&T¬†–¬†but people¬†found creative ways to use it in the rest of the World. As a recent Apple fan from the iPod Photo,¬†I was blown away by the revolutionary User Interface the iPhone had back then.¬†Can¬†you remember how smart phones weren’t really smart, difficult to use? With that new almost magical device, browsing the internet with your fingers, the rubber-band effect when scrolling content, multi-touch and other gestures fascinated me.

A year and a half after that, in September 2008, the second generation¬†was launched internationally and arrived to Brazil- I bought the iPhone 3G on¬†the day it was available for sale. It’s very appropriate to say that the first mobile applications store that really worked, the iOS App Store, was launched at¬†the same time. And the revolution of mobile started: there’s an app for that.

App Store

Back in the day, there were only a few apps with Jewish content in the App Store Рand with very low usability and bad design compared to the platform. So I wanted not only to do something for this relatively small niche, the Jewish world, but also to this even smaller niche Рthe Jewish community in Brazil. I decided that I would take one of the main books about the core values of Judaism, and make it available in Portuguese in the App Store.

The internet of people

On the first few tries, it was a disaster. First of all, opening an IDE (Integrated Development Environment – for¬†iOS¬†the main one is¬†called¬†Xcode) and seeing all the¬†lines of codes, that didn’t make sense to me, was frightening. I tried changing words here, a few numbers there, and with the help of a very basic tutorial on YouTube, if I had luck the project would compile and I would get the expected result.

I started searching for more professional video tutorials, and I’m so lucky to have discovered¬†Lynda.com¬†– where I¬†learned more basic concepts of programming – both general and specific to iOS. Most of the courses on Objective-C (and now Swift) are done by Simon Allardice –¬†he is extremely didactic, and the price you pay to access the content is really nothing in comparison to what you get. (I’m happy I had the opportunity to¬†meet him and thank him personally for everything I learned from him).

Other alternatives to Lynda.com are Treehouse, RayWenderlich, and CodeSchool.

I can’t ignore the importance of the questions and answers website StackOverflow, where programmers help each other, from the most simple to the most complex questions. I use it extensively up until today – more for¬†learning and understanding things, not for¬†copying and pasting code. (It’s not a surprise you see developers linking to their¬†StackOverflow profile in their CVs, so that even before interviews, people can see how easily¬†they are able to share knowledge with others).

The power of crowd sourcing is amazing. The internet enables new kinds of interactions between people, no matter where they are located and who they are. The distribution of high quality video tutorials for a reasonable price, getting help from experts from another continent for free, amongst other advantages, are a few of the reasons why I love the internet (even though all of us¬†share¬†reasons why we¬†hate the internet – but I’ll leave this for a separate post).

I also did a 2 week programming course (focused on iOS) at iAi in Brazil – and I’m sure you can find a good place wherever you are. If you are in the U.S., I recommend The Big Nerd Ranch¬†– their founder worked at NeXT, the company that was founded by Steve Jobs after he was fired from Apple, and a few years later was acquired by Apple.

Keep the stride

Obviously, the sources I mentioned above are not enough if you want to build professional and industry level apps. The more complicated the products you need to build, the deeper you need to dive in – and that’s where multithreading, networking, data persistency and more areas can get tricky.

Besides experience and getting your hands to build real things, and going to conferences (WWDC, UIKonf, and check here for more), here are a few sources that are part of my everyday learning, that covers more advanced topics:

NSHipster РWeekly articles of excellent quality (initially by the great Mattt Thompson) written by Nate Cook.

objc.io РA monthly magazine coordinated by Chris Eidhof, Florian Kugler and Daniel Eggert, from Berlin, covering best practices and advanced techniques for iOS and OS X.

iOSDevWeekly – a weekly curated list by Dave Werver containing the best stuff in the iOS community you should be aware of.

Connecting the dots

Who would guess¬†that after studying 5 years of Fisiology, Organic Chemistry, Anatomy, Calculus, Pathology,¬†Analytical Chemistry, I would end up building software. I’m sure that all these disciplines affect positively in my routine and the way I think today. As someone once said:¬†“You can’t¬†connect the dots¬†looking forward;¬†you can only¬†connect them looking backwards”.

So what new things did you learn today? What are you going to learn next?

Stay hungry, stay foolish!

Natan open-sourcing: NLRMashapeClient

Last week I needed to build a component from an app that uses an API available at Mashape. When I looked into the documentation they provide, they suggest you to use Unirest: an open-source set of HTTP request libraries by Mashape itself. As as someone extremely addicted to AFNetworking, I found it a bit strange not to use one of the biggest trends in the iOS world. As I love the implementation and the concepts of AFNetworking (serializers, http managers, completion and failure blocks, and more), I thought that could be a great opportunity to make something more people could use.

So NLRMashapeClient was born, and it’s available on GitHub. Follow the ReadME for instructions on how to implement (of course, it supports CocoaPods) in your app. Pull Requests are welcome!

 

Tehilim in the Post-PC era

From time to time, I receive meaningful feedback emails from users of my Jewish-oriented apps. Across this 3 years of presence at the AppStore, I gave received interesting emails, with some cool stories. But some days ago, I received the best one of them to date, if we can say so¬†–¬†because each history has a person and his life and experiences.

The emails was regarding one of my relatively recent apps: TehiliMP3. Tehilim is the hebrew name for the book of Psalms. There are plenty of apps in the AppStore for it, but what makes my version unique is that it has,¬†besides the texts in Hebrew:¬†(1) translation and transliteration to (2) Portuguese and English; (3) “mini” apps that help in the day-to-day use for reading them, and finally, (4) the option to buy, as in-app purchases, the narration of all the 150 chapters of the Psalms. The intention is that people can¬†listen to it in the car, while walking, or to serve as¬†a helper to study Hebrew.¬†That¬†is why the name of the app is TehiliMP3 and why the icon is an harp with headphones. All the Tehilim, with the MP3 files to listen to it.

The cute harp with headphones

TehiliMP3

What I never imagined, however, is that I would receive something like this:

Love from a user

User showing some love

When I read it, I was blown away. Everyday I realize more the power of software and technology in the Post-PC era. An application to help people finding products in the supermarket, ok, that is great, but predictable. Another app to help people listening to classes in their commute from home to work is amazing, but this use is planned and expected. And this is already satisfying. However, knowing that one of your products helped someone to have one of the most basic human needs Рsleep Рas everyone deserves, without need for medication and nightmares, is extremely rewarding.

In the tech scene, the biggest failure of a lot of¬†companies or people is to think in mobile with the PC vision. They¬†think that a smartphone is a PC in your pocket – and this is a huge mistake. This people don’t get that mobile is not only about Tech Specs, or how much RAM memory a device has. Mobile is about features, is about what it enables you to do, and how a simple device can improve your routine so much. And this people will never get what is mobile.

To wrap up, take the example of this user.¬†To receive¬†an¬†email like this can change one’s¬†day¬†and give a¬†boost of motivation and satisfaction.¬†If you use any software/service, especially for free, let the developer/provider know how much it helps you.¬†Show him¬†how much¬†you appreciate his hard work.

My special and huge Thank You to all the sponsors of TehiliMP3 and to Shimon Zlot, who provided the MP3 files.

Write the code, spread the love, change the world

Last year I had the opportunity to travel to San Francisco in order to attend to Apple’s yearly developers conference: WWDC – World Wide Developers Conference. Around¬†7 years ago, it started becoming a dream for¬†me to be¬†there personally. The legendary¬†Keynotes, presented by Steve Jobs and the rest of Apple’s software and hardware teams, were one more¬†ingredient¬†that arose my¬†passion¬†for Software development. Getting there, meeting Apple engineers and even some of Apple VP’s, and being present in¬†a Keynote, was a milestone for me.

Did I mention the craziness to get tickets last year? All the 5,000 tickets sold out in 72 seconds Рand I was one of the ninjas who was fortunate to fill everything out and get one of them.

However, this year Apple decided it would be different. Eligibility to tickets would be decided in completely random lottery, to the despair of many developers. They announced that we would receive e-mail informing the status on April 7, 5:00 p.m. PDT (3:00 a.m. Israel time). And indeed, 04:00 Israel time, I received the confirmation РI was not selected to purchase a ticket. After getting the chance to be there once (and enjoying so much as I did, knowing people who struggle with code just like me, from all over the world), I wanted even more to go this time. So you can imagine how much I was disappointed. I started my day very upset.

When I told my wife when we woke up, also upset, she quickly said: “No problem, I will prepare a WWDC for you here!”. Ok, I thought, let’s see what happens. When I got home after work, I saw this cute “invitation:

ImageIf I was already fine with and conformed to the situation at the evening, this cute piece of paper made me feel much happier. Sometimes, you find love in the situations you less expect (and even more when you have a 3 weeks old baby).

So I decided to share this with someone at Apple. Who better than Craig Federighi, Apple’s SVP of Software Engineering, a.k.a. Hair Force One, the new Apple¬†superstar – and who I had a quick chance to meet and talk at WWDC 2013. Also, after talking to him, I had that feeling we have when you meet a Mentsch – a word in Yiidish¬†to describe someone polite, with integrity, that talks humbly to everyone.

I wanted to show him how much I wanted to go, how I was feeling, and also what my wife did to make me feel better – I was sure he would like it. I tried some email addresses based on his name – and after some shots, the email didn’t return with an error. So I went to sleep and thought: “Fine, he will see this and will be happy about it”. Indeed, he liked it. But more than that, I woke up with his¬†reply in my inbox – and another¬†confirmation that he is a Mentsch.

Craig's reply

Well, I don’t need to say that my day started in an excellent mood.¬†Because not everyday an Apple SVP sends you an e-mail. ūüôā

The bottom line is, no matter where, spread the love. Inside your house, in your work, or with people you don’t know. To paraphrase this year’s WWDC promo, Write the¬†code. Spread the love. Change the World.

 

My Intersection

We all want to find knowledge areas and people who inspire us. Some months ago, I watched a documentary called Jiro Dreams of Sushi. In a nutshell, the movie tells the story of a Japanese senior that did what he was fond of since he was young: sushi. To be honest, the movie may be a bit boring at some points, but in general, I got extremely inspired by Jiro, today a world renowned sushi chef. Why? Because he likes what he does so much, that he dreams about new sushi recipes!

photo_02

Jiro – the passionate sushi chef

It happens to a lot of software developers, and it happens to me sometimes as well. Dreaming about solutions for a coding problem, for a bug, dreaming of the User Interface of an app. This week, while I was half awake half asleep because of my 6-day-old son, it happened again. But it was not anything technical Рit somehow explained to me, gave me the answer to one of the questions I have been wondering recently: what is the connection between the areas of knowledge that I love? What is the similarity between Software Development, Health Care, and Education (specially non-formal education methods).

I am reading a book called Start With Why, by Simon Sinek Рamong other things, he explains the true source of inspiration that makes us wake up everyday to go to work, and why it is so important to do what we love. And related to reading this book, the question gets stronger every single day Рand in this dream I had a hint to the answer.

Here it goes: all the 3 areas mentioned –¬†Software Development, Health Care, and Education¬†– deal with¬†already existing people or things¬†with a high potential, and provide¬†a beautiful result out of it! Software can take the existing physical hardware and helps people’s lives.¬†Medicine deals with¬†ill patients and heals them. Finally, Education allows us to¬†transform small animals into well behaved children, explore their¬†intelligence, make them¬†grow mentally, and make their¬†family, friends and teachers proud of him.

Can¬†more things be connected to this idea? Of course. Maybe this answer was not so special? Maybe.¬†But I¬†am still impressed with and excited that it happened while I was not awake;¬†that means it came from the depth of my mind.¬†I¬†am happy¬†I found¬†the¬†common ground for these¬†passions.¬†That¬†is what I¬†am calling, from now on, my intersection. Even though¬†I do not¬†have “the answer” for this intersection, it already¬†bore¬†fruits – my¬†jewish-oriented iOS applications available in the App Store are some examples.

The intersection between Technology and Liberal Arts

Apple’s DNA: the intersection between technology and liberal arts

To end this blog post, I will mention one of my preferred Apple Keynotes – neither¬†because it was a groundbreaking product, nor¬†any super exciting new class of product. To finish the¬†iPad 2 announcement, in March 2011, Steve Jobs gave a small speech about Apple’s DNA. I saw that special event’s streaming live, and I remember as it was¬†today what Jobs said (It¬†is worth watching the whole 3 minutes, but I¬†will mention the most inspiring excerpt):

It’s in Apple’s DNA that technology alone is not enough — it’s technology married with liberal arts, married with the humanities, that yields us the result that makes our heart sing¬†and nowhere is that more true than in these post-PC devices.

And what about you, have you already found your why? Have you found what inspires you and makes you jumping out of the bed to go to work? Have you found what you love to dream of?

An Introduction to AFNetworking 2 and NSURLSession

This week, I had the opportunity to present to my friends at work about AFNetworking 2. As it is full of new stuff, and, most important, supports the new networking foundation APIs on iOS and OS X – NSURLSession – it was a great opportunity for me to learn more into deep about this new APIs that I first heard about last June, at WWDC 2013.

So I decided to do a overview of NSURLConnection, AFNetworking 1, NSURLSession, and AFNetworking 2, and include all this in a presentation.

Here it is, enjoy. Comment here or ping me at @natanrolnik if you have any observations ūüôā

Pirkei Avot

This was my first app. In December 2009 I decided to try doing an app (something that mixes some of my hobbies: design, coding, User Interfaces, and more…) for a very important and basic book in Jewish culture. So I looked for sponsors, and ran for it!

Thanks God, this app changed my whole life.

It took me almost a month to understand how UITabBarContoller, UITableViews, UIWebViews, and UINavigationController works, in order to make the first Jewish app in Portuguese (also available in English, Spanish and French).

It’s free, here:

Português: https://itunes.apple.com/br/app/pirkei-avot-a-etica-dos-pais/id353770815?mt=8

English: https://itunes.apple.com/br/app/pirkei-avot-ethics-fathers/id362026175?mt=8

Français: https://itunes.apple.com/us/app/pirke-avot-les-maximes-des/id373990829?mt=8

Espa√Īol:¬†https://itunes.apple.com/br/app/pirkei-avot-en-las-sendas/id361716000?mt=8

TehiliMP3

Translated and transliterated Psalms, with Hebrew and with MP3 audio. Available in Portuguese and English translations.

A big dream that I was able to realize after a lot of work!

Webviews running Javascript actions, StoreKit, local notifications, AVFoundation, and more are used in this app.

It’s free, you can get it here:

https://itunes.apple.com/br/app/tehilimp3-salmos-traduzidos/id500549396?mt=8

BDK App

Finding Kosher products in Brazil was not as easy as in USA or Israel.

You needed to always walk with a little book (that had a list of more than 1,500 products), and find the product in. Ah, the list gets updated every week, and every 6 months a new book is published…

Now, it’s in people’s pocket.¬†Brazil‚Äôs Kosher list, always updated, easy and fast to search for a product.

Core Data and AFNetworking are the core of this app!

You can check it out here: https://itunes.apple.com/kn/app/bdk-mobile-beit-din-kashrut/id574293928?mt=8