Archive for July, 2008

BackgrounDRb 1.0.4 – Considerations

July 18, 2008

Today I gleefully updated BackgrounDRb to 1.0.4 after I learned that a new release was out that supported clustered BDRb servers.  I quickly learned that regiester_status has been removed.  That’s right.  All that code that sends data from your workers to your app need to be refactored to put data into cache[job_key].  This approach is more thread-safe, however.  Perhaps you could even write your own wrapper that puts data into cache on a call to register_status.

All in all, however, there are some really cool new features related to clustering.  I was starting to think for a while that BDRb had been abandoned and that Bj was the new way to go.  This release clearly puts BackgrounDRb on top for spawning asynchronous tasks.

Does MobileMe’s Push Email Really “Push?”

July 13, 2008

When Steve Jobs first announced “push email” for the upcoming iPhone 2.0 software, I was skeptical.  The two protocols I knew of, POP3 and IMAP, operate on a protocol that is always initiated by the client.  The user has to continuously check in with the server to see if new messages have arrived.  With POP3 and IMAP, you can approximate push email by polling server several times a minute.  I figured that Exchange supported some sort of persistent connection that allowed push, but from the way it was presented at Steve’s keynote, it seemed that they were touting push email for any mail account accessed by an iPhone.  I wrote off “push email” as a marketing ploy.  Im my mind, the mail server would have to know where the client was at all times to “push” updates.

Well, it turns out that MobileMe supports Push-IMAP, a relatively new protocol.  The way it works is a client logs into the MobileMe server with a long-lived HTTPS connection.  Through this connection, the client sends any updates to the server.  The server sets up a long-lived response to send back notifications of new messages.  Data is compressed to help lower bandwidth requirements.  P-IMAP is an open protocol and a P-IMAP to IMAP bridge can be set up to allow legacy mail servers to provide push services.  In addition to email updates, P-IMAP allows other data, such as contacts and calendars to be synchronized.

What seems surprising to me is that Apple is going to have to set up a system that will have to handle millions (well, at least thousands) of simultaneous connections.  Let’s hope they can do it!

So, is MobileMe’s push really “push?”  Well, technically, no.  The client still has to initiate and maintain a connection to the server.  If the server kept track of what IP address each iPhone had and initiated connections out to each iPhone, it would be a true push system.  In reality it’s a more scalable way to handle continuous polling.

 

More information:

P-IMAP

How I Got Started Programming

July 13, 2008

Continuing the meme:

How old were you when you started programming?

Officially, it was my freshman year of high school.  Unofficially, the most “programming” I did was modifying config files to get my PC games to run faster on our Gateway 386.  A favorite game of mine growing up was “Rocky’s Boots” on our Tandy 286 which involved completing electronic circuit puzzles.  

 

 

How did you get started in programming?

I liked computers and my high school just happened to offer a BASIC programming class on old (even then) Apple //e’s.  After that I was hooked.  I think I inherited my dad’s creativity – his outlet is woodworking and construction.  I love to build things and doing it on a computer was the most logical step, since that’s where I spent all my time anyway.

My first programming job was a part-time gig during high school at an ad agency creating Access database applications for telemarketers’ data entry.

What was your first language?

Good old BASIC.  I quickly learned the evils of spaghetti code.  My final project for the BASIC class in high school was to do a “hi res” (80×48) animation.  It featured a bunny jumping through a static forest scene, a gun popping out from the side of the screen, shooting the bunny in the head.  Perhaps I was playing a bit too much Wolfenstein 3D?

Later on in high school, I moved through Pascal, C, and C++.  A past-time of mine in the computer lab was to create Myst-style dungeon crawlers using Hypercard.  There was always a secret spot to click to defeat the boss.  

What was the first real program you wrote?

How do you define “real?”  My first for-money program was a simple Access database for telemarketers.  Of course, there is a minimal amount of programming involved there.  My college classes offered me plenty of interesting projects.  One was a series of programs written to compute large matrix multiplications over distributed systems using various threading/multiprocessing libraries.  A part-time job I had during college consisted of small web apps (mainly shopping carts, CRM) written in ColdFusion.  

What languages have you used since you started programming?

BASIC, Pascal, C, C++, Scheme, Java, JavaScript, ObjectiveC, AppleScript, ColdFusion, T-SQL, PHP, C#, Visual Basic, Perl, and last, but not least, Ruby!

By far, Ruby and Scheme have been my favorites.  Ruby’s flexibility, friendliness, and the way it so nicely complements TDD/BDD have won me over.  While I’ve never “monetized” my knowledge of Scheme, it was so much fun to think “functionally” to solve a problem.  

What was your first professional programming gig?

Working for a contractor in Northern Virginia.  I worked on some C/C++ interfaces for USPS mail sorting machines and a system for nursing assistants to document nursing home care that involved a ColdFusion web app and a VoIP interface to an interactive voice system.  I learned quite a bit about the “real world” of programming.  At that time I was into creating “sugar castles” of code in my head and spent a lot of time fixing mistakes I thought I was incapable of making.  It was a good reality check.

If there is one thing you learned along the way that you would tell new developers, what would it be?

A multipart answer:

  1. Don’t typecast yourself into knowing one specific language or tool.  Chances are it will become obsolete and you will be “that guy” who maintains that dinosaur system and is simply there to punch the time clock and get a paycheck.  The world of computer science and software development is so much bigger and more interesting than just Java or Ruby or MVC or TDD.
  2. Be open.  Admit when you’re wrong.  Learn and improve.
  3. Get things done.  Wasting your time over-engineering a system will be simply that – a waste of time.  Your customers don’t care how cool your algorithms or languages are and you’re better off spending that time testing and refining the user experience – delivering what the customer actually wants.
What’s the most fun you’ve ever had… programming?
My languages course in college – writing Scheme code.  Again, the functional paradigm is a lot of fun.  Hacking with others on fun side projects over pizza and beer is always a blast.  It’s the geek’s version of building a shed in your backyard with your buddies or jamming together in your basement.