Friday, December 11, 2009

New laptop screens have lower resolutions

Anyone bought a new laptop recently? Anyone?

My four year old laptop is a 1GB, 2.0 GHz pentium. It has a 15" screen, with a maximum resolution of 1440 x 1024. It works beautifully, but after 4 years of manhandling, it has started to show its age. So began the search for a new laptop.

Technology for laptop screens has changed over the years, but I always expected it to get better and cheaper. Surprisingly, it hasn't. All the major laptop companies (Dell, Lenovo, HP) only have widescreen laptops now. They are advertised as 'HD' screens, and the advertised resolution is 720p and 1080p rather than the usual. The worst part is, a 15.6" 720p laptop screen has a maximum screen resolution of 1336 x 768, a lot worse than my 4 year old laptop!

Since I use my laptop for surfing the web and coding, a widescreen is useless to me. My wife and I hardly watch movies on the laptop, so what do we do with the right 25% the screen, which remains barren all the time?

Curious as to why laptop companies would simply stop caring about how people use their laptop, I searched the web for answers. Seems like now the screens come directly from TV manufacturers, who use the same technology to cut laptop screens that they use for your HD TV. This technology seems to be a lot cheaper than that used for the old screens, but it offers such a low resolution that I wonder if we are back in the 90's?

Wednesday, December 9, 2009

.reg file created by regasm cannot be ported between 32-bit and 64-bit!

When you create a .reg file using regasm

While working on the WS-Security project, I found out this really weird behavior. I was building my .NET dll on Win XP 64-bit, IIS6, VS2005 machine. But the .NET dll itself was compiled in 32-bit. I used Regasm to create a .reg file, which I then double-clicked to add registry entries.

But it wouldn't work! For some reason the registry entries could not be found! This worked fine on a 32-bit Win XP system. At last, I found out the reason: http://support.microsoft.com/kb/896459

The solution: Don't create a .reg file. Just use regasm .dll. Creating a .reg file for a 32-bit program doesn't add it correctly to a 64-bit system.

Monday, August 10, 2009

Flex Builder 3 leaking memory?

I have been noticing how flex builder 3 keeps on eating memory the longer you keep it open. It starts with around 120 megs of RAM, normal when comparing it with eclipse or visual studio. But the amount of memory keeps on increasing the more you use it. In one day of moderate usage it went to over 677 megs of RAM. Thats a little too much.

Monday, June 22, 2009

Implementing WS-Security in SOAP, for a C++ Dll called by IIS

I know the title is a mouthful, but the task was as complicated. My task was to do SOAP calls using WS-Security. For those who do not know, this means encrypting the SOAP request with the X.509 certificate. It was quite a task, and I'm sad that C++ failed me in this.

I have tried using C/C++ for implementing WS-Security, and failed. The only useful library in C++ is Gsoap, which works well for SOAP without WS-Security. It has a WS-Security plugin, which I tried using. But it was very difficult to use, there were build problems (I was working in VS2005, on Windows XP) and warnings that I had to get rid off, no good examples, support or forums (since hardly anyone was implementing WS-Security), and no transperency on how openssl was reading the certificates, etc.

The other way was using the deprecated MS SOAP Toolkit, but it is never a good idea to use deprecated tools for new technologies.

At last I tried to implement it using C#. To interface with C++, I could have created a Dll and called it as a COM object in c++, or just implemented a web service. I eventually got both done, but the decision was taken to implement the COM dll.

Implementing in C# wasn't without its own share of configuration problems:
  • The Dll has to be installed in the Global Assembly Cache (GAC) using gacutil.exe. The Dll also has to be registered using regasm.exe.
  • You need to install the X509 certificate. Otherwise you will get a ‘Class not registered’, even though the Dll has been registered and is in the GAC.
  • Since this is a Dll run by IIS, no configuration file like app.config or web.config can be read by it. This is because IIS will not know where to find the file, or might not have permissions to the directory. The configuration needs to be hard coded.
  • IIS needs to read your whole X509 certificate. Without that, IIS can only read the public key, and you will get the message “Object contains only the public half of a key pair. A private key must also be provided.” You need to set the user permissions on the private key by running WseCertificate3.exe. Run WseCertificate3.exe, open the certificate and give permission to the IIS process owner, usually the machine.
  • The C# compiler (csc.exe) needs access to the C:\Windows\temp directory.
  • Do you have custom headers? In that case hard code the configuration files app.config, web.config, etc into your code. In case the configuration is meant to add headers to your web references, make sure to edit the Reference.cs files created by web references to add this information.
Hope this helps those who are going down this path.....

Monday, June 15, 2009

Keeping your concentation during phone meetings

I bet everyone has a hard time concentrating during phone meetings, especially when there are multiple people on. People are hard to hear and understand, side conversations spring up every now and then, people assume a lot of things, etc. But they are so useful, allowing me to talk to my team out in California, or letting me work from home.

So after searching for a list on the net for Do's and Don'ts while participating in phone meetings, I decided to compile my own.

List of Do's and Don'ts while participating in phone meetings:

Do's
1) Take notes in Notepad, prepare your own minutes.
2) Mute yourself when not talking, in case of meetings with more than 4 people.
3) Drink Coffee, Coke or Water to keep yourself alert.
4) Share your desktop using Meeting place, Communicator, Webex, etc.
5) Elaborate, elucidate, explain, and most of all speak clearly!

Don'ts
1) Multitask. So that I don't get distracted by incoming email or work, I tend to pace in my cubicle. It also gives you time to stretch your legs.
2) Have more than 2 people together in one room on meetings with more than 4 people.

I'll be adding more tips soon, you people are also welcome to give some in the comments section.

Introduction

So here I am creating a blog. I guess my wife has to do something with it. Not that she prodded me to do it, but since she is such an avid blogger I decided to give it a try.

I'm a software engineer, based in Boston. Earlier I was in Gigablast, which is a search engine. About a year ago I moved on to Intuit QuickBase.

I am starting this blog so that I can pen down my thoughts on technology, and also share my experiences on cutting edge technologies that I work on. My posts are generally going to be rants and raves about my experience with coding and how I deal with people. I hope this blog helps me and my blog readers to be better software engineers!