Archive for March, 2009

Truly Customizable User Interfaces

My most recent project is working on a small IDE (integrated development environment) for generating micro-C Linux kernels.  It’s an updated version of Fusion.  One thing in particular that it does is present a UI of choices for configuring the kernel to your hardware.  Specifically, we want the end user to be able to add their own hardware without us needing to do the work and releasing an updated version of the software or a patch to it.  This called for some truly customizable UI.

Since the original software was written in VB, I thought C# would be a good platform for the application.  It would allow me to reuse some of the components, like ScintillaNET, and have equivalent operating system calls and components to the original application.  Also, having a built-in MDI (multiple document interface) framework was an added bonus.

The interesting part has really been the customizable UI.  How can we let the user add their hardware to our configuration dialog?  The answer was simple: use WPF (Windows Presentation Foundation).  If you’re not familiar with WPF, it’s Microsoft’s XML-like, declarative UI language (XAML).  It turns out that this is really easy to load at runtime.  By the way, for help in generating the XAML code, I found Kaxaml very helpful.  Then came the other end of the problem.  How does this same end user modify the C header file that this UI generates to add his own hardware needs?

Well, of course, you’d think about putting information into a user-accessible file that you could load at runtime.  You could parse it for “commands” that would retrieve information from the UI and log the information for output to the header files.  This would generally work fine, but some operations can be a little complicated and I had no desire to build a true lexical parser to handle operations that C# or some other scripting language already had built in.  After a quick search, I found out that C# can compile code at runtime.  Another search took me to Westwind, where I found a nice package built around the numerous commands that C# makes you execute to accomplish the task.  The Westwind code builds a class and takes constructor arguments.  I added a callback class to the arguments, so my end-users can add C# code and calls to my specific class to generate the header files.

I hope this gives you some ideas on how to increase the level of customization in your application or how to add some user-level customization.

Talent vs. Work Ethic

In my life and my career I’ve seen people with enormous talent and people with great work ethic.  Does either one guarantee your success?  Is it better to have one than the other?

My experience tells me that it’s the combination that matters most.  I’ve seen talentless people plug away at things for years.  In my judo club, there are people from numerous backgrounds that come and work.  Some people have innate talent, others don’t.  However, over the years, even those without talent can make some progress and become competent judo players.  I’ve also seen players with great talent that didn’t want to work hard.  Their judo is very good, but they could have been great if they had the dedication to work on it.

Software is a bit different.  If you don’t have any talent, then you’re in trouble.  The thing is, since there are many different kinds of software, there are options for you.  Object-oriented programming not your forte?  Try databases.  Not so good at application programming?  How about web sites?

Years ago, I hired a Ph.D. who specialized in neural networks.  We figured he was smart so we could teach him how to program for our application development work.  It was a disaster.  He didn’t get object-oriented programming, couldn’t read code, couldn’t code at all.  He went back to academia, where I’m sure he’ll be a success.

Even in software, I’ve seen talented people who still got nowhere.  They couldn’t communicate their ideas well or they simply didn’t want to do the grunt work of communicating their brilliant designs to the computer.  Then there were the folks who simply thought that they were brilliant and that their code was beautiful, but that’s a different topic entirely.

Success is a complex formula, but can be summarized for an individual developer as:

talent + work ethic + task suitability= success

This doesn’t take into account any of the other things like communication skills, design skills, etc.  Keep in mind that in the above equation, missing one element can mean that things will be more difficult for you – it may be time to switch something.  Asking your manager or a colleague can help you decide if it’s time to change something or steps to improve something.

Where Leadership Comes From

Where does leadership come from?  What is leadership?

For some people, the answer to these questions is simple.  It obviously comes from above.  In the corporate world, this means from the CEO, vice president, director of marketing, or your direct manager.  Of course, there are many times when leadership from above is lacking or is ambiguous.  The messages aren’t coming or they’re not clear or they’re mixed.

However, there are more subtle types of leadership and there are things that you can do as a non-manager or low-level manager to provide it.  This is one of the themes of my book, Design, Code, Test, Repeat – leadership takes many forms.  I have always strived to play a leader role in my work.  It’s not about standing on a soapbox and screaming about coding standards or design document format.  It’s about keeping an eye on what’s going on in your group and in your company.  It’s about questioning decisions that are made – it doesn’t have to be in a disrespectful way, just asking for clarification when things seem a bit strange to you.  It’s about not just being a sheep and being pushed to the next problem to fix.  It’s about keeping your head up and seeing above the treeline as well as keeping your head down and on the details of your project.

Having someone on your project who has these attributes is extremely valuable as chances are that your manager doesn’t have all of them and doesn’t have the bandwidth to cover all of the bases alone.  Having leaders on the team makes everyone’s job easier.  Shouldn’t that leader be you?