Articles tagged 'el'

Drop It Like It's Hot Apr 13

So anyone that isn’t reading this in a feed reader will see that my blog has had a serious overhaul - and I’m now running on Feather. Me and Mike spent quite a bit of time last week or so expanding the Feather feature set, and it now more than copes with my existing blog. I was able to import all my old posts, customize the default theme to something a little bit different, and add in a few custom snippets (Analytics, FeedFlare etc). I was also able to add redirects for old links to ensure that (hopefully) there isn’t too much broken by the move. All old posts will have the same permalink too, handled as part of the import process.

Currently I’m running without caching, but I see my partner in crime Mike has gotten caching up and running on Feather, so I’ll get that setup and running shortly too, to improve the performance of the blog still further.

As far as I can see the blog should be running ok, but any issues - let me know with a comment, or an e-mail, and I’ll get right on it!

Comments

Tyred Mar 15

While driving home after picking my wife up yesterday, about two minutes away from our house, we suddenly had a loud banging noise start up, and immediately we both thought “flat tyre”. I pulled over as soon as was possible, and took a look around the car. It had already got dark, and I couldn’t see anything obviously wrong with any of the tyres. None of them were flat, that was for sure. I took a look under the car, still nothing. It was obvious there was something wrong, and I thought it had to be tyre related, as the noise quickened slightly if I got a few miles per hour faster, and slowed as I slowed down. I drove home at around 10 mph, letting people pass where I could, and then we took another look at the car.



My wife noticed a hissing noise from the right rear tyre, and it became obvious that it was that tyre that had a puncture - however it must have only just happened, as it wasn’t yet flat at all. After a bit of investigation with the help of a flashlight, we found the culprit - what appeared to be a screw or bolt in the tyre. As it was already late, I left it until today to sort it out - I ran the tyre into a local place to see if it could be repaired, as the screw/bolt had gone in straight in the center of the tyre, and not on either side, so I was hoping the tyre itself and outer walls were largely intact.



It turned out it was irreparable, and this is the reason why:

UPDATED:Seems like I’ve lost this picture somewhere along the line! Needless to say, it was a photo of the tyre with a rather large bolt through it.

What you see in that picture is a bolt, around four or five inches long, the kind that are used in door handles. It wasn’t obvious from the outside how big it was, but with the tyre off of the wheel, you can see just how big an item it was. Somehow it went in dead straight, and considering the speed I was traveling at when I picked it up (around 35 mph), it was fairly lucky that no further damage was done. It was also lucky that we weren’t too far from home. However what that bolt was doing in the middle of the road, and how exactly it got wedged the way it did, I don’t know - the guys at the local tyre place seemed fairly amazed by it too!

Comments

rsync Jan 14

Switched to using rsync to deploy this blog now. Since I re-wrote the blogging software to generate a simple static html site, I needed an easy way to deploy. I was using a Capistrano-esque method of deploying the entire site to dated directories (‘200801142252’, for example), and then I was simply symlinking the public web directory to the most recent release. This has the benefit of being able to quickly roll-back to previous releases (handy when doing major template changes etc), but having to re-deploy the entire site every time I wrote a post wasn’t really very efficient. So I’ve changed it to use the rather brilliant rsync to maintain the site on the webserver now. From my ruby code, I just shell out to rsync as follows:

`rsync -avzr -e ssh #{LOCAL_PATH}/* #{REMOTE_USER}@#{REMOTE_HOST}:#{REMOTE_PATH}`

This runs rsync in verbose, archive mode, using compression, and runs recursively. It specifies the local path, and the remote path for use over ssh (I was using scp over ssh before anyway). It’ll prompt for the password on the command line (although you could setup and specify a key to use with the ssh connection to avoid that). This solution will then keep the local and remote paths in sync, and will mean I can update the blog much more easily and quickly. Hopefully that’ll mean a few more regular posts coming soon… :-)

Comments

Updates Dec 21

I’ve decided to stick with the static html for this blog, as it has made the site nice and quick, and let’s face it, the content doesn’t change all that often :-p Seriously however, I will be attempting to post a little more often that I have recently, and I’ve now finished a simple command line publishing tool to enable me to blog and push out changes to the site. I’ve made a few changes already, and re-implemented comments using the Disqus comment system (http://www.disqus.com/), so we’ll see how that goes. I’ll be using Twitter for more regular, shorter updates (http://twitter.com/edraper), and am hoping to stick more technical articles up here over the coming months, time allowing.

Comments

Hot Routes Feb 10

Last day or so I’ve come up against a couple of intriguing Rails problems while trying to knock up some plugins for an app I’m writing. I’ll write up the second of the two problems later, but here goes the first…

Put simply, I wanted to define a route within my plugin. My plugin implemented a controller (and also contained a view for that controller, see one of the latest features to hit edge Rails ahead of Rails 2.0).

I searched to try and see if anyone had come up against a similar task, but didn’t see any concrete answers. My testing led me to realise that every time a call to ActionController::Routing::Routes.draw is made, it completely clears and re-generates routes based on the block passed to that method. So simply calling draw with a new block containing my required route wouldn’t work; it’d overwrite other routes, or end up getting overwritten by other routes later in the chain.

I then figured it was time to get cracking with some meta-programming, and that I was going to have to re-define and extend the draw method in order to be able to map the routes I want, and do it in a way that’d be flexible and fair to the original Rails routes file, and other plugins that wanted to toy around with routing. I came up with the following:


module ActionController
    module Routing
        class RouteSet
            alias draw_old draw
            def draw
                draw_old do |map|
                    map.connect "controller/action", :controller => "mycontroller", :action => "myaction"
                    yield map
                end
            end
        end
    end
end


Let’s give this a quick run-through… I’m re-opening the ActionController::Routing module, and specifically the RouteSet class where the draw method exists. I’m using alias to copy the existing draw method to a method name “draw_old”, before re-defining the draw method itself. Within my version of the draw method, I’m calling the old one and passing it a block that firstly defines the routes I wanted to add to the application, and that then yields the appropriate mapper object back to any block passed in to the draw method itself. Dependent on where you want your route to appear in the scheme of things, you could always map your plugins custom routes after you yield the mapper to the calling block, so that they appear after any other routes. Another tweak would be to alias the existing draw method to something like “draw_old_APPNAME”, where APPNAME is the name of your application. This would ensure that if multiple plugins implemented something similar, that they then wouldn’t clash.

There may be a better way to tackle the problem, but after half an hour of working the problem over (mad props to my boy Mike for helping me tweak the solution into something useful and re-usable), I think I came up with a pretty solid answer, and with a bit more time, something that could probably be wrapped up into a module or plugin all of its very own. Bottom line? Ruby as a language rocks, the dynamic nature and meta-programming features opens whole new doors of functional programming to me, and I’m having to really think outside of the box to see some of the amazing things you can do with it.

Comments

Debuggering Feb 5

This is a pretty nice idea, and looks like a really useful tool. It’s in a fairly early stage, but it is shaping up to be quite nice. Think I’ll grab it, take a look, and see if I can help out somehow…

Comments

Get your geek on Feb 2

Mentioning nerd cred in the last post reminded me, my boy Mike recently launched a pet project of his, Geekiverse. It’s a site where you can add your swag, such as CDs, DVDs and games, and review them, and then other nerds can also review the same or similar items. It’s a place to meet other geeks with similar interests, and it’s generally just a really cool site.

Of course, maybe I’m bias - I’m going to be helping Mike and the guys at Geekiverse out with some new features and improvements (in fact, I’ve already tackled one new feature). So check it out, sign up, and share your swag - it’s a site for geeks, by geeks.

Comments

Review: Xbox 360 Feb 2

A couple of days ago I said that I had gotten an Xbox 360 for Christmas. I have quite a few games for it, and plan on reviewing the best of the bunch over the coming days, but I thought I’d start with a brief review of the machine itself.

First, a disclaimer. I hadn’t really been interested in the 360 at launch. The PlayStation 2 walked all over the original Xbox, but that was all so last-gen. Before internet play (no, seriously - you can’t count the PS2s meagre ‘network play’ or the original Xbox Live). Before hi-definition gaming. Before the consoles turned into media center behemoths.

The fact is, as I was eagerly awaiting the PlayStation 3 towards the end of last year, I started to seriously consider the Xbox 360 as a contender, whereas previously I had discounted it. I was a Sony fanboy, but after finding out that the so-called worldwide simultaneous launch had been forgotten and replaced with the more traditional USA/Japan first, rest of the world later approach, I was disappointed. I consoled (pun intended) myself with coverage of the US and Japanese launches - which didn’t make me feel much better. The launches went horribly for Sony, with next to no supply, scuffles and fights outside the few stores that did have stock, and a pretty terrible game line-up. With problems abound on the firmware front, I suddenly thought to myself - do I really want to wait until March, and pay a huge amount of money for the European equivalent? I started looking at the Xbox 360, and realised that after a year, it had settled at a far more reasonable price, had an excellent game line-up, most hardware and firmware issues had been resolved, and there was a superb collection of online content. With Christmas coming up, I dropped a few hints, and sure enough under our tree on the 25th was a nice shiny Microsoft Xbox 360…

So I’d done a u-turn, and got myself a hi-definition media center gaming machine to go with my hi-definition TV. I hooked it up, connected the wireless adapter so it could get on my network without cat-5 cable everywhere, and powered it on. The fabled ring-of-light whirled round, and I steadily worked through the setup and configuration. Typing in my WEP key with the keypad was fun, but once I’d done that, setup a profile, and then setup an Xbox Live account (with two free months on Xbox Live Gold!), I was now ready for some serious gaming. I had gotten a fair few games with the console as part of my present, so it was tough to know where to begin… I popped in Rockstars’ Table Tennis, and began.

Immediately I knew I had made the right choice - the graphics were crisp and gorgeous looking, and the gameplay itself was fantastic. More on this game, and the others, in later reviews - but let it be known that every game I’ve played has graphics that far exceeded my expectations. Coming from my experiences playing Wolf3D, Doom and Quake on the PC as a kid, this stuff is mindblowing. It’s truly immersive to have graphics that good…

So what else is good about the Xbox experience, bar the games themselves? The Xbox Live service is fantastic, and it’s so relaxing to be able to simply pop in Pro Evolution Soccer 6, flick the Quick Match button, and be playing against someone from around the world in just seconds. The matchmaking is second to none, and the central gamertag idea that ties it all together, alongside a decent review/reputation system, makes it a very enjoyable experience.

But the most impressive idea of all, is the notion of achievements, and gamerscore. As Gears of War guru CliffyB said recently, “it’s nerd cred”. You get nothing for the score per se, however that doesn’t stop you working through games like a task list, picking off achievements and racking up your gamerscore. It brings real structure to your gaming sessions, as you “just try to win one more game” to reach an achievement, or “get ten headshots in a row” for another achievement. It gives your gaming a purpose, and while it may not be for everyone, I enjoy the challenges each game poses immensely.

So for those who haven’t guessed already, I’m impressed. It’s a great console, and exactly what I was looking for. After a hard day’s work faffing around with computers, it’s refreshing to have a true plug'n'play gaming experience. I can go online and play some dude at table tennis, run around with seven other guys wielding chainsaws, or take a gamble on a 4 and 1 play at my own 21 yard line, and nail a giant reception for the game winning touchdown. Anything and everything is possible, and the Xbox platform as a whole has a very, very bright future.

Comments

Mmm... sandwich Sep 29

This is genius.

Comments

Blogging His Ass Off Sep 24

My boy Mike is blogging his ass off apparently, in his all new blog. He’s got a couple of decent posts up there to start, and I’d keep your eyes peeled for some more to follow. Welcome back, dude!

Comments

Welcome To The El Parade Sep 24

So you didn’t really think I’d be able to go the entire of September without posting right? I’ve been hella busy since returning to the UK after my vacation to Atlanta in the US of A. I’ve meant to post numerous times but this is the first time where I’ve had chance to grab some words together and form a post.

Getting back into the swing of things has been pretty hard - after spending seventeen non-stop days with my soulmate, it’s pretty tricky to get used to the work routine again, and I’m not sure I’m even there yet. All day every day at work I miss my girl, but work is a part of life (actually, it’s the part that pays the bills). No date yet set for the wedding, as we are still planning and deliberating at the minute…

Plenty more to come as a shitload has happened since I last posted, keep the dial tuned here folks.

Comments

Mac Daddy Sep 24

So I’ve recently got a MacBook Pro, and it’s fucking awesome. For a start, it’s quick, and secondly, I’m finally, after numerous attempts in the past, enjoying the Mac OS X experience. I’m not sure what it is this time around, but I think working on a Mac just feels right in laptop form. I’m running Parallels for all my Windows needs (damn you, VS2005 and C#), and while I’m tempted to also give Boot Camp a go for the gaming aspects (have you seen Company of Heroes? and apparently HL2 runs real nice on the MBP too!), for now I’m sticking with the virtualisation solution.

But I’m also learning TextMate, and man oh man is that a sweet program to use. I’m a little overwhelmed by all the add-ins (sorry, bundles) and shortcuts there are, but at least it’s prettier than emacs :-)

Comments

Page 1 of 7 | Next page