Syringe.Net.Nz
Irregular Injection of Opinion
RSS 2.0|Atom 1.0|CDF

 Monday, March 07, 2005
VS.NET Conditional Compilation with C#

Over the next few days I'm going to try and blog a bit more on technical stuff. It's going to be in the format of short and simple tips and tricks for improving productivity and the pleasures of development.

Tip for today is the use of conditional compilation.

Basically VS.NET allows you to set 'Conditional Compilation Constants' in the build properties of each solution configuration. You can then use these constants to enable and disable the compilation of certain areas of code based on the configuration you are working it. Out of the box the debug configuration has a flag called DEBUG. This means that we can write code like this that allows us to distribute DEBUG builds to customers for testing without having to worry about whether they will distribute it more broadly:

#if (DEBUG)
MessageBox.Show("This is a test copy of version " + string.Format(" {0}.{1}",Assembly.GetExecutingAssembly().GetName().Version.Major,Assembly.GetExecutingAssembly().GetName().Version.Minor) + " only. Please do not use in a production environment. Not for distribution to field users.");
#endif

Another place where we have used conditional compilation is in libraries that have to target both the Compact Framework and the Desktop framework. Basically we can have a single set of source code files and use conditional compilation to deal with features that are present on one platform and not another- for example we use it to flag on and off compilation of code that places scrollbars on forms- a feature that is out of the box on the desktop framework but roll your own on the compact framework.

.NET|Monday, March 07, 2005 9:45:17 PM UTC|Comments [0]|    

VSTS For Game Developers

SAN FRANCISCO — March 7, 2005 — Today at the Game Developers Conference, Microsoft Corp. announced new XNA™ software that will enable enhanced collaboration between content creators, programmers, management and quality-assurance staff members to speed the game production process. Based on the Microsoft® Visual Studio® 2005 Team System, the latest innovation of the company’s flagship development platform, XNA Studio is an integrated, team-based development environment tailored for game production.”

http://www.xbox.com/en-US/press/2005/0307-xna.htm

Looks pretty interesting- hopefully it means we'll see better support for rich content types in VSTS as well....

[UPDATE] John Lawrence says it will support big binary content at the very least. http://blogs.msdn.com/johnlawr/archive/2005/03/07/387902.aspx

.NET|Monday, March 07, 2005 8:51:54 PM UTC|Comments [0]|    

Life Imitates Art

Check out this North Korean Govt. Funded (you can tell they are poor bastards) flash movie- so Team America it's not funny!

Hat tip to Nick Head via BoingBoing

1t|Monday, March 07, 2005 3:11:22 AM UTC|Comments [0]|    

 Sunday, March 06, 2005
DontWastMyFingMoneyOnStupidThings

I laughed my ASS off over this one.

DPF has found out that our Land Transport Safety Authority (LTSA) has decided the best way to prevent drink driving is by sponsoring a racehorse and calling it Dontdrinkanddrive.

He notes some other future names: “Dontscrewwithoutrubba, Gamblingisstupid, Saveforoldage, donotbeatyourpregnantwife, drugsaredumb and sexisfunbutdonotcatchaids”

Anyone else got any?

Casey, Bill, Tim H?

1t | Taxpayer Ripoffs|Sunday, March 06, 2005 8:11:21 PM UTC|Comments [6]|    

J Fo Notes That WinFS Is Now Also On The List Of

J Fo' notes that WinFS is now also on the list of Longhorn tech that will be back ported to XP. ne has to wonder just what is going to be left.

I'd hate to be Michael Sievert... looks like he'll be marketing little more than a point release....

Roll on the PDC I guess.... maybe they'll open the kimono a little more and show us what's been going on in the collective brain over the past two years.

.NET | Human Aggregation|Sunday, March 06, 2005 8:03:28 PM UTC|Comments [17]|    

 Thursday, March 03, 2005
An Emissary to the Amazon Fiefdom

Pat Helland, one of the smartest and all around nicest guys @ MS is moving on to Amazon. Means we probably won't see him @ a Tech Ed again :-( I think that his Fiefdom keynote was one of the best I've ever seen @ Tech Ed.

Good luck Pat!

.NET|Thursday, March 03, 2005 11:59:55 PM UTC|Comments [2]|    

 Tuesday, March 01, 2005
But Mummy..... They're Smelly....

In a wee coup... it looks like the Australian Linux Conference is coming to Dunedin.

Given my previous experience with Linux guys my hope is that Rexona for Men do the right thing and sponsor the event....

In fact... if there might be women too.... maybe Heiniger will sponsor that section?

Human Aggregation|Tuesday, March 01, 2005 2:18:33 AM UTC|Comments [0]|    

 Monday, February 28, 2005
Good Art5icle on the Occasiona Inadequacies of Web Interfaces

As many of you know I'm quite the smart client geek... Chris Diggins posts about web interfaces and their short comings....

“My point is that a web browser and html is not the best possible technology for sophisticated online services. We see far too many broken ad-hoc javascript implementation which attempt to address these issues but they always seem to succumb to the fundamental flaws of http technology. I propose that we need a new kind of technology for these kinds of web services which require logging in and manipulating information online. “

It's called a SmartClient :-)

.NET|Monday, February 28, 2005 11:08:59 PM UTC|Comments [5]|    

 Sunday, February 27, 2005
From Aaron Bhatnager...

http://bhatnagar.blogspot.com/2005/02/paul-owusu-chief-accountant-of-trust.html

Paul Owusu, Chief Accountant of Trust Security Bank, Nigeria
ATTN;MR. XXXXXX XXXXXXXXX,

Please find attached the picture, of MR. PAUL OWUSU, who is the Chief
Accountant to our firm. He is holding, the caption, that you send to
us., according to your wishes.

Thanks in advance for your co-operation.

Awaiting your early reply.

MISS MIRIAM KWAME
TRUST SECURITY BANK
LAGOS, NIGERIA

Taxpayer Ripoffs|Sunday, February 27, 2005 10:29:43 PM UTC|Comments [0]|    

Sore Buttocks

I have a sore bum this morning- did 110km on my MTB on the weekend- raced in the Rail Trail Duathlon.

We shaved a few minutes off our last year time... I had a puncture about 10km into the second day bike leg which kindaq stuff everything up a bit.

Feel a whole heap better than I did after the event last year though. Heading up signal hill with Garry the the Mad Scott and Toby (Dogblog Dog) for some downhill action after work.

Adventure Sports|Sunday, February 27, 2005 8:46:36 PM UTC|Comments [0]|    

 Thursday, February 24, 2005
Coding Flair

A while  a go, the mad Oregonean (sp.) that is Rory Blythe posted about flair. I was coding this morning and had a flair kinda moment.... so I thought I'd blog it. My flair is a bit different to what Rory sees- it's more like freestyle coding and computer use.

So we play loud music in our office- this morning it was Hybrid, Y4K. So I'm like bouncing on my swiss ball and navigating my way around VS.NET like a demon and I suddenly get the urge to throw some flair into the mix.... It's like... flair is to developing as tweaks or grabs are to snowboarding or kitesurfing... it's as though you've got such a rythym building with the music that you can just throw down some flair moves to help keep you in the groove...

Anyway that is all.... New category too BTW...

1t|Thursday, February 24, 2005 9:01:43 PM UTC|Comments [0]|    

TC kills TM

DPF is discussing the fact that the TelstraClear depeer decision seems to have killed TradeMe.

Stupid Stupid telcos....

PoliTechLaw|Thursday, February 24, 2005 3:43:19 AM UTC|Comments [0]|    

Losing It

Tim Haines has a great link to a radio station proank... VERY much worth a listen.

Human Aggregation|Thursday, February 24, 2005 3:31:48 AM UTC|Comments [0]|    

Jacekwatch

For those of you who follow the msmobiles.com saga- that Jacek guys who wishes to sacrifiice all Mobile MVPs to the devil.....

Herewith Jacekwatch blog.

Mobility|Thursday, February 24, 2005 2:48:45 AM UTC|Comments [0]|    

 Wednesday, February 23, 2005
Paul Is Off To Redmond

Paul Andrew, MS's Wellington based Dev Evangelist is moving on to Redmond. We'll be sad to see you go mate.... been great working with you. Next time I'm in Redmond we're sure hjas hell gonna get a group of the Kiwi expats together and go to Wades Gunshop for a blast up.

Human Aggregation | Rambles|Wednesday, February 23, 2005 10:00:57 PM UTC|Comments [0]|    

O-Week.....

It's Orientation Week this week @ Otago University... The talent would leave even Tim Huffman speechless!

Rambles|Wednesday, February 23, 2005 4:09:16 AM UTC|Comments [0]|    

Travelling Tablet PC

Darryl B (another NZ based mobile MVP) has noted that my fave travelling PC, a Panasonic Toughbook CF18 Tablet, has made it onto the MobilePC Mag top 100 gadgets.

It really is a great device... you can haul it around airports and hotels ino or out of its bag. It is small- a bit heavy but not at all bad. Rugged as hell.

Toy Box|Wednesday, February 23, 2005 4:00:22 AM UTC|Comments [0]|    

P-P-P-P-Political S-S-S-S-Slut

Matt McCarten has left the Maori for yet another left wing blue collar start up.

O'Herald has the details.

Politics|Wednesday, February 23, 2005 1:46:14 AM UTC|Comments [0]|