/egilh

Learning by doing

January 2005 Entries

I saw a clown twisting balloon figures in a market last spring. As always I was curious to find out how it worked and had a look on Google. Nothing beats learning by doing it yourself so I bought a kit at a local party supply shop; La Fabbrica Delle Feste. Their web site leaves a lot to be desired but they have a lot of stuff and are very friendly. They were out of pumps, so I got a used one for close to nothing. I was surprised to learn that twisting balloons is even simpler than it looks. I was proud of my first attempt at making a dog until I put it down on the floor and had a look at it from a distance:A dog beast with two tails but no head! The first attempts ...

.TEXT has been dead in the water for a while so I have been following the Community Server project with great interest. I was worried that it would be major PITA to upgrade but Scott Watermasysk has some great news on the future of .TEXT Community Server . In particular: There will be a upgrade tool for upgrading a .TEXT install to Community Server 1.0 Built in Search Better comment moderation support (moderated, authenticated, timed) e-mail subscriptions by post and blog RC1 should be out soon. I will give it a try on of my blogs and see if I can make it run it in parallel with .TEXT on the same machine.

Today someone asked me how to force the "File Download" dialog box to appear in Internet Explorer. I thought I knew the answer but I learned a new trick. They have a directory structure like this:/products /images file1.jpg file2.jpg The files should by default open the browser but they wanted to add a "download" link as well for people who don't know how to right click and choose "Save As…".No problem, I thought, and pointed them to How To Raise a "File Download" Dialog Box for a Known MIME Type and gave them some old code I had laying around: dim sFile dim binaryData sFile = server.MapPath(Request("dir") & Request("fileName")) set binaryData ...

Microsoft Architect's Journal : a platform where authoritative software architects from all corners of Microsoft's architect community will discuss the connection between opportunities once out of reach and the solutions that now make them possible. Software architecture is a tough thing - a vast, interesting and largely unexplored subject area. As an art, it requires intuition and understanding of well-established architectural disciplines. As an engineering practice, it leads to formation of system models consisting of parts; with descriptions of their shape and form in terms of properties, relationships, and constraints. The rationale for their existence often ...

Wow! Version 2.2 of Log Parser is just impressive. Log parser gives you SQL like query access to a lot of data sources: IIS in text, binary and DB formats. Text and CSV files XML Windows Event Log and Event Log backup files (.evt files). File system and directories Windows Registry Active Directory objects. NetMon capture files The supported output formats are just as impressive: Text, CSV XML Web log SQL SysLog server Data Grid Chart Some neat examples from the documentation:Create a chart containing the top 20 URLs in the "www.margiestravel.com" web site: LogParser "SELECT TOP 20 Target, COUNT(*) AS Hits INTO MyChart.gif FROM <www.margiestravel.com ...

Scott Watermasysk explains how to add support for the “nofollow” attribute to .TEXT.

Larry Osterman's kittens run off with keys of his laptop. My cat is a bit more of a wild animal and tried to run of with my leg instead. It was a warm summer night…and I had the house to myself. My wife and the kids were off on summer vacation while I was still working as most dads do in Italy. I went back to bachelor's status for a few weeks and read a lot of books and a watched a bunch of movies. The night in question I had chosen the final episode of the Matrix series. I turned of the light and turned up the Dolby Surround as high as only a deserted Milan in August allows. Staying in the pillow next to me in the sofa, as she usually does, turned out to be ...

This should be fun; I got a Japanese course in Italian for Christmas. I had a look during my vacation but I did not apply myself so I never got past the section with the hiragana and katakana symbols. Learning a 4th generation language (Norwegian -> English -> Italian -> Japanese :-) should keep me busy for a while. I have forgotten most of the other languages I know like German as I never had a chance to practice. A lot of the latest and greatest cool stuff is in Japanese though, so I should have plenty of exercise reading Japanese once I get over the first hurdles. Kuro5hin has some interesting pointers on learning languages but I am open for suggestions ...

SkillDrive has published a free eBook: .NET in samples. 250 pages of .NET samples in C# with documentation. Via [ISerializable]

It feels and looks great:We brought the kids out to play in the snow before sending them to bed. Not enough snow to make angels in the snow but fun anyway I wasn't so convinced on the way back though. In the center of Milan it was mostly raining this afternoon but as soon as I hit the suburbs it started snowing for real. A major PITA when you drive a BMW C1 with tiny wheels. Luckily the road was not as slippery as when I was on Christmas vacation

SQL Injection Attacks by Example covers both sides of the story: how hackers use unverified user input to break in and how to protect yourself against it. A good introduction, and a must read, if you are not familiar with SQL Injection Attacks. Via [ISerializable]

Microsoft has released Scriptomatic 2.0: A completely new version of the famous Scriptomatic, the utility that writes WMI scripts for you. (And, in the process, teaches you the fundamental concepts behind writing WMI scripts for yourself.) Unlike its predecessor, Scriptomatic 2.0 isn’t limited to writing just VBScript scripts; instead, Scriptomatic 2.0 can write scripts in Perl, Python, or JScript as well. In addition, Scriptomatic 2.0 gives you a host of new output formats to use when running scripts, including saving data as plain-text, as a stand-alone Web page, or even as XML. Scriptomatic 2.0 handles arrays, it converts dates to a more readable format, ...

The Pocket PC version of my password manager is ready. AutoType is the only feature I have not implemented on the Pocket PC yet as I don't need it. The clipboard integration works but I am unable to paste in password fields. The paste option is grayed out and Ctrl+V doesn't work either. Does anyone know how to work around this 'feature' of the Pocket PC? I'm pretty happy with the way the code organization worked out. I put both the PC and Pocket PC solution files in the same directory and common source code in a sub directory. Platform specific files are in Platform\PC and Platform\PPC. I believe this setup is better than having two separate top level directories ...

Order your new features today for the next version on the .NET Compact Framework Team wish list. My wish list: Built in serial (and Bluetooth) support. I had to build my own classes for managing the serial port to get Bluetooth working so I could send/receive SMSs via a mobile phone. Cross platform development. For my poSecrets password manager I use two solutions pointing to the same source. Using a single solution with conditional compiles could be one option. COM support (should be there in 2.0). Using (mostly) Microsoft code it is possible to use Pocket Outlook from .NET CF 1.0 but it is not possible to use the Pocket Access databases without buying 3rd party ...

The beta release of the PC Edition of my Password Manager is ready. It took me longer than planned due to vacation, sickness and other, more urgent, projects. The GUI is very simple and identical to the Pocket PC edition. Most of the code is the same. At the moment I am using two solutions pointing to the same source code files. I am not sure if this is the best way to work but it works grand for such a small project. I made the jump this morning and moved my 223 passwords and other 'little secrets' to poSecret. Main features: AES encryption of the entire file. There is no clear text data and no recovery of the password. Same file format as the Pocket PC version. ...

Microsoft has released another update for the Outlook 2003 Junk Email Filter (KB890854): This optional update provides the Junk E-mail Filter in Microsoft Office Outlook 2003 with a more current definition of the e-mail messages that should be considered junk e-mail. ... Additional updates will follow.

.NET Compact Framework 1.0 SP3 Redistributable has been released. The ~15 MB download fixes some memory corruption and stability issues. No .NET CF performance improvements as far as I can see. Via [Larkware News]

The Beat Hackers At Their Own Game With A Hackerbasher Site article suggests using a honeypot for security. I completely agree with its suggestion: always bind web sites on the internet to a hostname. This best practice applies to all web servers, not only IIS. It does not stop hackers determined to hack your server, but it stops script kiddies scanning for vulnerable web servers by IP address. Setting up the honeypot is not necessary for security if you have configured the host name on all IPs, but it allows you to check the log for hacking attempts. It also helps you verify that you have configured it correctly as it will gie you an error (Another site may be running ...

Scott Holden shares his experience on .NET Compact Framework performance It covers .NET Compact Framework in particular, but the advices applies to .NET programming in general. I'm happy to see that "keeping it simple", pays off in performance on .NET CF as well since less code is faster code and fewer objects are better for performance. DataSets haven't improved much since SP2 though, so I'll continue using CSV DataSets when I need to load datasets fast.

On the subject of Moore's Law and CPU speeds is Larry Osterman predicting the death of Linux in this decade? Interestingly (and quite coincidentally) enough, it's possible that this performance wall will effect *nix applications more than it will affect Windows applications (and it will especially effect *nix derivatives that don't have a preemptive kernel and fully asynchronous I/O like current versions of Linux do). Since threading has been built into Windows from day one, most of the high concurrency application space is already multithreaded. I'm not sure that that's the case for *nix server applications - for example, applications like the UW IMAP daemon (and ...

I used to read Dr. Dobb's Journal a lot when I was studying in Norway and later when I worked in Ireland. Only a few newsagents carry it in Italy so I haven't read it regularly in years. Then I noticed the article on CPU Speed that will be published in Dr. Dobb's soon so I decided to try to subscribe to the Dr. Dobb's. The international subscription costs $50 and includes the new "Windows and .NET edition". I was getting ready to pay when I found a referene to the "Basic Membership" that is free with the magazine subscription. A few minutes later I stumbled upon the real goldmine: All Access Membership: $19.95 per year (special limited time offer): 12 months of ...

Herb Sutter has an interesting article on hitting the speed limit of CPUs that will be published in Dr. Dobb's Journal. Moore's Law applies to the number of transistors on a CPU and continues to be valid (at least for some more time) but we're stuck at 4GHz for a while to come. Our work just keeps getting more interesting! CPU's will continue to get more powerful as they will add more concurrency capabilities, but sluggish programs will have to be rewritten to take benefit of the hyper threading and multicore CPUs. Adding more threads isn't a free lunch though. As Herb Sutter points out, concurrency has its costs: it's hard to write multi threaded programs. It is ...

Hiding the Christmas gifts from the kids I found my oldest working PC at my parents place in a closet. Amazing how technology advances in a few years. The monster below was top of the line when I finished my studies: It is a 33mhz i386 with TWO 120MB hard disks. My iPaq pictured in front of it is more than 10 faster, has more than 10 times as much memory and twice the permanent storage on its SD card! There is no room for the old PC anymore so I slaughtered the machine and took the only things I still have any use for: the 5 1/4 floppy and the HDs with the 5 1/4 bay containers. I have no idea if the disks still work but I hope they do. It would be fun to have a look ...

Worst moments of 2004: The company my wife worked for was bought by other company. They took over the most important projects and clients and filed for bankruptcy for the company they just bought. The trials still going on. The company I work for was bought by another company. In a way it was sad but I hope it all turns out for the best. I came from Microsoft in 1996 when there was only 15 people working in the company. They stopped development projects due to some bad experiences with small clients just before I started so I ended up doing NT 4.0 migration projects and training. Little by little I got a chance to do some development again, mostly NT services in ...

I found the the Amazon “Click to give“ code on Brian Sullivan's blog. I added his code in Skins\SkinName\Controls\CategoryList.ascx, before the <asp:Repeater tag, to get the link high on the page. <ItemTemplate> <h3>Donate</h3> <ul> <li> <!-- Begin Amazon Honor System Paybox --> <img src="http://s1.amazon.com/exec/varzea/tipbox/A1J1JDQWBS9GWQ/T3MYIILZNTKFV2" usemap="#T3MYIILZNTKFV2" border="0" alt="Amazon Honor System"> <map name="T3MYIILZNTKFV2"> ...