Website Changes

As you may have noticed, the website has gotten a face lift but that's only the part of it. my CHANGE log is now generated in a totally different manner… SimpleNotes. Simple Notes is a program I am currently developing. Today, it is 3 weeks old. The public release of Simple Notes is scheduled for the first quarter of 2012. Limited betas will be available some time before then. In a nutshell, Simple Notes manages information of any type in a quick effecient means. One of the features is to export notes matching a given tag (say #myblog) as a blog using either the default built-in template or a user supplied template.

More on Simple Notes as time goes on. If you are interested in being a beta tester please contact me, jeremy –at– cowgar.com.

go-iup Introduction

Iup is a cross-platform GUI toolkit that wraps platform native widgets, thus always a native and high performance experience for the user yet a simple API for the developer. It contains all the common widgets and in addition an advanced canvas, an OpenGL canvas, web browser widget (embedding Iexplorer on Windows and WebKit on other platforms), pplot and touch screen support.

Go is an open source staticly typed compiled programming language by Google that is expressive, concise, clean and efficient.

What a better mix than Go and Iup? Thus, go-iup is born, the wrapper around Iup for Go.

A Task Timer for MicroEmacs

A common option (and good option) with issue trackers these days is time tracking. It allows the developer to estimate the time required and then log the actual time spent on the issue. Why? It improves the developers ability to estimate the time for a given task thus releases are better scheduled and work isn?'t taken on with unrealistic timeframes.

So, that leads me to a task timer for MicroEmacs. It need not be complicated. I created a simple one that allows you to start the timer and then report how long it has been since the timer has been started. Only one timer can run at a given time, no need for more with simple time tracking. I bound the keys C-c b to begin the timer and C-c s to report the status of the timer. You can bind as you see fit. There is no reset or restart functionality. If you want to start working on a new issue, simply start the timer again. That is the reset.

The code is rather simple. When you start it simply sets a global variable to the current date and time. When you ask for a timer status the duration is computed from start date and time to the current date and time and reported in the status area. That?s it!

Adding a smart date attribute for Sequel

When you have dates on your form you always want to present them in a usable format for your users but this means you must then parse them back into a SQL format before updating your model. I found the very cool gem Chronic that will do the parsing for us. The only thing left to do is make a method to easily use Chronic in our models. For this we will use meta programming. Oh, I use Sequel as my ORM of choice but this could be applied to any ORM and even just plain classes if you'd like.

A method condition for Sinatra

With Sinatra before and after filters are easy. Adding conditions to these filters is also easy but what if I want to only execute a filter if the request type is POST for example?

Existing pre/post filters in Sinatra are pretty easy: