Rapture In Venice, LLC

:: Freelance iOS Development & Team Augmentation

So My First Week Being Self-Employed Is Over…

I’ve been a professional software developer since 1998 when I took my first job at InfoBeat helping to build out the great set of email services that, well, have been sold off so many times they seem kinda spammy now. For 14 years I’ve been continuously employed with Exactis, Qubit Technology, CorAccess Systems, InsureWorx, EffectiveUI, up until Double Encore. But not today.

This week is the first week in my life that I’ve been self-employed and I want to tell you how it went.

Gratuitous backstory!

I’ve debated going this route for a few years now. Five years ago I began a mini-career as a moonlighting Java ME mobile developer doing business as Rapture In Venice. Over time, I made good money from it and my day job, also as a developer, got harder and harder. I’d continually be thinking about my side projects or worried about the hours I was going to have to put in that night. Those projects paid about twice my day rate, but I found I was consistently working 55 hours a week in order to maintain my double identity. Credit cards got paid off, new toys were being purchased, and so the strain it took on me was just something I dealt with.

About 3 years in to it, I really started hitting my stride getting customers. I basically had one customer for the first 2 years, NetFuzion, then once I started spreading my wings and getting the hang of dealing with contract negotiation and client management, things started to explode and I started turning down business for the first time. I always found it hard to do. Yes, there was no way I could fit 2 or 3 side projects in my schedule at once, but as I presume any consultant will tell you, it’s hard to say no to someone waving a check at you.

The last 2 years have been a grind. My wife and I have 3 kids now and I’ve had times where I needed to turn down playtime with them. Trust me, you dads-in-waiting, that’s a killer. Plus, she stays at home with the kids, so we’re single income and we became quite dependent on the side work. Without it, the bills didn’t get paid. (Kids are pricey, man!) So I was taking more work, 2 projects a time. And it took its toll.

About 7 months ago I had hit my limits at EffectiveUI. I felt tossed around, being flung from one project to another, sometimes 3 or 4 at a time, and my code quality dropped. I had to make a decision…go with Rapture In Venice full-time or change companies. I came close, but ultimately I changed companies. I was afraid. Despite feeling like I’d proven myself, I was terrified to do it. To take that plunge. Melody was just born and we had a mountain of medical bills. It was a bad time, so I passed. But, after 7 months with Double Encore, and getting the right size contract to launch off of…I did it…

…I finally did it…

So how did It go for me?

This week has been a dream. Making the switch has been everything I hoped it would be and more.

Over the weekend, I finished building out a home office in my basement. I sat there Monday morning at 8 AM sharp. I stared at my new 17″ MBP and felt the peace of my darkened den. This little machine and my knowhow were going to come together to earn my living. And not just any living, my goal is to double my full-time salary. All of that without side work. 40 hours a week, or as close to it as I can reasonably get.

One of the first benefits I quickly took advantage of is that instead of scheduling 40 hours of work in a week, I could schedule 40 hours of my career instead. So I decided to use the first 30 minutes of every day for Coding Kata. Instead of doing iOS programming, I’m using it to learn Ruby better. Not only am I progressing rapidly, it’s become my favorite part of the day, where I embetter myself without any regard to any other work. It stimulates my mind. And the best part is that I can schedule something like this without needing a progressive or Agile company to do it for me. I made the decision. How liberating is that?

The working from home part is great, too. I did it a lot with EffectiveUI, but rarely at Double Encore. Having the office nook gives me a lot more peace than it did before. On Tuesday, I took time off to bring my son, Cedric, to his first day of preschool. I didn’t have to schedule this time off or be forced to make up the hours. I just did it. Once again, amazing.

A few times, I spent some time playing my old Nintendo. It’s my work. My schedule. And when I need the break, it’s nice to take that break for as long as I need and however I want without the big boss man looking over my shoulder. I can definitely see myself stopping everything to spend a couple hours, maybe even a whole day, learning a new platform slowly and surely with no regard to the billing department.

One thing that happened that I wasn’t prepared for by any of the blogs I’d read, though, is how much time I spent not coding. For instance, I spent a good 8 hours this week attempting to acquire more work. I sketched out proposals, talked to prospective clients, and spent a few hours today at Toast finalizing a new contract. In retrospect, of course this makes sense, but it still came as a surprise. I expect that time will drop down to just a few hours a week from here on out, but it’s something to keep in mind. Unless you’re working more than 40 hours, you’ll likely only do 30-35 hours of actual coding.

Is Consulting right for you?

I admit, I’m lucky, I stumbled into this. When I started doing my part-time work, I’d actually been looking to leave Fiserv entirely, but when a mobile job I interviewed for fell through (it was gonna be an ugly commute each day), I came home and minutes later found a 10-15 hour part-time job that I got hired for straight away. It happened to be through a consulting agency, but 6 months later when the contract expired and he hired me directly, I found out I would have to do my own taxes and…well…if I had to it myself I might as well look for other opportunities. By the time this week rolled around, I had no problem finding customers so the transition was easy. For someone who hasn’t gone down this path, it will be much harder.

If you’re considering this move, decide first if consulting is what you truly think it will be. What you might find is that you’ll leave your full-time job for a higher-paying consulting gig, maybe a 3-month contract, but with no benefits and no one to handle your taxes for you. $65/hour may seem exciting, but trust me you were likely making close to that when you consider what you’ve lost. Namely insurance, convenience, and peace of mind. And that’s *after* the health reform law fixed some of the kinks. :-) On top of that, you’ll still be taking instruction from a boss if you take this kind of work.

However, if you’re willing to find and work with your own customers, that’s when you find true enlightenment. You choose your own projects, you manage your own schedules, you decide on your own technology choices. I tell you what, there’s nothing better in the whole world. I can say this: If this isn’t a goal of yours right now, it should be.

Bliss. Bliss I tell you. Bliss.

  • Print
  • Facebook
  • Twitter

,

InnerBand Tutorial Part 1: Introduction and Functions

Over the course of developing many iOS-based apps for a variety of customers such as Sports Authority, Navy Federal Credit Union, Fuzz Alert, Map My Fitness, and more, you begin to sense a pattern with how you use the iOS SDK and what your coding practices are in Objective-C. An overwhelming sensation that you’re doing a lot of the same things over and over again — in about the most verbose way possible. Let’s face it, Objective-C is not only an ugly language, but the SDK is missing a lot of very basic functionality to get your job done more concisely.

That’s why I built and maintain the InnerBand Framework. It’s a small module that serves as a sidekick of sorts to your normal development. The idea came to me (and its original co-developer, Sean Christmann) following a series of projects where we were using the Three20 framework. The promise of Three20 was that it gave you the tools and added functions that you need to save time architecting your app so that you can focus on the business logic.

So much for promises, right?

Three20 suffers from the taint that many open-source projects can’t shake: It’s practically undocumented and it’s got bugs. What this means is that you’ll spend hours trying to figure out how it works, and when you do, you’ll spend many more hours either fixing it or making it do what you think it’s supposed to do. That’s not saving time.

To make matters worse, Three20 takes the traditional SDK. If you use it to all its abilities, you’ll be building your navigation without using UITabBar or UINavigationController, you won’t be using the table view framework anymore, you’ll be lost to change your status bar color and you’ll be locked into an unwieldy styling framework. Then, when iOS 5 comes out, you need to wait for a whole new slew of updates.

So, after three projects’ worth of using it, I’d gained a ton of experience and knew how to use it pretty well, but found I’d use it less and less the more I knew. I’d scrapped the styling framework, it just didn’t win me enough to overcome all I was losing. I dropped the new table view framework because individual styling of cells became an absolute nightmare. (I yelled out loud once in the office over it.) By the third project, I was having so many crashing issues using modal views (due to added constraints of simultaneously opening and closing them) that I was practically reduced to tears.

And so I wrote InnerBand.

InnerBand is Born

The goals of InnerBand are simple:

  1. Build a library that complements the iOS SDK rather than override it.
  2. Make it so simple and integrated that the new functionality feels native.
  3. Make it quick and easy to install in your project!

When you import InnerBand into your project, you are receiving a set of classes, categories, and macros that augment your daily development in a way that speeds it up without hiding the SDK from you. You can exercise every aspect of it or nothing at all. If you’re using the new Core Data methods to make access easier, you can use the standard methods at any time, too. It’s your choice.

It’s also 100% unit tested. It uses GHUnit to make sure everything that gets added to InnerBand works and won’t fail you. My hope is that InnerBand will speed up your development, not require to become a low-level expert on it’s code to be able to use correctly.

Installation is Simple!

The InnerBand Framework is hosted on github and offers a unique installation method once you’ve downloaded it. You install a minification of InnerBand that encapsulates the entire library into a single .h/.m pair!

Run the minifier with the following commands:

cd InnerBand/InnerBand
../minifier/minify.sh all

This creates a minification that includes the complete InnerBand system. If you don’t care to use the UI components, you can also run this instead:

cd InnerBand/InnerBand
../minifier/minify.sh core

The minified source is copied to your Desktop. Just copy it to your project and import it where needed. I recommend adding the import to your PCH file so you don’t have to worry about doing it everywhere.

You’ll need to add the CoreData framework to your project as well, and then that’s it. Now let’s check out what you’ve gained!

Getting Started

The first thing you’ll want to check out in InnerBand are the functions and macros. If you want to browse these, they are in Macros.h and Functions.h. Here are some highlights.

Boxing and Unboxing Numbers

Gone are the days of bulky NSNumber wrapping! You can convert your primitives to NSNumber with BOX_BOOL(x), BOX_INT(x), BOX_SHORT(x), BOX_LONG(x), BOX_UINT(x), BOX_FLOAT(x), and BOX_DOUBLE(x). Conversely, you can unwrap NSNumber objects with UNBOX_BOOL(x), UNBOX_INT(x), UNBOX_SHORT(x), UNBOX_LONG(x), UNBOX_UINT(x), UNBOX_FLOAT(x), and UNBOX_DOUBLE(x).

These functions are not only quicker to type, they are easier to read and understand when reading the code. Semantics! They are named for what they do and they stand out, which is why they’re among my personal favorites.

Rectangle Magic!

Rectangle manipulation can require some bulky code. For example, the standard procedure for changing a View’s size is to copy the frame, change some part(s) of it, and then reassign back to the View. That’s 3 or more lines of code and is re-written so often it begs to be cleaned up. These functions make it much easier.

Want to shrink up your rectangle? RECT_WITH_WIDTH_HEIGHT(myView.frame, 10.0, 10.0).

Want to move your rectangle? RECT_WITH_X_Y(myView.frame, 20.0, 20.0).

Want to create a series of rectangles, perhaps positioning a set of buttons one on top of another? RECT_STACKED_OFFSET_BY_Y(prevButton.frame, 10.0).

Let’s explain that last one. The function call duplicates a CGRect and then offsets it in the Y direction. In other words, if you’re laying out a set of 3 UIButtons in a vertical stack (ala LinearLayout in Android), you could write code like this:

UIButton *a = ...create my button somewhere...;
 
UIButton *b = ...create new button...'
RECT_STACKED_OFFSET_BY_Y(a.frame, 10.0);
 
UIButton *c = ...create new button...'
RECT_STACKED_OFFSET_BY_Y(b.frame, 10.0);

This results in three buttons flowing top to bottom with 10-pixel gaps between them.

Math Helpers

These are intended to solve some common maths for you. Here’s a sample:

  • DEG_TO_RAD(180.0)
  • RAD_TO_DEG(1.0)
  • RGB256_TO_COL(224)
  • COL_TO_RGB256(0.7)

One of the most common idioms, forcing a number to be constrained between a minimum and maximum, is especially cumbersome because your code might do it with something that looks like MIN(MAX(myNum, 0), 100). It’s a little backwards to write, can easily have a bug in it, and certainly is going to make the next developer take quite a bit of time to decipher. Want to constrain between 0 and 100 in InnerBand. Try this:

  • CONSTRAINED_INT_VALUE(myNum, 0, 100)
  • CONSTRAINED_DOUBLE_VALUE(myNum, 0.0, 100.0)

Done deal. Their use should be clear. :-)

Where Do We Go From Here?

Well, that was only a very small part of the macros and functions InnerBand provides. They’re always being added, so explore the current codebase for yourself! In Part 2: Core Data Quick and Easy! I’ll review the Core Data Store, a handy set of methods that make using Core Data much easier!

  • Print
  • Facebook
  • Twitter

, ,

Coding Kata Exercises

Coding Kata are simple problems you can solve using TDD techniques to help you practice unit testing and development with various platforms and languages as well as to “sharpen” you up for the day. Get the brain working. The fingers moving. You know. :-)

I’m compiling a list of Kata to practice with here. Give one a try:

Convert Arabic Numbers to Roman Numerals

1 to 100.

Fizz Buzz

If a number is divisible by 3 return “Fizz”. If it’s divisible by 5 return “Buzz”. If it’s divisible by both, return “FizzBuzz”.

Calculator

Given a string such as “5+4*3”, calculate it. Order of operations should be observed.

ROT13 Encoder

Encode a string with ROT13. (A is N, B is O, etc.)

Logic Gates

Build a set of logic gates that can be combined to create large expression. (AND, OR, XOR, NOT)

Fibonacci

Return a fibonacci sequence of any specified length. (1, 1, 2, 3, 5…)

Prime Numbers

Create an isPrime() method.

Time is Relative

Write a Facebook-style method that returns time qualitatively. If the difference between two timestamps is less than 5 seconds, return “Just moments ago.” If less than a minute, return “X seconds ago.” If less than an hour, return “X minutes ago.”

A Better Array (iOS-specific)

Jazz up NSArray and NSMutableArray. Add methods such as firstObject, secondToLastObject, map (creates a new array from iterating each item of an existing), and reverse.

  • Print
  • Facebook
  • Twitter

, ,

My Hero, Heroku

A friend and co-worker of mine, Tony Hillerson, was once scheduled to rebuild a backend system for a client of ours. His idea was to replace our tiny little PHP friend with a Heroku implementation. He described it as Rails on a cloud and I kept it in mind cause I loves me my Rails. Amiright?

About 8 months later, a customer project came about and I felt Rails would be the perfect solution for the services and web site he needed. (Full disclosure: it always is.) I decided to look into Heroku and, let me tell you, what a success the project has been!

Heroku, despite being a cloud service, is the most transparent cloud service imaginable. To use it, you simply create your rails project and then connect it to Heroku with a couple simple commands. Heroku dynamically generates a name for your site. Now, just push your site to Heroku and all of your migrations and restarts happen automatically! (Heroku is married to git in order to do this, which is fine, because I love git, too!) It’s truly magical. You get your web site on the cloud with no catches.

AND IT’S FREE! (YES, FREE!)

Well, OK, it’s free if you don’t need any extra power. Heroku uses the concepts of web dynos (processing power) and worker dynos (increased capacity). You can buy extras of these for $36. For $0, you still get good performance and, in the best interest of developers, you won’t have to pay anything while you’re building things out.

Once the project is over, you can leave it to the customer to decide if they want to increase the Heroku power behind their site. In my first case, there was no need. The site runs for free because the server needs are low. In other cases, a few dynos cost next to nothing but have a drastic effect.

Mmmmm, scaling…starting at free.

I’m certainly spoiled by Heroku. You should get spoiled, too. Give it a try!

  • Print
  • Facebook
  • Twitter

, ,

Introducing WebImageView

As a big fan of SDWebImage, I was both shocked and dismayed that the Android world had no such component. If you’re not familiar, SDWebImage is an iOS UIImageView extension that lets you set Web URL’s and have them automatically loaded and cached for better performance later.

Often, a developer can get away with their own loading if a single screen has a single graphic to display. Not so for table views, which not only require a lot more concurrent loading but need to be able to properly handle cancelations efficiently as items scroll onto and off the screen.

So, Rapture In Venice has authored the URL-loading, caching WebImageView for Android developers and it’s available for free on GitHub. Documentation included.

Enjoy. :-)

  • Print
  • Facebook
  • Twitter

Previous Posts Next posts