Archive for the 'technology' Category

What is your homepage?

Monday, July 21st, 2008

I’m actually quite amazed how many people out there cling to the ancient idea of a “home page”. I’m sorry, I’m amazed how many people who use modern browsers still use “home pages”. IE users of course have no choice. I mean, you can’t really expect much from a browser in which the CSS support is only slightly better than in Lynx (which has virtually no CSS support). Most people who use, normal, non-retarded browsers (and I mean retarded in non-derogatory way of course - as in developmentally challenged) - like Firefox and Opera sessions have their browsing environment restored to the previous state when they open the browser, so they can pick up exactly where they left off.

What I do have is a set of tabs that usually opens when my browser opens and I get upset if for some reason my session gets messed up and I am forced to re-open all of them. These are usually google reader, google callendar, twitter homepage, terminally-incoherent administration panel. On top of that there is whatever I was browsing before, and what I want to revisit next time I open the browser. In other words, I do not have a singular homepage but a whole set of dynamic pages that I want to have open at all times.

Working in IT I had ample opportunities to see what technology-impaired people usually set as their home pages. The breakdown was something like this:

  1. Most people used MSN which clearly indicated that they never figured out how to change their homepage. When I switched their page to our company website many people remarked “how fast the internet loaded” for them after that. That’s because our page did not have flashy flashing flash, jumping, moving and scrolling adds and all that crap
  2. A lot of laptop users had their home pages hijacked by their home ISP - so all Comcast users had comcast.net, all AOL users had AOL.com and etc…
  3. Quite a few people had some strange Yahoo fetish. My theory is that they all first got “the internets” back in the ancient past when “Yahoo” == “Searching the web” and never moved on. Go figure.
  4. The rest of the people used Google but not iGoogle.
  5. Some of the more clueful people used about:blank for speed

Naturally none of these people actually used browser sessions but then again these are the same people who send emails like “when I open microsoft I get an error” to our help desk. Expecting them to actually enable a non-default feature that is both convenient and helpful (at least IMHO) is silly. This sort of people like to do things the hard way. P

Here is a question for you, the reader: do you use a homepage, or sessions? If you do, what is your homepage and why. If you don’t then do you have a set of tabs/pages you always keep open like me? Let me know!

WIMP or WAMP?

Thursday, July 17th, 2008

For the past few years I have been running some software on a WIMP stack. They have been working quite well. I never had any issues with the technology stack itself. Or rather the only issues I had at times stemmed from the fact that a lot of PHP apps automatically assume that you are running Apache. So lately I had this crazy idea to try switching things around and running things on top of a WAMP stack. Here the thing though…

Long, long time ago, in a galaxy far, far away - as as I call it “back in college” I participated in a discussion on this very topic. It started with the following statement:

“… and on top of that they are running Apache on windows which is kinda stupid!”

This was met with round of nods, and approving grunts from everyone. Since I was the youngest, dumbest and least informed person in the room, I nodded too. Then asked why was it stupid, trying to figure out whether or not I should immediately uninstall apache from my home desktop.

The answer I got was sort of convincing. Apache was never designed to be run on windows. It was ported back to windows - it works because of kludges and hacks were made. It will never be as efficient as a server designed from ground up for the platform. It won’t scale and etc.. This was followed by another round of nods. One again, since I was least experienced, and least knowledgeable person there I didn’t argue the point and taken it as a given. From that point I always tried to run pure LAMP when possible, and if I had to use windows then use WIMP instead of WAMP. And of course I always figured:

“I have this windows box here, and it comes with it’s own built in server, so why would I install another one on top of it”.

Now that I think about it, I can’t really find any empirical data - any tests, or benchmarks which would support the convincing IIS vs Apache argument from my distant past. There are millions of various arguments on which one is better out there but most of them boil down to “Apache is better because it is open sauce” or “IIS sux because it is from Micro$not” and so on. Serverwatch has a nice, objective cross comparison between the two - and if you look at it, you will see that both are almost equivalent when it boils down to features. IIS is better at running ASP, and integrating Windows specific stuff. Apache on the other hand is multi platform and integrates better with linux-y technologies.

I really believe that the whole “Apache is a port” logic is faulty. It is an open source project after all, and people have been successfully deploying it on Windows for years, even in production environments. I’m sure it grew up considerably in the last 6 years or so since I had that conversation too. So if it was flaky back then, I’m sure it is not flaky now.

What do you think? Is WAMP a viable option these days? Should people stick to WIMP? Or is WIMP the abomination here? Is PHP really better off pairing up with Apache? I’m throwing it out there because I honestly don’t know. On one hand, I don’t want to try to fix what is obviously not broken. On the other hand, perhaps running WAMP would be more beneficial in a long run. LAMP is not really an option at that location I’m afraid.

Designing a Better Binary Clock

Monday, July 14th, 2008

I have a nice little binary clock from ThinkGeek standing on my desk. It is a silly gadget, but as any geek I lust for this sort of things. Awesome little toys which remain incomprehensible and mysterious to mere mortals. It is sort of a symbol - normal people look at the damn thing dumbfounded. Fellow geeks, smile with approval when they see it - they know they found a kindred soul. Then there are those people who don’t actually believe that this toy shows time, or that you can reliably read it - so they challenge you.

Tell me what time does it say it is, right now! Quick!

The problem with these clocks is that unless you are standing next to it, in a well lit room they are incredibly hard to read. Reading one from across the room - especially when it’s dark, and the unlit lights cannot be seen, is not easy. For example, imagine you wake up in the middle of the night in a dark room and you glance on your binary clock. What time is it?

Most Common Form of Binary Clock

At the first glance I would say it’s either 11:15 or 11:19 depending on whether the highest dot is in the 4 or 9 position. It is hard to tell without any frame of reference. And that is the point here. All we see are dots suspended in black void. If you would approach the clock and look more carefully, you would see a different picture:

Readable Binary Clock

Oops. It’s actually 1:11 and 50 seconds. Because you had no frame of reference and you didn’t see the “zero” columns the whole image shifted slightly in your mind. Of course if you wait a second or two you will notice the last row changes way to quickly to be considered “minutes” and another row will appear as the seconds pass. This will let you guess it is actually 1 instead of 11. Similarly, you can distinguish a 4 from an 8 by observing the seconds column and comparing relative distances. But it is in no way intuitive, or quick. Unfortunately this is the design of every single binary clock gadget I have seen on the market.

The problem is that the unlit LED’s are as important as the lit ones when you try to read this sort of a time piece. A slight change in design to actually illuminate the LED’s in OFF position would make these devices much more readable. How do you illuminate them in a way that would make sense? You can do it in the way I shown on the picture - simply show an outline, or a filled dot. This could be done using some sort of a shutter or a film to cover the OFF LED’s and fully expose the ON ones. Alternatively you could use different colors or intensities. For example you could use a contrasting scheme with dim red lights for OFF and bright green/blue LED’s for ON.

Alternative Design of Binary Clock

How does that look? How would it look on the other end of a dark room? Personally I think such design would be much more functional. A binary clock we could actually read from far away, and in poor light conditions. Imagine that! What do you think? Are you happy with the current design? What is your suggestion to make these things easier to read while retaining the charm and geek factor of a binary clock?

What is the point of explicit typing again?

Monday, July 7th, 2008

I’m noticing that C# 3.0 has implicit type declarations which is actually a very interesting step to make this language look less like a cheap Java clone. It is a very neat feature that lets you declare your variables like this:

var s = "Hello";
var d = 1.0;
var numbers = new int[] {1, 2, 3};
var orders = new Dictionary<int,Order>();

By show of hands, lets see who doesn’t approve of this feature? Who here thinks that we should explicitly declare the type on the right side of an assignment statement? Yeah, you guys are all wrong. Please tell me, why is it necessary to write:

String foo = "bar";

Could foo possibly be anything else than a String in this line? String can’t be subclassed, and no other data type can be instantiated this way. So the word String doesn’t tell me anything that I wouldn’t know by looking at the line anyway. It also doesn’t tell anything new to the compiler which can infer the type quite well. Forcing people to type String every single time they declare one is just cosmetic… no, pedantic anal retentiveness. Hell, even Scala folks use implicit type declarations - and these are the people who think that static typing in Java is not static and not type safe enough.

The explicit declarations are quickly becoming a thing of the past. The trend is moving towards less verbose, compact and more elegant syntax - in both dynamic and static typing camps. C# seems to be adopting to this new reality.

When I first saw C#, I described it to a colleague as “a Java Clone written by C++ people, or a C++ clone written by Java people”. It seemed to have been created combine the best of both worlds and draw both Java and C++ developers in. But that was a long time ago. Java is no longer the cool and hip language. It is “your dad’s language” - outdated, bloated dinosaur. It’s not going to go away but it is no longer cool. I think Microsoft made a smart move here, distancing itself from it. I mean, implicit data types, lambda statements and all that jazz.. They might actually have a chance to remain relevant as Java is slowly transitioning into it’s new life as a senior citizen of programming languages. Actually, scratch that - relevant is a wrong word here. Change it to popular, well liked or buzz worthy.

Both C# and Java will remain relevant for years to come, just like C is still relevant now. No one thinks C is revolutionary, hip, cool and awesome anymore. But no one seems to be eager to throw it away and forget about it either. Universities still teach it, and companies still hire C programmers. The same fate awaits Java and C#. They will be around for a long, long time.

The name of your first pet is to short!

Thursday, July 3rd, 2008

I previously ranted about strange password restrictions that disallow usage of special characters such as spaces or alphanumerics. This time I want to complain about another boneheaded security feature out there - word length restrictions on your “secret” password recovery question. I was recently creating a Microsoft Live Passport account to register Visual Studio Express 2008 copy. Yeah, laugh all you want but PerfMonG is written in C# and it won’t maintain itself no matter how hard I try to ignore it. At some point during registration I saw this:

croppercapture81.jpg
click on the image to embiggen

Don’t get me wrong. I’m all for keeping things more secure, but restricting the secret answer to strings of more than 5 characters is a bit silly. For starters, let’s consider pet names. I don’t know about you, but I find that most of them are relatively short. For example I did a quick google search of most popular dog names and I stumbled upon this ranking:

Most Popular Dog Names

It turns out that half of the top 10 most popular dog names are shorter than 5 characters. If you look down that list, this trend continues. So roughly half the people won’t be able to use their pet name as their secret question, or will have to figure out a way to make it longer (for example by adding their last name) by simply adding confusion. Same goes for the childhood friend option. You may remember that your best buddy from the playground was named Bob, but will you always remember his last name was SzczebrzeszyƄski? Will you remember how you spell it? Hell, if on top of all this the place of your birth is Ido, Japan then you are totally fucked.

Now you are forced to make up answers - ones that you won’t remember 3 years from now when you need to recover your password making them absolutely useless. This minimum length limit is silly, because these hints are not really designed to be secure. Anyone can find out the name of my first pet, or the birthplace of my mother. It’s really not a secret, and it can easily come up in a casual conversation. The whole point of them is to provide another layer of protection for your account so that the attacker has to have both the secret answer, and access to the email account you used to open the service. Brute forcing the secret answer should not be a concern, because they’d be incredibly vulnerable to dictionary attacks anyway.

So why won’t you let us to use answers that are as short, or as long as we like or stop using them altogether. Otherwise it is just counter productive as people won’t be able to remember what they typed in to pad their answers to meet your arbitrary minimum length limit.