My Blog has a new address http://guneetsahai.com. Basically the website previously also existed but I have revamped the same over wordpress which is now also hosting my blog.
I will not be posting any new posts here. I hope to see you at http://guneetsahai.com
Tuesday, August 18, 2009
I have a new address
Wednesday, June 10, 2009
Running Microsoft windows on Ubuntu
Recently I shifted my machine OS from Microsoft Windows XP to Ubuntu 9.0.4 (codename jaunty). This post talks about the overall experience of working on ubuntu & using VirtualBox to simulte windows on it. Read on.....
I have been primarily been using Microsoft Windows for most part of my career and am therefore quite at ease with applications on it. However switching to ubuntu was pretty smooth. The installation was pretty quick & did not ask too many questions. Pre-installed Open Office could open all MS office documents (even those of office 2007), acrobat reader got working within no time. This along with mozilla firefox (which I was anyway using on windows) & thunderbird got me up and running without too much of an effort.
One important difference that stood out with Windows was the way installations were done. Ubuntu comes along with a software called "Synaptic Package Manager" that can fetch and install various softwares that you would need. Before installing something, you should check if it can be found in the repositories used by Synaptic. If yes you can be assured that the installation would be pretty smooth. Having a common repository (or a number of them) where you can get all the software that you would need is something definitely different.
I was pretty happy & content with my new ubuntu system before I got a visio document that I was to read. I couldn't find any way to open the document in ubuntu. However I figured a way to boot windws from ubuntu. There are a couple of virtualization softwares out there that allow you to do this; However I settled with Virtual Box from Sun which allowed me to add a virtual windows machine. Setup of the same was really easy and could happen through Ubuntu's Synaptic Manager (again with no questions asked). Once installed it allowed me to create a virtual machine (It required an installation CD with a valid license). Once the virtual machine was ready I could install other windows applications on it and use them. I could share documents between the root and the VM pretty easily, if required I could switch completely to the VM making it look as if I was on Windows.
Pretty Neat stuff from open-source folks !!!!!!!
How has your experience been with Ubuntu? Any interesting tip or problem that you may want to share?
Wednesday, May 20, 2009
Hello World (again)
Its been more than 9 months since I last wrote on my blog (Time really flies doesn't it?). In this post, I reflect back on what kept me busy during this period.
Sometime in May Last year I along with a friend started www.chahiye.info (see my earlier post here). Running a company certainly drains out a lot of energy from its founders, leaving absolutely no time for anything (writing blogs included). Another side-effect (of running a co) is that it leaves your bank accounts with lots of empty space. This obviously makes the whole process more painful and interesting at the same time. If time permits I hope to write another post about the experience & some gyan :-) sometime soon. It might make an interesting read.
Anyway a few weeks ago; with our bank accounts exhausted, we figured that it is critical to generate some cash to sustain ourselves & keep the company going. The only way I could help in that was to re-start my freelancing work (I had actively stopped working on projects a couple of months ago - wanted to devote all my time at chahiye). I was fortunate enough to get work real quickly. I am currently spending half of my day consulting on an interesting project & might just take up another one in PHP (I'm new to PHP and therefore looking forward to it). Resuming tech work again exposed me to interesting observations, which I plan to share with all here. Stay Tuned .....
Its good to be back !!!!!!
Saturday, August 9, 2008
request.getSession (false) always returning a session
Recently I found that request.getSession (false) was *always* returning a session instance even when it is not created earlier by my application. After spending 2-3 hours on it, I figured out the cause. Read on .......
I am working on adding a rather unique jobs functionality for chahiye.info which required an authentication mechanism. For this purpose, I wanted to add a check at various pages to ensure that if a session did not exist a request to these pages would be re-directed to loign page. This was done using the following code
HttpSession session = request.getSession (false);
if (session == null)
{
// forward request to login page
// return;
}
However to my surprise this api was always giving me a session instance even when I had not explicitly created one (after the login request). I searched my entire code base & confirmed that I was not creating a session anywhere. Looked up the JavaDoc for this method in class javax.servlet.HttpServletRequest, which clearly stated that if the supplied boolean is false and if the request has no valid HttpSession, this method would return null.
After spending some more time, I realized the problem. Basically if the application is using a JSP, the container (in my case Tomcat 5.5) by default ends up creating a session. In my case, the user's landing page itself was a JSP as a result the session gets created at that time itself. To avoid this, simply add the following directive at your JSP, which tells the JSP compiler not to use session variable in the compiled class.
< % @page session="false" % >Note - You will have to get rid of extra spaces between "<", "%" & "@" symbols.
Have you also had a similar situation and figured out another cause for this? If yes, please share your experience here.
Monday, August 4, 2008
IIS Does not start - Skype may be the culprit
I come from Java world but was recently trying my hand at IIS. I wanted to learn how easy or difficult is to deploy a simple website on it. During the process faced a problem and figured out the cause, which I think is worth sharing. Read on .......
I was basically following an online tutorial here. Unfortunately after installing IIS on my win xp pro box, I could not confirm that it was running - When I pointed my web browser to http://localhost the default page did not show up. As a matter of fact nothing happened. I did not get any error message, just a simple white screen - I tried with Firefox (my default browser) as well as IE 7.After reading some more, I found out about the IIS Management Console. Through it, I could see that the "Default Website" on my IIS installation wasn't started and any attempt to start it would result in "Unexpected Error" window as shown on the right. I had no clue what was going wrong. Tried re-installing IIS but didn't help.
Next while going through the properties of "Default Website" I realized that it works on port 80. Tried to change it (I thought that maybe the firewall might be causing some havoc) to 8080 and VOILA it worked. Only if the error message could be more meaningful it would have saved me a an hour or two.
Next I Tried disabling Firewall but it didn't help. Executed the following command on command prompt to find that some process was indeed listening on port 80.
d:\>netstat -a | find "LISTENING"
TCP nucleo-01:ftp nucleo-01:0 LISTENING
TCP nucleo-01:smtp nucleo-01:0 LISTENING
TCP nucleo-01:http nucleo-01:0 LISTENING
TCP nucleo-01:epmap nucleo-01:0 LISTENING
TCP nucleo-01:https nucleo-01:0 LISTENING
TCP nucleo-01:microsoft-ds nucleo-01:0 LISTENING
TCP nucleo-01:1025 nucleo-01:0 LISTENING
TCP nucleo-01:35048 nucleo-01:0 LISTENING
TCP nucleo-01:1026 nucleo-01:0 LISTENING
TCP nucleo-01:netbios-ssn nucleo-01:0 LISTENING
Had a look at my processes but didn't see any apparent process (Apache or something like that) so decided to kill processes one by one. My first shot was at Outlook (didn't help), next came various IMs - That one helped. I was able to start IIS after killing Skype, Yahoo & GTalk on its regular port 80.I later managed to zero in on skype and found that it was indeed running on port 80. On checking up its configuration (Tools -> Options -> Advanced -> Connection) found an option to stop using port 80 & 443. Restarting skype after disabling the use of standard http & https ports solved my problem.
I'm still new to MS world & in the process of learning so wonder if there is something else missing/incorrect on/with my machine configuration. Why wouldn't a simple error (like port busy or something) be shown otherwise?
Have you faced this problem too and have something to share, please let me know.
Monday, July 28, 2008
Converted into three column layout
Today I spent time to convert my blog from the default 2 column to 3 column layout. I wanted to do that because the side-bar (on the right) was getting too cluttered with information.
First 10 minutes on google lead me to this link here, which provided simple instructions to modify the default blogger template to do what I wanted. Since I had earlier modified the template (to fit the top-navigation-bar) the instructions did not apply as it is, but the explanation provided was useful and I managed to complete this in 15 minutes. Thanks Mr Hans.
About My Blog
It feels odd to do this after 40 posts, but I guess I have been missing this post since a long time; so here it comes - what is my blog all about.
I'm basically a software developer @ heart, so essentially this blog will revolve around developing and using software. Being a freelancer & an entrepreneur I do get myself involved with various events & forums that are related to technology or entrepreneurship. I occasionally write about these events. I also sometime write about my thoughts; on anything and everything related to work. Lastly I occasionally write about startups (mostly around Delhi region) that I come across and are doing interesting work.
As also predicted in my introductory post here (more than a year ago), the frequency of my posts is not all that good. In this last 13 odd months, I have written 40 posts i.e. ~ 3 posts a month on an average. However since most of my posts are going to be about software they would be relevant for quite some time.
If you have gone through some of my writings and like what you saw, feel free to subscribe this feed over Email or RSS using the ways provided below.
Subscribe to my blog by pointing your favourite Feed reader (Outlook 2007, IE7, google, yahoo etc) here.
ORSubscribe to my blog over email
