Blog

This is Brick by Brick – the BitMethod blog spanning everything from tech to code to business philosophy…not to mention bringing a little Valley culture to Flyover country.

Grab the feed

Authors

Categories

Newsletter

Sign up for our newsletter and stay in the loop.

Join Our Mailing List

Search

BitMethod's Code Library

by Neil Roberts in , 7 September 2011

As part of BitMethod’s iOS Development class through Spindustry Training, I share and discuss our code library. All the code that we’ve developed as part of the iOS apps that we’ve released (including Eat Sleep and 80/35) is made available and the more significant bits are explained.

You’ve probably heard great things about developing for iOS and the code libraries that Apple provides with Cocoa Touch. Even though it is an expansive, solid library, it can’t be everything to everyone. At BitMethod, we’ve had to take over where Cocoa Touch stops to achieve the goals specific to our projects.

When I was getting started with iOS development, I really struggled with making the HTTP requests that allow me to submit and download information from our servers. In my first application, I did all of the complicated setup, concatenation, and parsing of data using a mixture of copy-and-paste and low-level code. Convinced that there must be a better way, I discovered the ASIHTTPRequest library. Libraries allow programmers to forget about some of the grunt work and concentrate on making the actual product.

David Walsh provides his reasons for using libraries:

  • Don’t Reinvent The Wheel.
  • Do More With Less Code.
  • Save Time.
  • You Aren’t The Expert.
  • Speed Thrills.
  • Avoid Cryptic Code.

If you decide to read David’s article, you’ll learn that while using a library can be great, there are compromises. I’ve made every attempt in my code to avoid these compromises. Our library does not try to fix every problem. Our library attempts to prevent what’s known as leaky abstractions by exposing the low-level code that lies under the hood. This means that our library is shallow, only trying to knock down the major pain points.

Because I like to practice what I preach, I use several libraries in conjunction with our code. You may benefit from giving some of these a try:

Libraries are great resources for new programmers; you can bypass low-level annoyances while learning how you might approach solving the problems you will encounter. Students of our iOS Development class will not only have BitMethod’s libraries available to use, but understand how the code relates to their projects and how to use it as basis for creating their own library. Regardless of what instruction and resources are available to you, I strongly encourage you to learn about how to create reusable code and what makes for good API design.

Neil Roberts

About the author: Neil is a Dojo master (unrelated to Kung-Fu) and an accomplished programmer, educator, and author. He’s recently developed projects for iOS, Android, and the web. Neil freqeuntly runs JavaScript and iOS training programs for enterprise-level development teams, and has taught at Sun’s JavaOne Conference.

Reach out to Neil Roberts at neil@bitmethod.com

Comments

Leave a Comment

Add your name, email, and message to comment. Website is optional. Your info is safe, no worries. You can format your comment with Textile.

Please note that you must preview your comment prior to posting it.

If you can see this field, leave it blank