<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title>Laimonas Blog</title>
	<link href="http://www.laimisnet.com" rel="self"></link>
	<updated>2008-09-24T15:13:37.000Z</updated>
	<author>
		<name>John Doe</name>
	</author>
	<id>http://www.laimisnet.com/default.aspx?fakeid=d61c0306-1cca-47b2-8c8a-65296bc0b467</id>
	<entry>
		<title>WinSCP console mode</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=217"/>
		<id>http://www.laimisnet.com/default.aspx?entry217</id>
		<updated>2008-09-24T15:13:37.000Z</updated>
		<content type="html"><![CDATA[ I am sure anyone who has to do a secure copying (scp) from windows to linux machines are mostly using an excellent tool called <a href="http://winscp.net/eng/index.php" class="sideLink">WinSCP</a>. Well I had been using it for over 3 years and only recently discovered that it has an awesome console mode! To start it in the console mode, in the command prompt run:<br />
<div class="code">
<pre>
winscp /console
</pre>
</div>
<br />
In the console mode use your basic ftp commands to operate (open, put, cd, lcd, pwd, lpwd, etc). You can even feed commands to the winscp in a separate file and it runs them upon startup. Very sweet indeed.]]></content>
	</entry>
	<entry>
		<title>Simple things are easy to miss...</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=215"/>
		<id>http://www.laimisnet.com/default.aspx?entry215</id>
		<updated>2008-09-16T18:46:48.000Z</updated>
		<content type="html"><![CDATA[ Check this piece of code:
<div class="code">
<pre>
public enum TestEnum
{
    One = 1,
    Two = 2
}

static TestEnum testMe;

</pre>
</div>

What's the value of the testMe enum? Is it (TestEnum.One, value of 1)? No, it is zero. I just saw this somewhere being declared and thought I should mention it here. The above behavior is why sometimes I like to put a value of 0 in the enum, like this: Undefined = 0.]]></content>
	</entry>
	<entry>
		<title>Firebug on Firefox 3</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=214"/>
		<id>http://www.laimisnet.com/default.aspx?entry214</id>
		<updated>2008-08-28T14:25:41.000Z</updated>
		<content type="html"><![CDATA[ Well was I happy when I accidentally shut down Firefox the other day. On the restart I was notified of a new Firebug version (still 1.2, but I believe it was b15 revision or something like that). One of the biggest reasons why I kept FX2 on my windows instance was that Firebug for FX3 was pretty much unusable and incredibly buggy. Especially when it came to Javascript debugging side of things (would hang trying to debug javascript, could not locate source lines properly from the command-line, etc.). It is looking real good now at least.]]></content>
	</entry>
	<entry>
		<title>Current favorite tool</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=213"/>
		<id>http://www.laimisnet.com/default.aspx?entry213</id>
		<updated>2008-07-12T23:42:34.000Z</updated>
		<content type="html"><![CDATA[ 'watch' linux utility is so simple yet has been so useful to me lately. I am monitoring several linux machines and this tool has come in very handy. Basically it "Executes a program periodically, showing output full screen". 
<br /><br />
One of the ways I use it is to monitor the log file and make sure that the 'PING' is written to it every x amount of time. 'watch -n 5 tail file.log' will output the last lines of the file.log every 5 seconds.]]></content>
	</entry>
	<entry>
		<title>Firefox 3 and Yahoo Sports</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=212"/>
		<id>http://www.laimisnet.com/default.aspx?entry212</id>
		<updated>2008-06-25T03:52:29.000Z</updated>
		<content type="html"><![CDATA[ The <a href="http://sports.yahoo.com" class="sideLink">Yahoo Sports</a> site was in bad shape (tabs not working, bunch of javascript errors, UI quite messed up) when viewed with Firefox 3.0 for about a week. I was keeping a close eye on the situation simple because of amusement and trying to guess when they gonna fix it. I mean you would think they would run and view their site with beta releases of the browser so that there are no surprises, after all Yahoo Sports is a big site. But I guess they didn't.
<br /><br />
I wish I knew what exactly changed that caused the site to be so crippled. And that's another good thing for open source software: they are free to innovate and change things without worrying much about breaking older stuff if the change is really worth it. I guess in short term the devs might suffer (as I am sure yahoo sports had to change their code), but probably all will benefit in the long run with taking advantage of a great browser like firefox.]]></content>
	</entry>
	<entry>
		<title>Javascript profiling with Firebug</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=211"/>
		<id>http://www.laimisnet.com/default.aspx?entry211</id>
		<updated>2008-06-18T05:10:45.000Z</updated>
		<content type="html"><![CDATA[ <p>
  I decided to blog today about one of my favorite (and least talked about) Firebug feature: Javascript Profiling. This could be become very relevant with web apps increasing in client side complexity and functionality. Also browsers are starting to support various advanced concepts and controls that will invite even more javascript development.
  I personally don't do javascript profiling often. More likely I will use it to make sure that the rough numbers I see after profiling don't look anything out of ordinary. For instance, one of the web apps I was prototyping, I was using jquery to select various html dom elements in a very inefficient way. Since it was a prototype, I really didn't care as long as I got the functionality in and could see how things worked. Once time came for cleanup, I used profiling to see what places I am making incredible amount of calls needlessly.
  So to get started, with Firebug up and visible (F12), click on "Profile" tab.
  </p>
  <img src="images/entries/start.png" alt="start"/>
  <br />
  <p>
  Click on "Profile" again to stop it. If you were running this on an empty page, you will see "No activity to profile." text. But if there was some javascript running (something running periodically for instance), you would see some timing data coming in. This is a great way to see what the site is running on a periodic bases by the way.
  To illustrate time measurement I will use a silly example. Let me create a simple page that when clicked on a button will find all the spans with-in divs with attribute "doHide" set to true and hide them. To do this, I will use jquery for selecting:
  </p>
  <div class="code">
  <pre>
  function hideThem() {
    $("div > span[@doHide=true]").hide();
  }
  </pre>
  </div>
  <p>
  I will start profiler running, click on the Hide them button and click on "Profile" again to get the results. Here is how they look:
  </p>
  <img src="images/entries/profilefirst.png" />
  <br />
  <p>
  So, 216 calls to hide some spans. That won't do. How about we just assing a special class to the spans and use that in selecting the spans to hide:
  </p>
  <div class="code">
  <pre>
    $(".hideSpan").hide();
  </pre>
  </div>
  <p>Results:</p>
  <img src="images/entries/profilesecond.png" /><br />
  <p>
  Kind of better since total time now is really negligible (unless the number of spans being hidden increases a lot). 168 calls, less, but still a lot. 
  Again, you do this only if you notice something is working slower than it should. Don't get bothered much with optimizing simple javascript, make it readable and cross-browser usable your first priority. But from time to time check your work if you feel that javascript is awefully slow and you are looking to speed it up. By using the profiler you will know where to speed it up.
  </p>]]></content>
	</entry>
	<entry>
		<title>Storing day values</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=210"/>
		<id>http://www.laimisnet.com/default.aspx?entry210</id>
		<updated>2008-05-21T04:43:01.000Z</updated>
		<content type="html"><![CDATA[ This is very simple trick and I am posting this solely for the purpose that it might help a beginner developer.
<br /><br />
While in a process of learning asp.net mvc I am building a sample website where I needed to store user selected days. Imagine input area that looks like this:
<br /><br />
<div class="code">
<input type="checkbox" name="days" value="Mon" />Mon
<input type="checkbox" name="days" value="Tue" />Tue
<input type="checkbox" name="days" value="Wed" />Wed
<input type="checkbox" name="days" value="Thu" />Thu
<input type="checkbox" name="days" value="Fri" />Fri
<input type="checkbox" name="days" value="Sat" />Sat
<input type="checkbox" name="days" value="Sun" />Sun
</div>
<br />
A good way to store this in your model and storage (DB, files, etc) is in a Flags Enum: 
<br /><br />
<div class="code">
<pre>
[Flags]
public enum Days
{
    None = 0,
    Mon = 1,
    Tue = 2,
    Wed = 4,
    Thu = 8,
    Fri = 16,
    Sat = 32,
    Sun = 64
}
</pre>
</div>
<br />
Only one field required and no need to do string manipulations, just OR or ANDs to get the value selections. Again, very simple stuff, but might be not so obvious to some.]]></content>
	</entry>
	<entry>
		<title>TSearch2 and 'default' configuration</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=209"/>
		<id>http://www.laimisnet.com/default.aspx?entry209</id>
		<updated>2008-05-13T03:27:16.000Z</updated>
		<content type="html"><![CDATA[ PostgreSQL database has this very neat free text search engine called tsearch2 that used to come as add-on, but now is part of the installation. When emitting a tsearch2 query you can specify which configuration to use (english, german, or something other special) which dictates how the words are parsed etc. Since the 8.3 release of postgresql which includes tsearch2 the 'default' configuration is gone and the existing code can break. I found a quick way to create a default one by duplicating any of the existing configurations (in my case english) by executing this:
<br /><br />
<div class="code">
<pre>
CREATE TEXT SEARCH CONFIGURATION public.default (
    COPY = pg_catalog.english
);
</pre>
</div>

]]></content>
	</entry>
	<entry>
		<title>Podcasting and me</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=208"/>
		<id>http://www.laimisnet.com/default.aspx?entry208</id>
		<updated>2008-05-06T02:59:02.000Z</updated>
		<content type="html"><![CDATA[ So over the course of the last year I really got into podcasting. I recently reviewed my podcast subscriptions and was amazed to find out that I am subscribed to a total of 33 music podcasts! With the help of Mediafly I organized the subscriptions so that my music channel at all times has about 10-14 different episodes. Depending on what I feel like listening I can choose to go with a bit of rock, maybe sometimes with ambient, eclectic, of course Trance (dominating my subscription list), even classical music. I am almost reaching a point where I am thinking to do a review of the best of trance podcasts available with ratings in different areas. Let's see if I ever get around doing that. But I think it would be useful as right now if you are a new podcast listener you might choose shows that are not as well produced or get released very rarely.
<br /><br />
Besides music the other big channel I have is Sports and then Comedy.
]]></content>
	</entry>
	<entry>
		<title>A visit to a bookstore</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=207"/>
		<id>http://www.laimisnet.com/default.aspx?entry207</id>
		<updated>2008-05-02T04:41:35.000Z</updated>
		<content type="html"><![CDATA[ Reading is one of my hobbies, but I couldn't remember the last time I went to the bookstore before I did so last weekend. I needed to do a more in-depth check on the book I was considering buying and it being a nice day and all I decided to go to the closest Borders. Well let me tell you, I was amazed at how much the computer book area had changed. That particular borders some years ago had one of the best Software book section volume and quality wise. Now it is much smaller but most importantly the selection is miserable. Nothing beyond basic fluff.
<br />
Oh well, it didn't upset me at all. On contrary it was good to see a business enterprise adjust to the market conditions and repositioning their business to the changing customer needs (I saw much more open space, more inviting seating areas, cafe, etc that all the bookstore customers now look for).]]></content>
	</entry>
	<entry>
		<title>SGEN utility</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=206"/>
		<id>http://www.laimisnet.com/default.aspx?entry206</id>
		<updated>2008-04-29T14:47:45.000Z</updated>
		<content type="html"><![CDATA[ After a long break of silence I am attempting yet again get back into blogging. I will start with sharing something I learned about two months ago related to the object serialization.
<br />
<br />
I imagine many intermediate to advanced programmers are well familiar with xml serialization. One of the areas where you can use this is in storing/retrieving configuration files. Take an instance of the class that represents some configuration settings and serialize it upon the save/exit of your application. The next time you run your app again you can deserialize from the hard drive to use in the appliation. However there are some gotchas to watch out for. One of the desktop apps I was working on from time to time was failing while running under Windows Vista. The exception stack trace gave the clues that the problem is with xml serialization, but the actual message was rather confusing, stating that the csc.exe process could not run from the default .net framework installation. I was puzzled thinking why is csc.exe process is being spawned here at all? Well it turns out that that's how XmlSerializer works. When you write the following:
<br />
<br />
<div class="code">
<pre>  
    XmlSerializer s = new XmlSerializer(typeof(EmailConfig));
    s.Serialize(outputStream, config);
</pre>
</div>
<br />
.NET Framework implementation will actually build a serializer at runtime for your class by inspecting the type's properties and will compile that serializer and run it. I never expected this behavior, but it makes sense. I just wasn't aware of it. If you have many places where you are de/serializing or if your app cannot spawn any other processes you could benefit from this little utility called sgen. It comes with the .net framework installation. Check more in the documentation on sgen options but in short you point sgen to a .net assembly and ask it to generate corresponding xml serialization assembly. Since your assembly might have a lot of types and you serialize only a few you can specify to generate serializers only for the specific type(s). Then, when you ship your application bits ship the serialization assemblies together. The XmlSerializer will first look for the XmlSerialization assemblies (named YOURASSEMBLYNAME.XmlSerializers.dll) and see if it contains the serializer for the type it needs. If it finds it, uses it, otherwise faults back to generating code at run-time with the C# compiler.
<br />
<br />
I ended up modifying the build to generate the required serialization assemblies with the needed types as a post-build step. And the mystery exception went away.
]]></content>
	</entry>
	<entry>
		<title>Lucene.net is in</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=205"/>
		<id>http://www.laimisnet.com/default.aspx?entry205</id>
		<updated>2008-02-11T06:14:27.000Z</updated>
		<content type="html"><![CDATA[ I just hooked up <a href="http://incubator.apache.org/lucene.net/" class="sideLink">Lucene.net</a> for running searches for this blog. I generate the search index offline and then uploaded it through FTP. The only thing I am missing is automating the generation and upload process. I shall add that soon as well.
<br /><br />
If you want to learn more about Lucene.net, take a look at the documentation written for Java version of Lucene, since Lucene.net is a straight port of it. It might be not obvious at first and you will wonder where all the documentation is located. So just visit the Lucene java pages and you will find most of what you need there.
<br /><br />
By the way, ever since I had the site down the last time the blog entries in the google reader are all out of order. Anyone has any ideas what I can do to force google reader to refresh the entries for this blog?]]></content>
	</entry>
	<entry>
		<title>Blog entries out of whack</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=204"/>
		<id>http://www.laimisnet.com/default.aspx?entry204</id>
		<updated>2008-02-05T14:23:45.000Z</updated>
		<content type="html"><![CDATA[ So, yesterday I took this blog down, upgraded the DB, and updated the blog code which was rewritten to use NHibernate instead of my own "home grown" ORM written way back in '04. The move went smoothly (although I do have some minor issues editing entries) with one glitch: the google reader subscription went all nuts. This morning I went to the reader and it showed this blog as having 64 new entries and the order is all out of whack. Oh well ... nothing really changed in the RSS output as the entry ids and guids didn't change. Maybe while the blog was down reader did some update and then did another one when it came back.]]></content>
	</entry>
	<entry>
		<title>Database versioning related</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=202"/>
		<id>http://www.laimisnet.com/default.aspx?entry202</id>
		<updated>2008-02-02T16:03:50.000Z</updated>
		<content type="html"><![CDATA[ There is a great series of blog posts being released on <a href="http://www.odetocode.com/" class="sideLink">OdeToCode.com</a> blog starting with <a href="http://odetocode.com/Blogs/scott/archive/2008/01/30/11702.aspx" class="sideLink">"Three Rules for Database Work"</a> post. In my first workplace we were running under very similar rules and concepts for versioning a database. For a quite large projects and 15-20 developers, it worked rather well. Of course you had to be disciplined as hell and couple of in-house built tools made the job a bit easier and more automated. <br /><br /> The rules and techniques the blog author is talking about really applies to the systems that are very database intensive, meaning complex DB schema, rules, integrity checks, etc etc etc (basically any solid application that uses database :) ). I have used a different approach to database versioning with Migrator for .NET. It is the port of migrations concept used in rails. The original author had abandoned the project. But just recently I found out that someone else is taking over and right now the source code is on google's code repository. I blogged about using Migrations <a href="http://www.laimisnet.com/default.aspx?entryid=160" class="sideLink">before</a>.  I guess the official repository for the source and other project information now is located at <a href="http://code.google.com/p/migratordotnet/" class="sideLink">http://code.google.com/p/migratordotnet/</a> . ]]></content>
	</entry>
	<entry>
		<title>SlickRun</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=201"/>
		<id>http://www.laimisnet.com/default.aspx?entry201</id>
		<updated>2008-01-29T01:34:48.000Z</updated>
		<content type="html"><![CDATA[ Recently I had to rebuild my development machine, and for the life of me I could not remember the name of one of my favorite and frequently used utilities. And finally I got it today, <a href="http://www.bayden.com/SlickRun/" class="sideLink">SlickRun</a>. Everywhere I searched "Launchy" utility kept on creeping up. I tried Launchy out, but it was "too fat" for my needs. Launchy looks more impressive than SlickRun with better graphics and additional features (also skins, plugins, etc), but SlickRun suits me better. <br /><br /> In case you haven't tried SlickRun before, it comes with bunch of shortcuts already configured for you. For me most them are not that useful since they point to the iexplorer combined with some url. To clean the initial shortcut list, go to your drive:\documents and settings\youryousername\Application Data\SlickRun and clear or modify SlickRun.srl file. Restart SlickRun and configure your own shortcuts. ]]></content>
	</entry>
	<entry>
		<title>Music podcasts</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=200"/>
		<id>http://www.laimisnet.com/default.aspx?entry200</id>
		<updated>2008-01-25T22:15:57.000Z</updated>
		<content type="html"><![CDATA[ UPDATE: the entry has been erased the music widget has been moved to the right column of this blog.]]></content>
	</entry>
	<entry>
		<title>Sports Podcasts</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=199"/>
		<id>http://www.laimisnet.com/default.aspx?entry199</id>
		<updated>2008-01-23T16:27:02.000Z</updated>
		<content type="html"><![CDATA[ In the last year or so I got deeply involved in the podcasting area. Besides working for a company that provides software for managing syndicated media, I am an avid listener of many podcasts (right now I have about 50 different subscriptions to podcasts in areas of comedy, education, sports, etc). Here is a cool little widget showing my sports podcast subscriptions:
<br /><br />
<!-- START MEDIAFLY WIDGET CODE -->
<div><script src="http://www.mediafly.com/widget/widget.aspx?code=PUbwgjmvGEs8yndt" type="text/javascript"></script>
<div class="mediaflyOutsideNotice"><a href="http://www.mediafly.com/">Powered by Mediafly</a></div></div>
<!-- END MEDIAFLY WIDGET CODE -->
<br />
Widget like shown above is easy to make as long as you have an account with Mediafly. The actual widget creation is still "hidden" from the public, but should become available to all soon.]]></content>
	</entry>
	<entry>
		<title>Weekend with HTML and CSS</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=198"/>
		<id>http://www.laimisnet.com/default.aspx?entry198</id>
		<updated>2008-01-22T22:33:29.000Z</updated>
		<content type="html"><![CDATA[ This weekend I spent sometime by reviewing some of the CSS and HTML design techniques. Even though that is about 1% of my job, it cannot hurt to know some styling and design techniques. From time to time I end up having to code up some html. I am not gonna go into details what I learned because I don't feel like blogging much about CSS and HTML (not a big fan of the two), but there is something short and sweet I found out that I thought I should blog about. 
<br /><br /> 
Not as much now, but in my previous jobs I used to have to create html forms for inputing some user information or contract information, etc. Amazingly, I never used or ran into a &lt;label&gt; html tag. For instance, let's say you want to html that asks for the email address. You could code this as: <p> 
<div class="code"> 
<pre>     
Email &lt;input type="text" /&gt;
</pre> 
</div> 
</p>  but it is better to do it like this: 
<p> 
<div class="code"> 
<pre>     
&lt;label&gt;Email &lt;input type="text" /&gt; &lt;/label&gt;
</pre> 
</div> 
</p>  It is better from usability stand point as the people using assistive devices can now know for what each information each field is asking. &lt;label&gt; doesn't have to wrap the element, you can have your code be like this as well: 
<p> 
<div class="code"> 
<pre>    
&lt;label for="email"&gt;Email&lt;/label&gt; ... some more code&lt;br /&gt;
&lt;input type="text" name="email" /&gt;
</pre> 
</div> 
</p> 
Another benefit is that now you can style all the "labels" properly with CSS.  Oh, and I also learned about &lt;em&gt; html element. Again, things like that is easy to miss if you are not in design work. But basically this element is supposed to <em>emphasize</em> the text between the tags (by rendering it in italics).  OK, this was all simple stuff, but add this to other CSS tricks and HTML crap I learned , I am sure the knowledge will come in handy on some project.]]></content>
	</entry>
	<entry>
		<title>Mounting ISOs in windows</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=197"/>
		<id>http://www.laimisnet.com/default.aspx?entry197</id>
		<updated>2007-12-17T21:44:20.000Z</updated>
		<content type="html"><![CDATA[ Today after downloading vs.net 2008, I needed a quick way to mount DVD iso image in windows. Recently I have been mounting all ISOs through Parallels (Mac VM for XP and other OSs) so I had no tool for windows. I found one awesome and simple utility from MS called "Virtual CD-ROM Control Panel". I found this app in <a href="http://www.tech-recipes.com/rx/620/xp_small_free_way_to_use_and_mount_images_iso_files_without_burning_them" class="sideLink">this page</a>, you can also download it directly <a href="http://download.microsoft.com/download/7/b/6/7b6abd84-7841-4978-96f5-bd58df02efa2/winxpvirtualcdcontrolpanel_21.exe" class="sideLink">here</a>. Works great. Just read the Readme.txt file for instructions how to mount/unmount the isos. <br /><br /> This did make me wonder why windows OSs don't have ISO mounting utility exposed to a user (right click context menu or something), or do they and I am simply not aware of it?  ]]></content>
	</entry>
	<entry>
		<title>Remove test MSI packages</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=196"/>
		<id>http://www.laimisnet.com/default.aspx?entry196</id>
		<updated>2007-11-12T17:36:06.000Z</updated>
		<content type="html"><![CDATA[ Ah, a sweet little shortcut to uninstall your msi package if you know your product id. 
<br /><br />

<div>
msiexec /x{YOURPRODUCTGUID}
</div>

<br />

Usually you uninstall by calling 'msiexec /x mymsipackage.mis' command line, but I managed to destroy the mymsipackage before uninstalling. I knew there had to be a way, otherwise 'Add/Remove' control panel dialog would not work unless it kept the installation msi packages, which I don't think it does. A bit of the search in the registry revealed exactly what I was looking for, msiexec /x{GUID} option.]]></content>
	</entry>
	<entry>
		<title>Headache</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=195"/>
		<id>http://www.laimisnet.com/default.aspx?entry195</id>
		<updated>2007-11-09T19:23:01.000Z</updated>
		<content type="html"><![CDATA[ I know I know, no blog entries in forever. I am attempting to get back on this. So I thought I will share a little headache I was experiencing just five minutes ago.
<br /><br />
While going through the WiX tutorial on how to build the MSI installation packages, I saw a C++ example on how to build GUID generator. I thought, heck, I haven't written or attempted to compile any C++ code in forever, why not to do it right now?

So I took this piece of code:

<div class="code">
<pre>
#define _OLEAUT32_

#include &lt;stdio.h&gt;
#include &lt;unknwn.h&gt;

GUID guid;
WORD* wstrGUID[100];
char strGUID[100];
int count, i;

int main (int argc, char* argv[]) {
  if (argc != 2) {
    fprintf (stderr, "SYNTAX: UUIDGEN &lt;number-of-GUIDs-to-generate&gt;\n");
    return 1;
    }
  count = atoi (argv[1]);
  for (i = 0; i &lt; count; i++) {
    CoCreateGuid (&amp;guid);
    StringFromCLSID (&amp;guid, wstrGUID);
    WideCharToMultiByte (CP_ACP, 0, *wstrGUID, -1, strGUID, MAX_PATH, NULL, NULL);
    printf ("%s\n", strGUID);
    }
  return 0;
}
</pre>
</div>
<br />
and attempted to compile it. First, it took me about 10-15 minutes to remember how one creates c++ project in visual studio. After I finally got that part, the beautiful and expressive compiler errors started popping up with crypting &amp; * &amp; * scattered all over. It is a bit upsetting that one forgets c++ so easily after switching to managed world more than 4-5 years ago. But I am proud to say that with a bit of code tinkering and remembering what pointers are and such, I was able to compile and run it. The modified code:
<div class="code">
<pre>

#define _OLEAUT32_

#include &lt;stdio.h&gt;
#include &lt;unknwn.h&gt;

IID guid;
LPOLESTR wstrGUID;
char strGUID[100];
int count, i;

int main (int argc, char* argv[]) {
  if (argc != 2) {
    fprintf (stderr, "SYNTAX: UUIDGEN &lt;number-of-GUIDs-to-generate&gt;\n");
    return 1;
    }
  count = atoi (argv[1]);
  for (i = 0; i &lt; count; i++) {
    CoCreateGuid (&amp;guid);
    StringFromCLSID (guid, &amp;wstrGUID);
    WideCharToMultiByte (CP_ACP, 0, wstrGUID, -1, strGUID, MAX_PATH, NULL, NULL);
    printf ("%s\n", strGUID);
    }
  return 0;
}
</pre>
</div>

Change a definition here, do the init there, etc... My first C++ code compiled in over 3 years or so. Ouch ... Oh by the way, here is the output with cmd args of '1':
<br />
<div class="code">
{FF64B135-DE46-40E5-A253-A15D1B9A7BD2}
</div>
<br />
Let me tell you, small exercise like that warmed up my brain in no time.]]></content>
	</entry>
	<entry>
		<title>Hackers @ Microsoft</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=194"/>
		<id>http://www.laimisnet.com/default.aspx?entry194</id>
		<updated>2007-10-05T15:09:35.000Z</updated>
		<content type="html"><![CDATA[ So at the end of August this new blog popped up on my radar, at the time titled "hackers @ microsoft". I thought, hmm, ok  lame name, but why not to subscribe and maybe I will get some news or information on various security topics, etc. Well after a month or so of silence, the next time the post comes up announcing a title change to "%41%43%45%20%54%65%61%6d". And that is about it. Oh my, how cool! Did MS just put in charge some 13 year old who just finished watching (insert here any dumb Hollywood hacker movie title here) of one of their security blogs? Really does seem so. So far ACE Team hasn't posted anything interesting or worthwhile reading. They did however make sure to get a "cool" name.<br /><br />In any case, I should not whine about other blogs, because I am definitely not doing a good job keeping this one up. Maybe I should switch to a different name and get inspired that way?<br />  ]]></content>
	</entry>
	<entry>
		<title>This cannot be left out</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=193"/>
		<id>http://www.laimisnet.com/default.aspx?entry193</id>
		<updated>2007-09-08T21:27:03.000Z</updated>
		<content type="html"><![CDATA[ A little comment on the article <a href="http://www.ajaxninja.com/?p=134" class="sideLink">here</a> presenting 10 awesome firefox extensions for developers and bloggers. Firebug was left out! That's equivalent to in the list of 10 largest countries leaving out Russia. Doing web development and not utilizing firebug is like going to work naked.]]></content>
	</entry>
	<entry>
		<title>InputAttributes</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=192"/>
		<id>http://www.laimisnet.com/default.aspx?entry192</id>
		<updated>2007-09-06T15:57:30.000Z</updated>
		<content type="html"><![CDATA[ Continuing the trend of talking about my recent finds, here is small little piece of ASP.NET 2.0 change that I missed. If you program with asp.net, you know that the asp:Checkbox, asp:Radiobuton type controls on the client side emit the following markup:<br />
<div class="code">
<pre>
&lt;span&gt;&lt;input ... /&gt;&lt;/scan&gt;
</pre>
</div>
<br />
When you manipulate the control on the server side and try adding attributes (such as onclick, style, etc.), the attributes are added on the span and not on the input control. I don't believe there was a way to change this in 1.1 and so at times I used to revert to javascript that would wire my needed input controls with extra functionality. Actually having a separate javascript file that wired up the client side functionality was not bad at all and would increase the separation of concerns in my code. But this was not feasible or required at all times, thus decorating inside input control was annoying.
<br />
So what I missed was the InputAttributes property of the Checkbox and radiobutton (and maybe some other asp.net control has that). That way you can now decorate both, span around and the input control inside. Sadly I didn't notice this until a month or so ago. I guess I should keep the "wishlist" of missing functionality and verify it with each new release.]]></content>
	</entry>
	<entry>
		<title>Multiple file renames under windows</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=191"/>
		<id>http://www.laimisnet.com/default.aspx?entry191</id>
		<updated>2007-08-27T04:19:17.000Z</updated>
		<content type="html"><![CDATA[ I cannot believe I discovered this only two days ago (after using windows since about v3.1). You can rename multiple files at the same time. Let's say, select two files and press F2 (for rename) in windows explorer. One of the file names will switch to the edit mode. Key in the new name and press enter. I thought that was pretty cool. Surprised it took me over 10 years to notice.]]></content>
	</entry>
	<entry>
		<title>VS.NET keyboard shortcut - F8</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=190"/>
		<id>http://www.laimisnet.com/default.aspx?entry190</id>
		<updated>2007-08-19T04:41:35.000Z</updated>
		<content type="html"><![CDATA[ I try to use mouse as little as possible when I program. Most of the IDEs are great in providing keyboard shortcuts for almost any action that you can perform using a mouse. For the reason unknown to me, only recently I got familiar with VS.NET's F8 keyboard shortcut. It is most useful when after compiling the code you want to jump from one error line to the other. Basically it iterates over the list of code locations. Before I would open the "Errors" tab and double click each error message separately. Now compile and F8 away until all the errors are fixed.
<br /><br />
Something I found related to this, was the list of the shortcuts presented in a nice <a href="http://www.codinghorror.com/blog/files/Visual%20Studio%20.NET%202005%20Keyboard%20Shortcuts.htm" class="sideLink">page</a>]]></content>
	</entry>
	<entry>
		<title>Implicit casting operator</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=189"/>
		<id>http://www.laimisnet.com/default.aspx?entry189</id>
		<updated>2007-08-19T01:35:27.000Z</updated>
		<content type="html"><![CDATA[ I haven't run into implicit casting operator until couple weeks ago while implementing some DSL type interface for one of the libraries I was building. A pretty cool find and can be quite useful in making your code look nice. Basically what implicit casting operator allows you to do is the following:

<div class="code">
<pre>
    Sometype type = new Sometype();

    UnrelatedType another = type;

</pre>
</div>
<br />

You cannot assign unrelated types to each other. But if the "Sometype" has an implicit casting operator for the "UnrelatedType" defined, then it could work.

Most of the times I probably would want to avoid things like that because it can be confusing to see statements like above. However, in some cases this makes your code look nice. <a href="http://andersnoras.com/blogs/anoras/archive/2007/07/09/behind-the-scenes-of-the-planning-dsl.aspx" class="sideLink">Here</a> is the article that shows code using implicit casting operator.]]></content>
	</entry>
	<entry>
		<title>Search for search on google</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=188"/>
		<id>http://www.laimisnet.com/default.aspx?entry188</id>
		<updated>2007-07-27T19:08:14.000Z</updated>
		<content type="html"><![CDATA[ If you search for term 'search' on google, google.com comes back as the eight result (at the time of this query for me). Live, yahoo, and even MySpace is ahead. Useless info, but I found it interesting neverless...]]></content>
	</entry>
	<entry>
		<title>A little TryGetValue gotcha</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=187"/>
		<id>http://www.laimisnet.com/default.aspx?entry187</id>
		<updated>2007-07-26T17:07:40.000Z</updated>
		<content type="html"><![CDATA[ Well it is not really a gotcha, but more like the behavior I didn't expect. Let's say you have a Dictionary instance with key and value being strings. Simplified code snippet:
<div class="code">
<pre>
string check = "somevaluehere";

dictionary.TryGetValue("somekeyhere", out check);

return check;
</pre>
</div>
After running this, if the dictionary doesn't have a value for a key "somekeyhere", the check variable is set to null. I was thinking it would just stay "somevaluehere". Not to be, as it gets reset to null instead. Good to know.]]></content>
	</entry>
	<entry>
		<title>Recent trend</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=186"/>
		<id>http://www.laimisnet.com/default.aspx?entry186</id>
		<updated>2007-07-15T17:34:43.000Z</updated>
		<content type="html"><![CDATA[   While going through various blogs I am noticing an increasing trend: emergence of publications, blogs, and articles on how to increase your productivity and stop "wasting time". About time. With so many useless web 2.0 services popping up, this was bound to happen sooner or later. As it is always the case with humans however, instead of stopping the damaging activities we come up with ways to be more efficient at them.<br /><br />Personally, I am really glad to have avoided all the social networking sites and things like twitter. They are so much about "me, me, me" - it is a bit sick but mostly sad. There was generation x, generation d, and this generation should be called generation me (or generation I). Well it is what it is. One aspect I do appreciate about things like facebook or myspace is the technical side of it. They are rather large and complicated systems with a lot of visitors and huge amounts of data being passed around.<br />]]></content>
	</entry>
	<entry>
		<title>Replacement for RSS.NET</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=185"/>
		<id>http://www.laimisnet.com/default.aspx?entry185</id>
		<updated>2007-07-12T15:33:02.000Z</updated>
		<content type="html"><![CDATA[ Not too long ago I was talking about RSS.NET and how it is not open source anymore. So I turned to look for the open source alternatives. Maybe even a project where I could contribute. The search in CodePlex turned up a few projects. I decided to evaluate FeedDotNet and ASP.NET RSS Toolkit.<br /><br />RSS Toolkit project is a rather interesting one and has "strange" capabilities. The consuming feeds side has features such as compiling RSS endpoint into the library giving you a strongly typed access to the feed. Not sure where or why one would do such a thing, but I guess it is useful to someone. It also exposes bind-able objects so that you can use RSS as a data source for your grids or what not. It has a http handler that returns RSS of your choice. And maybe more things, but these are the features I saw and tried it out a bit. The feed generation part was the least favorite here. I didn't see any points where other namespaces elements (modules) could be added (such as iTunes or DC, or others). Overall RSS Toolkit looked way too "Microsoft" where everything is hidden from you with the interface made to look as easy to use as possible, yet you lose some flexibility and power as well.<br /><br />FeedDotNet I absolutely loved. Simple yet extensible. Has support for iTunes already built in. And if you want you can build more modules and extended it even more. It really was the most similar to RSS.NET that I could find. Lightweight, yet powerful. I wish I could say more about it, but there is not much to say except: if you need to expose or consume some data in RSS, use FeedDotNet.<br /><br />This is not to say that RSS Toolkit sucks, but I think it has too much stuff. I am sure it is a fine library and many will find it useful, but I am sticking to FeedDotNet for now.  ]]></content>
	</entry>
	<entry>
		<title>Anniversary</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=184"/>
		<id>http://www.laimisnet.com/default.aspx?entry184</id>
		<updated>2007-07-10T03:05:07.000Z</updated>
		<content type="html"><![CDATA[ Hard to believe, but in couple weeks it will be two years since I started this blog. I just realized that by looking down in the Archive links. Seems like a very long time. Happy birthday blog.  ]]></content>
	</entry>
	<entry>
		<title>Here comes the spam</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=183"/>
		<id>http://www.laimisnet.com/default.aspx?entry183</id>
		<updated>2007-06-30T01:00:23.000Z</updated>
		<content type="html"><![CDATA[ I have moved this blog to a new host about two months ago. Ever since I did that, the spam comments magically stopped. I do have spam protection through akismet, but some of them would sneak through once in a while. I think the reason why it stopped is because the site's IP address have changed. Which leads me to believe that once the spammer mines the site for an attack, the IP is being used to access it as to reduce the time it takes to resolve DNS name (and it also reduces the overall network traffic). In any case, I just had the first spam comment posted. Back to the usual spam report/delete process.]]></content>
	</entry>
	<entry>
		<title>Google Docs Update</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=182"/>
		<id>http://www.laimisnet.com/default.aspx?entry182</id>
		<updated>2007-06-29T17:32:29.000Z</updated>
		<content type="html"><![CDATA[  I really despise large document and spreadsheet suites (MS Office, OpenOffice) due to its share size and the fact that I don't need 90% or more what they have to offer. Google Docs has become my main document and spreadsheet editor. Recently they have undergone a slight renovation of their document view UI and some bug fixes were added here and there. One thing they haven't fixed or entered into consistent state: rendering of &lt;br /&gt; vs &lt;br&gt;. One of the things that drove me crazy about Windows Live Writer when I was using it (which was about six months ago or more) was that the HTML it emitted had &lt;br&gt; and not &lt;br /&gt;. After mentioning that to their forums, their developers were a bit surprised that such thing was a big deal. Anyways I dismissed the issue completely (it brought back the memories of FrontPage generating garbage HTML) and stopped using Live Writer all together (not because of &lt;br&gt; but simple because I didn't need a desktop blog publishing application). Enter Google Docs. Here too you can publish the articles straight to your blog (if your blog implements certain API end points, and mine does). Yet they too have problems with &lt;br&gt;. When you edit a document, each new line when published to blog gets replaced with &lt;br&gt;. However, if before publishing you switch to HTML view, you see &lt;br /&gt; and publishing from there emits &lt;br /&gt;. As small as this issue is, the reason for such strange behavior is baffling me... There is also couple annoying things with docs too. Since they want to simulate desktop equivalent behavior, all the keystrokes/mouse clicks are intercepted by the app. You lose very robust firefox built in spell checker. Also, closing the tab with the editor opened by pressing CTRL+F4 results in document being saved but the tab still stays open. And since UI improvements I lost my published status indicators. Oh well...<br />]]></content>
	</entry>
	<entry>
		<title>What is happening with RSS.NET?</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=181"/>
		<id>http://www.laimisnet.com/default.aspx?entry181</id>
		<updated>2007-06-29T05:14:19.000Z</updated>
		<content type="html"><![CDATA[ <a class="sideLink" href="http://www.rssdotnet.com/">RSS.NET</a> is an open source library that can be used to consume and generate RSS feeds. The library, I believe, is used in many projects, but the project itself has been a bit stagnant. The reason for the inactivity can be explained by couple things. First, the library at its current version pretty much offers almost everything that you need to generate RSS feeds. Thus, there is not much to contribute. Second, it seems that the commercial project offshoot has come up and it might be that the main project commiters concentrate on the commercial project and not the open source one. You can see that by the first link when you visit the RSS.NET site which brings you to a commercial site.
<br /><br />
UPDATE: I also found one of the feature requests items on the SourceForge site saying that they are very hard at work with the next version of the library and point to home page for more updates. One more reason to believe that the next version of the library won't be open source for free. You will have to pay some...]]></content>
	</entry>
	<entry>
		<title>Open source in your daily work</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=180"/>
		<id>http://www.laimisnet.com/default.aspx?entry180</id>
		<updated>2007-06-29T05:00:42.000Z</updated>
		<content type="html"><![CDATA[ Ever since I left the corporate environment for a smaller software shop I had a great time getting exposed to open source C# projects. Before, open source code to me was more for learning and side/personal projects. Using it daily is much more fulfilling and beneficial to me as a programmer. Some of the project documentation is a bit lacking so you end up referring to the source a lot. And believe me, that is not a bad thing. By looking at the code you understand so much more about the library. You end up writing code which is better and more efficient. It also gives you a bit of a distraction from your daily routine. Just this past month I got a chance to work on two of the projects and extend them to fit my project needs.<br/> <br/> The quality of OSS code is very good and usually reviewed and tested by many people. Microsoft shops up until couple years back were really badly behind in all of this. Things have changed so much since. We have .NET version of every major Java open source projects. What started as straight ports now are "native" .NET implementations with matching features of corresponding Java products. There is also MS backed CodePlex, OSS project host that many .NET projects take advantage of. (I host one of my projects there myself: <a class="sideLink" href="http://www.codeplex.com/NerisStream">NerisStream</a>). Codeplex is pretty nice, but still a bit hindered by the fact that it is backed by MS. Their insistence on using Team System for source control is just a huge turn off for many open source developers. Every time I download a CodePlex source project the first thing I do is remove the "Source Safe" bindings from the projects. I am yet to find an open source developer who uses VSS or TS. SVN is the number one in this area. Neverless I am glad CodePlex exists and is here to stay for a long time (not like GotDotNet workspaces).<br/> <br/> Anyways, not sure why I am writing this. I guess I noticed that I haven't blogged in a while and decided that it is time to do this again. Hopefully I have something more concrete soon.]]></content>
	</entry>
	<entry>
		<title>Pretty cool and simple</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=179"/>
		<id>http://www.laimisnet.com/default.aspx?entry179</id>
		<updated>2007-06-15T17:52:46.000Z</updated>
		<content type="html"><![CDATA[ Simple yet elegant <a href="http://ayende.com/Blog/archive/2007/06/15/Using-partials-in-Web-Forms.aspx" class="sideLink">solution</a> if you need to generate some HTML as a response to some AJAX call. I always thought generating by string concat is a bit messy to maintain.]]></content>
	</entry>
	<entry>
		<title>Data binding in ASP.NET 2.0</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=178"/>
		<id>http://www.laimisnet.com/default.aspx?entry178</id>
		<updated>2007-06-14T18:56:58.000Z</updated>
		<content type="html"><![CDATA[ Old and greatly over-discussed topic on the net. So I am not going to talk about it. Instead here is a <a href="http://www.15seconds.com/issue/040630.htm" class="sideLink">link</a> to a great resource that I am putting up here because I am finding myself going to that page over and over again (because I don't use asp.net grids, repeaters, and such on a daily basis I don't memorize that stuff).]]></content>
	</entry>
	<entry>
		<title>Microsoft's Angels</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=177"/>
		<id>http://www.laimisnet.com/default.aspx?entry177</id>
		<updated>2007-06-13T05:18:34.000Z</updated>
		<content type="html"><![CDATA[ One of the blogs I read had a great post titled <a href="http://odetocode.com/Blogs/scott/archive/2007/06/09/10944.aspx" class="sideLink">Workin' Them Angels</a>. It was just an amazing eye opener on how much bad press and intense competition there is geared towards Microsoft.]]></content>
	</entry>
	<entry>
		<title>Checking for undefined variables</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=176"/>
		<id>http://www.laimisnet.com/default.aspx?entry176</id>
		<updated>2007-05-23T20:30:28.000Z</updated>
		<content type="html"><![CDATA[ Ok, I am starting to use this as a scratch pad and note saving place. I think that's ok because it related to programming and other people might find it useful. Here is a snippet of javascript that checks if a variable is defined:  <div class="code"> 
<pre>    
if (typeof thisIsUndefinedVariable != "undefined")
    alert("not undefined");     
else         
    alert("death"); 
</pre> 
</div>  
Yeah. I need this because I always forget the exact syntax.]]></content>
	</entry>
	<entry>
		<title>Graphics for Web Sites</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=175"/>
		<id>http://www.laimisnet.com/default.aspx?entry175</id>
		<updated>2007-05-22T18:52:09.000Z</updated>
		<content type="html"><![CDATA[ This drives me crazy. There is a site with links to free graphics images that one could use for the web sites (under certain conditions). I need this site every three months or so, and I never properly bookmark it. So I thought I will save the link here so that I can always get to it: <a href="http://www.maxpower.ca/free-icons/2006/03/05/" class="sideLink">http://www.maxpower.ca/free-icons/2006/03/05/</a>]]></content>
	</entry>
	<entry>
		<title>First encounter with Boo</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=174"/>
		<id>http://www.laimisnet.com/default.aspx?entry174</id>
		<updated>2007-05-16T03:51:33.000Z</updated>
		<content type="html"><![CDATA[ Straight from their <a href="http://boo.codehaus.org/" class="sideLink">website</a>: "Boo is a new object oriented statically typed programming language for the Common Language Infrastructure with a python inspired syntax and a special focus on language and compiler extensibility." I have read about other developers using Boo for tasks here and there, but haven't tried it myself until today.
<br /><br />
I was getting tired of what it took me to write a small prototype application. I needed something that harnessed the power of .NET (thus full access to the base class library) yet was as easy to write as a script. I guess PowerShell script would qualify, but today I wanted to try Boo, and I went that route. From the first look, it is very nice and easy to use, and is a lot of fun. The install package is rather small and comes with the compiler and interpreter (one makes an exe,dll assembly out of your boo script, another interprets and outputs the result for you instead of building an assembly).
<br /><br />
Here is my first Boo script:

<div class="code">
<pre>
import System.IO

inputfile = "C:\\temp\\NHiberBuilder\\config.txt"
outputfile= "C:\\temp\\NHiberBuilder\\hibernate.cfg.xml"

xmlns = "urn:nhibernate-configuration-2.2"

# driver = "NHibernate.Driver.SqlClientDriver"
driver = "NHibernate.Driver.NpgsqlDriver"
# driver = "NHibernate.Driver.MySqlDataDriver"

# sqlserver = "Server=localhost;initial catalog=nhibernate;User Id=;Password="
# mysql = "Server=server;Database=database;User ID=user;Password=password;CharSet=win1250"
cnnstring = "Server=server;Database=database;User ID=user;Password=password;Encoding=UNICODE"

# dialect = "NHibernate.Dialect.MsSql2000Dialect"
# dialect = "NHibernate.Dialect.MySQL5Dialect"
dialect = "NHibernate.Dialect.PostgreSQL82Dialect"
# dialect = "NHibernate.Dialect.MsSql2005Dialect"

try:
	using input = StreamReader(inputfile):
		template = input.ReadToEnd()
		
	template = template.Replace("%xmlns%", xmlns)
	template = template.Replace("%driver%", driver)
	template = template.Replace("%cnnstring%", cnnstring)
	template = template.Replace("%dialect%", dialect)
	
	using out = StreamWriter(outputfile):
		out.Write(template)
	
except e:
	print "Error", e.ToString()
</pre>
</div>
<br />
This basically generates NHibernate config file for three database vendors I encounter in my programming life. Simple enough. 
<br /><br />
I am planning on expanding on the Boo's usage here and start writing some more serious stuff. So far, I love it.]]></content>
	</entry>
	<entry>
		<title>Analytics reports just got better</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=173"/>
		<id>http://www.laimisnet.com/default.aspx?entry173</id>
		<updated>2007-05-12T03:16:01.000Z</updated>
		<content type="html"><![CDATA[ After logging into google analytics today I was pleasantly surprised with the new report views. Coincidentally I blogged here previously how analytics stats weren't that great and some other things that I didn't like. Well all is good now and I am loving it.]]></content>
	</entry>
	<entry>
		<title>Never ending discussion</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=172"/>
		<id>http://www.laimisnet.com/default.aspx?entry172</id>
		<updated>2007-05-10T15:29:10.000Z</updated>
		<content type="html"><![CDATA[   Interesting <a href="http://www.codinghorror.com/blog/archives/000845.html" class="sideLink">post</a> on the "Coding Horror" blog that talks about Microsoft, open source, and developers. I agree with most of what the author has to say on the topic. I found the idea laughable and ludicrous that if you use MS technologies of any kind in the area of the software development, open source becomes not an option for you. That's just insane. There is no need for such divide. I know so many good C# programmers who use and contribute to open source all the time. And that's how things will stay. Some will continue on declaring MS dead, MS alive, MS this and MS that, the smart people will just ignore the nonsense and use whatever is best to accomplish the task.]]></content>
	</entry>
	<entry>
		<title>NetSpell</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=171"/>
		<id>http://www.laimisnet.com/default.aspx?entry171</id>
		<updated>2007-05-07T01:19:21.000Z</updated>
		<content type="html"><![CDATA[ I was happy that I extended my ACM membership this year. The main (and pretty much the only) reason why I got it last year was due to its access to Safari Books Online and Books 24x7 resources. I was a bit disappointed with the choices of the books that were available to the ACM members. Basically anything that has been published recently was not available (within 6 months I would say). Right before deciding not to extend the membership I gave Safari another try and was very surprised to find "Windows Developer Power Tools" book in there. I extended the membership at once. Not only the find of this book was the reason, but also I can see that Safari made some major UI improvements to the whole read online process. So I thought I will stick around for another year.<br/> <br/> Anyways, developer power tools books got a lot of press when it first came out. Everyone was really surprised at its size and of how many different utilities/tools/software package reviews it contained. One of the software packages they discussed was NetSpell. It is a spell checking engine written in C#. I gave it a try and it works fine. However I don't think I can put it to any serious use. In one of its demo applications, the demo code on purpose misspells word "spelling" with "speling". What do you think was the first suggestion to fix the mistake returned by NetSpell? "Spewing"! How can one try to spell "spewing" and spell it as "speling"? Even in the keyboard alignment "w" and "l" are not close. I cannot put this into a professional application. Maybe the suggestion list should take into consideration the likelihood of the suggestion being the right word? I mean "spelling" was in the list of the suggestions, but it definitely should have been the first suggestion. Oh well.]]></content>
	</entry>
	<entry>
		<title>Lucene index generation</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=170"/>
		<id>http://www.laimisnet.com/default.aspx?entry170</id>
		<updated>2007-05-06T17:45:38.000Z</updated>
		<content type="html"><![CDATA[ I was tweaking my lucene search index generation code this weekend. As I mentioned previously, preparing a search index with lucene IndexWriter is a rather slow process (Well "slow" is hard to define in software programming because it depends ... but anyways). On average I am able to index about 1000 documents per minute (small size documents: id, title, description taken from a database, avg size of 2K or less). This is slow, and at first I thought well how come no one is complaining about it on the forums and user mailing lists but me? I thought about it more, and I realized it is problematic only when generating the initial index. The rest of the time the only thing you want to do is update it and not recreate it from scratch. Thus no one is complaining about it.<br /><br />Well this is all good unless your application updates/creates a lot of data. What is a lot? Let's say you have a nightly process that will update the search index. If you have a thousand new items being created everyday, then spending a minute to update the index is nothing. Think of the site which allows artists to upload the new songs that listeners later can locate through search. I mean how many new songs are created every day? I would guess less than 1K. Let's look at YouTube. In one of their Press Releases in August of 2006 they mention of 65,000 new videos uploaded every day. That would come out to be around an hour of indexing (1000 docs/min). So not that bad after all. So I guess you have to have a crazy amount of updates going on every day to really not be able to have a periodic search index update which completes in a reasonable amount of time.<br /><br />However, I didn't rest and decided to expand the index creation and speed it up a bit. Since IndexWriter is a thread safe component, I decided to throw the index writing task upon the pool of indexers. The test data contained 10,000 real world data entries to be indexed (10,000 documents to index). The process of the indexing then went like this. Split the data into 1K pieces. Send the pieces to the pool manager (I called that class Scheduler for some reason) which when had a pool of n indexers to work with. Each indexer ran on a separate thread. Using a pool of 3 indexers I was able to index the docs in 345 seconds (~ 29 docs/sec, 1740 docs/minute). Not bad. Increasing the pool to 10 indexers cut the time down to 290 seconds (~ 34 docs/sec, 2040 docs/minute).<br /><br />Be aware, that these numbers apply only to my case of having a simple small size docs. Indexing stored 3 fields, 2 of them were tokenized. All of this determines how much the IndexWriter has to work. One thing that worries me a bit when I look at the Lucene is the number of exceptions it throws during the indexing. Since currently it is a straight port of Lucene implementation in Java, the code uses exceptions for logic flow quite a lot (I see that in Java applications often). During the test indexing process I saw the rate of about 100 IOExceptions / second. Scary. A quick glance to the lucene's source showed quite a bit of try/catch blocks mainly used for the logic flow. I am sure that will get fixed once the Lucene.Net breaks off from Lucene.<br /><br />Oh and one more thing. The above discussion assumes that you will not do the real-time index updates. I have read about the implementations that would upon new data insertion/update would push an index update to the indexer component which would when update the index. This is nice and probably works well, but one might not always can or want do such a thing. I strongly feel from my experience that the data structures and code that relates to the application implementation should not be adjusted or modified to integrate with search. Search should be ultra thin ultra fast.]]></content>
	</entry>
	<entry>
		<title>Interesting javascript files</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=169"/>
		<id>http://www.laimisnet.com/default.aspx?entry169</id>
		<updated>2007-05-06T03:31:06.000Z</updated>
		<content type="html"><![CDATA[ Google has some neat javascript apps (gmail with its talk integration, docs). I am not javascript guru, however I do get to write it from time to time. My personal evaluation is that my javascript sucks and I am working on fixing that. One of the better ways to learn is to analyze the existing code and different approaches that people use to solve the problems. Well today I found out the google docs javascript code is not obfuscated or scrambled (removing all the white space). And it has some sweet javascript code with even sweeter comments that come with it. Thus I saved them and have been reading them, really nice stuff.<br/> <br/> The javascript files from the google docs led me to the site of Neil Fraser (file diff_match_path.js). His site has really awesome stuff. While going through his blog/news entries I found an entry titled <a href="http://neil.fraser.name/news/2007/03/05/" class="sideLink">Boredom and Frustration</a>. Really great piece which kind of opened up my eyes. He had a great point in where he stated that computers right now are quite happy executing infinite loops with no useful work being accomplished. Instead, the system should monitor itself. In case the determined goal is not being accomplished, first try another route. If that still doesn't work, give up and move on to doing something else useful. At first it sounds bizarre, give up and move to something else? How can this be? Well it actually makes sense, if you are stuck in a task with nothing getting accomplished, the other tasks are not being accomplished. Of course not everything can be accomplished that way, but I can think of many cases where my own programs were stuck at some point wasting cpu cycles and getting nowhere.<br/>]]></content>
	</entry>
	<entry>
		<title>NHibernate 1.2</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=168"/>
		<id>http://www.laimisnet.com/default.aspx?entry168</id>
		<updated>2007-05-04T15:27:12.000Z</updated>
		<content type="html"><![CDATA[ I am sure many of you have heard of this already. NHibernate 1.2 has been marked being stable and the latest production-ready NHibernate release. Porting to a new version is not as easy as replacing the NHibernate assemblies. It involves a bit of mucking here and there, but what you get back in return makes it really worth it.
<br /><br />
The features that I have been looking and waiting for are "native" support for generic collections, filters, and multi-queries. I haven't really tried out the new changes to the Criteria API. But what I hear Projections will allow to determine the count of records matching the criteria. Currently, if I wanted to issue a query, get let's say three top results, and also get the total count of records that match the query, to the minimum I had to do two round trips to the db. With either the Projections or the multi-query support this will mean that I need only one trip. The speed gain is there, but most importantly the code will look cleaner, I think.
<br /><br />
Oh and one more thing. Some time ago I requested in the NH forums to add a feature allowing mapping of one class to multiple tables. Well I was happy to find out that that feature was added in 1.2!
<br /><br />
Again, I want to reiterate that to port your applications is not as easy as replacing the NH assemblies. Some code changes might be required if you take advantage of lazy loading for instance. Also removing all the NHibernate.Generics stuff is needed. I converted one small personal project, and it took about an hour or so. For real world applications, as Ayende mentioned, might take about a day.
<br /><br />
Enjoy!]]></content>
	</entry>
	<entry>
		<title>Missing site stats</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=167"/>
		<id>http://www.laimisnet.com/default.aspx?entry167</id>
		<updated>2007-05-04T04:04:01.000Z</updated>
		<content type="html"><![CDATA[ Ever since I moved to a new host, I am really missing site statistics I used to have with the previous host. Currently for monitoring the site visitors I am using Google Analytics. I am sure I haven't learned how to use it to its full capabilities, but I found my previous package to be more informative and easier to use. It involved less clicking and provided more useful information (better visitor stats by various date ranges, size of data transfers which analytics have no way of determining, etc).]]></content>
	</entry>
	<entry>
		<title>String.Format</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=166"/>
		<id>http://www.laimisnet.com/default.aspx?entry166</id>
		<updated>2007-05-04T03:58:04.000Z</updated>
		<content type="html"><![CDATA[ The code snippet that I am about to show you sort of surprised me. Here is a modified version of the code: <br /><br /> 
<div class="code"> 
<pre> 
string test = 
"this.window = function(){document.getElementById('{0}').dosomething();}"
String.Format(test, control1.ClientID); 
</pre>
</div> 

<br /><br />
It was throwing an invalid string format exception. And of course, I knew it had to be because of the { ... } for the javascript function I was using. Neverless, that kind of surprised me. I didn't expected this to trip the String.Format function, as I assumed that it looks for {/d+} (digits surrounded by { and }) tokens. Strange enough, this is the first time I ran into this situation, even though I have been doing .NET since 2001. ]]></content>
	</entry>
	<entry>
		<title>Web trends in UI design</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=164"/>
		<id>http://www.laimisnet.com/default.aspx?entry164</id>
		<updated>2007-04-27T16:22:55.000Z</updated>
		<content type="html"><![CDATA[ I am writing this from the Denver airport where I have a stop over on my way to Las Vegas. To pass time I thought I will do some blogging.<br/> <br/> I am sure by now you have heard about the next .com bubble coming up with all the 2.0 sites. What's amazing to me how all of the 2.0 sites look so similar to each other. Visit <a href="http://web2list.com/?menu=all" class="sideLink">Web 2.0 web site directory</a> and check some random sites listed there. Basically you have one common theme come across: white background, one single font (font color anything but black please), a gradient background buttons (as large as possible), and of course, a Tag cloud. Oh, never forget a tag cloud, because you know, tag cloud is just the greatest thing ever. I wonder what's the percentage of sites out there who actually research and check how much people use their tag cloud. You see if I go to the music site, and I see Music really big and bold in the cloud, oh my, just what i needed! Oh yeah, let's not forget personalization and social matching (oh please post your fake picture ASAP to your profile, we are all so cute). "Social matching" is scattered all over the sites, just like rabbit droppings on a fresh green grass... That's why I love and praise sites like netflix. It is part of the wave of the new sites out there, however their design was original at the time and is super easy on the customers when it comes to the navigation. Whatever is out there, is there because it serves a specific purpose, and not because it is cool (Netflix designed by the other 2.0 jackasses definitely would include a tag cloud with a "Movie" as the largest tag).<br/> <br/> Myself personally I work for a software startup which is also part of the 2.0 wave. However I hope we will strive to be original and deliver things that are useful to our users and not just plain and simple cool. "cool" is good and should be there, but please don't make that "cool" thing as your main business idea, make sure it is useful too.]]></content>
	</entry>
	<entry>
		<title>Search, search, search</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=163"/>
		<id>http://www.laimisnet.com/default.aspx?entry163</id>
		<updated>2007-04-26T04:49:38.000Z</updated>
		<content type="html"><![CDATA[ If you are serious about search in the applications you build, do not rely on database "WHERE LIKE " or other simple matching queries. Instead, turn to either the text indexing supported by your database vendor or some other search component. Recently I had a chance to experiment with PostgreSQL's TSearch2 capabilities. The search system that was build included result ranking, weighting of different sections, and other capabilities. I have heard some people complain about its performance, but I am yet to experience that myself. The queries on my local installation of over 11 million terms return in as fast as 0.056 seconds. On the production servers it is even faster.<br/> <br/> Currently I am looking at <a href="http://www.dotlucene.net/" class="sideLink">dotLucene</a> project. The problem that I have with using database specific components for search is: it is database specific. DotLucene is a java port of a text search engine called Lucene. So far I am very impressed with its speed and how easy it is to use/integrate with your existing application. A rather simple API allowed me to quickly write index generation code as well as an initial, crude search interface. Of course, this is just an initial look and it might have its own important shortcomings that I haven't encountered yet. On of the things that I was dissapointed in was the speed of the generation of the search index. Either I am doing something not right or it is just that slow. I indexed 10K simple documents (10K data rows actually exported from database to a text file). Each row was a title, description, and id. Title and description were stored indexed as text. Just to generate an index for that took almost 10 minutes (p4 dual, 1.5GB of RAM). Again, I need to snoop around the documentation more to see if it just me or if it is slow in the index generation side.<br/> <br/> Index generation in search is a very important part of the whole search functionality. You really don't want to mix your domain model data with the search data as they are two separate things and should not be treated the same. Search data should be optimized, cut down, tweaked, clustered, whatever, to make your searches as fast as possible. But you also want the search "index" to be as much up to date as possible (well not really true, that depends on your application and how recent you want your search results to be). This brings interesting problems and interesting solutions. I will be writing more about this in the future.<br/>]]></content>
	</entry>
	<entry>
		<title>Tradesoft goodies</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=161"/>
		<id>http://www.laimisnet.com/default.aspx?entry161</id>
		<updated>2007-04-19T15:50:40.000Z</updated>
		<content type="html"><![CDATA[ Today I want to share/blog about a site I found. Its URL is <a href="http://tredosoft.com/" class="sideLink">http://tredosoft.com</a>. If you go to the Downloads section in the site, first thing that you might want to get is RegEx Eval 1.0. It used to be that regular expression evaluators (good ones too) would be scattered all over the place (written in .NET, geared towards .NET). I guess right now some went commercial, some are closed source and work with dotnetfx 1.1 or earlier. Well RegEx Eval is neat and small, just like I like it. And allows you to quickly test your regular expressions.<br /><br />But the most useful download is the Multiple IEs. IE 7 rendering, at least in my experience, is drastically different from IE6. I lost IE 6 when I upgraded all of my machines to the IE7 through the updates. However, any site UI work that I do, I must test on IE6, since if it looks good on 7, doesn't mean 6 will display it the same. Multiple IEs was a big savior. It doesn't work perfectly, and don't expect to be browsing around the net with 6 or 5 or whatever. But it will work beautifully when testing how pages looks on the local test server.]]></content>
	</entry>
	<entry>
		<title>Database Migrations</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=160"/>
		<id>http://www.laimisnet.com/default.aspx?entry160</id>
		<updated>2007-04-15T20:31:39.000Z</updated>
		<content type="html"><![CDATA[ It has been over a month since I started using Migrator for .net. So far I am really liking it. If you don't know what it is, you should read <a href="http://macournoyer.wordpress.com/2007/02/11/agile-database-fun-with-the-migrator" class="sideLink">this blog posting</a>. It is all about managing your database structure changes as you develop your code. In my previous experiences, if I added a class that needed a new table or changed the structure that needed alters to data types in the database, I would write a sql script that later could be applied to the database. In theory, this all sounds good, but in practice is a major pain in the A**. Having to open the SQL interpreter to run the queries and making sure the query is applied to all the DBs (local dbs on other developer machines) adds extra overhead in the maintenance. Not to mention the production upgrades when the scripts from all developers must be applied.<br /><br />Here is how a basic migration would like like:

<div class="code">
<pre>
	[Migration(1)]
	public class AddEntryTable : Migration
	{
		public override void Up()
		{
			Database.AddTable(
				"entries",
				new Column("id", typeof(int), ColumnProperties.Identity),
				new Column("title", typeof(string), 255, ColumnProperties.NotNull),
				new Column("body", typeof(string), 2048, ColumnProperties.Null));
		}
		
		public override void Down()
		{
			this.RemoveTable("entries");
		}
	}
</pre>
</div>
<br /><br />
You can see the Migration attribute allows us to specify the version. This version is a housekeeping record so that once you apply the migrations to your database, it knows in which order to execute them. To apply the migration you can you the migration tool written by the author of the Migrations for .net, it comes with the source that you can find in the site from the link given above.<br /><br />In any case, the reason why I am writing all of this is just to share my experiences so far using the Migrations. And maybe give some advice. If you are not sure if this might work for you or if it is useful at all, I would say please try it out. I was a bit skeptical too at first, but now I absolutely love the concept and love writing migrations. You can apply the migration in the command line to any migration of your choice. You can also call it from your automated builds. It is the most useful when you are using O/R mapping technology for your backend communications (such as NHibernate).<br /><br />I am yet to find the Down() method to be of any kind of use at all. During the day to day usage I haven't encountered a situation where I would want to downgrade. I still implement the Down method, but haven't had a situation where I would use it.<br /><br />Also, while working in the team, special precautions must be made for the migrations to work smoothly. You cannot always prevent or avoid having some created the databases on their local with a SQL script (for which the migration already exists). When, if that someone is running the migrations to get to other objects, error will occur stating that same table or column already exists. To avoid this type of situation, check if the object you are about to create with the migration already exists on the database that is being applied. I know this doesn't sound right because how can you have a database object already created without the migration running. Well in a diverse team environment, believe me, it can happen.<br /><br />And lastly, depending on how you are executing the migration, long running sql patches might not be the best candidate for the migrations. So I would probably avoid writing migration for data conversion tasks that involve lots of sql data processing. Those are best left for good old sql scripts.]]></content>
	</entry>
	<entry>
		<title>Blogging again</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=159"/>
		<id>http://www.laimisnet.com/default.aspx?entry159</id>
		<updated>2007-04-15T17:00:32.000Z</updated>
		<content type="html"><![CDATA[ Well after a long break I am starting blogging again. It seems that every year I take a month or so off from blogging. This time the break coincided with me moving to a new host. So far I had no problems migrating the site, the transition was smooth. The new host offers pretty much identical features as my old one, with the exceptions that now I have unlimited MySql servers (and Sql Server 2005) installations. I did lose statistics page, but Google Analytics will have to do for now.
<br /><br />]]></content>
	</entry>
	<entry>
		<title>Moving to a new host</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=158"/>
		<id>http://www.laimisnet.com/default.aspx?entry158</id>
		<updated>2007-03-24T16:04:53.000Z</updated>
		<content type="html"><![CDATA[ My current host, which I liked, decided to discontinue asp.net on win2k3 hosting due to low demand. That means I am in search of a new host and will be moving soon. So don't be surprised to see some outages...]]></content>
	</entry>
	<entry>
		<title>Internet radio, please survive</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=157"/>
		<id>http://www.laimisnet.com/default.aspx?entry157</id>
		<updated>2007-03-22T17:15:28.000Z</updated>
		<content type="html"><![CDATA[ I know I haven't been posting much these days. I am too busy with my new work and things. We have the release dates, loads of features to implement, and it all takes time and dedication. It is fun, but takes time away from other things...
<br /><br />
I usually don't post stuff like this on my blog. But this is far more important to me. If you love and listen to the internet radio as much as I do, you should read this very carefully: 
<a href="http://www.di.fm/blog/read/2007/03/new-music-royalty-rates-are-about-to.html" class="sideLink">
New Music Royalty Rates May Shut Down Internet Radio</a>. Internet radio is awesome and easily available to everyone around the world. One of the reasons why it is awesome is because it is free (with premium subscriptions available most of the times), and we should do everything to make it stay that way. To run the internet radio station takes dedication and considerable funding, and I am sure no one is crunching millions out there. It is all about passion for music. I will write more on this later, but for right now, just visit the link and read it through.]]></content>
	</entry>
	<entry>
		<title>Running nhibernate on the medium trust</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=156"/>
		<id>http://www.laimisnet.com/default.aspx?entry156</id>
		<updated>2007-03-13T13:27:21.000Z</updated>
		<content type="html"><![CDATA[ If your .net application doesn't run in the full trust environment, you will have problems with NHibernate (due to how it needs to do reflection and all the other crazy stuff that is not allowed in non full trust environments). With the 1.2.0 release coming up, this is supposed to be fixed. Today in NHibernate forums I just saw an <a href="http://forum.hibernate.org/viewtopic.php?t=970014" class="sideLink">entry</a> on this topic, and would like to note it here for anyone that might experience issues with this. Apparently for time being lazy loading will not work. Also, some configuration changes are in order as well. Anyways, check out the thread for more info. ]]></content>
	</entry>
	<entry>
		<title>NHibernate 1.2.0.CR1</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=155"/>
		<id>http://www.laimisnet.com/default.aspx?entry155</id>
		<updated>2007-03-11T22:51:50.000Z</updated>
		<content type="html"><![CDATA[ This is a bit of the old news since it was announced on February 22nd, but still worth mentioning. NHibernate 1.2 is approaching the release and now is marked as the CR (candidate  for release) and not beta.
<br />
I actually started migrating some of my projects to the 1.2. The first thing that I removed after adding 1.2 is NHibernate.Generics infrastructure that was needed to support generic collections. Instead now one can use generic attribute (true|false) to indicate if the collection being mapped is generic or not. I never liked having my domain model reference NHibernate.Generics assembly. I really prefer it to not reference anything at all, which is the case with 1.2.
<br />
I know there are some new mapping constructs available that I will have to check it out. I am kind of late in trying 1.2 just because I was quite happy and kicking with 1.0.2-4 releases. Also I am yet to play with NH's stored procedure support. That should be interesting. Although I don't miss them much, some projects (or people working on them) require the use of stored procs. And now NH will be a viable choice because it supports them.
<br /><br />
I will dig more, but I also see that nullable types will be supported "out of the box". If I find anything new and cool, I am sure to be posting about it here. One thing that I really would like to see fixed/implemented in NH is the ability to do GROUP BY using object instance. If you tell to NH in a query to do "GROUP BY someobject" it will replace someobject with that object's id column as opposed to doing a full expansion of someobject and doing a group by on all of its columns. If I need to do group by on id I can always say "GROUP BY someobject.Id". Anyways, I will be on a lookout for this. I think it is implemented in Hibernate for Java.
<br /><br />
UPDATE: Just checked Hibernate (v3.2.1, for Java) and it doesn't expand the entity there either. It doesn't seem like a hard thing to implement, but I am sure there has to be a reason behind it why it is not even in the later version of Hibernate. I need to investigate this.]]></content>
	</entry>
	<entry>
		<title>Dissecting Firefox extensions</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=154"/>
		<id>http://www.laimisnet.com/default.aspx?entry154</id>
		<updated>2007-02-26T02:23:54.000Z</updated>
		<content type="html"><![CDATA[ If you are using Firefox on a daily basis you are more than likely to have one or more add-ons installed. What you might not have known is that you can always open the extension up and see what it is doing behind the scenes.
<br /><br />
Each extension comes as an xpi file that firefox or any other mozilla product opens up and adds it to its extensions. That xpi file is nothing else but a zip file. So the first step in opening up the xpi is renaming it to zip and extracting to the directory of your choice. The extracted file structure should look something like this:
<br /><br />
<div class="code">
<pre>
\chrome
\defaults
install.js
install.rdf
chrome.manifest
</pre>
</div>
<br />
install.js is not always present. I believe (I think that's what I read in the documentation) install.js is needed for the firefox versions before 1.5. Every other higher version release is using install.rdf. So if the extension is supporting older versions, it will include install.js. install.rdf is nothing more than just an xml file describing the extension. \chrome folder is the folder that you will want to look at.
<br /><br />
If you open the folder up, you should see one jar file with the name of the add-on. Rename jar extension to zip (just like xpi to zip) and extract the contents of the resulting zip file. Look for the folder named contents which contains all the "meat" of the extension. The xul files inside describe the visual components of the extension, and the js files have the javascript that does "the magic" behind the extension. This pretty much applies to the majority of the extensions written for Firefox. So check them out and see how they are being made. Learning from the example implementations might inspire you to write an extension of your own.]]></content>
	</entry>
	<entry>
		<title>Recommended read</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=153"/>
		<id>http://www.laimisnet.com/default.aspx?entry153</id>
		<updated>2007-02-23T00:40:22.000Z</updated>
		<content type="html"><![CDATA[ Here is an article that is worth reading to everyone involved in web development: <a href="http://www.heise-security.co.uk/articles/84511/0" class="sideLink">Web Application Security</a>. This is an article from "heise Security" site, something that I keep on my daily watch for their news alerts and interesting security related articles. If you are in the software development business, I think it is important to stay on top of the security news. You don't want to miss some security hole being discovered in a product that you are using or that your software is running on (web server, database server, etc.). <br />
Anyways, the article is about some of the exploits possible in the web applications. Although PHP is the main focus here, I think many things mentioned in the article applies to other web platforms (I guess that's right the word, I don't know).]]></content>
	</entry>
	<entry>
		<title>Subscriber count from google reader</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=152"/>
		<id>http://www.laimisnet.com/default.aspx?entry152</id>
		<updated>2007-02-18T19:34:32.000Z</updated>
		<content type="html"><![CDATA[ Most of you probably know or maybe even use Google Reader to aggregate RSS/ATOM feeds and read the items online. SharpReader used to be my RSS reader, but I have switched to google's reader more than half year ago. Anyways, they just posted an <a href="http://googlereader.blogspot.com/2007/02/one-subscriber-two-subscribers-three.html" class="sideLink">entry on their blog</a> telling that google reader when fetching an RSS/ATOM item includes the subscriber count in the request headers. Basically by looking at the reader's request header you can see how many people are reading your blog using the google's reader. I think that's pretty cool thing. I went ahead and checked my host's IIS logs for my site, and yup, there it was:
<br />
<div class="code">
<pre>
... com/feedfetcher.html;+2+subscribers;+feed-id ...
</pre>
</div>
<br />]]></content>
	</entry>
	<entry>
		<title>Web Developer update</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=151"/>
		<id>http://www.laimisnet.com/default.aspx?entry151</id>
		<updated>2007-02-15T03:42:27.000Z</updated>
		<content type="html"><![CDATA[ I hadn't updated my firefox extensions for sometime, and today I decided to do some "refreshs". I just installed an updated <a href="http://chrispederick.com/work/webdeveloper/" class="sideLink">web developer extension</a> for firefox, and it looks awesome. Although many think that FireBug is the best debugging/development tool for firefox, I think web developer extension is a very important one and has an amazing array of features not found in any other tool. If you haven't already it tried it, give it a spin, you will be very impressed.]]></content>
	</entry>
	<entry>
		<title>NHibernate flush</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=150"/>
		<id>http://www.laimisnet.com/default.aspx?entry150</id>
		<updated>2007-02-14T01:28:20.000Z</updated>
		<content type="html"><![CDATA[ Someone just mentioned to me that when they save the object with NHibernate, nothing gets sent to the database, and thus NHibernate is "not working". All the mapping files are there included as resources, the assemblies specified as the mapping assemblies, no errors on loading and saving. Except things don't save. Well what could be the problem? From most of the scenerios that I have seen, the common problem: NHibernate session is not flushed after the save. I remember spending long hours and getting frustrated when many-to-many mapped relationships would not persist no matter what I did. I reworked mapping files and changed things around, and still nothing. And the problem was that I never told NHibernate to flush session.
<br /><br />
You don't need to explicitly tell NH to flush if you start a transaction and commit it after the save calls. Also, NH flushes objects on other instances, but when exactly you will have to refer to the documentation. So basically, if at the end of your cycle (either asp.net page request processing, or unit test run), you don't see the objects in the db, that means that something is not setup correctly in NH session management and you either don't flush or commit at the end of the cycle.
<br /><br />
There is some very useful info about all of this and more on <a href="http://www.tobinharris.com/2007/2/3/nhibernate-faq" class="sideLink">this</a> page. ]]></content>
	</entry>
	<entry>
		<title>MSDN misbehaving...</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=149"/>
		<id>http://www.laimisnet.com/default.aspx?entry149</id>
		<updated>2007-02-13T21:38:04.000Z</updated>
		<content type="html"><![CDATA[ All afternoon today any documentation links in msdn.microsoft.com results in a "Sorry, we were unable to service your request." page. Which sucks, because I cannot lookup some info that I need. I wonder what happened...]]></content>
	</entry>
	<entry>
		<title>Assembly wide setup</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=148"/>
		<id>http://www.laimisnet.com/default.aspx?entry148</id>
		<updated>2007-02-12T02:45:28.000Z</updated>
		<content type="html"><![CDATA[ This post is going to be about unit testing and NUnit. I still use NUnit for writing unit tests for my applications. I know there are several other popular choices (mbunit for instance), but I am sticking to NUnit. So far it fulfills my needs. I tried using Visual Studio's Test projects, but it was too slow and "clumsy" due to its tight integration with the IDE.
<br />
<br />
Anyways, since the early versions of NUnit I always wanted an assembly wide setup procedure to be run. NUnit didn't support that, instead it offered SetUp and TearDown procedures that one could run before/after each test. I ended up doing some hacks to create a global setup run. Well, now there is a way to mark a method to be a global setup/teardown method that runs before/after all the tests:
<br />
<div class="code">
<pre>
[SetUpFixture]
    public class TestInit
    {
        [TestFixtureSetUp]
        public void Init()
        {
            Console.Out.WriteLine("Running init");

            // drop test database

            // create test database
        }
    }
</pre>
</div>
<br />
It works nicely and finally no hacks are needed. 
<br /><br />
One thing, this works only on the pre-production version of NUnit (2.4). I struggled a bit getting this going and couldn't figure out why my global setup was not running because I was running the tests from the 2.2.8 release. So if you want to take advantage of this awesome feature, get the beta 2.4 release.]]></content>
	</entry>
	<entry>
		<title>PostgreSQL case sensitivity</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=146"/>
		<id>http://www.laimisnet.com/default.aspx?entry146</id>
		<updated>2007-02-08T22:59:55.000Z</updated>
		<content type="html"><![CDATA[ When it comes to databases, I consider myself to be an expert in SQL Server and intermediate with MySQL (although I use MySQL a lot too, it is just I haven't done too much advanced stuff with it). And now there is a third in my db toolkit: PostgreSQL (psql).
<br />
So far I have nothing but good things to say about it. It has a very user-friendly administration tool and awesome documentation online. I have been using it from the .NET apps, so there native .net libraries for the connectivity implementation. It seems to be highly configurable and has various different logging capabilities built in. One thing that caused me some grief was that I wasn't aware that the table names when surrounded by apostrophes in sql statements are case sensitive! I guess that is a SQL standard that no database provider that I know follows (I tried using " around table names with MySQL, it returned a syntax error). So be aware, if you create table Test and query for test, you will get an error stating that test doesn't exist. It was hard at first to track this down because my unit tests failed and I kept on thinking something was wrong with the code, when in reality something was wrong with my sql. Advice: be consistent and lower-case every table and column name and you will not have any problems.]]></content>
	</entry>
	<entry>
		<title>New Job</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=145"/>
		<id>http://www.laimisnet.com/default.aspx?entry145</id>
		<updated>2007-02-08T14:38:08.000Z</updated>
		<content type="html"><![CDATA[ Since February 5th, I am no longer with GGP. It was fun while it lasted. GGP is a great place to work for and their projects are a lot of fun, but I had my reasons for advancing somewhere else. I wish all the people there the best.
<br /><br />
The place where I work now is a small software startup. The environment where one person's contributions can have a big impact on the overall outcome is I think something that I prefer at this stage in my career. Also learning is a key factor here too. Learning is what the computer science profession is all about. To be good in this business one must always upgrade the knowledge. Things change all the time. Funny thing, so far if you listen to some of the more respected professionals out there, they all say the same thing: read, study, research on your own, and try things out. It is a common trait of a good software engineer.
<br /><br />
]]></content>
	</entry>
	<entry>
		<title>Bargains from Amazon</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=144"/>
		<id>http://www.laimisnet.com/default.aspx?entry144</id>
		<updated>2007-01-27T19:06:15.000Z</updated>
		<content type="html"><![CDATA[ From time to time I get lucky and stumble upon an amazon.com bargain, a decent book for just a couple of bucks. This time it was <a href="http://www.amazon.com/Practical-Subversion-Experts-Voice-Source/dp/1590592905/sr=8-2/qid=1169925406/ref=pd_bbs_sr_2/002-6870049-4904825?ie=UTF8&amp;s=books" class="sideLink">Practical Subversion</a>. A book about a source control system called Subversion (svn). I have talked about it in my previous blogs, and svn is the source control system used by me on all of my personal projects, and also it seems to be a preferred source control system for most of the open source projects.
<br />
Anyways, the book contained quite a lot of useful information and I was a bit surprised it was on a bargain list. But then again, I noticed that the was a second edition, so I guess they wanted to get rid of the first as much as possible. Most useful chapter for me was chapter 6, the best practices with subversion. Also the author spent a great deal talking about branching and merging, which was also interesting, as I wanted to see if what I am doing now on my own is what the experts suggest to do when it comes to branching.
<br /><br />
I still have a hard time getting over the fact that a lot of .net programming shops that I've seen use Source Safe for their source control. I think it is probably the worst source control system on the market. Besides lacking a lot of functionality, it is not a very stable system. It has laughable branching support (very annoying to use). And its integration with solution and project files in VS.IDE is pretty much "hostile". 
<br /><br />
The easiest way to try out subversion (svn), is to use TortoiseSVN. It is a subversion client which integrates with windows shell. You can get more info about it <a href="http://tortoisesvn.tigris.org/" class="sideLink">here</a>. Once you obtain TortoiseSVN, to start playing with svn do the following:
<ol>
<li>Install TortoiseSVN</li>
<li>Create a repository directory, this is where your source will live.</li>
<li>Import source code into the repository</li>
<li>Check out imported source code in a working directory</li>
</ol>
That's it, now you have the working directory. There you can start editing files and start committing them (checking in), branching, merging, etc.]]></content>
	</entry>
	<entry>
		<title>"Aggressive" SQL Server</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=143"/>
		<id>http://www.laimisnet.com/default.aspx?entry143</id>
		<updated>2007-01-23T21:10:16.000Z</updated>
		<content type="html"><![CDATA[ I love error messages like this one:

<div class="code">
Transaction (Process ID 77) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
</div>
<br />
My poor query analyzer's SELECT statement became the victim of the deadlock...]]></content>
	</entry>
	<entry>
		<title>Starting 2007</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=142"/>
		<id>http://www.laimisnet.com/default.aspx?entry142</id>
		<updated>2007-01-21T02:51:21.000Z</updated>
		<content type="html"><![CDATA[ Well it has been 20 days in the new year and I haven't posted a single entry yet. There are couple reasons for this. I went on a week long vacation to Puerto Rico the second week of the new year. It was awesome vacation, I had a really great time. The second reason I will reveal a bit later, maybe at the end of the month or the start of February.
<br /><br />
Anyways, let's get to tech stuff. It seems to me that no matter where I go, I have to run in and do stuff with computers. On every trip to Lithuania everyone feels the need to show me their PC, laptop, and ask me to fix it, check it, upgrade it, etc. Trip to Puerto Rico was no exception and it involved rescuing a completely screwed up (by trojan, virus, etc.) Windows XP Home laptop. Man what a disaster that was, XP Home sucks so bad. Trying to recover files from a second windows installation (also Home, as that's what the person had) was a nightmare because of ACLs set on the files. And of course Home has no way of setting ACLs. So I went ahead and started downloading various tools and utils that will allow me to do that. I already talked <a href="http://www.laimisnet.com/default.aspx?entryid=51" class="sideLink">previously</a> in this blog about using takeown, xcacls, subinacl to modify ownership and security settings of the objects. Well of course, subinacl didn't work on Home installation and I ended up writing a script that enumerated the directories and set permissions using takeown and cacls. It sucked, but it worked and all the files were recovered.
<br /><br />
Also, I've never talked about VS IDEs refactoring features. I really like the method generation because it works fast. A useful shortcut to generate a method after typing it in is to press ALT+SHIT+F10 and then SPACE. Other refactoring features are a bit annoying. Encapsulating fields is useful, but works good only if the source is small. For some reason, if I declare a private variable and then tell VS to encapsulate it with the property (CTRL+R+E), it does just that but also feels the need to do something like recompiling the project, which takes up time. I do like the shortcuts though, and pressing CTRL+R+E to generate the whole property declaration is nice (unless most of the stuff is generated with a code generator).]]></content>
	</entry>
	<entry>
		<title>Last post of the year probably</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=141"/>
		<id>http://www.laimisnet.com/default.aspx?entry141</id>
		<updated>2006-12-30T21:40:48.000Z</updated>
		<content type="html"><![CDATA[ Well I think this is the last post of year 2006. I think it was a great year for me professionally and personally. To finish off, I gathered couple items that don't fit into its own blog entry separately. Instead, let me list them out.
<br />
<br />
My goal for the next year is to learn more about NHibernate. I am starting to use it in my projects, and I really like it. However, I am still a bit slow with it. Even for basic tasks I need to reference online manual or some online samples. Overall I think NH is an awesome ORM tool. This is confirmed by the fact that more and more .NET shops are adopting it.
<br /><br />
Next on the list is a question about VS.NET IDE. Why does it open the links in the source code in its own browser window? Sometimes the documentation in the source file will have a link which I will CTRL+click on it without thinking. Then pretty much I have to copy the URL and open the browser and view it there. I don't want to use IDE for browsing, is anyone using it for browsing?
<br /><br />
Alright, the last thought/complain. Debugging websites on my server machine is getting a bit annoying. Since FX is the default browser, VS pops it up when the debugging starts. If I stop debugging in the IDE, it leaves the FX window running. (As opposed to what happens when IE is being used, IE window is closed then). I wonder why is that? Is VS looking for the debug IE window when the debugging is stopped? I should look into that.
<br /><br />
Alright, I think I will return back to NHibernate. One thing that I realized while studying it: the best way to learn it is to have an expert next to you. Just to clear these minute gray areas that I encounter from time to time not mentioned in the docs (at least in the docs that I look at) and that can only be understood with experience with the tool.
<br /><br />
Anyways, that is it for this year. By the way, the blog really grew in 2006. I had a record number of visitors, growing each month. Hopefully I can continue the trend in 2007. 
<br /><br />
Happy New Year to everyone!]]></content>
	</entry>
	<entry>
		<title>Christmas gifts</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=140"/>
		<id>http://www.laimisnet.com/default.aspx?entry140</id>
		<updated>2006-12-26T14:41:21.000Z</updated>
		<content type="html"><![CDATA[ Just as it is supposed to be, during Christmas I mostly receive technology or software development related presents. And it is usually something from my amazon book wish list. This year I got two awesome books. The first one, <span  class="sideLink">Service-Oriented Architecture (SOA): Concepts, Technology, and Design</span>, should be a great book to study. It is huge, containing a lot of material that I am sure I am not even aware of. I am really looking forward to digging into it.
<br />
The second book I received is <span class="sideLink">Effective Use of Microsoft Enterprise Library: Building Blocks for Creating Enterprise Applications and Services</span>. I will probably use this more as a reference book. Although I am sure I could find most of the information on the net related to the enterprise library use, it is nice to have a book next to me. I feel I absorb the information better if I study from the book.
<br /><br />]]></content>
	</entry>
	<entry>
		<title>Security alerts and articles</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=139"/>
		<id>http://www.laimisnet.com/default.aspx?entry139</id>
		<updated>2006-12-23T21:04:00.000Z</updated>
		<content type="html"><![CDATA[ Software security topic is always a close one to my heart. I am more of a hobbyist in this area, someone who keeps a close eye on the latest attack trends and vulnerabilities. Just so that I would be aware of them in my own development efforts. Well one site that keeps me well updated in this area is <a href="http://www.heise-security.co.uk/" class="sideLink">www.heise-security.co.uk/</a>. For instance, check out their news piece about the vulnerability in Mono XSP 1.2.1 and previous version. If you have an unpatched version running, it would be a very wise thing to go ahead and update it.]]></content>
	</entry>
	<entry>
		<title>No more tables</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=138"/>
		<id>http://www.laimisnet.com/default.aspx?entry138</id>
		<updated>2006-12-23T20:29:55.000Z</updated>
		<content type="html"><![CDATA[ As discussed in my previous blog entry, I went ahead and "redesigned" the blog to use the div elements instead of the tables for the layout. I tested this layout on FX 2.0.1 and IE7 only, but since I don't use any fancy styling CSS rules, I think I should be OK. If you see the problem with the rendering on a browser that you are using, let me know.
<br /><br />
If you look at the source of the blog, you will still see the two table elements. One is asp.net calendar control and another is comments grid (probably will be replaced soon). By default, all of the ASP.NET controls emit the table structures. That is understandable since there are so many different CSS rule interpretations by the major browsers out there. However, there are adapters available that you can use. Check this site out: <a href="http://www.asp.net/cssadapters/" class="sideLink">www.asp.net/cssadapters/</a>. I have seen couple people successfully use the adapters in their sites, although I haven't tried doing so myself. I definately will look into that.]]></content>
	</entry>
	<entry>
		<title>Replace tables with CSS divs</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=137"/>
		<id>http://www.laimisnet.com/default.aspx?entry137</id>
		<updated>2006-12-22T01:22:03.000Z</updated>
		<content type="html"><![CDATA[ During my days as a free lance web programmer (years 2000-2004), besides being able to program I also had to be able to design. Of course, I had projects where someone with more skill in that area provided a design for me, or I had a template that I could "ride out" for most of the sites. So basically I had to be familiar with the latest neat javascript tricks, and things like that.
<br />
My javascript skills never diminished (actually got stronger over the years), but the UI layout and page looks did. So recently I started analyzing the sites out there (netflix, amazon, etc.) see what they have that looks good. One thing that I really needed to throw out and forget is page layout using &lt;table&gt; html elements. If you look around right now, every more popular site is all CSS styled divs. No tables anywhere. It took me a while at first to get used to the float:left, float:right, margin, padding, and other CSS stuff to get the column layouts. But I think I am getting there and already used div layout in a rather large project with semi complex UI. I am loving it and it feels more natural to me to layout using divs and not table elements. One annoying thing (major pain): differences in browser renderings. So basically I try to avoid the areas where the browser rendering is flawed or inconsistent across (sometimes it is impossible but workarounds exist).
<br />
Great source for the CSS layout techniques is <a href="http://www.glish.com/css/" class="sideLink">http://www.glish.com/css/</a>. I love that "Look Ma, No Tables" phrase. I think this site is a great starting point. It contains simple and well explained examples as well as links to other CSS resources.
<br />
I think over the holidays I might as well redesign this blog to use divs instead of tables. Since the UI here is really simple, it should be no big deal.]]></content>
	</entry>
	<entry>
		<title>My first wtf code sample</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=136"/>
		<id>http://www.laimisnet.com/default.aspx?entry136</id>
		<updated>2006-12-08T01:40:05.000Z</updated>
		<content type="html"><![CDATA[ I don't think I have ever posted WTF code sample in this blog. I get to review application here and there, and I encounter some stupid code from time to time. But usually it is a 100 line goo trying to accomplish something that could be easily accomplished with 10 lines or so. Yesterday I found something that is very small, funny and definitely worth posting it here:
<br />
<div class="code">
<pre>
foreach (char c in aString)
{
	if (!(c.ToString() == "0" || c.ToString() == "1" || 
		c.ToString() == "2" || c.ToString() == "3" || 
		c.ToString() == "4" || c.ToString() == "5" || 
		c.ToString() == "6" || c.ToString() == "7" || 
		c.ToString() == "8" || c.ToString() == "9"))
	{
		// set error flag
		break;
	}
}
</pre>
</div>
I smile every time I look at it. You can even see that there was an attempt to "optimize" the code by short circuiting logic and using !( || ) in the if. And also I see a 'break' there too. I wonder if the developer who wrote it also took time to profile his/her optimizations. Funny ...]]></content>
	</entry>
	<entry>
		<title>ILMerge as the post build step</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=135"/>
		<id>http://www.laimisnet.com/default.aspx?entry135</id>
		<updated>2006-12-06T02:28:17.000Z</updated>
		<content type="html"><![CDATA[ I am really loving ILMerge tool. I blogged about it <a href="http://www.laimisnet.com/default.aspx?entryid=105" class="sideLink">before</a>. I use it in releasing NerisStream. Since NerisStream is compiled from 4 different projects, it doesn't make sense for me to release all 4 assemblies. This is kind of messy for the user, so I merge the assemblies into one. Not sure why I didn't do this before, but right now I added the post-build step to the project which calls ILMerge with the following command line:
<br />
<pre>
<div class="code">
"c:\program files\microsoft\ilmerge\ilmerge.exe" 
/lib:$(TargetDir) /t:winexe /v2 
/out:NerisStream.v.exe NerisStream.exe 
Engine.dll UIHelper.dll Utils.dll
</div>
</pre>
By the way, I do this only for the Release build since I do not need the assemblies merged during the interim Debug builds.]]></content>
	</entry>
	<entry>
		<title>NerisStream 0.8.8.6</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=134"/>
		<id>http://www.laimisnet.com/default.aspx?entry134</id>
		<updated>2006-12-04T01:21:08.000Z</updated>
		<content type="html"><![CDATA[ NerisStream 0.8.8.6 was uploaded on the CodePlex and is available for people to <a href="http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=NerisStream&amp;ReleaseId=1165" class="sideLink">download</a>. I had introduced some regression bugs in the application while adding new features and changing things here and there. I guess before releasing the application I should go through more rigorous testing. What I started doing now is running NerisStream and streaming music on my hard drive for 10-20 hours besides on top of any other testing that I do. This is actually quite affective because some bugs (especially in network, multithreaded apps) don't manifest themselves all the time. They show up randomly more or less. Anyways, after this release I don't expect any other NerisStream release until I add a major feature to the application.
<br />One of the features that I have in mind is the ability to subscribe to playlist urls (pretty much like bookmarking the playlist url of the radio station). Then, you can open up the NerisStream and select a radio station and from the playlist link it will be able to obtain the latest stream end points. Also what would be nice to add is the ID3v2 Tag support.]]></content>
	</entry>
	<entry>
		<title>back from the trip</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=133"/>
		<id>http://www.laimisnet.com/default.aspx?entry133</id>
		<updated>2006-11-29T00:42:50.000Z</updated>
		<content type="html"><![CDATA[ Well I haven't posted anything to this blog for a month now. And that is because I was on my second trip to Lithuania this year. Now I am back and getting ready to move to a normal flow of things, which includes blogging as well.]]></content>
	</entry>
	<entry>
		<title>NerisStream 0.8.8.4</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=132"/>
		<id>http://www.laimisnet.com/default.aspx?entry132</id>
		<updated>2006-11-02T03:35:05.000Z</updated>
		<content type="html"><![CDATA[ <p>I released a new version of the NerisStream. It doesn't contain a lot of new things, but I wanted to push it out as soon as possible. It has some UI improvements and much improved integration with the Winamp player. If you are listening to the radio in the winamp and you open up NerisStream, a winamp bolt image will appear. You can click on it and the URL that you are listening to will be entered in the Stream URL text box for you! No more pressing CTRL+ENTER (that most people were not aware of anyways). This release also contains a clipboard integration which I discussed in more detail in <a title="http://www.laimisnet.com/default.aspx?entryid=130" href="http://www.laimisnet.com/default.aspx?entryid=130" class="sideLink">this post</a>. To get the new release, please go to <a href="http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=NerisStream" class="sideLink">NerisStream Releases</a> page on CodePlex.
<br />
Anyways, here is a screen shot of the "bolt" in action. Let me tell as a non-artist guy, it took about 10 tries to draw the bolt that you see in the screen shot.</p>
<p><a href="pics/integration.gif" class="sideLink" atomicselection="true"><img height="229" src="pics/integration.gif" width="344" /></a> </p>]]></content>
	</entry>
	<entry>
		<title>blogs.msdn.com is having fun</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=131"/>
		<id>http://www.laimisnet.com/default.aspx?entry131</id>
		<updated>2006-11-01T19:29:33.000Z</updated>
		<content type="html"><![CDATA[ It is not too often that I get to see things like that, but it looks like blog.msdn.com is not operating properly and returns an error page stating that "data store unavailable" error has occurred. I guess I am not the only one that has issues with database server from time to time. At least they have a proper error page.]]></content>
	</entry>
	<entry>
		<title>NerisStream UI additions</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=130"/>
		<id>http://www.laimisnet.com/default.aspx?entry130</id>
		<updated>2006-11-01T17:15:07.000Z</updated>
		<content type="html"><![CDATA[ Yesterday I had a chance to do some coding on the NerisStream UI. I added couple useful features that will be available with the next release.<br />
I am not a great UI programmer and don't make things too easy for an average user. So now I am trying to rectify this situation. For instance, let's look at adding a radio station playlist URL in the NerisStream. First the user has to get the URL of the stream, open up Playlist dialog and enter the URL in the text box. I just realized that most often the users will copy the url and paste it instead of typing it in. Thus why can't I just read it always from the Clipboard in Windows environment? If it is a valid URL, go ahead and get it. If there is nothing in clipboard as text and/or it is not a valid URL, then leave the box blank and let the user enter whatever he/she wants. It is a very nice improvement for the user as he doesn't have to paste it anymore. Just this one single thing makes the app more pleasant to use. I don't have the access to source right now, but it goes something like this:

<div class="code">
<pre>
private void CheckClipboard()
{
    try
    {
        if (Clipboard.ContainsText())
        {
            string url = Clipboard.GetText();
            Uri uri;

            if (Uri.TryCreate(url, UriKind.Absolute, out uri))
            {
                txtUrl.Text = uri.ToString();
            }
        }
    }
    catch (Exception) { }
    // really don't care about handling anything
}
</pre>
</div>
<br />
Another great addition to the user experience improvement is a periodic checks on winamp. Basically if the NerisStream is not recording anything at the moment, every certain amount of seconds it will check for the song playing in the winamp. If it is a URL (thus possible a radio station) the NerisStream automatically will fetch the URL and have it there available for the user to use. It was already doing that, but the user had to ask the NerisStream to check. Right now you can still ask the NerisStream to check, but it will also check itself.
<br /><br />
I might add couple other UI improvement features, but the next big thing coming up is the addition of Ogg stream support. Basides implementing the Ogg stream parsing, I have the feel that the engine will need some modifications to accomodate different parsers. This is a good change that I am looking foward to making it.
<br /><br />
In any case, you can follow the NerisStream project changes (tasks, bugs, issues filed, changes to the codeplex wiki pages) through the <a href="http://www.codeplex.com/Project/ProjectRss.aspx?ProjectName=NerisStream" class="sideLink">RSS feed</a> of the CodePlex NerisStream page. ]]></content>
	</entry>
	<entry>
		<title>IE7 installed</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=129"/>
		<id>http://www.laimisnet.com/default.aspx?entry129</id>
		<updated>2006-10-28T20:03:28.000Z</updated>
		<content type="html"><![CDATA[ So as mentioned in the previous post, I opted out for the automatic updates to get the final IE7 release. Now it is here and installed on my home PC.<br /><br />
I am growing very tired of all the comparissons of download count between the IE7 and Firefox 2.0, and which browser is better, etc. etc. etc. Believe me, we need both in order to get quality browsers in return. The competition seems to bring out the best from both sides, thus each browser needs each other as well.
<br /><br />
In any case, I will continue on using FX as my primary browser. I have been with Mozilla and FX for some time and don't see a reason to switch. I am glad however with the IE 7 release as a majority of users will get to experience the refreshed, improved, and safer browsing experience.]]></content>
	</entry>
	<entry>
		<title>NerisStream User Guide available</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=128"/>
		<id>http://www.laimisnet.com/default.aspx?entry128</id>
		<updated>2006-10-28T17:03:48.000Z</updated>
		<content type="html"><![CDATA[ As part of the move to the open source, I just finished the first draft of the user guide for the NerisStream. You can see it on the codeplex wiki page by following this <a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=NerisStream&amp;title=User%20Guide" class="sideLink">URL</a>. The guide right now is short and very basic, but I think it is better than nothing.
]]></content>
	</entry>
	<entry>
		<title>Firefox 2.0</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=127"/>
		<id>http://www.laimisnet.com/default.aspx?entry127</id>
		<updated>2006-10-26T00:44:51.000Z</updated>
		<content type="html"><![CDATA[ I haven't received the IE 7.0 update yet (will wait for the updates to kick in). But I did update Firefox to 2.0 on all of my computers. I am pretty happy with the new release. The interface seems to be even more cleaner than before. The default skin very sharp and pleasant to the eye. A very cool thing is the automatic spelling checks for the multi line text boxes. Very very cool and useful.
I did notice one annoying thing though. Upon opening the browser, it tries to make an internet connection even though I have the default page set as blank. This is annoying at work as that results in the prompt of my proxy username/password. I should look into this more, maybe it goes out to check if there are updates available or something like that. Other than that, I am very happy with the release.<br />Besides interface changes, I am enjoying some of the new add-ons that I downloaded for the 2.0. Currently this blog entry is being published by using Performancing Firefox Add-on. This add-on allows you to publish entries to the blog and offers quite a few API choices for publishing! So yet another benefit I gain in implementing the meta weblog API for my blog engine. Now I can post the blog entries in rich blogging GUI right from my browser! This is very good news for me because I cannot use Windows Live Writer to post entries as the HTML generated by it is not XHTML valid (I don't need much, just instead of emitting &lt;br&gt; please emit &lt;br /&gt;. This small thing makes Writer unusable for me).<br />
Let me mention one more add-on: FireFTP. Not sure how long this add-on has been out, but this is extremely useful add-on. I wish I would have thought of that long time ago. One of the weaknesses of Mozilla browsers, in my opinion, was not having FTP upload abilities. But now it is here and I will be using it.
<br />
I got some other add-ons too. However I am not sure which ones are new or not as I haven't been checking add-ons for foxy for a while now.<br />Other than that, everything else looks the same (at least from the view of a regular user). I didn't get a chance to dig deeper, but I am sure I will. And if I find something intriguing, I will sure let you know.<br />]]></content>
	</entry>
	<entry>
		<title>LS/StreamRipper changes name and goes to CodePlex!</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=125"/>
		<id>http://www.laimisnet.com/default.aspx?entry125</id>
		<updated>2006-10-22T03:29:12.000Z</updated>
		<content type="html"><![CDATA[ My internet streaming program is changing the name and also becoming open sourced! The new name is NerisStream (Neris is the second largest river in my home country Lithuania, known for its beauty). The source will be hosted on the CodePlex, Microsoft's community development site. Currently the project's <a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=NerisStream" class="sideLink">site</a> doesn't have much info. Just the intro and the latest binary release. I am hoping to add the source code either tonight or tomorrow.
<br /><br />
UPDATE: The source code has been uploaded to the CodePlex. I marked the release as 0.8.8.2, but it is just 0.8.8.0 with name and namespace change.]]></content>
	</entry>
	<entry>
		<title>100th Post</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=124"/>
		<id>http://www.laimisnet.com/default.aspx?entry124</id>
		<updated>2006-10-18T03:32:21.000Z</updated>
		<content type="html"><![CDATA[ I just looked at my post entry count, and noticed that the All count has 100 in it. That means my last entry was the 100th one! That's a nice number!]]></content>
	</entry>
	<entry>
		<title>metaWeblog API implementation</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=123"/>
		<id>http://www.laimisnet.com/default.aspx?entry123</id>
		<updated>2006-10-18T03:24:20.000Z</updated>
		<content type="html"><![CDATA[ <p>As promised, let me talk in more detail on the metaweblog API addition to this blog. This is very useful feature for me as my blog posting page is very basic (think of a text box that accept blog title, category drop down, and a blog entry multiline text box). Now, I can use third party clients to post the entries. Currently I am using Windows Live Writer to post the blogs.</p> <p>So what goes into implementing this API? It sits on top of XML-RPC protocol making it almost feel like a web service. XML-RPC messages are more leightweight, simpler. The .NET Framework doesn't implement XML-RPC client or server sides, so first I had to obtain the .net implementation for the protocol. It seems to me that the number one choice for this in .net world is <a title="http://www.xml-rpc.net/" href="http://www.xml-rpc.net/">http://www.xml-rpc.net/</a> provided libaries.<br />Next you have to implement and provide a service end point for the API implementation. Since I chose to implement the xml rpc request handler in the generic handler (ashx in asp.net), I added the handler to my project. This is where the metaweblog API gets implemented. Writing xml-rpc type class is pretty much the same as writing a web service. Just reference xmlrpc.net library and add xml-rpc methods (indicated by the attributes). Here is the implementation of metaWeblog.editPost RPC call:</p> <div class="code"><pre>public class metweblog : XmlRpcService 
{
    [XmlRpcMethod("metaWeblog.editPost")]
    public string UpdatePost(string blogid, 
				string username, 
				string password, 
				XmlRpcStruct entry, 
				bool publish)
    {
        if (!Authenticate(username, password))
            return null;

        Entry e = Entries.GetEntry(Convert.ToInt32(blogid));
        if (publish)
            e.Active = true;
        else
            e.Active = false;

        e.Body = entry["description"].ToString();
        e.Title = entry["title"].ToString();
        e.EditDate = DateTime.Now;

        return e.Save().ToString();
    }
}
</pre></div>
<br />
Notice how the implementing class inherits from XmlRpcService (which provides all the plumbing code for the handler). The methods have XmlRpcMethod attribute. "metaWeblog.editPost" specifies what procedure in the API the method implements. One interesting construct in the whole XML-RPC protocol is the XmlRpcStruct. I think of it as a simple key-value collection allowing to pass many values to the methods.
<p>
Anyways, that's about it. Besides "metaWeblog.editpost" I also provide other metaWeblog API implementation methods:
<br /><br />
<div class="code">
    [XmlRpcMethod("metaWeblog.newPost")] 
    public string NewPost(string blogid, string username, string password, XmlRpcStruct entry, bool publish) 
<br /><br />
    [XmlRpcMethod("metaWeblog.getRecentPosts")]
    public XmlRpcStruct[] GetRecentPosts(string blogid, string username, string password, int numberOfPosts)
<br /><br />
    [XmlRpcMethod("blogger.deletePost")]
    public bool DeletePost(string appKey, string postid, string username, string password, bool publish)
<br /><br />
    [XmlRpcMethod("blogger.getUsersBlogs")]
    public UserBlog[] getUsersBlogs(string appKey, string username, string password)
<br /><br />
    [XmlRpcMethod("metaWeblog.getCategories")]
    public XmlRpcStruct[] getCategories(string blogid, string username, string password)
<br /><br />
    [XmlRpcMethod("metaWeblog.newMediaObject")]
    public XmlRpcStruct NewMediaObject(string blogid, string username, string password, XmlRpcStruct rpcstruct)
</div>
<br /><br />
The above shown 6 methods and the editPost method provides all that I needed to use Windows Live Writer to post the entries. I should look around for other clients and see how they work. In any case, it was a fun little coding exercise.
</p>]]></content>
	</entry>
	<entry>
		<title>My first post from the Windows Live Blog Writer</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=121"/>
		<id>http://www.laimisnet.com/default.aspx?entry121</id>
		<updated>2006-10-17T04:41:15.000Z</updated>
		<content type="html"><![CDATA[ So as I said, over the weekend I was working on upgrading the functionality and features of my blog. As you can see, the comments are available and spam protected with akismet (what a weird name); and now on top of that, i can post my blogs with Windows Live Writer! I implemented and added the metaweblog api for my blog which allows any client that implements that api to communicate with the blog. I definately gonna write more about the implementation details more later. I cannot do that right now. The Bears just have beat the Arizona after trailing by 20 pts in the 4th quarter. The most exciting Bears game I have ever seen, and I had about 9-10 beers in me, which means i need to get the rest before I go to work tomorrow morning.]]></content>
	</entry>
	<entry>
		<title>Source control setup</title>
		<link href="http://www.laimisnet.com/default.aspx?entryid=119"/>
		<id>http://www.laimisnet.com/default.aspx?entry119</id>
		<updated>2006-10-15T20:51:27.000Z</updated>
		<content type="html"><![CDATA[ Today I setup a subversion server on my desktop. It was very easy to set it up with a superb installer that can be obtained at <a href="http://svn1clicksetup.tigris.org/" class="sideLink">http://svn1clicksetup.tigris.org/</a>. Before, my personal development source repository was a folder that I would access with turtoisesvn. Having a server will allow me to switch between working on the desktop and my laptop (I started switching quite frequently recently). Turtoise integration with the windows explorer makes using subvertion on windows environment so easy. I hear there is VS.NET add-in for subvertion, but I haven't tried it out yet. I guess I should sometime, see how well it works.
<br /><br />
Completely unrelated