Tag: coding

M out of N

c++ boost circular buffer and stl map and set example

In an effort to become more familiar with boost data structures (as opposed to homebrewed ones), I took a crack at M out of N validator. It checks the last N updates and determines if M passed a certain criteria. Not all members are updated at each interval, and they are identified by an ID pair of two longs.

(more…)

Rails 3.1beta deployed to Heroku from your iPhone

The tools:

  1. Local shell, LogMeIn or an ssh shell to a terminal system on your phone/tablet
  2. a system with git and heroku (I haven’t tried installing these on my phone)
  3. Internet
  4. DropBox and DropText for easy mobile editing. Alternatively you could use github as a web editing/auto-commiting platform

(more…)

A Tale of Two Simulations

Poisoned by Pointers

The past few days at work I’ve been wrestling with an unruly1 interface which bridges two simulation frameworks. At the interface boundary, our local libraries have been pruned down to a few dozen hierarchical object pointers in nested objects, coupled with nontrivial initialization of state of each object. The sim I’m integrating with is characterized as a mini-soa2 which leverages a modified adevs event simulator as a driver and communication hub. With a rapidly approaching deadline I have taken to coding all sorts of hacks3 that I never would have implemented on calmer days. Alas, the calm days are far fewer than the hectic ones with little hope of change.

(more…)

Duostack vs Nodester Node.js Hosting, Day Zero

This morning I’ll take a peak at two competing node.js hosting providers. Both Duostack and Nodester were straightforward to install and configure, if only other configurations were so easy. My first impression was that Duostack gets the slight edge due to supporting coffee-script out of the box, but Nodester get’s the service award and mentioned that coffee-script support is coming soon.

@ Thanks for the feedback! Coffeescript apps should deploy if they are compiled to JS. We have a ticket to support CS natively
@Nodester
Nodester
(more…)

Wakeup with a fresh cup of CoffeeScript

I like programming languages with rich object models. I love dynamic languages. Sure, minimizing execution time and resource optimization may demand speed, and c variants and java (mirah!) are screamers. Yet after having coded heavily in one of these languages for years, it’s a breath of fresh air letting go of the training wheels of type safety and discarding the mental overhead of complex inheritance trees. Verbosity be damned! (more…)