A Developer WeBLOG RSS 2.0

As per title says, Merry Christmas 2008!! I know its 3 days late, but hey its better late than nothing. I had been kinda busy the last few days. I went to a Christmas Dinner party on Christmas eve, went to a Christmas BBQ party at my friend's home on Christmas day, and lastly went on shopping frenzy on boxing day.

I had 3 items that I wanted to buy for Christmas, which are MSI Wind nettop, Oakley sunglasses, and Guitar Heroes: World Tour Complete Band Set. Out of the three the one that I wanted to buy so badly was the MSI Wind nettop. Appart from the standard nettop features, it has: 10 inch screen, Wireless N, 2 Gb of rams, and 6 cell batteries. Moreover, it was also on sale for $585. It is seriously a very good bargain for a nettop at the time, because with other nettops of the same specs, the price could go far to $800.

I have a tendency to be more conservative when it comes to spending money on non-necessaty tertiary item. So I give it some thinking before buying the MSI Wind. The main purpose that I would use a nettop is for superior mobility of browsing the internet and extra storage. Since the wind that i think of getting comes with 120 Gb harddrive, thus as an extra storage it wouldn't be a problem. However, as a superior mobility internet browser, that could be a problem. The problem is that the nettop doesn't come with built in 3G connectivity. This means you can't just browse internet anywhere and whenever you want, you need to find a wifi hotspot to browse the internet. I know you could use one of those 3G USB dongle, but its not nice to detach and re-attach the dongle everytime you need to connect to the internet. Some other things that it lacks of are CD drive and the latest generation of Intel Atom CPU. Bugger!!

To be honest one day I would still get a nettop, cause its a nice little gadget that makes sense to have. At the moment I think, I would rather wait for the next generation of nettop.

RWendi

Saturday, December 27, 2008 10:35:00 PM UTC |  Comments [0]
General

For the last couple of months my work has been bottlenecked by my build time. After I got my new computer, my build time using Visual Studio was pretty quick. It was a very enjoyable time to work. Until one day my build time just dropped to 45 minutes. It even reached 1 hour mark at one time. This issue affected my team mates as well. We tried to investigate the cause of it, but never seems to be able to solve the problem.

Luckily my senior came up with an intermediate solution, which is to use MSBuild through NAnt script. The intermediate solution took 6-7 minutes on average to build, which is alot better than 45 minutes. I talked to my senior that, even the alternative solution builds alot faster, but we still need to solve the build time issue. He then said to me, "We cant afford to waste more time trying to solve this, we have important work to do, we have to settle down with the alternative solution.". So I was like, he may be right, and I asked my self how bad could it be to have a 6 minutes build time.

Well, It turns out, it's pretty bad. In the first few weeks, I could start feeling the effect of it. Most of my time was wasted to wait for my solution to build, Work became so boring. It was very hard for me to focus and get itno "The Zone". Even when I got into the zone, my 6 minutes build time would easily break it. Why? because I was doing some other things during that waiting time, things like: reading blogs, listening to podcasts, watching pdc videos and whatnot. You may think that I was bludging, but I was just trying to utilize my time rather than wasting it.

Lets just do the math for a sec now. I have a 6 minutes build time. Lets just say I do 10 builds a day at minimum. Since one build takes 6 minutes, that would mean I would waste 1 hour of my work time in a day. Now that's just the minimum, and there's no way software developers do just 10 builds in a day. They usually do more, alot more. Especially in my case, where I have to use loggings to debug my application. I honestly could say that this issue had been taking out a good 2-3 hours of my work time per day.

This build issue had worn me out, physically and mentally. Especially when time was a constraint, I felt bad when I was not able to deliver a solution on time because of this. And what made it worse is that my team mate seems to not having any problem with it. Wait, did i say my team mate doesnt seem to have any problem with the build issue? Yes he doesn't and never was. It turns out that he has a hacked way to tackle the problem that makes his build time is uber fast. It involves changing the project references of the project that we want to build to just reference the dlls. So I tried his way, I grabbed his project file and chucked it into my solution. BAM, my build time went down to less than 30 seconds!! Man, to be honest I couldn't be happier in my life. All of the sudden my work becomes less dull and more exciting. I feel that I've gained my speed back. Its Awesome!!

Based on my experience, all I can say is: do not underestimate your build time. Long build time can seriously hurt your performance and demoralize you in a great way. I would consider any build that takes longer than 2 minutes is a problem. If you have a build problem fix it right away, its not worth your time and energy to work with long build time. Faster build time = Better work efficiency.

RWendi

Saturday, December 13, 2008 4:03:58 AM UTC |  Comments [0]
Programming

On some unknown cases, opening files/documents using .NET Process class may have a performance impact. I hit this issue a while back, and it took a good few seconds for the .NET process to open up a Word document. I had a similar code as below when the issue occured.

After some research, I found out that this can be remedied by: instead of setting the ProcessInfo.Filename to be the filepath, you set the property to be the path of the designated application to open the file, and specify the file that you would like to open as its parameters (As shown below).

The problem with this method is that, you need to do this for every file type that you would like to support. So if your application supports multiple file format, you need to support each and every one of them in your code. Another problem is that, you need to find a smart way in detecting the default application that was set by the user to open a file. For example: if you want to open a word document, you can't always assume that the user has Microsoft Word installed in his machine. What happened if the user has OpenOffice instead? Or another case is, If the user has both MS Office and OpenOffice installed, but the user has opted to use open office as default application. Surely the user would prefer to use OpenOffice instead of MS Office. Thus we cannot just hardcoding value in.

Another solution to the problem is to use ShellExecute method of shell32.dll. One way you can do this is by defining an external method for the ShellExecute, and then calling it from your code. Another way of doing this is to set the Process object to do a shell execute. You can do this by setting the UseShellExecute property, of your Process' StartInfo object, to true.

So if you ever hit a performance issue when opening documents using .NET process class, give the above soulutions a try.

RWendi

Tuesday, December 09, 2008 9:13:56 AM UTC |  Comments [0]
.NET | Programming

Last week my site was attacked by spammer. On my How to create code snippet entry, some idiot decides to spam it. It had 147 of spam comments. Its funny I must say why someone/some bot decides to spam my site. Its not like my site is getting a huge number ammount of visitors. Well anyway, I thought the spams were a temporary thing, so I decided to just remove the comment XML file and not doing anything to prevent it from happening again. Boy I was wrong, it happened again!! This time is not as much (only 15 spam comments), but it shows how the spammer is still keen on spamming my site.

Having to know nothing about how to prevent spammer, I decided to prevent this in simplistic way, which is to change the comment settings to require approval. This means that the spammer's comment will only visible to me, unless if I approve his comments. I was thinking that maybe by doing so the spammer would just give up, since he's not able to see the result of his spams. I was wrong again!! The idiot still spamming me with useless comments filled in with links to mallicious sites.

I decided to have a look on dasBlog configuration settings, I thought that spammer must be a common problems to blog sites, and I assume that dasBlog should have implemented something to help fight spammer. Luckily, dasBlog does have a spammer settings. It has a couple of options, but one settings that caught my eye was "Enable refferal blacklist". I had it enable, and entered the spammer IP address to the list. I thought that would do the trick, but it didn't work.

Not able to have the blacklist working, I opted to another settings which is to enable Akismet. Akismet is a spam blocking service that's free for personal use. Akismet requires an API key which you'll get when you register an account with WordPress. So I created a WordPress account and use the API key for my blog site, and it works!! In dasBlog you get an option to automaticaly remove the spam or wait for my authorization before removing it. I just set it to automatic, and I've never seen that spammer spams my site anymore, awesome! If you had problem with spammer in your blogsite, I highly recommend the Akismet service. It works like a charm.

RWendi

Monday, December 08, 2008 8:56:39 AM UTC |  Comments [0]
Blogging | dasBlog | General

It's been a very busy couple of weeks for me, and I literally had to stop doing what I usually do in my leisure time(including blogging). First up my Grand Mother died on the 6th of November 2008, I had to fly back to indonesia to attend her funeral. Her funeral was held in Bangka Island on Sunday 9th of November 2008. Bangka island is an insland on south end of Sumatra island, its a place where most of my family are from, including my parents. I spent about a week in Indonesia, because After her funeral, there were some post-funeral ceremonies I need to attend, such as: the 3 days after burial ceremony (or in chinesse term: Sam Cao), and the 7 days after death ceremony (this is the catholic one).

I flew back to Sydney on the 16th and arived on the 17th of November. Didn't spend that day to rest, because I had to accompany my girlfriend and her brother to walk around the circular quay area. Her brother had just been granted an Australian permanent resident visa, and had to enter Australia to obtain it. He stayed in Sydney for like 2 weeks and in that 2 weeks I spend most of my leisure time to show him sydney. We went to Sydney opera house, Bondi beach, The Gap @ Watson Bay, and Darling Harbour. On his last night, we had dinner @ Sydney Tower restaurant to celebrate my girlfriend's birthday. I have to say the restaurant is a bit overrated. It's expensive, the food was sub-par, and service was almost none to existent. The only good thing about the restaurant is the view, but it doesn't worth the $65 dollars fee though.

That's what I've been doing in the last couple of weeks. Looking forward to get back on my daily things to do.

RWendi

Tuesday, December 02, 2008 7:37:30 PM UTC |  Comments [0]
General
All Content © 2012, RWendi