Archives for December 2009

Xml MetaData Parser Updated

After some feedback on my initial post of the Xml Metadata parser I have updated the parser. It can now handle complex objects, ie objects that contain properties that are themselves classes tagged with the xml metadata tags. Props to Bart Wttewaal who took a first pass at the updating the code to handle the complex objects.

With some minor reworking it can now read and write xml to and from objects that contain properties more complex than simple strings, int, booleans etc. For instance you can have a Person object with an address property that is of type Address. If the Address class has also been tagged with the Xml metadata tag, passing xml into a Person instance will also populate the corresponding Address instance in the Person.

You can download the updated version here.

Thanks to Bart for taking the source code and running with it. Always great to get feedback from users to make improvements.

Flex WYSIWYG Html Editor

Anyone who has ever worked with html in Flash or Flex knows frustration. It doesn't always display properly, the list of supported html tags is quite short and the RichText editor is borderline useless. Fortunately many of those short comings have been addressed in Air however that doesn't help if you are building something browser based.

I have been recently working on a simple Flex based CMS (content management system) and one requirement was a basic html wysiwyg editor. Thankfully the amount of html to be displayed in the site via Flash was minimal but the editor needed to allow the user to perform some basic tasks like text formatting and adding hyperlinks. There are some really great wysiwyg javascript html editors available (CKEditor and TinyMCE spring to mind) so I wanted to integrate one of those into the cms. 

Fortunately with a little knowledge of javascript and css it was not difficult. By using a div layer to display the html editor (I chose CKEditor) and some css, it was pretty simple to place the html editor over the flex app. A few javascript functions called via flash.external.ExternalInterface and the editor can be sized and moved to whereever the Flex app requires.

 

Flex html editor

Here is the first prototype. To the average user it appears that Flex has a built in html wysiwyg html editor. You can even drag the editor window and the div layer will move along with it (unfortunately it's a little sluggish on pc's for some reason). 

You can do a view source on the html page to see the javascript and css that is used, nothing special but it does the trick nicely.

How to recognize a good programmer

I just came across this post on how to recognize good programmers and it really struck a chord with me. As a freelance contractor I read the post from two perspectives: as someone whose skills and experience are constantly scrutinized and as someone who applies that same level of scrutiny when looking for developers to work with.

In today's market for freelance Flex and Flash contractors there are a lot of good programmers out there, unfortunately there are many not so good ones also. Lately I have been called in for clean up duty on Flex projects where it's readily apparent that a not so good programmer was involved and made a mess of things. The client is left scrambling to find someone who can fix the mess and get things on track and operational.

Here's a quick recap of the positive and negative indicators when evaluating programmers. 

Positive indicators:

  • Passionate about technology
  • Programs as a hobby
  • Will talk your ear off on a technical subject if encouraged
  • Significant (and often numerous) personal side-projects over the years
  • Learns new technologies on his/her own
  • Opinionated about which technologies are better for various usages
  • Very uncomfortable about the idea of working with a technology he doesn’t believe to be “right”
  • Clearly smart, can have great conversations on a variety of topics
  • Started programming long before university/work
  • Has some hidden “icebergs”, large personal projects under the CV radar
  • Knowledge of a large variety of unrelated technologies (may not be on CV)

 

Negative indicators:

  • Programming is a day job
  • Don’t really want to “talk shop”, even when encouraged to
  • Learns new technologies in company-sponsored courses
  • Happy to work with whatever technology you’ve picked, “all technologies are good”
  • Doesn’t seem too smart
  • Started programming at university
  • All programming experience is on the CV
  • Focused mainly on one or two technology stacks (e.g. everything to do with developing a java application), with no experience outside of it

 

Give the entire post a read, it's very insightful.