…you should definitely check out Hugo 20007 winner for the best novel. But you knew that already, if an author gets the Hugo Award his/her book is a must-read.
The reason I mention this particular book is that Vernor Vinge (the author) is “giving it away” – the full text is available online! It’s just a single web page with no styling and is very easy to read. Actually, I just found another use for my PSP – reading HTML books.
You might know Vernor from his earlier work (he is a multiple Hugo Award winner) of which True Names is the one that made him a name. It’s a book about cyberspace, before William Gibson’s Neuromancer.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
You might have noticed that with the launch of Windows Vista there are now many new “Works with Vista” certifications and logos. This is normal - each new Windows version adds new features but also new conventions and sets of recommendations. Microsoft values backward compatibility but if you want to stick a new logo on your product, you need to update it to comply with the latest and the greatest.
It’s “easy” with the software – open up the source code, adjust where necessary and recompile. What about hardware? Most of the new hardware devices do leave out quite a bit of functionality to the firmware (a special software necessary for proper functioning of the device) that can be updated, but don’t expect dramatic changes or improvements.
Thus I was puzzled when it turned out there is a Vista logo for home routers, and the one called “Works with Windows Vista” at that. Will my router work if it’s not certified?
Of course. Turns out that this logo ensures that most of the new features in Vista are actually used, plus it makes the configuration of your home network much easier and enables flawless media sharing between your PC and other devices like Xbox 360. In other words, the certification process is good for the average consumer that does not want to fiddle with network equipment. Normal people expect the router to “just work”, no maintenance whatsoever.
If you are network savvy and know how to open (and close!) ports on the router, do not share videos wirelessly or simply have a trivial network setup (ISP provided router and one computer) you do not need to worry about the logo. I have used two different routers in the last few months, neither is certified in any way but everything works fine, including my 64–bit desktop Vista machine, 32–bit XP laptop (over wireless) and (wired) Xbox 360.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
The Linq query syntax in C# is almost like a SQL but not quite. Example:
from c in db.Customers
where c.City == "London"
select c;
Why is the order of select/from/where upside-down? Because this is more natural and SQL was wrong all along. Just kidding 
To illustrate my point better, look at this SQL query:
SELECT Foo.Something, Foo.MoreOfTheSame, Foo.ColumnName,
Bar.LastName as BarLastName, Bar.FirstName as BarFirstName,
Bar.NeedsExplanation as BarNeedsExplanation
FROM AVeryLongNameForFoo Foo
LEFT JOIN AVeryLongNameForBar Bar ON
Foo.ID = Bar.FooID
If you’ve been writing SQL for years you probably wonder what’s the problem here? For me, it’s mentally parsing the query – in order to see what Foo is I needed to parse the text to the point where the table alias is defined (in the FROM part). For a computer tool this is even more difficult, in fact it’s impossible to provide intellisense at the point where you just typed SELECT Foo.[what should go here?].
Contrast this to the C# Linq example where both you and the compiler (or the IDE) know what each of the elements are at each point in the query. A win-win I’d say.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
In my last post I showed how easy it is to add syntax sugar with extension methods. But that’s not all – even though from the call site the extension method looks like any other, it is a different beast altogether. This is obvious from the signature of the extension method – we are explicitly expecting the reference to the object of the extended class as the first parameter, unlike with the regular methods where
this reference is implicit. If that’s really the case, what happens if you call using
null reference? Assuming you check for
null, this should work, right? It does! Here’s an (admittedly contrived) example:
using System;
using System.Linq;
public class Foo {
public int Bar = 2;
}
public static class Extensions {
public static bool IsTwo(this Foo foo) {
return null != foo && 2 == foo.Bar;
}
}
public static class Program {
public static void Check(Foo foo) {
Console.WriteLine(string.Format("The foo {0} two", foo.IsTwo() ? "is" : "is not"));
}
public static void Main() {
Foo foo1 = new Foo();
Check(foo1);
Foo foo2 = null;
Check(foo2);
}
}If the
IsTwo was regular method, calling
foo.IsTwo for the second time would be using the
null reference
foo2, and we would get a null reference exception. Instead, the output of this little program is:
The foo is two
The foo is not two
Use with caution.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5