Top
About Me

@WiredBob
I'm an agile software developer with a particular interest in iPhone software development at the moment.  At work I'm doing mostly Java on Windows but my real operating system of choice is Mac OS X (as I'm sure you can tell from the rest of the blog).  I'm currently working on a large media content management system.

My Tweets

Twitter Updates

    follow me on Twitter
    What I'm Reading

    StackOverflow

    Entries in programming (3)

    Saturday
    23May2009

    Eclipse Working Sets

    Eclipse is a fantastic IDE, especially for developing Java code. However, recently I've been getting a little irritated by its speed. This is probably exacerbated by the fact that the code I'm working on has about 20 Eclipse projects in it's source tree and thousands of source files. Eclipse gives the developer plenty of help - it does code completion, resolves dependencies, performs automatic imports and refactors across projects - all of which come at a cost. I'm not sure how much time i've spend waiting for my workspace to build, but it can be 10% of the day at worst! Even navigation through that many files becomes a productivity issue.

    Recently i've found what is probably a fairly obvious feature of Eclipse but if you haven’t found yet it the concept of “Working Sets” should be useful.

    Working sets are a way of choosing only those projects and files that are relevant for the task in hand. It's an alternative, more focussed way to view source files and resources that the Project Explorer - that can really get out of hand if you are working with more than, say, 10 projects. At the simplest level, working sets allow you to configure multiple profiles of visible projects that you can select from depending on the task you are performing. For example, if you are only working on the Eclipse projects that deal with order management in your system, you can select the “Order Management” working set and it will show only those Eclipse projects in the Project Explorer.

    You can also bring working sets much further - you can select individual packages and files to form part of the working set (you can even create a working set of breakpoints), so you can be very specific about what you want to split out and see in context. All-in-all it is a useful way to make your Eclipse environment significantly easier to navigate.

    To manage working sets use the dropdown arrow on the Project Explorer.

    Click New... to create a new working set and select the type of set you want. The default Java type is usually fine for Java programming.

    Select the various resources that should be part of the set, and give it a name. The resources can be anything - files, packages or projects.

    Finally, use the dropdown menu on the Project Explorer to change active sets.

    See the video tutorials here for a walkthrough http://www.peterfriese.de/eclipse-working-sets-part-i/.

    Thursday
    16Apr2009

    Wil Shipley's App Hype

    I came across this video from the C4 conference of the famous Mac programmer Wil Shipley talking about how to generate hype and buzz for your applications.  He talks alot of sense - in fact most of it seems like common sense - but there are alot of things that most of us probably won't pick up straight off.  If you're a Mac/iPhone programmer you'd do well to take some of this onboard.

    I found out about Wil after downloading Delicious Library 2 as part of the Macheist bundle, and then realised he was one of the founders of The Omni Group - check out OmniGraffle if you want to draw fantastic looking diagrams!  Great examples of simple, cool apps.  He is also worth following @wilshipley.

     

    Sunday
    12Apr2009

    How to rename an Xcode project 

    I've recently been working on a iPhone framework which performs Tweetie style navigation - basically supporting a tab bar controller within a navigation controller, as this isn't supported natively by the iPhone SDK. I developed the framework in a seperate project and wanted to use this as a base for a new project I've just started working on. It's fairly simple to take a copy of an existing iPhone Xcode project and rename it for a new project - here are the steps I followed -

    1. In Finder, copy the old project directory to a new location and rename the folder to reflect the new project name.
    2. Move the <oldproj>.xcodeproj file in the project directory to <newproj>.xcodeproj.
    3. Open the new xcodeproj file/project in Xcode.
    4. If using version control on the provious project, turn that off - right click the project, Get Info and set the version control drop down value to "None".
    5. Refactor those classes that carry the <oldproj> name e.g. open the application delegate header file <oldproj>AppDelegate.h, right click the class name <oldproj>AppDelegate and then select refactor. Rename to <newprog>AppDelegate, Preview then Apply. Repeat this for any classes that hold the old name.
    6. In Other Sources, pick the <oldproj>_Prefix.pch file and refactor - rename to <newproj>_Prefix.pch.
    7. Select the <oldproj> build target and rename to <newproj>.
    8. Bring up info for the <newproj> target - Select “All Configurations”, “All Settings” and navigate through the build configuration settings changing these references of <oldproj> to <newproj>
      Product Name
      GCC_PREFIX_HEADER
      Build and test