Posted: February 21st, 2010 | Author: Spoofy | Filed under: Articles, Freedom, Internet, Rants | Tags: Advertising, DNS, Privacy Concerns, Search, UPC | Comments Off
UPC continues to manage to make me irate, today its the fact that *every domain* whether it exists or not, on UPC it exists. How is this so? because UPC has unilaterally decided that should a website, server, or domain not exist that they will serve advertising to me instead – how very helpful (sarcasm!).

Only its not at all helpful. Most modern browsers have the option already at the application level, without breaking the inherent functionality of the Internet. Effectively this is what happens:
- if a website exists, UPC will give you its correct IP Address.
- if a website does not exist, UPC will pretend to be that website, and give you the IP Address of a server in the United States, which currently shows a search page with advertisements.
There is a couple of issues I have with this. First and foremost, I’m already paying a hefty fee by European standards for my Internet access, and don’t appreciate having my internet experience co-opted so that my ISP can earn an extra buck or two… particularly when I did not sign up to this!
Secondly is the privacy concerns this raises, if every domain thats misspelled goes to this server in the US, what is stopping UPC from simply logging all these requests – privacy laws are much more lax in the United States than here in Europe. Particularly why this is worrying is there is no other obvious motive for having the server over there in the first place, why not a Dublin hosting provider? I’m very suspicious of this.
This is in direct contradiction to how the Internet, or any network for that matter, is designed to work. If something your looking for doesnt exist, whatever program is looking for it has functionality to handle that absence smartly. Since all domain queries return a site address, its fairly obvious that applications that rely on being able to know if a site no longer exists will stop functioning correctly. This will likely be a subtle change and not something thats readily obvious to the observer – which makes those of us with home networks have even more overhead to deal with. Thanks UPC!
If you feel this is all a bit too much, you can change your DNS settings to the following, which I’m assured by UPC tech support will not behave badly when a site doesnt exist:
- 89.101.160.8
- 89.101.160.9
You can also use the various free dns providers out there.
Posted: February 15th, 2010 | Author: Spoofy | Filed under: Brain Dump | Tags: browser, chrome, firefox, internet explorer, opera, safari, standards, w3c | Comments Off

Posted: February 14th, 2010 | Author: Spoofy | Filed under: Uncategorized | Tags: Mashup, NASA, PhotoShop, PotatoeShop | Comments Off
NASA has a page up where they are showing a new astronomical picture every day, with a professional astronomer’s description of the image. Today’s is this literally epic night launch of the space shuttle Endeavor.

I threw the image around in potatoeshop and ended up with the following, which I’m very happy to have as my desktop wallpaper:

I don’t know the rules regarding NASA Images/Copyright, so in the absence of such facts lets just go and say copyright NASA 2010.
Posted: January 30th, 2010 | Author: Spoofy | Filed under: Uncategorized | Tags: ipad, red alert 3 | 1 Comment »

Posted: January 12th, 2010 | Author: Spoofy | Filed under: Brain Dump | Tags: braindump, PHP, ruby | Comments Off
Today I had to dig into some old code of mine for a project, which tends to happen, however the archival code was in PHP but I needed it in Ruby. So, to borrow a term from the pro-audio and encoding industry, I transcoded PHP to Ruby (is there a programming equivalent of this word?) using Notepad++ and some regular expressions.
This is far from complete, but it might be a good starting place if you want to convert a PHP project to Ruby:
1. strip < ?php ?> tags at start/end of script
2. replace function with def
3. replace } with end
4. remove {
5. replace // with #
6. replace /*…*/ with #
7. replace null with nil
8. replace $this-> with @
9. replace \$([a-zA-Z0-9]+) with \1
10. replace (\)\w*;) with )
11. remove ;$
12. replace -> with .
13. replace is_string\(([a-zA-Z0-9]+)\) with \1.is_a?String
14. replace is_array\(([a-zA-Z0-9]+)\) with \1.is_a?Array
15. replace else if with elsif
16. replace new\W*([a-zA-Z0-9]+)\W*\( with \1.new(
17. replace .= with +=
18. replace strlen\((@*[a-zA-Z0-9]+)\) with \1.length
19. replace count\((@*[a-zA-Z0-9]+)\) with \1.length
20. replace \W*instanceof\W* with .is_a?
21. replace strtolower\(([a-zA-Z0-9\[\]@\.=’,\(\)]+)\) with \1.downcase
Posted: January 4th, 2010 | Author: Spoofy | Filed under: Stuff, Uncategorized | Comments Off
I have long believed that our educational system is broken, lacking, and utterly stifling of the innovation and creativity that inspires people to drive themselves to greater things, to push the envelope, and perhaps more importantly to be happy in their chosen careers. So when I was told that, amongst other things, I cannot reasonably expect to get a job in my field of choice at the time (Software Development) without a degree from a recognized college, I was filled with despair. For me this meant that if I was to pursue my dream, I had to endure a system once again which I had abandoned and for all intents and purposes had abandoned me long ago.
So after four and some years, I will soon be released on my on recognizance for my misdeeds from a system that I have grown to despise even more than before, and the question that I ask myself on leaving is “is taking a risk worth it?”. This question worries me on many levels, not least because merely asking the question means that I’ve grown more cynical about my abilities.
Everyone surely has asked themselves at one time or another whether they should take a big risk and throw caution to the wind to risk something for the chances of something so much greater but how prepared are you to risk it all, and could you live with the consequences?
My thoughts are more and more consumed with such questions, is it worth taking a big risk for the chances of something potentially life changing? I think its a valid question regardless of what your particular “big idea” may be. On the face of it, the chance to win big can be incredibly alluring, so much so that it may make you wonder if it is really a question of “if I should?” and not “when should I?” without adequately considering the consequences.
I suppose that everyone has a fear of failure to some degree, worrying that they may not live up to their full potential, or the expectations of others. The problem with taking big risks is that not everyone wins at the game of life, sometimes people lose their way, sometimes not always due to circumstances under their control.
The question that occupies my mind most is whether it is best to leave college and bust my ass like every other poor sod on this blue planet working for a company where I am likely little more than a number, or to take the plunge and start my own technology startup. For years its been ‘the dream’, but after nearly 7 years of being ‘educated’, I’ve fallen out of the habit of being the risk taking optimist.
No doubt I will do it sometime, but whether that time is now… well, the jury is still out.
Posted: December 20th, 2009 | Author: Spoofy | Filed under: Articles, Programming | Tags: bug, Programming, ruby, variable-scope | Comments Off
I recently began work on a Twitter library for Ruby, some already exist -which I didn’t consider, I wanted to develop a library of my own design which took a very object-oriented approach to accessing Twitter, mostly for practice. Because I wanted an intuitive, and for the lack of a better word, ‘logical’ implementation, I decided to use nested classes.
Ruby nested classes are child classes which are defined within a parent class. Unbeknownst to me, Ruby has some interesting quirks when using nested classes. Take for example, a typical class:
class A
attr_accessor :var
def initialize
@var = "something interesting"
end
def tellme
puts @var
end
end
Nothing peculiar here, but lets say we want a child class – for all intents and purposes, a namespace, which doesnt inherit from its parent but does exist inside it:
class A
attr_accessor :var
def initialize
@var = "something interesting"
end
def say
puts @var
end
class B
def tellme
puts @var
end
end
end
What we’re doing here is creating a parent class, A; inside that class we have another class B which is a part-of class A, but is not an inherited child. This is an important distinction, because an inherited child would have their own instance variables – what we have here is a class, A which ‘owns’ B. In theory, B should have access to A’s variables.
Heres a usage example, which you might expect to work:
parent = A.new
parent.tellme
child = A::B.new
child.tellme
In theory, we should have the same output, ‘something interesting‘ from calling the tellme method on each class, but no. Instead the child will throw an exception, why? because the instance variable is not visible – it is outside its variable scope. To reiterate: nested classes are outside the variable scope of their parent class.
This is true of class variables and constants. Nested children of a parent class simply do not have access to their parents, unless you provide that functionality programmatically:
class A
attr_accessor :b, :var
def initialize
@var = "something interesting"
@b = B.new(self)
end
def say
puts @var
end
class B
def initialize(theparent)
@parent = theparent
end
def tellme
puts @parent.var
end
end
end
a = A.new
a.tellme
a.b.tellme
This is the solution I ended up using, hopefully this post will have helped you avoid some of the frustration I went through trying to figure it out.
Posted: December 10th, 2009 | Author: Spoofy | Filed under: Rants, Uncategorized | Tags: College, Idiocy, University | Comments Off
Just Read This Job Description: “You must have a 1st class degree from a respected University, technical degree subject. You must have 3 “A”s at “A” level, one must be Maths. You must have evidence of a passion for programming.”
They must be dreaming, to be perfect academically AND have *evidence* of a passion for programming? Dream on!
For a start, I can count the number of people I’ve met in my life who have a real passion for programming on ONE hand; of those, most would say that while at UNI their passion for programming was all but entirely extinguished.
Secondly, relying so heavily on academic performance is grounds alone to ignore this company for the rest of time. Academic performance is by far and away the worst indicator of how good an individual is at programming. Particularly because most universities are woefully out of date.
For the most part, GOOD programmers are hackers; people who don’t (or cant) accept authority readily and march to their own drum. These kinds of people rarely find themselves getting all-A’s, quite often the exact opposite is true.
A couple of names come to mind: Bill Gates (Microsoft), Mark Zuckerberg (Facebook), Steve Jobs (Apple), Richard Branson (Virgin).
What kind of company would outright exclude such people. Its madness.
Posted: November 20th, 2009 | Author: Spoofy | Filed under: Commentary, Hacking & DIY | Tags: Ethical Hacking, HackEire, Hacking, IRISS, security | Comments Off
Myself, some guys from NCI and a gang from NUI Maynooth headed down to the IRISS Cyber Security Conference in the D4 Hotels, Dublin. Unfortunately we missed most of the talks, but we still got alot out of it:
Posted: November 15th, 2009 | Author: Spoofy | Filed under: iPhone Apps | Tags: Apple, fitness, health, ipedometer pro, ipetometer lite, iPhone, itunes, logicswarm | Comments Off
Pedometers count steps, iPedometer [for iPhone] counts steps in style.
iPedometer is a pedometer for iPhone which tracks your steps as you run or walk during an exercise session, with user adjustable sensitivity that can be tuned to your specific body type and presented in either Metric or English units, iPedometer is available immediately from the Apple iTunes AppStore.
iPedometer features styling that would look at home in any Apple Mac users home, iPedometer for iPhone is ideal for walking, hiking or other aerobic or cardiovasculour activities where a pedometer is useful.
Count how many steps you have taken, or the calories you have burned in a given amount of time, or distance in either English or Metric units.
Originally used primarily by sports and physical fitness enthusiasts, pedometers have become popular as an every day exercise measurer and motivator and are often recommended by some to be essential tools of an active lifestyle.
Logicswarm is introducing iPedometer by making it available for free and optionally as a $0.99c application on the AppStore, allowing customers to decide if iPedometer is worth their hard earned money before they purchase.
iPedometer is available exclusively on the iTunes AppStore.
Posted: November 4th, 2009 | Author: Spoofy | Filed under: Uncategorized | Tags: defuse | Comments Off
I havent been updating this blog anywhere near regularly enough, so I’m just going to start by starting…
Yesterday I was at DEFUSE, heres a pic:

It was really interesting, each speaker had 15seconds per slide and 20 slides total. There wasnt alot of content, but a good general snapshot, it was definitely a nice break from the norm.
Posted: October 4th, 2009 | Author: Spoofy | Filed under: Articles, Computers, Hacking & DIY, Technology, Things to do, Uncategorized | Tags: 1u, Cabinet, Colocation, Data Center, DIY, ESXi, Server, Ubuntu, Virtual Machines, VMware | Comments Off
Building your own computer, that’s relatively easy; building your own server is only a little harder; building your own 1u rack-mount server for colocation – that’s a whole new level.

42u Dell Data Cabinet
A few years back -maybe two, I got a real steal on ebay for a Data Cabinet. One of those badass cases that houses upto 42 servers in one glorious case. For around 500eur (560 if you include delivery) I bought a 42u Dell Data Center Cabinet, a UPS, a KVM, rackmount monitor/keyboard, two Switches and a bucket load of cat6 cables. It was only the beginning, ever since I’ve been eager to fill it to capacity with some serious hardware.
This summer I decided the time was right to thrust myself into a bit of debt and fill out the cabinet with some proper hardware, so I began selecting components for a server or three. For this post I’ll just focus on the 1u servers as they gave me the most trouble and perhaps something to be learned can be passed onto others from my experience:

Tyan s7002 Server Mainboard
The following components were selected:
* Norco RPC 150 1u Server Chassis w/ 4 hotswap SATA drive bays
* Intel XEON E5520 2.26GHz
* Dynatron 1u Heatsink
* Corsair XMS3 4GB DDR3 1333Mhz
* Tyan s7002 Server Mainboard
* x4 Hitachi Deskstar 500GB SATA Hard Disk Drives
As the proverb goes, “Failing to plan is planning to fail” and so it was with the components I had selected. I hadn’t sufficiently researched the Tyan mainboards in question, had I done so I would have known that they *require* two 8pin EPS12v connectors, so the power supplies I had ordered were never going to work out-of-the-box. To solve this, and to save any headache in returning the PSU’s I took a look at Maplin’s website.

4pin 12v Molex to 8pin 12v EPS adapter
I think we all have a bit of a love/hate thing going on with Maplins in Ireland, they have some really great stuff – all the electronics components and obscure cables you could ever need, its just a shame that they shaft us for it. They’re still working off what can be best described as a 5yr old exchange rate between UK and Ireland prices and have no intention of changing it so it seems. They’re prices are just silly sometimes, but I digress. I bought one of these, a 12v Molex to 12v 8pin EPS cable adapter (£2.99 UK, €4.99 Eire).
And it works marvelously! I would however advise anyone using one of these cables to absolutely make sure that no other devices use the same rail (ie: dont connect any other devices to any additional connectors on the same cable) as overloading it could be disastrous to your motherboard/cpu. I connected some fans to mine but the draw will be such that it should have little to no affect on it, and besides, I have only one CPU in this board at the moment so I’m not worried at all.
Another problem I found was that the motherboard faceplate just simply did not fit the chassis, and the set that came with the Norco RPC-150 didnt suite the Tyan s7002 board. So I didnt use one at all. Ultimately its just a fascia, it serves no real function so I’m happy to not have one.
I’ll end this now with a warning about 1u power supplies, they are incredibly hard to source. I now have a folder full of websites that have various degrees of 1u power supplies but the point I’m trying to drill into you here is that when your designing your 1u server, recognize that the more power it requires, the harder it will be to source a supply. Saying that however, Scan.co.uk and Insight were my top choices.
Things to take care of when building your own 1u server:
* Do your research, even when you get tired, don’t buy until your 100% sure everything will work. Unless you want to live dangerously… both are good choices.
* Most normal heat-sinks will not fit a 1u case, look for and purchase a heat-sink for your CPU that is specifically designed for a 1u chassis.
* Recognise that building a 1u server is not the ‘norm’, it can be frustrating, but take your time and you’ll get it right.
* 1u Power Supplies are the hardest component to source, find yours first and work from there.
Posted: July 19th, 2009 | Author: Spoofy | Filed under: Articles, Hacking & DIY, Internet, Solutions | Tags: certificate authority, Encryption, firefox, Mozilla, secure, security, ssl | Comments Off
Theres alot of discussion lately about Mozilla’s decision to annex self-signed certificates in Firefox 3.x; up until now Firefox would have grudgingly lived with self-signed certificates – when reaching a website that was self-signed all you had to do was click the ‘add exception’ link at the bottom of the warning message, but no more!
When you visit a website that secures itself with a self-signed SSL certificate your now more likely to recieve a much more ominous warning telling you that the certificate is invalid and no obvious way to allow you to proceed regardless.
Having recently setup a secure subversion repository I had this exact problem also. This morning I found a solution, its not ideal but it works perfectly. To make Firefox play nice you have to add your CA (certificate authority) certificate AND your server certificate to Firefox’s list of allowed authorities, then and only then do you get the option to add the server as an exception. Here’s how you do it:
You will need a local copy of the ca.crt and server.crt certificate files.
Open the certificates window
Firefox Preferences -> Advanced Tab -> Encryption -> View Certificates
Import your Certificate Authority file
Authorities Tab -> Click Import -> Browse to your ca.crt file
Import your Server Certificate file
Servers Tab -> Click Import -> Browse to your server.crt file
Thats it! Next time you visit your website (https://mywebsite.com/ for example) you should now be able to add an exception to allow the self-signed certificate.
Reaching the Firefox preferences window differs slightly from OS to OS. In Mac OS X its Firefox -> Preferences, in Linux its often Edit -> Preferences and in Windows its Tools -> Preferences. Its beyond me why Mozilla couldn’t keep it consistent, but there you go.
I hope this post helped you.
Posted: July 14th, 2009 | Author: Spoofy | Filed under: Review, iPhone | Tags: iPhone, iphone developer, stencil | Comments Off
I woke up today to find these waiting for me:

I bought two so I could have one on my desk and one in my bag at *all* times. You never know when a creative idea might strike! I’d also imagine losing one wouldn’t be too hard at all.
There’s not really an awful lot one can say about these iphone stencils, they’re metal templates which help designers draw concept iPhone apps. Containing most of the elements an iPhone app designer would need: buttons, icons a slider etc.
The first thing I noticed as I opened the minimal packaging was the pencil. I love that they included a mechanical pencil – the idea, its sound and very nice. In practice however, I hate this pencil – its plasticky, its cheap and its utterly useless to me. A simple run-of-the-mill pencil would have satisfied me more than the cheap feeling and poor performance of this pencil. More than anything, it made the few rough edges around the stencil even more pronounced, which is kind of odd considering none of my pens or pencils seem to suffer from that.
Moving onto the stencil itself, as a design tool its perfectly balanced. it has the right number of shapes, does the job admirably – though I would’ve liked a square cutout to mimic the home button square, but its not like its necessary. There were a couple of issues however: it sucks up finger prints worse than anything I’ve seen in recent memory, which is disappointing considering the pictures on the store suggest that its almost a matte-type surface, which I would have preferred.
Smoothness is also a bit of a nagging point, the edges on the outside are not quite up to my standard of ’smooth’. Its rough enough to make your writing impliment jut out – at least in one place, where they’ve clearly cut out the template from the rest of the stock. I expected more from seeing the pictures of it to be perfectly honest. However, like I mentioned earlier, it all depends on your drawing implement of choice; with most I’d imagine the minimal roughness will not be noticeable – its just a little irritating for the needless perfectionists. uh huh… me.
Finally, the metal stock is really too thin. I’m sorry but this I just had to bring up, its incredibly thin – too thin in my view. It would take nothing to bend it out of shape, in fact so much so that I can see it easily being bent out of shape if left in a bag without being protected inside a hardback book. For $16 US each, plus the international shipping costs, I would have hoped for something a little bit more sturdy.
All things considered however, I think these stencils are a wonderful aid for sketching up iPhone app designs. I usually prefer photoshop to anything else, but sometimes you need that hands on-touch.
On that note, its time for bed. I’ve spent all day playing with these things, my desk is a mess and its well past 2:30 on a weekday!!
** Updated to include links to Design Commission website
Posted: July 10th, 2009 | Author: Spoofy | Filed under: Telecommunications, Uncategorized, iPhone | Tags: fail, iPhone, iphone3gs | Comments Off
Yes that’s right, the iPhone 3GS I got on launch day (26th June) is already useless.
The iPhone3GS is now completely unresponsive to input on the top row of icons on the home screen and has intermittent responsiveness everywhere else. At one point it even opened spotlight search, and typed ‘ipo’ by itself!!
I believe this was an existing issue with the device which was made worse when it dropped on the ground as I was getting out of a car, it fell all of one foot into concrete/grass (only slight cosmetic damage). But ever since, its just gotten much worse, ever since I had the iPhone it was opening apps every now and then without my input. I would take it out of my pocket and somehow it had opened some app or other while in the locked mode.
So, now I’m waiting for apple to send me the coffin to send to them for it to be replaced. Will try to put a hold on my o2 contract as soon as possible – theres no way I’m paying for repair time!!