12 Feb 2010

How to choose a car for regular long hours driving?

If you search in AutoTrader.co.uk for cars less than 10-year old and having 150,000+ mileage, you will mostly get Lexus, Jaguar, Mercedes, Volvo etc.

Few things are similar in all those models, viz. they are all large saloon/estates, diesel and automatic.

Are small cars not capable of doing high mileage? Yes, they definitely are. But the question is, are they comfortable enough?

This is the question I am searching for answer myself at present. I am doing 40+40 miles (= 65+65 km) everyday in a small manual car and feeling the pain in my body!

Then I searched over the internet whether any scientific study has been made on comfort of car seats. I did find few but none were very brief. Most of them include boring PhD experiments data.

In the end, I figured out what are the parameters to look for while choosing a car for daily long commuting. That is why I wrote this blog.

Please note, if you are doing less miles (< 10,000 miles/year) or 3+ hours of driving occasionally then you do not really need all these research. However, if you do around 15,000+ miles a year and spend at least 3 hours on driving seat every day, then understanding how human body behaves in longer journey helps save the body in longer run. To appreciate findings discussed here, you must be spending a lot of time on road driving a car.

Advice #1: Get an automatic car

When you press brake or accelerator, your right foot does not need to travel much as you will rarely press brake and accelerator to the floor (unless it is an emergency braking or you are doing a drag race). On other hand, to change gear, you need to depress clutch fully to the floor (otherwise cogs will scream). So, your left foot needs to travel more than right foot. For long motorway driving, it makes sense to position seat so that your legs are properly stretched and you do not seat too close to steering (if you do, you will feel pain in legs within an hour). However, every time you depress clutch, your left leg travels further than right leg and it twists your body. For this reason, sometimes I need to reposition my posture in seat for best comfort. Also, throwing gear lever by left hand continuously (in stop-start traffic) twists body slightly on left. All these actions for a continuous period day after day put strain on back! An automatic saves this problem! Some automatics have foot operated parking brakes (e.g. most Mercedes, Kia Caren etc.). You engage the parking brake via pressing a pedal (besides fictitious clutch) and release by pulling a lever on right hand side. Now I have not driven such cars for very long distance, but I assume pressing such brake using left foot may bring the same problems faced by operating clutch in manuals! Also, foot operated parking brake in a manual car is complete nuisance (try uphill start).

Advice #2: Get a bigger car First reason is obviously safety.

A small car on motorway is very vulnerable in case of an accident. Besides this, a large car is more stable. While overtaking long articulated lorries at 80 mph (= 130 km/h), I can often feel my small high sided car being affected by side winds! Any high sided car (e.g. SUV) - big or small - has its center of gravity at a high position and likely to topple after a collision. A bigger saloon/estate/MPV is more likely to absorb road irregularities much more than smaller cars. Big cars usually also transmit less noise and vibration to cabin though it depends on particular model.

Advice #3: Get a diesel car

One obvious reason is fuel economy. Diesel tends to achieve a better fuel economy than petrol. Diesel engine produces more torque than equivalent petrol engines. A petrol engine produces 100 Nm/L while a diesel gives 150 Nm/L (L stands of engine displacement here). Gearbox in any car is meant to act like torque multiplier. Since diesel engine produces more torque over a wider range of engine RPM, one does not need to shift gear so much (in case of a diesel manual) compared to a petrol engine. Also, bigger cars require bigger engines and big petrol engines tend to become uneconomical for regular long commuting.

Advice #4: Get a car with all sorts of seat adjustment (and preferably with cruise control)

Only luxury cars will offer steering with reach and rake adjustment and multi-way driver-seat adjustment. Some expensive cars offer electric seat adjustment which is very helpful for getting most comfortable driving position. A good seat must offer at least these - seat forward-backward movement, adjustable lumber and seat height adjustment. There should be a foot rest besides clutch for left foot. Many cars do not have it. This is essential for longer journeys (both in manual & autos). This footrest allows the left lower extremity to exert effective counter-pressure for preventing the forward migration of the pelvis on the seat. This is one of the most important features to look for in a car! I personally find SUV seats are most comfortable as I seat in upright position rather than in a crouching one! Too low seat will make ingress-egress difficult.

Advice #5: Avoid cars with seat/steering/pedal offset

Though surprising it may sound, many cars have offset seat and/or pedals and steering at at angle. Even though these values may be small (to judge in naked eye - without proper measurement), seating in this posture day after day will introduce pain over the body! Steering wheel offset - when center line of seat will not align with center line of steering Pedal offset - pedals are positioned either too left or too right Steering wheel angle - the steering is not exactly perpendicular to cars horizontal cross section line. The old Ambassadors in India had a visible wheel angle problem! This site has good demonstration of offset problems - http://car-seat-data.co.uk/ Even some very expensive cars suffer from offset problem! Often LHD cars are not properly adopted for RHD. Unfortunately, the cars which have all these good features discussed above are often costly!

Few other points worth noting here.

A comfortable seating requires good arm rests. Most cars have one armest on door handles (make sure you can rest your elbow there while holding the steering) but only a few have central armrests. Having both left & right armrests will help to hold the steering with any one hand while cruising. Cruise control of its own not much useful unless it an adaptative type one. In adaptative cruise control, you can adjust cruising speed by controls on steering wheel. Pressing brake anytime (also clutch in manual) cancels cruise control. Cruise Control helps relieving pain in right leg. All the controls and dials should be easily accessible from drivers seat. Visibility all round should be good. You need not twist your body too much during reversing. Since this blog is mainly written for comfort of long journeys, few other points worth noting as you are likely to use your car for some other journeys as well. In general, RWD cars do not perform well on snow (unless you use winter tyres). A FWD car is often easier to use when big freeze happens. How do you figure out which cars are to be short listed for test drive? Simple, look out which models are for sale in AutoTrader those are diesel, automatic and clocked over 100,000 miles yet less than 5 years old. The car you buy must be reliable not and too expensive to run (unfortunately some comfortable cars do tend to cost a lot maintain).

Update:

Last couple of days I was experimenting various seat back (lumber) angles.

So far my conclusion is adjusting lumber at 100 degree angle (from horizontal where 90 degree is just lumber exactly vertical) offers most comfortable position for spine. I also observed that most mini cab drivers keep their seat back at highly obtused angle (ie. even more than 100 degree).

2 Feb 2010

What is Dimension in Oracle data warehousing?

If you are using Oracle (10g upwards) database for data warehousing, chances are you might have come across DIMENSION in Oracle.
What is it and how does it help?

In data warehousing environment, often you find tables do not have referential integreties among them. While, I do not condone it, sometimes it is un-avoidable as source data comes from mainframe where, due to historic design, RDBMS like constraints could not be implemented.

So, when these data are loaded to Oracle tables (without any cleanup), implementing RDBMS constraints becomes difficult.

Without primary/foreign key relationships, Oracle optimizer will be confused as it won't know how to join different tables.

This is where Dimension comes to help!

Dimensions are simply logical constrains defined among tables. A product code may be logically related to transaction table which is defined by CREATE DIMENSION command.

What is the advantage? Well, it then behaves as if it knows foreign key relationships between tables (though not exactly the case).

The main performance gain is that it helps Oracle to rewrite queries so that it can either use a materialized view or avoid complex joins.

If you run a query which does something like this - show all possible aggregations from a very_large_table, it may take a very long time to complete.

Where as, if your DIMENSIONs are defined then Oracle may fetch same result by quering a smaller_table (which may be materialized view).

By defining Dimensions, you tell Oracle where else it may look for to satisfy your complex aggregation requirements.

There are some pre-requisites though, you must enable query rewrite enabled parameter to true beforehand.

20 Jan 2010

Why not much B2B review yet?

Nowadays the social media sites are promoting the idea of "wisdom of crowd" concept. When you have 500 people reviewing a hotel in Trip Advisor or a book in Amazon, then I know the average scores of hotel/book etc. are highly valuable.

The public rating of anything is often more comprehensive than marketer's own case study - as the later is carefully filtered through their business strategy.

So why are we not seeing more B2B reviews then?

There are quite a few issues here. First of all, many businesses have often a monopoly on their service/products. If you read a bad review of their service, you may not have a choice to select another one as no other business may offer the service at your budget.

Also, there are lots of legal implications. As a business consumer, you may have your rights defined by NDA (Non Disclosure Agreement) and protocols, which are quite difficult to break.

Moreover, people tend to grunt more about bad service rather than praising a good service. So, there are usually hundreds of satisfied customers against a negative customer. This often skews the review rating. Unlike B2C reviews, B2B reviews don't tend to balance our negative reviews due to their sheer narrow market size (in most cases).
This can also affect trustworthiness of the review. A good review may be posted by someone from concerned business's marketing department and the negative one may be the brain child of a nasty competitor's.

That's the place where B2C reviews have upper hand - since there are so many consumers who write reviews, the average effect always cancels out the unusual high or low ratings. With more and more reviews, the score tend to reflect true feature of the product/service.
Here is a good article on this very topic.

http://www.internetevolution.com/author.asp?section_id=698&doc_id=171802

20 Nov 2009

Nokia no better than Apple!

I always thrashed Apple for their crippled iPhone. You need iTune to sync your files, you can't multi-task, you can install app files without app store, you can use attachments in email, you can't see files on your iPhone (explorer style) and so on.

Yet you could do all these if you jail break iPhone. A jail broken iPhone is much more versatile than Apple's crippled out of box iPhone.

So, I was upset and thought ok, I'll buy a Nokia which won't be lame as an iPhone.

How wrong I was!

After buying Nokia 5800, the first really popular touch screen (or I rather say press screen) phone from Nokia - which is often termed as cheaper alternative to iPhone, I was in joyful mood for few days.

But fun started to disappear when I discovered my Symbian smart phone is nearly as crippled as iPhone by Apple.

Let's start from beginning. I bought the phone direct from Nokia and as a result, it came as network unlocked (which is a good start). But my patience ran out when the phone started showing its bug quite ofen. For example, just after unplugging USB cable, the shortcut bars started disappearing. After crawling on internet for a solution, I discovered that you need to hard reset the phone by pressing 3 (green red camera) +1 (power) keys while powering it on. This deleted all my user data!

Then from forums, I also came to know that Nokia could have just allowed users to delete a single system file or a particular folder to solve it (without doing hard reset). But in my phone, I could not even see those files. Why? Because they have been hidden by Nokia! To see them, I need to "hack" or "jail break" my phone - in same way iPhones are hacked!

Then I tried to figure out why Nokia did that. The result was very interesting.

The Symbian foundation is mostly owned by Nokia. An inherent feature of Symbian is its "signed certificate" feature. Any app, which you like to install on your Symbian phone, must be signed by developer's certificate. It is analogous to getting your manager signed his approval whenever you want to access internet at work (imagine how inconvenient it would be).

Apps from big commercial vendors (in Symbian) come with proper signed certificate. So, you can directly install those apps without much drama.

However, problem crops up when you try to install apps from less wealthy developers. I continuously got "certificate expired", "certificate invalid" etc. errors. I got same error even with my own developed Symbian *.sis apps!

To get a signed certificate license, you need to pay a hefty sum to Symbian Foundation (i.e. Nokia).

There is another option though. In Symbian signed website, you can upload an unsigned app with your IMEI number where they will generate signed app for your but that will work only in your phone (as IMEI is embedded in app).

Not only this is bit of inconvenience but it won't sign apps if it detects apps are trying to interfere Nokia's own protection system.

What a money making exercise!

There are some apps using which you can hack your Symbian phone (most models). Most common is HelloOX (just search over internet). This needs to be compiled specifically for your phone (ie IMEI dependent). Unless you can sign it via your own developer's certificate or can read Chinese language website, you need to fork out $5 to get a signed version from their site. Once you get that, you can easily hack your Symbian phone! Then you can install your own apps and no longer get certificate error message. Basically this hack makes you something power user which is analogous to root user in Unix. So, you can see all files (even hidden system files) and bypass certificate errors.

Nokia argues that not everyone should become root as bad apps can muck the phone software to render it unusable.

Well, I counter this by saying, just using Nokia's own firmware, my phone (and several others as you can see on internet) got screwed.

Also, as a developer, I know what I'm doing in my phone. So, why I should not get the flexibility of developing my apps for free?

Symbian is quite a powerful OS for smart phones. Even without hacking your phone, you can access individual files (except hidden system files) using Windows Explorer type file manager. You can use attachments in emails, you can read Microsoft Office files using free Quick Office viewer (editor will cost money though). You can directly transfer music (or any file) treating the phone as USB disk.

So, definitely Nokia did something which Apple didn't. But if they claim Symbian as open system, then they must not close it to users.

29 Oct 2009

Rise and fall of Microsoft


During 1990 to 2000 - following paragraph was relevant. In fact, this is what I wrote in my blog in 2000.
Most people nowadays when buying new computers use Windows as OS. Some of them are even unaware that there are dozens of other operating systems. For example, Apple's Macintosh, IBM OS/2, Linux etc. These are for PCs. For main frames there are AS/400, Windows NT, Unix etc. It's not that Windows is the best of all, but it is really the most popular. Windows graphical user interface is not at all intimidating. In fact, it is the Microsoft's business strategy, which has made Windows #1 OS. Back in the seventies, Microsoft & IBM jointly developed DOS. At that time Microsoft envisages that computer industry will revolve around PCs rather than main frames as thought by IBM. So, in an attempt to dominate PC market Microsoft launched Windows. And it was a quick success. However, Microsoft is not the pioneer in developing GUI. Apple Macintosh developed a GUI OS longer ago when people were using DOS 3.0! Experts believe that MacOS is still superior to Windows. But, Apple made a blunder by trying to say customers what they offer than to listening what they want. Very recently, Apple is selling their most advanced PC without a floppy drive! They have included a CD writer instead. They argue that floppy disk backdated. I think that most potential buyer will stay aside form the product. Another wrong step of Apple's was that they patented their programs as well as their design. But IBM did not. When you buy an IBM compatible computer from market, IBM does not get any royalty. This is perhaps one major reason behind such widespread success of selling PCs. Among all OS Windows is perhaps the most forgiving. The IBM OS/2 may be more powerful than Windows, but it won't run if there is a slightest discrepancy in you computer's hardware.
In 2009, the above scenario has changed a lot!
Today Microsoft is quickly being replaced from #1 software giant on earth. It's now head to head between Microsoft and Google. So far, Microsoft got most its revenue from its ubiquitous operating system, Windows (various flavours) and Office products. At this very moment, both have serious alternatives. Open Office is nearly 90% as good as Microsoft Office. It is free! Linux has become more matured and one can even run it from USB disks directly. This is free too and you are encouraged to copy and distribute. All products, where Microsoft were a pioneer a decade back, has now either free or very cheap similar alternatives. Be it Microsoft Encarta encyclopaedia ( = Wikipedia), Microsoft Encarta Atlas ( = Google Earth), Microsoft Train/Flight Simulator (actually developed by Kuju which Microsoft bought later), Visio (= free flow chart editor) or whatever - you name it and we have a free alternative!
I know you're going to shout that I missed two important candidates, Visual Studio and SQL Server. Yes, Visual Studio does not have any equivalent because it runs only on Microsoft platform! On other hand, Express version of Visual Studios is freely downloadable and perfectly serves amateur developers. SQL Server still has a good market as low cost database with good features but MySQL, PostgreSQL and Oracle lite editions are not far away.
Very recently Microsoft announced that they will launch web editions of Office software. Alas, too little too late. We already have competing products like Google Docs, Zoho office, Editgrid etc. Still, most computers are sold as Windows pre-installed. But as time goes by, we shall see several others of being offered with Linux.
Windows Mobile was launched with much fanfare. Yet, it is now dying smart phone OS - facing stiff competition from open source systems like Symbian, Android, Linux Maemo etc.
Microsoft's search engine, Bing, failed to make a dent in Google or Yahoo's dominance.
Windows Live is a flop! Hotmail users are migrating to Gmail, Yahoo or other places.
Interestingly, Microsoft's arch rival Apple is rather going stronger!
I personally disliked Apple for their closed architectural approach to everything (including iPhone). To use an iPhone to its full potential, one needs to jail break it - which is not supported by Apple. Also, you can't use it without involving iTunes! What a rubbish concept.
Yet, Apple was successful making iPhone make a desirable item to millions around the globe.
Microsoft's Zune never managed to compete with iPod. Windows mobile is struggling where iPhone is flourishing!
I always admired Microsoft. Unlike Apple, they never crippled their software and they encouraged piracy of their product. That's why it their products got such a big market share today. I myself learned computer on DOS (and then Windows) and Visual Basic was first programming language I mastered.
So what did Microsoft do wrong?
They failed to see the power of crowd sourcing. Wiki is today's power. Voluntary collaborative approach gave birth to Linux, Firefox, Wikipedia and much more.
Bill Gates also could not comprehend power of cloud computing. He tried to stick with 1 computer 1 license revenue concept - which is now becoming obsolete.
Microsoft never invested properly to their database business, that's why SQL Server could never become true competitor to Oracle. Microsoft always targeted mass market via Windows and Office. But after World Wide Web, people every where has so much choice.
Windows 7 is a desperate attempt to get some people back to Windows. But again it is going to fail. I now like to see Linux in my computer rather than Windows.

20 Oct 2009

Oracle RAC - tiny intro

Introduction

An RAC database is a clustered database.

There are multiple Oracle instances which are connected via "interconnect" - which is a type of LAN.

The datafiles are stored in several disk drives which are connected by "cluster aware storage".

By adding multiple instances, we can add and remove and single Oracle instance without bringing the database down. So, database always remains available. That is the essence of RAC - high availability.

An RAC database is managed by "Oracle Clusterware". RAC operates in "shared everything" architecture mode.

Any storage (eg. SAN, SCSI etc.) can be used with RAC. However, good I/O speed is required for scalability of storage.

RAC supports up to 100 clusters which may be different at hardware level but must run same operating system!

Oracle recommends using ASM (Automatic Storage Management) for ease of dealing with clustered storage.

As a reminder, the RAC is used for high availability and scalability. When work load grows, you can simply add another server to the grid (RAC is a type of grid computing after all).

RAC can be managed via Oracle Enterprise Manager.

An Oracle RAC database requires three components - cluster nodes (the servers or computers running Oracle instances), shared storage (disk drives) and Oracle Clusterware (software application).

Installing RAC

The first step of working with RAC is to install "Oracle Clusterware" which is installed via Universal Installer.

Then you have to configure the clusterware.

Then install ASM (Automatic Storage Management)

Now install Oracle 11g database

Then perform post installation tasks. This ensures that clusterware and database are installed properly and they are aware of each other.

It is possible to convert your normal single instance Oracle database to an RAC database. You can achieve this via Enterprise Manager or "rconfig" utility.

Administering Clusterware

Oracle Clusterware includes two important components: the voting disk and the OCR.

The voting disk is a file that manages information about node membership, and the OCR is a file that manages cluster and Oracle RAC database configuration information.

RAC can be administered via Oracle Enterprise manager. On EM's web console mode, click on Availability tab to see details of Clusterware. You can click on Topology tab to see a visual represntation of your nodes. The Interconnect tab shows you info on interfaces. You can also add new instance to clusterware via EM (under Server tab).

Oracle Clusterware posts alert messages in alert log - which is under $CRS_home.

RAC data dictionary views are created by catclust.sql.

Cache Fusion

Oracle RAC uses "Cache Fusion" to synchronize the data stored in the buffer cache of each database instance.

Since all computers/instances in an RAC access the same database, the overall system must guarantee the coordination of data changes on different computers such that whenever a computer queries data it receives the current version - even if another computer recently modified that data. Oracle RAC refers to this functionality as Cache Fusion. It involves the ability of AC to "fuse" in-memory data cached physically separately on each computer into a single global cache.

Recommended Reference for further reading:

Oracle Database 2 day + RAC
http://download.oracle.com/docs/cd/B28359_01/rac.111/b28252.pdf

Converting single instance database to RAC

http://www.oracle.com/technology/pub/articles/chan_sing2rac_install.html

Other
http://www.orafaq.com/wiki/RAC_FAQ

3 Oct 2009

iPhone is not a geek phone (yet)

In spite of so much hype about iPhone, I still think it is not for geeks (as yet).


It may be flashy and have a good touch screen interface, but it is limited any too manys ways.

First, is the lack of open architecture. Apple has always been a pet hate of mine for their unwillingness to offer an open platform.


Though Apple is so vocal about their millions of applications available for iPhone hype, most free applications are just crap. Yes, I repeat just crap. Even some paid apps are craps too. Agreed, most iPhone apps don’t cost more (may be £1) however, most of them don’t do any real task either.


Problem is, most iPhone apps are still not matured. Numerious applications are just a front end interface for web based applications (like iPhone Facebook, news readers etc.). Any website, which is designed for mobile browsing, is already offering same feature and functionality. All those apps which can’t be used unless you’re online are pretty much useless IMHO.


My next gripe is the iTune. You can just install an application directly (without using iTune) to iPhone. You can bypass iTune but you must then install it directly from App Store. Give me the option of copying application directly to its memory from computer.


There are not many applications which you can use in iPhone while being off-line. If you are willing to develop iPhone applications and NOT on Mac platform, then you are screwed. Apple arch rival Microsoft is still way ahead with the formers intuitive Visual Studio IDEs. You may argue why Apple should offer good IDEs in Microsoft platform? Well, forget MS platform, why not offer something on free Linux platform?


Yes, you can achieve a lot more things by jail breaking the iPhone. But why do I need to do it in the first place. The product should be sold in unlocked form in a reasonable price.

In some European countries, Apple does sell iPhone in unlocked format!!