Blog posts page 33 of 44

Implementing a generic WeakReference<T> in C#

  • đź“…
  • đź“ť 384
  • đź•™ 2
  • 📦 .NET
  • đź’¬ 4

Check out the replacement EquatableWeakReference<T>EquatableWeakReference<T> class

A weak reference lets you hold a reference to an object that will not prevent it from being garbage collected. There are a few scenarios where this might be important — such as listening for events, caching, various MVC patterns.

Patterns of Enterprise Application Architecture

  • đź“…
  • đź“ť 691
  • đź•™ 4
  • 📦 .NET

While a big fan of patterns I found the original Gang of Four (GoF) book a little dry and so had left the pattern books alone until Martin Fowler’s Patterns of Enterprise Application Architecture (PEAA), got referenced so many times on-line I gave in and purchased a copy. I’m glad I did — even if the examples are mostly in Java with the very occasional one in C#.

The patterns in the original GoF were really about the interactions between the objects themselves and whilst PEAA has some object-to-object interactions it concentrates on problems encountered in “Enterprise Applications”. This includes database mappings, transactions, web pages and concurrency.

Exploring the Nintendo DS Lite

I was very fortunate to receive a Nintendo DS Lite for my birthday and a voucher for a couple of games — I’d wanted one for a while but put it off being that I already a couple of hand-held gaming systems.

The DS Lite is tricky to compare to the PSP being that they take such different approaches. Sony has tried to make the PSP a portable multimedia station supporting UMD movies, video and music on memory sticks and it’s reasonably large wide-screen display as well as playing games.

QXL disregard their own privacy policy

  • đź“…
  • đź“ť 260
  • đź•™ 2
  • 📦 Internet

On the 16th of June an email appeared in my inbox with the subject “Love football, gambling and DVDs?”. Strange, the Gmail spam filter normally does a sterling job of blocking these.

Dear entertainment lover, It’s not long now until the first England game, and everyone’s talking about football and making bets. Well we at ScreenSelect.co.uk are no different but we also realize that there’s plenty of time between games for other forms of entertainment. ”

MacBook Pro the ultimate developer machine?

I’ve been using my MacBook Pro now for about a month and think it’s the ultimate developer machine. You really are spoiled for choice and everything you might want is at your fingertips.

Every Mac ships with the Xcode developer tool set. This gives you the native preferred Mac development platform called Cocoa which uses Objective-C at it’s core. The actual tools are based around the GCC 4 compiler and GDB debugger with a rather nice Xcode IDE and Interface Builder GUI designer from it’s NextStep origins.

Observing changes to a List<T> by adding events

  • đź“…
  • đź“ť 580
  • đź•™ 3
  • 📦 .NET
  • đź’¬ 8

In an attempt to get more C# and .NET content up I’m putting up some snippets I’ve put together in response to questions on some C# user support groups. Many of them are not particularly advanced but they are quite useful.

GitHub has the latest version of ObservableList<T>ObservableList<T>

C&W Guernsey 2MB broadband

Cable & Wireless Guernsey are offering 1MB and 2MB “Professional” broadband packages for £49.99 and £79.99 a month respectively as from June 17th.

So what do you get for your extra £25 a month with their 1MB pro service over their existing 1MB service?

First look: Applying Domain-Driven Designs and Patterns

In an attempt to quench my thirst for all things C# and having already torn through the great .NET Framework Design Guidelines and less-great Effective C# I grabbed a copy of Applying Domain-Driven Design and Patterns (With Examples in C# and .NET) by Jimmy Nilsson.

The book is obviously based around domain models but also gives some coverage to test-driven development, NHibernate, design patterns, refactoring, code-smells etc.

Firefox cool extensions: Sync, del.icio.us & microformats

  • đź“…
  • đź“ť 260
  • đź•™ 2
  • 📦 Internet

These Firefox extensions just keep getting more innovative and useful. Here’s the latest additions to my ever-growing Firefox arsenal.

If, like me, you find yourself wondering what the URL was of that site you visited/bookmarked on your other machine/os/virtual machine then this extension is for you. You can choose to sync bookmarks, history, cookies and passwords (if you really want — they are encrypted) across your copies of Firefox. Great for us MacBook owners using Boot Camp and Firefox :) .