Archive for the ‘Uncategorized’ Category
* Passenger on Rails Playground
Posted on August 29th, 2009 by Dave Johnson. Filed under Uncategorized.
I finally setup Passenger (mod_rails) on my Rails Playground server the other day so that I can quit worrying about Mongrel and it is super easy. The main problem that I found was that I had a spelling mistake in my httpd.conf file in the PassengerRuby config line. The error that this produced in the Apache error_log file seemed to be referring to starting the spawn server.
Could not start the spawn server: /usr/local/lib/ruby: Permission denied (13)
So I spent a long time trying to find info about Passenger spawn server settings, but the problem in the end was that the path shown in the error did not exist - it should have been pointing to bin obviously :S
The other part of using passenger is the slightly different Capistrano recipe. With Passenger there is no spinner task and you need to put in an empty restart task. Here is my recipe:
########################
# Application
########################set :application, “example.com”
set :deploy_to, “/var/rails/#{application}”########################
# Settings
########################default_run_options[:pty] = true
ssh_options[:forward_agent] = false
set :runner, “user”########################
# Servers
########################set :user, “user”
set :domain, “example.com”
server domain, :app, :web
role :db, domain, :primary => true########################
# Subversion
########################set :repository, “http://svn.example.com/trunk/server”
set :scm_username, “user”
set :scm_password, “password”########################
# Passenger
########################namespace :passenger do
desc “Restart Application”
task :restart do
run “chown -R apache:apache #{current_path}”
run “touch #{current_path}/tmp/restart.txt”
end
endafter :deploy, “passenger:restart”
deploy.task :start do
# nothing
end
The other thing that I found I had to do was the chown call since Passenger runs the Rails app with the same user as is running Apache, in this case the apache user and apache group.
Now on to try out Cassandra.
* Windows Compilation Problems
Posted on May 5th, 2009 by Dave Johnson. Filed under Uncategorized.
If you are trying to use midl.exe but have not before or do not have Visual Studio installed, you may come across a few different errors.
One such error that I had was the following:
“command line error MIDL1001 : cannot open input file oaidl.idl”
So I figured out that I had to get the Windows Platform SDK installed but had a hard time finding it. There is a helpful page on MSDN I found that helps you to choose the right SDK. The link never came up in my search results for some reason and I was only able to find it linked from the Windows SDK blog.
I figured that I would just add that to the PATH environment variable as you may expect to be the case but alas it was not. After a long while of trial and error (mostly error really) I found that you can specify certain paths to be included manually as a command line switch http://msdn.microsoft.com/en-us/library/aa367328(VS.85).aspx
* JavaScript Pub Sub
Posted on April 28th, 2009 by Dave Johnson. Filed under JavaScript, Uncategorized.
I was talking to someone the other day about the observer pattern in JavaScript and I was reminded about this JavaScript method that is part of Complete UI.
nitobi.Event.prototype.subscribeOnce = function(method, context) {
var guid = null;
var _this = this;
var func1 = function() {
method.apply(context || null, arguments);
_this.unSubscribe(guid);
}
guid = this.subscribe(func1);
return guid;
}
subscribeOnce is a special sort of event subscription that rather than being being executed every time the event fires, the handler function is only executed once and then automatically unsubscribed from the event. It is obviously most useful for initialization stuff in JavaScript. There is some more info on JavaScript pub sub over on Ajaxian too.
* On Dell and Social Media
Posted on March 14th, 2009 by Dave Johnson. Filed under Uncategorized.
Yes Twitter can be good for your company. There are of course soon to be urban legends about companies like Dell that made over $1 million during the recent holiday season by using Twitter but what about the sales they lost because of Twitter? I would wager that it could easily be north of $1 million.
Just a quick search on Twitter reveals tweets like this one:
While there may be some good coming from Twitter through marketing opportunities, there is clearly some bad along with that. I think that this is the double edge sword of social media that one must be careful with.
Then there are companies like Mozilla and VMWare or, more specifically, products like Firefox, VMWare Fusion and Harvest that have teams of people constantly watching Twitter and actually responding to your tweets. One time when I was having some VMWare problems @vmwarefusion responded to me almost immediately:
@davejohnson It’s easy enough to find the real culprit. Go to Activity Monitor, and click “Show All Processes.”
not that it ultimately helped much but it’s the thought that counts. To properly take advantage of social media tools like Twitter and get the most out of them this is an important step; it’s about the community engagement rather than leaving them to their own devices. Even though Firefox still crashes on an almost daily basis it does make me feel better when someone reaches out to help. Companies like Dell should be doing the same if they want to see a net benefit from tools like Twitter.
This type of involvement on Twitter really makes sense and it makes the tool more useful even just socially. However, I can see a future in which Twitter could be taken over by people using it more for business relationships using their Twitter network to mine data rather be social. It would get pretty annoying if your Twitter friends starting asking you questions on a daily basis about this product or that, or if companies engage you in a Twitter conversation as a sales tool.
So companies should get out there and engage but don’t be phony about it and be careful not to inundate people with messages.
And, for the record, I am very happy with Dell ![]()
* PhoneGap Eclipse Plugin
Posted on February 18th, 2009 by Dave Johnson. Filed under Uncategorized, phonegap.
I have been putting this off for a while but finally got around to getting some Eclipse Plugin action going for PhoneGap.

More news on this very soon!
* Twitter is Currently Down
Posted on February 18th, 2009 by Dave Johnson. Filed under Uncategorized.
* Sexing Up Home Appliances
Posted on February 9th, 2009 by Dave Johnson. Filed under Energy, Uncategorized.
A few days ago I questioned the cost effectiveness of vehicle electrification as a means to get petrol cars off the road in favour of their electric counterparts that use electricity generated from, in most cases, a fossil fuelled power plant. My thoughts on that still stand in terms of cost effectiveness since an electric hot water heater and furnace might set you back a thousand dollars and reduce emissions by the same order of magnitude as buying a electric car at > $20,000 a piece (not to mention the infrastructure requirements for “fuelling”).

@monkchips thought the post was skeptical but I like to think that it was pretty grounded in reality and if anything painted a more plausible, cheaper, environmentally friendlier and more society friendly than more [electric] cars.
Tom Raftery also commented on the synergies of electric vehicles and vehicle to grid technologies with the stabilization of the grid as well as demand management, which certainly cannot be argued with and I agree that electric vehicles can help with that. Both Tom and James are emminently knowledgeable in this area.
However, I am thinking why not just include a battery bank for your household electricity needs that could be used as local storage for distributed micro-renewable energy generation and, like the electric vehicle battery, help stabilize the grid by taking energy when there is a surplus and giving back when there is a deficit. That way you still avoid some of the high cost of an electric vehicle as well as the infrastructure required for charging and / or battery replacement stations. Electric home appliances can also take part in smart grid demand management through responding to dynamic pricing from utilities helping to stabilize the network and decrease consumption. They are also always plugged in so you don’t need any additional hardware nor do you ever have to remember to plug the car in when you get home. You also just need regular old lead acid batteries rather than super lightweight, high tech batteries made of carbon nanotubes.
I think in general it is a problem of perception. Electric vehicles are undeniably status symbols, as cars have traditionally been and still are in western society. You can’t show off how green you are to your suburban neighbours by buying electric appliances - unless you invite them in to take a look; and we all know that cars make lots of money for companies like Toyota. Therefore, a large part of the discussion is focusing on things that may be good but are not nearly the most effective. Of course now I am leaning dangerously close to a tirade about not just electrification but instead cutting our consumption by using more efficient means of transportation like buses / coaches and cycling. Years ago GM (and others) did of course buy up and dismantle many a railway to promote cars and we are still feeding into their ideas of city design and transportation networks!
I can appreciate the value in electric vehicles and of course in the smart grid and hope to see them rolling on the street soon but I am also hopeful that the influencers in our society start sexing up the image of lower impact transport solutions and other cost effective solutions - especially in this economic climate. However, efficiency or cost effectiveness does not always live up to the hype either as noted by the Khazzoom-Brookes postulate.
So who wants to start making not owning a car cool?
Photo credit: http://flickr.com/photos/djkubik/2386857433/
* Woods Travel Tips
Posted on November 24th, 2008 by Dave Johnson. Filed under Uncategorized.
* How I Use My Dell
Posted on November 14th, 2008 by Dave Johnson. Filed under Uncategorized.
I recently got a Dell Latitude E6400 so figured that I would try to get on Hacker News like Tim did about his Mac workflow. Something tells me this might be a difficult thing
I have made the switch back to PC from Mac. I switched to Mac in the first place since I had my old IBM T41 stolen and at the time the MacBook actually seemed like good value. Some of the main reasons for switching back include the fact that I needed a new laptop and didn’t want to have to buy *another* special connector from Apple to connect to an external monitor, nor could my Mac handle Eclipse even at 2.4GHz with 2GB of RAM (well OS X couldn’t but VMWare could … sort of. Maybe I was doing something wrong!). Oh and did I mention that my new Dell is 25% cheaper than the equivalent MacBook Pro and that includes a Dell 3 year onsite next business day support package? Next business day! I never want to have to talk to an Apple Genius ever again just to have them tell me that they have to send off my computer to get anything fixed.

Ok, in with how (and why) I use my Dell.
Operating System
While it comes at a premium, increase of $50 or something, I had no choice but to go with the “downgrade” to Windows XP Business. I really appreciate that Dell gives users that option cause if I had to get Vista I would have probably gotten a Mac instead. XP is totally fine and I see far fewer slow downs or crashes than I did on the MacBook - YMMV. All the Dell Control stuff is pretty annoying for changing mouse, wireless and most other settings, I much prefer the native Windows or OS X feeling of those.
Hardware
I use the great “nipple” mouse pointer that is a nice reminder of my old ThinkPad and turn the touch pad off completely. The E6400 has a light monitor and adjusts the LED screen and keyboard backlight appropriately - it’s nice that they are on par with Macs on that feature. It has a SmartCard reader, VGA and HDMI (or at least some sort of digital video thingy) along with all the standard USB etc ports and DVD.
Disks and Backup
Holy shit do I ever love Windows Exploring! I don’t think that I have ever seen a more annoying piece of software than Finder. What is amazing is that most Apple users even agree with me that it is completely terrible. Good thing that they added stacks in the dock in Leopard and left Finder as is …
Everything for me is in the cloud (Flickr, YouTube, Delicious, Wordpress, Google) so I don’t really backup much. However, just for save keeping I do put a few things on an external hard drive and my music is all on my iPod - though most of my music I couldn’t care less if it all got lost.
Taskbar
I don’t really use the taskbar too much. Alt+tab and Windows+e/r/m get do pretty much everything you need. Of course for everything else there is Launchy (Alt+space) that is just like QuickSilver or Spotlight and it is open source to boot (as if I am really going to go in there and try to change it or something!). I tried Dash Command but it didn’t even find Firefox. The one thing that I used to use a lot was the address bar, however, Microsoft had to get rid of it in SP 3 for some reason *facepalm*.
I use the quick launch tray a little bit - mostly just for my different browsers that I need for testing. and of course the tasktray is filled a whole pile of shit. With the address bar gone I am thinking that I might just try hidding the taskbar all together.
Screen
I use an external monitor most of the time aside from when I work at home and lounge around on the couch. The screen is a bit more compact than a MacBook Pro at 14″ but with the same lovely 1440*900 resolution. I was really fealing squished on that MacBook 1280 resolution. I never used spaces on the Mac so no love lost there, however, expose did come in handy once in a while and I am searching for a good alternative on Windows - most I have found only respond to key presses (F9-11) but maybe that will be ok.
Terminal
I use terminal a lot for building, ssh, mysql etc and Command Prompt works just fine for me (Update: as long as it is augmented with Cygwin). I increase the default settings of course so that I can actually see it and definitely increase the buffer size to something reasonable. Thinking of tricking out the colors from just basic black and white but haven’t yet. I did like the semi transparent Terminal.app but that is just superfluous really.
Google. Google mail is great. I can’t imagine using something like Outlook or *shudder* Thunderbird.
Calendar
Ditto.
Browsers
I use Firefox 3 for most of my browser since I love the address bar search feature - it is amazing - as well as the saving / restoring of open tabs. I usually have a lot of tabs open and once in a while Firebug will cause Firefox to crash so being able to load up those old tabs is a god send. Oh yah I use Firebug, all the time. Love it. I need to use IE6-8 for testing as well as Firefox 2, Safari 3 and Opera 9. I might consider trying Safari 3.2 as my default browser but will see.
Coding
I use Eclipse Europa for most of my coding needs. I never really got into TextMate on the Mac but tried some alternatives on Windows like E-Editor and Intype but neither of them even had a “search in project” feature so both were quickly trashed. E-Editor didn’t even support my mouse wheel for scrolling. In addition to Eclipse I have a few important plugins like Flex Builder (which of course now includes JSEclipse for some inane reason) and I use Aptana for HTML and CSS editing as well as Rad Rails for RoR and their Adobe AIR plugin. Eclipse also has Git and Subversion plugins which really rounds out the needs for writing code. I occasionally use Visual Studio - which is a great IDE - and use MySQL for most of my database needs.
Other Clients
I am finally getting back onto IRC with mIRC, while I use Twhirl for Twitter and GTalk for chat. I am very happy to no longer be using Adium. I have Office installed but use Google Docs just as much probably since most things need to be written collaboratively. I might try OpenOffice 3. Of course I use iTunes for music and, come to think of it, maybe my Dell will actually be able to play to my AirTunes which my MacBook has not been able to do for the past several months. I also use Tortoise and Subversion of course and these days Git too with msysgit which is not all that bad.
Security
What’s that? I leave my Windows firewall off cause it’s annoying. I haven’t had security problems in a long time unless you consider having your laptop stolen from your office a security problem - I can only assume it went to a good cause (Vancouver DTES).
One last thing, did you know that when you click on the maximize button in Windows XP the window will actually fill the entire screen. True story.
This is just my exerpience over the last year. YMMV. Let the flaming begin!
* Aptana Cloud Officially Released
Posted on October 31st, 2008 by Dave Johnson. Filed under Uncategorized, cloud.
There has been a lot of talk these days about cloud computing with big announcements by by Google, Amazon and Microsoft practically daily.
Now add Aptana to that list. Not only do they make a great Ajax IDE in Aptana Studio but they have also been developing their own cloud solution. Kevin Hakman from Aptana puts it thusly:
Aptana Cloud is an elastic hosting and application lifecycle management service that’s integrated right into Aptana Studio and thus Eclipse. Basically it takes all the sys-admin work out of the process and gives developer and their teams instant scalable production environments that take only minutes to deploy to, and delivers hosted source control, staging environments, backups, monitoring, reports, stats, etc… to streamline the entire app lifecycle – even before you go live. (and it costs just $0.04 cents an hour to get started, except there’s also a free trial promotion for a limited time too).
Andre and I recorded a video with Kevin back at JavaOne where Kevin gave the world it’s first peak at Aptana Cloud so it is cool to see it get to the 1.0 release!
Check out this blog post form Aptana for a little more info about it.
Recent Posts
Archives
- March 2010
- February 2010
- January 2010
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005


