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
Uncategorized « Marc’s Musings

Archive for the 'Uncategorized' Category

Page 2 of 15

Alternative “skin” for ObjectHandles

Today, I worked a bit on getting an alternative look for ObjectHandles working.  See the blue border in the screen shot?  Clicking the left, right, or bottom edge resizes, and the top bar moves it around.  The corners resize as expected as well.  This is s a decent compromise for when you want to have text inside a moveable object, and you still want to be able to select the text with the mouse.

Here’s how I did it.

First, I created some custom handle classes. I had three other versions, one for the corners, one for the bottom bar, and one for the vertical ones. (They probably could have been a single class with a bit of smarts to it)

Here’s the one for the top horizontal bar.

  1.  
  2. <?xml version="1.0" encoding="utf-8"?>
  3. <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
  4.                  xmlns:s="library://ns.adobe.com/flex/spark"
  5.                  xmlns:mx="library://ns.adobe.com/flex/mx"
  6.                  implements="com.roguedevelopment.objecthandles.IHandle"
  7.                  width="{model.width + 8}" height="12"
  8.                  
  9.                  >
  10.         <fx:Script>
  11.                 <![CDATA[
  12.                         import com.roguedevelopment.objecthandles.HandleDescription;
  13.                         import com.roguedevelopment.objecthandles.IHandle;
  14.                         import com.roguedevelopment.todoboard.model.BoardObject;
  15.                        
  16.                         [Bindable] protected var hd:HandleDescription;
  17.                         [Bindable] protected var model:BoardObject;
  18.  
  19.                         public function get handleDescriptor():HandleDescription
  20.                         {
  21.                                 return hd;
  22.                         }
  23.  
  24.                         public function set handleDescriptor(value:HandleDescription):void
  25.                         {
  26.                                 hd = value;
  27.                         }
  28.  
  29.                         public function redraw():void
  30.                         {
  31.                                 invalidateDisplayList();
  32.                         }
  33.  
  34.                         public function get targetModel():Object
  35.                         {                              
  36.                                 return model;
  37.                         }
  38.  
  39.                         public function set targetModel(value:Object):void
  40.                         {
  41.                                 model = value as BoardObject;
  42.                         }
  43.  
  44.                 ]]>
  45.         </fx:Script>
  46.         <fx:Declarations>
  47.                 <!– Place non-visual elements (e.g., services, value objects) here –>
  48.         </fx:Declarations>
  49.         <s:Rect x="{-width/2}" y="{-height/2}" width="100%" height="100%" topLeftRadiusX="3" topLeftRadiusY="3" topRightRadiusX="3" topRightRadiusY="3">
  50.                 <s:fill>
  51.                         <s:SolidColor color="#0A96CA" />                               
  52.                 </s:fill>
  53.                 <s:stroke>
  54.                         <s:SolidColorStroke color="#077BA7" />
  55.                 </s:stroke>
  56.         </s:Rect>
  57. </s:Group>
  58.  
  59.  

The big difference between this and the normal handles, is that the size of the handles is dependent on the width/height of the model object, something I hadn’t tried before.

Next, I created a custom handle configuration to position them around the edges.

  1.  
  2. oh = new ObjectHandles( sprite , selectionManager);
  3.  
  4. oh.defaultHandles = [];
  5.  
  6. // Top border
  7. oh.defaultHandles.push( new HandleDescription( HandleRoles.MOVE,
  8. new Point(50,0) ,
  9. new Point(0,-2) , new ClassFactory( TopHorizontalGrabberHandle )) );
  10.  
  11. // Bottom border
  12. oh.defaultHandles.push( new HandleDescription( HandleRoles.RESIZE_DOWN,
  13. new Point(50,100) ,
  14. new Point(0,2) , new ClassFactory( HorizontalGrabberHandle )) );
  15.  
  16. // Left border
  17. oh.defaultHandles.push( new HandleDescription( HandleRoles.RESIZE_LEFT,
  18. new Point(0,50) ,
  19. new Point(-2,0) , new ClassFactory( VerticalGrabberHandle )) );
  20.  
  21. // Right border
  22. oh.defaultHandles.push( new HandleDescription( HandleRoles.RESIZE_RIGHT,
  23. new Point(100,50) ,
  24. new Point(2,0) , new ClassFactory( VerticalGrabberHandle )) );                 
  25.  
  26.  
  27. oh.defaultHandles.push( new HandleDescription( HandleRoles.RESIZE_UP + HandleRoles.RESIZE_LEFT,
  28. zero ,
  29. new Point(-2,-2) ,
  30. new ClassFactory(CornerGrabberHandle)                  
  31. ) );
  32.  
  33.  
  34. oh.defaultHandles.push( new HandleDescription( HandleRoles.RESIZE_UP + HandleRoles.RESIZE_RIGHT,
  35. new Point(100,0) ,
  36. new Point(2,-2) ,
  37. new ClassFactory(CornerGrabberHandle)) 
  38. );
  39.  
  40.  
  41.  
  42. oh.defaultHandles.push( new HandleDescription( HandleRoles.RESIZE_DOWN + HandleRoles.RESIZE_RIGHT,
  43. new Point(100,100) ,
  44. new Point(2,2) ,
  45. new ClassFactory(CornerGrabberHandle)));
  46.  
  47.  
  48.  
  49. oh.defaultHandles.push( new HandleDescription( HandleRoles.RESIZE_DOWN + HandleRoles.RESIZE_LEFT,
  50. new Point(0,100) ,
  51. new Point(-2,2) ,
  52. new ClassFactory(CornerGrabberHandle)   ) );
  53.  
  54.  
  55. oh.defaultHandles.push( new HandleDescription( HandleRoles.ROTATE,
  56. new Point(100,50) ,
  57. new Point(15,0) ));
  58.  

And unfortunately, at this point I realized the ObjectHandles didn’t correctly rotate it’s handles, so everything went wacky when I rotated. So a bit of tinkering around in the core library and I got that fixed.

End results:

New version of ObjectHandles posted:

http://code.google.com/p/flex-object-handles/downloads/list

Besides the rotating handles change, I’ve also made the examples build under flex 3 again, and added a submitted patch that allows you to have an isLocked attribute on your model objects. When set that, you can’t drag or resize that object.

Todo-Board.com – another shot at project management

I’m always looking for new ways to manage projects.  Last time I searched high and low for a solution, I ended up writing AgileAgenda after having been disappointed in other offerings.  That’s a great tool, and I use it all the time.  But it’s a very specific type of tool for planning a large body of work before you start.

I’ve grown to love using task boards at work to help plan and track an immediate set of tasks.  I’m sure you’ve seen them before, those white-board like things with sticky notes all over them.

But they have one big problem, the next project I’m working on will be distributed across a few geographic locations.  That task board is a physical board in one room.  It doesn’t scale well.

Luckily, in the office, we’ve got these great interactive whiteboards in a few of the conference rooms.  If you haven’t seen one of these, they’re essentially a projector + touch screen.  A software version of a task board combined with that would rock.  So that’s been my latest pet project.

Lets take a look at why I like the task board.

  1. Everyone can understand it.  Engineers, QA, Project Managers, the random executive walking by my office.
  2. It helps to focus work on what’s most important.
  3. It helps you to chunk out work in manageable sizes.
  4. It’s a collaborative exercise to make and maintain the board.
  5. It’s flexible.

But as soon as we move from physical to digital, some of the key benefits of the task board go away.

  1. Turns from a “us doing this” to a person using a computer to do it.  Sure everyone can watch and comment, but giving everyone a stack of stickies, and a marker really adds something.
  2. It’s not ever-present in a room somewhere.
  3. Software like this can often be tedious to use.

Some things that my current physical task board can’t do that this one should

  1. Import things directly from other systems (We use Quality Center to track requirements, I’d like to hook up AgileAgenda, Basecamp,  Rally, Trac, and whatever other service I can)
  2. Automatically reconfigure the notes based on a series of views.  Sometimes you want to see that 4 column todo, doing, reviewing, done, but sometimes you want to organize by person, or tag, or search.
  3. Get this thing on my phone.  More and more people at work are getting Android powered phones (they outnumber iPhones at least 2 to 1 in the office).  I’d love to do some android development, so this looks like a prime candidate.

Some features I’m working on to try and keep the best parts of my task board:

#HashTags

One interesting feature I’m working on is the ability to tag tasks with #hashtags, and those tags can affect the appearance of the task.  You can make up tags on the fly as you type, and later go into the tag definitions and set what the tags should do.  They can apply a few canned effects, change the color of the note, or add an icon.

Click For Full Size

@Assignments

Just like #hash tags, you can assign tasks to people on the fly as you type.  You can even make up resources on the fly and later go in and edit the details about them.

Board Views

Looking at your tasks in the columns of “Todo”, “Doing”, “Reviewing”, and “Done” is great and what most people want to do a lot of the time.  But wouldn’t it be nice if you could reconfigure your board at will?  Without losing your current cofiguration?  Board Views do that for you.  You can create a new view, set up a new organizational scheme, and then jump back and forth between your views.  You can even define tags that are specific to a view.  So, for instance, you could swap between a view showing the state of tasks, to a view that shows assignments.

Click for full size.

Click for full size.

Collaboration

While you’re in a meeting organizing your board, other people in the meeting can be typing in new notes on their laptops or (eventually) on their cell phones.  Those notes then become available for you to drag onto your board, thus bringing the multi-user collaborative experience in.

Ubiquity

I want to make this so it can become ubiquitous in an organization.  Embed the board on your Intranet, throw it on your facebook, email a copy to someone, get reminder emails, set it up in Kiosk mode somewhere, subscribe to the the RSS feed, and follow your board’s tweets.

Todo-Board.com

And thus TodoBoard was born.  As of right now the basic tag and view functionality is all working.  Next is fleshing out some of the more auxiliary features, and it should be ready for some early testers.  I should be starting to give out beta accounts within the next two weeks, sign up now to get into that first batch of people.

Trying out Mercurial

After reading the mercurial guide over at http://hginit.com/ last week, I decided to give it a shot.  The guys who host my version control system offer it as an option, so it was stupid easy for me to get started.

One thing I really like is being able to have a local change history that doesn’t get pushed up to the server.  I can commit often without worrying about breaking (albeit only theoretical in my case) other people’s environment.  This way I don’t accidentally lose any local changes and I can feel free to experiment a little more wildly.

So far, so good.  But this is just a 1-person project, so I’m not sure how in depth I can get.

An experiment in funding open source software

In the past, I’ve blogged many times about my ObjectHandles library, and today I’m starting an experiment in generating some revenue for it.

There is now a new web page at http://object-handles-examples.appspot.com/ that has 7 example applications intended as either a training resource, or as a starting point for more complex applications.  I’m charging a fee for the source code to those examples.  The fee is whatever you decide to pay (with a $15 minimum)

The more revenue that this generates, the more motivation I’ll have to spend time working on the core library and additional examples.

The core library will continue to remain free and under the MIT license.  It can always be downloaded from http://code.google.com/p/flex-object-handles/

There were a few reasons for me to do this including:

  1. My motivation to work on the library has been very low lately.  I don’t have any current projects that are using it.
  2. The donations link that I have has received a total of 3 donations over 2 and a half years.
  3. By working on these examples, I was able to really exercise some of the core functionality.  While doing this I was able to
  • Completely revamp the constraints mechanism and implement things like an Aspect Ratio constraint
  • Find and fix a handful of bugs
  • Figure out the answers to some questions others have asked that I just didn’t know the answer to
  • Make several big performance improvements

P.S.  This gave me a chance to create a real site in Python/Django/Google App Engine for the first time, and I’m impressed.

Just say no to dell

I am so frustrated with the buying experience with Dell today that I’m giving up on them.  Their customer service is useless.  Their promises for delivery are repeatedly broken.  They have crazy restocking fees.

This is for an order placed 1/18, and I have no confidence that it would have actually gotten here on the 25th so I’m canceling that.  It wouldn’t be so bad if the people you have to talk to on the phone had some idea about what’s going on.  Something like “We just can’t get that video card” or “The wireless adapter is out of stock”.  I would have modified the order to get it sooner if possible.

But all I got was corporate-speak about how great dell was and how I’d just have to wait.

I’m buying a mac mini instead.  At least apple will screw me over with a smile.

SimpleDiagrams – An ObjectHandles usage

Daniel McQuillen from www.simplediagrams.com emailed me last week to let me know about their use of ObjectHandles in the SimpleDiagrams product.  It’s an AIR application that lets you create chalkboard style diagrams in just a couple seconds.  It’s sort of Visio for people who need to get stuff done instead of diagram all day long.  I gave it a quick 10 minute try, and this might be an app I add to my arsenal of tools.

Daniel has been kind enough to offer me a small percentage of their sales as a thank-you for the ObjectHandles library.  It’s MIT Licensed, so he didn’t have to do that, but I’d like to send a big thank-you to him for that.  That’s a great way to support open source projects.

Why educational software

Here’s one reason why I’m in the educational software business.  We’re pilot-testing one of our new products (called Fraction Nation) at a local school.  The teacher gave all the kids surveys to fill out, there were a lot of great responses.  This response made my day.

Do you enjoy playing Fraction Nation?

I don’t enjoy playing Fraction Nation.  I Love it!  Very Inspiring!  You guys probably change my life and others!  Wonderful Job!

Or this one from another kid…

If you could change something about the program, what would you change?

The thing I would change would be nothing ’cause I really liked it!

Another kid, same question:

If I were to change something, I would change the background.

Oddly enough, several kids said the background thing.  I say if the background is the biggest thing they want to change, that’s a big win.

Universally in that class, the feedback was overwhelmingly positive.  Making a product that teaches fractions that kids like isn’t very easy to do, but I think we might have nailed this one.

And here’s a doodle one of them made on the back of a survey for us.

The thing that really scares me is almost every one of these kids has better handwriting than I do now.

ObjectHandles – Multiple Selection and Decorators

I’ve been playing around with a few things in ObjectHandles today. The first is multiple-selection. Last week Vlad Janvarev sent me a patch that got it working for non-rotated objects. I put that in, and spent most of my day today figuring out how to extend it to rotated objects as well (dealing with 3 coordinate spaces at once makes my head hurt!). To try it, press the shift key and select multiple objects on the screen, then you can move, rotate or resize them as a whole.
[kml_flashembed fversion="10.0.0" movie="http://rogue-development.com/uploads/ohv2/ObjectHandles2Example.swf" targetclass="flashmovie" publishmethod="static" width="720" height="600" fvars="undefined"]Get Adobe Flash player

[/kml_flashembed]
View-Source is enabled in it.

It’s not working 100%, and I’m not sure why. If anyone has any ideas, let me know. The broken part is if you rotate 2 objects, then select them both, then resize them really small. At some point they sometimes start getting bigger instead of smaller depending on the rotation. I’m baffled.

The second thing I played with is the idea of “Decorators” that can draw interesting info based on the state of the set of objects either being moved or currently selected. There’s a quick screenshot of a sample one I did below.

This is also in the link above under “Example 8″. This is just a proof of concept for now. If you want to try it, do it before trying the multi-select since the multi-select can leave objects on fractional pixel boundries which won’t line up perfectly.

Neither of these is ready for prime-time yet. The multi-select stuff is creating tons and tons of temporary objects so the GC kicks in periodically freezing the interface. That’ll need a little optimization.

ObjectHandles Version 2, first release

For the ObjectHandles fans out there, I’ve just submitted changes that let ObjectHandles 2 play nicely with FlashBuilder4 / Flex 4 SDK. While doing that I fixed a couple bugs, and set up a build environment so I can easily publish OH2 releases onto the google code page. So now you can download OH2 from the downloads section of the google code page. (Previously, you could only get it from subversion) That package contains source, documentation, and precompiled swcs for both Flex 3 and Flex 4.

http://code.google.com/p/flex-object-handles/downloads/list

I hope to write some better documentation on how to use this new release soon. If you’ve been using ObjectHandles Version 1, it’s not a straightforward port to the new stuff. There are drastic changes to how it all works.

Flash Builder Beta2, Catalyst, asset organization, FXP->SWC

Today, I’ve been experimenting with project structure and workflows.  I’ve got two major problems I want to solve.

Problem #1

When working in Flex Builder, if you have a lot of non-embedded assets, it can go really slow.  At seemingly random times Eclipse will decide it needs to delete all of your output files and re-copy them.  For our current project, that can take 10 minutes.  We have yet to figure out what triggers this behavior.

Problem #2

When working in Flex builder, if you have a lot of embedded assets, it can go really slow.  Especially on clean builds, or builds that touch a lot of modules.  This is an every-compile type thing, but is far less severe than problem #1.

Solution for Problem #1

Don’t let Eclipse do the copying for you.  Put your assets outside of your source tree, and turn off “Copy non-embedded assets”.  To the right is an example directory structure.  There are a few differences than most Flex/Flash builder projects.

  1. My assets folder is a sibling of my src folder, instead of inside it.
  2. My compiler is set to output to assets/bin-debug instead of just bin-debug

In your source, you’ll have to link to your assets a little bit differently.  Here’s an example from my TestProject.mxml that shows both an embedded and a runtime loaded asset.

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
  3.          xmlns:s="library://ns.adobe.com/flex/spark"
  4.          xmlns:mx="library://ns.adobe.com/flex/halo"
  5.          minWidth="1024" minHeight="768"
  6.  
  7.         <s:layout>
  8.         <s:VerticalLayout />
  9.         </s:layout>
  10.         <mx:Image source="@Embed(‘../assets/art/Image1.png’)" />
  11.         <mx:Image source="../art/Image2.png" />
  12. </s:Application>

Since the embed is relative to the source folder, we need to use paths in the form of ../assets/art/*

The runtime loaded assets are relative to the final compiled location, so those take the form ../art/*

Now, eclipse will never try to manage your assets.  This appears to completely solve problem #1.

Solution for Problem #2

A while back I blogged about turning a Flash Catalyst project into a .swc.  (Read that here)

I dusted off my script and tried it with the Beta-2 of Flash Builder and Catalyst.  And low-and-behold it worked without any changes.  The only thing I had to do was reset my FLEX_HOME environment variable to the new location.

So, if we were to move away from a model where we embed assets from designers into Flash Builder, and to a model where the Designer puts those assets into Catalyst, and then we run a script to compile the catalyst project into a .swc, I think that would completely solve problem #2.