Benchmark of Rebuild using Seagate Momentus XT

19. August 2010

I recently bought a hybrid 7200rpms, 500GB(4GB SSD) Seagate Momentus XT hard drive to replace my old 7200rpms, 250GB Seagate Momentus. The XT version comes with a integrated 4GB SSD drive, which is used as a “buffer” between the mechanical storage and the SATA interface, meaning that commonly used files are placed on the faster SSD instead of the slower mechanical disk.

Before I replaced the old Momentus disk in my laptop, I used Visual Studio 2008’s compiler to tests the old disk’s performance when compiling one of SKOVs C# solutions. I did the same benchmark afterwards, on my new XT disk, and I did a “rebuild race” against my SKOV developer laptop. The results are as follow:

My Laptop(old disk) vs My Laptop(new disk):

  1. 1:05 vs 0:44 speedup: 1.47
  2. 1:02 vs 0:38 speedup: 1.71

SKOV Laptop vs My Laptop(new disk)

  1. 1:03 vs 0:35 speedup: 1.80
  2. 0:53 vs 0:38 speedup: 1.39
  3. 0:55 vs 0:32 speedup: 1.71


Note: I did a clean before each rebuild.

The Seagate Momentus XT delivers a speedup of 39-80% which I think is pretty impressive. Thus, in the worst and best case, the XT decreased the build time by 28% and 44% respectively, which will surely help with my productivity.

If anyone have benchmarking figures when compiling using Visual Studio combined with a high performance SSD, let me know as I am interested in the potential gain of using SSDs.

Misc , , , , , , , ,

Pretty Tooltips with WinForms

1. August 2010

For the current project at SKOV, I was in need of a tooltip window that can show a lot of textual information.

Apart from this requirement, the tooltip should support a gradient background, have round borders, be semi transparent and cast a soft shadow. To achieve this, one must use alpha blending to "softly" blend the border, the shadow and the transparency to the underlying surface.

WinForms have by default support for alpha blending on a drawing surface, e.g. a Form, so drawing a semi transparent gradient tooltip that casts a soft shadow is no problem. However, blending the tooltip on top of another window, such as the desktop or an underlying Window is rather troublesome, as WinForms apparently has no direct support for this. Instead one must rely on native Win32 to achieve this, using layered windows which were introduced in Windows 2000, as described in this MSDN post: http://msdn.microsoft.com/en-us/library/ms997507.aspx.

I have implemented the stuff described in the MSDN post, and made a quick test application showing the effect. The tooltip is drawn as a rectangle with round corners with a 2 pixel border. A soft shadow is also drawn.

image

The procedure (simplified) is as follows:

  1. Apply the WS_EX_LAYERED style to the Window, to make it a Layered Window.
  2. Create a 32bit Argb bitmap which encompasses the whole Window including shadow.
  3. Set the alpha value of the border and background colors to the desired opacity value.
  4. Draw the shadow, background and border to to the bitmap.
  5. Draw the content, e.g. text showing the mouse position.
  6. Create a compatible device context (DC) and copy the bitmap to it.
  7. Call UpdateLayeredWindow with the DC, blending mode, etc. as arguments.

 

I have included a demo project, with C# code, showing the tooltip in action.  Anyone is free to use the code as they see fit.

The demo project can be downloaded from here: APrettyTooltip 1.0.zip (43.11 kb)

Enjoy!

Programming in General , , , , , , , , ,

SimpleDownloadCounter 1.1

20. July 2010

I was looking for a simple way to count the number of file downloads on my blog, and stumbled upon SimpleDownloadCounter written by Al Nyveld (http://www.nyveldt.com/blog). The extension simply counts the number of downloads per uploaded file. The download count is only shown when logged in.

The extension did not initially work for BlogEngine 1.6.1.0, but with a little tinkering I got it to work just fine. 

I have uploaded the fixed version here (revision 1.1), enjoy!

SimpleDownloadCounter.cs (5.15 kb)

Misc , , ,

My HRUP Theme 1.0 Released

9. July 2010

My theme, dubbed “HRUP”, is now available for download.

The zip file contains the CSS file, the Master Page, etc. but I have also included a Photoshop file of my banner and the font used. You may edit the banner.psd file and produce a similar looking banner.

The theme comes with no license what so ever, so anyone is free to edit and redistribute as they see fit!

The theme can be downloaded from here: HRUP_Theme_1.0.zip (180.68 kb)

Enjoy!

 

Misc , ,

Summer Vacation With a New Theme

6. July 2010

Finally, 8th semester of my Software Engineering study is over and I can look forward to two months of "Vacation", except that I will be working at SKOV for roughly 6 weeks. Anyhow, I just had 5 days of vacation where I decided to update the look of my website as you can see. 

I created the theme based upon  different icons and graphical stuff that I could find on the Internet. The theme is not 100% complete yet, I still need to fix the smilies (they were made for a white background and look terrible on my darkish background).

Anyway, I am very satisfied with the current look and I intend to release the theme when I am done. 

News

CppUnitLite - a simple unit testing framework

9. April 2010

I am currently implementing a ray tracer for Windows Mobile 6.0 that we intend to use for our semester project. Our semester project deals with Distributed Rendering on Mobile Devices, using ray tracing. 

We have chosen to follow the Test Driven Development (TDD) method where test cases are written before the actual coding begins. TDD "requires" that we employ some form of automated testing framework to automatically run tests to verify the test cases. As we are using C++, we have a multitude of choices with regard to the Unit testing framework.

I have come across CppUnitLite which is a very simple unit testing framework for C++, without any fancy features (a comparison of different frameworks can be found here: http://gamesfromwithin.com/exploring-the-c-unit-testing-framework-jungle)

Simply put, CppUnitLite allows one to fast and easily write unit tests, though not very object orientated (not a always a bad thing) as the example shows:

TEST (GetLength_0_1,Block)
{
    Block block = Block(0,0,100,100);
    CHECK(block.GetLength() == 10000);
}

The TEST macro is used to denote a unit test. The macro takes two arguments, the name of the test and the category of the test. In the example above, I have a Block class which has a GetLength method. The CHECK macro allows assertions to be made, e.g. to assert that the given Block has the length of 10000.

If any of the assertions fail, the console will tell me at exactly what line the assertion failed. This even works on Windows Mobile 6.0, as long as a debugger is attached to the device where the unit testing framework is running.

Programming in General ,

Dynamic disks in Windows 7

1. April 2010

Windows 7 allows one to convert multiple basic disks into dynamic disks, either as a mirroring configuration or a striping configuration.

As I just received a subset of the ordered parts for my new server, specifically, the two Samsung 250 GB harddrives and the Antec Mini Skeleton ITX case, I tried to use the two hard drives in a software raid-1 "mirror" configuration, to avoid the "total" data loss that I experienced last week. 

Simply put, I installed Windows 7 on one of the disks and converted the two disks into dynamic disk using the mirror setting. However, it appears that Windows 7 cannot boot from a dynamic disk!?!?!?! this results in the booting process hangs with a "blinking" cursor on a black screen.

I have yet to find a solution to this problem, so be sure to backup your data before messing with dynamic disks as the process of converting a dynamic disk back to a basic disk results in total data loss(for me atleast).  

 

Misc , , ,

New server ordered

27. March 2010

I have just ordered a new server for my website (and other stuff that needs hosting)

The server will feature a ITX motherboard, specifically, the D510 NM10 from ASUS. The D510 comes with a dual-core ATOM processor which should be enough for my needs.

For storage, I have ordered 2x 250GB Samsung 2.5 inch hard drives. I intend to use Windows 7's raid feature and mirror the drives to increase the reliability of the server. I have also ordered an external 250GB Samsung disk that will be used primarily for backup purposes. I intend to perform automatic daily and weekly backups to this disk.

Also, I intend to order a 1TB NAS drive to store all my non-essential stuff, and, as a secondary backup solution. However, I have yet to find the right NAS drive for my purposes, any recommendations?

Last but not least, I have ordered an Antec Skeleton case (for ITX), which is and open case (plenty of air) and features a 150mm fan and should be pretty noiseless.

skeleton_quarter_400 
I should receive all my "stuff" in about 10-14 days.

News , , ,

Hard Crash! -> New Website!

25. March 2010

My web server crashed yesterday, the hard drive died, and I have pretty much lost everything from my old website. Therefore, I've decided to rebuild my website on a new, and hopefully, more reliable web server.

I have only managed to save around 10% of my old projects and have therefore lost alot of work. However, I intend to create a "R.I.P" section with the projects that have been lost in the hard disk crash.

Anyway, I have decided to use BlogEngine.NET as the base for my new website as it appears to be a very flexible solution.

The blog is currently hosted on my Media Center, so don't expect 100% uptime.

News ,

SilverKeeper - Dungeon Keeper remake

1. March 2009

I recovered the original blog of my SilverKeeper project from google. 
The source for the game was released to the public when I published this blog. If anyone has the source, please drop me an e-mail.

*2009-03-01*

I was fooling around with a simple isometric projection algorithm and decided to implement it in Silverlight. Things escalated and I ended up creating a Dungeon Keeper inspired game, using a 3/2 isometric angle.

My project is dubbed SilverKeeper *very original*. Current features include:

- Support for 100x100 tile maps.
- Creatures moving around, doing *stuff*.
- Basic combat.
- Imps creating paths through dirt and mining gold.
- Imps claiming and reinforcing walls.
- Basic support for rooms.

I've used some hacks to overcome some of the limitations of the Silverlight platform. E.g. there is no way to darken an Image, so instead I put a completely black version of the Image, ontop of the original image, which is then opaque depending on the light level. Also, since I have no direct control of paint ordering of the images(apart from z-ordering which can give alot of problems with alot of UIElements), I use multiple canvases.

One for the top, one for the middle and one for the ground.

Items and monsters are added to the middle while the tile images are spread over multiple canvases.

I originally included sound support, but I experienced some memory leaks when playing sound files. So it's currently disabled. Most of the artwork is not mine - I've used google images to gather sprites, textures, etc. Some of the sprites are from the Golden Axe games, YEEEAH!.

 

R.I.P