Having done the Apple developer tutorial Getting Started on iOS development, the next was to have a deeper dive in Objective-C. Looking around for online Objective-C tutorials, I came across a very good one, on Code School. The tutorial is called Try Objective-C.
My Contact Details
My Books
My Projects
Try Objective-C on Code School
My First iOS App
This is my first encounter with iOS apps and Objective C. I followed the whole tutorial which is given here. I am a Ruby developer and I decided to take this trip to iOS development because it is necessary for my work. I am offering professional services to Book&Table, which is sponsoring me writing this blog post.
Following this tutorial, I had to keep some notes. Here are the most important ones. Maybe you will find them useful too. But most importantly, I am seeking feedback from experienced iOS developers.
Rails Params Does the Job
When you have a Ruby on Rails end point, the client usually sends data in one of the following:
- For
GET
requests, URL encoded in the URI - For
POST
requests, in the body of the request encoded withapplication/x-www-form-urlencoded
orapplication/json
or other popular format.
Sometimes, there is a combination of the above methods. In other words, in a POST
request, some of the data may come both URL encoded in the URI and other data may come encoded with
another method in the body of the request.
Ruby Array Sum
This short post is going to demonstrate how we can sum an array of integers or an array of objects that have an integer attribute.
Let’s start:
Class vs Instance Variables
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
Delayed Job Best Practices
Read my new article on Site Point about Delayed Job Best Practices
You Don't Have to Be Afraid to Test Your UI - Page Object Pattern to the Rescue
Introduction
Many software engineers do not write tests for their UI because they have a good reason not to. Firstly, they believe that UI changes frequently, so any test would have been vulnerable to frequent changes. Secondly, they do not know about the Page Object Pattern.
United States, Counties, Cities, Zips CSV & Ruby Loading Code
I just wanted to have the United States, their Counties, the Cities in the Counties and the Zip codes in each City in CSV format. But I wanted that normalized. In different CSVs. So, here it is. You can also find here some Ruby on Rails sample code that loads these files. Primitive stuff, but sometimes useful.
Using String Column Type for Migrations
Ruby on Rails migrations are used to create the necessary tables inside our database. One of the most frequently used column type is string
.
Here is an example of an ActiveRecord::Migration
that uses this type:
The Clean Coder - a Code of Conduct for Professional Programmers - R. Martin (Pearson)
I have recently finished the book “The Clean Coder - A Code of Conduct for Professional Programmers - R. Martin (Pearson, 2011) BBS”. Here is my short review:
Overall: Fantastic. Worth reading for every developer that wants to become professional.
My Notes and Highlights
Chapter 1 - Professionalism
- Professionalism is a marker of responsibility and accountability.
- It is better to make your manager unhappy rather than your manager customers.