Archive for August, 2008

“Hack” the beta!

YA-programming Q&A site is springing up (perhaps I shouldn’t complain; anything that helps dilute the online influence of that PoS Experts Exchange can only be a good thing) and it is members-only beta. Unless you circumvent the security-through-obscurity via this weak bit of trickery:

P.S. If you’d like to try Stack Overflow yourself, simply go to http://beta.stackoverflow.com and type the following into your address bar: javascript:alert(document.cookie="soba=-9999999");

Then again, perhaps gaining access is just the first skill-testing question on the site….

(Via Stack Overflow: the Blind Leading the Blind).

No Comments »

chris on August 31st 2008 in /dev/random

The Synergistic Convergence of Multiple Disruptive Technologies

Xbox 360 + Connect360 + MacBook Pro + Airport Extreme + external 500 gig USB2 hard drive = media centre awesomeness!

(I confess I stole the title from here because that title rocks. And fits.)

No Comments »

chris on August 27th 2008 in /dev/random

The Most Powerful MySQL Debugging Tool: \G

I used MySQL for years and years before coming across this little MySQL output-formatting tip that makes all the difference in the world when viewing your raw data. Instead of:

SELECT * FROM users;

use:

SELECT * FROM users\G

The result is very nicely formatted output (almost YAML-like, save for the spacing) that’s much, much easier to read (at least for those of us on small, 17″ laptops instead of the mega 30″ monitors).

No Comments »

chris on August 18th 2008 in /dev/random

Holy Crap, I’m a Hacker!

A great article about how to tell if your kid’s become one of them dreaded hackers: Is Your Son a Computer Hacker?

I particularly like this bit:

There are, unfortunately, many hacking manuals available in bookshops today. A few titles to be on the lookout for are: “Snow Crash” and “Cryptonomicon” by Neal Stephenson; “Neuromancer” by William Gibson; “Programming with Perl” by Timothy O’Reilly; “Geeks” by Jon Katz; “The Hacker Crackdown” by Bruce Sterling; “Microserfs” by Douglas Coupland; “Hackers” by Steven Levy; and “The Cathedral and the Bazaar” by Eric S. Raymond.

Sadly, I confess to owning each and every one of those titles, and many more. To whom do I turn myself in?

(And yes, the whole thing’s a joke.)

1 Comment »

chris on August 12th 2008 in /dev/random

Ultrasphinx Bootstrap Error

You’re installing Ultraspinx (perhaps per these instructions from Inoshi, which are the best I’ve found thus far) and you run into this error when time comes to bootstrap your installation:

~/Sites/ticklists/: sudo rake ultrasphinx:bootstrap –trace
(in /Users/chris/Sites/ticklists)
** Invoke ultrasphinx:bootstrap (first_time)
** Invoke ultrasphinx:_environment (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute ultrasphinx:_environment
** Invoke ultrasphinx:configure (first_time)
** Invoke ultrasphinx:_environment
** Execute ultrasphinx:configure
rake aborted!
You have a nil object when you didn’t expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]

I couldn’t find this one in the google anywhere. Turns out the cause of this is defining non-existent properties for indexing on your models (perhaps I’m the only one dumb enough to do that).

You’ll know if this is the cause because you’ll see something akin to this in your Rails console:

** ultrasphinx: warning: field f is not present in User
** ultrasphinx: warning: field descritpion is not present in Profile

Remove (or fix the spelling of) those and everything should work hunky-dory.

1 Comment »

chris on August 7th 2008 in /dev/rails, /dev/ruby

Collision Between Ultrasphinx and TextMate Footnotes

If, when running in production, your Rails app throws the following error:

uninitialized constant Footnotes::Filter

You’re probably experiencing a collision between Rails’ initializer.rb file and Footnotes’ initializer.rb file.

The fix is detailed at the bottom of Searching a Ruby on Rails application with Sphinx and Ultrasphinx with the specific implementation details available via this github commit: 9bf8344b2d9ece09ff301dfc4e500e00fd46b9bc.

1 Comment »

chris on August 7th 2008 in /dev/rails