Friday, December 23, 2011

Dinner Dairy - Tom Yum Kung

Today's exciting dish was Tom Yum Kung Soup. I think the term "Totally awesome" is particularly apt here. It reminded me a lot of traditional Jamaican Soup, not so much in how it tasted, but more the technique where you are just throwing crap in there purely for taste. 

It had huge chunks of ginger, lemon grass, spring onions, parsley, bay leaves, onions, mushrooms ... did i mention it was awesome.  Anyways this set me back 100 Baht, which in Queens currency is just over £2. "Expensive", but it was awesome and should hopefully end my current trend of 3 meals a day.

Tom Yum Kung

Thursday, December 22, 2011

Dinner Dairy - Pad see iew

This is Pad See iew. Apparently there are a number of different romanizations of this dish. Consists of noodles, spring onions, eggs, carrots, garlic and pork. It's also available with Chicken, but i went for the pork. It came in at the mouth watering price of 60 Baht, approximately £1.20.
Pad see iew

Saturday, December 17, 2011

Dinner Dairy - Mee Goreng Ayam

Mee Goreng Ayam, essentially fried noodles with chicken. Unlike chinese fried noodles, the chicken isn't sliced, but instead hidden underneath the noodles, it's almost like a Malaysian surprise.

Mee Goreng Ayam

Dinner Dairy - Murtabak Ayam

Murtabak Ayam - Like the previous Murtabak, this is essentially Roti Cenai stuffed with meat. In this case it's Ayam or Chicken. Grand total of RM5.50 ( £1.10p ).

Murtabak Ayam

Thursday, December 15, 2011

Dinner Dairy - Nasi Goreng Nelayan & Cendol

First dinner in Langkawi we had Nasi Goreng Nelayan & Cendol. By now i think everyone knows about Nasi Goreng, so nothing to new there. However Cendol was a new experience. It's Jelly Noodles and sweetcorn in sweetened Coconut milk. The Coconut milk was awesome, but i wasn't too keen on the noodles. The Nasi Goreng came in at a whopping RM12 (£2.50), while the Cendol was RM4 (£0.80)
Nasi Goreng Nelayan

Wednesday, December 07, 2011

Dinner diary - Nasi Goreng

Well this was actually breakfast. Nasi goreng. Basically its Fried rice for RM4 about 80p

Monday, December 05, 2011

Dinner Diary - Murtabak

Murtabak - minced mutton with garlic, egg and onion with a series of curry sauces. This cost a whopping RM5, approximately £1.

Dinner Diary - Roti Cenai Telur

Roti Cenai Telur  and Iced Milo - Essentially Roti with egg inside served with a series of curry sauces. The lced Milo is the brown drink to the left of the plate. It is basically a cocoa power that you can find in Jamaica. It's made hot, and then has ice put in it. It's fairly awesome. Whats more awesome is that this entire meal cost about RM4, thats 80 pence.

I Took a Picture [Perth Edition]

The Indian Ocean [HDR], Perth, WA, Australia

Dinner dairy - BBQ pork Noodle

So I literary just decided to start blogging the food I eat. Today I went to a place in KL's Chinatown.

It's basically fried noodles in a crap ton of soy sauce with Garlic and little bit of BBQ pork. It's the 2nd time I'm having it, unfortunately it's not as good this sitting as when I had it last week. This was slightly more expensive than my normal meal, coming in at RM10.20, just over £2. Sadly i've forgotten the characters, and cantonese romanization.

Friday, October 28, 2011

I took a picture [Down under edition]

Circular Quay, the Opera House & the CBD taken from the Sydney Harbour bridge in HDR with 3 exposures.

Friday, October 21, 2011

iOS 5 & UITableView datasources

It's been a big week for me, primarily because one of our client apps exploded, in no short part to Facebook screwing me over ... but i digress.

Last week also saw me finally upgrade to Lion, enable full disk encryption (Might blog about this later), and start compiling against iOS 5.

As is usual with big changes in the SDK there are always a few bugs, however this one had me confused for a couple of days.

After compiling against iOS 5, i got this message after popping one of the view controllers.
-[YOUR UITableViewDataSource tableView:cellForRowAtIndexPath:]: message sent to deallocated instance 0x6e78420
Simple, i did something dumb, and over released my datasource class ... But it only happens on iOS 4, not iOS 5. [Cue twilight zone music]. And this code had been stable for well over 6 months before the SDK change [Increase volume].

Generally i a release and nil my objects and set any delegates to nil in my dealloc method. However in this instance i had forgotten to nil out the UITableView's dataSource and delegate properties. The solution was simply:
[_tableView setDataSource:nil];
[_tableView setDelegate:nil];

Now, i'm aware this is 100% my fault, you're always supposed to nil out pointers to non-retained/ weakly referenced objects. As a result i haven't bothered to file a Radar. (Dear apple, you caused me to find a bug in my code ... yeah) However as you can see, for one reason or another i was able to "get away" with it for months, so this post is a fair warning to all to lookout for this.

I took a picture [30 Rock edition]

Midtown Manhattan, New York City, NY from 30 Rockafella Center (No tripod)

Thursday, October 20, 2011

The 6 Month Club

This past tuesday signalled my entry into the "6 month travel" club. Usually when someone is travelling for 6 months they would have been all over the place, however i prefer to move at slightly slower pace. As a result i've "only" visited 4 countries (Iceland,USA, Jamaica, Australia).

I've been blessed with being able to meet some really nice, and interesting people along the way. Overall it's been an rewarding experience. I've got no real plan, i tend to think about my next step about a month before i take it, with the general rule being "go west".

I look forward to the next 6 months, and God willing, it will be even better than the previous 6 months.


Tuesday, October 11, 2011

He who learns but does not think is lost; he who thinks but does not learn is in danger.

I've been in Australia for a 6 weeks now. The majority of that time has been spent bitching about how cold it was, and coding like beast to help get mChat ready for its next big release.

As a result I haven't really done any sightseeing, or at least I hadn't.

As a preparation exercise for when I go to South America I decided to take a bus from Sydney to Melbourne via Canberra. Total journey time came in at seat warming 15 hours.

I love having time to think, and I love to learn so the Confucius quote I used for the title of this post seemed perfect.

So what have I learnt?
Australia is huge and almost infinitely vast. At the moment I'm a hour and half into the Canberra, Melbourne leg. And all I've seen is grasslands. They extend for as far as the eye can see.

Having spent so much time in relatively small countries, buried in a mountain of technology you begin to think that the world is a small place. But in fact the "small" part is the series of interconnected hubs that form the major population centres. Outside of these you can find the "real world". One devoid of fibre, hi-speed rail, politics, and all the other assorted junk that we consider "modern civilisation".

So what do I think?
A good friend of mine what's to change the planet. Not in a "when I grow up" kind of way either. We often discuss how one would go about such a task. Perhaps to change the world what we need to happen is the reversal of the migration of people across the world to urban centres, in such of relatively low paid jobs.

Perhaps we need to allow people to return to the ways of the past, to build a better future.

In recent years anyone reading this would have seen slow destruction of society. As we have moved into the future we are slowly abandoning parts of our past that actually worked.

That's really insightful, so what can I do?
I haven't got a clue. If you'll excuse me I have another 8 hours on this bus. You never know, as I bridge the gap between these two centres of commerce and industry I might just discover the answer ...

Sunday, September 18, 2011

Brute forcing Router passwords

Someone in my house decided to change the password of the router. We share the access with about 10+ people, not all of whom i know so simply asking wasn't really an option. So like any normal person, i searched the internet and found a python script that does HTTP Auth brute forcing. The Indentation was out of whack, so once i fixed it, i thought i ought to share it with everyone.

If you do want to use it yourselves, you'll need a wordlist, which you can find with google's help.

Wednesday, September 07, 2011

Making UIImages with blocks

So i was going to post about something completely different today, but as i was typing i looked at my code, and thought it was verbose and a little bit ugly.

So i made it awesome, and as everyone knows to make your code awesome you add some blocks to it.

My problem was simple, i was faced with the need to create two CGBitmapContext, for the uniformed the following code is required to prepare a bitmap context for drawing.

So after a bit of thought, i decided what i really wanted was a method that did all of this for me, and meant that i didn't have to worry about constantly checking the code for leaks (DRY), and that was pleasant to look at and i came up with the above. The block that you pass in is given a fully formed CGBitmapContext, and the method returns a UIImage generated from that context. Almost like a UIView/CALayer.

So now your thinking, "Yeah, thats cool, but why the [INSERT FOUR LETTER WORD] would i want to use it ?" Well young grasshopper, have you ever wanted to mask a image in code? You know to do those trendy rounded corners ... well yes you can use CALayer's however the idea of using those off the main thread makes me uneasy, and we all know the cool kids do things in the background.

The above actually creates a rounded rect on the fly, and masks the image with it. It's made to be used in a category on UIImage. But look closer, yep thats right kids, no boiler plate, ZERO, NADA, 另, SQUAT (i think you get the point)!

I should take a moment to mention that the awesome code for the rounded rect comes from the awesome Oliver Drobnik, i have the utmost respect for this guy, not just for this snippet, but if you've ever seen his Rich text label and it's associated projects, you'll understand why real soon.

Friday, August 05, 2011

Tuesday, August 02, 2011

Waipo Valley Hike

While some people think i spend all my time on a perpetual vacation, it is sadly not the case. Everyday there is a little bit of something or another to be done.

However since i've been on the Big Island i've made an effort to try and relax, and actually have a vacation. Its not like i'll be having another one anytime soon. Being an iPhone developer and having loads of time off aren't compatible ideals.

So yesterday i started creaming myself on the prospect of visiting Waipo Valley, however it seemed so distance, and far from anywhere that it may as well have been on another planet. Initially i dismissed it, and decided instead to head for Akaka falls, a lovely 400ft waterfall only 20 minutes bus ride away.

However when my bus got to Akaka falls i didn't get off. It was a beautiful day, my camera was charged and my memory card was empty. I rode all the way to Waimea, in the north of the island, glimpsing the Towering Mount Kea, on the left and the steep coast to my right.

Though my consumption and research using the fantastic Offmaps i had learnt about a trail, just to the north of Waimea, that appeared to reach the valley. There is a more direct trek, that takes you to the head of the valley, however this is several Kilometers outside of town (READ not near the bus stop). So i decided to go a slightly different way, that allowed to me to go through town.

After walking though a residential neighbourhood to the north of the town. I found the entrance to the trail (above). Like all good hikers, i just ignored it and marched on.

After climbing the first hill, i got to what looked like a water treatment plant. Despite the signs at the gate, i vehicle from the Hawaii water department drove past me, but said or did nothing.

After the passing the water treatment facility i got to yet another gate, informing me that i was doing something or another wrong ... i ignored it and continued the march. With this particular gate i had to choices, jump it, or use the huge hole in the fence. It's always great to have options.

I was greeted by field full of cattle. I have to say that walking though a field of cattle by yourself is one of the strangest experiences i've ever had. They all just stare at you, and track your every movement silently. It reminded me a lot of when i was in China.

Climbing the hill further revealed a 50 million gallon reservoir, that was bone dry. I assume it fills up with rainwater run off over the winter, and then drains in the summer. This was one of three big reservoirs buried in the hills.

After another 5-10 minutes of walking a finally reached the Kohala Forest Reserve, at this point i knew it was on. I opened that gate and marched onward.

It went from grassy cattle pasture, to rainforest in the blink of an eye. The trail was easy to follow, but due to my naivety i was wearing trainers...

Trainers that got completely murked. There is a water pipe that runs along the trail, in several places it is leaking, which caused the mud trail to flood. Initially just walking on the grass was enough, but there were several places where this simply wasn't enough.

The landscape changed quite rapidly, going from rainforest to hilly plateau in a matter of minutes. While your at least 3 miles away from the nearest human being, you amazingly have 3 bars of AT & T service. I had turned data off to save battery. I'm not the worlds most amazing hiker so i didn't really want to be stranded in the middle of nowhere with half a sandwich, and Nutri-grain bar.
By this time i was almost 2 hours into the hike, I wasn't physically tired but the trail isn't scenic. There isn't much to see, and certainly no one to talk to. While i knew roughly how much further i had to go, the fact that i knew i had to retrace all my steps was beginning to depress the hell out of me. Especially as i was starting to consider if this dotted line that i had sacrificed my time to was actually a route to nowhere. I spotted a small hill up ahead, and made a deal with myself. If the canyon wasn't over the hill, then it was time to call it a day.

And there it was, 2000ft straight down, almost 4 miles in the middle of nowhere. I was at photographic "pay dirt". After about 10 minutes of this beautiful vista, i high tailed it out of there, rain clouds where all around, and this is the last place you want to be when it rains, especially considering that i wanted to salvage what was left of my trainers.

Overall i learnt a couple of things about my hike.

  • Never give up
  • Carry more food & water
  • Get hiking boots
  • Hawaii (Especially the Big Island) is beautiful.

Monday, August 01, 2011

Hawaii: Oahu & Hawai'i (aka The Big Island)

To be completely honest i knew very little about Hawaii as whole before i came here. But i've learnt a lot in the last 5 days. Mainly that i need to learn to drive. So thats definitely on the list for when i get home (finally).

Having flown into Oahu, i spent most of my time in Waikiki, Honolulu. As i was warned it was chock full of Japanese tourists showing off their Canon's and Nikons. I have nothing against my friends from the land of the Rising Sun, however i do suffer from a serious case of Lens envy.

After 6 days in the Japanese version of the Costa Del Sol, i've  flown to Hilo, on the big island, aka Hawai'i. Today, i felt like an idiot for even spending more than two days in Oahu.

Firstly the big island, is well, BIG. The road that runs around the entire coast is almost 300 miles long. I spent today in the car with some good people from Holland, we barely explored a quarter of the island. This place is huge.

What really stuck me is the differences in the flora in various parts of the island. In some places it looks like a Rain forrest, while in others it looks like the surface of Mars. The above is the beautiful rainbow falls.

This is an example of the rainforest like terrain. It even has a canopy that the Brazil Rainforest would be jealous of. Really makes me look forward to the day i finally set foot on the continent of South America, Un dia, un dia.

Then there is the black volcanic rocks. While i know the landscape was formed by magma, it almost seems as if it's been scared by it. I've been fortunate enough to see some amazing things. But this is truly fascinating.

Saturday, July 30, 2011

Auto incrementing version numbers in Xcode

Over the last month or so i've had to kick out a lot of betas for a project. Seeing as i use the fantastic Test Flight. I have to change the version number before i upload each build otherwise Test Flight will overwrite an existing build which is the last thing that we want.

I don't think anyone actually enjoys editing a plists, whether its in Xcode plist editor or the down and dirty XML. So has a result it was the perfect opportunity to get familiar with xcode's build process, and how to tie external scripts into it.

I use 3 segment version numbers (1.1.1), where the first digit is the major version, second digit is the minor version, and the 3rd digit is the build. For the benefit of the team, i wanted to have the latest commit hash in the build number so that people could quickly reference it and know whats going on.

With some direction from this post by Duane Sibilly i was able to hack together the below.

Friday, July 29, 2011

Wednesday, July 20, 2011

Goodnight San Francisco

The Mighty Pacific

When i'm not winning iOS Dev Camp, answering emails or writing code i like to take photos. Lots and lots of photos. As my time in the Bay Area comes to an end, i thought that it might be nice if i actually took the time to visit the Pacific Ocean.

Initially it was foggy (like it usually is) however it soon cleared up.

The birds came out...

As did the people ...

The sun shone ...

And everything was well with the universe (if only for today)