Logiciel Libre

August 21, 2010

Lazy Programmer Automates Christmas Gift Exchange

Filed under: Default — Tags: , , — adam @ 8:52 pm UTC

Every year my family does a gift exchange. Names are chosen out of a hat to randomly assign pairs. Certain rules are followed:

  1. give to a different person than last year
  2. partners can’t be nuclear family members (or bf/gf/so/etc.)
  3. can’t choose yourself
  4. participants give one gift only
  5. participants receive one gift only

I decided to give it the old college try in Python. Drawing names following the rules certainly posed more of a challenge than I anticipated! But I think I figured it out. At least, I figured out the “lazy programmer” way to solve it, not the statistician/np-complete/combinatorial/elegant mathy way to solve it.
(more…)

June 28, 2010

FLOSS technical/dev summits: why? how? with Tarus Balog of OpenNMS

Filed under: Default — Tags: , , , — adam @ 11:47 am UTC

Tarus Balog is the CEO of the OpenNMS Group, a company which funds the development of OpenNMS: FLOSS enterprise network monitoring software. OpenNMS lets you know when your machines go down, among other things. I use OpenNMS at work to keep Mifos infrastructure up and running: build servers, cloud, databases, etc.

Our corner of the Grameen Foundation focusing on Technology for Microfinance has a lot to learn from OpenNMS! They’re also FLOSS, and they’re profitable.

I talked with Tarus the other day. Turns out he’s a really cool guy. I’ve been following his blog closely for quite a while now, so I was thrilled with the chance to pick his brain. The point of the call was to find out why and how they run their developer summits: in-person meetings where coding, alignment, teambuilding and planning are plentiful. OpenNMS hosts these yearly, and we’d like to do them for Mifos.

(more…)

April 24, 2010

Grails: alternate views for mobile (iPhone) clients

Filed under: Default — Tags: , — adam @ 11:08 am UTC

I figured out a semi-cool setup to provide alternate views if the client is found to be, for instance, a Mobile Safari browser on an iPhone. I wanted to share my findings since I’ve seen related questions asked here or there, and I have a question at the end about a potential improvement.

First, I made a filter:

detectMobile (controller:'*', action:'*') {
  before = {
    if (request.getHeader('user-agent') =~ /(?i)iphone/) {
      request['isMobile'] = true
    } else {
      request['isMobile'] = false
    }
    return true // keep processing other filters and the action
  }
  after = { }
  afterView = { }
}

Next, I added the following to a controller:

def afterInterceptor = { model, modelAndView ->
  if (request['isMobile']) {
    modelAndView.viewName = modelAndView.viewName + "_m"
  }
}

For that controller, if a request comes in from a mobile device, a view ending in “_m” is loaded, instead of the default view. The view “list.gsp” would have a counterpart mobile view “list_m.gsp”, and that’s what would be served to iPhone clients. That’s it, so far.

One bit that would be handy would be to add this closure to every controller, rather than have to copy and paste it to controllers that support mobile views. I’ve been meaning to see how the rest plugin dynamically adds methods to every controller in case that is similar to what I’m trying to do, but if anyone knows offhand what I need to do (or read) to automatically get the closure in every controller, please let me know.

April 14, 2010

The Power of Lightweight Markups: Presentations

Filed under: Default — Tags: , , , — adam @ 12:21 am UTC

Are you busy clicking away at a slide deck for your next presentation? Want to try something a little different?

Non-nerdy folks following this blog, you’ll probably want to tune out now. Or not! I tried to write this for a wide audience, so come on down the rabbit hole if you dare.

(more…)

April 1, 2010

The Mifos user manual sprint; how we’ll break Brooks’s law

Filed under: Default — Tags: , , , — adam @ 4:08 pm UTC

I’m really excited for the Mifos user manual sprint tomorrow. We’re using FLOSS Manuals to write our new user manual. FLOSS Manuals is an exciting way to write a book, it provides a framework for high-bandwidth collaboration, publishing to HTML and print, translating, and more. There are many examples of small teams (less than 10 people) publishing large, excellent books in short time periods (less than a week).

We’ll have a video feed going. I’ll be wearing my track suit.

Check out our coordination wiki page and stop by our IRC channel if you’d like to join in! If you’ve ever edited text on a wiki, are brave enough to learn how, or just want to see me in a track suit, come on by.

I suppose I should explain the title of this post. If we can establish a framework for software development on Mifos like we’re running this sprint, we can break Brooks’s law. Why not? The Ksplice folks did it, so we can too!

March 29, 2010

Ehcache Java library’s UpdateChecker == spyware

Filed under: Default — Tags: , , — adam @ 9:03 am UTC

I just took a peek at recent Grails development, and noticed they added code to disable a “phone home” feature in Ehcache. Strange, I thought, why would this be necessary?

Apparently Ehcache includes an automatic update check that is also effectively a phone home. Terracotta software conveniently collects some extra information (such as your IP address) when Ehcache phones home. The information they collect is benign. But, seriously? A library phoning home, by default?

Who decided it would be a good idea to add this feature to a popular Java library? It’s a transparent attempt at gathering usage statistics.  As a participant in a professional FLOSS project, I can fully identify with the need for knowing who is using your software. But automatically, secretly phoning home is not the way to do it!

Terracotta, will you turn this feature off by default in the next Ehcache release?

I see this issue has come up in forums:

Other tidbits:

March 23, 2010

Video about Mifos

Filed under: Default — Tags: , , , , — adam @ 11:11 pm UTC

Here’s a cool video describing the product I work on at my job.

January 28, 2010

Keeping Bees in Seattle

Filed under: Default — Tags: , , , — adam @ 11:25 am UTC

Thanks to Doree for posting my question about keeping Mason Bees in city limits. Turns out the bees are harmless to humans and pets, and do some seriously helpful pollinating!

January 16, 2010

Are Tic Tac candies fatter in the USA?

Filed under: Default — Tags: — adam @ 6:25 am UTC

Here’s one Google couldn’t help me with.

When I was a kid, I swear Tic Tac candies/mints/whatever were skinnier.

Anyone know the real story here?

I also mentioned this on Twitter. The Wikipedia page doesn’t currently state a difference in size, although there is a comment on the discussion page that claims they are 30% bigger in the USA.

January 10, 2010

Twitter Weekly Updates

Filed under: Default — Tags: — adam @ 7:50 am UTC
  • Java question: anyone ever run into a case where they had to use File.separatorChar ? In Java 6, I can use forward slashes on Win or Linux. #

Powered by Twitter Tools

Older Posts »

Powered by WordPress