August 3, 2008 at 6:51 pm
· Filed under brewing, design, development
Starting to think about brew manager again. We had a brew at my house on Friday, 55 gallons of beer, with most of it ending up in my basement for fermenting. Chris has gotten me a logo and a preliminary layout. Both will get revised some more but it’s something to start coding a view to so that is exciting. I hope to get some work done this week and next, then its back to school at the end of August. This will probably take some time away from Brew Manager but not too much hopefully.
Permalink
July 14, 2008 at 4:37 pm
· Filed under Uncategorized
I’ve been on vacation, and then sick and then going on vacation again. There won’t be any updates from me until the 30th or so. I’ll be doing ragbrai and concentrating on eating pie and drinking beer for the next week or so. Until I leave I need to get some stuff finished up at work. Hopefully when I get back Chris will have some layout stuff ready for me and I can get to work on getting that implemented.
Permalink
July 7, 2008 at 7:59 pm
· Filed under development
Not really, but it seems that way. Lately I’ve been researching the best way to get tabbed navigation in a rails app. I’m debating between a plug in and rolling my own sliding doors type solution…. and /or something more AJAXey.. Once I see what Chris has cooked up I’ll make my decision based on what fits that. Other than that I’m starting to think about getting the inventory management stuff going…
Going camping again this weekend and work has picked up so things are on hiatus until next week or so.
Permalink
July 3, 2008 at 7:44 pm
· Filed under Uncategorized
Today I did the re factoring I was talking about in the last posts. It went well, and more importantly quickly. What I have now works much better and got rid of quite a bit of complexity. Functionality wise I’m ready to stick out there for folks to play with. I’m going to talk to Chris first and see how much of the look and feel we can implement in a few days before I do, mostly to make a better first impression. There is still quite a bit of navigation clunkiness that I’d like to get rid of. Even with the navigation issues, I’ve got recipe creation working from end to end and a reasonable amount of ingredients seeded into the database.
Something may popup soon….
Permalink
July 3, 2008 at 11:07 am
· Filed under design, development
Chris and I met and had some discussions about a visual theme and layouts. We think we’ve got a target layout idea for v1. At the risk of articulating it incorrectly I’ll let Chris talk about it if he wants to comment (Chris if you want to blog stuff here yourself let me know and we can make that happen).
During the demo for Chris and playing with the site myself I have come to the realization that I have gotten the relationship wrong between ingredients and recipes. Currently we have the notion of an ingredient that says what it is, but nothing really specific beyond that. For example you would have a malt extract ingredient. There was another object called recipe ingredient that had more specific information about manufacture, extract percentages (60/40 wheat to malt or whatever) and quantity. Recipes and inventories were both constructed using the recipe ingredient object. After working with that I found it became a pain in the ass to build a recipe because you need to link it to a specific instance of a recipe ingredient. This meant you had to fill out manufacturer and all that for things in your recipe. This is wrong and just made things a bear. Its also what caused me to take so long to get recipe creation working (since it had a bunch of dependencies on inventory functionality).
I’ve decided to ditch that idea and just construct recipes with the base ingredients. So instead of saying Briess Malt Extract you just say Malt Extract as an ingredient in a recipe. This feels better and is how recipes are usually written. I’ve renamed the recipe ingredients class to be inventory ingredients.
A recipe will control how much of each ingredient it has and what not. There will still be an intermedary object that will encapsulate quanty and the ingredient, this will also be used in the inventory and proably be able to perform converesions (cups to oz etc)). This should reduce the coupling between recipes and inventories and save me a few headaches.
Permalink
June 30, 2008 at 6:43 pm
· Filed under Uncategorized
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.
Permalink
June 24, 2008 at 4:25 pm
· Filed under brewing
But you know, beer, and pictures of it. Things in my basement are progressing well. 
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.
Permalink
June 23, 2008 at 7:16 pm
· Filed under development, rails, testing
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.
Permalink
June 19, 2008 at 10:50 pm
· Filed under design, development
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?
Permalink
June 17, 2008 at 7:45 pm
· Filed under brewing, development, rails
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.
Permalink