I got tagged by Kenny Kerr on Jan 3rd and by Kate Gregory on Jan 7th. I had to do some Googling to figure out what tagging is all about. Some people don’t seem to like this whole tagging concept as they feel it resembles chain mail. So if any of you are in that category, please accept my advanced humble apologies.
I have met both my taggers – Kenny and I had lunch in Toronto several months ago; and I kinda met Kate at an East-Toronto UG session. Kate didn’t see me (I was part of the audience in a dark room), but I did technically see her – couldn’t say hello to her as she left before the talk was over.
Here’s the mandatory list of 5 things about me that I’d talk about if Oprah Winfrey featured me in her show.
- When I was in high school I badly wanted to become a Sports Writer, specifically a Cricket Writer. I even joined an English Literature course and attended that for a week before I changed my mind (with some strong persuasion from my parents) and joined a computer engineering course (though I had already been playing around with computers for the previous 6 years at that time).
- I hate shaving – and try and avoid it as far as I can. In my opinion, it’s the most repugnant aspect about being an adult male. And I’ve managed to hurt myself pretty much every single time I’ve shaved.
- Being Indian, a lot of people assume I am a vegetarian. I am not. I eat meat and love sea food. Lobster and steak (beef) are among my favorite food items.
- My second name (Sivakumar) is not really my family name. It’s my dad’s first name. It’s a Kerala (my state in India) custom where the son and daughter get their father’s first name as surname. My dad’s surname is his dad’s first name. Following along, when I have my child (in future), he or she will have Nishant as his or her surname. Though, I am wondering if I should break that first-name-as-surname rule.
- I don’t really speak or understand Hindi. Most people assume that being Indian, I’d be fluent in Hindi. I am not, and my native tongue is Malayalam (it’s a palindrome by the way). I watch Hindi movies rarely and that too, only when there are English sub-titles.
I am supposed to tag five others, but I’ll break that rule and tag just one person – my good friend and fellow blogger James Johnson (popularly known as Mister .NET in tech blogging circles). Interestingly, today’s his birthday – so happy birthday Jambo.
When you run an executable from the command line or from a script, the current directory will be the directory from which the executable or script is invoked. This behavior is consistent in both the old command prompt as well as in PowerShell. There is an exception though when you invoke a script, as I found out when I attempted to run a script that opened a text file (to make some changes). I used
Push-Location to change to a specific directory, and then invoked the script. The script used a path relative to this directory I had changed to, to open the file. I was surprised to find that it kept failing. That’s when I realized that for the script the current directory would be what’s set in the environment. The right way to do this is to properly set the current directory to what you want it to be. In my case, since I was invoking the script from a specific folder, I just added this line to the script. That fixed the problem.
[Environment]::CurrentDirectory = (Get-Location).Path
At work, I wrote a PowerShell script to automate our build process. I had to use the Visual SourceSafe command line tool to check out the files, make changes, and check them back in. The SS tool expected the
ssdir environment variable to be set properly. I had just begun using PowerShell and I made the foolish mistake of assuming that the
Set-Variable command could set environment variables. It took me a few minutes to realize this folly😳
For other PowerShell newbies, the following snippet should make things clear :-
Set-Variable ssdir \\somemachine\vss
((Get-Variable ssdir).Value -eq $env:ssdir)
The output of line 3 will be
I was reading Raymond Chen’s blog earlier today when I came across an entry where he talks about the ASCII character 7 which emits a beep on the command prompt. That brought back memories of one of the first programs I ever wrote on a computer. It was 1989 and some of us from Class 7 were enjoying one of our first visits to the school’s computer lab which proudly housed two 8088 machines with 640 KB RAM. Our seniors were using the lab at that time, and we were given a minute to just tap around on the keyboard. GWBASIC was running on the machine in front of me and I typed in the following program, and then ran it.
10 PRINT "Lalu" + CHR$(3) + "Athira"
20 GOTO 10
Lalu was my classmate and Athira was supposedly his girl friend, though in all probability she may just have been an unfortunate girl who happened to live in his neighborhood. We were a bunch of 11 and 12 year olds in a Jesuit catholic all-boys school, and the whole idea of having a girlfriend was the most revolting and embarrassing thing you could be accused of. Imagine poor Lalu’s plight when he looked at the monitor (one of those old phosphor green ones) and saw the following text scrolling infinitely on screen.
To say that he was horrified would be an understatement. He was mad with rage, and his face turned red. What made the situation even more pitiable from his perspective was that all his attempts to try and halt the program failed – it was the first time he was in front of a computer and he simply had no clue on how to break an executing Basic program. The rest of us were sporting sadistic grins on our faces and I was proudly standing there basking in glory. I had planned this during the early half of the day and after a perfect execution of my sinister plan, what could I do but revel in my moment of splendor. Of course, within a minute, one of our seniors came in and kicked us all out of the lab. Poor Lalu had to live with this incident for quite a long time, and the rest of us never wasted a single opportunity we got to remind him of this.
What amazed me earlier today was that this incident was completely out of my mind for years, and then all of a sudden it all came back. I even remembered the girl’s name (Athira) which was quite astonishing. It was almost as if one of my brain’s storage areas woke up from years of dormancy on seeing Raymond’s blog entry. I wonder if Lalu ever got anything going with Athira, or if she even existed. 11 year old boys can sometimes have a very wild imagination.