Not about everything

November 25, 2009

Why would a compiler not allow comparing different datatypes?

Filed under: programming,world wide web — takaita @ 19:02
Tags: ,

While writing some code in ASP.Net, I got a run time error where two variables of unequal type were compared.

If varA = varB Then
    ' somecode
End If

By accident varA was a String and varB a Number. One would say, that those variables are unequal and life goes on. But no. The program refused to run. Alarm, Error, Wrong, Impossible.

I am totally puzzled. There is only one reason why this could be: a String and a Number (it was a Long, but that’s too much detail maybe), can not be equal, so comparing them is useless. But then again, comparing Strings of unequal length is fine, even though they can not be equal either, or Strings which start with a different letter.

The point of my code is to evaluate if two things are equal or not. I want an answer. So seriously, my question to all programming gurus around the internet, explain why a language can not answer a simple question, but wants to tell me – as the programmer – that I should not ask.


November 17, 2009

A butterfly photo which makes people angry

Filed under: nature,nature photography,photography — takaita @ 08:00

One day I was out in nature and saw a butterfly. Nothing special, just a Red Admiral (Vanessa atalanta), a species which even I have photographed many times. But I could not resist taking some photos of this one. At first nothing special.

IMG_0207 IMG_0227

But then I decided to get creative. There is not much to be creative about when photographing a butterfly. I don’t know. I set the camera on manual focus and just tried some things. I sort of liked one of these photos, desaturated it a bit and uploaded it to a upload-your-photos-and-comment-on-other-photos site. That was last June. Nothing special happened then. One person said he liked it, another wondered why the focus was so weird. As I am not very active commenting photos of others, I don’t get many comments in return. That is only fair.

And then some months later the photo gets some more comments (wel actually only 2). That is as such a bit remarkable, because comments are usually written on recently uploaded photos. The interesting thing about these comments is that it seems as if the commenter has been made angry by this photo. One commenter suggested that I made this photo without looking through the lens, that I was trying to annoy people with uploading that photo. Another suggested that I should have thrown the photo away, as anyone would have done. Both could have easily ignored the photo (which is what people usually do when they don’t like it).

What is it that makes people angry about a photo of a butterfly?

Blog at