Verbose Logging

software development with some really amazing hair

T + G I F R

Archives for 5/2009

Using Ruby's Eval To Make Cucumber Bigger And Greener

· Posted in Programming
In case you just crawled out from under your rock just to read my blog, and haven't the foggiest, cucumber is a ruby acceptance testing framework, and works great with rails. I was writing features for admin users in this application, and needed a step like this: Then I should be editing "test@example.com" Where the quoted email is the login. Later on (in fact right after…I was testing edit functionality, and after safe you end up on the view us…

ruby-openid IOError With Passenger

· Posted in Programming
The ruby-openid gem was giving me problems with Passenger, causing IOError problems. I found the fix here The gist of it? Add OpenID::Util.logger = RAILS_DEFAULT_LOGGER to environment.rb, and you're good!

RSS Fun With feedzirra

· Posted in Programming
Sometimes, checking RSS feeds is boring. Sometimes you just want to grab a picture or whatever from each item. For that, there's ruby. Oh and feedzirra. There is an RSS feed I read, except it's more of a picture feed and I just want to grab the pictures from it, and doing this through Google Reader is no fun. That's where ruby and feedzirra come in. feedzirra is a ruby gem for dealing with RSS feeds. It's got a great interface and just works. So…

intoDNS, A DNS Tools Replacement

· Posted in Software
intoDNS replaces DNS Tools, which used to be free, then became pay for, but now looks like it's back to being free, but whatever. intoDNS provides a bunch of nice information, and seems quite useful. Check it out. intoDNS

Make Eclipse Not Suck On Ubuntu 8.10

· Posted in Software
I don't know if this is a problem on Jaunty anymore, but whatever. I had to do this on 8.10 to get Eclipse to actually run and function properly. In a word: printing. In more words: disable it. Who prints from Eclipse anyway? Add this as a vmarg in your eclipse.ini -Dorg.eclipse.swt.internal.gtk.disablePrinting The long story: When I was at school, my Eclipse instance just would not start. Well, scratch that. A blank workspace would start fine, …

Git Things I Always Forget

· Posted in Programming
Create a branch locally, and push it to origin: git checkout -b branchname git push origin branchname Get at that branch from elsewhere: git checkout -t -b branchname origin/branchname

POP Moved To Heroku

· Posted in Software
Adam Wiggins hooked me up with the Heroku stuff (and by hooked up, I mean I emailed Heroku support and he enabled the services for me), and so I moved my professional online presence to be hosted on Heroku. The URL is the same as before (http://www.darkhax.com), but now it should be just a bit snappier, and easier for me to deploy to. If you haven't at least checked out Heroku by visiting the site, do so now.

Stubs Vs mocks

· Posted in Programming
I keep coming back to asking myself what the difference between stub and mock objects are and I have it figured out, so here it is: Stubs just return whatever you tell them do, and that's it. Mocks have expectations and cause tests to fail if those expectations aren't met.

Up In The Cloud: People Missing The Point

· Posted in Editorial
You'll hear the phrase "the cloud is the future" a lot floating around the tubes, and a lot of people seem to dismiss it. I came across this from my RSS feeds, and one comment in particular caught my eye. I can get 1.5 tb hard drives for less than 70 Euros and they are accessible even if my net connection is down. I didn't quote the entire comment, since the poor grammar caused my head to hurt… This person is clearly missing the point. They've o…

Compiling Ruby 1.9.1 Alongside Ruby 1.8.7

· Posted in Programming
I almost threw my laptop out the window figuring this out, but if you want to install ruby 1.9.1 alongside ruby 1.8.7 (whether the prefix is the same or not), you have to give ruby 1.9 a program suffix, but also a baseruby. So you need something like this: ./configure --prefix=$HOME/local --program-suffix=1.9 --with-baseruby=ruby --enable-pthread

Scribes, An Editor For Gnome

· Posted in Software
I checked out Scribes this week, and I must say it has potential. It has a slick yet simple interface and look, and a few nice features. It has word completion and template support, so you can setup snippets, and tell the cursor to tab through sections, so for example, you can have a ruby snippet to make a do end block, which will create the code, put the cursor in the block variable section, then a tab puts you in the block so you can write the…

Better ASM Output From gcc

· Posted in Programming
I always find myself needing this but never remember. -fverbose-asm Throw that at gcc when you are outputting asm (-S flag) and you'll get some useful comments to see what some of the code is actually working on.

Git On Windows

· Posted in Software
Speaking of git, you can get it on Windows, using msysgit. It works pretty well, in that I haven't had any problems with it, except some minor line ending things. msysgit Getting Started with Git and GitHub on Windows - Kyle Cordes

Design Patterns

· Posted in Programming
The good thing about design pattern writings is that they never really go out of date. Hence this link. It actually doesn't have a date, but I found it a long time ago. Anyway, here it is. Use them already! Design Patterns

Learn Python In 10 Minutes

· Posted in Programming
I found this a long time ago (in a galaxy far, far, away), and it's still up and still good. If you want to learn python, fly through this article and you should be good. Learn Python in 10 minutes

Slow And Expensive Please

· Posted in Software
I was looking around for an Amazon S3 browser and cam across digital inspiration talking about CloudBerry Explorer. The first thing that caught my eye was this screenshot. If you read around it, you can see you have two options of moving files between S3 instances. While options are nice, I'm not sure why anybody in their right mind would want to select the slow and expensive way. If you move between S3 instances on S3, it costs zero dollars. If…

Emacs And Termcap

· Posted in Software
I've had this problem before, but never wrote down how I fixed it. emacs would whine about not being able to open a termcap database file, and wouldn't start on the console. The X version worked fine, but using the -nw option resulted it in dying. The fix! infocmp -C rxvt-unicode | sudo tee /etc/termcap If you strace emacs when you start it, you'll see it tries to open that file, which doesn't exist on Ubuntu by default. I tried everything else,…

TurnKey Linux

· Posted in Software
I discovered TurnKey Linux while I was running around on the web, and found it quite interesting. From the site: TurnKey Linux is a new open source project that aims to develop high quality software appliances that are easy to use, easy to deploy, and free. The appliances are based on Ubuntu 8.04.2 which is an LTS release, so updates are supported until sometime in 2011. They even provide a base setup of either plain JeOS or the the basic stack.…

The Dell E521 Hates Me

· Posted in Hardware
So today I started my new job. There was much rejoicing. Mainly by my father, whose bank account I slowly siphoned away whilst at university. Being a software engineer (member-in-training), I work on a computer. This computer happened to be a Dell E521. Not a top end machine, but for what I was going to be doing it was plenty of machine. I could do with it what I wanted I was told; awesome. I'm now the first person at CodeBaby to be running Ubun…

Code Project Add-In For Visual Studio 2008

· Posted in Programming
Code Project is a great resource for developers. I use it, have projects bookmarked, read the newsletter, and got the T-shirt (okay that's a lie…just the underwear). This makes it even better. You can search Code Project by doing little more than highlighting or copy/pasting code, typing in a few words, and blamo!, there you have it. it uses Live Search for MSDN and the intertubes, which I'm not overly keen on, but if I want to really search my …

.NET Line Count

· Posted in Programming
I found this slick little app a few years ago, and it looks like it's still around. Count your VC# and VC+ lines, and it differentiates between code lines, blank lines, designer lines, etc, which is nice. The downside: it's really only useful for VC# and VC+ projects, which is alright if that's all you are working with. Check it out. C#, Visual Basic and C++ .NET Line Count Utility - The Code Project - .NET PS. You'll note that I didn't mention …

Rake Tutorial

· Posted in Programming
Oh me, oh my. When I first posted about this, in June of 2007, my original post started with Ruby is sweet. I should use it more often. And now, on Monday, I get to start my new job playing with Rails all day long. Funny how things change. Regardless, the quality of this tutorial hasn't changed, so here it is again. Rails Envy: Ruby on Rails Rake Tutorial

Oracle + auto_increment = Pain

· Posted in Programming
I had to do auto increment in Oracle a while back and it was painful. It ended up happening, but not in the nice MySQL way. Whatever, it worked. This site has a few tricks. Autoincrement primary key for Oracle