Posts in category microsoft - page 4

From the vaults of Twitter

I don’t normally republish my Tweets but are my highlights.

damienguard:
Methods returning “this” is a hack for fluency. Let’s get “..” added to the C# compiler to operate on previous object. a.This()..That()

lazycoder:
@damienguard I can’t decide if that’s genius or insanity. Should we add the “~” operator to refer back to the top of the inherit. chain? ;)

LostInTangent:
@damienguard I’ve started using Envy Code R for most of my applications (not just VS) and I have to say I’m loving it.

damienguard:
@LostInTangent: Envy Code R PR8 soon – Greek chars, improved hinting and some glyph revisions subscript/fractions & *96 redone.

damienguard:
Statically typed languages are not flexible enough to develop dynamically linked libraries.

damienguard:
Renaming your WiFi router StupidRouter does not alas shame it into being more reliable.

damienguard:
@command_tab: Am I the only one who finds paying for pretty UI’s to leverage free software that took much more effort to develop offensive?

damienguard:
Just took delivery on my Alps-switched keyboard… feels good so far… but let’s see if co-workers complain about the noise.

Plip:
@damienguard I CAN’T HEAR MYSELF THINK FOR THAT INFERNAL CLICKING !

damienguard:
@lancefisher The alps keyboard was from DSI USA… but don’t order one, terrible 2-key limits prevent fast typing.

damienguard:
Apple should add hobbyist to its OS X line-up. Make kernel easier to switch, remove the h/w lock-down and no support.

damienguard:
Standard windows font smoothing’s real problem is lack of scales. Convert a ClearType rendering to greyscale in Photoshop…

[)amien

Experimental LINQ to SQL template

A newer version of this LINQ to SQL template is available.

While SQLMetal does a good job of turning your SQL schema into a set of classes for you it doesn’t let you customize the code generation process.

Usefully there is now a templating system built into Visual Studio 2008 called Text Templates (T4 for short).

Here is a short (369 line) experimental proof-of-concept T4 template I wrote last night that will generate a data context and associated entity classes as a starting point similar to that produced by SQLMetal.

Download of this old version no longer available, see the newer article!

Once downloaded unzip and drop the DataContext.cs.tt into your project and edit line 17 to set the connection string. You can also edit lines 18 and 19 to set the namespace and class name. The lightweight wrappers around database, table and column can be found at the end of the file – they simply wrap the SQL Server Information_Schema views as briefly as possible.

Within seconds Visual Studio should have created a code-behind file for the DataContext named DataContext.cs.cs with your generated code ready to use :) If you don’t like the way the template generates your context you can change it :)

There are limitations with this experimental proof-of-concept including: </p>
  • Processes all and only tables in the database (no views or SP’s)
  • Foreign-key relationships are not implemented
  • Column attributes for IsDbGenerated, UpdateCheck and AutoSync not implemented
  • C# only (sorry Julie)
  • Plural and singular naming rules are incomplete
  • Can’t modify schema as you could with a designer stage
To learn more about T4: </p>

[)amien

Four Windows apps for home-sick Mac users

Libra (like Delicious Library)

Delicious Library is a DVD, game and book organization tool I’ve been using since my PowerBook G4 and a 2.0 version has been dangling from Wil Shipley’s mouth longer than I care to remember.

Windows users however will find Libra a very interesting clone and it features some of the same great features such as bar-code scanning via a web cam, tracking loans, a rendered virtual shelf and fast queries.

Unlike Delicious Library 1.x it also features sharing your library on-line, tweaking the types and rendering and a more advanced query engine and is available free for non-commercial use.

E Text Editor (like TextMate)

TextMate is a programming editor for the Mac that can be extended through the use of Bundles to provide additional syntax highlighting, menu options and command processing. It is fast, feels lightweight and therefore incredibly customizable all of which contribute to it’s success.

E Text Editor is a Windows clone of TextMate that doesn’t just mimic the user interface but also provides compatibility with TextMate bundles allowing you to take advantage of some of the many great enhancements available and at $34 is almost half the price although it doesn’t feel as snappy as it’s Mac counterpart.

Digsby (like Adium)

Adium is my instant messaging client of choice allowing me a single app to manage MSN, ICQ and Google Talk (I wish they would get basic Skype support in there too).

Digsby provides similar functionality whilst also throwing social networking (Facebook, Twitter) and email notification (Hotmail, Gmail, Yahoo Mail etc.) into the mix.

Dash (like Quicksilver)

QuickSilver provides a quick keyboard-based entry system for performing a wide variety of tasks and selections within Mac OS X and what it doesn’t do can often be added with plug-ins.

Dash achieves a similar effect on Windows but I have to admit I’m not really sold on either yet. I think the movement from keyboard to mouse and back every now and then must be a good break for your hands if not for your productivity…

[)amien

Windows 2008 Server on my MacBook Pro

A troublesome disk (a story for another time) has forced me to reinstall my MacBook Pro and review my Windows partition.

My Boot Camp partition was running Vista Ultimate x86 which felt sluggish, ignored the last 1GB and bugged me with UAC. One Windows update kept failing to install which also prevented SP1 from completing.

Apple’s Boot Camp doesn’t support 64-bit Windows (except on the Mac Pro) and my 64-bit experiences have been unpleasant so far (no Flash for IE x64, limited 64-bit shell extensions, Live! refusing to install, drivers etc.) The increased x64 memory consumption would also be an issue when running in a 1.5GB virtual machine via Parallels or VMware Fusion.

Windows XP was one option but losing IIS7 and DirectX 10 would see me reinstalling Vista within weeks so I decided to try Windows 2008 Server x86.

Boot Camp happily accepted the 2008 Server x86 CD where I chose the BOOTCAMP partition, formatting it as NTFS and electing for a standard installation. The Boot Camp drivers subsequently installed without complaint, all 4GB of RAM was accessible and there are no 64-bit compatibility issues.

Microsoft are giving away 1 year evaluation copies of Windows 2008 Enterprise Server x86 as part of their Heroes Happen Here launch program for Windows 2008, SQL Server 2008 and Visual Studio 2008 if you don’t happen to have an MSDN subscription to hand. There are however a few tweaks you need to do to get a more desktop-like experience:

Install desktop features

Head into Server Manager and Add Features then choose Desktop Experience to install Windows Media Player, Aero etc.

Go into Services and set the Themes service to Automatic and Start it to make themes available and then choose Browse… from the Theme Settings in Personalisation to select %windir%\Resources\Themes\Aero.theme

Install wireless networking

This one had me stumped for a while as I thought my wireless card/drivers weren’t working. The reality is that 2008 Server has wireless networking removed by default so head into Server Manager > Add Features > Wireless LAN Service to install it.

Enabling hibernate

Open a command prompt and enter:

powercfg.exe /hibernate on

Remove annoying shutdown

Head into the registry to HKEY\_LOCAL\_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Reliability and change the ShutdownReasonOn DWORD key to __.

Relaxing local password policy

A controversial change I’m sure but I’d rather choose something complex and unique that will last 90+ days than something memorable every 30. Head into Local Security Policy > Account Policies > Password Policy > Maximum password age and change it to something more reasonable.

Going further

A great guide with screen-shots on additional tweaks for a more workstation-like experience also exists – wish I known about that earlier!

Simone Chiaretta has highlighted the that tap-to-click is absent and there are some Bluetooth issues stemming from missing drivers.

[)amien