So... after I installed ubuntu, I had only two issues - I did not like anti-aliasing, and it was not rendering text properly for hindi website.
Basically, I was kind of pissed, but it was okay, because I was still able to do many more things compared to what I was able to do in Windows. I finally fixed Hindi rendering issue by installing complex language support and tweaked anti-aliasing settings, inside font dialogue.
Btw - Bit stream fonts are better rendered compared to default sans font and if you change anti-aliasing settings (goto fonts -> details) then you get better results compared to earlier results. Now things are much better.
So one more thing ubuntu should do is to ask - do you have LCD/TFT/CRT monitor and should adjust anti-aliasing by default.
more comfortable reading...
Monday, April 30, 2007
Friday, April 27, 2007
Finally ubuntu
1 year back, I moved to FreeBSD. I was not that hardcore programmer/user as I should be. People may argue that FreeBSD is really cool (as I said in that post) and sometimes it was really really cool. But on the other hand most of the time I had to run programs in Linux Compatibility mode, which was okay! but soon I started hitting road where, I had steep learning curve.
Which kind of forced me to get down to one thing.. think! I did not want to go vista way, I wanted windows only for prorgamming C# or Microsoft specific stuff and nothing more than that. We were already doing lots of stuff on platform independent languages, eg - ruby and java.
So basically, either I can use power of *nix without ease or get into useless world of Windows (which still earns me money). I got some what in between with ubuntu.
here are few things which worked out of box. I have dell d620
Till now I am pretty happy with what I have! what all I can think of, I have it enabled.. the only thing - which I am not very sad about is - that my Hindi Font rendering does not work. So I can not read http://bbc.co.uk/hindi website properly! and I miss Dainik Jagran a lot.
Kudos to Ubuntu! Just bit more eyecandy! I do not know what I am missing, but it needs to beautiful also, although this is the most amazing experience of Linux! it just works out of box!
Which kind of forced me to get down to one thing.. think! I did not want to go vista way, I wanted windows only for prorgamming C# or Microsoft specific stuff and nothing more than that. We were already doing lots of stuff on platform independent languages, eg - ruby and java.
So basically, either I can use power of *nix without ease or get into useless world of Windows (which still earns me money). I got some what in between with ubuntu.
here are few things which worked out of box. I have dell d620
- detected everything on my laptop
- I copied my notes directory to Linux and ran "wine notes.exe" I got one glitch that it could not find the e:\ directory, I mappy notes directory to e:\ using winecfg
- I connected to my VPN using vpnc instead of Cisco Secure VPN client, some how I could not get feisty fawn and Cisco Secure VPN client live together.
- Wireless worked out of the box
- It detects and mounts my USB drive automatically.
- VirtualBox does virtualization for me.
Till now I am pretty happy with what I have! what all I can think of, I have it enabled.. the only thing - which I am not very sad about is - that my Hindi Font rendering does not work. So I can not read http://bbc.co.uk/hindi website properly! and I miss Dainik Jagran a lot.
Kudos to Ubuntu! Just bit more eyecandy! I do not know what I am missing, but it needs to beautiful also, although this is the most amazing experience of Linux! it just works out of box!
Tuesday, February 13, 2007
JNDI and Active Directory
So, I wrote Active Directory Self Servicing application for my company. My good collegue (Barrow) always insisted that I should write in Java using jLDAP, but I always thought that its good to have MS Technology to access Microsoft Active Directory.
Things went perfectly fine and I enjoyed writing application in ASP.NET 2.0 with C#. But my good collegue still did not want to use it, just because we have to manage one app in .NET and rest all apps in Java. He insisted on porting this App to Java.
I tried to use Novell jLDAP, but that did not work at all for functions like reset password for user and getting multivalue attributes. I might be wrong, but at least I did not find any examples for that.
So finally we came across forums as http://forums.java.sun.com and started looking at JNDI examples. I have completed the rewrite of the app. (It was not port). But I faced lots of issues to write things in plain JSP compared to plain ASP. I must accept that Microsoft Visual Studio.NET + ASP.NET 2.0 is kind of much more advanced compared to plain JSP. But when I look at JSP, and I started wondering that Sun wrote this technology at least 6 years ago and MS is still catching up on that.
Finally today, I have two versions on Same app on is on C# and another is on Java. A good satisfying experience.
Thank you Barrow!
Things went perfectly fine and I enjoyed writing application in ASP.NET 2.0 with C#. But my good collegue still did not want to use it, just because we have to manage one app in .NET and rest all apps in Java. He insisted on porting this App to Java.
I tried to use Novell jLDAP, but that did not work at all for functions like reset password for user and getting multivalue attributes. I might be wrong, but at least I did not find any examples for that.
So finally we came across forums as http://forums.java.sun.com and started looking at JNDI examples. I have completed the rewrite of the app. (It was not port). But I faced lots of issues to write things in plain JSP compared to plain ASP. I must accept that Microsoft Visual Studio.NET + ASP.NET 2.0 is kind of much more advanced compared to plain JSP. But when I look at JSP, and I started wondering that Sun wrote this technology at least 6 years ago and MS is still catching up on that.
Finally today, I have two versions on Same app on is on C# and another is on Java. A good satisfying experience.
Thank you Barrow!
Monday, February 12, 2007
chickens!
If I look back 20 years in my life, I have 5 people.. who some how some day stopped talking to me and never revealed the cause. So what did I do? I talked to few people who were our common friend and tried to figure out what happened actually? But that all went in to vein and It was much of waste of effort. But today.. I am angry with these idiots.. because if they would have told me why they are not talking to me then I would have been very happy and would have stopped thinking about them.
Lets step back.... so while cooking food (I had daal, roti and mango pickle), this combination some how reminded of my best childhood friend - Vivek Dwivedi, Vivek and I use to be together almost 75% of day time. From 1st Standard to 9th Standard, suddenly one day, he stopped talking.. and then he did not talk to me for next 5 years. (that was too much for friendship to go away, it bothered me a lot of those 5 years) I kept continuing going to his place and he will not talk. It was awkward that his parents would call me and I would go there but this guy would not talk to me. Last year I went to my hometown for 2 days, and I was walking with my nephews (Amey and Himanshu) and suddenly I see Vivek walking towards me on Road. I saw him, he waived hand, I was so pissed.. and then he came talked to me. I asked him.. so tell me why are you not talking to me since last 18 years! and he did not have answer. And I told him - that if you can not tell me then please do not bother me after 18 years and I just left him there.
Second person was my collegue at work - We were friends, use to do so many things together - and our company let him go... and he stopped talking to me. I never got to know why did he do that. Some how after thinking about Vivek - I am bit relieved about him too.
Third person - She was very good friend of mine, 12 years ago I met her in Allahabad, we were very good friends. And one day - she calls and tells me that she won't talk to me, and I asked her why, she gave me most confusing answer - ask yourself. If I knew that why she won't talk to me why would I ask her? Then she never talked to me again - But yesterday I got a mail from her after 10 years. And I asked same question, and she said that its too late for the answer. She told me that she will tell me some day, when she will feel okay. (she is still counted as half chicken)
Fourth and Fifth - These are my good friends, I know them since long, they knew me through some friends even before they met me. These two have the similar characteristics, they arey trying to ignore.. which is OKAY! but I would love to hear from them why would they ignore me.
So.. why did I think about it today? Because its stupid chicago weather and I can not go out! and Literally I do not have any work. But anyway.
I think that people think differently, some people are not open and I have strange experiences that people talk some thing bad about some one, and those two are really good friends, I have one of my collegue, who I think was one of the reasons for something bad for other collegue, but it seemed that they both were good friends.
I keep thinking about myself, I have huge feeling that people get irritated with me and they do not tell me! But I really do not know how to deal with this... may be the best idea is to leave everyone on their own and go on your own!
Most probably, I am chicken too because I have not revealed some names, I think I will do that soon.. but at least I am not chicken to tell some one that I do not want to talk to you because of these reasons.
Lets step back.... so while cooking food (I had daal, roti and mango pickle), this combination some how reminded of my best childhood friend - Vivek Dwivedi, Vivek and I use to be together almost 75% of day time. From 1st Standard to 9th Standard, suddenly one day, he stopped talking.. and then he did not talk to me for next 5 years. (that was too much for friendship to go away, it bothered me a lot of those 5 years) I kept continuing going to his place and he will not talk. It was awkward that his parents would call me and I would go there but this guy would not talk to me. Last year I went to my hometown for 2 days, and I was walking with my nephews (Amey and Himanshu) and suddenly I see Vivek walking towards me on Road. I saw him, he waived hand, I was so pissed.. and then he came talked to me. I asked him.. so tell me why are you not talking to me since last 18 years! and he did not have answer. And I told him - that if you can not tell me then please do not bother me after 18 years and I just left him there.
Second person was my collegue at work - We were friends, use to do so many things together - and our company let him go... and he stopped talking to me. I never got to know why did he do that. Some how after thinking about Vivek - I am bit relieved about him too.
Third person - She was very good friend of mine, 12 years ago I met her in Allahabad, we were very good friends. And one day - she calls and tells me that she won't talk to me, and I asked her why, she gave me most confusing answer - ask yourself. If I knew that why she won't talk to me why would I ask her? Then she never talked to me again - But yesterday I got a mail from her after 10 years. And I asked same question, and she said that its too late for the answer. She told me that she will tell me some day, when she will feel okay. (she is still counted as half chicken)
Fourth and Fifth - These are my good friends, I know them since long, they knew me through some friends even before they met me. These two have the similar characteristics, they arey trying to ignore.. which is OKAY! but I would love to hear from them why would they ignore me.
So.. why did I think about it today? Because its stupid chicago weather and I can not go out! and Literally I do not have any work. But anyway.
I think that people think differently, some people are not open and I have strange experiences that people talk some thing bad about some one, and those two are really good friends, I have one of my collegue, who I think was one of the reasons for something bad for other collegue, but it seemed that they both were good friends.
I keep thinking about myself, I have huge feeling that people get irritated with me and they do not tell me! But I really do not know how to deal with this... may be the best idea is to leave everyone on their own and go on your own!
Most probably, I am chicken too because I have not revealed some names, I think I will do that soon.. but at least I am not chicken to tell some one that I do not want to talk to you because of these reasons.
Friday, June 02, 2006
Fixing stuff
How much difficult it is to fix some stuff in life? can you not undo some mistakes. I have come across one of these incidents recently and realized that people can not fix certain things without hurting any one's ego/respect or feelings.
So, I realized that if I made some one do something for my sake, it will certainly won't look good. But if some one is really realizing that mistake has happened then the best way is to understand the mistake. And keep it to yourself. At least its good that some one at least realized the mistake.
But on the other hand - keeping that to your self does not fix the problem. You yourself understand that its okay to leave the matter as it is. But the way it looks to other you have not done anything about fixing the stuff. So they expect you to fix the stuff and actually its impossible for you to go and talk to everyone on this matter and let them understand that it was mistake and this is why it happened (give each one of them individual explaination!)
So explaining that to everyone is not again a solution.. So what I am wondering is - what is the real solution for this? .... thinking...
So, I realized that if I made some one do something for my sake, it will certainly won't look good. But if some one is really realizing that mistake has happened then the best way is to understand the mistake. And keep it to yourself. At least its good that some one at least realized the mistake.
But on the other hand - keeping that to your self does not fix the problem. You yourself understand that its okay to leave the matter as it is. But the way it looks to other you have not done anything about fixing the stuff. So they expect you to fix the stuff and actually its impossible for you to go and talk to everyone on this matter and let them understand that it was mistake and this is why it happened (give each one of them individual explaination!)
So explaining that to everyone is not again a solution.. So what I am wondering is - what is the real solution for this? .... thinking...
Wednesday, February 15, 2006
Webspher Saga
So recently(ummm been two months now), I have been asked to install/configure websphere application server on one of server over here in Bangalore.
Our app is kind of complex, because it talks to many other applications using JMS and dumps data on queues! Rest of it is pretty straight forward.
But - here is what happened
Here is what we did - we searched google, it helped alot, but crux of the whole issue is that you can not even think that there can be duplicate class error because of a bug in Websphere - and on top of that, you have to give permissions for queue manager even if you have security turned off.
Basically - we had to patch websphere + java again and again to resolve these issues.
I am frustated!
Our app is kind of complex, because it talks to many other applications using JMS and dumps data on queues! Rest of it is pretty straight forward.
But - here is what happened
- We got Java VM hanging with thread core dump
- We got duplicate class error when there was duplicate class
- We could talk to MQSeries
- We got database problems
Here is what we did - we searched google, it helped alot, but crux of the whole issue is that you can not even think that there can be duplicate class error because of a bug in Websphere - and on top of that, you have to give permissions for queue manager even if you have security turned off.
Basically - we had to patch websphere + java again and again to resolve these issues.
I am frustated!
Tuesday, February 07, 2006
Load - in Linux / Unix
Yesterday I was working on one server. Server was very very slow, and when I looked at Top command I got load average of 0.0, 0.15, 0.27 which was not what I expected. Generally load average should be higher than this. But curiously I looked at man page of Top. But somehow "man page of top" did not give me proper answer to this Load Average number. Surprizingly uptime and w commands also give you same kind of output. So what are these load average numbers? And how kernel or any command computes these number?
I started searching about it and finally came across this article
Which clearly says something like this :
Those three little numbers tucked away innocently in certain UNIX commands are not so trivial after all. The first point is that load in this context refers to run-queue length (i.e., the sum of the number of processes waiting in the run-queue plus the number currently executing). Therefore, the number is absolute (not relative) and thus it can be unbounded; unlike utilization (AKA ``load'' in queueing theory parlence). Moreover, they have to be calculated in the kernel and therefore they must be calculated efficiently. Hence, the use of fixed-point arithmetic and that gives rise to those very strange looking constants in the kernel code.
I started searching about it and finally came across this article
Which clearly says something like this :
Those three little numbers tucked away innocently in certain UNIX commands are not so trivial after all. The first point is that load in this context refers to run-queue length (i.e., the sum of the number of processes waiting in the run-queue plus the number currently executing). Therefore, the number is absolute (not relative) and thus it can be unbounded; unlike utilization (AKA ``load'' in queueing theory parlence). Moreover, they have to be calculated in the kernel and therefore they must be calculated efficiently. Hence, the use of fixed-point arithmetic and that gives rise to those very strange looking constants in the kernel code.
Tuesday, January 10, 2006
Keep Making Notes
So whats the best way to keep making notes? There is no way you can stick yellow sticky in your brain.
There are few! keep creating files in your home/notes directory and keep putting notes over there or "INSTALL a WIKI in your comp" this is really cool.
So what I did was to install a MediaWiki with LightWeight Tuned Mysql Server on my machine. And now I keep everything in that wiki. Media wiki is good because i can write stupid text with wiki markup and it gives me the properly formatted text.
Its indexed, nice and good!
So now on, I will keep everything I want to make a quick note of in wiki.
its good and usable
-ajey
There are few! keep creating files in your home/notes directory and keep putting notes over there or "INSTALL a WIKI in your comp" this is really cool.
So what I did was to install a MediaWiki with LightWeight Tuned Mysql Server on my machine. And now I keep everything in that wiki. Media wiki is good because i can write stupid text with wiki markup and it gives me the properly formatted text.
Its indexed, nice and good!
So now on, I will keep everything I want to make a quick note of in wiki.
its good and usable
-ajey
Monday, January 09, 2006
FreeBSD is really cool
When I talk about Linux - its just three flavours - Gentoo, Redhat (RHEL or Fedora) or Debian. And sometime I think about Ubuntu too. But there is jungle out there. Linux is really something to play around and work on - day in and day out. And there is no dispute about nice things in Linux.
But as I said there is jungle out there - and I like something in this distro and do not like something in that distro. More over - I was getting really really confused and irritated with the kind of foot print (3 disks, 2 gb or some other crap) these distros comes with. Some of them favour sendmail, some of them favour postfix. Some one will tell you how cool it is to work with Gnome and there is something called KDE too.
More over - for each of the linux flavours, these guys have done something crappy, about changing the file location, even renaming the files and what not.
So I thought - why don't I write my specifications, talk to ten people and see what I want? So I talked to few of my friends, and put my requirements. I got few suggestions, Here is what I feel is the best
And thats the exact reason I chose FreeBSD, Now I would like to tell you why do I like in this OS?
/usr/ports rocks, any things you want just locate the port and start using it. Or just do pkg_add !
That was praise! this is not the only unique feature I liked about FreeBSD. but there is tons of information available, in user readable form! So after must hesitation, I booted my system with FreeBSD, the install is simple but too confusing (as it appears first time) but later on if you read things twice, you are all set to go.
So, after setting it up there are only few things which I faced!
I wanted eclipse (ide), firefox with anti aliasing and eye-candy wm.
For eclipse - I had to download JDKs from Sun's site and put that in /usr/ports/distfiles and everything was cool.
Then for FireFox - to get anti aliasing work you need to do something like this
Thats all! and you have firefox running with AntiAliasing
Next task was to run Notes 6.5 in FreeBSD with Wine Ver 0.9.5 (In Linux you can use Cross Over Office) but things were too simple over here - I toook 30 minutes to figure out things but rest is as easy as I can be...
Once I got my apps running under WM, the time was to choose eye-candy - for my desktop, and the winner is ENLIGHTENMENT DR17 - you can build it in /usr/ports/x11-wm/enlightenment-devel port.
I compiled and installed enlightenment with Gulivert's Milky theme.
Now the only problem I had was, everything was looking cool, except eclipse and gaim. Both were GTK+ apps and i knew that there has to be some way to apply themes to them outside gnome. Because I was not running gnome and was trying to get same look and feel across apps in enlightenment.
So I used gtk-theme-switch http://freshmeat.net/projects/gtkthemeswitch to do required task. And now everything looks nice.
Now I have my FreeBSD desktop with option to remove and add program with pkg_add/pkg_delete or make install/make deinstall. And i do not have to bother about how to compile and clean this whole mess, instead of getting into Linux and trying to figure out dependencies and many more hell!
And as far as comfort is concerned. Really! Enlightenment is nice WM, and takes less memory than GNOME or KDE.
last thing - I use QEMU instead of VMWare to get my Virtual Machines working.
thanks OpenSource!
But as I said there is jungle out there - and I like something in this distro and do not like something in that distro. More over - I was getting really really confused and irritated with the kind of foot print (3 disks, 2 gb or some other crap) these distros comes with. Some of them favour sendmail, some of them favour postfix. Some one will tell you how cool it is to work with Gnome and there is something called KDE too.
More over - for each of the linux flavours, these guys have done something crappy, about changing the file location, even renaming the files and what not.
So I thought - why don't I write my specifications, talk to ten people and see what I want? So I talked to few of my friends, and put my requirements. I got few suggestions, Here is what I feel is the best
- Corporate Internal Firewall + Router -> Fedora Core + Iptables + ip2
- Corporate External Fireall + Router -> OpenBSD + PF
- Corporate External VPN, Site to Site -> OpenBSD + PF + ISAKMPD
- Network Monitoring Tools -> Any Linux + MRTG + nMap
- IDS - NetBSD(because it can run on very old hardware too) + Snort
- Personal Computing Novice user -> Ubuntu + KDE or Gnome
- Personal Computer more fun -> FreeBSD
And thats the exact reason I chose FreeBSD, Now I would like to tell you why do I like in this OS?
- Simple package add and delete
- Simple ports system
- Well structured layout
- Well documented apps and functions
- Ease of use!
/usr/ports rocks, any things you want just locate the port and start using it. Or just do pkg_add !
That was praise! this is not the only unique feature I liked about FreeBSD. but there is tons of information available, in user readable form! So after must hesitation, I booted my system with FreeBSD, the install is simple but too confusing (as it appears first time) but later on if you read things twice, you are all set to go.
So, after setting it up there are only few things which I faced!
I wanted eclipse (ide), firefox with anti aliasing and eye-candy wm.
For eclipse - I had to download JDKs from Sun's site and put that in /usr/ports/distfiles and everything was cool.
Then for FireFox - to get anti aliasing work you need to do something like this
- update to gtk+ 2.0 or just rung update gnome.sh and it will update all apps
- type about:config in firefox
- filter on font keyword
- then enable antialiasing, choose Bitstream Vera font instead of helvetica and times new roman. Choose Bitstream Vera Mono instead of Courier
- And use libfreetype.so.9 version instead of 6
Thats all! and you have firefox running with AntiAliasing
Next task was to run Notes 6.5 in FreeBSD with Wine Ver 0.9.5 (In Linux you can use Cross Over Office) but things were too simple over here - I toook 30 minutes to figure out things but rest is as easy as I can be...
- compile wine "cd /usr/ports/emulators/wine" and then "make install clean"
- start wine without any parameters, it will do lots of things and will end up showing usage information
- copy installed notes (you can not install notes in wine) dir and put it inside ~/.wine/drive_c/program files or where ever
- copy MFC42ENU.DLL mfc42.dll msvcrt.dll netapi.dll
mfc40.dll mfc42u.dll msvcrt20.dll netapi32.dll
mfc40u.dll msvcp60.dll msvcrt40.dll usp10.dll from windows\system32 to ~/.wine/drive_c/windows/system - start "winecfg"
- Choose OS Version - Windows XP
- goto over rides and over ride all the above dlls and change the order to
- type wine "c:\Program Files\Notes\nlnotes.exe" and your program starts if not then goto .wine/drive_c/program files/notes and then type "wine nlnotes.exe" and it should just work without any problems! it worked for me :-)
Once I got my apps running under WM, the time was to choose eye-candy - for my desktop, and the winner is ENLIGHTENMENT DR17 - you can build it in /usr/ports/x11-wm/enlightenment-devel port.
I compiled and installed enlightenment with Gulivert's Milky theme.
Now the only problem I had was, everything was looking cool, except eclipse and gaim. Both were GTK+ apps and i knew that there has to be some way to apply themes to them outside gnome. Because I was not running gnome and was trying to get same look and feel across apps in enlightenment.
So I used gtk-theme-switch http://freshmeat.net/projects/gtkthemeswitch to do required task. And now everything looks nice.
Now I have my FreeBSD desktop with option to remove and add program with pkg_add/pkg_delete or make install/make deinstall. And i do not have to bother about how to compile and clean this whole mess, instead of getting into Linux and trying to figure out dependencies and many more hell!
And as far as comfort is concerned. Really! Enlightenment is nice WM, and takes less memory than GNOME or KDE.
last thing - I use QEMU instead of VMWare to get my Virtual Machines working.
thanks OpenSource!
Tuesday, December 13, 2005
Active Directory Web Interface for Administration
I have been administering active directory since last 4 years. The most frustating thing I found was to administer it remotely - the only was to remote desktop to one of the domain controllers and do my task.
Later on I realized that Active Directory Administration GUI provided by Microsoft was just enough to get my task done. But this GUI was not smart enough to provide me instant feedback on whats happening in my domain. Such as - last logon time for each user, active computers, groups with member summary and many more things. So I realized that it was not enough for me to do normal administration task. And more over I wanted to do it using Web Browser - so it does not matter whether I am using Linux or Windows, I just pop-up browser and do everything required to do administration.
Microsoft included System.DirectoryServices package which can talk to AD and give us more information. I started writing a small application which can give me visual feedback on domain users.

So, I came up with above screenshots, and there were many more things possible with these APIs, but there were half-cooked api. So I had to figure out how do I things.
Now, I have active directory web interface, which allows me to do Administration using web browser. I have following features in this interface
AdWebMin 0.1 is released!
Later on I realized that Active Directory Administration GUI provided by Microsoft was just enough to get my task done. But this GUI was not smart enough to provide me instant feedback on whats happening in my domain. Such as - last logon time for each user, active computers, groups with member summary and many more things. So I realized that it was not enough for me to do normal administration task. And more over I wanted to do it using Web Browser - so it does not matter whether I am using Linux or Windows, I just pop-up browser and do everything required to do administration.
Microsoft included System.DirectoryServices package which can talk to AD and give us more information. I started writing a small application which can give me visual feedback on domain users.

So, I came up with above screenshots, and there were many more things possible with these APIs, but there were half-cooked api. So I had to figure out how do I things.
Now, I have active directory web interface, which allows me to do Administration using web browser. I have following features in this interface
- Create New Users
- Create Groups
- Edit user group membership
- Edit user properties
- Edit group members
- Display user status
- Display group summary
- Display computer summary
AdWebMin 0.1 is released!
Monday, December 12, 2005
Monday, December 05, 2005
Microsoft's Half Cooked APIs
So when you publish APIs, what should you usually do? Say -
public string IWillReturnCaps(string anycase)
{
}
This is kind of self explanatory, and it tells me that If you give string in any case it will return Capital Letter String.
Microsoft has done a great job on publishing APIs on ActiveDirectory, called System.DirectoryService. These APIs look great on Surface! the time you dive in, you are almost dead, because when you prepared for diving in. You thought its 10 Ft Deep Water. But as soon as you get into water, you hit the face with rock solid surface and there is nothing to penetrate further. Some of the APIs are like this :
public willreturnobject IWillDoSomething(object givemesomething, object somethingmore, object andsoemthingmore)
{
}
This is called half cooked apis, you have the API, you need to figure it out what its going to do! The more concrete example can be - if you ask for properties - then documentation says, returns strings or values of properties? How many properties? Where are the properties, go figure out! Or do a enum or properties collection, use ADSI. Agreed! but why are properties not listed there. More over - if you are trying to do something, then you need to have basic concepts clear, should be able to write code in C++ or Visual Basic. There are not many examples which provide you with C# Code samples.
IRONY is that you are trying to do something with .NET but you need to use ActiveDS and COM Interop. Any way! if you go in that way - long time back you could not write a plugin for Visual Studio .NET in .NET Itself. If your plugin involves little bit of of GUI, you must use ActiveX.
If you are trying to do something with System.DirectoryServices then go here.
Btw- I am trying to write a Active Directory Web Administration Interface in ASP.NET - which will be available here soon.
public string IWillReturnCaps(string anycase)
{
}
This is kind of self explanatory, and it tells me that If you give string in any case it will return Capital Letter String.
Microsoft has done a great job on publishing APIs on ActiveDirectory, called System.DirectoryService. These APIs look great on Surface! the time you dive in, you are almost dead, because when you prepared for diving in. You thought its 10 Ft Deep Water. But as soon as you get into water, you hit the face with rock solid surface and there is nothing to penetrate further. Some of the APIs are like this :
public willreturnobject IWillDoSomething(object givemesomething, object somethingmore, object andsoemthingmore)
{
}
This is called half cooked apis, you have the API, you need to figure it out what its going to do! The more concrete example can be - if you ask for properties - then documentation says, returns strings or values of properties? How many properties? Where are the properties, go figure out! Or do a enum or properties collection, use ADSI. Agreed! but why are properties not listed there. More over - if you are trying to do something, then you need to have basic concepts clear, should be able to write code in C++ or Visual Basic. There are not many examples which provide you with C# Code samples.
IRONY is that you are trying to do something with .NET but you need to use ActiveDS and COM Interop. Any way! if you go in that way - long time back you could not write a plugin for Visual Studio .NET in .NET Itself. If your plugin involves little bit of of GUI, you must use ActiveX.
If you are trying to do something with System.DirectoryServices then go here.
Btw- I am trying to write a Active Directory Web Administration Interface in ASP.NET - which will be available here soon.
Long time no see! Politics...
Internal Politics exists in every company, people are in rat race and thats something not gonna change. I wonder how many people actually read AND implement "rich dad poor dad". My point is that people give lots of gyan about professional ethics and team building. But sometimes all around I see that people are just there to pull strings or climb on other's shoulder to get something done.
I see no solution to it, other than get out of this RAT Race. I can see two of my friends are trying to do it and some how I feel that they are successful, namely Rajesh and Ravi. But I seriously see a problem over here - they have done it afterwards once they have been through it and it took them a lot of time to achieve this. Instead of getting out of this RAT Race! why can't we just fix it?
I see no solution to it, other than get out of this RAT Race. I can see two of my friends are trying to do it and some how I feel that they are successful, namely Rajesh and Ravi. But I seriously see a problem over here - they have done it afterwards once they have been through it and it took them a lot of time to achieve this. Instead of getting out of this RAT Race! why can't we just fix it?
Thursday, September 15, 2005
Secure Wireless Access
Today was a good day, I have been trying to find out a special way to make my wireless secure! I could not find a nice and better solution in last 8 weeks, which can tell me that its not broken yet - of course there is nothing which is secure in this internet world; having said that - my solution sounds pretty secure! because I have found that lots of person (including nice companies in many countries use these techniques)
First - a Linux based solution - of course :-) - Ingredients as follows
This solution creates wireless network as different LAN and which has access to either your LAN or Internet using this Linux box which we are going to setup. Let call internal network 192.168.91.X (wireless) and external network 172.16.X.X (LAN/Internet). And this box has has 192.168.91.254(eth0) as internal network address and 172.16.1.1(eth1) as external network address
And if everything goes smooth, you are done, what you have to do is to hook up on wireless visit some site, it will redirect to NoCat authentication page, once authentication is done, it will update IPTables to give your machine access and you are done...
The other solution is RADIUS Server - get windows 2003 and configure it as radius server. Create a SSL Certificate, distribute it using group policy and allow user dialin access in their account management page and point your access point to use this windows 2003 server as radius server. And you get the access! the only problem with this is that you can not get Linux client hooked on it.
First - a Linux based solution - of course :-) - Ingredients as follows
- Linux Kernel 2.4 or greater
- Iptables - you do not have to know about IPTables
- NoCat - nocat.net
- DHCPD - plain vanilla dhcpd from distribution
- Apache HTTPD 2.0
- bind - optional
- Wireless AccessPoint
This solution creates wireless network as different LAN and which has access to either your LAN or Internet using this Linux box which we are going to setup. Let call internal network 192.168.91.X (wireless) and external network 172.16.X.X (LAN/Internet). And this box has has 192.168.91.254(eth0) as internal network address and 172.16.1.1(eth1) as external network address
- Setup DHCP - Plain vanilla default dhcpd.conf has range of 192.168.91.1 to 192.168.91.251
- Setup bind - if you do not want to use name server - then you can provide your network's name server as main name server in dhcpd.conf
- Setup HTTPD - and make it listen only on 172.16.1.1 - setup ssl on httpd
- NoCat has two part AuthServ and Gateway - when you download nocat it comes with one tar, which will have both the things. by default nocat gets installed at /usr/local/nocat - but we are going to install AuthServ and Gateway on same machine - we will install authserv in /usr/local/nocat/authserver and gateway at /usr/local/nocat/gateway . you need to change makefile and change the directory in makefile and then execute either authserv and gateway targets respectively
- You need to change configuration of AuthServ and Gateway and make appropriate changes, these files are well commented.
- Now choose the authentication method, I choose samba and pointed it to my windows domain.
And if everything goes smooth, you are done, what you have to do is to hook up on wireless visit some site, it will redirect to NoCat authentication page, once authentication is done, it will update IPTables to give your machine access and you are done...
The other solution is RADIUS Server - get windows 2003 and configure it as radius server. Create a SSL Certificate, distribute it using group policy and allow user dialin access in their account management page and point your access point to use this windows 2003 server as radius server. And you get the access! the only problem with this is that you can not get Linux client hooked on it.
Tuesday, August 23, 2005
World is what you see around!
So, another funny story - Uncle Sam's Country - we all know all about Uncle Sam, but the problem is Uncle Sam thinks that the world is Uncle Sam and that means Uncle Sam knows about the world and anything which is not into Uncle Sam's world is not get involved in Documentories like "World's Most Beautiful Models" or "Worlds worst earthquakes" - keeping this thought aside that earth quakes are always worst - if happens on earth it shakes building and if inside the sea then we have to face 60 Feet High water wall on our sea shores. Any way! leave that thing - lets talk about "world is what you see around!"
So, last night I was watching some serial, one was on Channel 4 and another was on 5 - "world's most beautiful models" included Iman, Veruschitka, Cyndi Crawford and many more - but one thing was common, either they were settled in Uncle Sam's country or Born in Uncle Sam's country. So I think we should stop conducting Miss World and Miss Universe competetions and pick from World's Most beautiful models! and only magazine they know about is "Vogue"
any way! next was - EarthQuake, I think all earthquake - which can be called UncleQuake, occur only at San Franscisco, once in Florida and sometime Australlia" what about Japan? no if they do not count 7 on rictor scale or may be victor scale, they do not count? chuck india! we lost 20,000 men in last earthquake! but 798 is a huge number of casulalities! sometimes - I feel that discovery channel, only understands what Nasa Does! may be I am jealous, but sometime I feel very very surprized when one person asked me "do you really have Tar roads all around India?" I answered saying except few villages, then the person asked but I heard that India is 90% made of villages! thats the fact I love.
I have more to say about what happened on Talkers Corner in Hyde park last sunday = 20th August 2005, but that might appear in next post as I am still waiting for those crazy pictures from Rohan.
So, last night I was watching some serial, one was on Channel 4 and another was on 5 - "world's most beautiful models" included Iman, Veruschitka, Cyndi Crawford and many more - but one thing was common, either they were settled in Uncle Sam's country or Born in Uncle Sam's country. So I think we should stop conducting Miss World and Miss Universe competetions and pick from World's Most beautiful models! and only magazine they know about is "Vogue"
any way! next was - EarthQuake, I think all earthquake - which can be called UncleQuake, occur only at San Franscisco, once in Florida and sometime Australlia" what about Japan? no if they do not count 7 on rictor scale or may be victor scale, they do not count? chuck india! we lost 20,000 men in last earthquake! but 798 is a huge number of casulalities! sometimes - I feel that discovery channel, only understands what Nasa Does! may be I am jealous, but sometime I feel very very surprized when one person asked me "do you really have Tar roads all around India?" I answered saying except few villages, then the person asked but I heard that India is 90% made of villages! thats the fact I love.
I have more to say about what happened on Talkers Corner in Hyde park last sunday = 20th August 2005, but that might appear in next post as I am still waiting for those crazy pictures from Rohan.
Thursday, August 18, 2005
Who writes code?
At the heart of every development department of a IT enabled company, there lives an architect and/or a tech lead! The story is interesting, its about struggle to write code or struggle to write good code.
Many of the tech leads in some moron companies think that since they have crossed the "experience age" they should not be writing any more code but they should be dictating how to write code and integrate, some of them are good - because they keep themself informed. AS long as you do this you are fine, but suddenly - you keep architecting stuff - making diagrams and flow charts and then one fine day, when you are completely obsolete - forgot most of the language stuff and even forgot that languages and SDKs have improved, and you miss sometimes that a feature. And when you argue about it - and since he is tech lead and does not understand that developers are more close to language/sdks/libraries than he is actually then he should not make a decision that we should be using PERL instead of Java because perl has better regular expression capabilities! and at the end you end up with a code which calls perl modules to just do string manipulation! what a architecture!
Many of the tech leads in some moron companies think that since they have crossed the "experience age" they should not be writing any more code but they should be dictating how to write code and integrate, some of them are good - because they keep themself informed. AS long as you do this you are fine, but suddenly - you keep architecting stuff - making diagrams and flow charts and then one fine day, when you are completely obsolete - forgot most of the language stuff and even forgot that languages and SDKs have improved, and you miss sometimes that a feature. And when you argue about it - and since he is tech lead and does not understand that developers are more close to language/sdks/libraries than he is actually then he should not make a decision that we should be using PERL instead of Java because perl has better regular expression capabilities! and at the end you end up with a code which calls perl modules to just do string manipulation! what a architecture!
Friday, August 12, 2005
Creating a Simple Router and Firewall
Problem Statement :
I have two gateways doing exactly the same thing - any one of them can be termed as default gateway, But now you want to split the traffic and do many more smarter things on the traffic! you want to control exactly what kind of traffic goes through which Gateway?
Solution:
Install Linux! I do not have special atttraction towards Linux, but Linux networking tool excel in many areas and much better than what plain vanilla windows installation give you. So thats why linux. Actually - I can assign hosts in dhcp for static routes, implement rip or igrp in my firewalls - but all that costs alot of stupid network traffic. Does not make sense to me. You are welcome to accept this solution - or - you can put your comments right here and I will get enlightened with your smart solution. Any way, lets continue with our problem.
so what I did, I put another Linux Box, which decides where to send packet, logs the packet, creates the graph of which protocol being used most, how much vpn traffic, how much non - vpn traffic and its all fast, because my firewall runs on PII cpu and My Linux box runs on PIII with minimal services. And gives me alot of flexibilities.
how to do this?
I have two gateways doing exactly the same thing - any one of them can be termed as default gateway, But now you want to split the traffic and do many more smarter things on the traffic! you want to control exactly what kind of traffic goes through which Gateway?
Solution:

Install Linux! I do not have special atttraction towards Linux, but Linux networking tool excel in many areas and much better than what plain vanilla windows installation give you. So thats why linux. Actually - I can assign hosts in dhcp for static routes, implement rip or igrp in my firewalls - but all that costs alot of stupid network traffic. Does not make sense to me. You are welcome to accept this solution - or - you can put your comments right here and I will get enlightened with your smart solution. Any way, lets continue with our problem.
so what I did, I put another Linux Box, which decides where to send packet, logs the packet, creates the graph of which protocol being used most, how much vpn traffic, how much non - vpn traffic and its all fast, because my firewall runs on PII cpu and My Linux box runs on PIII with minimal services. And gives me alot of flexibilities.
how to do this?
- install 2 network interface cards
- learn how to use "ip" command
- add rules and tables on ip command
- tell ip command to send which traffic where based on packet source, packet destination and user id
- and even you can control that which mac address can get how much bandwidth(i have not done yet, but you should go and read LARTC - Linux Advanced Routing and Traffic Control)
- install transparent proxy
- install iptraf + rrd tool
Thursday, August 11, 2005
don't know
Don't know! oh my god, you do not know this? or he does not know even this? -- guess from where it is coming from. Most of the system administrator expect you to know everything on this world what they know - or Most of the consultant (being a consultant, I have learned not to say this) but IF in this world - some one is hiring you to do something - that means, one they do not have expertise to do that or they have some expertise but they are not able to do something to get it working; second - the most important thing - thats why you have the job. If some one will know how to fix network adaptor, apply permissions and play with IPTables on Linux, then why would they hire a Linux Administrator? OR everyone in this world will know LISP, how to create spreadsheets (useful ones) in Excel or Windows/Firewall Adminstration?
Dude, get a life, if some one is asking something to you, instead of expressing your "oh my god, you even do not know this" expression or discussing with collegues "dude, do you know that client dude does not know this thing" expressiong, you better help him/her out, and help him out the way he/she can understand it and better not ask you again. But if you like rubbing the coal on the wall, again and again! then please please go ahead and just do it on your own.
But humiliating something, or showing that you know the stuff and they do not? or keep pointing out mistakes and discussing lack of knowledge of someone, is specially not good.
Just think, how you do not know! instead of straightening your neck with what you know! because there is always a chance that some one might just tell you - "don't know"
One of my friend and myself discussed this yesterday while taking a walk! and I think its good they do not know because thats why I have the job! else I would have not had the job....
Dude, get a life, if some one is asking something to you, instead of expressing your "oh my god, you even do not know this" expression or discussing with collegues "dude, do you know that client dude does not know this thing" expressiong, you better help him/her out, and help him out the way he/she can understand it and better not ask you again. But if you like rubbing the coal on the wall, again and again! then please please go ahead and just do it on your own.
But humiliating something, or showing that you know the stuff and they do not? or keep pointing out mistakes and discussing lack of knowledge of someone, is specially not good.
Just think, how you do not know! instead of straightening your neck with what you know! because there is always a chance that some one might just tell you - "don't know"
One of my friend and myself discussed this yesterday while taking a walk! and I think its good they do not know because thats why I have the job! else I would have not had the job....
Wednesday, August 10, 2005
Innnocent Ignorance - Overconfidence
I wonder - How many times a person can do mistakes? I mean how many times? There are few things in life, which never change?
So when some one does something - which is not quite right but on the same point of time he did not know that there is something which he should not be doing - so we call that mistake - but thats innocent ignorance which can be ignored by us assuming that it was seriously innocent ignorance.
But - what's up with some dudes who got overconfidence in everything they do, which is completely not at all acceptable - I know many of this kind of dudes.
He will keep doing stuff - which is not good - and its not right to do something like that, if you are handling production servers - client deployment and real live environment - you do not want to be ashamed or you do not want to do somethings on ad-hoc basis; I mean, if you are trying to fix something - say for instance your antivirus, is not working, then it does not make sense to downlaod a virus and let antivirus catch it. If anti-virus catches that virus that means thats working? is that the right solution? may be I will call it overconfidence that dude got ego that he can actually clean the virus manually and has ability to edit executables in hex-editors and remove the virus code out of them.
But - if some one really does not know that there is something called firewall and while troubleshootinng the networking issues, he some how disables it on his pc then its okay - but if a network administrator opens a HOLE in firewall just to test whether he can reach out or not - then its stupid.
and most of these dudes handle some sensitive systems at companies, client sites and public domain. Which scares me! and I know from my experience - everytime they lack professionally. and they do not realize that it might cost them sometime in the bigger loss.
Professionally and Personally - I do not like these kinds of errors - My only question is - Why they can't think ahead or Consult with collegues? is that ego or innocent ignorance or overconfidence? anything - but if its the first and last one! then that should be punished or not?
frustated me!
So when some one does something - which is not quite right but on the same point of time he did not know that there is something which he should not be doing - so we call that mistake - but thats innocent ignorance which can be ignored by us assuming that it was seriously innocent ignorance.
But - what's up with some dudes who got overconfidence in everything they do, which is completely not at all acceptable - I know many of this kind of dudes.
He will keep doing stuff - which is not good - and its not right to do something like that, if you are handling production servers - client deployment and real live environment - you do not want to be ashamed or you do not want to do somethings on ad-hoc basis; I mean, if you are trying to fix something - say for instance your antivirus, is not working, then it does not make sense to downlaod a virus and let antivirus catch it. If anti-virus catches that virus that means thats working? is that the right solution? may be I will call it overconfidence that dude got ego that he can actually clean the virus manually and has ability to edit executables in hex-editors and remove the virus code out of them.
But - if some one really does not know that there is something called firewall and while troubleshootinng the networking issues, he some how disables it on his pc then its okay - but if a network administrator opens a HOLE in firewall just to test whether he can reach out or not - then its stupid.
and most of these dudes handle some sensitive systems at companies, client sites and public domain. Which scares me! and I know from my experience - everytime they lack professionally. and they do not realize that it might cost them sometime in the bigger loss.
Professionally and Personally - I do not like these kinds of errors - My only question is - Why they can't think ahead or Consult with collegues? is that ego or innocent ignorance or overconfidence? anything - but if its the first and last one! then that should be punished or not?
frustated me!
Subscribe to:
Posts (Atom)