Pete Johanson

Prototyping RESTful Services With Sinatra

Working on a new project at work recently, we’re developinf a RESTful web service to be accessed by a WPF client. Since we have existing infrastructure to access OpenVista Server using Java (via OVID), the final solution will be a Java one. However, before one of our primarily Java developers would have a chance to put something together, I needed to make progress on the WPF client. Sinatra swaggers in to save the day! ...

sinatra ruby rest

Pete Johanson


At work recently, we had code looking a little something like this: When refactoring the code, I thought about the recent blog post about A Less Ugly Switch Statement and thought I might do something similar with IComparer (and IComparable, but I'll leave that as an excercise for the reader). The envisioned invocation is: I ended up with this implementation: Is this better? I'm not really sure. It is functionally equivalent. Is it more readable, ...

c# .net