Dec
10.
2008

It is no secret that the parallel programming is the Next Big ThingTM. The processor speeds are mainly constant and the only thing that increases is the number of cores. For the general parallel programming, at least for the data parallelism, there are already several initiatives that should help programmers escape the world of manual thread creating and locking.

But most of these technologies only count on the presence of the CPU with certain relatively low (<16) number of cores. But what if you had hundreds of cores at your disposal?

The GPU (chip that powers your graphic card) is one example of a highly paralellizable processing unit albeit it's parallel "cores" are not nearly the same kind of cores as we have on the CPU. Consequently the development model for the GPU is significantly different and additionally burdened by its historical graphics-only usage. You really can't easily develop applications or routines using graphical APIs like OpenGL or DirectX - they are simply not meant for anything else but graphics development.

Yet the computing power of  GPUs is enormous. One PS3 can provide many times the performance of a very powerful modern CPU for the Folding@home project. The possibilities for financial and scientific use are enormous.

But to get this kind of performance you'd have to use the API appropriate for the target chip. If you have NVIDIA hardware, you're forced to use CUDA. For ATI/AMD, you'd use stream computing APIs.

But no more. In a record 6 months, the Khronos group has published the specification for OpenCL 1.0, the common API for general purpose GPU computing on all platforms that implement the support for the API. Both NVIDIA and ATI are in as is Apple which plans to make OpenCL a big part of the next OSX release.

Even better news is that OpenCL supports CPUs as target so as soon as the support is available from any of the vendors we can start playing with the technology - once the algorithm works on the CPU you can try to execute it on a GPU. Most of the vendors pledged support in the first or second quarter of 2009.

Exciting times, indeed.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments
May
10.
2008

Cheaper talent: a must read

Posted by: Drazen Dotlic in Categories: general | rant.
Tags:

Relation between developer's quality and compensation is a hot topic. Lots of e-ink has been spilled over this issue but not much crystallized in the end. Unlike lawyers who have established a baseline price of their work, developer's pay fluctuates wildly and is not necessarily related to the quality of their work (in fact, more often it boils down to how good negotiator you are). Quite often you'll see developers (who recently started contracting) asking for help on how to price their work on a public forum. Clearly we need some kind metric to measure developer's productivity, but even more we need to understand the quality of the work, more than the quantity.

Martin Fowler's Cheaper Talent Hypothesis is a great read that covers many important points. The relevant piece that talks about quality says:

Faster cycle time leads to a better external product, but perhaps the greatest contribution a talented team can make is to produce software with greater internal quality. It strikes to me that the productivity difference between a talented programmer and an average programmer is probably less than the productivity difference between a good code-base and an average code-base. Since talented programmer tend to produce good code-bases, this implies that the productivity advantages compound over time due to internal quality too.

I'd say this is actually the most important aspect. Of what use is the ton of code if it doesn't work? In one of the previous companies I worked for, an informal study showed that every bug that ends up in developer's lap (confirmed bug that needs fixing) costs the company, on average, one thousand euros. The reason is not that developers' time is expensive, but that the problem needs to be processed by support personnel, repeated, described/documented and after the developer is done fixing, the issue needs to be confirmed as fixed.

Think about this. With a couple of bugs "generated" a cheaper but lower quality developers will nullify the salary difference. Or vice-versa: with each bug not created a more expensive but higher quality developer will cost you less.

Unfortunately not many (if any) companies look at the problem this way. Usually the only metric is how fast one can reach the "finished" product state. The time spent in fixing all the issues introduced by rushing the product out of the door never "counts". It's a shame.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments
Mar
10.
2008

IE 8: no madness afer all

Posted by: Drazen Dotlic in Categories: general | rant.
Tags:

When it was revealed that IE 8 is indeed in the making a couple of months ago, the news of the day was the improvements Microsoft has made to IE regarding standard compliance.

Theoretically, things were going great: Microsoft passed the ACID 2 test demonstrating quite a big step up from the IE 7. For years Microsoft has been catching up with the Web standards, but the pace of the progress has been slow. Each new version of IE after and including version 6 was just a bit more compliant. Passing ACID test was supposed to demonstrate that IE 8 will in fact be sufficiently standards compliant so that Web developers can finally code once, deploy everywhere (for more on the different modes of browser behavior see Wikipedia page on “quirks mode”.)

Or so it seemed. The problem at the time of the original IE 8 announcement was the way the standard behavior of the browser was supposed to be triggered. Due to the large number of Web sites that still target broken “standards” mode of older IE versions, Microsoft decided to introduce a new meta tag with which a developer would opt-in to the “really really standards mode”. Thus, by default, the IE 8 would behave the same as IE 7, which in a way defeats the purpose of the real standards mode and would most likely slow down the adoption of the standard compliant pages.

The decision to go with the IE 7 standards mode by default resulted in a huge backlash from developers. Basically by doing this Microsoft introduced yet another special case that a web developer has to think about. If the IE 8 was in the standards compliant mode by default and judging by the level of the standards compliance of both Safari 3 and Firefox 3 it looked like web developers could finally stop conditionally styling the pages, which is a huge win for everyone.

InternetExplorer8Beta1Then a great thing happened. During this years’ MIX conference Microsoft announced that IE 8 will in fact by default do things the right way. If a developer wanted to get a IE 7 “standards” mode it had to explicitly say via a meta tag, so the situation is a reverse of what it used to be. To rectify the cases where a developer didn’t say anything, the web site was targeting IE 7 and therefore looked bad in IE 8, Microsoft added an “Emulate IE7” button featured very prominently in the main toolbar.

We can only speculate what motivated Microsoft to make such a change. Some think that increased pressure from various lawsuits in Europe and particularly complaints by Opera about the need for Microsoft to increase IE’s standard compliance was a main driver. Some think that it was simply a part of the overall Microsoft strategy to open up. Some think Microsoft actually listened to customer feedback.

Whatever it is I am grateful. Even though I do not do much Web work, what I did do was often an exercise in pain trying to align the look & feel across major browsers.

Here’s to hoping that by the end of this year one will have very reasonable standards support across all major browsers  and that the compatibility nightmare will finally be over.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments
Jan
21.
2008

My trusty Dell laptop is now 3.5 years old and the batteries have basically died at this point. The extra battery for the drive bay (slide DVD out, slide extra battery in, enjoy several more hours of unplugged goodness) can’t be charged while the primary battery only lasts for an hour or so.

A quick search shows that the batteries are insanely expensive. Roughly, they cost 120€ each, 240€ total, which is around $350! (yeah, this is mostly due to the weak dollar, but still). For comparison, the laptop cost me around 2500€ at the time (it was top of the line and that’s why I can still comfortably use it today) so the new batteries would be 10% of that price.

NewDellBatteryI wasn’t ready to pay that much so I turned to eBay. Guess what – I found the same batteries, brand new, for a quarter of the price. Both were about 64€ with shipping from Hong Kong.  As expected, the batteries do not have Dell official sticker, but are for all intents and purposes identical to the ones I already have. You can see the ID and serial number of the primary battery on the screenshot.

The new primary battery lasted almost 4 hours yesterday, exactly what it should for light Internet browsing, news reading etc. I had LCD brightness to the max, Wi-Fi on and an external hard drive attached so I wasn’t really saving power.

I guess that the batteries sold by other “official” sources still come from the same group of vendors as this one, except that they have “official” sticker (Dell’s or somebody else’s). I don’t like paying for branding and I’m extremely happy with my purchase.

A few sites on the Internet show you how to replace the actual batteries inside the laptop packaging. This is a slightly tricky process that requires soldering and careful manipulation of the battery package (so that it can fit back into the laptop), not to mention the possibility to fry the battery and/or laptop if mishandled. With batteries as cheap as this, there’s no need to opt for do-it-yourself whatsoever.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments
Nov
27.
2007

This would not have been news if it wasn’t for the fact that my wife never went to computer school nor has worked in a programming related field, ever.

You see, my wife is a girly girl. The one that thinks first about what to wear and which makeup to apply when she goes somewhere. The one that does her nails 7 times a week or more. The one that likes pink things. The one that makes the best damn cake in the area. You get my point.

Yet, she is now a certified developer. It wasn’t easy – we started with Charles Petzold’s most excellent book Code, then moved on to object-oriented design in general, then finally to the concrete programming language (VB.NET). We developed a couple of small projects and then bought her the material for self-study preparations for the exam. For one of the tests she attended the 4 week course, for the other she just read the books. I helped as much as I could, but she did all the hard work.

I’m so proud. One more developer in the family, yay! On the other hand, she’s a VB person and I am a C# person, so some rivalry is to be expected

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments
Sep
11.
2007

You might have noticed that with the launch of Windows Vista there are now many new “Works with Vista” certifications and logos. This is normal - each new Windows version adds new features but also new conventions and sets of recommendations. Microsoft values backward compatibility but if you want to stick a new logo on your product, you need to update it to comply with the latest and the greatest.

It’s “easy” with the software – open up the source code, adjust where necessary and recompile. What about hardware? Most of the new hardware devices do leave out quite a bit of functionality to the firmware (a special software necessary for proper functioning of the device) that can be updated, but don’t expect dramatic changes or improvements.

Thus I was puzzled when it turned out there is a Vista logo for home routers, and the one called “Works with Windows Vista” at that. Will my router work if it’s not certified?

Of course. Turns out that this logo ensures that most of the new features in Vista are actually used, plus it makes the configuration of your home network much easier and enables flawless media sharing between your PC and other devices like Xbox 360. In other words, the certification process is good for the average consumer that does not want to fiddle with network equipment. Normal people expect the router to “just work”, no maintenance whatsoever.

If you are network savvy and know how to open (and close!) ports on the router, do not share videos wirelessly or simply have a trivial network setup (ISP provided router and one computer) you do not need to worry about the logo. I have used two different routers in the last few months, neither is certified in any way but everything works fine, including my 64–bit desktop Vista machine, 32–bit XP laptop (over wireless) and (wired) Xbox 360.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments
Jul
26.
2007

In theory it sounds great: promise your customers that you will match any (lower) price they could find elsewhere and they’ll always come to you knowing they’ll always pay the lowest possible price. In practice, count on the fact that many will be too lazy to actually contact you especially if you make the whole process complicated.

On the Internet though, the rules change. It is easy to find other places that sell the same thing and it’s usually very easy to report a lower price elsewhere. How will the merchant get out of this situation? Yes, I am assuming that online merchant’s promise of “we’ll match any price you find on the net” is a marketing ploy and nothing more.

I was pleasantly surprised today. I bought some optical cables from TopAchat and noticed the claim about matching price. Since I knew that Amazon had the lowest price (but only one cable in stock, otherwise I would have bought the cables from them) I decided to see if TopAchat will honestly honor the promise. Submitting the claim was simple – I had to enter the direct URL to the product on the other site and its price. All of this took place late last night, around 23h.

A couple of minutes ago, around 10h I got the confirmation mail – TopAchat will do as promised and reimburse me! Considering how ridiculous the difference in the price actually is in this case – 2.6€ for both cables – their response is even more impressive.

What this means is that from now on, I will be safe knowing that I can buy anything from them for the lowest price I can find at any other merchant’s site! This makes both of us happy – they get a lot of business from me (and other users) and I get to shop at one place, for the best price possible and I get to minimize the shipping costs too.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments
Jul
24.
2007

I mentioned this before – the beach is only about 2 minutes away from my apartment. Now that I don’t have to go to work every day I am using the chance and going to the beach every day.

As you can expect, at this time of the year there are many foreigners here. The influx of tourists brings the small sellers of T-shirts, shitty watches, cheap sunglasses etc. Some of them walk the beach all day long.

One of these guys uses a street smarts technique – he is constantly repeating, almost chanting, only two words with a small pause between each word: “Madam… Price…” (repeat, ad nauseam).

Men don’t care about shopping* nearly as much as women do, so he's addressing “madam”. And the only other thing they might be interested in is “price” since the quality of the items ain’t for sure what’s attracting the customers. He is also using English because it’s more likely to be understood, even though his English is most likely barely usable (most of the sellers come from African French ex-colonies and speak French fluently, but not English).

Practical and effective. The business doesn’t scale much and doesn’t bring much I guess, but at least he is increasing the chances for a sale with a simple approach.

 

*A special sub-species of men are programmers who care about shopping even less – physical shopping, that is. They tirelessly comparison-shop online and when they are content that all the opinions in all the forums traversed are reasonable, programmers order online and have the item delivered to their home.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments
May
15.
2007

Vista64WelcomeCenterThis weekend I took the plunge I talked about before here and here. In short, I have a new machine with 4GB of RAM that I want to use completely. Running 32–bit Windows XP does not allow me to do that. At the same time, it took me quite some time to set this machine up and some of the applications I run might not run correctly on 64–bit Vista (intended target). Thus the best way to upgrade yet not to lose any of the settings is to move the machine into a virtual one and just continue running it! Then I can move the software from virtual to the new physical setup at my own pace.

VMWareConverter15MinutesThat’s exactly what I did. As soon as VMWare Workstation 6 turned RTM, I installed VMWare Converter 3.0.1 and in less than 15 minutes my complete setup went virtual. Installed 64–bit Vista in what felt like half-an-hour, installed Workstation 6 and a couple of settings later I was back in business. The only important thing to change was to fix the IP address of the VM to the previous physical machine’s IP address so that port forwarding from the router can still work unchanged.

This is the first time in my life that I had a stress-free upgrade involving wiping of the OS drive and full reinstallation. It feels great! The weblog you are reading now is actually running in a VM.

By the way, I had absolutely zero issues with 64–bit Vista. I did make sure that all the drivers I needed are available, but besides from that, no problems. 32–bit applications work like a charm, too. I had to set up a few of the particularly misbehaving apps (trying to write to “Program Files” folder etc) but it was all minor.

Added bonus – wife likes the fact that all the graphics are vector based so all the games she plays can be “enlarged” unlike in Windows XP. This is the first time she accepted the upgrade without complaints.

Finally, new VMWare Workstation 6 rocks, as expected. I am writing a review of it for the Serbian magazine “PC” which is a great way to familiarize myself with the new features. Upgrade price is still a bit high though, about 50% of the full price.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments
Apr
6.
2007

Cool Vista feature

Posted by: Drazen Dotlic in Categories: .NET (C#) | general.
Tags:

I know that many don’t seem to appreciate Vista, but I like it. It does bring a few fundamentally revolutionary concepts (at least for Windows) like 3D composited desktop and is in general simply a newer better Windows.

The cool thing I’d like to mention today is one of those small things that make your life easier. Nothing earth shattering, but nice nevertheless.

If an app is running on a different desktop than the logged in user, it should not display any kind of dialogs or message boxes. The reason is simple – you can’ see them! The whole point of a message box is to inform the interactive user about something.

If Vista notices that an app did in fact do this, it notifies you and asks you if you’d like to see the message. In my case, avast! had problems downloading the updates and for some reason wanted to let me know, but on a different desktop. Vista kindly switched me to the other desktop so I can read and dismiss the dialog/message box. I’m not sure if the dialog was modal, but if it was and I wasn’t able to see (and dismiss) it, the app would have stayed stuck forever.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments