shuteyes.org is live!
Tonight I've launched a new website, shuteyes.org. Shut Eyes represents my heart and my drive in life and programming. I am a creative person. I constantly feel the need to express myself, to say something through some medium. I'm not a visual person. So I can't design a site or paint a picture. So I express through music and programming. Though programming is technical, it's the communication and expressiveness that I'm really drawn to. Shut Eyes is the kind of site that I love to develop. I spend a lot of time during my normal business day programming in other types of things like scripts for text processing and spreadsheet parsing. I'm innately bad at those forms of the discipline because it's not expressive to me. I lose the art there. I think it must be where other people find it, but not me.
It is obviously still in the early stages. There aren't a whole lot of features right now. But that was on purpose. I wanted to get something usable out then build on it. I can definitely use help with testing especially from IE7 users (sorry IE6 folks, no soup for you, upgrade you know you want to). Use the contact form to tell me what sucks. I really do want to know.
Lastly, Shut Eyes is part of a larger vision in my world. It is the start of what will become the Shut Eyes Foundation. A means to filter aid to the helpless when Lark and The Owl are touring at full speed. In some small way Christ's hand in the world. We hope to use it as a face, an avenue, a symbol of the love that the poor and broken aren't forgotten. Please enjoy the site.
A new django site: shuteyes.org

It's not 100% ready for launch yet, but I wanted to write a little about something I've been working on lately. It's sort of a pet project of mine, shuteyes.org. Shut Eyes is an awareness site where members can submit content about awarenesses they may have related to local and global issues like social injustice, poverty, human trafficking, etc. The world is full of issues that many people don't see, especially those people living in rich countries like America and the United Kingdom. My hope is that through this site at least a small portion of those people can be affected by what they see and can move to change some small part of our ailing world.
The site is being developed with the awesome django web framework which I've worked with a lot over the last few years and continue to favor for all sites I am able to choose a framework for. I'm still a few weeks away from a launch but in that time I hope to post some blog entries about using django to develop a site like this.
If you think this site is going to be so badical you can't hardly stand it, please send me a message and I'll be sure to get you on the beta testers list.
Stupid does
Albert Einstein said: "No problem can be solved from the same level of consciousness that created it." A modern day equivalent: "Stupid can't fix stupid".
Update on what's been happening with me
It's been awhile since I've posted anything. So here's a quick update. Ed and I have been pretty busy working on a plone 3 upgrade for Mohawk. I'm also doing some javascript animation work for Chick-fil-a right now with the dojo toolkit. That's got my evening hours pretty much tied up.
Kat and I are writing new songs. They still need some arrangement work but we've got enough now to play a set at least. I got a chance to hook up my pro tools console earlier this week. So we're one step closer to recording. We have been kicking band names around. The latest favorite is Snow Bird. Any thoughts?
Quick Tip: Simple view helper
Here's one nice way to cleanup some view code in a rails app. Somebody please let me know if there's a better way to do this.
This is based on the fact that in ruby hashes you can pretty much use anything as a key. Here I'm using the boolean data types true and false. On the console you might do this.
>> does = is = { true => 'Yes', false => 'No' }
>> active = false
>> is[active]
=> "No"
>> exist = true
>> does[exist]
=> "Yes"
And in rails you could do something similar in a helper.
module ApplicationHelper
def is
{ true => 'Yes', false => 'No' }
end
alias does is
end
Which then becomes available in all your views like this.
# Using regular erb templates <p class="label"> Active?</p> <p><%=is[@user.active?]%></p> # Using haml %p.label Active? %p=is[@user.active?]
So on the page it would produce a pretty "Yes" or "No" output instead of "True" or "False"
I think this is much nicer than doing something like <%= @user.active? ? "Yes" : "No" %> everywhere you have a boolean you want to display as a more friendly yes or no.
Of course this is just one example. There's lots of little things like this in ruby that can help make your code more concise. Explore!
Gotcha: Rails namespaces and testing fixtures
When working on bigger projects I really like to separate my code into different namespaces, directories, and files as much as possible. As you probably know you can do this in rails by creating sub folders in places like '/app/controllers'. So for example if you have an admin section of the application you might have '/app/controllers/admin/some_controller.rb'. The corresponding controller class name would then be 'Admin::SomeController'. And if you like you could create a model for that controller as '/app/models/some_model.rb' with it's class name as 'Admin::SomeModel'.
Ok, so this is all fine right. Well today I was doing some unit tests on a project where I'm using this kind of namespace separation. In the past I've used Test::Unit but lately I've gotten into BDD and rspec. So in my app I have '/spec/models/admin/user_spec.rb'. Everything was going fine until I tried to use the fixtures located at '/spec/fixtures/admin/user.yml'. I was getting the following error:
Errno::ENOENT in 'Admin::User with fixtures loaded should find an existing user' No such file or directory - /spec/fixtures/users
Ok, well of course not. My fixture are located at '/spec/fixtures/admin/users.yml'. After poking around a little I noticed this in the rspec_helper.rb:
config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
Since rspec is just a wrapper really for the built in testing framework rspec here is just resetting the default fixture_path to match the organization of the rspec files. Ok, great so I'll just do the same thing in my test right.
require File.dirname(__FILE__) + '/../../spec_helper' describe Admin::User, "with fixtures loaded" do self.fixture_path += "admin/"
Woops!
FixtureClassNotFound
This is where I got a little stumped. After about an hour or two of digging I found what needed to happen was that I needed to explicitly tell the testing framework which model class to use with this:
set_fixture_class :users => Admin::User
This is one of those minor annoyances for me with Rails. The magic of convention can bite you here and there. But just remember in the future if you want to break from convention when using Rails there is almost always a built in way to do that. You just might have to go fishing for it if the answer isn't immediately apparent.
Where do you find your pennies and the drive to keep going?
I've been a full-time, self-employed web developer going on three years now and I love it. I get more time to work on music and being far from the dribble of corporate meetings and team building exercises is something that I cherish. So far I've been blessed enough to have steady work as sort of a sub to another guy. A good friend of mine in Atlanta who has some clients with deep pockets and plenty of projects. But being a sub has some drawbacks financially and otherwise. One of those drawbacks being that I don't very often get to use the tools that I think are really great and that excite me.
Over these last few years I've had several clients come and go. For about every 10 or 15 leads I'd say I get maybe 1 job. So for the last few months I've been looking for new ways to earn my pennies while working on some of my own projects that I'm excited about. I'm aware of sites like Authentic Jobs and the like. But I've never used one for fear that I'm gonna get screwed when it comes time to settle up. There are a lot of really talented people out there looking for work just as I am. But the interweb is vast and I know there's plenty of cool projects to go around.
Anybody have any experience with this sort of thing or want to share some insight on the subject of finding new gigs?
Also, what keeps you motivated to stay away from the stability and cheaper health insurance of corporate jobs and the 9 to 5?
Sippers coffee and a chance encounter

Well yesterday turned out to be very interesting. The story starts earlier this week. I was doing a little poking around online when I ran across a company called Less Everything. Less everything is a local Rails shop here in Jacksonville. I don't exactly remember how I hit their site but I do remember that it started with urbanjacksonville.info which I visited because I saw an add for it on the screen at San Marco Theatre. I thought it might be a good place to discover a new coffee house to work at. That was not the case but it did lead me to discover nGen Works, another local design and Rails shop where it seems the author Joe Marchy, of urbanjacksonville.info works. I took a little time to look through nGen's projects page where I noticed a company called Hash Rocket, yet another local Rails shop. As I'm looking at all this I'm feeling like I've been living in a bubble here for the last 5 years. I just had no idea there was such a big community of open source developers in this town.
Some time ago, maybe six months, my wife Kat went to this coffee shop called Sippers over on Gate Pkwy with our friend Amy who lives down the street from there. She mentioned that I should check it out as a new place to work when I get tired of being around the house. For whatever reason I never did until yesterday. When I pulled into the parking lot I honestly almost turned around and left. It's in this little strip mall where a couple restaurants are and some other places. It was lunch time and there was no parking. I found a spot near the office building behind the shops and parked and went it anyway. When I walked in I noticed a few people sitting in the area immediately to the right of the front door. There was one guy in particular that looked familiar. I went up to the counter and ordered some coffee and thought for a minute about where I knew this person from. After I got my coffee I sat down on the couch behind these folks and took out my laptop. I overhead them talking so programming stuff and another person said this guy that I recognized name, Allan. Then it dawned on me. This was Allan Branch of Less Everything. I recognized his picture from their website. So I turned around and introduced myself and told them I recognized Alan. Sitting with Allan was Steve Bristol and Rhea Drysdale also of Less Everything. They all turned out to be super nice and so I spent the rest of the day working and hanging out.
Throughout the course of the day some more people came into the coffee house. I learned later that a bunch of developers and designers from different companies get together on Fridays at Sippers to work. Among some of these people were Sandro Turriate who although is a Rails developer at Hash Rocket now, used to be a python developer and knows a good bit about Django. Sandro's pair partner for that day Jon Larkowski AKA Lark was also there. All of these folks seem to really know their craft and that was very refreshing to see. So needless to say I think Friday at Sippers will become a regular thing for me.
Now, inspired by yesterday's run in, I think I'll spend the weekend dusting off some Rails code for the CMS I did last year and do some much needed refactoring and test writing to bring it up to date with the current version of Rails. It also will help me to talk shop a little better with my new found friends being that none of them have even heard of Zope (why am I not surprised). Rails isn't a regular thing for me but I've done about 5 decently sized projects with it since discovering it back before it's 1.0 release. So with some cold brew and a little free time for a change, I'm off to code!
Welcome to my new site
So here is my new home on the world wide interweb. I'm excited about the possibilities here. I hope to spend some hours every week writing thoughts and tutorials about programming and other topics that are on my mind. My aim here is to flush out my own ideas as well as maybe provide some useful information about problems and situations that I run into everyday. If I can save someone some time and loss of sleep over the oddities that we as web developers often encounter, I will be happy. So please, explore and enjoy what is to come.