Archive for August, 2008

andlinux = Fail (rant)

Its admirable what they’re trying to do, but I installed the software and couldn’t get it to run. (Strange “could not connect” errors)

After screwing around with their rather unhelpful help thread and losing 2 hours of my life I gave up and uninstalled it. Don’t waste your time like I did, until they at least figure out how to make the darned thing work right out the box.

Thats probably why I hadn’t heard about them until a few days ago, and then, entirely by accident.

Add comment August 22nd, 2008

Use BREAD not CRUD

From Paul m. Jones

“I don’t recall where I first heard the term BREAD; it stands for “browse, read, edit, add, delete”. That covers more of what common web apps do, including the record listings. It even sounds nicer: “crud” is something icky, but “bread” is warm and fulfilling. That’s why I tend to use the term BREAD instead of CRUD …”

I like BREAD.
:)

Add comment August 20th, 2008

Ginormous external hard drive storage with drobo

Had to write a blog post on this …

Drobo allows you hotswap SATA hard drives in and out of it.
Just pop it open (yes … while its plugged in) and switch out hard drives as you wish.

It has 4 bays and can hold up to 16TB of Data. It magically writes and rewrites your data across all the drives it is using at the time … scary good eh?

Runs USB 2.0 or Firewire 800 (oooooh) … definitely up my ‘most coveted items’ list, right next to the Macbook Air (still searching for a sugar mommy to help out with that one).

Watch the video intro on Drobo

enter the code ” krose31 ” to get $100 off your drobo

Add comment August 20th, 2008

gem install error - ‘cl’ is not recognized as an internal or external command

If you’re here,  you are probably getting an error like this during a gem install on a windows box.

cl -c  -nologo -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAV
E_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -
O1 -MD -Zi -DNDEBUG    -DVERSION=\”6.4\”  -DXS_VERSION=\”6.4\”  -IC:\Perl\lib\CO
RE  BitVector.c
‘cl’ is not recognized as an internal or external command,
operable program or batch file.
NMAKE :  U1077:
Stop.

The fix is easy if you have visual studio or the .NET SDK installed.

If you don’t then either go download Visual Studio Express or the .NET SDK (anyone out of 1.1, 2.0 or 3.5 should do)

Now, do a search on your local machine for ‘cl.exe’

I use the phenomenal windows desktop search engine locate32), here were the results I got.

Now all I had to do was use the nifty windows Path Editor “Path Ed” to add one of those paths to the system path variable

and that error goes away.

Only to be replaced by an even more cryptic one in my case
(I was trying to install passenger … I know I can’t, but I thought I’d try)

Add comment August 18th, 2008

Zed Shaw is a fan of Phusion Passenger (modrails)

Its old but I stumbled onto this just today. Zed Shaw (the creator of that ol’ faithful Ruby server mongrel) is a fan of the Apache Passenger (modrails) guys

I also met the Phusion Passenger guys and holy fucking crap are they on to something. If anyone is going to actually take on Mongrel in the hosting area it’s Passenger. The developers are super cool nice guys (unlike me) and even DHH likes their stuff. He really never liked anything I built, so hopefully those guys get more support. About the only thing keeping them from taking over is that they use forking so a few libraries that keep resources open will have serious problems. They’ll probably have to think up some kind of thing for that soon, but I think most Rails deployments could get pretty far with Passenger.

Honestly though, it shouldn’t be that hard to beat Mongrel since Mongrel is crippled by Ruby. What the Phusion guys are pulling off is just using Apache to do the heavy lifting and then let their module do the work to stream out to Rails. It’s not a new idea, they’re just doing a great job marketing it and educating people while keeping things simple. The kicker is that they also have support for Rack and WSGI. Now that’s fucking sexy.

Now, thats one hell of an endorsement

Add comment August 16th, 2008

New mod_rails/passenger memory tools and cool tutorial

I’ve been mucking around with passenger quite a bit these days. I’ve got two staging servers running it for two different projects and another running a production version of one of those projects.

In digging through the documentation I discovered two new command line tools that come included with the 2.0 version of Passenger.

From the documentation
passenger-status

One can inspect Phusion Passenger’s internal status with the tool passenger-status. This tool must typically be run as root. For example:

passenger-memory-stats

Process inspection tools such as ps and top are useful, but they rarely show the correct memory usage. The real memory usage is usually lower than what ps and top report.

The tool passenger-memory-stats allows one to easily analyze Phusion Passenger’s and Apache’s real memory usage

And then there’s this very good modrails/passenger tutorial on Railcasts

Add comment August 15th, 2008

Quote of the day - nothing wrong with doing nothing

There is absolutely nothing wrong with doing nothing as long as it is done in moderation.

— From Freelance Switch
Become More Efficient By Simplifying Your Life

Add comment August 15th, 2008

Frameworks vs. Libraries in PHP (why I choose frameworks)

David Otton (who I’ve never met) has an interesting take on the old Framework vs. libraries debate, that I identify with.

I went through the same struggle (in my head) months ago. However, after having that internal struggle that David went through, I came out on the side of frameworks.

Why?
- Because frameworks allow me to get web applications up very quickly
- I don’t have to spend time figuring out or refining database access, templating or any of the other ‘plumbing’ that you have to do on most code projects. In fact there is a hobby site, that I wrote with my own custom code … and I haven’t made updates to it in months, because I have to entirely refactor the codebase to do the new things I want. If I had written it in cake (which I plan to port it over to). I’d have no such problems.
- I don’t have to completely relearn my code base after weeks away from it (part of the problem above too)
- Most frameworks include libraries of their own that you can use. In a recent project that I’m working on, there is a twitter gem for Rails that probably saved me (and the client) about 20 - 30 hours of coding, testing and bug fixing

What the article did tell me, though, is that developers the world over (especially PHP) developers are used to writing code from scratch. Designing, creating and implementing new ‘plumbing’ is a big part of what we do.

In any given framework, you’re going to like about 70% - 85% of what it does and (probably)absolutely hate the rest of it. Giving yourself over completely to convention-over-configuration framework like Cakephp when you don’t agree 100% with it is a big step for most developers. One that quite a few developer shy away from.

I think though, that if you find a reason to stick with it, like I did. You will find that the benefits of doing things with a framework will eventually overcome objections you might have to not having the framework do things … your way.

Add comment August 12th, 2008

How to persevere … correctly

I just had to steal this 37 signal blog posting

How’s this for tenacity? John Dane is 58 years old and has been trying out for the Olympic sailing team for 40 years. He finally made it this year with his son-in-law, Austin Sperry.

Dane missed qualifying for the Olympics 4 separate times, each by a few minutes. He didn’t give up after each loss, he just improved his sailing skills. It would have been too easy to give up after losing one or two qualifying races. John Dane took the more difficult route and persevered.

This resonated with me on a variety of personal and professional levels, but the real talk here is to realize that if you want it bad enough … you can’t give up.

Find out what went wrong the last time, fix it, then go at it again.

PS: This is very different from trying the same thing over and over (that’s insanity, as defined by Albert Einstein)

Add comment August 12th, 2008

New Netbeans release - version 6.5 Milestone 1

New in this release is support for PHP

There is a new feature list here

A couple of interesting Rails enhancements

About to check it out.

Add comment August 4th, 2008

ReCaptcha kills wordpress spam comments dead!

Just wanted to celebrate the fact that after installing the Recaptcha wordpress plugin I’m down from 200 - 300 spam comments a week to 0.

Rockin!

 

Add comment August 4th, 2008

Current Active Scaffold Rails plugin (1.1.1) not compatible with Rails 2.1

If you’re seeing errors like this

... gems/activesupport-2.1.0/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method': undefined method `find_full_template_path' for class `ActionView::Base' (NameError)

You’re not crazy.
Active Scaffold (1.1.1) doesn’t play nice with Rails 2.1!

Go here to get an Active Scaffold version (master) that does.

Add comment August 2nd, 2008

Fixing the libxml-ruby gem error: uninitialized constant XML (NameError)

I found the highly recommended libxml-ruby gem but was having a lot of trouble getting my sample code below to work

1
2
3
4
require 'libxml'
doc = XML::Document.file('http://search.twitter.com/search.atom?q=obama')
root = doc.root
puts "Root element name: #{root.name}"

I kept getting this error

uninitialized constant XML (NameError)

on line 2 where I used “XML::”

After combing through the internets for an answer, I found it.

Just change

require 'libxml'

to

require 'xml/libxml'

and everything should go swimmingly.

PS: The code above should simply output ‘feed’

Add comment August 1st, 2008


Recommended

Posts by Category

Calendar

August 2008
S M T W T F S
« Jul   Sep »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Posts by Month