ioloop as a core concept

In the begininning there was main() and that was good.  But under the surface that has changed, it’s still main() but what really happens is dynamic linking, exit handling resources…  We’re even throwing garbage collection in for good luck.  But, it’s still main().

Why?

If you do anything that’s isn’t linear programming you see that ioloop() is really main and you have boilerplate to set up everything for your call to the ioloop().  So, now main isn’t really important we’re boiler plating main() into a bunch of work for ioloop()…  But, alas the languages don’t support this, sometimes you can do things like

Why should I do all that – if the language assumed all IO operations needed to yield to ioloop() the syntax would support that model. You wouldn’t need to worry about what was sync and async, you wouldn’t need to wrap and decorate.  It would just be good.

Imagine- open(), read(), write() socket(), connect() all assumed they were async and would default yield to the ioloop…

Now to write this language…  Maybe I’ll call it “eve”, but the $64k question is compiled or interpreted…

Update: This really is the “async” that is proposed for Python 3.5 – hope it makes it.

Read More

Reproducible instalation

The learning curve on chef is a lot steeper than I wish.

Can’t say that I’ve got it running like I would.

But, I can now provision a devbox on AWS in 5 minutes with basic packages and users in a sane state.

It took 2 days of fiddling.

Now back to developing systems onto of basic environments.

Things left to learn –

  • How to get private keys onto the machine so git integration is smooth
  • How to checkout private repos with chef onto the boxes
  • The big challenge is how to “auto” configure an environments with AWS Elastic IPs or other tidbits.

 

Read More

Twitter is the Forrest

Was reminded this morning.

I check my Facebook page for updates, but I never check my twitter page. I’ll watch the twitter feed during the day.

Thinking it’s like a tree in the woods, if it falls and nobody’s watching do you care? If it’s important it’s on Facebook.

Read More

Fizz Buzz

As seen on a thread on Hacker News about Fizz Buzz and “interesting” functional ways to solve it.  Realized that there are many ways to boil the ocean, but this feels like a nice compromise between data/program separation and language.

Note this is using a “Bazz” variant of the FizzBuzz problem where Bazz is printed every 7 numbers.

Read More

MLB Needs the Lance Rule

Thinking about the Oakland A win last night got me thinking about MLB.  The A have had a great season ending, while the Giants have fumbled around at the end.  But, wait they had to suspend Melky for drug use…  Could their be a correlation?

Sorry, I’m not going to do a bunch of statistics, but more a thought experiment.

We all know the tale of Lance and his Tour jerseys, but MLB doesn’t have the same remediation.  Melky get fined and suspended for a bunch of games, but no retroactive penalties.    So, if  you have one or more players on your team who can get you to a playoff seat, you happily turn a blind eye.  Sure there might be some $$ penalties, but if you get into the playoffs that’s probably a was in terms of revenue you can earn.

What does that really mean, as a team you will turn a blind eye to the use of performance enhancing drugs as long as it helps you get to the playoffs.  The player may be suspended, but may show up in time for a few more games, or you could trade them…

I would propose that MLB adopt the “Lance Rule” which is that if you’re found to have a player using PE drugs that you retro-actively forfeit your last 7 weeks of games.  That pretty much would ensure that the teams goals match the outcome.

Read More

Synergy is Fun

One could say I’ve got too many projects with too much free time, but another way to look at things is that constant exploration can put a smile on your face.  I’ve been working on a few projects:

GearTracker (http://geartracker.com)

This is my big project, which I really need some product marketing help on.  I’ve gotten most of the infrastructure in place, but need somebody to come in an help me put the finishing 20% on top to make the first time experience right and probably catch where I’ve just been wrong headed about the thinking.

Note – Really, could use help…

Spiro (https://github.com/koblas/spiro)

One of the things that I keep on needing is a “midscale” web crawler. Would like to be able to crawl 100M pages without much thought along with obey all of robots.txt and be nice to sites, etc.etc.  What’s interesting is the crawler is the easy part, it’s being nice to sites that is difficult.

Distal (https://github.com/koblas/distal)

This is where synergies come from!  Originally I started Spiro with the idea of having a nice Bootstrap and Backbone UI, but it was klunky.  In one of those moments of frustration I started looking at EmberJS, which is way overkill… Ok, not really overkill, but not what I wanted.

So after looking at EmberJS I was inspired to produce a view framework that really tried to mimic the best parts, but keep the Backbone spirit alive.  Thus Distal was born.

What’s great is that I’ve had a chance to use it in GearTracker – which is where I’ve started to understand the whole client side UI development model, then take it back to Spiro to use again and break some of the ideas that I had in GearTracker.

It’s all about Synergies!

Ideas build on ideas, tools build on tools, those moments where you want a big old toggle switch to turn off your crawler can end up being 15 lines of JS (+15 of boilerplate) and 10 lines of Python.  And you’ve got a working control on a page, which does a real time refresh of the server to enable and disable things.

You did one of those “big deal” – but it is really a big deal – It’s not like I had to build a bunch of templates, do a full server reload of the page.  It’s a button it operates like a button.

Read More