Dec 19

Most people use Unit Test to run automatically during the build phase of the project. They provide built in regression testing, allow developers to analyze the code while writing the test, etc. One over looked analysis is seeing what sort of set up is required just to get the test to run. If your Unit Test requires defining and initializing of a large number of external systems (especially those that on the surface don’t seem like they should have anything to do with the system you are testing), you have a design issue. Your application is not Orthogonal, and perhaps a redesign is in order. This is particularly true with static elements of a system (this include Singeltons). As a full suite of tests may rely on the state of an external system not changing, which can’t be guaranteed with static globals.

So, next time you are writing a unit test, take a hard look at your set-up phase and make sure it doesn’t seem overly complicated. If it is, your system is not orthogonal and you are going to have problems if you don’t take care of them.

Tagged with:
Jul 04

There are a few steps that one must go through in order to setup their machine for iPhone development. First, you need to install XCode (and related tools), next sign-up for an Apple Developer Connection account, and last download and install the iPhone SDK.

Installing XCode

This is fairly straight forward. If you’ve recently purchased a new Mac, you’ll have a DVD with called the Tools Disk. Simply put this in the drive and run the installer. This will install XCode and many other developer tools. I’ll go over the tools in later posts as I learn about them. But some highlights are:

  • XCode – the primary IDE for Mac development. This is where we’ll be spending much of our time editing source code.
  • Instruments – a tool for gathering profiling information about your running application.
  • Interface Builder – this little guy is the graphical UI tool for setting up your interface and connecting it to source code.

If you don’t have the proper DVD, you can download the Tools DMG from the Apple Developer Connection Site.

One interesting note, is all Applications for development go into /Developer/Applications, not /Applications/Developer as I would have expected. I must admit this caused me a bit of confusion for awhile.

More information can be found at: http://developer.apple.com/documentation/Xcode/Conceptual/XcodeCoexistence/Contents/Resources/en.lproj/Basics/Basics.html

Sign Up for Apple Developer Connection

You can sign up for a free ADC account. This will give you access to a number of SDKs, including the iPhone SDK. It also gives access to a substantial amount of documentation (including the beginning iPhone development doc referenced below). Go to developer.apple.com and sign up. Later, we’ll need to sign up for the iPhone Developer Program (which is not free) in order to actually get our application to the iPhone device (rather than just the simulator), but that’s for later when we have something worth showing off.

Download and Install the iPhone SDK

Once you have your ADC account, sign in and go to http://developer.apple.com/iphone/program/sdk/. Here you can get the SDK (over 2 GB of SDK goodness). Once the download is complete, install it, and we are ready to begin.

Additional Info

I’ve decided to go through iPhone Development Guide for my first “Hello World” app. You can find it here: http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/000-Introduction/introduction.html

Tagged with:
preload preload preload