Home | Blog | Publications | Photos | Services | About | Contact

Blog Archive - September, 2007

Back to Blog index.

Thu, 27 Sep 2007 14:01:05 GMT:
UAC is here to stay

A recent TechNet magazine issue has an article titled "The Long-Term Impact of User Account Control". This article talks about Windows Vista's User Account Control (UAC) and its effect on security and application design. If you have not yet mastered UAC or its concepts, this article is a good place to start.

Tue, 25 Sep 2007 04:22:49 GMT:
Windows Server 2008 Release Candidate 0 available

Microsoft has today announced the newest beta release of Windows Server 2008: Release Candidate 0 or simply RC0. I'm not sure if Windows Server 2003 betas were ever numbered starting from zero, but they could be. Nonetheless, an exciting new beta release is here to test.

Mon, 24 Sep 2007 14:08:56 GMT:
Another quick code snippet: sending ASCII e-mail easily

Another quick C#/.NET code snippet for today. This time, the code below shows you how to easily send ASCII e-mail from the given sender to the given recipient:

private static void SendEmail(string from, string to,
string subject, string text)
{
  MailMessage msg = new MailMessage(from,to);
  msg.Subject = subject;
  msg.IsBodyHtml = false;
  msg.Body = text;
  string server = "smtp.my-isp.com";
  SmtpClient client = new SmtpClient(server);
  client.Send(msg);
}

Simply enough from .NET 2.0 or later. Keywords: How to send e-mail from .NET, howto, MailMessage, SmtpClient.

Sat, 22 Sep 2007 06:59:36 GMT:
Adone Lightroom 1.2 is available

Although there was a big fuss about Adobe's Lightroom when the first update (update 1.1) became available, I just noticed (when starting Lightroom) that the update 1.2 is now available.

You can download the free 1.2 update (for Windows) from here. Additionally, a Read Me document is available. I'm downloading my update copy as I write.

Fri, 21 Sep 2007 14:14:16 GMT:
Windows Server 2008 Improved ChkDsk (Check Disk)

I was testing Windows Server 2008 beta in a virtual machine today, and decided to give a run to CHKDSK, the venerable CheckDisk command. To my surprise, there are small but useful improvements to the command. For example, the output is now much more informative:

It's nice to have addition or enhancements to even such old commands as ChkDsk, even though it's by no meand the most important new feature in Windows Server "Longhorn".

Thu, 20 Sep 2007 04:03:38 GMT:
Quick code snippet: get bytes from stream with C#

When you are writing code to use stream objects in your C#/.NET applications, there might sometimes raise the need to get a byte array of all the bytes in the stream. Depending on the stream object, there might be ready-made possiblities for doing this, but here's one generic solution. Although it is not perfect performance-wise (speed and memory consumption), it should do well with smaller streams, like those below 50 KB. Here's the code in C#:

private static byte[] GetBytesFromStream(Stream stream)
{
  List bytes = new List();
  const int blockSize = 1024;
  // copy data block by block
  byte[] buffer = new byte[blockSize];
  int bytesRead = stream.Read(buffer, 0, blockSize);
  while (bytesRead > 0)
  {
    bytes.AddRange(buffer);
    bytesRead = stream.Read(buffer, 0, blockSize);
  }
  return bytes.ToArray();
}

Hope this helps! Keywords: get bytes from stream, copy stream to byte array, read bytes from stream object.

Tue, 18 Sep 2007 17:34:11 GMT:
Microsoft Office 2003 Service Pack 3 released

I noticed a report from eWeek that Service Pack 3 (SP3) for Microsoft Office 2003 is now ready for download. Basically, the update provides better Windows Vista support and interoperability with Office 2007, among bug fixes. Download your copy from Microsoft Downloads today.

Tue, 18 Sep 2007 15:06:25 GMT:
A tool to run C# code snippets easily

Sometimes, I find the need to run short pieces of C# code. Of course, I could fire up Visual Studio, write a simple console application (or a classic WinForms application with only a single button) and write my code there.

Although that works, but there's also a more convenient way to do that. I recently found out about a free utility called C# Snippet Compiler, which can be downloaded here (for .NET 2.0). This tool looks like a good way to solve those issues where you want to run short code snippets easily. I would guess the tool uses the Microsoft.Build.* namespaces, or the older Microsoft.CSharp namespace, which was the way to access the C# compiler in .NET 1.1.

Thu, 13 Sep 2007 14:52:08 GMT:
Current EUR/USD exchange rate with three lines in Powershell

The European Central Bank (ECB) hosts a nice XML file with the latest exchange rates. To get the latest EUR/USD exchange rate, use these three simple lines in PowerShell:

$url = "http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml"
[xml]$rates = (New-Object System.Net.WebClient).DownloadString($url)
$rates.Envelope.Cube.Cube.Cube | ? {$_.currency -eq "USD"}

Very easy thanks to the System.Net.WebClient class and its DownloadString method. But I must say I'm more and more impressed with PowerShell, there's also XML element completion with the Tab key. :-) PowerShell rocks!

Wed, 12 Sep 2007 17:13:35 GMT:
Learning Windows Server 2008 at Lehmonkarki

Our ITpro.fi software development group of five spend two days at Lehmonkärki near Lahti, with focus on Windows Server 2008 and changes it brings to developers.

Thanks Janne for organizing the event, and to everybody attending! It was an effective way to spend two days learning and networking with other professionals of the field.

Mon, 10 Sep 2007 09:44:12 GMT:
The C# language is getting more popular

eWeek reported lately that Ruby and C# languages are on the rise, that is, they are getting more popular. I'm not (yet?) a fan of Ruby, but I do enjoy C# a lot.

Some quick statistics for the record: Evans Data says that C# has increased 40 percent during the last year in EMEA, and the number of developers using C# is now at 34.9 percent. No wonder, it's a powerful language.

Sat, 08 Sep 2007 11:31:46 GMT:
Ten things you should know about Silverlight

ComputerWorld has a nice article about Silverlight, titled "10 Things You Should Know About Microsoft's Silverlight". Although plenty of advertisements are present to distract reading, I believe it's a good one and worth reading.

Thu, 06 Sep 2007 19:00:33 GMT:
Some Knowledge Base humour

Most often, I go to Microsoft's Knowledge Base to find solutions to common problems, but that doesn't mean you can't find more humouristic articles there as well. Here are some of the funniest:

Network Adapter Does Not Work if Unplugged:
http://support.microsoft.com/?kbid=228001

Sometimes Barney Starts Playing Peekaboo on His Own:
http://support.microsoft.com/?kbid=172653

PowerPoint Centimeters Different from Actual Centimeters:
http://support.microsoft.com/?kbid=189826

Office Assistant Makes Sudden Loud Noise:
http://support.microsoft.com/?kbid=269916

Program Unexpectedly Quits After You Click "Register Later" 50 Times:
http://support.microsoft.com/?kbid=243317

Solar System Needs More Memory to Run:
http://support.microsoft.com/?kbid=143366

Access Violation When Sending One Million Faxes on VFSP Device:
http://support.microsoft.com/?kbid=227925

Computer Randomly Plays Classical Music:
http://support.microsoft.com/?kbid=261186

Happy hacking!

Wed, 05 Sep 2007 14:14:20 GMT:
Silverlight 1.0 is here!

Finally, its here for Windows and Mac: Silverlight 1.0. Times are exciting for Flash-like web applications, as I never got a hang of Adobe/Macromedia Flash. But Expression seems easy enough for me, plus the .NET Framework that is behind really is powerful.

Microsoft also announced Expression Encoder, which can convert video files to Silverlight's own optimized video format.

Finally, there's the Silverlight 1.0 SDK, which is free for everyone.

Tue, 04 Sep 2007 17:25:02 GMT:
More about Server Core in Windows Server 2008

Windows Server 2008 includes a feature called Server Core, which is a stripped-down version of a normal Windows Server installation. For example, there are only few basic services, and no graphical user interface. I noticed a nice document about installing Server Core on Technet, which I recommend reading.

Now, I learned earlier today in Microsoft's Windows Server 2008 partner event in Suomenlinna that the .NET Framework cannot be installed on Server Core, but a "micro" edition is on the works. Now then, the interesting question is why the bare CLR wouldn't be able to run on Server Core. Maybe I have to test and see. :-)

Mon, 03 Sep 2007 14:10:19 GMT:
AMD's new SSE5 x86 instruction set extensions

If you have followed Intel's and AMD's competition lately, you might have noticed that as well as in the number of cores, clock speeds and cache sizes, the processor giants also compete in instruction sets. Previously, it has been Intel who decides the additions to the x86 instruction set (except maybe AMD's 3DNow), but AMD is following suit by announcing SSE5 extensions.

These new instructions are exciting, especially at these times when multimedia and rich user interfaces are here to stay and more important than ever. However, if Intel and AMD compete too much in instruction sets, I'm afraid we all loose, since if you want to write fast and generic code, you must leave the latest and greatest additions away. But I wouldn't mind seeing SSE5 support in .NET's JIT compiler/CLR, future DirectX versions, and last but not least, Intel processors.

Sun, 02 Sep 2007 09:54:12 GMT:
Apache vs. IIS, which one is most popular?

If you develop web applications, you are probably aware of the market share of different web servers, at least to some extent. For years, I guess since world wide web has existed, the Unix based Apache has been the web server. But times are changing, it seems, and IIS is gaining market share.

Now, according to latest market research, Apache is still number uno with about 48% share, but Microsoft Internet Information Server is the second most popular, at 34%. Pretty good in my opinion. But IIS 6 and soon-to-be-here IIS 7 (on Windows Server 2008, that is) really are good web servers, you cannot argue that. Especially for ASP.NET web applications which my apps are.

 

› Blog Archive