/egilh

Learning by doing

August 2007 Entries

I do not use Instant Messaging as much as some of my friends but I can imagine several services that would be useful via IM. There are endless opportunities when you consider that IM can offer push as well as pull services. It looks like I am not the only one as there are several open source .NET libraries for working with Microsoft Messenger: DotMSN 2.0 supports the MSNP9 protocol. MSNPSharp extends DotMSN 2.0 with support for the MSNP11 protocol. I am busy working on several other hobby projects at the moment but I would love to put together a IM bot later this year. What kind of services you would like to access via IM?

.NET Web Service clients do not send authentication details with the requests so you get a traffic pattern like this Request 1: Client: GET someUrl Server: 401 WWW-Authenticate Basic Client: GET with Authorization header Server: 200 OK Request 2: Client: GET someUrl Server: 401 WWW-Authenticate Basic Client: GET with Authorization header Server: 200 OK The PreAuthenticate property improves the situation if you make many repeated calls to a web service. Request 1: Client: GET someUrl Server: 401 WWW-Authenticate Basic Client: GET with Authorization header Server: 200 OK Request 2: Client: GET someUrl with Authorization headerServer: 200 OK The first ...

There is a know bug in ADO that causes horrible performance with ADO if you insert a BLOB via stored procedure. Working on a (almost) real time import of data I noticed that importing blobs took forever…. I did the right thing and used stored procedures for all data access. In this case it was a mistake as it took several minutes to insert a small blob of a few hundred KB. I ended up with the workaround below. It is ugly but the least “dirty” solution I found: set oCon = CreateObject("ADODB.Connection") oCon.ConnectionString = CONNECTION_STRONG oCon.open Set oCmd = CreateObject("ADODB.Command") set oCmd.ActiveConnection = oCon oCmd.CommandType ...

Wouldn't it be fantastic if the Sun BlackBox could be used in emergency situations like this photo(shop?) shows: But, using them for Red Cross emergencies is not feasible today as the BlackBox is hungry: Cooling water supply: 60 gallons (~230 liters) per minute of cold water at 13 degrees Celsius which means a large coldwater supply or a small water supply with a serious cooler Dual 600 amp feeds power feeds High bandwidth internet connection Pretty hard to find in emergency situations, in Africa or elsewhere. It is no wonder the box is hungry considering the possible configurations: A single Project Blackbox could accommodate 250 Sun Fire T1000 servers with ...

Saying NO is important many times in life. Kids have to learn limits, you have to say NO to leave time for yourself and your family but you also have to say NO at work, especially if you are a consultant. Being a consultant does not mean that you should Con & insult but help the client reach the best possible solution. It is just too tempting to go with the flow and use XML and open source for everything. It is especially important that architects have "the balls" to say NO when clients/colleagues make requests that do not make any sense. I am the first to admit that saying YES is the simplest option to make "the problem" go away but you will pay for it in the long ...

Notte di Fiaba takes place in Riva del Garda 23/8-26/8. This years theme is "Pippi Calzelunghe". I cannot attend as I will be working this weekend so please let me know what you think of it if you go. This picture is from 2005 when the theme was “The wizard of Oz“: It starts today and continues until Sunday. You can find the program here.

While working on the next version of SocketProxy I came along a strange issue with Proxy NetworkCredentials not working. This is the code: System.Net.WebProxy uplinkProxy; uplinkProxy = new System.Net.WebProxy(txtProxy.Text); uplinkProxy.Credentials = new System.Net.NetworkCredential(txtUser.Text, txtPassword.Text); System.Net.HttpWebRequest request = (HttpWebRequest) WebRequest.Create(txtSite.Text); request.KeepAlive=false; request.Proxy = uplinkProxy; System.Net.HttpWebResponse response = (HttpWebResponse) request.GetResponse(); response.Close(); Using WireShark (ex Ethereal) I noticed ...

Windows Update failed on my PC earlier this week with error 0x80072EFD. It is a very generic error that just means that the Windows Update client did not receive a response from the Windows Update Web site. Microsoft KB article #836941 explains the steps that normally resolve the error but it did not work for me. In my case it was caused the Proxy auto configuration configuration script I am using. The PAC script works grand when browsing but Windows Update refuses to work. Temporarily disabling the PAC script and configuring a static proxy works. The proxy script below is based on one I got from Michele. It has the following features: Disables ads in Live ...

I am sure you already know about Google Labs, but if you are into technology you have to have a check out the papers written by Googlers. There is something for everyone: Algorithms and Theory (33) Artificial Intelligence and Data Mining (21) Audio, Video, and Image Processing (18) Distributed Systems and Parallel Computing (47) Human-Computer Interaction (9) Hypertext and the Web (11) Information Retrieval (22) Machine Learning (38) Natural Language Processing (20) Science (7) Security, Cryptography, and Privacy (12) Software Engineering (10) I recently read and learned a lot from these papers: Google File System: how Google stores peta byte upon peta ...

Mono has gone a long way since Miguel de Icaza started work on it in 2001. It can run binaries produced by Visual Studio and it has C# and VB.NET compilers. Mono is still working on full .NET 2.0 support but they have a lot of interesting features in the Mono namespace: Gtk# (http://gtk-sharp.sf.net): Bindings for the popular Gtk+ GUI toolkit for UNIX and Windows systems. Other bindings are available: Diacanvas-Sharp and MrProject. #ZipLib (http://www.icsharpcode.net/OpenSource/SharpZipLib/

I needed a fast and reliable queue in SQL when running some distributed tests but I did not find anything that suited my needs so I put together the simple system below. My main requirements were: support hundreds of parallel readers and writers each request in the queue must only be returned to one reader make it easy to monitor the performance of my readers and writers. It consists of two stored procedures: usp_Request_push adds one requst to the queue (RequestsQueue table) usp_Request_pop returns one request from the queue and moves it to the RequestsCompleted table The RequestsCompleted table is optional but I added it for several reasons: Track all ...

I just got this in the mail: Cool Or What? It is the tiny Leatherman Squirt S4. Tiny, but “great” when you unfold it: The Squirt S4 is tiny but it has a lot of useful features that I have missed in the past. In particular: Scissors Straight Knife Tweezers Extra-small and medium Screwdriver Small flat Phillips Screwdriver My only worry is that I will forget to remove it the next time I go by plane… I chose the S4 as it has scissors but Leatherman offers two similar models that may suit you better depending on your needs: Squirt E4 with wire strippers Squirt P4 with pliers P.S. Reminder to myself: Egil, you have to learn from your ...

This Pocket PC bug comes in several "flavors" and I have had the misfortune of encountering several of them: Reminders for appointments do not work Alarms ring but they do not pop up the notification so there is no way to turn them off! Only a hard resets fixes the problem :-( It turns out this is caused by a "feature" on Windows Mobile 2003 and newer devices. Windows Mobile runs a maintenance job at midnight. This job is scheduled to take 15 seconds but it may take longer if the device is low on memory, has a lot of data or if you have a reminder set for midnight. The end result is that the reminder is only half triggered and the reminders do not work anymore. The ...

Flashback… Compressed executables were important in the good(?) old DOS days for making reverse engineering more difficult, reducing disk space and loading time. The AsmZip utility by Francesco Balena gives similar benefits for .NET projects: a) simplified deployment: you need to distribute fewer files (often just the main EXE)b) more robust applications: end users can't break the application by accidentally deleting one of its DLLsc) fewer bytes on disk: all DLLs are compressed and appended to the main EXE filed) the ability to "hide" some of your trade secrets, for example which 3rd party controls you've usede) a slightly better protection of your intellectual ...

Jeff Atwood has a great series of posts regarding building your own PC. I have not built my own PC from scratch in a decade but I completely agree with Jeff that you should do it. You get better value for money and a system that is tailor made to your needs. But even more important, there is nothing like learning by doing. I freed up space, increased my WAF, and had some fun this spring by scavenging several old PCs and putting together a decent PC which I donated to the local school. My "server" at home has gone through endless changes and urgent hardware changes after I decided to host my domains at home. I have learned a lot about hosting, mail, DNS, hardware, web ...