Thursday, September 3, 2009

Windows "Send To" menu annoyance

I hate it when I open a menu (for example, I want to create a folder, I right click and I choose Create Folder), and it froze for 15 seconds when I move the cursor over the "Send to" sub menu.

I don't use this sub menu and the following action will remove it.

To remove this sub menu:
  • Open the registry editor: regedt32 (in command line)
  • Go to "HKEY_CLASSES_ROOT/AllFilesystemObjects/shellex/ContextMenuHandlers/Send To"
  • Double click the "default value" field on the right column.
  • Delete the text value.
  • Exit the registry editor.
No more "Send To" option.

Francois

Tuesday, August 4, 2009

Maven 'HOT' plugins

Here is the list of my favorite plugins for Maven:

FindBugs: This plugin help find a lot of bug in a Java code.

<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<threshold>Low</threshold>
<effort>Default</effort>
<excludeFilterFile>findbugs-excludes.xml</excludeFilterFile>
<relaxed>false</relaxed>
</configuration>
</plugin>
...

Cobertura: This plugin is very useful for checking the code coverage of the unit tests.

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<property>
<name>net.sourceforge.cobertura.datafile</name>
<value>target/cobertura/cobertura.ser</value>
</property>
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.3</version>
<configuration>
<instrumentation>
<ignores>
<ignore>com.example.boringcode.*</ignore>
</ignores>
<excludes>
<exclude>com/example/dullcode/**/*.class</exclude>
<exclude>com/example/**/*Test.class</exclude>
</excludes>
</instrumentation>
</configuration>
<executions>
<execution>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
...
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.3</version>
</plugin>
...

JavaDoc: Generates the Javadoc for both code and test code.

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<aggregate>true</aggregate>
</configuration>
</plugin>

Source XRef: HTML based, cross-reference version of Java source code.

TagList: Report on various tags found in the code.

Simply do: mvn clean site and look into the target/site directory for the reports generated by these plugins.

In a other blog, I will talk about Hudson integration.

François

Monday, August 3, 2009

VirtualBox for testing software configuration

We all know that we can use VirtualBox to test software using a specific environment, but what I like about VirtualBox is the possibility to test a complex software configuration without messing with my current installation. For example, I wanted to have a SVN server (in fact it can be anything from Hudson build server to a small program to install just to try it), and even on following instruction it is hard to set the thing correctly the first time. With a virtual installation I can test and find the correct configuration. And when everything is correct, I reproduce the steps on my installation.

After some time, if I want to try something else with my SVN server, I can try on virtual installation before messing in my active and precious installation.

An other thing is to try a new version of a software that you have installed. For example: you have Hudson server, and a new version of the server is released, you can try the new version without damaging your actual server. Just use a virtual installation using your version of server and try to upgrade it. If you use special pluging, you can try them to see if they continue to work. It is not easy to backtrack an installation, this is why you can sacrifice a virtual installation.

François

Wednesday, July 29, 2009

Simple software documentation iteration

After working for some time (10 years +) in the software development, I found it hard to kept good documentation about the software being wrote. In the company where I work we put in place a simple documentation iteration. The iteration has implication over all the layers of development, from customers to developers, SQA, software designer, etc..

Iteration #1 - User stories
In this iteration, we document what the customer need in the software. This part is very important, and it must be very clear for both parties. Usually, it must be verified by one of the senior programmer. When both parties agree on the user stories, it should not change afterwards (unless there some problems or better way to solve some of the user stories), this is more or less the contract between you (the company) and the customer.

Iteration #2 - FDS - Functional Design Specification
In this iteration, we design the UI (if needed) with all the error messages, the flow of data, the user interaction, the component interaction and architecture, the valid parameters, the input/output. In short, anything that the user will see or use, and anything that will help the user to use and comprehend the software. All this are based on iteration #1 - User Stories. When something wrong (or good (by example a better way to process data)) is found at this point, it is important to notify the customer for modifying some of the user stories (this should not happen often, something the process to make change in the user stories can be long).

Some of the acceptances tests can be defined at this point (see #7 and #8 - Acceptances tests).

Iteration #3 - DDS - Detailed Design Specification
In this iteration, we design the structure of the code, the classes (or modules) to be created, the sequence diagrams, anything that will help the developers. The DDS is based on the FDS. Like the FDS, if there something that may change the FDS is found in the DDS, then the FDS must be changed, and hopefully without changing the user stories.

Iteration #4 - Code
In this iteration, we code :-) based on the DDS. The code should reflect the DDS, for example, if in the DDS there is some reference to a module called Orange, then in the code this module should be named Orange and not Banana. It should be easy to navigate in the code after reading the DDS. The DDS come handy in the future (1 year later for example) for reference about the code which may be forgotten by the developers.

Iteration #5 - Unit tests
The unit tests validate the code done in #4 - Code. These are simple tests done at the class level. Usage of mock object is the norm.

Iteration #6 - Integration tests
These tests are more complicated tests, they test the interaction between the classes, or between the components. They validate the DDS.

Iteration #7 and #8 - Acceptance tests
These tests are using the software created, in a controlled environment. They are using real data. They validate the FDS (so all the UI interactions, the result for each operation, etc.). Sometime these tests are explained in a SDT - Software Development Tests document. It can be useful for the SQA teams to help them design their own tests.

There is also customer testing but it is not something that you can document. Unless the customer is very friendly with your company.

Software Documentation Iteration Diagram


For each iteration there is a BIG arrow and a small arrow; if each iteration is done properly and professionally then the small arrow is used less. Using the small arrow is time consuming and must be avoided if possible.

The double arrows represent the relationship between the test part and the documentation part.

François

Sunday, July 26, 2009

Free Open Source Tools that I use

I'm working on Linux and Windows (XP, Vista), and through the years I began to use tools that are free and that work on both operating system.

Here a partial list of these softwares:

TrueCrypt - On-the-fly encryption. This tool is the easy to use. I use it on my USB sticks for my sensitive information.

VLC - Media Player. This media player is easy to use and work on multiple operating system (Windows, Mac, Linux, etc).

KeePass - Password storage. I like this tool, easy to use, I keep two set of keys, one for the very sensitive stuff (credit cards, banks, etc), and an other one for all my daily user accounts (example: Sun network, this blog, everything that I need to sign up for having access to stuff).

OpenOffice
- Text editing and more. What to say? Each new release bring this software suite to a new step closer to Microsoft Office. I don't say it is perfect, Microsoft is a more integrated suite (Outlook, SharePoint, etc.), but if you don't need these components, OpenOffice is very good at editing text and it is free.

GIMP - Image editing. Very mature image editing software.

François

Tuesday, July 21, 2009

I want my electric car

WHY? Why should it take a lot of time before marketing an electric car? I mean do we need to design it perfectly the first time, do we need to develop a new car platform? Do we need the GM Volts? I think not...I think it will be more cheaper to adapt a car (let say for example the Toyota Yaris), we could buy the car without the motor, add a kit (electric motor, power steering, etc.) and a battery (or several batteries) based on the usage (high, medium, low daily mileage). It is more easy to improve only the kit over time then to try to improve all the component of the car.

Sure, there are some companies that offer to transform your car into an electric one, but they are marginal, their kit must be adapted to your car frame, so the volume of sale is low thus keeping the price of the kit high. (I don't talk about the fact that the motor and the other components (muffler, gas tank) must be removed and disposed properly). My point is why not just buy the car without the motor and having the big car company selling the kit.

For me, I do about 55 km each day to go to work (110 km total). And this car is only used to go to work, I will be happy to have a simple electric car, and I don't want to wait for the Volt to be perfect.

François

P.S.: I didn't talk about Tesla motor, their cars are fantastics, but the price is a little too high.

Something new : Nissan 'Leaf'

Monday, July 20, 2009

Apollo 11 - Another adventure needed

When I was young (around 4 years after the first landing on the moon), I was looking (not reading yet) at images of my brother book about Apollo 11. The book was mysterious, why go to the moon, why made a book about it? Sure it was interesting, kid loves rocket, I did make some adventure in my mind while building some rocket in Lego. But at age 4 (1974), I think people have been going to the moon for some times now, there was no real excitation about it. I mean I was too young to see the challenge to send men to the moon.

Now at 39, I think very different, looking back at the enormous challenge, the problems, the unexpected hardware to be created, invented. Now I see that it was a miracle of the human engineering mind.

Today, the situation is different, we have the orbital station, an economic crisis, environmental problems, the Internet, the IPhone and all the neat electronic stuff supposed to help us in the daily routine. But we miss something inside our heart and soul, we miss the adventure. We need to accomplish something great, something that change our view of life, something that push our limits a little bit further.

I hope that I and my kids will live to see another humanity adventure (to Mars or beyond).

François

DSynchronize - Simple backup solution


I was struggling for a solution to backup my data (photos, home videos, musics, etc.), I don't need to backup my system entirely (if something bad happen, I prefer to reinstall the software that I currently need, not the entire junk I have installed over the years :-)

I have compared some commercial application, but they were expansive, and with too much options that I will never use. Then I tried DSynchronize, a shareware program, with no installer, no write in the registry -- A very simple program.

The size of the files I need to backup is about 300 gigs (the video part is about 200 gigs (thanks to my HD camcorder Canon-Vixia HF100 and my cute two babies for whom I take snapshot of their new life)). I need room for future expansion, so I opted for 1 terabyte capacity (which is relatively cheap).

I bought an internal harddrive (Western Digital 1 Terabyte, the source drive), and an external harddrive (Comstar 1 Terabyte, the destination drive).

I created some repositories (video, picture, audio, etc.) in the internal drive, and I moved the stuff I want to backup inside those repositories. It is to be noted that I don't use these drives when I do video editing for example, I just put the raw video, and the result (the complete edited video). The video editing is done on RAID-0 hard drives which are much faster.

Then I start Dsynchronize, set the repositories (this is done once) and click synchronize. Voilà, that's it.

The first time, it copy all the stuff to the external drive, and after that it is incremental (deleting, adding files to match the ones on the internal drive).

François