Jesper's Blog

Super FDisk to the rescue

by Jesper 23. July 2009 00:04

Having heard so many good things about SSDs (solid state disks), a few months I decided to try one out on my laptop – a Dell M4400 at the time.
So I got a Patriot Warp v. 3 256GB SSD, backed up the old disk (a standard 7200rpm 250GB disk) and restored it to the new SSD.
This appeared to work very nicely at first (quiet, quick boot etc.), but soon the laptop started taking long breaks where it practically froze, apparently doing some kind of disk activity (as per the HD light).
This might have had something to do with the Intel controller SATA settings and some weird restore partition that the Dell laptop was born with, but I never figured it out and eventually put the original hard disk back in to get some work done. And the SSD ended up in the drawer :-(

Then last week at the local mall I came across this cute little Sony Vaio Z21 laptop – which I just had to have.
It is light (1,5 kgs), great screen (13.1” 1600x900), Core2 Duo 2.53GHz, and 4GB RAM, and looks great too.
The hard disk however was a bit slow - 5400prm standard. So this was a perfect opportunity to try the SSD again.

After a few failed attempts (blue screen of death) at installing Windows 7 RC on the Vaio / SSD, the Windows installer suddenly claimed that the computer had no hard disk at all.
I tried with Windows 7 RC, Vista, several older Windows versions, and various disk partitioning utilities, but none of them recognized the disk anymore.

After a lot of googling, I finally found “Super FDisk” from http://www.ptdd.com/. A free utility delivered as a downloadable ISO image for burning a bootable CD.
Visually it reminded me of the good old Windows 3.1 days, but it worked wonders!
After deleting some weird looking disk partitions using this tool, the SSD appeared to be reborn.
The Windows 7 RC installer now recognized the SSD, and installed flawlessly on the first attempt. I have been running this 3-4 days now as so far it has been great (writing this in Windows Live Writer on the Vaio).

So thanks very much to the Super FDisk people for making (and giving away) this brilliant tool!

Dell M4400
Dell M4400
Patriot Wapr v. 3 256gb
Patriot Warp v. 3 256gb
Vaio Z21
Vaio Z21
Vaio Z21
Vaio Z21

delete

Tags:

Software review

Smart Paster Add-In for VS2008

by Jesper 10. February 2008 17:59

Just noticed that my favorite add-in for VS2005, Smart Paster by Alex Papadimoulis, is now also available for VS2008.

With this add-in you can paste text from the Windows clipboard into the Visual Studio source code editor formatted as a comment, quoted string, or string builder code just by right-clicking and selecting "Paste As..." from the pop-up menu:

This is just a fantastic time saver.

However the VS2008 version of the add-in only came as source code and had no instructions for installing it.
So for anyone else looking for this wonderful add-in, here's the compiled version:
SmartPaster2008bin.zip (27.13 kb)

To install it, un-zip above to:
Vista/2008: C:\Users\<user-name>\Documents\Visual Studio 2008\Addins
Earlier Windows: C:\Documents and Settings\All Users\Shared Documents\Visual Studio 2008\Addins

Then restart Visual Studio 2008 and update settings for the Add-In in the Tools menu / Add-In Manager.

Tags:

.NET | Software development | Software review

Microsoft's Software Licensing and Protection Services (SLPS) - Not for 64 bit

by Jesper 8. November 2007 02:52

I am attending Microsoft's TechEd Developer conference in Barcelona this week (and having a great time).
One of the more interesting things (to me) that Microsoft is showcasing this year is a new product for ISVs called "Software Licensing and Protection Services" or "SLPS".
There has been 2 "breakout sessions" on SLPS, there are signs, flags, and posters advertising SLPS everywhere, and there are more "ask the experts" stands about SLPS than any other single topic here.

SLPS is a very interesting anti-cracking method involving a "unique virtual machine permutation" for each ISV or software title combined with a typical license activation server or service. For details see http://www.microsoft.com/slps

It seemed like a great product for a small ISV like us, and so I spent some time digging into this subject here at TechEd.
Microsoft sells SLPS through various resellers including PreEmptive - who combines this with their DotFuscator product.
PreEmptive also has a stand at the TechEd, and they offer a "challenge" where they add SLPS (and obfuscation) to an existing .NET executable to demonstrate how all this works.

PreEmptive gave me a very nice walk-through using one of the .NET based .EXE modules from our upcoming Simple DNS Plus v. 5.0.
The protected / license wrapped version worked very nicely during the demo on PreEmptive's computer, and following the demo they e-mailed me a copy of this to try on my own computer.
Unfortunately it did not work as well when I downloaded the file to my laptop later that evening - basically it just crashed.

This morning I attended another session about SLPS by Aidan T. Hughes (Development Manager for SLPS at Microsoft), and later in the day got a chance to talk to him personally about this - and show him the application crashing on my laptop.
It turns out that SLPS only works with 32 bit processes!
Since my laptop runs 64 bit Vista, and the .NET application was originally compiled for "Any CPU", it runs as a 64 bit process.
This worked just fine before SLPS was added. But with SLPS it crashes because it cannot load the 32-bit-only SLPS DLLs into the 64 bit process.
Quoting Aidan: "We haven't gotten many requests for 64 bit support, so this is not something we have tested a lot..."
Unfortunately he didn't give me much hope that this would be fixed in the near future - "we will look into this for future versions...".
His only suggestion was to re-compile the application for 32 bit (x86 CPUs).

Unfortunately that is a showstopper for us.
Many of our users have been asking about 64 bit for some time now.
All new CPUs from Intel and AMD are 64 bit capable (both companies have stands at TechEd and I checked with them both) and Microsoft's own flagship product Window Vista comes with both 32 and 64 bit versions in the same box.
So I am surprised that Microsoft would launch this new product without 64 bit support.

That said, I would like to thank the staff at PreEmptive and Microsoft's SLPS group here at TechEd for their great help and personal attention to this.

Tags:

.NET | Conferences | Software development | Software review

Evaluating lightweight database systems

by Jesper 17. June 2007 02:40

I spent the past few days evaluating different embedded database system for possible use in the upcoming Simple DNS Plus v. 5.

Simple DNS Plus v. 5 will be .NET based, so my first requirement was that the database system had a .NET API or data provider.
Ideally it should run on both 32 and 64 bit Windows versions and under MONO on non-Windows systems (Linux, MacOS, Solaris, etc.).
And of course it should be fast and small as possible.

I looked at the following options:

1) Microsoft SQL Server Compact Edition (MS SQL CE).
(http://www.microsoft.com/sql/editions/compact/default.mspx)

At first this looked like the obvious choice since it is practically part of the Visual Studio toolbox (or will be in Visual Studio "Orcas").
However, at this time there is no 64 bit version, which would also prevent Simple DNS Plus from getting certified for Windows Vista (see http://channel9.msdn.com/ShowPost.aspx?PostID=312747).
And from what little information I can find, Microsoft has not committed to a 64 bit version in the "Orcas" timeframe either
(see http://blogs.msdn.com/stevelasker/archive/2007/01/16/sql-server-compact-edition-3-1-released.aspx#1753365)

Of course being win32 code it probably doesn’t run on non-Windows systems.
2) VistaDB
(http://www.vistadb.net)

This database system is a 100% .NET managed code DLL which can be linked directly into another .NET assembly. So this is truly an "embedded" database system.
The same code runs on both 32 and 64 bit – and even on non-Windows systems (under MONO).
The downside is that this is rather slow compared to the other database systems (according to my own simple speed tests), and the documentation is not great.

3) SQLite
(http://www.sqlite.org and http://sqlite.phxsoftware.com)

This was significantly faster than both MS SQL CE and VistaDB.

For .NET development, this is available as a hybrid DLL containing both the native code SQLite engine and the .NET provider.
Because of the included native code, there are separate DLLs for win32, x64, Itanium, and .NET compact which makes the total distribution size significantly larger than the other database engines.

A potential issue is that it has no type safety. Anything can be stored in any column.

I imagine the hybrid DLLs cannot be used on non-Windows systems, but the SQLite engine itself is available for many operating systems and as C source code, so there is probably some way around that…

4) Codebase
(http://www.codebase.com)

About 10 years ago I used this database engine to build a larger invoicing system with VB3 16 bit.
It was VERY fast back then and still is today.
It uses xBase data files which explains the speed (very simple and efficient file layout), but also why the data file becomes very large (data fields are padded to maximum length).
It has a .NET API but is itself native code. I am not sure if it works under MONO.

5) Firebird
(http://www.firebirdsql.org)

I didn’t actually get around to testing this, but wanted to mention it because it looks like another good option.
It has a .NET data provider but is itself native code. I am not sure if it works under MONO.

And the winner is… none!

Basically they were all just overkill for what I needed.
Had I chosen one, it would have been either VistaDB because it best fit my requirements or SQLite because it was very fast.

Instead of a database I ended up using a "homemade" highly optimized proprietary file structure.

A quick comparison of inserting 150.000 random records (representing 150.000 DNS zones):

VistaDB:
2 minutes

MS SQL CE:
1 minute

SQLite:
25 seconds

"Homemade":  
1/3 second (yes, one third of one second)

And the resulting "homemade" file was significantly smaller than any of the database files.

Read more about the "homemade" file structure here...

Tags:

Software development | .NET | Software review

Documenting and packaging the new Simple DNS Plus API

by Jesper 3. February 2007 02:37

We will be releasing a new Simple DNS Plus API for .NET and COM this coming week - watch our company blog/RSS for the announcement.

We were actually pretty close to releasing something very similar for COM about a year ago, but that project was eventually scrapped for several reasons.
Primarily we were stuck with the API documentation because this could not be automated, but around the same time we were also shifting our focus to the .NET platform and therefore knew that we would not maintain this project going forward anyway.

So this time around we wanted automated documentation from the beginning.
The solution turned out to be Microsoft's "Sandcastle" project (see http://www.sandcastledocs.com and https://blogs.msdn.com/sandcastle) along with SandcastleGUI (see http://www.inchl.nl/SandcastleGUI).
This combination makes it real simple to convert XML comments from .NET source code into a real .chm help file and matching web version.
Check out the (preliminary) API documentation at http://www.simpledns.com/apihelp
Sandcastle is still in beta but works pretty good already.

Then it came time to package the first alpha version of the new API.
We have been using InstallShield to build installers in the past, but were not real happy with it and therefore haven't upgraded it for a while.
I thought we were going to be using the deployment functions in Visual Studio 2005 which is much improved compared to earlier Microsoft offerings, but we still ran into some issues.
When distributing software over the Internet, I believe that this should be done with a single self-extracting, self-installing, and signed .exe file.
Unfortunately there is still no way to create such an installer in VS2005.
Luckily the Windows operating system conveniently ships with "IExpress" which can package the install files from VS2005 just like I wanted, and the resulting .exe file can then be signed manually with the SDK tools.
BUT - it turns out that packages created with IExpress on Windows Vista do not work on Windows 2000, and packages created with IExpress on Window XP act weird on Windows Vista...

So it was time to look for alternatives - and I found a great one in "Advanced Installer Professional" (see http://www.advancedinstaller.com).
With this tool it is much simpler to configure the installer project, it can package everything into one .exe, and it can automatically sign it.
And I really like the way it automates downloading of prerequisites such as the .NET Framework.
I highly recommend it! 

Tags:

Simple DNS Plus | Software development | Software review

How to connect to the IPv6 Internet?

by Jesper 12. May 2006 02:34

All indications are that the Internet will move to IPv6 in a not so distant future.
All major operating systems now support the IPv6 protocol, including Linux, BSD, Solaris, and Windows (included with XP SP2 / Vista).

Our friends at www.dnsstuff.com recently started a free service at www.6gate.com to IPv6 enable web-sites running on IPv4 simply by adding a DNS AAAA-record.

Another thing that made me pay attention is that IPv6 is now enabled by default in Microsoft’s .NET Framework 2.0, and fully supported in Visual Studio 2005.
This, for me, finally makes it realistic to start developing for IPv6.

But then how does one actually connect to the IPv6 Internet to begin testing, experimenting, and playing with this?
My local ISP does not offer any IPv6 connectivity yet.
The Windows XP SP2 IPv6 implementation offers a "Teredo" function to tunnel traffic between IPv4 and IPv6. But this appears to require a "Teredo relay" somewhere on the IPv4 Internet, of which I cannot find any...

The 6gate.com service utilizes the services of www.sixxs.net, so had a look at that site and tried out their "10 Easy Steps to IPv6".
This involved a rather complex and lengthy identification and setup process.
After this I had a tunnel to the IPv6 Internet - or at least so the AICCU software claimed.
But my local computer could still not ping any IPv6 addresses.
Unfortunately there were no more instructions beyond the 10 steps.
After randomly reading various FAQs I think that because my computer is behind a NAT router, I would also need to install a "TINC" tunnel driver.
This appeared to be some type of VPN NIC driver (similar to OpenVPN) but I could not find any instructions on how to get this to work with the AICCU software.
So I had to give up on this :-(

After a bit of Googling, I found another IPv6 tunnel system/service at www.hexago.com.

Fortunately this was a breeze to sign up for and setup, and I now have a fully functional IPv6 address and connection. I can ping other IPv6 addresses, and surf IPv6 web-sites etc.

So then it was time to play with Visual Studio 2005, and it didn’t take long before I was sending and receiving DNS packets over IPv6, just by changing a few Winsock parameters. Cool!

Look out for a new IPv6 and IDN enabled version of the Simple DNS Plus DNS Look Up tool soon...

Tags:

Software review

About the author

Jesper G. Høy - Professional software developer & amateur photographer. Lives in Frederikshavn, Denmark. Founder and director of JH Software

Recent posts

Recent comments

Comment RSS

At work

Visual Studio 2010

At play

My Camera

License