-
Nothing to redeem here
I got this weird email just a few hours ago:
Message sent via contact form by: kimberly capps
URL:how do i get the redemption button for my email?
I was confused about this "redemption button", so I asked this Kimberly:
Hi Kimberly,
I'm not sure what you're referring to. Could you explain a little more on
what you're looking for?Regards,
Chu YeowAnd so she replied:
what we are trying to find is the redemption button for our email so we can retrieve our free plane tickets!
I think I just got my first email prank. Either that or something has gone awry with search engine results. This weblog didn't turn up on Google for "redemption plane tickets" though.
Anyway, now is as good a time as ever to point out that the "redemption" in "redemption in a blog" is actually my online pseudonym/nickname/handle. I thought it would be a nice play of words. This is not a redemption counter. There are no free gifts.
-
Pretty in pink, and yellow and green
Perhaps you'd have noticed the new colors and a slightly changed layout.

Is pink too effeminate? Think the color palette is garishly eye-blinding? Do your eyes bleed from the white background?
-
VB.NET boolean operators and short-circuit evaluation
... short-circuit evaluation is how the logical human brain works when confronted with chained boolean conditionals in real lifeHaving to pick up VB.NET for a Human Computer Interaction course this semester, I've been spending some time getting acquainted with the language through a couple of books. Every now and then I get somewhat bemused by how "different" VB syntax is - not that it's a bad thing, pray. Syntax, as almost everyone agrees, is secondary to semantics.
Anyway, here's a particularly bemusing bit of trivia you can use to taunt/jibe/provoke your VB.NET/VB programmer friends.
Did you know that VB.NET's default boolean operators And and Or do not take advantage of short-circuit evaluation? Take for example this snippet of conditional code below:
Dim x as Integer 1
If (x < 5) Or (x > 10) ThenNow, you'd expect your run-of-the-mill compiler/interpreter to optimize by short-circuiting the 2nd boolean expression, since the 1st expression is already true (and so whether the 2nd boolean expression is true or false doesn't really matter). For some reason, probably one steeped in history, VB.NET, or rather the JIT compiler, doesn't short-circuit. It happily goes ahead and evaluates the 2nd boolean expression.
This is logically ludicrous - short-circuit evaluation is how the logical human brain works when confronted with chained boolean conditionals in real life. If the university says I can only get a First Class Honours degree if my CAP is greater than 4.5 AND get a minimum of A- for my thesis, I won't really fret about not getting an A- for my thesis (and subsequently missing out on a yummy First Class Honours) when my CAP can never hit 4.5.
Now to be fair, there is an alternative OrElse operator which does perform short-circuit evaluation. It is not fair though to expect such an unorthodox operator to be something your common on-the-street (read: non-VB) programmer will expect to exist (unless he reads a VB.NET book and bothers to flip to the introductory chapters).
Come to think of it, it could be an intended design issue. Evaluating the 2nd boolean expression could be always warranted when it produces a side effect. That must be the reason why Microsoft introduced the OrElse and AndAlso operators and leaving the standard And and Or operators as non-short-circuiting to prevent confusing converting VB programmers.
So this then is actually an issue with VB. Hence, we can conclude that they deserve to be taunted/jibed/provoked. Spare the VB.NET programmers. For now.
-
Teach yourself Java in 21 days?
Teach Yourself Programming in Ten Years is more realistic. That just about sums up why I was never bought by the enticing promises of "Teach Yourself X in Y days" and "Learn X in Y hours" books.
-
Photoshop magic
Check out the 1st post in this discussion forum thread. It's in Chinese but the pictures speak for themselves. 20 hours was how long it took, but check out the hair on the girl and the fur on the dog. Unbelievable.
subscribe via RSS