Educating the world

Our blog has over 10,000 readers a month

What is Project Voldemort? What is Voldemort?

January 4th, 2010

Seems like an honest question, however the Project Voldemort website doesn’t actually tell you. Their page describes what features it has but doesn’t explicity say what it is. The Project Voldemort web site doesn’t have any email address of any of the members to ask questions, it only has an mailing list to which you can post questions.

After a bit of hunting, in fact far more hunting that I would have expected I came across this article which explains what Voldemort actually is. It even mentions why the project is called Project Voldemort.

http://www.bigdatabaselist.com/wiki/Project_Voldemort

Prehaps they should read my article on clearly defining what a project does. “The whats and whys to creating project descriptions“.

Reporting bugs in Spring Tool Suite (STS)

December 31st, 2009

I’ve been doing work with the SpringFramework now for about 3 years. It has been a very steep learning curve - occasionally I feel like I’m rock climbing!

I started off using SpringIDE which is an open source commercial free Eclipse plugin which can aid the development of Java EE projects that use Spring.

The difference between SpringIDE and Spring Tool Suite is small but subtle. SpringIDE is an Eclipse plugin where as the Spring Tool Suite is an entire version of Eclipse pre-configured with all the plug-ins SpringSource thinks you need. It even has a Spring Source splash screen when it is loading.

In early 2009, SpringSource (the owners of the Spring Framework) decided to change the licence agreement of Spring Tool Suite (STS) so that it could be made freely available for development and internal business operations to use with no time limits.

I’ve been using STS for a while and I recently needed to report a bug against it. But could I find where to do it? No. I searched for a couple of days and eventually had to ask in the forums. So I write this blog to help anyone else who gets lost down the rat runs of confusion between SpringIDE and STS.

The big problem with reporting bugs is where do you go to do it. SpringIDE and Spring Tool Suite are both tightly coupled to Eclipse, they both have JIRA issue trackers, they are both tightly integrated into Spring and they both have Spring personnel on the support team. I suspect that in the long term SpringIDE will die as STS has loads of extra value adds and is considered the standard eclipse plugin.

So to find where to report bugs:

  1. Load your Eclipse environment
  2. In the menus navigate to Help -> About Eclipse
  3. Click the green SpringSource icon, which opens the About Eclipse Feature window
  4. Click the link for the product page: http://springsource.com/products/sts
  5. When the web page loads in click the link for Bug and Enhancement Database in the Related Content section

if it ever disappears again from the Related Content position (like before) then you will have to hunt around for it which was the problem before. So here it is: https://issuetracker.springsource.com/browse/STS

For completeness you can report bugs against SpringIDE here:
http://jira.springframework.org/browse/IDE/

According to Christian Dupuis, who is the Spring bod who looks after the SpringIDE and STS, you can raise JIRA issues on the STS Jira for both SpringIDE and STS.

Using quotes in NSIS

December 18th, 2009

NSIS is an open source installer builder which works under Windows and Unix.

One of the problems with using macros/push/pop is that the quotes can conflict with each other. To avoid this I’ve found that standardising your quoting is important in order to avoid problems especially with nested calls.

The example below shows how a perfectly reasonable piece of NSIS code might unexpectedly not compile. Can you spot the mistake?

Code

Name "NsExec Function Test"
OutFile "nsexecTest.exe"
 
!macro doMessage WHAT
  MessageBox MB_OK '${WHAT}'
!macroend
!define doMessage '!insertmacro doMessage'
 
Section
  ${doMessage} "hello it's me"
SectionEnd

The doMessage is a macro which is substituted and not called, so the translations go thus:

${doMessage} “hello it’s me”

!insertmacro doMessage “hello it’s me”

MessageBox MB_OK ‘hello it’s me’

As you can see we have an invalid call to MessageBox because there are unmatched quotes. In order to overcome this problem the caller must know the nature of the quotes inside the code which is being used, and delimit the quote in such a way that it survives the invocation. In this case we must add an additional backslash which itself must be delimited to survive the first set of parsing. The section must be changed to:

Code

Section
  ${doMessage} "hello it$\'s me"
SectionEnd

so that by the time it gets translated we have:

MessageBox MB_OK ‘hello it\’s me’

Most people use double quotes to surround text because it allows you to use single quotes more easily.

However, there is a big problem if you are using NSIS and Windows. Bill in all his wisdom created DOS which has the most ridiculously complicated syntax when it comes to handling quotes [try typing cmd /? if you don’t believed me!]. Then he said you could have spaces in file names which you can only delimit by wrapping in double quotes.
Anyway what the hell does this have to do with anything? Glad you asked. In order to create an NSIS macro that leads to the ability to run a program under Windows you need to preserve double quotes all the way to the end, which means you can’t use double quotes as a parameter wrapper. So consider this code:

Code

Name "NsExec Function Test"
OutFile "nsexecTest.exe"
 
!macro doAction WHAT
  nsexec::exectolog '${WHAT}'
!macroend
!define doAction'!insertmacro doAction'
 
Section
  ${doAction} '"c:\fc.exe" "c:\some file1" "c:\some file2" > "c:\some file.out"'
SectionEnd

If you standardise your delivery quotes to always be a single quote and wrap out going calls in single quotes you should be able to avoid a lot of the headaches associated with un-terminated quotes.

Using WLAN at home and 3G when out on Nokia N900

December 17th, 2009

I wanted to set up my new Nokia N900 to switch between networks depending on where I was. The mobile operator’s 3G network is a billed limited network with a top speed of about 3Mb/s, whereas at home my broadband is always on, has a top network speed of 50Mbps and is already paid for.

The plan is to set up the phone to use the mobile operator’s 3G network when I was wandering the cursed earth but when I got home (or to a mates house) it would automatically connect me to the local free access point.

  1. From the main application window, select Settings.
  2. Scroll down to the Connectivity section and click Internet Connections.
  3. Use the connection wizard under the Connections button, to define a WLAN connection.
  4. Create as many connections profiles as you like.
  5. After creating the connection profile you will be returned to the Internet Connections menu.
  6. Set Connect automatically to Any connection
  7. Check Switch to WLAN when available.
  8. Click the Save button.

Transferring contacts, calendar and notes from the Nokia N95 to the Nokia N900

December 12th, 2009

I wasn’t looking forward to the arduous job of transferring my contacts, calendar and notes from my old N95 to my new N900. As it turned out it was really easy.

  1. Activate Bluetooth on both phones and make sure they are both visible.
  2. On Nokia N95 press the menu button to take you to the main desktop.
  3. Go into the Applications folder.
  4. From there go into the Welcome application.
  5. Select Switch.
  6. Select the icon from the bottom of the screen to synchronise data in one direction.
  7. Select Bluetooth and follow the instructions.
  8. Once the N95 is happily connected to the N900, it will just transfer across all your information.

It was a wireless - application-less pleasure!