 Friday, July 30, 2004
[Hindi]
Aaj mein upar, Aasmaan neeche
Aaj mein aage, zamaana hai peeche ..
Tell me Oh khuda, ab mein kya karoo
Chalu seedhe ki ulti chaloo …
Well, before I let out the big news, here’s your chance. Any guesses? </chuckle>
 Sunday, July 25, 2004
Late, late yestreen I saw the new Moon,
With the old Moon in her arms;
And I fear, I fear, my Master dear!
We shall have a deadly storm.
(Ballad of Sir Patrick Spence)
I work out of the 10th floor, the view from my window is splendid. All I need to do is turn around and look out of the window, the glass-panes open into this picturesque view encompassing ulsoor lake, the sky above it and the trees around. I will miss the view; wherever I go.
The past few weeks have been crazy, with disparate advice spurting in from relatives, friends and colleagues about what I should be doing in life for a better future. I was thinking if I had no cares and responsibilities [na, I don’t have too many of them. Fortunately] and if safety was not a concern, what I would do and how different would it be from what I am doing now.
Well, I am in for some changes in life. To start off with I will have to be more diurnal ;) and less nocturnal in my habits. The bigger changes are something I look forward to.
It’s a little more than half of the year, life has been following this topsy turvy curve. The highs have been higher than ever and the lows, err lower than ever. And, the inkling that this year will decide a lot about the coming years, persists.
 Friday, July 16, 2004
SQL forms a good candidate for a cmdlet provider in Monad/MSH. Using something like this you will be able to browse through the database, DB tables, SPs etc as though it were a filesystem. I was thinking ways of writing a C# app to do the work, especially about connecting to SQL and getting all information besides Databases. Before I could make up my mind, I found an option to expose the SQL server group as an AD object in the AD.
The registry and AD cmdlet providers also come with MSH. Now since the AD provider exposes the AD as a browsable system, you should be able to browse through the SQL server on the msh commandline! Is it really as simple as that or am I missing something here. Unfortunately I don’t have the resources to test this out now.
We’ll find out soon J
 Tuesday, July 13, 2004
"In the path of your happiness shall you find the learning for which you have chosen this lifetime." - Richard Bach
 Monday, July 05, 2004
I have been using dasblog for a few months now. While I have fixed some of the minor issues, there are some issues that are pending.
One of the major issues with dasblog is the time settings. Besides the time [of posting a blog/comment] not being displayed correctly, there is yet another issue. We cannot make a blog post post-midnight for a couple of hours. After Pandu and Rosh had some bad experiences with this in the past, we three deliberately avoid making posts between 12.00 – 5.00 am in the nights.
A big thing missing in dasblog is an archive view, there is no real way of viewing your past blog entries based on some archive view. I saw somebody’s implementation of archive view in dasblog, not exactly what I would have liked to have but atleast there is an archive. I should check that out. Anybody else has an archive implementation for dasblog?
Some of the other minor issues:
- No delete comment feature
- Post a comment and you are brought to the main page [I have fixed this]
- No obfuscation of your own email-id [I have fixed this. You can now add the text you wish to replace @ and . with in the e-id in the config file. Neat?]
- Time display error
- Sometimes, when you edit an old entry, it makes a new entry. I am not able to re-produce this though. Happens once in a while.
- Delete category
- Rename category
This blog entry doesn’t talk about the good things in dasblog [Yeah, you could read it as whatever is not listed here works good in dasblog ;)]
 Tuesday, June 29, 2004
Ankit Fadia
Recently, Ankit Fadia came to Oxford bookstore at Leela Palace, Bangalore to inaugurate their book exhibition and to give a general awareness talk on internet security. I was quite excited about seeing the young champ.
The audience were largely press people with about 3-5 non-press folk; guess this was a publicity funda for Oxford more than anything else. Ankit Fadia started his talk with
“How many of you use messengers like yahoo and msn”
“Don’t use it, its not safe”
“How many of you use search engines like yahoo and google?
“Don’t use it, its not safe”
etc etc
“and finally how many of you use the internet?”
“Don’t use it, its not safe”
He went on to say that since that is not practical, it is better to be safe by thinking like a criminal and taking precautions. He gave an example of this lady in Bombay who had a cable internet connection and a web cam and was a chat freak. A guy from Russia who was chatting with her apparently managed to install a Trojan and switch on her webcam. She had no clue about any of this and life went on. She went for a job interview 3 months later and the guy said he was too happy to offer her the job and that he saw her everyday at the porn site. And then she went totally paranoid and is probably not using the internet today. Sounded too contrived to me. Sum total of the talk was that use a proxy server to connect to the internet else you are in soup.
Well, wasn’t exactly very enlightening. Had a QA session towards the end when some of the press guys asked a lot of questions. One of the questions was “Is Linux more secure than windows” to which Ankit Fadia answered yes. I was quite curious to hear the reasons. “Since Unix is open source, its more secure. Since it is open source and there are tens of thousands of people working on it, when a bug is found anybody can take it and fix it. Whereas windows will have only about say 1000 people team, so finding and fixing bugs will take time….” [!!???!!!]
I didn’t find him technically accurate and after all the media hype this talk was probably a small let down. Then again, for what he is doing at his age he must be quite smart. I wouldn’t have been able to do that when I was 19. And he is at Stanford, obviously the guy is smart. The media is probably a little misleading, can’t really blame the young man.
Martin Fowler
I had read some papers and methodologies by Martin Fowler and appreciate the agile methodology a lot especially since I have seen and been a part of the conventional methodology. So I had all the reason to be excited to meet Mr. Fowler. This time excitement was coupled with nervousness, coz he was going to be listening to me do a session at the Bangalore .NET User group meeting.
After my talk I had a small conversation with Martin Fowler and others. Was surprised to see how approachable he was and how easily the discussions stemmed and ideas were exchanged. He liked monad, monad is quite agile anyways ;)
God
No, I haven’t met God but I think he knows of my existence J
- get-command
The idea of being able to see all the commands supported by a shell is pretty cool. Has this been there in the past? I doubt. This command outputs not only the standard commands that come with msh but also the cmdlets that have been added by the user.
- get-help
get-help followed by a command name gives a detailed help for that command. Try (get-help get-command).synopsis, the get-command here could be any other command. Cool?
- get-member
Any command gives its output as an object in msh. This object could offer a set of methods and properties. Get-member uses reflection and lets you see these members. For eg: get-command | get-member -methods lists the methods available for the command object
- Programmability on the commandline – write functions, use foreach, if-else etc.
- out-*
Killer feature. Try get-process | tail | out-excel. Now try get-process | sort id | tail | out-chart processname, id. You are gonna love what you see J. For other output options, type get-command out-*
- –Whatif
What if you had a series of commands, pipes and weren’t 100% sure if it did what you thought it did. What if you spend 2 min thinking if you should press the carriage enter key or not. You use exactly this feature => the –whatif feature provided by msh. You type in the command and append it with a –whatif. Now the output you see is the output that the command if executed would have given. This is a way to let you know the output of a command without it really executing. Should reduce the average tension in an admins life ;) stop-process 12,4 -whatif
- errorpolicy –confirm
This option gives you an option Yes to all, No to all, yes, no and suspend. Suspend is new. Suspend launches a new shell, lets you explore and find out about the problem, exit and come back to the same option. The idea is that you are probably now surer of which option to choose.
- The idea of having cmdlet providers. [Yeah you can traverse the registry as though it were a filesystem. You can write your own providers!!]
- where/where-object/reduce-expression
lets you specify a condition, filter. For example.
i. gps | where “processname -like n*”
ii. $ps get-process
foreach ( $p in ps | where { $_.handlecount -ge 500 } | sort handlecount) { $p.processname,$p.id }
That was a listing of some of the commands that are aha!!
 Monday, June 28, 2004
I have been wondering about the cmdlet lifecycle.
How do you add a new cmdlet?
How are the cmdlets loaded by MSH?
You use registercommand.exe <Path/dllname> and the new dll is registered. Now what happens when msh is started again? Does it load all the dlls in memory? Or does it load it when a cmdlet in the dll is explicitly invoked? Loading all cmdlet dlls in memory seems like too much memory consumption and overhead. The converse argument could be that practically the number of cmdlets wouldn’t be a very huge number; so doing this at start would give a performance hit.
Then again, when do we design stuff for pracrtical cases alone, we usually think of the worst cases!
Well, so how do you really find out how MSH is handling commandlet life cycle? There is no cordbg for .Net 2.0 yet and no CLR profilers in the picture.
There still is filemon.exe. Thanks to filemon.exe, these are my observations.
- All the cmdlet dlls are not loaded at msh start up.
- get-command doesn’t use reflection on all dlls’ to get all cmdlet names.
- Typing a specific cmdlet name loads the corresponding dll, processes and closes it
These observations lead to the following conclusions:
- At start-up, msh does not load all the cmdlets in memory
- On typing get-command, it does a look-up [may be something like a file lookup], finds all the cmdlet name entries and outputs them
- On typing a specific cmdlet at the msh prompt, the corresponding dll is loaded by msh, the processing done, results obtained and dll unloaded [I think]
- Due to caching, all cmdlets take time during their first invocation and are faster thereafter.
How is a cmdlet executed?
First the corresponding dll is found and loaded. Then the cmdlet class is instantiated.
StartProcessing() if overrid is executed. If there are any input parameters, then they are filled with the values by msh and passed to ProcessRecord() if one exists. If pipelined input is enabled then the input parameter is filled with the current pipeline object and ProcessRecord() is exceuted for each of the input records. [So, this kind of looping is not the cmdlet’s responsibility, msh handles it and pumps in the value each time into the input parameter variable]. Finally if EndProcessing() is overrid, then it is executed. The object is then disposed off. Msh handles the output display/formatting/piping/redirection.
DISCLAIMER: These are my views only. This is not documented stuff, so I am just taking a guess as to how things may be working under the cover. I could be wrong!
© Copyright 2008 Pooja Malpani
Theme design by Bryan Bell
newtelligence dasBlog 1.9.6264.0  | Page rendered at Monday, October 13, 2008 6:23:19 PM (US Eastern Standard Time, UTC-05:00)
Pick a theme:
|
On this page....
| | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| 27 | 28 | 29 | 30 | 1 | 2 | 3 | | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | 11 | 12 | 13 | 14 | 15 | 16 | 17 | | 18 | 19 | 20 | 21 | 22 | 23 | 24 | | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
Search
Navigation
Categories
Blogroll
Sign In
|