Warning: include() [function.include]: Unable to access /var/www/html/rogue-development/blog2/wp-content/advanced-cache.php in /var/www/html/rogue-development/blog2/wp-settings.php on line 62

Warning: include(/var/www/html/rogue-development/blog2/wp-content/advanced-cache.php) [function.include]: failed to open stream: No such file or directory in /var/www/html/rogue-development/blog2/wp-settings.php on line 62

Warning: include() [function.include]: Failed opening '/var/www/html/rogue-development/blog2/wp-content/advanced-cache.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/rogue-development/blog2/wp-settings.php on line 62

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/html/rogue-development/blog2/wp-includes/functions.php on line 3468

Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /var/www/html/rogue-development/blog2/wp-includes/functions.php on line 3382

Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in /var/www/html/rogue-development/blog2/wp-includes/functions.php on line 3382
Marc « Marc’s Musings


Notice: get_author_name is deprecated since version 2.8! Use get_the_author_meta('display_name') instead. in /var/www/html/rogue-development/blog2/wp-includes/functions.php on line 3382

Author Archive for Marc

Page 5 of 25

Bookpool update

In the beginning of April I had blogged about the apparent disappearance of Bookpool.   It’s since been by-far my most commented on post ever.  I got in touch with my former boss there and got this update from him, so I thought I’d share it here:

I was the person in charge of IT in Bookpool from 1998 to 2008, which means I’m not an employee any more, but I know the site disappeared on March 23 around noon. They called me to shut down all the servers properly in case they revived the company later. The owners moved all the equipment to a location close to Boston, I don’t know the details but it seems to me unlikely that it comes back.

Although it wasn’t my business, I feel very touched by your comments, it’s great to hear that you liked our service so much. Richard said it was like “losing a relative”, and Koko was willing to promise to buy a certain number of books. This is better than hearing our boss saying that we made a good job, thank you!

I had the luck to work with great engineers, like Marc Hughes and others, also the office and warehouse employees (I won’t mention names in case they want to keep anonymity), everyone was awesome and we made a terrific team. We put a lot of hard work to provide the service you got used to. This is why today I feel as sad as you with Bookpool gone.

I agree with you, there should have been some type of notice explaining what happened,
unfortunately there was nothing I could do about it, the owners must have a good reason to do things this way.

But not everything is bad news, I was also a fan of the famous Bookpool bookmarks, and I have saved some that I’d be happy to share with you. They’re somewhere in my basement, when I find them I’ll post a note here to distribute them to the people interested.

Regards,
Braulio Carreno.

Long commute? Optimize it!

I’ve got a long commute into work on a daily basis. That commute gives me a lot of time to sit alone in my car and contemplate the fact that I have a long commute.

In the middle of the night I can drive it in 45 minutes, but with traffic it’s never under an hour, often 1.5 or more.  I’ve noticed that very small variations in when I leave, even just 10 or 15 minutes one way or another, can really make a huge impact.  But it’s not a sure thing.  Some days leaving at 7:45 is the best, some days it’s 8:00.  I don’t know why it differs.

It’s my belief there are certain patterns that might take into account things like weather, day of the week, departure time, school vacations, and a bunch of other variables.  But I don’t have a good way to that figure that out since I’m lacking the data.

Which brings me to my latest mini-project.  I’m writing some mobile software for my phone, plus a website that will help to record my daily commute and visualize what’s happening.  Eventually, I hope to bring in some statisitical models to help predict my average commute time based on when I leave the house.

  • Phase 1: Start collecting data on my phone
  • Phase 2: Collect the data on a website.
  • Phase 3: Visualize the data.
  • Phase 4: Make predictions based on a single user’s data.
  • Phase 5: Collate multiple users who commute in the same area to improve #3 and #4

It’s my hope that someday I’ll be able to answer questions like:

  • Tomorrow, what reasonable time should I get out of the house for the shortest commute?
  • I’m running late, should I work from home for an hour or head straight in to avoid some traffic?
  • What week is the worst traffic-wise of the year?  (And hence, what week should I favor for planning a vacation)
  • What’s my fastest commute time?  Did I break that record today?

Today, I recorded my first commute to my Android powered G1.  I wrote an application that allows me to press a button to start/stop recording my commute.  It notes the start and end time, plus saves GPS data about waypoints along the way.  A future version of that app will upload the data to a web server, but for now it just collects it into a database.

Any other commuters out there be interested in something like this?

P.S. “Long commute” is a very relative term.  A half hour might be long for some people, and a 3 hour commute might be long for others.

Bubbling events in data models

I’ve been using moccasin for a bit now on a smallish project.  One of the cool things it does is give you a sort of event bubbling in your datamodel.  While moccasin is a very specific framework for a very specific sort of application, the more I think about it, the more I like the bubbling-events in the data model part as a general solution to a wider variety of problems.

Let’s look at a very simplified example that illustrates the general idea (actual mocasin implementation varies quite a bit from this).  Imagine this code…

  1.  
  2. public class PizzaModel
  3. {
  4.   [Bindable] public var sauce:PizzaSauce;
  5.   [Bindalbe] public var size:Number;
  6. }
  7.  
  8.  
  9. [Bindable] public class PizzaSauce
  10. {
  11.   public var name:String;
  12.   public var displayColor:uint;
  13. }
  14.  
  15.  
  16. public class PizzaView extends UIComponent
  17. {
  18.   public function setPizza( pizza:PizzaModel )
  19.   {
  20.      pizza.addEventListener(ModelChangeEvent.MODEL_CHANGE, onModelChange);
  21.   }
  22.  
  23.   protected function onModelChange(event:ModelChangeEvent):void
  24.   {
  25.     switch( event.property )
  26.     {
  27.        case "size": // the pizza size changed, handle that.
  28.  
  29.        case "sauce/displayColor": // the sauce color changed, handle that.
  30.  
  31.        default: // some property that we can’t incrementally
  32.                   // update changed, handle that…
  33.  
  34.     }
  35.   }
  36. }
  37.  

We have some kind of model object, let’s call it the PizzaModel.

That model has a property, that itself is some kind of complex object.  Lets call that property sauce, and the type will be called PizzaSauce

Now, we have some kind of view object.  Let’s call it the PizzaView.

A normal way to implement something like this would be to have the pizza view listen to events on both the pizza object and it’s sauce object. Or it could manually set up some change-watchers that watched the hierarchy to the required properties.

That’s all fine and dandy until we get to more complex object hierarchies. What if we had an arraycollection of toppings and we needed to know when individual properties of those toppings changed? Now, we’d have to listen to yet another type of event.

And what happens of those toppings themselves had lists of ingredients we wanted to listen to, suddenly the event chain is getting pretty gnarly to manage.

If we had some kind of magical bubbling model event, we’d only have to listen at a single location, as shown above. Especially if there was an expressive way of identifying what changed.

How might something like this be implemented?

Mocassin does it by having a meta-data model that wraps the actual data model and provides this extra functionality.

Another way would be to force the data model objects to all extend from a common superclass (I believe earlier versions of Moccasin did just that)

Someday, I’d like to explore either creating a general purpose framework for this or extracting it from Moccasin. I’m blogging about it hoping someone might do it before I get a chance ;)

How far does your email address go back?

A random thought occurred to me today when an email to a friend bounced back.  We seem to change email addresses far more frequently than phone numbers, physical addresses, or most other contact methods.  Looking in my GMail account, the oldest email I still have goes back to 6/18/2004.  But for email addresses, one of the addresses that I still regularly check was first in use all the way back to September of 2000.

So what’s YOUR stats for

a) Oldest email you have sitting around that you can easily access without pulling out a backup tape or archive CD?
b) The oldest email address that you still regularly check?

While 5 years for an email and 8.5 years for an address seem like a long time, think of how short those are compared to carvings in a rock…

I’m on twitter now…

Seems like the thing to do, so I’m on twitter now.

Essential Guide sample chapter

Just visited the Friends of Ed website for the Essential Guide on Open Source Flash Development and noticed they used one of my chapters as a sample-chapter you can download.  Neat.

ADigitalBook, another ObjectHandles usage

Rui over at http://www.adigitalbook.com/ wrote me to tell me he’s made extensive use of Object Handles to build their application.  It’s a photo album creator done up in an AIR app with Here’s a couple screenshots:

Also, I noticed they did a neat thing with integrating their newsletter signup with the AIR download badge.

Bookpool RIP?

I went to buy a book today at Bookpool and came up with this:

Bookpool is (was?) a great little site that specialized in technical books.  They had a good selection, and amazingly fast shipping.  They also employed me a few years back.  They had been around a really long time, it’s a shame if they’re gone, hopefully it’s just a technical problem.

5/8/2009 – Credible update from the comments below, a little more information.

Easy object reflection with Spicelib

I use Parsely in some of my projects for an MVC / IoC framework.  Parsley relies on Spicelib, so you get that functionality “for free” if you’re using Parsley.  Lately, I’ve started using some of the Spicelib relflection API and I’m impressed with it.  It acts as a wrapper around the flash.utils.describeType method to describe objects at runtime.

Here’s an example that loops through the properties of an object…

  1. var ci:ClassInfo = ClassInfo.forInstance( component );
  2. for each ( var property:Property in ci.getProperties() )
  3. {
  4.   trace( property.name );
  5.   trace(property.type.name );
  6.   trace( property.readable );
  7.   trace( property.writable );
  8. }

You can get a whole lot of info about classes, methods, and properties, you can read the docs to see.

One useful function of this, is you can get at any custom metadata tags that you’ve created.  In that loop above, I could have something like this:

  1. for each ( var meta:Metadata in property.getAllMetadata() )
  2. {
  3.   if( meta.name == "AnimationProperty" )
  4.   {
  5.     // do something with this property
  6.   }
  7. }

Then, if I had a class like this:

  1. public class StupidClass
  2. {
  3.     [AnimationProperty]
  4.     public var thisIsAnAnimationProperty:Number;
  5.  
  6.     public var thisIsNOTAnAnimationProperty:Number;
  7. }

We could differentiate between those two properties.

Read this blog entry for a little info on how to do custom metadata.

Job vs. Work

It’s amazing how my job can get in the way of me doing any useful work.

My work calendar so far for this week (blurred to protect the guilty) …