A Bit Annoying

Illustration

As my kid started with school I felt more and more pressure to get a printer. Since I am here temporary and carrying printer across ocean is not my sport, only choice was cheap inkjet. Few twenties later I had my Brother MFC-J435W. Nice multi-functional device with separate ink cartridge for each color (CMYK).

With inkjets one always needs to be aware of ink level since those things can drink a lot. Therefore almost all have some sort of warning when ink gets low. Brother moves that to completely new level.

Already at 50% it starts complaining about ink getting too low. Since this is probably time to get a new cartridge, simple notice is probably in order. But this annoying window just keeps on popping at every boot, at every print, and few times for no apparent reason. And all that while I am still at 50% capacity. WTF?

Yes, I do expect printer to warn me once it is low. But being at 50% is nowhere low. And aggressiveness of these warnings can lead me only to conclusion that someone was on speed while writing this code. I propose getting him into rehab and forcing him to use printer with all these popups.

Frankly, this printer could do without this warning completely. It has nice display just above paper output and there (when ink is low) you can see warning too. And it is big yellow exclamation mark that is hard to miss. Perfect and unobtrusive solution. I am not sure who needs this software solution at all.

And this is not only beef I have with this printer. I went ahead and upgraded its firmware few nights ago. During WHOLE procedure printer kept beeping few times a second. Not because of error but because some smartass though it to be nice touch.

Quite often software actually works better if you skip a “feature” or two.

QText 3.30

QText screen

One feature that was survived unchanged through versions and versions of QText was search. You could search only within current tab and that’s all you could do. Even when folders got added search was still limited to single file.

Well, not anymore. Finally you can search across all folders and files. Or you can limit search to current folder only. Choice is yours. Only real limit is searching through encrypted files which is not supported for security reasons. For them search will work only when you have them currently open (and thus decrypted).

Happy searching.

ListView Iterations

If there is need to iterate through ListView items, I often see following code:

foreach (var item in listView1.Items) {
    var itemX = (ListViewItem)item;
    //do something with itemX
}

Unfortunately C# compiler is not smart enough to notice that item is actually ListViewItem so it keeps it as Object. And thus we need to cast it to our desired type.

Well, actually there is no need to do this. One just needs to remember live before implicit typing with var came:

foreach (ListViewItem item in listView1.Items) {
    //do something with item
}

This still works and it definitely looks nicer.

SQL Access Denied

Illustration

As I did forced reinstall of my development environment I decided to move all my SQL Server databases to virtual disk. It seemed like a good choice, especially since I formatted virtual disk as exFAT. Since I have dual boot that means that I can use same database from both machines without dealing with all that pesky security.

Well, I was wrong. First message that greeted me was dreadful Access Denied. SQL Server would not attach, create or otherwise do anything with anything on that drive.

I’ll skip some debugging and head smacking and present you only with result: In services find SQL Server instance and change Log on as property to Local System account instead default of Network Service. That will allow it access your attached virtual disk.

Security-wise Network Service is much better account for hosting SQL Server. And in production I would definitely go with either it or separate account only for SQL Server. However, having SQL Server running as Local Service is convenient and good enough for development environment.

P.S. Once you attach database, you can switch back to Network Service account. It seems that error appears only on initial attach.

SQL Server 2012 Fun

Illustration

On clean installation of Windows 8 I had issues with Visual Studio 2012 being completely broken. Almost every day I had to deal with following messages (just an excerpt):

  • The 'Microsoft.VisualStudio.Editor.Implementation.EditorPackage' package did not load correctly.
  • The 'Microsoft.VisualStudio.TestTools.TestCaseManagement.QualityToolsPackage, Microsoft.VisualStudio.QualityTools.TestCaseManagement, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' package did not load correctly.
  • The 'Windows Forms Designer Package' package did not load correctly.
  • The 'Code Analysis Package' package did not load correctly.
  • Internal error occurred. Additional information: ''.
  • NoWarn: Configuration system failed to initialize

I blamed Windows 8 and it is probably best for all that I never killed anybody given how close I live to Microsoft headquarters.

I was wrong.

I installed clean Windows 7 and same problems started again. Visual Studio would work for a while and then it would stop. Repair would fix everything but things would break soon enough. To make things more confusing, another (virtual boot) Windows 7 installation on same machine had Visual Studio 2012 that had no issues at all. So I went into task of comparing everything.

To keep long story short, I found one major difference. I had Visual Studio 2010 installed there. And, by magic, it prevented errors in Visual Studio 2012. And then I remembered that every time something went wrong SQL Server 2012 was just around corner smiling from within its Visual Studio 2010 shell.

For some reason SQL Server 2012 kept destroying Visual Studio 2012 environment. I saw simple solution - just install Visual Studio 2010 side-by-side and problems will go away. Or even simpler one - just remove SQL Server 2012 altogether and go back to SQL Server 2008 R2.

SQL Server team is my newest hate target these days. Not because of this VS 2010 shell issue but because they make uninstall extremely annoying. It consists of at least 15 different components (approximate figure, I was to annoyed to count) and I can only compare procedure to removing malware. And that is broken for quite a few versions now. If they can make single installer, why is single uninstaller impossible task?