Nokogiri and Segmentation Fault
After recently re-installing my system on a new SSD everything was working fine except Rspec for a project running on Rails 2.3.5. Turns out there were a couple issues.
First, Rails was out of date. Upgrading to 2.3.11 fixed those issues.
Next, Nokogiri was throwing this error:
/Users/chris/Sites/adobe-agency-partner-portal/vendor/bundle/ruby/1.8/gems/nokogiri-1.4.4/lib/nokogiri/xml/schema.rb:37: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
In this case my version of libxml2 was causing the problems. Upgrading that to the latest and re-installing Nokogiri fixed that issue.
To see where you stand with Nokogiri, run this command:
~/Sites/adobe-agency-partner-portal (master⚡) : bundle exec nokogiri -v—
warnings: []ruby:
engine: mri
version: 1.8.7
platform: i686-darwin10.6.0
libxml:
loaded: 2.7.8
binding: extension
compiled: 2.7.8
nokogiri: 1.4.4
A Thought on Email Security and Password Reuse
Today it was revealed that dating site Plenty of Fish’s databases have been severely compromised. All their data user data has been stolen, probably many times from the sounds of it. It also seems that Plenty of Fish was – let’s be generous – naive enough to keep their user’s passwords stored in the database in plaintext. That is, unencrypted, readable by anyone with access.
This is a big deal on a number of levels, not the least of which is because people have a tendency to reuse their passwords for multiple sites. It’s no small leap to imagine that most users on PoF who signed up with their Gmail account also used the same password for PoF that they used for Gmail. To put it another way, anyone who did that has now also had their Gmail account compromised, and for many people their email account is the gateway to all their accounts.
It got me thinking: what small steps could be taken on the user’s behalf to help cut down on the number of people reusing their passwords? How about something like this?

Obviously it won’t stop anyone if they’re adamant enough, but it just might get them thinking.
for() Loops and IE 8
Everything was going smoothly until we got to testing in IE 8, at which point we started seeing errors inside loops.
Turns out IE 8 doesn’t like for() loops written like so:
for( var idx in items ) {
Instead, use the ol’ fashioned way:
for ( var i = 0; i < items.length; i++ ) {
Maybe in IE 9?
Z-index and Positioning
Having trouble getting your z-index-specified DOM elements to behave properly? One of them not layering like it ought to? Evidently z-index settings are only applied to elements that also have an explicitly-defined position attribute, like the following:
position:absolute, position:relative, or position:fixed
A Better Search in Safari
Duck Duck Go, a relatively new player in the search engine market currently dominated by Google, recently put up Don’t Track.us, a site that describes how Google methodically tracks and allegedly sells information about it’s users whereas DDG does not. It’s very interesting to read and got me thinking about how I use Google, and that is: really quite frequently. I’d hazard to guess that my Google search usage might average out to a couple times every hour every single day for the past ten years or so.
In the past I’d used Duck Duck Go a few times but the fact that it couldn’t be set as the default search within Safari was a real impediment. It appears that Apple has hard-coded the Big Three allowed search engines into the Safari binary, those being Google, Bing, and Yahoo (Yahoo? Does anyone really use Yahoo?).
So I figured today was a good day to try and change that and discovered that on DDG’s site there’s a link to a Safari extension that places a Duck Duck Go search bar right into the browser. Great! Except that the result is aesthetically terrible. It looks like something one would have found in IE 6. Really, just don’t bother installing it.
Saddened by this I emailed DDG this morning to bitch about it and almost immediately received back a reply from Gabriel Weinberg, DDG’s founder. Graciously he suggested I try an alternate solution provided at the bottom of that page, the one coyly hinted at via:
Safari – To add to search box (as opposed to above extension), first install Glims. Then add DDG as a custom search engine like this and then this.
Frankly, that should be linked at the top of the Tools page and the Safari extension removed. That solution is awesome. It puts DDG into the search bar as the default, Glims adds some fantastic extra functionality to Safari that I’m thoroughly enjoying, and I find DDG’s search results are just more pleasing to me than Google’s overall. Basically, switching to DDG from Google has been a pretty nice win.
If you’re on a Mac and you’re using Safari, I urge you to give it a try.
Crag Dog 1.0 into the iPhone App Store
My second rock climbing-based iPhone app has just landed in the iPhone App Store. Crag Dog is a rock climbing grade converter, very useful for those times when, as I say on the website, “you’re climbing in another country and you just want to know if that ‘VIsup/VI+’ route is going to kick your ass or rock your world.”
Crag Dog converts between nine different rock climbing grade systems (including some obscure ones I hope you get to encounter some day) and three bouldering grade systems.
All for just a buck.
Another Grade Converter?
If you’re a climber with an iPhone you’ve probably already looked for a grade converter. You might even already have one.
Sure there are a couple other grade converters in the app store already and when I was in France over the summer I tried them all but, alas, found them all to be uniformly bland in operation and aesthetically unpleasing – with the exception of Climb Converter, which is visually very interesting and unique, but not particularly good from a usability perspective.
So I built another one.
I think my biggest peeve with all the others is that every single one of them implements the conversion using UIPickerView which, to be honest, is exactly how I would have done it myself the first time around had I not tried out theirs first. And the UIPickerView (the wheely-spinner bit) works just great for Apple’s Clock application but for a grade converter it’s pretty limited in the useful data it can show. And it’s slow to use.
Instead I chose to use UIScrollView instances which allows me to display much more data onscreen at once and also makes using the app itself easier, faster, smoother and more frictionless. Want to switch grades? Flick with your finger. Want to view grade conversions? Flick a finger. I just like it better.
So if you’re a rock climber and you own an iPhone and you fancy climbing anywhere else in the world, or just want to know what the local grades of Adam Ondra’s epic sends on Youtube are, grab yourself a copy of Crag Dog and enjoy.
Oh, and if you do buy it please be sure to rate and review it in the app store. It does make a difference.
Climb It 1.0 in the iTunes App Store
“The premier rock climbing route app for the iPhone”
I’m very pleased to announce that Climb It is now available in the iTunes App Store. You can check it out by clicking here.
This release represents over a year of hard work by Sam and I, late nights writing and reworking code, rainy weekends cataloguing route data, many, many hours discussing how Climb It should work and what it should do over beers at the Alibi Room.
It is a humble beginning to what we hope becomes the best rock climbing app possible for the iPhone.
We’ve also set up a Facebook Page for it, and there’s even an official Climb It Blog.
…the frontend product is what brings your revenue stream in, but your backend operations quality is what keeps your costs down as you grow. If your backend costs get out of control because of technical debt then you won’t make a profit, or someone who can keep them down will just copy you and wipe you out with less.
Zed Shaw, “Products For People Who Make Products For People”
Spoken Like a Robot
The very first sentence of a different blogpost, somewhere else on the web, which I’m sure is a great blogpost but I’m not going to bother linking to it because I hate this sentence, is this:
Reflect7 decided to diversify it’s B2C platforms by allocating resources towards the Android Market…
That’s a fancy way of saying “We decided to build an app for Android”, all gussied up in soulless marketing wank speak.
I hate that shit. Makes me tune out immediately when I read it. In my head I insert the words that should been used instead of all those noncommittal buzz-statements, and I get annoyed.
My mental picture of the person who wrote it, who I’m sure is quite lovely in real life, is most unflattering: I assume they are of a low IQ, have internalized quite a bit of self-doubt and loathing, having something of an inferiority complex, and probably wet the bed. But in reality they’ve likely just spent far too much time fine-tuning PowerPoint slides for their VC pitches.
I implore you: when writing a blog don’t write like that. Write like a real person, with a functioning soul* and a real personality. Leave that kind of writing to the dead, the vapid, the marketrons.
(*metaphorically speaking)
