Wednesday, September 10, 2008

Communication between engineers and management.

Human beings work on two levels. The first is the emotional level. This system is very good at making very quick decisions based on the data but doesn't think very deeply. The second level is the rational level. This is the level that can do mathematics and understand software design. Psychologists think of these two levels as being different systems in the brain. They call the first level system one and the second level system two. Given that there's absolutely no way of understanding a very complex piece of software, like an operating system, if someone's trying to explain to you what's special about the newest version of Windows or Linux or MacOS X, there may be a little technical data transmitted however the bulk of the information will be directed directly at system one, the emotional system.

Very often explaining the positive and negative aspects of the complex design doesn't involve trying to make people understand the whole system, even when the system itself is really only understandable as a whole. It's possible to transmit one's excitement about the system or the elegance of the system through one's own excitement and a few choice examples. You need to transmit your excitement because otherwise your words come off as disingenuous. You need to use a few examples because this is something the brain can understand. In antiquity we weren't always able to prove things mathematically so what we did instead was we used anecdotal evidence. Examples are like anecdotes. They don't have the advantage of being associated with a different person, but if you can make your example personal and that's almost as good.

When it comes to engineering, one of the greatest dangers and engineer faces is misunderstanding a system. To simply not understand a system is not as much a problem because you typically know that you don't understand the system and seek out knowledge, advice and otherwise treat the system with respect one would expect to give to a potentiality dangerous blackbox. When an engineer misunderstands the system he feels free to tinker with it, to change it and then put it into production. Many bugs in software actually exit because an engineer changed the system, either data feature or fix a bug, but didn't understand how that existing system worked. As a result of their tinkering they introduced a subtle problem. As a result, software engineers, in fact all engineers, tend to become professedly more paranoid about misunderstanding concepts as they get older.

This sort of paranoia about misunderstanding a system does not exist in the general population. In fact, it may not even exist in engineers with respect to non-technical matters. When people not in technical roles interact, in such ways that can influence the design and manufacture of complex engineering system, there will almost certainly misunderstand the system.

Working on a complex piece of software requires holding a lot of state in your head. It acquires understanding in detail the software system. In a typical day a software engineer will make many decisions that will affect how long it takes to build a piece of software, how robust that piece of software will be and whether or not a feature gets implemented. He will make these decisions either explicitly or implicitly based on the design he chooses to implement. While requirements suggest design design suggests requirements also. A good engineer will optimize the time it takes to write the software, the quality of the software, and the number of features in the software. Frustratingly for managers, the only person who actually has enough information to be able to make the trade-off is effectively is a software engineer. Frustratingly for software engineers the only person with enough information to be able to understand whether the system should be optimized for speed of development, quality or features is the manager.

From the manager's perspective, it is impossible for manager and to know everything they need to know in order to make a design decision that will influence the schedule, quality and capability of the software their team is building. While I think it would be possible for managers to be able to do this with certain high level features. However, in practice a good designer will be able to understand the whole system in its entirety and for any given set of features, schedule and quality objectives will be able to optimize the design, in its entirety, to the optimal. A common manager mistake is to try and exert control over the software team by withholding important prioritization information.

From the software engineers perspective, it's impossible to know exactly which of features, schedule or quality is most important given the current political climate. This includes pressure from clients, budget pressures and maintenance duties. A common software engineer mistake is to build the wrong thing to a ridiculously high standard.

Communication between management and software engineers is tricky. From the software engineers point of view, he can't give the whole picture because it would simply take too long. In fact, if you were to give the whole picture to the manager to manager would know the same amount as a software engineer about the system. Nevertheless, software engineer doesn't need to give an accurate picture of how the system works. All we need to do is give some idea as to the emotional landscape of the solution space. Essentially, any combination and quality features will result in a schedule with some risk parameter. Negotiating a combination of quality, features and schedule is the process of understanding the solution landscape and then picking a solution with an agreeable combination of factors and a tolerable risk.

A manager can help speed this process along by attempting to communicate the political climate, as much as it relates to the priory of features, the satisfaction with current quality and schedule pressure to the engineer. By doing this the manager gives the engineer context as to what sort of environment the software is being built in. This process is very similar to going to visit an on-site client to find out what sort of workplace pressures the client is under and what sort of environment the software is expected to run under. While a manager can drag and engineer round with him to get yelled at by executives the manager can try and communicate as much as possible the current priorities.

Managers need to be over trust are software engineers to make the right design decisions. This is a matter of professional trust and competency but also a question of having the right information.

Software engineers need to try and poll their managers and under other members of the organization for what the priorities are what the priorities are likely to become and how satisfied everyone is with the current state of affairs.

Monday, September 1, 2008

Learning is fun

Well, you learn something everyday. This is especially true if you're working with computers. Today I learned the following:

1- windows file sharing permissions are weird.
2- Entourage X (mac outlook) will irreversibly corrupt its database if you push it over 2 gigs.
3- Sylpheed doesn't know how to import an mbox file if said mbox file uses mac style line ending.
4- Sylpheed crashes most spectacularly if you try to import a 1.6 gig mbox file with mac line endings.
5- Practically no text editors will work with 1.6 gig files.
6- Knowing how to program in Java and having a development environment ready to go has its advantages.

Tune in next week when I learn that beating oneself over the head with a pan is a good stand-in for using a computer.

Sunday, August 24, 2008

RE: Bill C-61, the Canadian copyright bill.

Dear Jim Prentice,

I've been following recent developments regarding the new C-61 copyright bill. There are many things I don't like about it. Here are three.

1) It becomes illegal to copy DVDs for backups or for playing on another device.

I have recently started to move my DVDs onto a separate hard disk so that I can play them from my computer without going through the bother of finding the physical disk first. Essentially I have made a sort of crude movie jukebox. I find this to be a great way of watching movies.

I also make temporary copies of DVDs to my laptop for use on long flights or bus rides. Playing from the digital copies doesn't take up as much battery lifespan as playing them from disk. Also I don't need to carry around the DVD drive, not to mention the disk itself. This is especially useful since my laptop machine doesn't have a DVD drive.

I am concerned for people making copies of DVDs for use in their iPod movie player devices. While I don't do it I don't think this should be made illegal. I can see a time in the near future where it will be possible to put every movie I own onto one of these devices. I would like to see this doesn't become illegal.

I am also concerned about the parents who want to make backup copies of their children's DVDs because their children tend to destroy them. I think this is a reasonable, fair use.

2) The anti circumvention clauses.

All free and open source DVD players on linux are, to my knowledge, based on the DeCSS. This code was backward engineered to allow DVD playback on Linux. This would be made illegal.

From my understanding, the development of this code would be illegal. I'm not even sure that the use of this code is legal, therefore I'm not sure whether there's any way of legally playing DVDs on linux. I think this is a bad thing.

Putting linux aside for a moment, the breaking of CSS has opened up the possibility for me to make copies of DVD for the uses I mentioned above. In a very real way I owe these new capabilities to the breaking of the encryption. It looks like bill C-61 makes format shifting in general illegal and breaking DRM to do so doubly illegal.

I believe that DRM and encryption are examples of how digital technology can be used to create new business models. Digital technology, and the use of encryption, can allow the content producer to control how their content is consumed and paid for. Historically, this has been defeated by other who break the encryption and backward engineer their formats. Anti-circumvention legislation removes the ability of third parties to do this and tilts the balance of power in favour of content producers.

With DRM, piracy is a red herring. DRM certainly doesn't help stop piracy since all you need is one non-DRM copy to begin to circulate for all piracy to be possible. It is, however, a great way of getting people to pay extra for the ability to VCR programs for later viewing... Or to pay to re-buy tracks they actually own but need to buy again because their tracks all use a DRM for a type of player that doesn't exist any more.

Finally, I would like to mentions the Sony root kit incident. Sony's CD copy protection DRM was obnoxious and invasive. It used a root-kit style attack more common of trojan horse (computer virus) cracking attempts. It's buggy modifications to Windows has caused me personally to spend time fixing machines broken by its buggy implementation (known commonly as the Sony rootkit fiasco). In my opinion this sort of drive by virus-like behaviour from software should be illegal and not any attempt to circumvent it!

Tuesday, August 12, 2008

How to fix your desktop application

Ok, a quicky..

Google's calender, spredsheet applications, mail have started to displace desktop applications. Why? IMHO they suck. They try to be desktop applications but are nasty, buggy, pale imitations. They do have a few things that desktop applications can learn from.

1) No dang installation step. I've always hated installing applications. Is anyone here over 30? Can anyone remember installing applications on Macs circa 1992? The correct answer to that question, with a few exceptions, was no. You just dragged the application from the floppy to where you wanted on your hard disk. The only reason you didn't run the dang program directly from the floppy was it ran slow. 'm using windows XP and everything little thing has an installer. Step one to making desktop applications suck less, get rid of installers. Let's get a standard where I can run desktop applications from the web and cache them locally, please.

2) No load time. Web applications don't need to load. To be honest I'm still not sure why desktop applicati0ons have a load time... and I've been writing them for years! While writing Myster I tried to reduce the amount of time it took to load. In the end I managed to get it down to some reasonable fraction of what it took to load the java virtual machine but really it should have been even shorter.

Just what the heck is happening during a program launch anyway? The answer is the machine reads a block of computer instructions from the HD and starts executing them. This is actually quite fast.. even on windows. The trouble comes when these initial instructions start loading libraries and building tables and constants and loading the code that loads the preferences and reading from the preferences and loading parsing them then loading all the icon resources then displaying those. The list goes on and on. In the end, desktop applications take a long time to load.

If your desktop application takes longer to load than my perception of instantaneous, then you should be making it faster. If your application feels the need to present a splash screen it's taking too long to load. If your app takes longer to load than a typical web page then it's too slow.

3) Web pages can be accessed from anywhere. I'm not entirely sure why I can't access my home documents or application setting from another location. Part of this problem is that applications require an installer and I don't want to go through this heavy install process in order to access my information from another PC. The other part is because I have to find someplace where I can store my documents or setting in order to access them.

Web sites don't have this problem. In one of the weirdest examples or this I have ever seen, my web browser of choice has an option to store its settings remotely. The idea is that when I use my web browser on a different machine, the settings I usually use follow me there. Hurray! Now the three machine I use daily will be in sync. The thing is, in order to use this feature I have type enter a server to connect to to store my settings. Are you kidding me? I got this browser from a website.. A web site that appears to have no problem handling a bazillion downloads of said web browser every month, not to mention other page hits etc.. But it won't allow me to store my settings anywhere on its servers. Is this desktop application group think?

4) Platform compatible. The three machines I use daily are all on different platforms. I have a mac, a PC and a Linux box. I can view the same web sites on all. Desktop apps? Yeah, there are some ports but I would have expected that we'd have cross platform code by now. Java has been around for some time now and does it fine.


gumble grumble grumble..

So at work I'm currently working on a brand new desktop application product. I want to give demo/beta applications to people. I don't want to keep sending out installers to everyone what can I do?

Well, The application is in java so I use Java web start.

With java web start you go to a web page, click on a button or link, the application is then downloaded to your machine (if it's not cached there already) and run. The whole process is a bit quirky in practice since you have to click on a box acknowledging that you're downloading an application by someone named whatever.. but it works. Want to run it offline? Yep, you can do that too. It's like having a desktop application available from a web page. This application, also has roaming user preferences as well so if you go to a different machine, the preferences can follow you around via your login. Basically, it nails 3 out of the four things above. The startup time isn't the best.. I mean this is java, but it's still fast than open office, for example, so it's not bad...

yeah.. I can see this stuff happening.

Sunday, June 29, 2008

RSI is a pain in the wrist

Repetitive strain injury is a serious risk for all coders and for many office workers too. Many of my colleges at my workplace display symptoms of RSI problems and it worries me.

I once went through a period of about 2 months where I couldn't move at all. I could barely move my wrist, opening doors was difficult etc.. all the classic RSI symptoms. On the advice of my family I went to see a physiotherapist and over 2 months I managed to get use of my fingers back. In a very real way I'm still recovering now. While, I can use the computer all week for the normal amount, I still sometimes get pains in my wrists.. this is 3 years later.

RSI is bad new and represents one of those few times in life where panic and anxiety is a reasonable emotional reaction. Untreated RSI can destroy careers and lives. It can cripple for life. A friend of mine had to abandon his Ph. D in computer science and pretty much change his entire career plan. This same friend has written a short article about what he's learned battling RSI.

One big tip is stop typing! Don't type through the pain!

Being unable to type for 2 months is much less of an issue then being unable to type for the rest of your life.

Saturday, May 31, 2008

Tomato Plants on the Balcony

Many years ago, when I lived with my parents, I would plant a garden in our backyard. I'd grow things like beans and tomatoes. I quite liked doing it because it was relaxing.

When I moved into the city I wanted to grow tomatoes in pots on the balcony. My first year wasn't very successful. My second year wasn't either. I figured my balcony wasn't getting enough sun or something.

I switched apartments a few years ago and this new apartment had a balcony that was in the sun for most of the day. The tomato plants still didn't do well. In fact, they didn't grow at all. All they did was turn purple.

Eventually I figured out what was wrong. It turns out that I was using the wrong soil.




For whatever reason, "black earth" has, in my family, always been a by-word for rich soil. So, when I went looking for soil to plant my tomato plants in I went with the big bag labeled black earth. Unfortunately, the black earth I got didn't help the tomato plants grow. I'm still not clear on why, although I've been told that tomatoes like something more organic. Great. Tomatoes are hippies.

Anyway, the second time I planted my tomatoes on the sunny balcony of my new apartment, I used a mixture of soils. I actually suspected that my they-aren't-getting-enough-sun hypothesis was bogus, so I planted 6 tomatoes plants n a mixture of different soils. The soil that did best was regular potting soil made for house plants. I can't remember the name of the soil but it was something ridiculous like "Mr. Magic's incredible miracle soil".

(for the experienced tomato growers: No, I didn't have compost in my selection of soils.. I'm getting to that :-) )

They did fine in the miracle soil (by fine I mean they actually grew. This had not happened before). Then I went to visit my parents. My parents still grow tomatoes and their tomatoes were twice the size of mine. I was annoyed but curious. Apparently, there was still room for improvement.

A little while later I noticed my plants had stopped growing. I became very frustrated but hypothesized that they might need more fertilizer. I had this jar of flowing houseplant fertilizer and I decided that since my tomato plants weren't producing anything that I might as well amuse myself by testing this hypothesis by trying to over fertilize them.

I started by giving them the weekly recommended dose every day. Their response was to turn an incredibly deep green then start growing by about an inch per day. It was really impressive.

I went to ask my local plant person about this and they said that tomatoes are always hungry. They really like nutrients and completely sap the soil of any. The house plant stuff I used was nicely balanced but not rich enough in the stuff the tomato plants wanted. I should plant them in pure compost. This made me relived as I half expected them to say they needed blood! Fresh blood and plenty of it! I dodged a bullet there.

So this year I have planted them in a mostly compost mix. They are bright green but and a bit tiny but I'm betting it's because they are cold. After bringing in a plant for a week and seeing its size doubled my hypothesis seems to be confirmed. Well, June is coming so that shouldn't be much of a problem anymore (June always likes the heat turned up to full. She's a funny girl is June.).

Growing tomato plants on your balcony is fun and results in a comical number of tomatoes at the end of the summer (if you've done it right).

The things you need are a balcony that gets plenty of direct sun from about 10am to 2pm. You need pots that are about 17 to 22 L (10 inch pots, deeper is better). You need pure compose soil (maybe mixed with something - opinions on the internet differ. I'm mixing with various amount of regular house plant soil in ratios of two thirds compost to seven eights compost the rest regular house plant soil).

Cherry tomato plants seem to be more resilient and less finicky.

Anti-squirrel gun installations may be needed depending on where you live.

Since my parents have a large compost pile where they compost just about everything I went down there and picked up some real, organic compost. You can also buy compost at the store. I've been told sea shell compost is quite good since tomatoes like the calcium. There are other composts as well. If you buy your soil at a real plant place you can ask the guy. If you're visiting a downtown botanist make sure you make it clear you're not using tomato plants as a euphemism for pot plants. Man, the miss-understandings I've had.. wow... As long as you use some type of organic compost soil you're probably ok. I'm still looking for soil tips to try out next year. Post pictures of your plants and soil tips in the forums :-)... I'd love to see them.

Tomato plants are fun to grow and fun for kids too since once they start growing you can actually see the amount they grow per day. This is growth on a kid-friendly time scale.

Oh and tomatoes taste so much stronger straight off the plant. Don't put them in the fridge because it destroys the taste.

Ok, enough about tomatoes. See you next time.

Monday, May 12, 2008

Worst website nomination

So there I was, looking for some information on JavaFX, the new.. ummm.. something language from Sun which is great for.. well.. I'm not sure..

Anyway, I was looking for informaiton on JavaFX when I came across the JavaFX website:

http://javafx.com/

My jaw dropped to the floor. They really worked hard on it. It's so sad. The site is a total nightmare.

JavaFX.com is the kind of site that gives rise to inside-the-box thinking.

Here are the problems I have with it:

1) The "next page" icon things are inscrutable.
2) The amount of information per "page" is tiny.
2b) The content is laughably superficial as well.
3) The "floating" thing.. hereafter called the WTF windoid is so tiny as to make is useless.
4) The information presentation is noisy, filled with decoration compared with the amount of information displayed.
5) The minimized WTF windoids are hard to read.
6) The current WTF windoid hides other minimized WTF windoids behind it.
7) The transition effects don't work smoothly on my machine; everything just jumps around.
8) My font size settings break its assumptions about font sizes, so text flies off the end of the WTF windoids "titlebars".
9) There's not "throw a brick at the author" button.
10) Ugly as sin.. And black with white or sharp contrasting colors is my favorite color scheme too! - That's how my website is done. :-)