Koza’s Ant (A Modern Take on the Canonical Genetic Programming Problem)

Koza's Ant EvolverWe’ve all had those less-than-notable-at-the-time yet ultra-significant inflections in our world view that in later days loom large.

I had one of those “moments” in 1993, on an otherwise ordinary fall day when I’d squired my not-yet wife to an unmemorable building on the Northwestern campus, in Chicago.  Marie is a Set and Costume Designer so I have to imagine that we were there for some sort of rehearsal, or maybe a design meeting; something about Orpheus Descending at the Chicago Lyric Opera teases at my memory, although given the remove of 22 years the details have faded.

One thing I vividly remember, though, is reading Steven Levy’s “Artificial Life:  A Report from the Frontier Where Computers Meet Biology;” a book I picked up at the campus bookstore while waiting for Marie to finish whatever she was doing.  She must have been at it for hours because I managed to gulp down something like half of the thickish volume before she emerged from the building.

Continue reading

NoSQL? With DocumentDB, that ain’t quite true!

The Microsoft folks continue to beaver away in PaaS-land, serving up new Platform as a Service offerings on a seemingly weekly basis.  One of the best of these is the new pay-as-you-go DocumentDB service; a fully managed, highly-scalable NoSQL (JSON) document database service that provides:

  • Schema-free storage of arbitrary JSON documents
  • Automatic indexing that supports complex queries
  • Transaction support with ACID semantics
  • Service-side programmability with JavaScript
  • Write-optimized, SSD-backed and tunable via indexing & consistency
  • Open-source Client SDKs for NET, Node.js, JavaScript and Python (with C++ and Java on the way)

DocumentDB should be thought of as a complement to SQL Server, Table Storage, Blobs, etc.; not a replacement.  It’s a pretty new offering, but even so, there’s a fair amount of related documentation around on the net:

If you’re one of my fellow Neudesic-ies, I’ll be giving an in-depth DPG Presentation on the topic on Friday afternoon, at 1:00PM EST.  Please feel free to download my deck or clone the GitHub repository that contains the DpgDocDbDemo code that I’ll be showing in my talk.

Code Camping (Round 2!!)

For the uninitiated, Code Camp is a free development conference that is most typically sponsored by Microsoft then staffed by both local volunteers and up-and-comers on the national / international developer circuit.  The received truth is that they’re not quite as good as the more well-known conferences (i.e. Build, VSLive, etc.) but I have found them in my own experience to be extremely good, especially in terms of learning actual coding techniques as opposed to simply hearing simple announcements.

By way of disclosure, it’s important to note that I will be speaking at the next Code Camp NYC (Saturday, November 23, 2013, from 8:30 AM until 5:00PM), so I am more than a little biased.  My topic will be:

Supercharge your apps with TPL Dataflow

The TPL Dataflow Library allows mere mortals to craft CPU-intensive and I/O-intensive applications that support high throughput and low latency while tightly controlling memory usage.  This code-centric session will explain how TPL Dataflow works (along with a number of related technologies, such as async / await), the advantages of TPL Dataflow over more traditional parallelizing constructs, and most import of all, how to supercharge your own apps.  As drive the power of TPL Dataflow home, I’ll also show you how to write a blazingly fast web-crawler in less than 200 lines of code.

While I’m in a disclosing mood, I just finished the above described web-crawler, called PodFetch.  It is indeed blazingly fast.  On the other hand, I couldn’t stop myself from adding a number of refinements (like colorized logging) so it came out to something like 350 lines of code.  Never fear, though, because though the magic of JIT, the code squeezes down to a mere 59 lines of MSIL, which by at least my count is less than 200! 🙂

You can download the code from GIT.  If you attend Code Camp NYC, be sure to stop by and say hi!

The Internet Of Things

IArduino with PIR Detector attended a sort of corporate symposia last week where my peers and I discussed the current technical state of affairs; most specifically to figure out how we could leverage this rapidly expanding realm of possibility.  One key area of discussion was “The Internet of Things.”  The basic idea is that more and more of the artifacts around us are becoming—at least in some sense—intelligent and interconnected!  Now I’m not necessarily talking about your toaster discoursing on Shakespeare with you, but even as I write that purposefully “absurd” phrase, it occurs to me that it isn’t so very absurd at all.  Everyday objects are being enhanced with more and more capabilities, and I have started to take advantage of this pleasing fact.

Continue reading

I used to live here, but now I’m just Code Camping out!

Just for fun, because who doesn’t like to wake up ridiculously early on a Saturday morning to take a train from Philliy into good ‘ole NYC, I decided to do some major tongue-wagging at Code Camp NYC 2013.  I mean, what could be better.  I won’t get paid, and let’s not even mention the food, so there’s that.  On the other hand, a chance to bloviate in front of a fresh and unsuspecting crowd seems just too good to stay away.  To that end, I prepared an obligatory PowerPoint, then wrote some moderately interesting code: LogFlow and PodFetch.  I even pulled together a ton of samples, a small number of which are actually mine!  Should be a blast.  Hope to see you there….

BTW, I always wanted to make it to Carnegie Hall.  I think I’ll have to settle for the “Carnegie” room; from 2:30pm to 3:45pm.  My session is titled “Supercharge Your Apps With TPL Dataflow.”

Code Camping (Tent Optional!)

For the uninitiated, Code Camp is a free development conference that is most typically sponsored by Microsoft then staffed by both local volunteers and up-and-comers on the national / international developer circuit.  The received truth is that they’re not quite as good as the more well-known conferences (i.e. Build, VSLive, etc.) but I have found them in my own experience to be extremely good, especially in terms of learning actual coding techniques as opposed to simply hearing simple announcements.

By way of disclosure, it’s important to note that I will be speaking at the next Code Camp NYC (Saturday, September 14, 2013, from 8:00 AM until 6:30 PM), so I am more than a little biased.  My topic will be:

Supercharge your apps with TPL Dataflow

The TPL Dataflow Library allows mere mortals to craft CPU-intensive and I/O-intensive applications that support high throughput and low latency while tightly controlling memory usage.  This code-centric session will explain how TPL Dataflow works (along with a number of related technologies, such as async / await), the advantages of TPL Dataflow over more traditional parallelizing constructs, and most import of all, how to supercharge your own apps.  As drive the power of TPL Dataflow home, I’ll also show you how to write a blazingly fast web-crawler in less than 200 lines of code.

While I’m in a disclosing mood, I just finished the above described web-crawler, called PodFetch.  It is indeed blazingly fast.  On the other hand, I couldn’t stop myself from adding a number of refinements (like colorized logging) so it came out to something like 350 lines of code.  Never fear, though, because though the magic of JIT, the code squeezes down to a mere 59 lines of MSIL, which by at least my count is less than 200! 🙂

You can download the code from GIT.  If you attend Code Camp NYC, be sure to stop by and say hi!

[One Extra Hand] Makes Light Work

Wordle for WPFIt’s said that a true expert mostly knows how much he doesn’t know.  By that criteria, at least, I could certainly be called an expert!

Take WPF.  As things turn out, I’m a pretty dab hand at WPF and XAML.  Regardless, I’m not so dab at the ins and outs of rendering and transforms.  Now on most days, this isn’t a big problem.  I can generally hack together something useable, or even better, I can find exactly what I want on the web.  After all, as any modern programmer can tell you, there’s a ton of wonderful code out there; ripe and ready for the use.

Unfortunately, a bunch of that code tends to be just a tad “off;” exactly what you want, excepting a couple of critical details  Take my latest project.  I’ve been playing around with Tumblr tag parsing (don’t ask me just yet why!)  Along the way, I came across the wonderful Java-based Wordle and the similarly wonderful WordCloud for Silverlight.  One problem, though.  I ran into a bunch of conversion errors when I tried to convert the Silverlight code to WPF, and it looked like a bigger job than I’d want to handle on my own. Continue reading

Guuuuuuuuuuuuuuuulp!

Truth be told, like most of my ilk—programmers—I’m a closet megalomaniac.  I want to wield power, to envision and forge new worlds, to grapple with the nearly ungrappleable.  More to the point, I’m more than a little convinced that I’m just the man for the job.

On most days, this sort of thing tends to be fairly out of reach.  On this day, though, I got to build Gulp! Continue reading

The Programmer REST(s) His Case

It would be fair to say that I have struggled for years to get Windows Communications Foundation (WCF) services to work well with Microsoft’s Access Control Service (ACS).  I’ve written dozens of such services, but it’s always been harder than it should.

Needless to say, I lay most of the blame at Microsoft’s feet.  A ton of “How-Tos” have been published, but the examples have overwhelmingly fallen short in one way or another.  Now don’t get me wrong.  I wouldn’t have made the least bit of progress without the various demos and write-ups (by Microsoft and otherwise), and I very much want to thank their authors.  Even so, the problem space is way too huge to get good traction without a sample that does works extra hard to  to help you get up and working! Continue reading

URL Hunting (Sniffing, Spelunking, Parsing…)

YouFetch

A good URL is hard to find.  Seriously!  I know, I know, you’re no-doubt rolling your eyes but, in programming, the ability to suss out undocumented schemas and protocols turns out to be a big big thing.

Take my latest project.  I’ve been writing a Tumblr downloader.  For the most part, the entire thing has been very straightforward, given that the Tumblr folks have an excellent API and documentation.  Using their specs, it was short work to create the core functionality of my product (which I plan to release as shareware!)  I wasn’t keeping tight track of the time, but it certainly took less that three hours to create the core image and video crawler and downloader.  Can you say “outstanding!” Continue reading