# Thursday, 24 November 2005

A post describing the use of Generics and yield to perform filtering a collection. Definitely will come in handy.

In this post, I'll try to show you why you should not limit your use of generics to strongly typed lists, and why yield may become your favorite new keyword.

Here's an example of how you can use both in a very simple piece of code.
Imagine you want to filter out an enumeration using an arbitrary function. For obvious performance reasons, you don't want to create a temporary list and filter that. You have to construct the filtered enumeration on-the-fly as the original enumeration is enumerated.
 
posted on Thursday, 24 November 2005 15:48:05 (Romance Standard Time, UTC+01:00)  #    Comments [0] Trackback

MsdnLogoWith Framework 2.0 out you should be reading up on all the new features of the Framework. Most notable Generics which you’ll be hard pressed to avoid for long.

Juval Lowy has a four part paper on Generics up on MSDN:

  1. Fundamentals
  2. .NET Framework
  3. Tool Support
  4. Best Practices

Happy reading.

posted on Thursday, 24 November 2005 14:30:49 (Romance Standard Time, UTC+01:00)  #    Comments [0] Trackback

Check out Chris Sells site for a Smart Client version of Tetris for your gaming pleasure: Wahoo!

I know I’ll be visiting this one

posted on Thursday, 24 November 2005 10:21:54 (Romance Standard Time, UTC+01:00)  #    Comments [0] Trackback
# Saturday, 19 November 2005

Finally got around to upgrading dasBlog to version 1.8 and modifying the source to accept image uploads using the MetaWeblog API. One of these days I'll have to look into getting my code added to the codebase so I don't have to run through the steps each and every time a new version is released.

Let me know if something broke will ya? :)

posted on Saturday, 19 November 2005 18:41:50 (Romance Standard Time, UTC+01:00)  #    Comments [0] Trackback
# Thursday, 10 November 2005

Looks like Jetbrains is at it again developing the Omea product. The internal version is now up to build 875 from 671.6 which was the final build for version 2.0. Now if only we could get some info on what’s new in this internal build of theirs  I, for one, certainly hope that performance optimizations will be made as my laptop is strugling to keep the program running at acceptable speeds. I even went so far as to start looking for alternatives even though I paid for the pro version; only problem is that Omea Pro can’t be matched for features at the moment (it’s both good and bad as I’m continually routing for Jetbrains ).

posted on Thursday, 10 November 2005 20:14:42 (Romance Standard Time, UTC+01:00)  #    Comments [1] Trackback
# Wednesday, 09 November 2005

Do you want to work for the best company in the world? Then you should know that my employers have an open position for a skilled .NET developer. We are a small company but have been experiencing healthy growth the last couple of years.

You’ll need your good sense of humor and great technical skills along with a drive to learn more about the latest and greatest.

Experience with the following products is a definite plus:

  • BizTalk Server
  • Commerce Server
  • Content Management Server
  • SQL Server
  • Analysis Services

You can read more at our website (Danish only).

posted on Wednesday, 09 November 2005 15:03:28 (Romance Standard Time, UTC+01:00)  #    Comments [2] Trackback
# Tuesday, 08 November 2005

In an interesting turn of events I learned that SQL Server 2000 doesn’t actually run transactions atomically when XACT_ABORT is set to OFF and an error occurs. A colleague of mine sent along a very interesting article describing basic error handling in stored procedures including the description of the XACT_ABORT option. Here’s quote from Books Online:

When SET XACT_ABORT is ON, if a Transact-SQL statement raises a run-time error, the entire transaction is terminated and rolled back. When OFF, only the Transact-SQL statement that raised the error is rolled back and the transaction continues processing.

And here’s the article I mentioned above. A very good read; should be mandatory for everyone coming within 10 meters of SQL Server 2000.

Error handling in stored procedures is a very tedious task, because T-SQL offers no exception mechanism, or any On Error Goto. All you have is the global variable @@error which you need to check after each statement for a non-zero value to be perfectly safe. If you call a stored procedure, you also need to check the return value from the procedure.

[Implementing Error Handling with Stored Procedures]

posted on Tuesday, 08 November 2005 11:13:51 (Romance Standard Time, UTC+01:00)  #    Comments [1] Trackback
# Wednesday, 26 October 2005

When all connections to a Terminal Services server are blocked, either by idle connections or active, you can always connect to the server by using

mstsc.exe -console

Just remember to only use that particular switch in emergency cases you can’t get at the server any other way, otherwise you’ll just end up blocking that session as well, leaving no way to get to the remote server.

posted on Wednesday, 26 October 2005 08:54:08 (Romance Daylight Time, UTC+02:00)  #    Comments [1] Trackback
# Wednesday, 19 October 2005

Recently I bought an Apple Airport Express, a marvellous little device enabling me to stream music from iTunes to my stereo. Everything worked well until I enabled my firewall, at this point iTunes could no longer connect to the speakers.

Searching around the internet I found that iTunes uses port 5353 to stream but opening the port in my firewall did nothing to make it work.

Using Active Ports I saw that a couple of connections to remote TCP ports 5000 and 6000 were trying to open to the Airport Express. Opening these remote ports in my firewall turned out to do the trick.

Thought I’d pass the info along as my searches through the Apple forums yielded nothing more than, “just turn off your firewall”

posted on Wednesday, 19 October 2005 17:36:41 (Romance Daylight Time, UTC+02:00)  #    Comments [2] Trackback
# Wednesday, 12 October 2005

IPod5GApple sure knows how to keep the competition on its toes. At the previously announced special event “Just One More Thing” tonight Apple announced new iPod with capacities of 30 and 60 GB and even smaller than the last models, 11mm for the 30 GB version and 14mm for the 60 GB one. They are available through Apples Online Store. Oh did I mention that they carry a color screen and the capability of playing video? No?  Video out is suppoted on the new iPods which presumably gives you the ability to play those videos on your TV, now all we need is a small wireless remote for the iPod.

Also a version 6 of iTunes was announced which features video support. An updated version of the iTunes Music Store actually supports video downloads in the forms music videos and series like Desparate House Wives.

Lastly new iMacs were announced, thinner and faster with builtin webcam and a small remote for controlling iTunes and a bunch of the iLife programs.

posted on Wednesday, 12 October 2005 20:44:16 (Romance Daylight Time, UTC+02:00)  #    Comments [1] Trackback