Free Succinctly book series from Syncfusion

Lately Syncfusion started producing e-books grouped under Succinctly series. The books are for developers on (mostly) Microsoft platform and are a free download albeit registration is required. I’ve peeked into few of them and I have to say I like them.

They won’t replace commercial n-hundred pages long developer books though but they provide you an introduction, the basics of the topic and serve as quick reference. So it is worth checking them out and kudos to Syncfusion.

An exotic DevEx’ ReportDesigner breaking change in 12.2

If you ever customized (excellent) DevExpress ReportDesigner you might have used this line of code to obtain a reference to IDataSourceCollectionProvider within ReportDesigner class which allows to access field list:

IDataSourceCollectionProvider dataSourceCollectionProvider = 
    as IDataSourceCollectionProvider;

This code worked well in 12.1 and perhaps in earlier 12.2 versions but it certainly won’t work in 12.2.5. The bad part is that it fails in runtime, while it still compiles perfectly. At least it fails consistently – always. The reason is that access to various services (IDataSourceCollectionProvider is one of them) is now through ReportDesigner.GetService(Type serviceType) method. Replacing the part above with the one below does the trick:

IDataSourceCollectionProvider dataSourceCollectionProvider = 

The new is more readable and it could be even better if it used generics. I’d certainly consider this declaration instead:

T GetService<T>()
  where T: class

which would yield even more readable assignment:

IDataSourceCollectionProvider dataSourceCollectionProvider = 

There you have the fix.

Just developing for Windows 8 Store gives your privacy a funeral

I was poking around with excellent MonoGame framework by creating a simple game, or better, starting to create a simple game. So far I’ve spent a day to build some infrastructure from scratch and I am able to show a main screen with simple menu items. Nothing really ground-breaking.

The aspect I am most interested right now is cross platform development with MonoGame. Hence my simple game is built with cross platform support from beginning. Main development target is Windows 7 x64 because it is the easiest to debug the application on. I’ve ported the game successfully to Android as well by using Mono For Android – tested on both emulator and my Google Nexus phone. Port means just creating a bootstraper (an Android app that launches the game within an activity) and linking the sources to Mono For Android projects (here Project Linker comes to great help, though shame that Microsoft Patterns And Practices team seemingly abandoned it).



Windows Phone 8 emulator requirements are insane

Next I wanted to port it to Windows Phone 8 since its SDK is fresh from the oven and MonoGame supports it (not sure at what stage the support is). However, Windows Phone 8 SDK emulator requirements are just too much: Visual Studio 2012, Windows 8 Pro, 4GB RAM, and CPU with SLAT support to run the emulator which in turn runs on Hyper-V. I don’t have a Windows Phone 8 device so I wanted to give the emulator a test run. I have Windows 8 Pro on my laptop but, albeit perfectly functional, the CPU doesn’t feature SLAT. SLAT is required by Hyper-V on client versions of Windows 8. The interesting fact is that VMWare Workstation runs perfectly well without or with SLAT. Be also aware that VMWare Workstation and Hyper-V on Windows 8 won't coexist peacefully - Workstation will work only when Hyper-V feature isn't present. The bottom line is that the Windows Phone 8 emulator won’t run on my laptop. I could run it on my workstation but I haven’t migrated to Windows 8 at this time.

Windows 8 development license isn’t something for privacy consciousness

Next I wanted to run a Metro aka Windows Store Apps version of my game. Those should run just fine on my laptop. I started by creating a new Windows Store application and Visual Studio 2012 immediately notified me that I need a developer license for Windows 8 which is free. But reading its privacy statement made me wonder.

When you request a developer license, Microsoft collects information about your PC and the apps installed on it. This information includes your PC’s name, manufacturer, and model; your IP address; a unique identifier generated based on your PC’s hardware configuration; and the edition of Windows you’re using.
Microsoft may access or disclose information about you, including the content of your communications, in order to: (a) comply with the law or respond to lawful requests or legal process; (b) protect the rights or property of Microsoft or our customers, including the enforcement of our agreements or policies governing your use of the services; or (c) act on a good faith belief that such access or disclosure is necessary to protect the personal safety of Microsoft employees, customers, or the public. We may also disclose personal information as part of a corporate transaction such as a merger or sale of assets.

Remember, I wanted to test my game locally. And for that I’d need to send all sort of data to Microsoft? What the heck? Furthermore those legal obligations are really flexible. Not that I have anything to hide or against Microsoft but still why do I have to disclose installed applications on my computer and such? Note that I wouldn’t send my data to any company just to test an application on the local machine. So, for the time being, I will skip Windows Store App version as well.

Progress so far:

  • Windows Desktop [checked]
  • Android [checked]
  • Windows Phone 8 [unknown]
  • Windows Store App [unknown]
  • Windows Phone 7 [unknown,soon]

There is only one platform left to try – Windows Phone 7 where I don’t foresee any problems, just didn’t have time yet.

Getting proper OpenGL driver for older AMD(ex. ATI) graphics cards on Windows 8

I have a not so new laptop that features ATI Radeon HD 3650 Mobility graphics cards. Which is quite fine for the usual tasks. According to AMD website it features OpenGL 3.2 which is, again, good enough. Nothing spectacular but fine.

Lately I’ve upgraded it to a SSD disk and at the same time I did a fresh Windows 8 install (previously it was Windows 7). Everything worked out very well. The laptop is usable again and quite fast now. Yesterday I tried to experiment with MonoGame, an open source implementation of, now legacy, XNA Framework – the framework that was supposed to run everywhere but Microsoft ditched it for some reason. Anyway, I’ve tried to run a sample MonoGame application and immediately faced a problem. First it was throwing an exception that OpenAL.dll is missing. Odd. I’ve found a standalone installation for OpenAL but the I run into another, more descriptive problem, something like: can’t find entry point for ‘glBindFramebuffer’ in OpenGL32.dll. That basically says that I had a pre-OpenGL 2.0 installed (MonoGame uses OpenTK which in turn requires minimum 2.0 version of OpenGL). How is that possible?

From what I understand the situation is that AMD isn’t supporting the Radeon Mobility HD 3xxx with Windows 8 and hence it doesn’t provide OpenGL drivers. So everything falls back to Microsoft provided OpenGL 1.1. That is nicely shown using GPU Caps Viewer application. This is ever more surprising because we had proper OpenGL drivers for it under Windows 7. If it was a desktop machine I’d consider changing the graphics card but that’s just not possible on the laptop. And I wasn’t quite happy to buy a newer laptop just for that, even more so because my laptop is doing just fine.

The solution

The solution is to install the latest drivers for Windows 7 manually. It is actually quick, easy and it works. You’ll find the procedure in Make Your Old Graphics Drivers Work in Windows 8article on Lockergnome. The only differences from article are that just right clicking on INF file doesn’t work nor the INF file is named exactly like the one in the article – it has higher number, probably because it is a newer one. Instead of the right click->install, which didn’t work, I had to go to Computer->right click->Manage->Device Manager->Display adapters->ATI Mobility Radeon HD 3650->right click->Properties->Driver->Update Driver->Browser my computer for driver software->Let me pick from a list of device drivers on my computer->Select proper INF file.

And voila – now I have OpenGL 3.3 support and MonoGame runs like a charm. Happy OpenGLing!

SSD’s firmware version might be really important

I had a good old Asus EEE 1005HA netbook running Windows 7 just fine, albeit slow. The best way of speed it up was to upgrade it to a SSD. The I/O difference should speed it up considerably as the original disk was a 5400rpm one. The SSD prices are low enough, too.

So I went and bought a small, reasonably priced OCZ Vertex Plush 60GB SSD. The disk replacement process isn’t a very simple one because the disk is buried in the guts of the netbook. See one and two (there are more videos, just google them) and be careful with the connectors as they are really fragile.

I’ve replaced the disk, put everything back together and then booted Windows 8 x86 from an USB stick (the easiest way to burn an ISO to an USB stick is to use Windows 7 USB/DVD Download tool). Everything went smooth until Windows finalized the setup. Bam. I’ve got an “Windows couldn’t configure hardware on this device” error (very helpful description, isn’t it). After restart the computer didn’t boot but rather complained about missing boot disk. Huh? That’s odd and when Windows install fails it has to do with hardware issues usually – this time it hinted some sort of problems related to the SSD. Perhaps the problem lies in the Intel Atom CPU or something other on my netbook. Hence I’ve tried installing Windows 7 x86 as I knew it works. Bam. The same error. Changing BIOS settings didn’t help either. Same error over and over again. I’ve also got odd errors during partition management. BTW I’d really like to know which genius at Microsoft thought of requiring the Windows license key before OS is installed (yes, yes, you have to retype it each try you make, very annoying in such cases). Just for fun I tried installing Ubuntu and, surprisingly, I had no problems and everything was really smooth. At this point I was tempted to leave it with Ubuntu but I had other requirements and had to have Windows.

Then I started googling around if somebody experienced similar problem and after a while I’ve come to a forum thread where they mentioned very faulty OCZ Vertex Plus firmware. According to that thread older (than the latest 3.55) firmware versions have fatal issues with Windows. Only the latest and newest 3.55 should work. Coming from HDD world I never thought that a disk firmware could create such havoc but it fitted the description of my problems. Note that there is no easy way to check the disk’s firmware version without the OS installed (and even then). Anyway, there is an ISO you have to burn to a CD and boot computer from there (beforehand make sure the SSD is in IDE, not AHCI mode). The ISO is linux based and you’d need an utility to burn it to USB stick (netbooks don’t have CD drives usually). Free UNetbootin does the work just fine.

Once I’ve booted from firmware upgrade USB stick I discovered that my SSD was running firmware version 3.50. Bingo. Update went smoothly and after yet another Windows 8 reinstall everything worked as it should.

Sometimes (Visual Studio) error messages are just misleading

Take into account this code

    () =>
        throw new Exception();
        t =>

Which results in following error:

error CS1593: Delegate 'System.Action<System.Threading.Tasks.Task,object>' does not take 1 arguments

If I use an overload that takes TaskContinuationOptions.OnlyOnFaulted instead of TaskScheduler.FromCurrentSynchronizationContext it just works. There are two overloads (among twenty of them) of ContinueWith:

public Task ContinueWith(Action<Task> continuationAction, TaskContinuationOptions continuationOptions);
public Task ContinueWith(Action<Task> continuationAction, TaskScheduler scheduler);

So, why does the later work and the former doesn’t? Can you guess without reading on?

The explanation is really simple - TaskScheduler.FromCurrentSynchronizationContext is not a property but a method and thus it should be used like TaskScheduler.FromCurrentSynchronizationContext(). Once brackets are in place it works. Rookie mistake.

However the C# compiler’s error message is misleading in this case. Instead of reporting that FromCurrentSynchronizationContext is a method and not a property it yields “can’t find proper overloaded method”. At least it could yield both errors.

Righthand Dataset Debugger Visualizer updated to 1.0.8

Here is the list of what’s have been added/changed in 1.0.8.:

  • Fixed Next Change, Next Error
  • Added contextual menu features on row right click: Delete/Remove row, Accept/Reject row changes, Clear row errors
  • Fixed original value showing (it could appear multiple times)
  • Added a bunch of columns in table list (Errors count, Changed rows count, Rows count, Added rows count, Modified rows count, Deleted rows count). Errors and Changed count are background-lit when non zero to emphasize errors and change presence
  • Renamed File/Commit and Exit to Persist and Exit to avoid confusion (this item persists changes back to the data owner - your application being debugged)
  • A message box warning when closing visualizer when changes are present
  • Empty table's name is gray in table list
  • Added tooltip on column header showing column's name, caption, datatype, defaultvalue and whether it is nullable
  • Grouping now works on RowState

Go, grab v1.0.8 from dedicated page and visit forums as well.

Intel Smart Response Technology and not so smart UI technology

Due to some recent BSODs on my system where I couldn’t find out the source of the problems I’ve opted for a simple solution of replacing CPU, motherboard and RAM. I am not a huge believer in SSDs due to their problems (pricey, not exactly super reliable) but still, I decided to go with a SSD used for caching purposes – small and relatively inexpensive SSD required.

Currently I am running a pair of WD Velociraptor disks in a RAID array and a pair of Seagate’s 1.5TB disks in the second RAID array both controlled by Intel Rapid Storage Technology (IRST). On each of the RAID arrays I have two volumes – one in RAID 0 and the other in RAID 1 configuration (I use the zeros for speed and non critical data – mixing RAID modes on the same array is courtesy of IRST driver). SSD caching would improve the read time while I would keep the RAID benefits. The only downside to this approach is SSD wear time, but time will tell.

There are basically two SSD caching options I am aware of – either a SSD with bundled Dataplex caching software or motherboard that supports Intel Smart Response Technology (ISRT). Mind though they are both purely software solutions. Well, Intel is Intel and ISRT supports RAID arrays (probably just the ones based on their Rapid Storage Technology which I am using). One of the few motherboards supporting ISRT is Gigabyte Z68XP-UD3 (there is even Z68XP-UD3-iSSD version with Intel 311 20GB SSD (<- Intel’s recommended SSD for caching) on the mainboard). However the later is hard to find in my country so I went with the former. ISRT is limited to max 64GB SSD size and thus I bought an OCZ Vertex 3 60GB SSD.

With all pieces at my disposal I built new hardware configuration, properly attached SSD to a shiny SATA III port, installed the EZ Smart Response drivers that come with motherboard (ISRT drivers are not downloadable from Intel’s Download Center for some reason) and restarted the computer. Once rebooted I went into Rapid Storage Technology control center (where ISRT UI feature is supposed to live) and nothing. No such option, nada.


There was no sign of Acceleration options. Nothing. Huh? EZ Smart Response drivers installed a shortcut in Start/Programs menu. Tried clicking that and received a very useless dialog box stating:

This hard drive can't be supported.

Whoa, what hard drive and why?

Updating motherboard BIOS to the latest F10 version didn’t produce results. At this point I turned to my best friend Google search but found no solutions nor explanations, just a bunch of people with similar problem. Since my friend failed (which is a rare occasion) I even read the instructions that came with motherboard – ISRT has its own booklet. Nothing. I suspected a problem with caching RAID arrays. Thus I quickly thrown in a blank disk as a standalone one thinking that it should le me cache at least this standalone one, restarted and … still nothing.

While poking in BIOS RAID settings I received warning “max number of  arrays created” or something like that. Hm, can it be that caching requires a volume on its own? Next step, since the second RAID array isn’t critical to the boot process I simply detached both Seagate’s and restarted. Booting the system with a single RAID array and a standalone disk finally produced some results. This time the acceleration option magically appeared for the standalone disk but not for the RAID array. But hey, that’s some progress and I was happy to see acceleration option. It is supposed to cache RAID arrays as well, why doesn’t it?

There was one option remaining. I had a suspicion that what was causing the missing caching option was the fact that I had two volumes (RAID 0, RAID 1) on the same array. Next step was elimination of the RAID 0 volume and leaving a single RAID 1 volume on the array (I resized the partitions extremely easily using Acronis Disk Director Suite). Rebooting, crossing fingers, and … a disappointment. Still couldn’t enable caching of the RAID array. However something else was going on at this point. Once during my many reboots I had to force the reboot using the hardware button. As a consequence IRST went into RAID array verification mode – a normal procedure, which takes some time. I just left it do its job and once RAID array was verified – success! The caching option just appeared for the RAID volume out of blue sky. Few more clicks and my boot RAID volume was SSD cached.

Once cache is enabled the system becomes much faster of course, well, the loading from disk is faster. It might be significant or not, depends on your typical work scenario. I don’t often start new programs thus the benefits aren’t stellar in my case but speeding things up doesn’t hurt, eh.

The bottom line

  1. Intel Smart Response Technology user interface is bad beyond explanation (the same goes to IRST). Instead of telling me why it can’t enable caching on a volume the options are just missing. And if it starts doing this right after installation one is left to wonder what’s wrong, where is the problem and whether the thing even works. Much much better approach would be to have acceleration option always present with a clear explanation in the case of the problem.
  2. Intel Smart Response Technology documentation is poor as well.
  3. If it doesn’t work is either because you reached the maximum RAID volume number (4 in my case), because IRST is doing RAID array verification or because there is more than one volume on the array.
  4. Once it works it speeds things considerably up. I am using read-only cache mode at this point (there is maximized mode that features caching writes as well)
  5. It produces near-pure-SSD experience for considerably less price.
  6. The caching algorithm is a black box and cache utilization and other metrics aren’t exposed thus I have no idea what it does and how it does.
  7. SSD might wear off sooner, no idea on this, time will tell.

Hope this will help others venturing into Intel Smart Response Technology. You know, the brave fools Smile