June 2004 - Posts

Reg tweaks

Mono RC

Mono has released an RC after Beta3. I was testing the code and found some nice additions to the early releases. There is now an IDE, monodevelop, which has intellisense and the whole bit. More useful, there are now a number of built in database providers. The listed ones are Oracle, PostGre, Sqlite, Sybase, and MySql. Here is a block of code to pull data from SQL Server:

using System;
 using System.Data;
 using System.Data.SqlClient;
 
 public class Test
 {
    public static void Main(string[] args)
    {
       string connectionString =
          "Server=MyServer;" +
          "Database=pubs;" +
          "User ID=MySqlServerUserId;" +
          "Password=MySqlServerPassword;";
       IDbConnection dbcon;
       dbcon = new SqlConnection(connectionString);
       dbcon.Open();
       IDbCommand dbcmd = dbcon.CreateCommand();
       string sql =
           "SELECT fname, lname " +
           "FROM employee";
       dbcmd.CommandText = sql;
       IDataReader reader = dbcmd.ExecuteReader();
       while(reader.Read()) {
            string FirstName = (string) reader["fname"];
            string LastName = (string) reader["lname"];
            Console.WriteLine("Name: " +
                 FirstName + " " + LastName);
       }
       // clean up
       reader.Close();
       reader = null;
       dbcmd.Dispose();
       dbcmd = null;
       dbcon.Close();
       dbcon = null;
    }
 }

Connection Strings

Having trouble remembering connection strings for the ever expanding number of data stores. Today I ran into this neat site: ConnectionStrings.Com

Siren Call

This week I read a couple of blogs that brought the value of compromise to mind. The first is on the writing process by Fritz Onion. He makes a point that resonated with me:

This brings me to my next compromise, which is the process of turning what I want to say into words. Once I have an 'image' of what I want to say in my head, the writing that comes form that image is always a disappointment. I'm not sure why this is, but I can honestly say that I have never written anything that I was completely satisfied with at the time of writing. Interestingly, long after I have written something I will go back and read it and be quite happy with it, but the time during which I am actually writing, it always feels like a compromise and never seems to match my expectation. The story in my head typically feels clear, concise, and compelling, but it never seems to come out quite that way.”

The second is what Don Box describes as the Taligent Effect:

what happens when a group of people put adherence to a software trend first and lose sight of the value of shipping software that people will actually use.

Striving for beauty in prose or design is like a siren call that is hard to avoid. For the most part I think we benefit. However, I guess the trick is knowing when the siren, as in the Greek myth, is leading us to project death.

Japanese Feedback

Last week we critiqued presentations from seven Japanese student teams. I was just going over the feedback. I found it interesting that even though we all came at the task from different directions and domains of expertise, there were common critiques as whole.

Google story

I’ve been following a competition to see who can become the number one google hit for a random topic, “nigritude ultramarine”.

It turns out that google gives the highest weight to backlinks from websites with high Page Ranks. So, if you wanted to get your home page to become number one, you could get all your friends whose home page is ranked number one to link to you. If the group was large enough you could push up pretty much anything.

Here is where it gets sneaky. Wikis by design have no edit restrictions and a lot of them have a pretty high ranking. You can guess what is happening. There is even a name for it, the Wiki Sandbox Effect.

It will only take one person to write a robot to programmatically add backlinks and Wikis will become a target for all kinds of backlink spam. I would think that unless google’s algorithm is altered Wikis could become a real mess.