02
Jun
11

iOS Dev Links

Tools

  • Xcode 4 – Xcode 4 is a big jump from 3. I have to admit Visual Studio is great, yet I like the simple yet complete IDE. You can get this in the AppStore or from the developer site.
  • CodePilot – a good tool for searching through source code and files.
  • AppCode – this is a new IDE to the market from JetBrains. It has a lot of great potential with the backing of JetBrains.
  • Accessorizer – This is a must have tool for XDE. It helps to enforce coding styles and reduces typing. You can pick this up in the AppStore.
  • TeamCity – This is what I use to do Continuous Integration builds for my projects.
  • AppScanner – Find what might get you rejected before submitting your app. It will look for private API usage.
  • OmniGraffle – A great tool to use for designing just about anything. I use it to do most of my iPhone / iPad layouts. Helps make doing the UI much easier.
  • Kaleidoscope – Probably the best diff tool for the Mac. Great UI and integration with just about everything.
  • Versions – A great tool for use with Subversion. Although I am a command line guy, I use it to watch projects I am interested in or use.
  • SourceTree – A great tool for use with Mercurial and Git. Again, I am a command line guy, but I use it to watch projects I am interested in or use.
  • CSSEdit – Do you have a love / hate relationship with CSS? This will make you forget most of the hate.
  • TextMate – The jack of all trades text editor.
  • XScope – If you do a lot of web development, you will love this tool. It makes doing pixel perfect measurements a breeze on screen.
  • HTTPScoop – A great tool for sniffing HTTP traffic.
  • HTTP Client – A great tool to test out those web sites to see what is going on.
  • SOAP Client – I don’t use this a much anymore, but if you run across SOAP methods you have to use, good to have this tool around. I almost put this in the open source area because you can get the code for this.
  • XML-RPC Client – Yes they still exist. If you want to test out those methods… this tool is helpful.
  • Icons – Get those icons for you Mac / iOS app with shine.
  • Sound Stage – After you make that great iOS app, record your demo to get those sales.

OSS

  • Facebook
    • Facebook IOS SDK – If you want to do any Facebook integration with your app, this is the SDK for you.
    • Three20 – Good set of UI classes to help build your app. If you want to connect your TableView to the internet as a data source, this can help.
  • ASIHttpRequest – If you are doing anything network you will want to use this library.
  • JSON Framework – Framework for creating / reading JSON objects,.
  • MBProgressHUD – If you are displaying a HUD or progress indicator and want something a little more than the activity indicator, use this.
  • TapkuLibrary – A great library that has some good reusable tools / UI code.
  • NSLogger – Track down those annoying bugs and extend NSLog.
  • RestKIT – I have not used this yet but looks promising if you are doing REST calls in your application.
  • iOS Azure Toolkit – Good toolkit to connect easily to Windows Azure.

Testing

  • OCHamcrest – Toolkit to write matchers for your tests. Replaces the asserts you normally use.
  • OCMock – Mocking framework for your tests.
  • Tuneup JS – A set of extensions for the UI Automation Instruments tool.

Copied from: http://lostechies.com/scottdensmore/2011/05/30/mac-and-ios-development-toolbox/

10
Oct
10

Project Management at its FINEST

I love this analogy of software projects, it makes me laugh and cry at the same time….

Cheers,

-al

 

09
Oct
10

Testing / Unit Testing – Session 1

Notes from a testing session I ran earlier this year.

Test Driven Development – http://en.wikipedia.org/wiki/Test-driven_development
Unit Testing – http://msdn.microsoft.com/en-us/magazine/cc163665.aspx
QA Plan: http://readyset.tigris.org/nonav/templates/qa-plan.html
Test Cases: http://readyset.tigris.org/nonav/templates/test-case-format.html

eg: Steps to carry out the test. See step formating rules below.

  • visit LoginPage
  • enter userID
  • enter password
  • click login
  • see the terms of use page
  • click agree radio button at page bottom
  • click submit button
  • see PersonalPage
  • verify that welcome message is correct username

Copied from <http://readyset.tigris.org/nonav/templates/test-case-format.html>
 

  • Test your unit test, ensure your test coverage by changing facets of your code, and ensure that the tests fail
  • Make tests easy to run, anyone should be able to check the code out and execute the unit tests without a hitch
  • Make sure your errors returned are meaningful
  • Use factories for class instantiation in unit tests, otherwise changing a class will ultimately break your tests
  • Write reused configuration code in methods for the same reason as above
  • Avoid dependencies between tests this can create confusion if they need to be run in a specific order, test isolation is mandatory
  • Avoid multiple test assertions in one test, the method will return on the first assert so subsequent test results will remain hidden. It will be easier to diagnose if all the tests are returning results
  • Create readable tests with meaningful variable names and comments if needed
  • Avoid partially relevant code in your setup method, unless a member variable is required in EVERY test do not put the member in the initialiser

     

Sample unit test QA integration:

We will develop and maintain a unit test suite using the NUnit framework. We will consider the boundary conditions for each argument and test both sides of each boundary. Tests must be run and passed before each commit, and they will also be run by the testing team. Each public method will have at least one test. And, the overall test suite will exercise at least 75% of all executable statements in the system.

 

Key here is that writing a good unit test is not a trivial exercise

09
Oct
10

Synergy Setup for Mac & PC

This guide will describe how to share a mouse and keyboard between a Mac and PC. In this solution our PC will be the server, ie. The computer where the mouse and keyboard are connected, and our Mac will be the client. The guide will be broken up into 2 sections:

  1. PC Instructions (server configuration)
  2. Mac Instructions (client configuration)
  1. PC Instructions
    1. Navigate to: http://sourceforge.net/projects/synergy2/files/
    2. Click the “Download Now!”
    3. Install and run Synergy
    4. Select “Share this computer’s keyboard and mouse (server)
    5. Click “Configure”
    6. You now need to configure each of the computers that will be sharing the mouse and keyboard. To do this, under the “Screens” list box, click the “+” button.
    7. In “Screen Name” enter the network computer name of a computer that you want to share a mouse and keyboard between. In “Aliases” enter in any additional names that your computer might be known as, then click OK.
      Note: This step might seem a little vague, as an example my configuration at home is:
      1. Macbook with WINS name “MCSNEEZE”, and a local hostname of mcsneeze.local
      2. Windows Laptop with a WINS name of “ALLANW-L7″
      My Mac config looks like:
    8. My Windows config:

    9. Perform the last 2 steps for every computer that will share the mouse and keyboard, this includes your server.
    10. Next you need to tell Synergy how your screens are positioned. To do this, in the drop down boxes highlighted in red, select the positions of you screens relative to your server. Then click the “+” button. eg

    11. Next, select the positions of your screens relative to each of your clients. Then click the “=” button. eg.

    12. The final result should look something like:

    13. Click “OK” to head back to the main options window
    14. Click “Start” to start your server, alternatively if you want to see log information click “Test”
  2. Mac Instructions:
    1. Install and run SynergyKM
    2. Click “Connect to a shared keyboard and mouse”
    3. Click the tab labelled “Client Configuration”
    4. Enter your servers IP address or hostname into the text box, and click “Apply Now”
    5. Click the “General” tab
    6. Next it’s time to start Synergy and get this show on the road! Click “Turn Synergy On”

Now you’re done. If configured correctly you should be able to share mouse and keyboard across both your Mac and Windows machines.

09
Oct
10

iOS Developer Training – Session 1

Here are the notes from an iOS / Objective-C training session I setup earlier this year.

Areas of attention:

Goals – At the end of this session you will:

  • have familiarity with the terminology & tools useful in cocoa touch development
  • be able to create a new application in XCode
  • be able to run and interact the application in iPhone / iPad emulator
  • have an initial understanding of Objective-C
  • have an understanding of where to source additional information

Objective-C:

  • GOTCHAS:
    • Try not to look for the c# way to do things, you will waste time trying to find the equiv of a dataset on iPhone, likewise for event handling
    • Objective-C has embraced the flexibility in not using a strongly typed paradigm
    • Objective-C like C is NOT managed. Get used to the release message

       

  • Objective-C is a OO language which adds Smalltalk-style messaging to C
  • Strict superset of C, Objective-C OO is similar to SmallTalk OO, you talk to objects with messages rather than calling methods

    MyType *myType = [[MyType alloc] init];

    [myType myTypeInstanceMethod:10];

  • Null = nil in objective-c, the difference being you can pass messages to nil. In c# you cannot call methods on null. ie you can send messages to object that may not actually handle them, this is a dynamic typing feature borrowed from smalltalk
  • Class declaration and implementation are separate
    @interface MyObject{
    }

    - (void) myTypeInstanceMethod:(int) integerMethodParam;
    @end

    @implementation MyObject
    - (void) myTypeInstanceMethod:(int)integerMethodParam
    {

    // do things
    }

  • C# interface is called a Protocol
  • Static variables are declared in the implementation not the head
  • Prepend strings with @ to tell the Objective-C compiler that it’s an NSString, release messages are not required for these

    NSString *result = [NSString stringWithFormat: @"%@ %@",title,firstname

  • Enumerate through dictionaries
  • Memory Management:
    • If you create an object using alloc or copy then you need to free that object
    • If you didnt create an object directly then don't attempt to release the memory of that object
    • Combine alloc and init into one step

      MyClass *myObject = [MyClass alloc];

      [myObject init]

      // if init fails myObject will not be set to nil. Meaning we can’t simly test success by

      If (myObject)…

    • Rather than use [object release] try [self objectSetter:nil] where possible. This clears out the memory reference the release will not.

       

Cocoa Development:

  • [projectname]AppDelegate is created to handle (delegated) various interface objects
  • IBOutlet is nil, and replaced as such by the pre-processor. Interface builder uses these to identify to which properties interface objects can be linked
  • IBAction resolves to (void) and is used again by IB
  • applicationDidFinishLaunching: method is automatically called by the iPhone runtime once. Here you:
    • Initialise instance variables
    • Draw things on the screen
    • Make your window visible to display its contents
  • Interface builder:
    • Library provides a palette of controls that you might want to use in your applications
    • Inspector exposes attributes of UI elements
    • MainWindows.xib
      • File’s Owner:
      • First Responder:
      • Application
      • Window:

     

02
Mar
09

Remember the Singleton . . .

Whenever I need this guy (which is once in a blue moon) I find myself scouring the web for a reasonable example. It’s one of those patterns where if you stuff it up you could find yourself sacrificing thread safety, or a significant amount of memory.

So to save the effort of digging through 1000 over-architected solutions each time I need one, I figured I’d post a simple example.  Thanks to Yoda for this C# implementation:

 

public sealed class Singleton
{
    static readonly Singleton instance = new Singleton();

    // Explicit static constructor to tell C# compiler
    // not to mark type as beforefieldinit
    static Singleton()
    {
    }

    Singleton()
    {
    }

    public static Singleton Instance
    {
        get
        {
            return instance;
        }
    }
}

 

cheers,

-al

23
Feb
09

maps.live.com.au – Launch Public Collections Support

It’s been a long time coming, but we’re proud to say we’ve finally launched public collections support on our local mapping product http://maps.live.com/?mkt=en-au.

image

It’s been a good 4 months since Live began redirecting Aussie users to our ninemsn developed maps product. You were disconnected from the core US maps product (and therefore collections support) in an effort to unite Aussie users with some 2 million Australian business listings provided to us by Yellow (Sensis).

(Above: Victorian bushfires)

Fortunately Microsoft hooked us up with an API that allows international markets access to public collections. Giving us the ability to view all public collections within a defined area (bounding box query), and view single collections identified by a CID (collections unique identifier). However, we still don’t have access to private user collections, hopefully Live ID will one day open this up. With access to users private collections we could build in support for not on the display of, but also creation, editing, sharing, and all the cool stuff the core product supports.

Here’s a few screenies of some of the latest ninemsn crafted public collections:

image

(Above: Victorian bushfires)

image

(Above: Mumbai terror attacks)

Feedback is welcome.

cheers

-al

23
Feb
09

CTRL+ALT+DEL on SFIV

Eerie reflection on the Street Fighter / Gamer life cycle:

cheers

-al

22
Feb
09

JB Hi-Fi Breaks Official Street Date – a plus for ninemsn

17th February 2009, 2 days before the official AU launch of Street Fighter IV. JB Hi-Fi breaks the street date and begins selling Street Fighter IV. Too bad for those that had pre-ordered a copy with JB Hi-Fi Online. They certainly did not break the street date and I’m yet to receive my copy (SHAME!).

IMG_0265(2)

But one intelligent individual at ninemsn, *cough* Alby *cough*, saw the opportunity and rallied support to purchase a copy for the 360 stall in our kitchen.

Lunch breaks and late nights are now that teeny bit more pleasant then they used to be. Though  without an arcade stick, there will be many a blistered thumb across our work place. You’ll recognise us on the street, when a kind person gives you the thumbs up. Though instead of a thumb there is a stump, pink and raw, like they’ve lost a fight with a bench grinder.

(Left: XBox 360 stall @ ninemsn kitchen)

 

On another note, today is the first round of the Gamestop USA Street Fighter IV Tournament. Of the prize pool there’s Headbands, Mad Catz Fightpads, Fightstick TE’s, and first prize is a genuine SFIV arcade machine. Shoryuken is on the case, click here to see some interesting comments from a few of the contenders. Would be great to see this type of event hosted at EB AU stores . . . not likely though.

Chewy

If you’re a fellow Aussie and want to get your grubby hands on a Fight Stick Tournament Edition, JB Hi-Fi Online was advertising a release date in April (though i can’t seem to find the advertisements anymore). If anyone knows other places to get these please let me know . . . Chewbacca keeps hogging mine.

cheers,

-al

 

(Left: “WAAaaaaAAARGH” Chewy tapping out some SPD action. Chewy reckons his Gief has the clout to take down any Ryu)

 

[edit: 23/02/09] Found a link to the JB Hi-Fi Fightstick TE page here. More up to date info at ozhadou.

17
Feb
09

Street Fighter IV Prima Guide

cover

The cover of the guide I received in the mail today. This book contains basic moves, combos, character specifics, FRAME DATA, and some history guff and artwork. Good value, bring on the ass kicking.

See Prima’s blog for more information. Also I only just noticed that Prima copied my blog style. *sigh* We can’t all be original.

BTW I didn’t receive a second Mad Catz Fightstick Tournament Edition . . Probably a good thing, I can imagine the 24 hour Street Fighter tourney’s being hosted in my living room. Or more importantly the lack of attention my significant other would be paying me in return.

cheers

-al




Follow

Get every new post delivered to your Inbox.