Storycards

Posted by Doug Thu, 06 Oct 2005 03:36:51 GMT

I’ve started working on Storycards. I’ve looked at a bunch of solutions for project planning. None of what I’ve looked at really models how I like to work. 37Signals has several products that work very much like what I want. The problem is that none of them are exactly what I want. What’s more, to their prices for the version of basecamp that includes time tracking is simply too expensive for me. John Wilgar has written eXPlainPMT, an XP-based project management app. Even though John’s doing some great work, I think it’s just too heavy for me.

So, I’m going to roll my own. I don’t have a lot of time to devote to this. My plan is to keep it very simple. I hope to just pick off each of my “requirements” one by one as I can. I’m thinking maybe one requirement a week. We’ll see. Feel free to grab the code. Send me patches and I’ll be glad to look at them. Oh, yea. Of course, this is in Ruby on Rails. The link above has my project summary and goals.

Posted in , ,  | 2 comments

Fun with Test Driven Development

Posted by Doug Thu, 29 Sep 2005 18:31:00 GMT

My partner and I are trying to implement the state changes of two people initiating a meeting and negotiating the time. Thanks to TDD we worked through it!

For a while we sat there talking about “what if”, “and then”, “but what about” trying to get our minds around the whole process. We had tried coding a couple of times only to whack half-baked ideas. Finally I came to my senses, “Even if we don’t understand the whole process, we know what this simple case should look like.” I wrote a five line functional test, and went and hard-coded the controller to make it pass. Success! We made something work!

So Dave says, “OK, if that’s the way that should work, this case should look just like this,” and codes another test. We then go and hard-code an elsif clause for that test. Four tests later and some refactoring we had our logic working the way it should.

A couple things we experienced. First, we didn’t really know what to do but was able to code an ultra simple test. That was enough to get us moving in the right direction. Second, we didn’t have to code the final, elegant solution. We just hacked together something that would work for the simple test we had. It wasn’t until we had done that a couple times that we could effectively “triangulate” what the elegant solution should be.

Posted in , ,  | no comments

Calendars and Group Scheduling

Posted by Doug Sat, 17 Sep 2005 06:05:04 GMT

It’s been a pretty good couple of days for Rails coding. I’ve done a bunch of validation tweaks, mostly finished the calendar, and begun on group scheduling.

I was having problems using embedded hidden forms for all my edit and add links on events. I did a couple things to improve the performance of the page. First, I ditched the embedded forms and made them separate page loads. It was cool to have the embedded forms the magically appear and disappear; I miss it. Several people suggested I just embed a single edit form and a single add form and use Javascript to update the values before it’s submitted. If I were a Javascript stud that’s what I’d do. Maybe when I’m all grown up I’ll be smart enough to do that.

The other thing I did was change how I tested for events on calendar days. I had a find_by_day method that would basically find(:all).select { |expr| expr.occurs_on?(day) }. I’d then loop over the calendar days calling that function. What I decided to do instead was simply collect all the TimeExpressions into a single list in the controller and let the view do the select for each day. This exposes more of the model’s logic a little. I like the way the code looks to simply calll find_by_day for each day. However, only doing one find and then doing the selects in the view shaved a fair amount of time off the page load.

So I’m doing some “group scheduling” too. It’s quite limited. The TimeExpressions I’ve been working with is really to build a “free-busy” schedule of available times to book appointments. What I need to do is allow a user to invite another user to an appointment. These two users may have to negotiate an appointment time. So, it makes sense for my Invitations to acts_as_versioned. I had seen acts_as_versioned discussed a couple times on the maling list. Let me just say, I’m really happy with it. I was able to set it up without too much fuss. It works pretty much exactly as advertised. Thanks technoweenie!

Finally, to send out the initial invitations I finally got around to coding some AJAX stuff. It’s quite simple; just a link that makes a single request to send the invitation. I felt so sophisticated! Only about an hour or so to get it studied, written, tested and committed.

Posted in ,  | Tags , , ,  | no comments

Older posts: 1 ... 7 8 9 10 11 ... 14

Copyright 2001 - 2005 by Lathi.net and Doug Alcorn

Creative Commons, Some Rights Reserved Ruby on Rails Developer Powered by Debian GNU/Linux Powered by Typo