![]() |
| The Indian Ocean [HDR], Perth, WA, Australia |
The musing and sometimes not so wise words of Jonathan Dalrymple, Global Traveller, Programmer, Financial Rocket Scientist, Conspiracy Theorist, Part-time comedian, full-time funny man and whatever else i randomly decide to do.
Monday, December 05, 2011
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.
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.
Sunday, November 27, 2011
23k Miles, 15 flights, 7 months, 5 Countries
In a previous post i waxed lyrical about what 16k miles looks like. Well this is what 23k miles (37,000 km) looks like.
Friday, November 11, 2011
I Took a Picture [Volcanic Edition]
Friday, November 04, 2011
I took a picture [Most liveable city edition]
Friday, October 28, 2011
I took a picture [Down under edition]
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.
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:
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.
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.
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].-[YOUR UITableViewDataSource tableView:cellForRowAtIndexPath:]: message sent to deallocated instance 0x6e78420
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]
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.
在天
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.
在天
Friday, October 14, 2011
I took a picture [Steve Jobs Edition]
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 ...
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 ...
Friday, October 07, 2011
I took a picture [Stanford Edition]
Labels:
itap,
palo alto,
photography,
stanford,
University
Friday, September 30, 2011
I took a picture [Southampton Edition]
Friday, September 23, 2011
i took a picture [Stinky Cheese edition]
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.
If you do want to use it yourselves, you'll need a wordlist, which you can find with google's help.
Friday, September 16, 2011
I took picture [Train Station Edition]
Friday, September 09, 2011
i took a picture [Rastaman edition]
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.
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, September 02, 2011
Subscribe to:
Posts (Atom)




