Doing Transactions In Oracle Like You Know Them From SQL Server

I know how to do transactions in SQL Server. It is really easy, at least for me. In ORACLE, the keywords are slightly different and you have to use semicolons at the end of each statement. You also have to name your transaction but an empty string will do just fine.

Compare this for yourself:

set transaction name 'mytransaction';
update mytable set somecolumn = 'some value' where id = 22;

begin tran
update mytable set somecolumn = 'some value' where id = 22

Correct Parameters For The BaseFunctoid.SetupResourceAssembly Method

If you are writing your own BizTalk Functoid you have to provide information about your Ressources used to describe your functoid name, details and icon. For this task, you have to call the SetupResourceAssembly function in your functoid constructor. Okay, but what are the correct parameter values? The MSDN article is not only not good but plain wrong.

resAsmName does NOT expect the name of the assembly, but the full qualified name of your resource dictionary.

If your resource is in your Project root folder and is called “Resource.resx” and your project has a default namespace of “My.Company.SuperFunctoid” than you would provide the value “My.Company.SuperFunctoid.Resource” as the value of the first parameter.

The second parameter is the assembly, which contains the resource dictionary. Here you could do Assembly.GetExecutingAssembly() to get it.

To make this more refactoring safe, I would suggest the following call instead:

This way, you can change your default namespace without fear of breaking “magic” strings.

Published my first printed article

I published an article! Cool, isn’t it? You can find it in web&mobile developer issue 01/14 (german). It was an interesting experience writing this article as I was writing about a subject which I am interested in myself for quite some time.

I am describing a way to collect telemetry data from a Windows Phone application and sending them back to a backend service. I am focusing my article around doing this in a decoupled fashion through the usage of Windows Azure ServiceBus Queues. The goal is to get some data to get insights in the way the users use an app like “How long do they run the app?”, “How often do they start the app?” or “Did they used feature x?”.

Writing ‘throw ex;’ is almost always wrong!

So what is the difference between ‘throw ex;’ and ‘throw;’ in C#? The first statement recreates the stack trace while the latter one preserves it. Consider the following method, which will throw an exception if it gets called:

private static void Inner()
    throw new Exception();

And then you have two different methods implementing the two different coding styles:

private static void Rethrow()
    catch (Exception ex)

private static void ThrowEx()
    catch (Exception ex)
        throw ex;

At last, you have a short console application to call both methods and print their stack trace:

static void Main(string[] args)
    catch (Exception ex)
    catch (Exception ex)

Here is the output:


As you can see, ‘throw;’ preserves the actual location, where the exception really was thrown.

There is hardly any case where you want to hide the actual location of an error, so the best is to just use ‘throw;’ as your default in a catch clause.

Things I Learned Today

I decided to just write down the stuff, I learned today in a random order, to let you know and (maybe) let you learn as well!

  • I really like the whisper sync inside the kindle apps and devices and today I learned about Calibre which can do the same thing but with many more devices. It can also convert your ebooks to the appropriate formats.
  • Even if your company uses Subversion for version control, you can still use git locally in a fully Git and Other Systems – Git and Subversion.
  • Does the new XBOX One plays XBOX 360 games? No.

Checklist For Recording Let’s Plays

My new hobby is to make let’s plays myself. Let’s plays are basically recordings of someone playing a video game and commenting on it at the same time. I really like doing it, because it is consuming media and producing content at the same time.

In my first parts, I had a learning curve which let me build up a checklist to avoid doing the same error again in the future:

Preparation before the recording

  • Camera
    • Are all the lights on? The normal webcams make better video images if there is much light around, so switch them on.
    • Do you look great (acceptable)? Many people will see you, so check yourself.
    • What is behind you? If you are not doing green screen, than you should remove everything behind you, which you do not want anyone to see.
  • Audio
    • Are there any noises? Close the windows, disable the ventilation, close the room door, wait until the children are asleep.
    • Is the mic positioning good? Try to place the mic as near to you as possible, but do not breath directly into it. Position your pop filter between you and mic (if you have one).
    • Prevent distractions! Switch off the phone, close Skype, close browser tabs which could make sounds like Facebook. Some pages have advertising with sounds as well and outlook will also receive a mail everytime Zwinkerndes Smiley
  • Setup
    • XSplit: Open it, load the right presentation for the game you are going to play. Test your shortcuts, setup sound volume and check if the correct microphone is selected.
    • The game: Start it!! Load the last save game and remember what has happened in the last part.
    • Setup the timer.

In-between the recording

  • Start the timer and the recording
  • Greet your audience
  • Tell them what has happened and what they should expect in this part but keep it short.
  • Start playing!
  • keep an eye on the timer.
  • When the time is over, find a good spot in your game to make a break and say goodbye to your audience. If you are needy, ask for thumbs up or for subscriptions Zwinkerndes Smiley
  • Wait 3 seconds after your last word and stop the recording

After the recording

  • Re-enable all distractions and open the window again, but do not wake up any children Zwinkerndes Smiley
  • Check whether the recording is appropriate for a public audience. Did someone else speak password or sensitive data? Was your desktop visible? In this case you may want to edit the movie.
  • Upload it to Youtube, but do not worry, it will not be visible right away even if your internet connection is fast.
  • Setup the title, the description and all other metadata of video.
  • Paint the video cover image and upload it to youtube as well
  • Set it to public right away or setup a scheduled release
  • Get yourself a short break and repeat with the next part

If you want to, you can have a look at me play XCOM: Enemy Unknown (german!):

Reconfiguring Raid From Savety To Speed

I was investing in a Synology DS214 lately and put all my valuable data there in a Synology Hybrid Raid and configured a cloud backup for this, so my Raid 5 on my desktop PC was free of stuff and I started to use it to store uncompressed video. While you may noticed my video tutorials, I also do randomly “lets plays” or “watch me play” of whatever game there is. Which is Starcraft 2 most of the time.

I record this videos uncompressed which yields roughly 100GB per hour of gameplay. Before I upload this to YouTube, I compress this using MP4 to 2GB per hour. This is a time consuming process and I noticed, it is limited by the read speed of my drive rather than the CPU or GPU.

I started measuring and got this:
raid 5 read (3x500gb drives)

The configuration at the starting point is a Raid 5 consisting of 3 drives with 500GB each from 2006(!). They are by no means the fastest anymore but the blue line does not show the right form for a drive with spinning disks. So I installed the newest Intel Storage Matrix Driver and measured again the exact same Raid 5:
raid 5 read (3x500gb drives) new driver

This was already an impressive gain so far for only investing 10 minutes :-)

My video recordings are not meant to stay there forever. I record them and I compress them and at this point, I upload the compressed version to YouTube and I store a copy on my NAS. So there is no point for the added data security of a Raid 5 if I only use it for temporary data. So I deleted the Raid 5 and made a Raid 0 configuration with the same 3 drives:
raid 0 read (3x500gb drives) new driver

Impressive! I could now use 1500GB instead of only 1000GB to store video data and the speed was much faster. I had another 500GB drive laying around, doing nothing, so I figured, why not adding it to the raid as well. So I added it to the system and expanded the Raid to 4 drives:
raid 0 read (4x500gb drives) new driver

The avarage read speed increased another 10MB/s. This is not as much as I would liked but the drive would otherwise do nothing, so why not leave it that way and I still have the added storage space.

Just for comparison, I measured my system disk (SSD) and another newer WD Red 3TB as well:
samsung ssd 830 256gb single drive wd red 3tb single drive

So even considering sequential reads, the SSD is clearly outperforming all of my other drives:

So I think, I did the best to increase performance for my use case without buying new stuff.

But remember to think about data safety, if you do this your own! On Raid 5, one drive can fail and all your data are still there. On Raid 0, all your data are gone when (not if!) the first drive fails.

Windows 8.1 could not be installed (0×101 – 0×20017)

I installed Windows 8.1 (Enterprise) as an update on my corporate notebook and was greeted with this error after the first reboot in the install process:Windows 8.1 could not be installed (0x101 - 0x20017)

Then it reboots again and you are back to your Windows 8 without the dot one!

I have a full encrypted system partition using TrueCrypt and this was the problem in my case. I took a wild guess on this and decrypted the drive. Then I updated to Windows 8.1 and this time it worked flawlessly. After the update I encrypted the drive again.

Issue solved :-)

My latest video tutorials on youtube

I decided to try to make some video tutorials about software stuff and I created the first three ones already! Apperently, I decided to do them in German, so you may have a hard time to follow them, if you cannot understand German.

All videos have hand-written closed captions and the last one also has hand-translated englisch captions.

As I disabled comments on this blog, I kindly ask you to tell me, what you think either via email (see Impressums page) or via youtube comments.

It is fun watching myself to grow my presentation skills with every video Smiley