Tigraine
Daniel Hoelbling talks about .NET

The modern age of printing!

January 31st, 2008 . by Daniel Hölbling

killepson Tomorrow is an important exam on computer organization and design and I was learning. We are allowed to use our records during the exam, so I went through the whole bunch of documentation our professor supplied and searched for helpful stuff I could carry with me tomorrow. Obviously, taking 150 pages of notes with you won’t help so I got down to about 25 pages with some meaningful information on them.

So, usually I’d just hit CTRL + P on any page that I think is worth it and print that one page out.
But: Epson managed to totally screw up their drivers (for any OS) so I finally ended up printing everything to XPS, copying it over to the machine where my printer is installed and printing it out manually!
Yes, right: I physically went to another computer that’s interconnected through a 100mbit Ethernet to print out 25 pages! (Am I the only one feeling like stone age here?)

Read the rest of this entry »


Live Writer and it’s transparency

January 30th, 2008 . by Daniel Hölbling

Since I got my 24" HP monitor I really started to fancy the new Vista Aero glass effects that let my desktop shine through borders and stuff.
Although I usually stockpile window upon window, that little blur effect on the windows is something I definitely like about Vista.

Due to all this common Vista look’n'feel I never really noticed that Windows Live Writer is a .NET 2.0 application using Windows Forms AND (&&) having a transparency effect on it’s splash screen!

Windows Live Writer

So, why this never came to my mind is something I don’t know, but today I closed a background window while starting up WLW and found out that my desktop and the WLW splash where out of sync.

Basically, Windows Live Writer has no transparency of it’s own. It just takes a screenshot and handles the transparency effect in it’s form.
If the screen behind WLW splash is changing, changes don’t reflect onto the slash page (as they do in Vista aero).

Funny stuff, but definitely something I’d keep in mind when it gets to fancy looks on pre-WPF projects.


Buying yourself an Apple

January 28th, 2008 . by Daniel Hölbling

iDontcare

Did you snicker when you first saw this picture above? If not you are either one of the blessed people out there who don’t know Apple or one of those ignorant’s who will flame anybody who doesn’t think "the Apple way"®.
Personally I think most of my readers will be neither nor.

First things first: My brother wants to buy an iPod.
And, as much as I would love to talk him out of it, I can’t.
I simply can’t because there is no other device currently available in Austria except for the iPod.

Ok, now you know I hate Apple products. (Flame me!)
I personally don’t like the i<SomeProductName> design Apple has been doing for the last years (just personal taste!). But I think I could overlook the design if I wouldn’t dislike the message Apple has been delivering together with their products (lifestyle isn’t something I define through my mp3-player or laptop). And foremost, I don’t like their pricing policy.

But that’s all me. Now if you aren’t already biased: What mp3 player should you buy if those assumptions hold true:

  • You hear lots of music (>8 gigabyte)
  • You hear music depending on your mood
  • You don’t see the price of 250€ as a problem
  • You like the iPod design
  • You like using iTunes (my brother does)

So, let’s assume you want an 80 gigabyte mp3-player. And you look at the market and find: Creative, Apple, Sony and some other nonames (that obviously wouldn’t be noname anymore if you should consider them).
You see? Something is missing in that list. Something that’s a real alternative to the iPod.
I mean, hell yeah, you can buy an Creative ZEN and be happy with it. But the software is and has always been really awful (so they made it compatible to iTunes). So, you’re buying a ZEN that you will be using through iTunes: Does it ring a bell? Why bother with ZEN altogether if your iPod works with iTunes much better than ZEN?
And on the Sony side of things: They didn’t get their player right imo. While the ZEN shines as a great mp3-player with good sound, Sony just messed up the whole usability concept (and their desktop software sucks too).

So what’s left? Some crappy mp3-player that unfortunately is the only choice you are currently presented: iPod.

I am still hoping Microsoft is going to release the Zune in Austria someday soon. Until then, there simply is no viable alternative to the iPod.


Alive and kicking

January 27th, 2008 . by Daniel Hölbling

I know I haven’t posted for some time, mainly due to the fact that I’m in the middle of exams right now.

While I should be learning Computer Organization & Design for next week’s exams (besides some other stuff I should be doing right now), I started off reading my new book Code Complete: A Practical Handbook of Software Construction by Steve McConnell.

While I’m not fully happy with Amazon’s delivery (a week late, both books got damaged during the lift), I am very happy with the book itself. Unfortunately it isn’t that easy to read, so due to a lack of piece and quiet I haven’t read past chapter 4.

McConnell laid out in his first chapter that real Software Development Ideas won’t be addressed before chapter 5, so I was pretty much reading through common problems during project inception and the differences between sequential and iterative programming.

Besides reading and learning I also started some ASP.NET MVC experiments, but I think I’ll back up on that for now and try to make myself familiar with the pattern behind MVC.


.NET Framework Library Source Code released

January 17th, 2008 . by Daniel Hölbling

Wow! Scott Guthrie just announced on his blog that the source servers are ready and that they just released most of their .NET source code to the public.

This means that you are able to download the debug symbols and actually debug the .NET classes if you want to. Or you can just drool over the framework and try to learn a thing or two.

Go check out Shawn Burke’s blog post about how to set things up.


Enumerators in C#

January 12th, 2008 . by Daniel Hölbling

I am still trying to figure out if what I did was useful or not.

Based on the assumption that sometimes you may need a variable typed IEnumerable<T> to hold a value that only implements IEnumerable I wrote this adapter class (you find it after the jump).

What’s IEnumerator?
IEnumerator it the old non-generic implementation of the Iterator pattern, while IEnumerator<T> is the strongly-typed generic version introduced in .NET 2.0.

IEnumerable<T> implements IEnumerable, but there is no way to cast IEnumerable to IEnumerable<T>. So I wondered how you could comply to the Iterator pattern.

My first suspicion came when I tried foreach on both IEnumerables. Foreach has no problem with both of them, so I dug out my C# language spec and discovered that foreach has to use two different methods for either IEnumerable or IEnumerable<T> (That’s not really clear there, anyone to falsify my assumption?).
They could have gone the other way and use the non-generic IEnumerable for the iteration, but that would need an implicit typecast on every iteration (and that would slow things down I guess).

In a scenario like the following one you can’t pass the Enumerator created by an Array.GetEnumerator() because it uses IEnumerator instead of the generic version IEnumerator<T>.

public void PrintList(IEnumerable<String> MyList)
{
  
foreach (String Entryin MyList)
    {
      
Console.WriteLine("{0}", Entry);
    }
}

Because IEnumerable<T> implements IEnumerable you could just switch back to the non-generic version, but that’s something I don’t really like (although it may be more practical).

Read the rest of this entry »


Computer Programming Quotes

January 12th, 2008 . by Daniel Hölbling

Oh god, I am still laughing after having read this brilliant list of 101 Great Computer Programming Quotes I found on DotNetKicks.

Here are some of my favorites, although I would recommend the whole list to anyone with some spare time!

  1. “Saying that Java is nice because it works on all OSes is like saying that anal sex is nice because it works on all genders.”
    (Alanna)
  2. “Computers are like bikinis. They save people a lot of guesswork.”
    (Sam Ewing)
  3. “Programming is like sex: one mistake and you’re providing support for a lifetime.”
    (Michael Sinz)
  4. “Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots.  So far the Universe is winning.”
    (Rich Cook)
  5. “It’s ridiculous to live 100 years and only be able to remember 30 million bytes.  You know, less than a compact disc.  The human condition is really becoming more obsolete every minute.”
    (Marvin Minsky)
  6. “Hardware: The parts of a computer system that can be kicked.”
    (Jeff Pesis)
  7. “I’ve finally learned what ‘upward compatible’ means.  It means we get to keep all our old mistakes.”
    (Dennie van Tassel)
  8. “There are two major products that come out of Berkeley: LSD and UNIX.  We don’t believe this to be a coincidence.”
    (Jeremy S. Anderson)
  9. “There are two ways of constructing a software design.  One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.”
    (C.A.R. Hoare)
  10. “Software suppliers are trying to make their software packages more ‘user-friendly’…  Their best approach so far has been to take all the old brochures and stamp the words ‘user-friendly’ on the cover.”
    (Bill Gates)
  11. “There’s an old story about the person who wished his computer were as easy to use as his telephone.  That wish has come true, since I no longer know how to use my telephone.”
    (Bjarne Stroustrup)
  12. “The use of COBOL cripples the mind; its teaching should therefore be regarded as a criminal offense.”
    (E.W. Dijkstra)
  13. “There is no programming language–no matter how structured–that will prevent programmers from making bad programs.”
    (Larry Flon)

Windows Live!

January 12th, 2008 . by Daniel Hölbling

How many of you know Windows Live?

Microsoft Windows Live

Windows Live is Microsofts new way of doing online applications. They changed almost every one of their services to match the Windows Live brand. Hotmail, MSN Search, MSN Messenger etc, all of those are now called Windows Live Search/Hotmail/Messenger.

And while at it Microsoft also released two cool new desktop applications called Windows Live Writer and Windows Live Photogallery! (You can get them at: get.live.com)

Windows Live Writer

How do you write your blog posts? Most people do so in their browser using those incredibly bad WYSIWYG inline HTML editors their blog software came packed with. When they post Images they do so after resizing it in Photoshop etc etc.

Now, that somehow works. I mean, most blog engines have some AJAX in place to save your drafts every few seconds and uploading works mainly through the browser. So how could this really be improved?

By installing Live Writer, handing over your blog address and login credentials and being set to go. Live Writer downloads the blog styles from the web, automatically checks for supported stuff on the blog engine and presents you with a perfectly intuitive and great interface for writing your blog posts. You can easily drag and drop, insert tables, images, links without any need to ever get down to the HTML source.
And of course you can insert images, but instead of firing up Photoshop and doing the resizing yourself, Live Writer is doing it for you (while being able to add blur, shadows, border, watermarks etc).

You can even use Live Writer to edit already published content or create/edit new pages (if your blog engine supports that). To be honest, since I’ve been using Live Writer I haven’t seen my wp-admin page for anything else than deleting Askismet spam!

Here Screenshot of Windows Live Writer while writing this post:

Windows Live Writer Screenshot

Windows_Live_Photo_Gallery_logo

Windows Live Photo Gallery is the other great new app coming with Windows Live. Although it’s not completely new, it’s just a better version of the Windows Vista photo gallery. It does the same thing, it watches the filesystem for changes and shows them in a very clean intuitive way.

What’s changed from the Vista default version is built-in support for uploading photos to Flickr or Live Spaces. And, that’s why I started using it: It comes with a great new feature called “Create panoramic”!

It’s so damn simple, take two pictures and click one button. Voila, you get a panoramic view like this:

panorama2 + panorama1 

Result: panoramic3

The final image still needs cropping, but that’s something Live Photo Gallery learned since it’s appearance in Windows Vista. Simple fixing like red eye removal, cropping, color adjustments or sharpness can easily be done from within Photo Gallery.


CES 2008 Keynote

January 7th, 2008 . by Daniel Hölbling

billgates You know that you have some serious affinity toward Microsoft software and technologies when you live in Austria (being GMT+1) and stay up waiting to watch Bill Gates deliver his keynote speech at 6:30 PM Pacific Time (GMT-8) (that’s only 9 hours of difference, meaning it’s been 3:30 AM here in Austria) at the Sands Expo and Convention Center in Las Vegas!

And hey, I really really regret it!

  • Now I need to get myself a ugly Fiat or Ford to have Microsoft Auto on my car.
  • They made some vague assumptions that the Zune will launch in Europe someday (man I didn’t want to spend those 300€).
  • They made me even more eager to buy an XBox360 (man, my girlfriend almost had talked me out of this!).
  • I now seriously need to get myself a Windows Mobile powered cell.

So, frankly – I loved this keynote.
I mean, I’ve seen most of this stuff somewhere before. There is a reason most of my friends ask whether I am paid by Microsoft for talking about their newest technologies all the time.
But still, Gates and Robbie Bach somehow managed to deliver their message.

Read the rest of this entry »


I’m so stupid

January 7th, 2008 . by Daniel Hölbling

Hey! I just wanted to let you know that I was searching for about 20 minutes for the meaning an @!

E.g. in this code:

Regex r2 = new Regex(@"([\{a-z]+)([0-9]*) ");

You may notice that the @ in this Regex is outside the actual String and that has to mean somethign.

Stupid me found the answer!

Placing an @ before a string in C# tells the compiler to NOT use escape sequences within the string.

So you don’t need to do stuff like \\ for a single \ etc.

Man why didn’t I found out earlier!


« Previous Entries