March 12, 2010

Pages


Search Site


Subscribe

...to receive future posts via email.

Topics



Archives

Entries for month: May 2007

CFMenuCal: Live Demo!

May 30 2007 by Adam

I decided to take advantage of the free CF8 beta hosting via hostmysite.com, and keep a live demo of the latest code up for you all to see.

http://h127218.cf8beta.com/ – Unfortunately they don't allow custom domains yet. I tried using a free Dynamic DNS name, but that's not supported.

Just refresh the page to get a new random calendar. Enjoy checking out my eating habits.

Current quirks:

  • When no meal is found for a day that satisfies all of the constraints (due to lack of variety or larger values of max-frequency) the day is simply listed as, "Skipped." Refresh the page to start over, or feel free to download it as-is and tweak it by hand.
  • The fruit/veggie picker is 100% random, meaning you could end up with broccoli 10 days in a row, however unlikely. I'm planning on implementing a frequency checker on this selection as well.

As always, please leave questions, comments, concerns, ideas, and suggestions in the comments!

Posted in CFMenuCal | My projects |

Settling back in

May 30 2007 by Adam

Now that the holiday weekend is behind us, I'm planning on settling back in this week. Sorry for the unannounced hiatus, but hopefully you understand. Those hot dogs don't eat themselves.

The Calendar view is more or less complete. I'm planning on adding a few classes and maybe a couple of DIV tags to make everything easily skinnable via CSS, but it's functionally sound.

The next things on my to-do list for the first alpha release is to add an array to specify special nights where no meal is required (Vacation, Dinner with friends, etc), and an array to specify maximum difficulty for specific dates (Something easy for poker night, etc).

I will be especially motivated to work on it this week, because June is already knocking at the door and my wife will be asking if we can use it yet. :)

Posted in CFMenuCal | My projects |

CFMenuCal: Calendar View

May 21 2007 by Adam

For now I am only focusing on the HTML Calendar view output – though a planned feature is a CSV (or similar) export so that you can tweak the menu in Excel or another editor. Here's a sneak peak at what the calendar view looks like right now, click to embiggen:

CFMenuCal Screenshot

Posted in CFMenuCal | My projects |

CFMenuCal: First prototype complete!

May 18 2007 by Adam

CFMenuCal - The First ScreenshotWell, it's not pretty, and it's not customizable via web forms (everything is hard-coded), and not all of the features are implemented yet (that's a lot of and's), but I've got a very, very rough prototype completed.

As I said, everything is hard coded. Each meal is an initialized struct, and then they are thrown into an array for easy searching. So far the only rules applied are proximity and repetition: two chicken-based meals aren't too close (a variable value), and each meal has a max-frequency property that defines how many times in a month you're willing to have it.

I've discovered why we have so much trouble putting together our menu every month, because the same issue is popping up for the program. The farther apart you set your minimum proximity, the more likely you are to run out of meals that fit all of the requirements before filling the entire menu. There are two ways to resolve this issue: reduce your minimum proximity, or expand your meal variety. We generally shot for at least a 6-7 day proximity when creating our menus by hand, and using a random number based application and the same set of rules we applied by hand, I wasn't able to consistently create a menu without any gaps with a proximity any greater than 4. I think we need to expand our variety. ;)

I've also allowed for a 0 minimum proximity – just in case you're the type of geek chef who would eat meatloaf 3 days in a row because a random number generator told you to.

Next up will be the ability to specify a max-difficulty by date, and then an optional setting to prefer more difficult meals on weekends, and maybe then – if I'm up to it – to try to keep more difficult meals farther apart. In the end, in addition to making a web-print-friendly version, I hope to be able to export this all to a CSV or another Excel-friendly format so that you can take a randomly generated menu that's almost what you want, and tweak it by hand.

Posted in CFMenuCal | ColdFusion | My projects |

CFMenuCal

May 16 2007 by Adam

For the last few months my wife and I have tried to put together a dinner menu for the entire month, in advance. Sounds crazy, right? The reason for doing this is three-fold: We eat healthier overall, because we plan fruits and vegetables on a regular basis instead of haphazardly having whatever sounds like it will go well; we get an entire month's shopping done in one day (except for additional milk, eggs, and bread that we sometimes pick up on our way home from work), instead of going "big" shopping every other week; and we save money, because we only buy the food that we know we will be eating, instead of stocking up on 6 boxes of fish-sticks because they are on sale.

The process goes something like this:

  • Pull out the list of dishes that we can make and eat frequently. This generally has about 15-20 dishes. It also has a column of our favorite side dishes (pasta, rice, crescent rolls, etc), and a column with fruits and veggies that meet with our picky approval.
  • Check our social calendar for nights we know we will be out, or will want something easy (order pizza when we're hosting poker night), and fill those blocks in first.
  • Then fill weeknights with easier meals, because nobody wants to come home from work and spend 4 hours over the stove. All the while, be sure not to schedule two chicken dishes near each other, and the same for beef, pork, pasta, etcetera.
  • Fill in the weekends with whatever meals are left over – generally something more elegant or labor intensive.
  • And finally, go back and match up side dishes and fruits & veggies to meals they would go well with.

After spending 4+ months doing this manually, we've become tired of the process.

And so, this has been a very round-a-bout way of announcing that I will be writing a tool to do this for us. So far it's working title is "CFMenuCal" – though that's the second name I came up with, and I had already submitted the project to RIAForge. Hopefully I can change the project name once it's been approved.

The original name was "CFEventCalendar" but once I started writing this post and thinking about how I was going to implement it, I realized how specialized it will need to be and thought that I had better go ahead and gear it towards creating menus from the beginning – not just as one use for it.

Posted in CFMenuCal | ColdFusion | My projects |