Archive for June, 2008

Not much happening latley

I went camping next weekend so there was no progress over the last few days. That will hopefully change soon. I’m meeting with Chris tomorrow to discuss design and navigation, as well as whatever ideas he has for the site. I’m working away on getting the unit / function tests finished for all the code that is written before I do more feature work on the site. I’m down to one failing functional test. Hopefully I’ll get through that tonight.

Comments

Not development related…..

But you know, beer, and pictures of it. Things in my basement are progressing well. Basement Beer

Everything is from left to right.

Back: Grand Cru, Lambic and a Flanders Red

Middle: Brown Ale, Cherry Burbon Stout, Heff

Front: Urban 312 Clone, Citrus Thing.

Comments (2)

Looking at unit tests

I neglected to read the ruby / rails unit test documentation because it seemed cumbersome at first glance. I rolled my own thing for models and assumed controllers would do what they were supposed to do. That worked well enough to get me up and going but tonight I decided I needed something more reliable and rather than reinvent the wheel…..

So I did some reading. The unit tests aren’t as decoupled as I would like them to be (yes Michael Feathers, you have made an impact in my life (his legacy code book is pretty good. I suggest it). I firmly believe that a unit test should not use a database or network. I think you can do that with the model well enough (by avoiding fixtures), but it looks next to impossible for controllers. From what I’ve read testing a controller makes http requests to the web server. I’m not a purist or anything, but its a bummer it has to do that. And I don’t think I can setup an in memory model object for a controller to work with (I’m probably wrong about that, I’d guess there’s some magic) I’d imagine for a full tests suite it would slow things down considerably. The other thing I’m not immediately seeing is a way to sense through a fixture. While not strictly necessary (and may in fact be more trouble than its worth) it sounds like a neat idea. All that said, it looks like the functional testing you can do with the unit test framework is pretty slick. I’m kicking around the idea of setting up some sort of nightly check out / test run just for kicks.

There has been a vanilla crisis in my house ( I think I get cookies!) I’m out.

Comments

It’s alive

In a clunky Frankensteins sort of way. Recipes can be created and attached to a user. Ingredients can be added to said recipe. At the moment all recipe ingredients are shared between all users… I’m not sure how I feel about that. A recipe ingredient is a more specific ingredient. It adds Manufacture, Quantity and Unit of Measurement… the more I think about it those last two may belong somewhere else. Anyway. An ingredient would be something like DME, while a Recipe Ingredient would be something like 2 cups of Briess DME.

The nav is still incredibly clunky. Hopefully Chris has had some time to think about what navigation should look like. Next tasks is to figure out if the measurement stuff should move out of the recipe class itself and into a helper of some sort. I’ll also make it so recipe ingredients aren’t shared between users (may hap we will have some common pool of them and then you make them your own).

The other task I’ll tackle is the ability to add steps to a recipe. This should get recipe creation all done and I’ll have produced something capable of storing recipes per user that can be searchd by everyone.

One thing I’ve done, that I’m not sure what to do about is allow recipes to be created by an unregistered user. This is cool, and they can create it and add ingredients and all that. The thing is they can’t come back and edit it later. Once they click ‘save’ that’s the ball game. I’m officially soliciting suggestions. One thing I was thinking bout is using gravatar’s. They have the ability to bind a session to an IP which is kinda cool, and it just looks like it would be a neat thing to integrate. I don’t think they provide anything I couldn’t get with a session cookie or the like…. but eh… why not. Other ideas appreciated. Should I just restrict recipe creation to registered users (not wild about that).

Also, wordpress has this autosave feature that turns spell check off (when using the wyswig editor)… anyone know how to disable that?

Comments (1)

Things getting done, even if they are in the wrong order

Tonight users got inventory’s. I’m not sure why I started working on this. I added it in the account controller the other for some reason. That struck me as ugly so I moved the creation of the inventory down into the user model. I also learned what magic (err not so much magic as you know… passing a parameter) I needed to overload ActiveRecords constructor. Seems harder than it should have been, but I probably wasn’t looking in the right place (google didn’t turn up anything too revealing, should have put Buck on it, mad google skills that one.). If anyone is ever looking for it you want to do:

def initialize(params = {}) #Not def initialize()
    super(params)
    ....
end

So anyway, users now compose inventories. Life is good for them. Still can’t enter recipies, because you know I got side tracked. But eh that’s how it goes.

I’ve got beer to rack & bottle (heff into bottles and racking a brown to secondaries) tomorrow night so I won’t get to work on the site for a day or two. When I get back to it I’ll finish up the recipe stuff and get it out there.

Comments

Things are happening

I’ve gotten bugzilla installed. For the most part painless. The guys at dreamhost were nice enough to install a module for me. I tried myself but the cpan wrapper script, and just straight up make were getting killed. I think it was the memory/cpu cop. If anyone wants to install bugzilla at dreamhost the directions found on the dreamhost wiki are spot on. I’ve written a script that takes care of modifying the files they talk about and changing the permissions. If anyone wants it I’m happy to hand it over. I figure it makes upgrading less of a pain.

I’ve gotten the site to the point where a user can log in, and create recipes, search what recipes belong to them as well as everyone else. What a recipe is needs to get a little more fleshed out (adding fields). Due to family running around and merriment ( everyone should go to an Indian / Moroccan wedding at least once, way fun) I didn’t get as far as I’d have liked. Once I get the recipe fleshed out a bit I’ll post it to alpha.brewmanger.com (there will be an announcement when this happens, few days yet I suspect as work will be busy this week) and folks can start playing with it. At that point the site will be useful for storing recipes, but not much else.

After the recipe stuff is up I’ll tackle inventory as that seems to be the next logical step, and then the can I make this / what can I make with what I have functionality.

I’ve also had a friend volunteer to help with site design and the visual stuff. I’m pretty pumped because that isn’t my strong suit. The hope is that he can more or less draw me a picture and I can make it look like that. We will see how that goes depending on how his avaliablity is. The first thing I put up won’t have much beyond basic navigation and total page refreshes, substance over style :)

Comments

Todays progress

I took this afternoon off work because its slow. Thats a nice change fwiw. I got a chance to get much of the stuff needed setup on dreamhost. I’m using Google Apps for email, that was super easy to setup. Good for those guys. Once again Google pretty much proves they are the bees knees when it comes to these things.

I got the boiler plate webpage up that says “hey I’m going to build something”. I hope to have recipe creation up by the end of the weekend. I’m going with the release early and often approach I think.

In more exciting news, for me at least. I got subversion up and running on a host outside my house. So now it runs on dreamhost. Hopefully I’ll get bugzilla installed and I can stop making notes to my self via google docs.

So far I’m liking dream host a lot. I’ll put up some intelligent and organized thoughts about why I switched over from godaddy hosting later.

Comments

Making progress on the hosting front

I’ve got the blog moved from the old site to the new. It involved all of clicking export and then import, but still I fell proud of myself.

Comments

Two problems solved

I registered a new domain tonight, and I guess we will change the name of this thing. It will be brewmanager.com now (DNS probably hasn’t propagated yet). If you know what I do for my day job it’s kind of a fun name. I also changed the hosting to dream host (but haven’t’ moved anything over yet). They seem to have a better deal for more or less the same money.

I’ll move this blog over and send out an upudate via RSS when it stops working. For the nearish future everything will still live at beersessions.com and the blog will redirect to the right place.

Comments

Looks like I forgot to check something….

Turns out a few guys in Santa Cruz own brewsession.com. It appears that they are making something similar, if not the same. Good for them. I’ll still create my deal but will end up changing the name when I think of something that isn’t just the plural of something someone else owns.

Comments

« Previous entries Next Page » Next Page »