Please click this logo to help me get on their beta program:

Xobni outlook add-in for your inbox








28/2/2005

Weird Windows looks

Filed under: General — Oliver Sturm @ 2:39 pm - 3 years, 4 months ago

Today I saw on the web the homepage of Jeff Relf. Of course that’s just my personal opinion, but that guy has a really weird visual setup in his Windows! The first thing I saw was this shot of a Visual Studio window (click the image for the full-size version):


(I downloaded this image to my server to avoid creating too much traffic for Jeff. The original source is here.)

If you like what you see, on the web page you can find a user stylesheet for Firefox that’ll make web pages look just the same!

25/2/2005

MSDN TV on Power Collections

Filed under: Programming, .NET — Oliver Sturm @ 8:53 pm - 3 years, 5 months ago

Peter Golde has published a note on his blog about the new MSDN TV video on Power Collections.

In the interview, Peter talks about the genesis of the project and various design decisions and he gives an overview of the library structure and the differences between the various collection classes. The whole project is kind of a collaboration between Peter, people at Microsoft who’ve helped launch the whole thing and a community built around Peter’s blog and the PowerCollections forum.

One thing that Peter specifically talks about is the BigList class (see also this post). This is a class with a similar interface to the standard List class, but it’s optimised to work efficiently with large lists, especially for operations like insertions, deletions, copies and concatenations. Peter explains the inner workings of the BigList in detail in the video.

Personally, I’ve been using PowerCollections for a while and I think it’s certainly to be recommended as a well thought through collection library. I’ve also had my problems with parts of the design, but nothing insoluble… plus, PowerCollections is not yet final so some problems have to be expected.

Advanced debugging

Filed under: Programming, .NET — Oliver Sturm @ 2:31 pm - 3 years, 5 months ago

I thought I’d pass on a collection of links to articles on debugging I’ve read today. Much of this is not new, but I guess I’m not the only one who doesn’t feel the need to use additional debugging tools every day… meaning apart from those that are integrated in the IDE. I used to do much more of that when I did more development for Linux, but right now the VS integrated debugger is the only one I’ve been using for a while. I guess that may change, though, because I’m really positively surprised how much I’ve been missing! I advise everyone to have a look!

Here we go:

Update: The March 2005 edition of MSDN magazine has another article by John Robbins (see above): Mini Dump Snapshots and the New SOS

24/2/2005

Experiences in moving to WordPress 1.5

Filed under: General — Oliver Sturm @ 7:05 pm - 3 years, 5 months ago

Yesterday, I moved my blog over to the new release 1.5 of WordPress. I had been using version 1.2.2 of WordPress previously, as packaged in Debian unstable. Now I wanted to use the downloadable version, to be more flexible in the future to do experiments.

The first problem I faced was that I didn’t want to have any downtime while I was playing around with the new version, porting my theme and everything. So started off by cloning my complete WordPress database in MySql by dumping it to an SQL file (I do that every night for backup purposes anyway) and using that file to create an exact copy of the database. I also had to grant the database user I’m using for WordPress the same rights on that new database that he has on the old one.

I untared the new distribution into its own folder and created a wp-config that used the new database with the old user account. I created a new alias in my Apache config to access the new installation in its path, leaving the old alias untouched. I accessed the new URL and I could immediately see my old blog content in the new theme! The main problem was that all the links were still wrong because I hadn’t yet changed the WordPress and blog address configuration settings, plus my old permalink structure wasn’t there anymore. After a little bit of fiddling, I managed to access the management frontend of the new installation to change the settings and recreate the permalink structure (or rather the correct .htaccess file).

Now I created a new theme by copying the Classic theme folder to a new name. I copied my own style sheet to the new theme folder (calling it style.css) and added a header to it:

/*
Theme Name: Oliver
Theme URI: http://sturmnet.org/blog
Description:
Version: 1.0
Author: Oliver Sturm
	
*/

In my old 1.2.2 setup, I had made considerable changes to the index.php and also some small ones to the comments. With the old blog in another browser window, I went and recreated these changes in the new theme system. That wasn’t very complicated, as the new files have mainly been split into parts. It’s easily possible to recognize the old content in them.

In the old installation, I had also used several plugins, most of which I could easily copy to the new plugin folder. These are the ones that I could use without problems:

The one plugin that had some problems was Syntax Highlighter Enscript, which relied on a specific formatting that the old WordPress version apparently applied to <pre> formatted text. This seems to have changed and I fixed the plugin for that (you can find the fix in this comment).

Two other problems I found were in WordPress itself. Firstly, something that hadn’t originally worked in WordPress 1.2.2: private posts didn’t appear in the blog, even when the user was logged on. I had at some time applied a fix for that problem to my old WordPress, but now I couldn’t even find that fix any longer. I read a lot of articles in the WordPress support forums before I found the fix for this problem: adding a line saying get_currentuserinfo(); in line 501 of wp-includes/classes.php (right after the comment line saying // Get private posts) did the trick this time.

The second issue I found seems to be a bug in WordPress. As you can see, my category list is shown as a hierarchical structure, with the child categories indented a bit. This specific layout suddenly wouldn’t work at all in 1.5, and the categories appeared to be unsorted. After looking around quite a while for the source of the problem, I found it: the file template-functions-category.php has a problem around line 275, resulting in the fact that the hide_empty parameter must effectively be 0 (zero) for any of the sorting and hierarchical view code to work. I’m quite sure that this is a programming mistake and I’ll go report it when I find the time. (Why do I have to register to post in the support forum? If it was easier to just drop someone a line, I’d probably already have done so.) At the moment, though, I worked around the problem by adding these parameters to the call to the wp_list_cats function in sidebar.php: children=1&hierarchical=1&sort_column=name&hide_empty=0. Problem is, now my test category is visible although it shouldn’t be… That’ll go away when there’s a real fix in the future.

So, that’s all. Oh, of course, I forgot: Finally, I switched the new WordPress installation over to be the active one. I simply changed the WordPress and Blog addresses once again and recreated the permalink structure. Then I switched the aliases in Apache around so the new blog would be the active one and voilá: one restart, no downtime at all, new blog software!

AppDomain.FriendlyName and vshost

Filed under: Programming, .NET — Oliver Sturm @ 1:24 pm - 3 years, 5 months ago

In this post, Dave Templin explains the purpose of the .vshost.exe that gets created automatically by Visual Studio Whidbey. What it also mentions is the fact that the application domain my code runs in is of course different when I run in the debugger. I found a problem with this where the FriendlyName is concerned.

I’ve been using the FriendlyName to construct names based on my application’s exe name, the same way the normal app.config files work. The problem is, as soon as I run the app in the debugger, the FriendlyName is no longer the same and the config file that’s already there isn’t found. To solve this, I was looking for a way to find out the “real” base name of my application’s exe file, without the vshost. part. Apparently, there’s no special property or anything that would let me access this information directly… maybe that would be a useful extension to the System.Diagnostics.Debugger class.

The solution was simple for the moment: I used a regular expression to do a simple replacement on the string:

  string myName = Regex.Replace(AppDomain.CurrentDomain.FriendlyName,
    @"(?<basename>.*).vshost(?<extension>\..*)", "${basename}${extension}");

Of course that’s not a perfect solution, but as it’s only relevant for a developer who may run the program in the debugger, it should be alright for now. Maybe they’ll expose some more information about this to the running app in the future so it can behave a bit more intelligently… or I’m missing something :-)

Managed Windows CE Remote API

Filed under: Programming, .NET, Pocket PC — Oliver Sturm @ 9:58 am - 3 years, 5 months ago

An interesting announcement in Gaurav Khanna’s blog: He (I think he’s a he, please tell me if that’s wrong) has got a managed implementation of the Windows CE Remote API. This is his post about CERapi (the name for his managed API).

23/2/2005

Copernic Desktop Search v1.5 Beta offers extensibility API

Filed under: General, Software — Oliver Sturm @ 9:12 pm - 3 years, 5 months ago

Copernic Desktop Search v1.5 Beta has been announced, here’s the What’s New page with the download link. The most important thing is right at the bottom:

API for adding custom file indexers
New COM API allowing third-party developers to create plug-ins enabling new file type indexing (view PDF documentation)

That’s a feature that’ll really set them apart from other products, plus it proves to me they are really listening to their customers: I’m one of those who requested that feature in the past. I’ll be sure to have a very close look at that thing.

New SAM (Skype answering machine) Forum

Filed under: General — Oliver Sturm @ 8:22 pm - 3 years, 5 months ago

A new forum for SAM, the Skype Answering Machine, is now available at www.sam-forum.tk. This is supposed to be a parallel institution to the SAM Yahoo! group.

Shared sessions in OneNote

Filed under: General, Tablet PC — Oliver Sturm @ 7:35 pm - 3 years, 5 months ago

I just read a very interesting article in Chris Pratley’s OneNote blog, titled OneNote Shared Sessions. Although I’ve been using OneNote for a long time (and lately even more on my Motion Computing M1400 Tablet PC), I had never had a close look at that feature.

Now I tried it, I find it fantastic! Not only does it simply work very well, it’s really easy to use (there’s a nice introduction at OneNoteAnswers) and it tries to be easily compatible with your network setup by using only one UDP port that can be fixed or changed through the options dialog. A fantastic accomplishment for a piece of Microsoft software! Performance seems to be absolutely acceptable, I tried it with three systems on a local network, two of which use WLAN, and also through a VPN tunnel over the internet.

I found two usage issues while playing around with it that one should be aware of:

  1. When systems (or users) join a shared session, they get a copy of the shared pages created in their own notebooks. Under specific circumstances it’s obviously possible that the page is already on that system, like from an earlier session. In this case OneNote creates an additional copy of the page, which even has the exact same name and creation timestamp as the first copy. I find it hard to think of a much better solution, but still the user has to work out which page is which and where the various copies came from. Maybe using an additional copy timestamp would have been a solution?
  2. When using Ink (also from non-tablet system) to draw into or over text fields, like when using a markup pen, the ink strokes don’t always have the exact same location, relative to the text, as they have on the other systems. So marking up some text to say “look here, that’s what I mean” is virtually impossible.
 

Update: Chris Pratley commented on my comment regarding the second issue and he’s right, of course: Using the separate text highlighting function, there’s no problem. I was missing that because I work with the pen most often :-)

22/2/2005

ILIDE# - an IDE for MSIL code

Filed under: Programming, .NET, Software — Oliver Sturm @ 4:34 pm - 3 years, 5 months ago

This is obviously not new, but I didn’t know it yet:

ILIDE#

Regular expressions considered inexpressive?

Filed under: Programming, .NET — Oliver Sturm @ 11:51 am - 3 years, 5 months ago

Lately, I’ve been reading several blog articles about regular expressions. I’d like to throw in my vote for the most important sentence in Jeff Atwood’s article Regex use vs. Regex abuse: All developers should learn to use basic regular expressions, because they’ll produce better, more flexible, more maintainable code with them.

Differing from what Jeff further states in his My Buddy, Regex article (which also features a very useful tool, RegexBuddy) , I actually do subscribe to the UNIX religion, in many ways. But subscribed or not, I think it’s important to look over the fence because every technology has its good sides, whether you like the overall philosophy or not.

I recently commented on yet another article in Frans Bouma’s blog, titled Regex fun, which is really a good example how regular expressions can be used in all kinds of applications. In this article, I want to show some of the basics and I’ll provide some links to further information at the end.

Now, what do regular expressions really do? The most important thing that regular expressions do is “matching”. What’s meant by this is simply that the expression is “matched” against another string and the first question that can be answered this way is whether it’s a match or not, in other words, does the “content” string adher to the pattern purported by the regular expression. Some very simple examples:

Regular expression Content Match?
Hello Hello there Yes (and yes, “Hello” is really a regular expression)
Wow Hello there No
lo.t Hello there Yes
foo*.bat fooooo.bat Yes
foo*.bat foobar.bat No

From the examples, you can see that there are special characters (the . (dot) and the * (asterisk)) in use. The dot stands for a single character, which is easy to understand. But what’s with the asterisk? Why isn’t the last example a match? The reason for this lies in the most important difference to “normal” wildcard systems, like that used in DOS: in regular expressions, the asterisk is a so-called quantifier and not a placeholder (like the dot).

A quantifier defines how many times the expression right in front of it may be repeated. The asterisk quantifier stands for zero to an indefinite number of occurences. That’s why foo*.bat matches fooooo.bat, but not foobar.bat. There are three other quantifiers, the ? (question mark), for zero or one occurrence, the + (plus), which stands for one to an indefinite number of occurrences and the construct {m,n}, which allows occurrences counts from m to n, inclusively.

Back to the dot for a moment: While the dot stands for a single arbitrary character, there’s another placeholder construct that’s often used: character ranges. Written in brackets, it’s possible to write down all the characters that are allowed in a specific position, like this: [abc]. For example, [Hh]ello would match Hello as well as hello. Ranges may be used, like in [A-Za-z0-9], which matches all 26 characters of the alphabet, capital and small, plus the digits from 0 to 9.

The final most important construct are the parentheses and the | (pipe sign). They are used to group other stuff together and to create either/or scenarios. The pipe is simple: the expression Hello|Hi would match either Hello or Hi, nothing else. The parentheses are most important in use with quantifiers; if there’s a quantifier behind an expression in parentheses, the complete expression is affected by the quantifier. For example, say you have to match a string that goes like this:

Apples,Bananas,Pears,Tomatoes

Obviously, the following expression could do:

[A-Za-z]+,[A-Za-z]+,[A-Za-z]+,[A-Za-z]+

But what if another line contained more than those four words? Or less than four? Now, using parentheses, you could rewrite the expression like this:

([A-Za-z]+,)+

To the close observer: of course, this wouldn’t be perfect because it would allow a final comma to appear at the end of the line. I’m aware of this, but the example is supposed to be simple :-)

Okay, that’s all I want to say about the topic at this point, because the purpose of the article is only to arouse some interest in regular expressions. I left out a lot of stuff, but mainly in the area of useful functionality, not intimidating syntax. I really recommend you follow some of the links below and find out more about this useful technology. Also, feel free to ask if you have specific questions about my examples or anything. If there’s demand, maybe I’ll write another article :-)

Some interesting content about regular expressions:

21/2/2005

McAfee VirusScan and the Startup folder

Filed under: General, Programming, Software — Oliver Sturm @ 7:50 pm - 3 years, 5 months ago

I was just writing a utility assembly for the startup handling of my applications. That thing is called ….Startup.dll, which kind of made sense to me and resides within a folder called Startup in my source code hierarchy. No problem that far. Things started to behave weirdly when I created a small test app, a separate project in a subfolder of the Startup folder. Suddenly I got an error from Visual Studio: CS0016, … can’t write to file …\test.startup.exe: access denied.

Usually this kind of problem has something to do with the funny methods that VS uses to access IntelliSense information for the IDE. That’s been a known problem in VS.NET 2003 for a long time and although I was using v2005, I thought maybe it had to do with that. Restarted, looked around… no change. I tried to create another project in another place and found out bit by bit that actually the path where the project was stored was the issue here.

To make a long story short: I found that McAfee VirusScan was the source of the problem. I’m using the Enterprise 8 version, no idea about others. That thing has a feature called “Access protection”, which performs some port blocking and others functions. Under the option name Prevent access to suspicious startup items (.exe) it implements a protection for the Startup folder… but not only for the Startup folder, but for all folders that are called Startup. Wow.

By configuring the access protection via the VirusScan Console, it’s possible to switch that option off and everything’s back to normal. Now back to my startup utility :-)

19/2/2005

Knocking on wood

Filed under: General — Oliver Sturm @ 2:01 pm - 3 years, 5 months ago

Following up on my Keying the top off posting, I just had to tell you about this other keyboard I found. Let the image speak for itself:

The original page is a little difficult to read (for me at least), but here’s the link: http://www.tanomi.com/limited/html/00040.html

erasing.org: I Ate iPod Shuffle

Filed under: General — Oliver Sturm @ 1:55 pm - 3 years, 5 months ago

Quite an unbelievable bit of poetry, paired with a really useful warning. Funny!

I Ate iPod Shuffle

16/2/2005

Novell/SUSE Linux security evaluation for EAL4+

Filed under: Linux — Oliver Sturm @ 12:05 pm - 3 years, 5 months ago

atsec information security says they have completed an evaluation of Novell/SUSE Linux Enterprise Server 9 (SLES 9) for IBM eServer based on the Common Criteria ISO standard (ISO15408), which will result in a certification for Evaluation Assurance Level 4+ (EAL4+). Read the original announcement here.

Next Page »

Powered by WordPress
© Copyright 2005-2008 Oliver Sturm