Another week of open source past, primarily on the following projects:
I hope this upcoming week will be as productive. Looking forward to it!
Over the past few days, I’ve wrapped up a new release of IceCube, and I wanted to share some of the changes and optimizations that came out of it.
One really exciting byproduct of the transition is that it allows for inline computation of occurrences for a schedule:
schedule = IceCube::Schedule.new
schedule.add_recurrence_rule IceCube::Rule.weekly
schedule.each_occurrence do |time|
puts "oh yeah boyeee - it happens on #{time}"
end
This is all possible because of another change.. Instead of having Rules andValidations as separate concepts, they’ve been merged into one, in addition to making things like add_recurrence_rule just add a SingleRecurrenceRule. This has simplified the code a lot, and the previously-existing spec suite fully passes.
These changes are great for the library, and I’m excited to see them head intomaster. Give it a shot and see how it goes!
Some introduction slides: here
Back in August, I flew down to Austin to speak at the Lone Star Ruby Conference about a Ruby library I wrote for handling recurring dates (you can find my slides at the bottom of this page).
Imagine you have a date rule like “The second and last fridays of every month”. This is going to make some really messy slow code. You shouldn’t have to solve this problem. In IceCube, the code would look like:
rule = Rule.monthly.day_of_week(:friday => [2, -1])
People are using this for all kinds of cool projects, from event calendars to prescription scheduling systems. The project is at a point now where I’m regularly getting pull requests from people for new features that they want to add, and its really exciting to make something and have it be so successful – despite its terrible name, and the fact that its free :)
This whole project started because of how open my employer, Patch.com is about open sourcing things that aren’t “trade secrets”. Seeing how well it went keeps me looking for things that we can do to help the development community. More companies should work like this. Its a great recruiting tool, costs you nothing, and helps you find issues that may otherwise cost you a bunch of money when the software breaks later on.
Some notable projects (a small subset) from the Patch idea factory: