Advert overload?

I came across a .net related site today, content was pretty good…after I got through all the adverts:

Without checking, I think that there are too many Google AdSense blocks on the page, I’m sure it’s limited to three per page.

Hint: the yellow bits were part of the site content.

Just to stay in keeping, here’s my gratuitous ad block:



Technorati Tags:

Opening the .net Command Prompt Programatically

In a recent forum posting, I found myself writing some code that would open the Visual Studio 2005 Command Prompt (C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat). Once opened, the command prompt had to accept command-lines, just as if they were typed in by the user…except in this case it had to be under program control!

I’m sure that there are many ways of doing this, but here’s what I ended up with:

[code lang=”C#”]
[C#]
using System.Diagnostics;
using System.IO;

namespace Cmd
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
string sProcess = @”C:\windows\system32\cmd.exe”;
string sParam = @”C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat”;
string cmd = String.Format(” /k {0}{1}{2} x86″, “\””, sParam, “\””);

Process p = new Process();
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.UseShellExecute = false;

p.StartInfo.FileName = sProcess;
p.StartInfo.Arguments = cmd;
p.Start();

System.IO.StreamReader sOut = p.StandardOutput;
StreamWriter myStreamWriter = p.StandardInput;

myStreamWriter.WriteLine(“dir”); // Your command line, MSBuild, etc.
myStreamWriter.WriteLine(“EXIT”);

MessageBox.Show(sOut.ReadToEnd());

p.Close();
}
}
}
[/code]

I’ve left the call to MessageBox.Show() to make you aware of the output.

Technorati Tags: , , , , , , , , ,

8 things about me…that you don’t know already…

Former MVP, now Microsoft DPE, and good buddy, Dan Moth has essentially blog-tagged me – I need to think up eight random things about me (that you don’t already know). Another good buddy, Gary, got me too. So here are 8 things about me. I hope these are new to you.

1. Like Dan, I too am a Metallica fan. But, you already knew this. But it’s unlikely that you’ll know I’m also a long-standing Magnum fan.

2. Like Dan, I too was tempted to kill off this almost viral-like meme/tagging thing. It’s difficult thinking up random things that folks don’t know about me. Like this one: I believe in a world where money isn’t required. It’s unlikely to happen in my lifetime, or even my son’s lifetime, but I’m sure it will happen. Let’s face it, a lot of things in Star Trek become reality sooner or later.

3. I crave tidiness, but I am, at the moment, one of the most untidy people I know. I believe this is due to the fact that I tidy in small pockets of time – I really should “take a week” and do it all in one go.

4. Related to 3 above, I hoard things. “That’ll come in useful one day”. The situation has improved recently: I cull my computer-related magazines very frequently now, perhaps because we have the facilities to recycle more and more – for example, we have a regular trash container, two paper/cardboard recycle containers and as of yesterday, we have containers for plastics and cans/glass.

5. Despite 1 above, I do like late-80s, early-90s dance, electronica, old-skool and trance music. I don’t know why. It’s good to work and drive to. Many years ago, I was driving to work, the tunes were “up there”, the speakers were replicating the bass to perfection (thanks to a proper acoustic MDF parcel shelf, a Kenwood amp and a pair of 6×9 JBL speakers), the sun was shining, it was a clear day…I nearly didn’t go to work, wanting only to continue enjoying the drive! There was a Sony headunit and an autochanger cunningly installed in the glovebox.

6. Despite 5 above, I have a cassette unit in my current car! On days when I don’t take the train, I spend up to 2 hours per [working] day in my car and find myself listening to the likes of Chris Moyles and Scott Mills on BBC Radio 1. Whatever you may think of those shows (and BBC Radio 1 in general), I like them and will continue to listen to BBC Radio 1 until I feel that I’m old enough to progress to BBC Radio 2 or 4 (I believe this is the natural progression from folks who are 15 years my senior). Radio’s a funny beast. I find myself listening to it whilst travelling, either in the car or whenever I’m on a train that doesn’t have an overly protective cocoon that blocks basic forms of radio transmission (Virgin please note). By virtue of this listening habit, I have a listening pattern: I tend to listen to Chris Moyles, Scott Mills, Jo Whiley, Vernon Kay and Sara Cox. Rarely do I find myself the other shows, because of the time I travel. I rarely find the peace and quiet required to turn the radio on at home, which is a shame because there are plenty of other great shows on BBC Radio 1. If you don’t believe me, go listen for yourself.

7. Despite 1 and 5 above, I have a reasonable collection of classical music and do listen to Classic FM – it’s tuned in to speed button number 2 on the car stereo. As you might imagine, BBC Radio 1 is tuned in to speed button number 1!

8. I would like to emigrate and work [from] abroad. Most of what I [really want to] do can be done from anywhere thanks to the power of the Internet. This would negate commuting and the downtime of having to fit in with a 9 to 5 working day. I’m a creative type, I can’t turn creativity on such that it’s there between certain hours. It takes many hours to for people like me to reach a state where creativity is found…for me, that happens between 0000 and 0400 – at which point I’m tired because I have to get up at 0630 for the 9 to 5 shuffle. But, unless I really push myself, it’s unlikely to happen.

Who’s next? Must I really propagate this thing? I guess so, otherwise some nasty stuff will happen to me…at least that’s what Dan told me when he dropped me an e-mail reminding me my obligation to write something. So here goes:

Dave
Alan
Liam
Simon
Simon/Jonathan
Chris
Richard
Vinzenz

Technorati Tags: , , , , , , , , , , , , , , , , , , , , ,

UK Pensions – State of the Nation

I received a letter from the company that I am hoping will be able to provide me with a pension later in my life. I was a little bit stunned by its contents. Here’s a snippet:

I’m a little worried that the procedures required to prevent such an error were not already in place. It begs the questions: what other procedures are not in place and what other mistakes could happen? And given that this is an illustration of what I might get from my fund, how do they know that it’s precisely 15% higher than it should be? And why should I really care? After all, they could have corrected this supposed error over the course of the next 20 years and I would have been none the wiser.

Frankly, the UK’s pension industry seem to go out of their way to confuse and baffle the general public (of which you and I are members). They [the pension providers] make transfers between policies and providers either impossible or very costly, frequently citing government regulations for their inflexibility and inability to honour the customer’s requests. Since we are no longer in a job-for-life culture, this means most of us have at least one pension fund for each job that we’ve had. I’ve given up trying to consolidate some of the small pension funds, every time I’ve tried: no can do.

The UK pension providers and those who are responsible for writing the government legislation behind the crazy rules that make the pension industry so rigid, so inflexibile and so incapable, really need a rocket up their backsides to make them realise how daft they’re being. They’ve created a real mess with today’s pension industry. Either they realise this and go about sorting it out, or they should hand over their operations to some folks who do know what they’re doing (although, I can’t say that I know who those folks might be, sorry!)

Perhaps I’ll just have to hope that I win the lottery or the premium bonds?

Technorati Tags: , , , ,

Scottish Developers – User Group Event – voting required

Author of .NET Internationalisation, Guy-Smith Ferrier will be coming to Scotland in October!

If you are interested in seeing any of the sessions below, please let us know by voting here. Session abstracts are available at the aforementioned link.

Microsoft Codename “Astoria”
10 Things To Know Before Internationalizing An Application
Internationalizing ASP.NET
Internationalizing ASP.NET AJAX
How To Give Great Presentations
Internationalizing WPF Applications
Automating Testing With Virtual Server 2005
Visual Studio 2005 IDE Tips and Tricks
Replacing Reflection With Introspection
Introduction To Windows Workflow Foundation
Exception Handling Strategies In Windows Vista (Using Windows Error Reporting)
Planning Your Internationalization Strategy
Using ClickOnce and XBAPs To Deploy Windows Forms and WPF Applications
Deploying Internationalized Applications Using ClickOnce
Creating Custom Cultures
Writing Custom FxCop Rules

Technorati Tags: , , , , , , , , , , , , , , , , , , , , ,

July 23 – Jeff Barr, Amazon Web Services Talk – Glasgow

Via: http://eventful.com/events/E0-001-005252664-9

When:
Monday, July 23, 2007 5:00 PM to 7:00 PM BST

Where:
Strathclyde University, Graham Hills Building, Room 5.14
Richmond Street
Glasgow, Glasgow City G1 1XQ
United Kingdom

What:
Jeff Barr, Senior Manager at Amazon Web Service Evangelism will talk about Amazon Web Services.

More details can be found at http://livz.org/cs

There are a MAXIMUM of 100 places available, so please book at Eventful.com by clicking the “I’m Going” button !

Cost: Free!

Google group:
http://groups.google.com/group/techscotland

Technorati Tags: , ,

Vista – Automatic updating

This morning I was greeted with Vista’s “restart” prompt:

I was busy, so I dropped the menu down, clicked on 4 hours and went back to work. I had all sorts of things going on: A dual-monitor setup with Vista on the laptop’s monitor, XP on the external monitor (in a virtual machine), Microsoft Word, Microsoft Outlook and Microsoft Access were running and busy in the virtual machine, WIndows Mail was working away in Vista, and so on. You get the picture.

Then, at 1215, my boss and I decided we’d take our usual lunchtime walk. I returned from the walk one 50 minutes later to see a login prompt. I realise that the security folks amongst my readership wouldn’t see anything wrong with this picture, however for me, as somebody who rarely needs to lock his laptop, seeing this prompt meant one thing: a reboot had occured. Doh! What sort of state was my virtual machine going to be in? Heck, I was in the middle of a document in the virtual machine, would Microsoft Word recover from that? Thankfully everything came back to life as I expected it to, Virtual PC recognised that I had undo changes left and offered me the chance to save them. However things might not have been so good had there been any long-running processes running on either Vista or in the XP virtual machine.

Phew! But there’s a lesson to be had from this incident: good as automatic updates can be, be careful if you need to avoid the automatic update, postponing it might not be the answer. Now, please note the use of “can” in the previous sentence. There are times when automatic updates can be a real pain and can cause you problems (refer to this, this (old) and this).

So, if you do need to postpone the automatic reboot until you choose to restart the machine, here’s what you can do:

1. Open up a Command Prompt (as Administrator)

2. Enter: net stop “Windows Update” – then press Enter.

The Windows Update service that you just stopped will come back to life when you next reboot, so you’re not breaking anything by doing this.

Technorati Tags: ,

NxtGenUG – Podcast #36 – The One With 5D…D…D…

Show #36 – The One With 5D… D… D… Wednesday, July 11, 2007
It’s the post DDD5 podcast, and its just as well Dave recorded something, ‘cos Rich never turned up! Rich makes some feeble excuse about missing another great DDD, but avows to ensure Dave’s XSLT Session underpins all the other sessions by marking it right down! Featuring interviews with Phil Winstanley, John Thomson, Andy Westgarth and delegates at DDD5 including Simon Harryiott.

Links mentioned by Dave:
Moore’s Law Video – http://youtube.com/watch?v=UgW-8LlGAfw,
Mona Lisa in MSPaint – http://www.dailycupoftech.com/2007/07/03/ms-paint-mona-lisa/
Microsoft Stealth Search Engine – http://www.techcrunch.com/2007/06/03/microsoft-silicon-valley-team-building-stealth-search-engine/

The hidden theme for this show was Guess the theme – get the swag!

Technorati Tags: , ,

Scrum – in action at Microsoft

Via Channel 9:

Grace Francisco talks over lunch with Ellie Powers, Program Manager with the Hotmail team to find out more about Scrum and its benefits. Hear her real world feedback on using it in projects and the challenges you may encounter.

And from a while ago:

Garry Wiseman, product unit manager, and friends take us through a new Windows Live classified service named “Expo.” We get a demo of this cool new service that helps you buy and sell stuff. A place for you to find things and others to find your things. You can learn more here: http://expo.live.com

Technorati Tags: , , , , ,

Book – Writing Secure Code for Windows Vista

Spotted in the MSDN Flash of 11 July 2007…it’s amazing how easy it is to miss key releases like the one below.

Get your own subscription to the MSDN Flash newsletter here. Read the Editor’s blog here.

Get the definitive guide to writing secure code and developing more-secure applications for Windows Vista – straight from the experts. Security is one of the greatest enhancements in Windows Vista, and developers will be urged to write more secure code on the platform to support a growing customer base. This reference delivers the straight scoop from the authors who wrote the immensely popular, award-winning book Writing Secure Code. Developers get first-hand insights into design decisions and practical advice for solving real-world security issues. The book covers new features, including ACLs and BitLocker, as well as enhancements to familiar concepts, such as firewalls and authentication. In addition, there are plenty of code samples in C# on the Web. Designed to complement and extend Writing Secure Code, this book is essential for developers of Windows Vista.

Chapter 1: Code Quality
Chapter 2: User Account Control, Tokens, And Integrity Levels
Chapter 3: Buffer Overrun Defenses
Chapter 4: Networking Defenses
Chapter 5: Creating Secure And Resilient Services
Chapter 6: Internet Explorer 7 Defenses
Chapter 7: Cryptographic Enhancements
Chapter 8: Authentication And Authorization
Chapter 9: Miscellaneous Defenses And Security-Related Technologies

Technorati Tags: , , , ,

005 – Community Podcast – GeekDinner/DDD5 – Adrian Sutcliffe

In this, the fifth Community podcast, I spend a few minutes chatting to Adrian Sutcliffe of the NxtGenUG, naturally the swag kings Dave & Rich get a mention! We talk about the sessions that Adrian attended at DDD5 and about the relative merits of “joining an IT-focused user group”. Recorded at The Riverside in Reading, it was raining, there were 40+ folks around. It was raining, so I had to filter the audio a little…hang in there, it’s still very understandable.

Download the podcast here. Transcript to follow.


I have a new podcast feed available too, you can subscribe to it here – and it works with Apple’s iTunes!

Related posts:
Podcasting – great advice
001 – Community Podcast – Dave McMahon, NxtGenUG
002 – Community Podcast – Ravi Nar – VistaSquad
003 – Community Podcast – Guy Smith-Ferrier – DotNetDevNet
004 – Community Podcast – Barry Carr, Gary Short, Hamish Hughson – North East of Scotland User Group

Technorati Tags: , , , , , , , , , , ,

Craig Murphy: author, blogger, community evangelist, developer, speaker, runner