railnerd
ramblings about model railroad technology
May 12, 2012
nodejs, websockets, and controlling your railroad
We've been having great fun building a multi-client web-based control system for Silicon Valley Lines. Hacking with nodejs is quite fun, and is reminiscent of my days writing my first programs in BASIC. Using a dynamic language to build prototypes lets us move quickly to and stay focused on building a solution. Still not sure I'd use this for my "real job", but it is fun to play with.
April 5, 2012
Getting Started in N Scale
A really neat snapshot of what is now possible to do in N Scale.
http://www.model160.com/n-scale-news-blog/getting-started-in-n-scale/
http://www.model160.com/n-scale-news-blog/getting-started-in-n-scale/
December 4, 2011
New Projects for Christmas Break
Have acquired some more N-Scale goodies in the last few weeks that I hope to complete over the winter break. First off will be constructing two of the BeNScale Southern Pacific Searchlight kits— I figure I will yield at least one working signal out of that project. The next project will be a hand laid #10 turnout kit using the machined frogs and points available from Andy Reichert. Hopefully I'll be able to post a build log here. Both will eventually end up on Free-moN modules.
November 12, 2011
never stop learning new things
I've been playing with a few new programming tools with an eye toward creating a modern modular control system for my railroad club. The major components in this effort are node.js, redis, and jQuery. As a traditional C programmer by day, this stuff is new and interesting.
The most interesting of these systems has been node.js, in that it allows a complete web server to created using server-side Javascript. The use of anonymous functions as continuations is new to me as a C-guy, but their power is not lost on me.
As a guy who used to write low-level Macintosh completion routines in assembly language, and is playing with Objective-C blocks, this new way of doing things feels really powerful. But after spending few evenings debugging a mysterious failure, I realized that there are more bumps in the road.
The most annoying bugs I've written in the last few days all relate accidentally assuming that I can "fall out" of a nested anonymous function into common error handling code. It caused my server to abruptly truncate responses to clients which caused silent failures.
Over the last few evenings, I've learn to love the WebKit debugger and Mozilla Firebug trying to figure out what the #$% was going on. I guess an experienced Java or Scheme programmer I wouldn't have written these bugs in the first place.
Over the last few evenings, I've learn to love the WebKit debugger and Mozilla Firebug trying to figure out what the #$% was going on. I guess an experienced Java or Scheme programmer I wouldn't have written these bugs in the first place.
Anyway, it is still really fun to learn new ways of doing things.
October 17, 2011
Block Detector works
Had a chance to test my version of an isolated block detector last Friday night:
http://vimeo.com/30595575
http://vimeo.com/30595575
September 30, 2011
September 4, 2011
Processing is cool
I've been playing with doing some CTC signal logic prototyping in Processing (http://www.processing.org). For whatever reason, since my end goal was to put all my work into actual hardware, I decided to give this environment a try.
In traditional application programming, I find that for whatever reason, I keep managing to get distracted writing of platform-specific "overhead" code. With Processing, I can concentrate on working on my logic and actually learning things.
Stay tuned, as if this goes well I expect to be posting some cool sketches soon.
In traditional application programming, I find that for whatever reason, I keep managing to get distracted writing of platform-specific "overhead" code. With Processing, I can concentrate on working on my logic and actually learning things.
Stay tuned, as if this goes well I expect to be posting some cool sketches soon.
September 1, 2011
August 30, 2011
Subscribe to:
Posts (Atom)