Hello Chuck. (My "Hello World" in iOS)

Little known fact about me right now is that I’ve started taking classes for Grad school recently.   I had the opportunity to take an iOS class as an elective right now which in my mind is killing two birds as the phrase goes.  I’ve wanted to see how this kind of development worked for some time.   All said I done now that my project is over I think Objective-C programming (I didn’t look into the new fancy swift yet) is a bit convoluted and hard to grasp some idiosyncrasies in the syntax, but overall a good experience.  I wouldn’t call myself a real programmer by any stretch of the imagination.  I’m a decent scripter.  I’m good at quickly figuring out how to make something work and showing it off, I guess in my work world we would call that a proof of concept.   But I am by no means elegant or efficient.   I leave that to much smarter people.

My idea was that I wanted to learn how to do REST api communication from an iOS application.  I planned to do something relatively simple for my class project that would teach me the basics, and then later I would build something bigger, perhaps to integrate into some of my other mad scientist-like projects.  And that is exactly what I did.

Behold, Hello Chuck.

Screen Shot 2014-06-26 at 9.54.44 PM

I’ve posted about other fun REST api’s previously like FOaaS but I do not believe I have talked about The Internet Chuck Norris Database.   This web service consists of a few simple REST endpoints that will return a chuck norris joke.  Simple right?   As I am typing this their website is down (or they are filtering me due to all my API calls in developing the app…) so I’ll reference an archive.org link here.

The most simple use case is a GET to http://api.icndb.com/jokes/random to retun a random joke:

Screen Shot 2014-06-29 at 8.57.38 PM


I learned how to persist this data in multiple ways within the app with Archives, SQLite, and Core Data.   Showing the jokes from storage in a table view.   Neat stuff:


Screen Shot 2014-06-26 at 9.53.24 PM


I had to add a few more use cases to the app for the class so luckily there were a few other end points available.   One inputed a firstname and a last name to customize the joke.  In the app I made it look like:



I also added functionality to pull multiple jokes at once from an endpoint, and one that produced a joke from the ID key.   Not very sexxy to show off but were good use cases to learn how to develop.

All in all it was a fun project that exposed me to a new technology.  I have a ton of ideas for new apps I’ll probably only get a chance to develop 5% of them.   We’ll see.   I did submit it to the app store this past week, though I’m sure it will be rejected based on the usage of a a celebrities proper name.   Damn you Apple Censor Board!

If it does get posted, check it out!



Tagged , ,

Leave a Reply

Your email address will not be published. Required fields are marked *