 |
www.flickr.com
This is a Flickr badge showing public photos and videos from ctr. Make your own badge here.
|
|
Sunday, June 28, 2009
… until I had a story about drivers from the view point of a cyclist.
This weekend Mike and Helen came and visited. We had some beverages, we had some fish and chips and today we went for a bimble along the coast cycle way to Worthing to stretch legs and grab a hot pasty.
The ride on the whole was highly enjoyable. After sweet ride at Pitch Hill yesterday with Mike, Jim and Jason, it was nice to get out and stretch my legs. It was great to be out with Emma who has improved massively in terms of confidence with her riding over the last 6-7 weeks of riding to work and the station and it was nice to show Mike and Helen the coast.
The only blip was coming out of Shoreham on the way to Worthing.
We were cycling along the road up to the cycle route, just before there is a car park and with the nice weather people were out to have some fun on the beach. A car stopped before getting too far towards the car park – no idea what but they stopped and pulled over. The car that caused issue was the car right behind them. It pulled out. It didn’t check their blind spot, mirrors nor indicate. They didn’t see myself nor Emma who had indicated we were going to over take and pulled out right in front of us. As this happened I did shout at the driver to check their mirrors (the drivers side window was open). The car sped off down the road but had to stop to pay for a parking ticket from the attendant. As Emma, Mike and Helen continued I decided to stop and politely spoke to the doctor.
I asked them to be more considerate. To check their mirrors. Indicate. I explained I was mildly frustrated that the driver almost took myself and my wife out. The driver didn’t look at me and said that she didn’t “almost take us out” and I pointed out that as we both had to swerve that really was incorrect. At this point her partner jumped in and started to get irate. I paused, decided it was non-productive to keep banging on and continued. However, the ability to frustrate and annoy people kicked in, and I feigned a problem with my bike right in front of them to piss them off slightly.
It pissed them off slightly.
This caused the gentleman to make an idiot of himself by shouting obscenities out the window as I went on my way. He threatened to come and take me off my bike and put me in the sea. Clearly imagination was his strong point. I shouted back that I was going to look forward to it and if he played his cards right, I’d give him a kiss. (This provoked a laugh from people watching this situation prevail and will note that whilst he was getting hot headed I was the picture of calm)
They sped through the car park and the man genuinely got out with a desire to face up. I suggested to the others continue on their way as I didn’t want to drag them into the spat. As he got out the car, he shouted at me as I went past on the cycle path to which I responded by blowing him a kiss, saw him get irate and continued to catch up with Mike, Helen and Emma.
The whole situation would have been significantly nicer had the driver admitted that she hadn’t checked her mirrors, hadn’t indicated, hadn’t seen us and simply admitted she made a mistake and was sorry. Instead arrogance and stupidity prevailed. I could probably have not stirred the situation but I was pissed off with the driver but hey-ho got to make it enjoyable.
For those interested the pasty was excellent.
Saturday, June 27, 2009
Yesterday I was at my local COSTCO buying a large bag of Purina dog chow for my loyal pet, Biscuit, the Wonder Dog. While in the checkout line when a woman behind me asked if I had a dog.
What did she think I had, an elephant? So since I’m retired and have little to do, on impulse I told her that no, I didn’t have a dog and that I was starting the Purina Diet again. I added that I probably shouldn’t, because I ended up in the hospital last time, but that I’d lost 50 pounds before I awakened in an intensive care ward with tubes coming out of most of my orifices and IVs in both arms.
I told her that it was essentially a perfect diet and that the way that it works is to load your pants pockets with Purina nuggets and simply eat one or two every time you feel hungry. The food is nutritionally complete so it works well and I was going to try it again. (I have to mention here that practically everyone in line was now enthralled with my story.)
Horrified, she asked if I ended up in intensive care because the dog food poisoned me. I told her no, I stepped off a curb to sniff an Irish Setter’s ass and a car hit us both.
I thought the guy behind her was going to have a heart attack he was laughing so hard.
Costco won’t let me shop there anymore.
Monday, June 15, 2009
… for a database dump to complete downloading, I thought I’d write a cheeky post covering the last few days.
Last week was excellent. Two customers migrated cleanly and working nicely. My new kite showed up and I even got to fly it on Thursday. Had a great session and found the kite to be as nice as I’d hoped it would feel when I finally got my own. The loops are clean, jumping feels great and it can be trimmed in a treat giving it massive range. It even looks sick:

My own bar and lines should be arriving this week which will be excellent. The demo kite I borrowed from JN UK is leaving this week so I can’t steal that bar and lines to fly it! Today, Wednesday and Thursday looks windy so I can’t wait to get back out.
I also got my bike back on Friday. I upgraded the wheels from the off-the-shelf Alexrims+Stub hubs to Mavic EN521 rims, black DT Swiss spokes, black DT Swiss brass nipples and Hope ProII hubs front and rear.


What is the advantage? I was told I’d not feel much difference but the wheels would be stronger and a bit more solid. I’d disagree, the difference is staggering. Out on the ride at the weekend I was tearing down the hills with more control and finesse than ever before. They are much more solid which in turn gives a much more intimate feeling with the bike and the surface it is rolling over. I was throwing the bike round much more than I have previously done, it responded and there was not a trace of any change in the wheel state (unlike my previous wheels that had started to warp).
I also upgraded my front rotor to 185mm – it bites so much harder than the smaller 160.
The ride on Saturday was also excellent. I did the massive bomb hole/drop off at the end of OTF which I’d promised I’d do next time I was there (previously I had chickened out, it was like riding out our first floor flat window down an almost vertical slope until it curved out at the bottom). I nailed it. I also did some drop offs to get some air. They were similar to part of the Judges seat at Pitch which I am determined to do. Apart from those spikes of adenaline, the ride was friendly, chatty and a good social ending in some great cake and banter at Parklife.
Sunday was an odd day. No wind. No riding. No work. I was tired and generally did not a lot!
I hope you had a great weekend, tonight I’m going to go for a fly and then work on a website for my sister.
Monday, June 8, 2009
I made a few more tweaks and changes to the demo browser for the iPhoneFerite engine. It now does “fake” bookmarks and expands on nib file usage. The UI has been tweaked and a bookmarks button added. The button, when clicked, will slide up a modal view controller to show the bookmarks. Tapping on a bookmark will load it.


To show the user interface being built in Interface Builder:

The next demo is a basic RSS feed reader.
- It is the Apple WWDC. I am keen to see what new stuff they bring out for the iPhone along with what APIs. My curiosity on the iPhone is the potential for faster and more ram. With iPhoneFerite maturing rapidly, all the space and speed I can get is a bonus. If O2 offer an upgrade from iPhone 3G to the new iPhone like they did for previous revision change, I will upgrade.
- My kite is scheduled to arrive today – without bar and lines – but still the kite will get here. I’m really excited. This is the first new kite purchase in two years and so I’m looking forward to it. I might even have a chance to fly it this week.
- My mountain bike wheels are almost built. Last week I ordered some Mavic EN521 rims, DT Swiss black brass nipples, DT Swiss black comp spokes and Hope Pro2 hubs front and back. I saw the rear one on Saturday when I dropped my bike in and it was not only lighter but looked pimp.
- If I can get the bike back by tomorrow I will go on the local night MTB ride. I’d really like to do this ride especially if the plan is head over to the OTF trail – it’d be a good trial ride for the new wheels.
- We have a big customer demostration today.
- We have a zero-downtime customer migration tomorrow.
- We have a big customer migration on Wednesday.
- To finish it off there is lots of work on which is good, but hard work!
[Obviously I'm not able to go into greater depth about work stuff - hence the one liners]
Sunday, June 7, 2009
I’ve managed to put in place the code to allow nib files to be loaded – thanks to some excellent documentation from Apple on what happens. As such, I’ve managed to not only reduce the code required to write a web browser in iPhoneFerite, but also provided some extra functionality at no extra cost.
Firstly the code:
class NibTestOwner extends UI.NibFileOwner {
object webview;
object textfield;
object button;
object view;
object activity;
function buttonClicked_( object sender ) {
.activity.startAnimating();
.textfield.resignFirstResponder();
.webview.loadRequest(
NSURLRequest.requestWithURL(
NSURL.URLWithString('http://' +
.textfield.text())));
}
function webViewDidFinishLoad_( object sender ) {
.activity.stopAnimating();
}
function textFieldShouldReturn_( object sender ) {
.buttonClicked_(sender);
return false;
}
}
object app = UIApplication.sharedApplication.delegate;
object owner = new NibTestOwner();
if( NSBundle.mainBundle.loadNibNamed_owner_options_("NibTest", owner, null) ) {
owner.view.setFrame(app.canvas.frame());
app.canvas.addSubview(owner.view);
app.tabBarController.setSelectedIndex(0);
owner.textfield.becomeFirstResponder();
}
The advantage of this approach is that it is a) quicker, cleaner and faster, b) the way you do it if you were using the Objective-C SDK and c) allows you to get pixel perfect control layout and configuration:

The next set of challenges involve the ability to inherit Objective-C classes and override existing methods. I think I will have to write some code that automatically builds Objective-C classes from the functions declared within a ferite class. I’ll provide some updates at the next junction.
Saturday, June 6, 2009
I’ve been hacking on porting ferite to the iPhone. This is mainly to see “if I can”. It has involved creating an application that compiles in ferite, the modules and some objective-c bridge code I wrote about 6 years ago. It seems to work fairly well. So well in-fact that I wrote a web browser in ferite. Only a simple one, but it works. I am going to take you through a set of screen shots and then show you the code. I will attempt to update my progress here as new and exciting things occur.
When you load ferite on the iPhone, you get this very nice splash screen:

You are then presented with the application. It is two parts, a blank UIView canvas and an edit view. By default the application loads the demo.fe in the application’s scripts directory. At the moment that is the web browser demo. It is important to note that the canvas is on the play tab.

When clicking on the edit tab, there you get an UITextView to edit ferite code to run. Clicking run executes the ferite code and if you are lucky it’ll do something. The browser code shows an alert once the browser has been setup.

Clicking ok will snap you back to the play tab where you can now see an text field, a load button and still some white canvas. The textfield grabs first responder status and allows you to enter a URL. The keyboard has been setup to make it URL compatible.

Tapping “return” or “Load” will cause the page to be loaded. In this case it is apple.com.

I wasn’t quick enough first time round so I decided to load my home page to show the activity indicator added to the canvas and shown when the web view is loading.

And even this site renders nicely in the browser:

This is only a basic script and the UI kit version of ‘hello world’, what is important to note though is that 80-90% of the technical hurdles in writing any application have been overcome in getting the technology in place to do this demo. Exciting times. I’ve no idea what the long term goals are of this little technical playing but it is quite fun and I get quite a kick out the notion I can write code on my phone and have it run.
For those interested, the code to run this demo looks like this:
class Delegate {
object web_view;
object web_activity;
object web_url;
constructor( object view, object progress, object url ) {
.web_view = view;
.web_activity = progress;
.web_url = url;
}
function loadButtonClicked_( object sender ) {
.web_activity.startAnimating();
.web_view.setDelegate(self);
.web_url.resignFirstResponder();
.web_view.loadRequest(
NSURLRequest.requestWithURL(
NSURL.URLWithString('http://' + .web_url.text())));
}
function webViewDidFinishLoad_( object sender ) {
.web_activity.stopAnimating();
}
function textFieldShouldReturn_( object sender ) {
.loadButtonClicked_(sender);
return false;
}
}
object canvas = UIApplication.sharedApplication.delegate.canvas;
object web_view = UIWebView.alloc().initWithFrame(CGRectMake(0, 42, 320, 369));
object button = UIButton.buttonWithType(UIButtonTypeRoundedRect);
object progress = UIActivityIndicatorView.alloc();
object textfield = UITextField.alloc().initWithFrame(CGRectMake(5, 5, 230, 31));
object delegate = new Delegate(web_view, progress, textfield);
UI.prompt('Welcome, this script creates a demo browser on the canvas');
canvas.setBackgroundColor(UIColor.blackColor);
web_view.setScalesPageToFit(1);
textfield.setBorderStyle(UITextBorderStyleRoundedRect);
textfield.setPlaceholder('Enter URL...');
textfield.setAutocapitalizationType(UITextAutocapitalizationTypeNone);
textfield.setAutocorrectionType(UITextAutocorrectionTypeNo);
textfield.setKeyboardType(UIKeyboardTypeURL);
textfield.setFont(UIFont.fontWithName_size("Helvetica", 17.0));
textfield.setContentVerticalAlignment(0);
textfield.setDelegate(delegate);
progress = progress.initWithActivityIndicatorStyle(UIActivityIndicatorViewStyleGray);
progress.setFrame(CGRectMake(210, 10, 20, 20));
button.setFrame(CGRectMake(240, 7, 72, 25));
button.setTitle_forState_('Load', UIControlStateNormal);
button.addTarget_action_forControlEvents_(delegate, 'clicked:', (1 << 6));
canvas.addSubview(web_view);
canvas.addSubview(textfield);
canvas.addSubview(progress);
canvas.addSubview(button);
UIApplication.sharedApplication.delegate.tabBarController.setSelectedIndex(0);
textfield.becomeFirstResponder();
Anyway, I hope this post provides an alternative to the twitter feeds.
|