Home Blog

Browsing from office via home network

Posted in networking on August 6th, 2008 by codemechanic / No Comments »

Introduction
Many of us would like to do free spirit internet browsing while at office and working hard :-). However not all offices will allow you to do unrestricted internet traveling. Most of the day-to-day websites, email sites etc., will be on the restricted list. While some of the sites are restricted for security reasons, most of them are restricted for loss of productivity during office time.

Here is a way we can quickly bypass browsing restrictions and get to any site we want. This article assumes a fairly working knowledge on computers. In this article, we setup a browsing proxy service on the office system which will route all the internet traffic via a remote home system. Also the entire communication between office and home system is over a secure channel, so there is no worry of privacy concerns.

Our environment will have two systems:
(1) Local/Office System:
Windows operating system such as xp, 2000 etc.,.
Putty - Very useful telnet/ssh client for windows.
(2) Remote/Home System:
Preferably a linux operating system with SSH service started. If you don’t have a machine with linux system handy, you can use cygwin/openSSH on windows platform. In a nutshell this system should have a SSH server running on it.

Additional Requirements:
If home system is directly connected to internet, then public IP address of the home system will be needed for this setup. To make life easier a free dynamic dns account for mapping the IP address to a URL can also be created. Check http://www.dyndns.org for details.
If home system is connected to internet via a router, then add a port forwarding on port 22 to the home system. Again public IP address or dynamic dns name of the router will be needed for this setup.

Setup steps:

1) On the office system, open putty enter the ipaddress or dynamic dns name in the host name field. Select “SSH” as connection type. Port 22 will be selected which can be left alone unless you run the SSH service on a different port. Note: Though your putty screen might look a little different than the one seen here due to version differences, the basic steps would be still the same

In our example,
Host Name = demo123.dyndns.org
Port= 22

Remote home system network details

 2) In putty, on the left-hand navigation panel, open SSH option and select “Tunnels”.

In the tunnels screen, set these values
Source Port: 3000 (this is the port at which our proxy service listens to, this port can be changed to any but preferably a number larger than 1024)
Destination Port: (Leave Blank)
Finally, select “Dynamic” from the radio button options.

Tunnelling information for the proxy

3) Important: Click “Add” to add the tunnel settings to the connection.

Tunnel settings added

 

4) On left-hand navigation panel, move the scrollbar to the top and click session. You will be seeing the settings entered in step(1). Now we can save the whole connection settings. Add a name for this connection in the saved sessions textbox and click save.

Saving the connection settings

5) Click open, to open connection to home machine, and enter login and password information for the remote machine. This user need not be root user, but it needs to be an user with network access on the remote machine. That brings to the end of putty configuration. Now you have a proxy connection pipe from office machine to home machine. Now we need to configure our browser to use this pipe instead of the direct connection.

6) Open up a browser window and make the following changes to the connection settings.
On FireFox,
Select connection settings from the menu item Tools -> Options. This will bring up the option window, Select “Advanced” from the icon and then switch to “Network” tab.

FireFox Connections Tab

Click on Settings, which will bring up the network settings screen for the browser. Normally, the browser will be set for no proxy. If you have any other proxy settings remember to note those values. We might need to put that back when we are done using our own proxy service. Click on “Manual proxy configuration” option and enter “127.0.0.1″ for SOCKS Host and 3000 (or the port you’ve used) for Port. Finally click “OK” to save the changes.

Browser connection settings: Before changes        Browser connection settings: After changes

On IE,
Select connection settings from the menu item Tools -> Internet Options. This will bring up the option window, switch to “Connections” tab. Click on “LAN Settings”. IE network settings window will open. In this window select “Use proxy server….” and click “Advanced”. In the proxy settings window, enter 127.0.0.1 as socks proxy host and 3000 as socks proxy port. Click “OK” and save the changes. Note: Make note of the existing LAN settings to put it back after using the proxy service.

IE Connections Tab   IE LAN Settings  IE Proxy Settings

7) Now we are ready for browsing any website through our home network and not through the office network. To verify this you can close look at the putty logs. Also another crude test will be to close the putty session to sure browser cannot connect to internet anymore. Once you are done using the proxy service revert back to your original browser network settings.

Building a new PC

Posted in Musings on July 31st, 2008 by Madhan / No Comments »

After what seems forever, I found some time to post. Tonido is coming along, progress is being made, though what seems like an inch at a time. But that is a post for another rainy day.

Anyway, developing Tonido is a fun affair, I need to run several copies of Visual Studio 2008, Eclipse, a couple of browsers, several tail programs, then a couple of SSH sessions. Its fun stuff. Getting all this going takes a fair chunk of time. And on some days, I need to run a Virtual Machine to boot.

My aging Athlon 64 3000+ (from 3 years ago) couldn’t even pretend it could do this and I didn’t try. I finally got a Dell XPS 1330, Core 2 Duo laptop in the beginning of this year that was able to bear this load. I finally ended up connecting via Remote Desktop to my laptop, so I could at least use my desktop monitor (Dell 24 inch). Still this was a sub optimal experience, especially for long sessions.

The Gods must have taken some pity on the laptop after seeing it run its heart out and I got the blessings to go get a new machine. Yay!

After looking at the current PC market, I had to consider whether I should get the quad core cpu vs the dual core cpu. The dual cores were much faster than the quads and were cheaper, but the quad core.. well they just had 2 more CPUs. After endless research, I decided to get the quad (Q9450) and I think it turned out to be a *good* thing. Rounding out the specs, the rest of the system is fairly straightforward, ASUS P5Q, 4 GB RAM, 500 GB HDD, ATI Radeon 4850, Antec Titan 650 with 650 W PS.

QuadCore_PC_Build

The build went pretty well and it posted into BIOS without a hitch. The only tricky thing was trying to understand how to attach the CPU cooler. It took me a while before I understood how to attach the CPU cooler clamps to the motherboard.  Anyway more of that CPU cooler in a bit.

Overall, the build was fine, and in a little over a evening, XP was installed and I was playing my free copy of The Witcher (that came with the Radeon 4850) at full 1920×1600 resolution at smooth frame rates.

Next, I threw my development workload at it and there was *no* problem whatsoever. VS 2008 is able to do parallel builds when it can and it really helps now. With Quad cores running, there was never a moment when I had to wait for the computer to do something, whether it be compiling or any other activity. I am just more productive, because during the VS build I could start another activity that could be done while waiting for it to complete. I guess you can never have too many cores.

A week went by and I finally decided to check out how stable the system was and I tried monitoring the temps. The case was running at 50 C! and, the CPUs at 50 C idle and almost 70 C load. And Intel’s spec said max temp was 70 C! Yikes.I tried several things, reapplied the thermal paste, reseated the fan etc. These didn’t help, and in fact I actually saw the CPU at 100 C in the BIOS once during my test! I thought it was cooked and expected to see smoke coming out. To see if I can salvage the CPU, I went and got a Thermaltake CPU cooler. I put this on and took out the stock Intel cooler. And what a difference it made! Temps went down immediately.

Then I found that the Radeon 4850 was running at 80 C!. After applying the Radeon “Fan hack”, the GPU temperature came down from 80 C to about 50 C!

Happy with the cooling, I OCed my Q9450 to 3.2 GHz from 2.66 GHz (my first overclock). Everything has been very stable. Idles at 45 C and at load never got above 60 C.

Here are some notes for someone building a new PC:

1) Choose a good case

A good case is crucial. My first build used a sub-par case and the front panel disintegrated during the build and I still use that machine with duct tape holding the frontpanel. ugly. The Antec Titan 650 is a very good case, almost silent. It has plenty of room to work with and comes with a very good PSU to boot.

2) Choose a good power supply

Enough said.

3) Buy a non-stock CPU fan

This applies if you are buying one of these new Intel chips. It is possible that I did a lousy job installing the cooler, but buying a aftermarket cooler really helps.

 4) Reuse your Windows XP Pro license if you have it

This one was news to me. I was planning on getting Vista, but I learnt that it is possible to move Windows XP Pro from an old machine to a new machine, provided you have the retail version. So I retired an old machine, installed Ubuntu on it and moved XP Pro to the new machine. This is better because, I now have Vista and XP on my development machines and it is good to have as much diversity as possible.

5) Check your operating temps especially at peak load

I didn’t do this enough at the beginning, but should have done this right off the bat. Running Prime 95 torture test is a good way. Another good way is doing C++ compiles.

My new machine, according to the CPU benchmarks is at least 10x faster than my Athlon 64 3000+ and it is atleast 3x faster than my dual core 2.2 GHz.Everything is getting done faster. Now only if I can write software faster..

Office 2007 Ribbon Interface

Posted in Uncategorized on June 5th, 2008 by Madhan / No Comments »

One of the onerous tasks with working on a startup is the sheer amounts of documents you have to churn out. Design documents, functional specifications, action lists, letters, presentations etc. Instead of getting the latest MS Office, I decided I can skimp and just use Open Office. I have been hearing a lot of good stuff about it and thought that it is going to suit my requirements exactly.

Not exactly. 

Agreed, it is an amazing piece of software (especially considering it is Open source, and I am a fan), but in terms of just day-to-day usability, it slowly aggravated me till I gave up. Don’t get me wrong, it works fine, but it is the small things.. For e.g. you can be typing in Impress and then you would press “Enter” to enter the next bullet point. The next bullet point would appear but with the bullet point looking larger then normal. I would spend some time futzing around till I got it right. Small things. Minor things. But doing these over and over made me give up.

I went and bought the latest version of Office 2007.

 Now, I have used several versions of Office and it always surprised me how usable Office 2000 was/is. One could continue to run Office 2000 and still essentially get the same functionality. I always wondered how people would even upgrade to the next version, since Office 2000 still worked pretty well.

Office 2007 changes all that.

With this version, MS took a big risk and rewrote it to use the “Ribbon” interface and after using it for a couple of months now, I have to say this interface brings Office to a whole new level. Instant previews of formatting, one-click document styles (with preview), context based options work very well together to bring about a ease of use that was lacking before.  The UI has been so streamlined, the behaviours so consistent that the UI is a joy to use. There is simply no competition. Open office, for example competes with Office 2000-2003 but is not in the same class as 2007.

Many talk about the imminent death of PC based office suites, citing the growing availability of Online Office suites, but I am not sure if these folks have actually edited a complex document bigger than 5 pages in an online suite. It is pure agony.

Office 2007 UI is a work of art. Well done!

PS: Now my question is can Microsoft top this in the next version to make people upgrade?

Code First, Design Later

Posted in Software on April 13th, 2008 by Madhan / No Comments »

… must be the worst thing any self-respecting Software Developer would advocate. However, there is some truth to the statement. Allow me to explain.

Software development has been so many times compared to building construction, that the analogy of blueprints to software design is accepted without contention. Authoritative sources claim that no one would start full construction without the blue prints drawn up.  And it follows that we need software designs before construction.  This is all in the realm of conventional wisdom, that is inscribed and drilled into every developer’s head from the beginning of time.

But my experience was always different from this wisdom. I always found that even when software design was complete before starting to code, invariably(100%) the design would change as the code was written, the test cases written, the test cases run, after real world use. The shipping product’s design would only have a passing resemblance to the original design.

This evolving design troubled me to no end. How can a software development as a construction analogy be valid if the design evolves? I am not aware of any construction practice where the blue print changes as the construction proceeds.

The conclusion to draw is that “the design is the blue print” analogy is fundamentally flawed and incorrect for software development.

So what then is the blue print for software if it is not the design?

It is the source code itself says the insightful “Code as Design” articles published by Jack Reeves.

And, not any source code, but the source code AFTER it has passed through unit, system testing, QA, acceptance testing etc. The blue print for software is what goes into the build for the release.

This is a subtle but an important change in perspective. The important thing to realise is that software design is not complete till the code is written, all the tests pass, the QA is complete and the product is shipped to the customer. Each and every step along the way requires the same skill and importance as that is usually paid to Software Design.

Note, that this is not saying that there is no need to design first before coding, but rather, design is not a fixed phase that stops before coding begins.

Code first, Design Later. :-)

Vista and Restricted File Names

Posted in Other on March 25th, 2008 by Madhan / No Comments »

I came across something odd with some new applications in MS Vista. The problem was that one application when started, made Vista show a UAC permission dialog box. The other applications did no such thing. This made me scratch my head for a while. I hunted around in MSVC’s compiler/linker dialog boxes to see if I had misconfigured it. But no such luck. After some more headscratching, I found out that if I renamed the file name of the executable, Vista didn’t prompt me anymore. So it appears Vista triggers off certain keywords to make the executables require user permissions. They all appear to be names like “patcher”, “updater” etc. See the screenshot below to see what I mean. All three executables are the same binary files, just renamed differently. But patcher and updater require security privileges and have the shield icon.

vista_file_names.png

I don’t think this is going to work for long as developers will simply rename the files to avoid these names altogether. For e.g. I simply renamed my application from patchmaker.exe to packager.exe.

Adding security permission requirements based on arbitrary file names instead of just looking at the action the application is trying to perform doesn’t sound like a good idea

Designing a Software Patching System

Posted in Software on March 11th, 2008 by Madhan / No Comments »

Consumer’s expectations in general always increase over time. This is inevitable given the relentless march of progress and is no different for software. Any modern software system that is worth its salt these days, has to support a whole host of features. One of these must-have features is patching.

Patching, sometimes also called as automatic updates comes in many different guises in the software world. These start from ubiquitous software updates in OS’es like XP, Vista, Ubuntu to other common place software like Anti-Virus, Firewalls, Office suites and so on. Designed well, these updates help the user keep abreast with changes, reduce technical support, keep the system secure and so on. Designed badly, they turn into a nagging system that constantly chastises you for playing hooky and not upgrading. It forces the people who know how, to turn on options like ‘never check for updates’ thereby defeating the whole purpose of auto-update systems.And it forces the people who don’t know how to always click on these pesky message box reminders EVERY SINGLE TIME they interact with the software. This doesn’t win any enthusiastic supporters does it?

So if we are trying to create a software patching system, how and where do we start? Here’s a set of requirements:

  1. Easy-to-use, minimal user intervention when automatic updates are enabled
  2. New version notifications should be in the background
  3. Works (or fails gracefully) in non-admin mode
  4. Supports incremental patching
  5. Secure
  6. Easy to administer and manage software patches

So, let’s start going through these requirements in detail:

Easy-to-use

The software patching system has to be essentially invisible to the end user. Especially, if automatic updates is enabled, every time the system is updated, there should be little or no effect to the end user. This makes for an overall good experience. A good example of this kind of turn-it-on-and-forget-it kind of patching system in use is in Firefox. I haven’t had a time that the firefox update failed or I had to do some additional work. It automatically detects that it has updates and next time I restart firefox it applies it and restarts itself. This is what I would call unobtrusive.

New Version Notifications should be in the background

This requirement doesn’t sound like a big deal, but *many* programs do this and make the decision for you that everytime you open the program you are interested in mainly knowing about the latest update. Most times it is not. The user is in the program to do some work. They would care less if they were running 1.0.1.2 vs 1.0.0.8 as long as they are able to get their work done. Some programs are slighly better in this regard, allowing you to change the behaviour of the notification to be less obnoxious, but the default is set to be obnoxious. See example below:
Show version notifications on startup
On the other hand, see Wordpress’s update notification, not obnoxious, but still useful.
Wordpress Update Notification

Now, I can see a few people objecting to this saying that if the system requires a high critical update, this update notification should be shown to the user first thing, come what may. Yes, I agree, you need to show this to the user, but not push it down their throat, for example showing this via a Modal dialog still is bad. Just because you pushed this down the user’s throat doesn’t mean that the user wants to update the application right at that time. If there are security implications, it is still his decision to take that risk.And the software application has to respect that, irrespective of whether it doesn’t match it’s objectives.

Works (or fails gracefully) in non-admin mode

In the Windows world, most users have been conditioned and accustomed to running as an Administrator. This is mainly because most software (including mine) have assumptions about several things including, write privileges to the Program Files directory. Normally, writing to the Program Files directory is only possible when a program is running as administrator.

When an update program runs it has to consider the fact that the user could be running with limited privileges and either detect and handle this error gracefully or work around it.Either way, the update should either succeed or fail. If it failed, the user should know precisely why. Most times, software that fails this way reports a cryptic error message that no-one except the developer can figure out.

Supports Incremental Patching

This is somewhat related to the ease-of-use thing. Most patching systems, neatly sidestep the whole update issue, by downloading a brand new installer and starting it when you click on “Update Now”. One of the reasons this is bad, is inefficient use of bandwidth. Most applications when they are being updated just change a few main files. Very rarely do all the files require changes. So downloading a full application installer is inefficient not only for the user’s bandwidth, but also to the the server that is hosting these changes.

The other reason, having the full installer downloaded is the confusion created. Most times it is not clear whether the software should be uninstalled first before starting the installer or whether the installer will take care of this for you. I cannot count the number of times that after the installer churns away for a few minutes will abort the install saying that the previous version needs to be uninstalled first. Aargh. The other reason this doesn’t make much sense, is because this approach won’t work for software installed for example on USB keys.

The best patching systems allow incremental patching, i.e. downloading only files that have changed and applying them. This reduces bandwidth, removes confusion on installers and works on portable sofware.

Secure

Needless to say, security while dealing with patching systems is imperetive. For example, the software should not be misled to download software updates from an attacker and install them on the user’s machine. This is especially important in these days where even DNS poisoning attacks can fake the location of the webserver.

Easy to administer and manage

This requirement is not from the user’s side, but purely focused on the developer and operations. Creating a patching system satisfying these conditions is not too hard, but creating one that is easy to manage and maintain is actually more tricky. Over the lifetime of a product, hundreds of patches will need to be created and maintained and quickly this becomes a full time job for the unlucky person. For example, RTPatch, an incremental binary patcher can create differential patches given two binary files. But then if you have N versions of your product, every new version will require patches from all previous versions to move to this latest version. This becomes unmanageable.

The correctly designed patching system alleviates this problem.

Leadership vs Management

Posted in Musings on March 4th, 2008 by Madhan / No Comments »

Quotes from Ready to Lead by Alan Price, an interesting book, which tackles the subject of Leadership and how it is different from Management. The presentation is a little different, opting for a story to present the main content of the book, but it is nonetheless effective.

“Leadeship is the the unleashing of human passion towards a goal. And management is the organizing of skills and resources toward a goal.”

“Leadership builds a community of purpose. Management builds a community capable of purpose.”

The book stresses that the definition of Leadership is personal and differs depending upon the person and they have to come up with their own take on the subject.

Mine

“Leadership is about making people believe whereas Management is about managing beliefs.”

UI Annoyances - IE7

Posted in Software on February 15th, 2008 by Madhan / No Comments »

It is tremendously hard to design good UIs. It is an art, and no one knows exactly what ingredients go into the broth to make it tick.

On the other hand, everyone knows how to recognize bad UI design. Bad UI at best annoys you and and at worst makes you so frustrated that you mostly give up using the program even if it has other merits.

Here’s an annoyance in IE 7.

iexplore

See the same browser window in

IE6

ie6

Firefox

firefox

Safari

safari

Netscape

netscape

What is wrong with the three sections marked in red in IE7? Those buttons are the most often used functions in a browser. Any browser. See how the buttons are laid out in every other browser.

So what is the problem? These buttons are spread out completely in different sections of the browser. There is no rhyme or reason to it and it is baffling to me why this change was made. So whenever I browse in IE 7, I always struggle to figure out where those buttons are. I keep clicking the wrong places to do the things I have been used to doing in every other browser by the sheer force of habit.

The UI history of all browsers that have been released over time have pretty much standardized the location of these buttons. So the change in IE7 makes it harder to use.

UI Design Cheat Sheet

Posted in Software on February 4th, 2008 by Madhan / No Comments »

UI design is black magic. It is as if the best GUIs had a few voodoo priests hanging around, casting wards against the “Sucky UI demon”.

Here is a quick UI design cheat sheet, freely copied from various resources. I suggest you read those resources in full to get the full gist of the ideas.

1) ‘Don’t make me Think!’

UI design has to be about this. Read the book ‘Don’t make me think!’ by Steve Krug. Users want to do as less as possible in the smallest time possible. They don’t want to read a ‘manual’. They don’t want to read documentation. They would rather spend time randomly clicking on things to see what they do instead of reading documentation. It is like asking someone for directions, people would rather drive around wasting significant amounts of time trying to locate someplace rather than stop and ask directions and appear lost.

2) ‘Match the Mental Model’

When a user uses an application, he has a fundamental model of how he expects the application to work. When it matches him with that mental model quickly, then things gel and he is happy. Conflict occurs when the application doesn’t match the mental model or worse it has a completely different model and requires the user to understand its (crazy) way of doing things. Most users have no incentive to put up with that. (Unless in some complex domain like 3D modeling, FET  where there are no obvious mental models)

3) ‘Don’t reinvent things that users already are familiar with’

There is a good reason Microsoft/Apple have a consistent UI model. Every window has the same familiar elements, minimize button, maximize button, menu, scrollbars, buttons, radio buttons. And for the most part they look the same in every app. This helps tremendously because people don’t have to re-learn a new UI paradigm and widget set.

So for example, when a UI widget is clickable, it has to look explicitly clickable and not look like some fancy woozy thing that looks clickable, but when clicked, does nothing or something that doesn’t look clickable, but when clicked, actually does something. Every time a user experiences behavior that is unexpected to what he expects, he gets frustrated. Over time these frustrations add up and he will discard the UI because it is not ‘easy to use’.

4) ‘Don’t make me choose’

Users are lazy. They are not interested in understanding every nuance before making a decision. So when we provide too many options in a UI a user will get frustrated. The corollary is ‘Use reasonable defaults and let the power user change them if they want’. Most people don’t want to be power users if they don’t have to.

5) ‘Keep it simple stupid KISS’

The more busy a user interface looks, the more frustrating it is for users to understand and use it. The number of things presented in the UI should just be enough to get the job done and not any more.

6) ‘Test Test Test’

UI debates can be religious and there can never be a right or wrong answer, however the best way to resolve it is to do usability testing and ask opinions. Experts claim 5 or 6 users are sufficient to give good feedback.

That wraps up the list.

References:
[1] http://www.joelonsoftware.com/uibook/chapters/fog0000000057.html

Jumping off a Cliff

Posted in Musings on January 31st, 2008 by Madhan / No Comments »

I am not sure how it feels. And I certainly don’t want to find out. But becoming an entrepreneur can be likened to such a leap, with no safety net, no parachute, and into the pitch darkness. In the scale of crazy things to do, this probably ranks up close to the top. Still, I guess a certain fraction of the human populace would dare try really jumping off a cliff. And I guess the same percentage would want to strike it out for themselves as entrepreneurs.

The question any sane person asks is ‘why‘?

The answer is ‘why not?

As long as the humans have walked the face of the earth, they always have been trying to extend beyond the limits of the possible, trying to remove the ‘im’ from it. Originally driven by the sheer requirement to survive weather, predators, hunger, Man had to innovate, push the boundaries or risk ceasing to exist. I have to believe that this has to be an innate primary requirement for survival. How well he did would depend on how much he had this drive.

With advances, stability and generally conquering the environment, he had less reason to go beyond the normal. The reasons changed, political oppression, promise of wealth etc became the reasons for pushing beyond the ordinary.

Over the course of the last century, advances came so quickly that most reasons have disappeared or almost disappeared. And the way society is setup(I have to revisit this subject later) tends not to favor those trying to step outside the line. Conformity is required and anything else is frowned upon. A dangerous mindset to have for the human society as a whole. Because, unless Man tries to push the envelope, innovation would slow down…limiting what can be achieved.

So coming back to the subject at hand, what does this have to do with entrepreneurship? Everything. Taking risks, attempting something in the face of insurmountable odds is what drives people to startup companies. The same thing that drives man to the moon, to the deepest depths of the ocean, and to the darkest depths of gloomy forests.

Even if the centuries of conditioning are starting to remove this drive, it lives on as a tiny spark amongst everyone. It just needs a push to ignite it. Maybe thats what it needs, a push or a shove.

A jump off a cliff. I just did it.

Entries (RSS)