Hello World!
I'm a Developer at Master of Malt, a University of Brighton graduate, a 1st Kyu in Kyokushinkai Karate, a video gamer and technology enthusiast. Read more about me over here.
CloudANDTidus
Search
Gaming With Lemons
Games


Thursday
Jan202011

Marigold with blue, are you crazy!?

The only productive thing I did today was clean my desk, which had become quite a wasteland of crap. I suddenly have so much space now. My MacMini also returned to me yesterday, now with the added feature of actually working!

Sunday
Jan162011

No silicon heaven? Preposterous! Where would all the calculators go?

Stage 1 complete!Gutentag world!

Another week, another single post. I know I promised daily at the start of this, but this is certainly more blogging than I've achieved in quite a while. With any luck I will be able to at least increase the number of posts to a few a week. I think that's a reasonable balance.

Project wise; I spoke to my project supervisor on Monday and discussed what progress I had made over the Christmas break and where I planned to go from here. Since then I've finished the iPhone Programming book I was reading, and decided how I plan to store data in iWhisky. The choice basically comes down to directly using SQLite or using an Object-C library that sits on top of SQLite called Core Data. Core Data is pretty cool in that it works in a (kind of) similar fashion to Microsoft's entity framework that we've studied in Advanced Internet Applications Development. Instead of using raw C libraries and writing SQL yourself in SQLite, Core Data speaks to the SQLite database for you, and returns objects that you can work on instead of records. The book warns that much of the power of SQL is inaccessible when using Core Data, but as I plan to only have a very simple database inside the app I don't think this will be an issue.

Going forward from there, I've officially started development on my application! I've broken down the start of my development into three components to help me find a place to start.
Stage 1) Develop an app that can communicate with a web service and pull down a feed of products.
Stage 2) Extend the app so that the web service is a component called the first time the app is used, and store the data feed in the local database using Core Data.
Stage 3) Use the data stored in the app to construct the navigation and views.

Once these three stages are complete I should have the core structure of the app complete. The app will be able to communicate with the server, get and store product data, and allow you to navigate to products. From there it will be about adding features, both front end (adding products to lists, adding tasting notes, buying a product) and back end (syncing data with the mothership).

This week I already completed that first stage. I created a very simple RESTful web service in .NET and C# that returns just a Product ID and Name for just over 2000 products in my clients test database. I then developed a very simple app that calls that web service, parses the XML returned and displays the results in a table view (ironically table views on the iPhone only have a single column, so they are in fact lists…).

In other news, computers suck. In the past week I've had both my machines fail on me. The MacMini I mentioned last week that had it's hard drive die is at Apple being repaired. Meanwhile, my (three year old in September) white MacBook's back light is on the fritz. Occasionally I can get the back light to stay on on the lowest brightness, but for the most part it switches itself off a couple seconds after coming on. I'm going to have to take a trip to the nearest Apple Store (Brightion or Lakeside…) to get it fixed as I can't really be without it like I can with the Mini.

In other, other news, I completed the second Assassin's Creed over the weekend. The sequel is a great improvement over the original, which was incredibly repetitive after the first few assassinations. In an insane plan to play all three back to back to back I've immediately moved on to Brotherhood. I kinda wish I didn't ignore this series for so long. Which reminds me, I still need to write a post about the games I played last year. I should get on that…

Sunday
Jan092011

Time is an illusion. Lunchtime doubly so

Don't panic.Salut world!

Wow, my last post was on Monday, sorry about that. This Tuesday was the first day back at Uni and Karate, and Wednesday was the first day back at work for the new year. When I wasn't doing one of those three things I was busy rushing to get the documentation for my Flash assignment done before the deadline on Thursday. The week in general has been a pretty draining experience as I tell my body I can't follow the daily cycle I had over the Christmas break.

While I've not produced a lot more planning documentation for my project this week, I have made some great progress. While at work on Wednesday I had a meeting with my client where we discussed how the app should work and went over my interface designs. The feedback to the designs was very positive and he signed off on them. There were only a couple of suggestions for changes, which were:

  • Make the app UK only initially (and for the duration of my project) to remove shipping complexity.
  • Change the way accessories work to a screen where you add accessories to a product (rather than select accessories in a drill down menu for each product).
  • I hadn't planned how to handle user login. For now we will keep this the same as how the current website works and have the user create a login after submitting an order. This also removes some complexity.

The rest of my time has been spent filling in the last few holes in my Object-C / iPhone programming knowledge. There is no doubt much I still need to learn and many things I will discover as I develop the app, but I'm trying to hit the key things I know I will need before development begins.

Two of the things I've been reading about that are crucial to the app are web services and data storage. Many of the apps I've looked at that contain vast information about whisky have no backend support. When you download the app its a massive 400-500MB file full of data and images, and if they update it to add new items you have to re-download the whole thing.

One of the neat things about the app I plan to develop is it will have the full support of the current websites backbone, including the massive database of products. I'm going to use a web service at the initial launch of the app to download the simplest version of the product range (name, price, ABV and image url most likely) for the list views and then request more information on a particular product when the user selects it. On future loads of the app I can then do a similar call to sync any changes, such as a product being removed.

The good news is it seems very easy to call and parse data in Object-C, so long as I keep to single level XML. For some reason there is no tree-based XML parser in the iPhone SDK, and I don't intend to spend my time implementing my own. Following the book I've produced a simple app that pulls the top ten songs in iTunes from a RSS feed. My next step here will be to put up my own web service and try retrieving data from it. I need to decide if I should use a SOAP or RESTful service, as the SDK supports both.

The other thing I've been reading about today is data storage. The iPhone actually has four options here:

Technique Pros Cons
Archiving Allows ordered relationships (arrays, not sets). Easy to deal with versioning. Reads all the objects in (no faulting). No incremental updates.
Web Service Makes it easy to share data to other devices and applications. Requires a server and a connection to the internet.
SQLite Can fetch lazily. Incremental updates. Full power of SQL. Requires more code than archiving or Core Data. No real ordered relationships.
Core Data Lazy fetches by default. Incremental updates. Versioning is awkward (but can certainly be done using a NSModelMapping). No real ordered relationships. Much of the power of SQL is inaccessible.

Credit: iPhone Programming: The Big Nerd Ranch Guide By Joe Conway & Aaron Hillegass


Obviously I'm going to use a web service for syncing data with the mother ship, but I don't plan to rely on it the whole time. Archiving involves saving out my objects to a file in the app's sandbox. As it says above, this doesn't allow you to update individual records and is certainly not suitable for a database with over 4000+ products. So my choice really comes down to SQLite and Core Data. So far I've covered SQLite which seems pretty great, but I will withhold judgement until I have seen how restrictive Core Data really is.

So thats a project update. In other news I took my first run of the year with a couple guys from karate. I intended to make this a weekly thing near the start of last year but didn't have much luck at doing it more than once a month. Hopefully this year I can really keep it up. This, along with karate three times a week, should hopefully get me a bit fitter. I was particularly happy with this run as it's the first 3+ miles run I've done in a long time without stopping. Lets hope this keeps up.

Oh, and my MacMini died Friday…

It had been booting slower and slower (12+ minutes) and became quite crashy over the last week or so. I even got my first kernel panic. I tried all the usual things like fixing permissions, checking the disk, resetting PRAM and initially they seemed to help, but it eventually got too much and I decided to try a re-instal. That got very close to finishing before displaying a massive yellow warning triangle telling me the instal had failed and asked to restart the machine. When it did the instal disk could no longer see the hard drive, so I believe the technical description for where I am I completely fucked. Fortunately its under a year old and is covered by Apple, but for some reason their support line closes at 7:45 on a Friday and doesn't re-open till Monday.

So I got that going for me...

Monday
Jan032011

It's...a...giant...MUSHROOM! MAYBE IT'S FRIENDLY!

Ciao world!

Today I worked on some sketches for my social whisky application (which I'm dubbing "iWhisky" until it has a real name). These designs show the different views the app will have, and should give you a basic idea of how navigating will take place. The app will have a UITabBar at the bottom of the screen that will allow you to jump between three product lists (your wish list, your collection and your basket) and the ability to browse through all products. A NavigationBar located at the top of the screen then allows you to drill down into the different levels.

For example:

CategoryView (select browse by regions) -->

SubCategoryView (select the region Speyside) -->

ProductListView (select a product from the list or use the search box to narrow the list) -->

ProductDetailsView (product page with image, facts and tasting notes about selected product).

I've also produced an object diagram showing how these views and their controllers will be related. I've deliberately excluded the model part of this diagram until I have planned how I intend to store and retrieve data in the app. OmniGraffle worked pretty well for making this diagram.

Monday
Jan032011

This old baby's crashed more times than a ZX81

Hola world!

I've spent a good amount of time the last few days diving head first into the glorious world of Objective-C programming. Before I can do any serious planning for my application I feel I need to have a good head around the concepts in Object-C and how to do the basic things my app requires.

I'm much more familiar with web development languages such as C# and php so not only is the Objective-C language foreign to me, but so are some of the concepts around true software development outside the world of web applications. Not a lot of what I've worked on in the past has had to deal with the concept of memory management for example, which is extremely important in a low resource environment like mobile devices. My inexperience in this area isn't helped by the fact the iPhone doesn't have garbage collection, and so you have to get reference counting right or your application will leak like a sieve.

I've looked at many resources for learning iPhone programming, including website tutorials, Stanford University videos on iTunes U and the O'Reilly book, however I ended up using iPhone Programming: The Big Nerd Ranch Guide which was recommended on TWiT. It goes into great detail about every aspect of developing for iPhone, explains things very well, has great example applications you develop as you read the book and provides neat challenges at the end of every chapter to force you to think through and develop code on your own. It also has a great support form for people having problems.

Following the book I've developed this basic application (pictured bellow) that allows you to view a list of "possessions" (in this case whisky) that can be edited, re-ordered and deleted. Each possession contains basic details about itself, such as name, serial number, value and date created, along with a picture that can be added from the devices camera or picture album. I'm pretty happy with how it turned out, and feel I have a pretty good understanding now of how a simple iPhone application is structured, how to navigate between views, use table views to display and interact with data and how to write files to the applications sandbox. 

The book has many more chapters to go which I will continue to work through, however the biggest questions I have regarding my app right now are how interacting with web services and using a SQLite database will work on the iPhone. Fortunately there are chapters for both these things coming up later. 

As far as planning for my project goes, tomorrow I'm going to take a stab at working out interface designs. Before I can plan the structure for my code I need to know how many different views the app is going to have, how you navigate between them, what data they require and what user interaction they will have. From there I should be able to make an object diagram (which the book uses heavily to show app designs). The book recommends using OmniGraffle for this, which I will have a look at using the 14 free day trial, but the software better be amazing for the price they are asking.

Sunday
Jan022011

Smoke me a kipper

The lights have flickered a few times and now my router is very upset and wont give me internets. So instead of a real post about iPhone development, here is a picture of a ferret posted from my phone.

Saturday
Jan012011

Happy New Year

OMFG. THE CLOCK IS ZERO. EVERYBODY PANIC AND BLOW SHIT UP. O_O;;;

Thursday
Dec302010

Pearls of wisdom there from Mr fried egg, chili, chutney, sandwich face

It's all wrong!Yo world!

I made great progress with my flash game today. I might even call it finished, although I'm sure there is minor optimisation and clean up to be done at some point. I solved that silly focus issue, added a functioning difficulty setting, each with their own high score and added a "tummy gauge". 

The idea behind this is to add a little more strategy to the game. Each time food is consumed a section of the gauge is filled and it wont empty for two seconds. Eat enough food to fill the gauge before it has a chance to empty and the player is punished with a stomach ache that halves your speed until the bar depletes.

You can check out the finished product here.

On an unrelated subject, I ranted on the social medias yesterday about the 2011 calendar I got for Christmas. The calendar itself is great and does a fantastic job at doing calendar things like telling me what date it is, unfortunately it starts the week on a Sunday like some sort of nut job. I mean really, who seriously considers Sunday the start of the week? Even the religious folk will tell you that God worked for six days, and then rested on the seventh. The bible certainly doesn't say he started his week on the second day (probably slept in on the first), created the heavens and earth in six days, then rested on the start of the next week.

These things really get to me...

Page 1 ... 3 4 5 6 7 ... 8 Next 8 Entries »