/egilh

Learning by doing

October 2005 Entries

I am going to the Windows Embedded conference next week (November 2-3) in Milano See you there?

It has been a while since I have done some serious xsl coding so I had some fun today when I was asked how to replace multiple strings in XSL. This is a piece of cake if you use a Microsoft XML parser (MSXML or .NET version) as you can call JavaScript using the proprietary msxml:script tag in xsl. Just write a simple function like this: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:egilh="http://egilh.com/" version="1.0"> <msxsl:script language="JScript" implements-prefix="egilh"> function replaceString(source, find, replaceWith) { ...

Someone asked me yesterday if the COM+ Call Time Tracker can be used dig deeper into the component to see which function is causing the high call times. It is an interesting subject, so I am posting the reply on the blog. The answer is no, COM+ only gives call information on an object level. It does not give information about internal information like function call times. This means that the COM+ objects must be split into smaller COM+ objects you want to track down the problem with COM+ call time tracking. It is an ugly solution, and only works on a "macro" level as it is not feasible to make all the functions separate COM+ objects. There are better alternatives which ...

The free Kids Programming Language development environment comes with a many fun programs, mostly games, that the kids can play around with and modify as they wish. I learned programming by playing around with the examples that came with Turbo Pascal and I really believe in Learning by doing. The working games with neat graphics and sounds is fun to play around with and tweak for kids of all ages. Kid’s Programming Language (KPL) was designed and developed based on the principle that programming is fun - and that learning is best achieved when the learning material is fun, intuitive and interactive. KPL is composed of: a readable and modular programming ...

The BlueScanner, by Network Chemistry, is a Bluetooth discovery tool for Windows. It finds all Bluetooth devices in range and the the services they offer. I had some problems on my Compaq nx7010 but you may have better luck on your PC

Fellow countryman Jon Lech Johansen (aka "DVD Jon") recently started working with Michael Robertson of MP3.com, SIPphone and Lindows Linspire fame. Wall Street Journal ran a front-page story about Jon Lech relocating so he got loads of new job offers, but he seems happy where he is: I [Michale Robertson] talked to him over lunch today and asked if he wanted to work at those other companies. "Not really," he replied in a typical minimalist Scandinavian-style reply, forcing me to ask why not. "I want to work on open systems, which is why I came to you." The best of luck to Jon in his new adventure! Via [Michael's Minute]

I have played around with Google Reader lately. I wanted to add a "subscribe with Google Reader" link to my blogs so I created a basic Google Reader subscription generator. Just enter the complete URL of you RSS feed and it generates the Google Reader subscription url: I generated the "Sub | Google" button using the Button Maker by Adam Kalsey Add the following to /blog/Skins/your skin/Controls/MyLinks.ascx if you have .TEXT <asp:HyperLink ImageUrl="~/images/SubGoogle.png" Runat="server" NavigateUrl="Google Reader Subscription URL" ID="GoogleReader"> Google Reader </asp:HyperLink> Here is the complete source code for ...

The full source code for Quake III Arena has been released under GPL. The 24MB package (when uncompressed) comes with everything you need: Quake III Arena source code ( renderer, game code, OS layer etc. ) Bot routes compiler source code Retargetable C compiler ( produces assembly to be turned into qvm bytecode by q3asm ) Assembly to qvm bytecode compiler Map compiler ( .map -> .bsp ) - this is the version that comes with Q3Radiant 200f Q3Radiant map editor build 200f ( common/ and libs/ are support dirs for radiant ) Check the internet for spinof projects that tues the build environment and code for the various supported platforms: Windows, GNU/Linux and ...

Interesting point of view by Linus; "A 'spec' is close to useless. I have _never_ seen a spec that was both big enough to be useful _and_ accurate. And I have seen _lots_ of total crap work that was based on specs. It's _the_ single worst way to write software, because it by definition means that the software was written to match theory, not reality. Looks like Linux is heading for total anarchy as well as for extinction...

Windows 2003 introduces a new RecycleApplicationInstances method in the COM+ Admin API. It allows transparent recycling of COM+ applications as existing requests are allowed to finish while new requests are routed to a new application instance. A lot better than the ShutDownApplication in Win2k which shuts down the process directly and returns an error to the calling client. Win2k3 offers several recycling policies in the "Pooling & Recycling" tab of COM+ applications: Lifetime limit: The application runs max X minutes before it is recycled Memory Limit: The application is recycled if it uses more than X Kilo Bytes of memory. A life saver if you have third party ...

I posted earlier this year on How to get COM+ call times from VB and VBScript mentioning that it is possible to automatically shut down/recycle components with high call times using the COM+ Admin API. With VBScipt it is very easy. The script below can be used from VB, VBScript or even an ASP page. It uses the egilh.comtracker to get the COM+ call times in XML: <applications> <application> <guid>{98CDBB6E-3CAF-46F2-ABE6-EABECD6AA4EB}</guid> <ID>10</ID> <processID>1792</processID> <statistics> <callsPerSecond>0</callsPerSecond> <totalCalls>0</tot ...

EFF turns 15 this year and I got my Electronic Frontier Foundation (EFF)15th Anniversary membership t-shirt today. Front: Back: I have supported EFF for several years and hope you will to if you can spare a few bucks: From the Internet to the iPod, technologies of freedom are transforming our society and empowering us as speakers, citizens, creators, and consumers. These technologies are increasingly under attack, and the Electronic Frontier Foundation (EFF) is the first line of defense, protecting our civil liberties in the networked world. EFF broke new ground when it was founded in 1990—well before the Internet was on most people's radar—and ...