January 27, 2005

January 19, 2005

In the land of the geek, the nerd is king

But I'm not sure I should be proud of this score...


I am nerdier than 95% of all people. Are you nerdier? Click here to find out!

PostgreSQL hits 8.0

As seen on Slashdot! PostgreSQL hits 8.0.

Official site here:
http://www.postgresql.org

Here is what is new:

http://www.postgresql.org/docs/whatsnew

ADO.NET native driver:

http://gborg.postgresql.org/project/npgsql/projdisplay.php

Delphi Driver:

http://www.zeoslib.net


Really, I have to get some time to really look into this thing sometime. In the world of Open Source databases, this one has a VERY good reputation (it has had features that MySQL is just getting for years now).

January 18, 2005

New Oracle stuff for .NET

http://www.bsdg.org/2005/01/oracles-net-developer-center.shtml

Check it out.

January 10, 2005

SQL Server 2005 Enhancements

Nice big document on MSDN that lists a lot of the changes that have happened to SQL Server 2005.

See it at http://msdn.microsoft.com/sql/default.aspx?pull=/library/en-us/dnsql90/html/sql_05TSQLEnhance.asp

Also, I'm still working on a post going over some of what we learned from Rich Hundhausen last Thursday. I'm hoping to have that one done tonight. (some, but not all. I have to leave some incentive to go see the presentation -- very good)

January 07, 2005

Mosha has a blog!!!

Mosha Pasumansky finally has a blog! Mosha is a lead engineer on the Microsoft Analysis Team, and (as I understanding) one of the lead architects of MDX and the Analysis Services security implementation.

http://sqljunkies.com/WebLog/mosha/

He also has a book: Fast track to MDX



December 22, 2004

Mozilla has 21% market share

Or so says this no-name site.

http://www.w3schools.com/browsers/browsers_stats.asp

How I learned to hate and despise Microsoft's naming convensions!

OK, here is my latest sob story...

How I learned to hate and despise Microsoft's naming conventions!
(I was trying for a "How I learned to stop worrying and love the bomb" type title -- and failed)

I've gotten big into Unit Testing lately and have been working with NUnit to do so (not directly a Microsoft product), and I decided to create some unit tests for a web app I've been writing.

Test 1: see if the web server is up! Should be a simple test, just grab a file through the web server. Note: I've actually had a case or two where the server was running fine, but IIS had blown a hose loose -- couldn't ping it, couldn't restart the service, had to reboot the computer.

OK, I'm sure there is a class to do just that, no problem. I JFGI (new acronym used by one of my colleges -- Just F**king Google It) for the page. I'll try a search term like ".NET C# web winforms download".

No luck.

I try again with different parameters. No luck.

Basically, all that I keep getting are references to ASP.NET development (actually creating a webform -- not what I'm trying to do here) and .NET domain names (like .org and .com)! Basically, any page that had anything to do with web development, c#, and happened to list a web page with a .net domain root -- it got picked up! Try it, just do a search on .NET, or .NET framework.

Next try System.Web -- I thought that would be a likely location for such a class. May the force be with you on that one.

Oh ya, there were also several thousand references to the Cassini web server! -- written in C# for displaying ASP.NET pages. Kind of cool...but NOT what I as looking for!

I search Microsoft.com. No luck there either. In some ways this was even worse.

Half a day later, I finally found what I was looking for: HttpWebRequest in the System.Net namespace. Gonna have to look into that namespace some more later. But right now, I gotta get some work done. I'm a little bit behind now.

In fact, here is the code, should anyone care. You need to include the following namespaces: using System.IO;
using System.Net;
using System.Text;

private string RetrieveWebPage(string url)
{
HttpWebRequest oRequest = (HttpWebRequest)WebRequest.Create(url);
oRequest.Credentials = CredentialCache.DefaultCredentials;
HttpWebResponse oResponse = (HttpWebResponse)oRequest.GetResponse();
Stream oStream = oResponse.GetResponseStream();
// read the stream in the encoded "utf-8" format
Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
StreamReader oReader = new StreamReader(oStream);
string sPage = "";
while (oReader.Peek() > -1)
sPage += oReader.ReadLine() + "\n";
return sPage;
}



December 16, 2004

Getting web page text (winforms)

Ever try to call a web page from client site .NET code? Most often this is doen through web services, but occationally you have information that you want to retrieve that does not exists in a web service -- only in the web page. So from .NET, how do you get it?

Like this:
private string RetrieveWebPage(string url)
{
HttpWebRequest oRequest = (HttpWebRequest)WebRequest.Create(url);
// if you are dealing with NTLM, you will need this line
oRequest.Credentials = CredentialCache.DefaultCredentials;


HttpWebResponse oResponse = (HttpWebResponse)oRequest.GetResponse();

Stream oStream = oResponse.GetResponseStream();

// read the stream in the encoded "utf-8" format
Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
StreamReader oReader = new StreamReader(oStream);
string sPage = "";
while (oReader.Peek() > -1)
{
sPage += oReader.ReadLine() + "\n";
}

return sPage;
}

December 07, 2004

New Online Book: How a computer works

Beatiful book! Lots of pictures, but a little out of date (doesn't cover 64 bit computing), but written in such a way that your mother will not be turned off by it.

http://davidguy.brinkster.net/computer/

Have fun!