Friday, February 14, 2014

Monday, January 7, 2013

Good budget smart phones in Sri Lanka


iPhones are still the craze in Sri Lanka, like it is in any other part of the world. However if you have used/experienced several generations of iPhones, you would have realized that the feature differences in each generation isn't that significant, and might not justify the high prices it demand (especially in Sri Lanka).

At the time of writing iPhone 5 prices start at around Rs. 115,000. This is fine for bragging rights, but if you have used/experienced an android phone, you would have realized that you could get the same functionality/productivity for a much lesser price. It could be argued that the user experience / interface is far superior on the iPhone, but having heavily used both, I beg to differ; while my wife owns an iPhone, both my dad and father-in-low (both non-techies) use android phones with no trouble.

Most adults looking to switch to a smart phone from their regular/dumb phone, basically require/look-for the following functionality:

1. Basic voice call and SMS functionality (obviously).

2. Send/receive emails.

3. Browse Facebook. (yes they need to see those pics of their relatives living abroad)

4. Read news on the internet.

5. Navigate using (Google) maps.

6. Play a casual game when bored.

However most people do not know that all these tasks can easily be achieved via a low cost android phone. There's heavy competition in the low end phone market, so it's not easy to pick which one to buy.
Here are the main features to look for:

1. A big screen with decent resolution - most of the above tasks will benefit from a large, sharp screen; should be at least 4 inches.

2. A decent processor - should be 1Ghz+; better yet if dual core. - lower power processors will make the phone feel sluggish.

3. Enough RAM - should have at least 512mb; Please note that this should not be confused with the internal storage memory. RAM is where your applications are loaded and run.

4. Build quality - low end phones use cheap materials which might not be durable. Yet there are exceptions and you need to find such a phone.

I have found the following two phones to have the best bang for the buck, in the current SL market.

1. MicroMax A110 - Rs. 25k - simply the best bang for the buck phone out there. Brilliant big screen,  dual core and 512 ram.  (bit difficult to find though since they frequently run out of stock due to high demand.)

2. Huawei G300 - around Rs. 29k

Sunday, November 4, 2012

Intelligent web page reflow - badly needed in Android tablets.

I bought a Samsung Galaxy tab 2 7" recently. One of the biggest problems I had was that general web browsing was not a very pleasant experience on it. The mobile versions of the web sites were too small for it; the desktop versions were mostly too big and awkward to navigate. Web pages need to be zoomed in and out like an image when reading, and  needs both horizontal and vertical scrolling, which is very annoying.

I'm quite surprised that (android) tablet browsers still haven't implemented an intelligent page reflow scheme which will reposition the page elements and resize the text to a comfortable size based on the screen resolution and physical screen size. Page should be readable by having to scroll only vertically; even better would be an automatic formatting into a flipboard like mechanism where we could just 'flip' pages, instead of scrolling. I find flipping is more natural than scrolling, and probably uses much less cpu cycles on the tab.

Sunday, September 18, 2011

Reading and Writing to the parallel port on Windows 7 (and all post NT win OSs)

Recently one of my cousins from the electronics field wanted me to help him out on a problem; He had some electronic circuits which were controlled via a PC parallel port. These worked properly on Win98 machines but gave trouble on post NT win OSs (2000, XP, Windows 7 etc.). 

The problem was related to the difficultly in reading/writing to the parallel port in the newer OSs. In Win98 and older OSs, user programs could directly read/write to underlying hardware ports without restrictions. However the newer OSs had prevented this, and only kernel mode apps could write directly to the hardware ports.

The first option explored was to use UserPort, a kernel mode driver. The approach of UserPort is to manipulate the IOPM (I/O Permission Bitmap), so that user applications can be granted permission to directly write to the hardware. It uses a undocumented function (Ke386IoSetAccessProcess in NTOSKRNL.EXE) in order to achieve this.

However the UserPort driver didn't seem to behave correctly on windows 7. It would randomly freeze up the machine upon service start/stop operations. This could probably be a bug in the driver implementation, and not necessarily a problem of the approach, but the fact that a undocumented function has to be used, makes it that much unreliable.

The second option explored was to use inpout32.dll from here. This uses a more elegant approach where the user application calls the read/write of the dll, which in turn uses a embedded kernel driver (Hwinterface.sys) to do the actual hardware read/write (via DeviceIOControl API). The full details of its inner workings are explained here.

However my program in concern was written in java, and the inpout32.dll didn't have the necessary support to directly call it via JNI. One workaround would have been to write a bridge dll with JNI support, which in turn called inpout32.dll. 
The other option was to directly modify the inpout32.dll (since the source was available) to support JNI calls, but luckily someone had already done it here - as jnpout32.dll. This worked right out of the box, solving my problem at hand.



SugarSync - A powerful alternative to DropBox (cloud sync)

I'm currently trying out alternatives to DropBox, which has a (rather annoying) limitation of being able to sync only one folder. Putting everything I want to sync in a single folder doesn't suite my taste of folder organization. Also the free 2GB disk quota doesn't feel sufficient either (you could pay to get more though).

The alternative SugarSync seems to be more powerful with multiple folder sync and more control. Also it offers 5GB of free disk quota which is quite attractive. I have synced 4 devices so far, including my office laptop, home laptop, home desktop, and my Android mobile phone, and all seem to work very well.


SugarSync referral link  (to get me some additional disk quota ;)


Sunday, February 20, 2011

Software Architecture in practice - eBay Design - by Randy Shoup

I found this very interesting presentation (from 2008) about the eBay architectural design, done by Randy Shoup, who is a distinguished architect at eBay.


Presentation pdf file: Download from qconsf.com

He talks about the main forces which drives the architectural design of eBay, which are:
  1. Scalability
  2. Availability
  3. Latency
  4. Manageability
  5. Cost
And the 4 main strategies used to achieve these goals, which are:
  1. Partition Everything
  2. Async Everywhere
  3. Automate Everything
  4. Remember Everything Fails
The presentation runs for about 1 hour, and is very interesting to listen to, until the very end. It contains lots of examples of real-life problems and how those are tackled at eBay.

This is a "must-watch", for any software architect or anyone aspiring to become an architect in the future.

Monday, March 22, 2010

Building a budget Gaming PC in Sri Lanka

Building a budget gaming PC here in Sri Lanka is not so straight forward. This is because advice found on the internet on building "gaming rigs" can't be directly applied here, because of the price differences and non-availability of the components. So if you need to build a balanced gaming PC under a tight budget, you need to do some serious searching.

Here's the system configuration I managed to put together after searching around some shops at Unity Plaza.

Intel Pentium Dual Core E5300 8,500/= (PC Partner)
M/B: Asrock G31m-S 4,500 /= (Barclays)
2GB DDR2 Kingston 800MHz 5,500 /= (PC Partner)
GeForce 9600GT 11,500 /= (Barclays)

This is assuming you already have a basic computer with a HDD and a monitor. If not you'll have to spend some on the following as well.

HDD 500GB 7,000/=
Casing with power supply 3,000/=
Acer 18.5" WideScreen LCD 15,000 /= (almost everywhere)

You can customize these components according to your requirement, but there are a few important points to keep in mind:

* A gaming PC needs to be balanced. i.e. its components should match one another. Having a high end Q6600 quad core processor with a low GeForce 5200 won't game well; Neither will a powerful Radeon HD 4850 coupled with a low 2.0GHz single core processor. You will be wasting the power of the graphics card or the processor.

* E5300 runs at 2.6GHz but can easily be overclocked to 3.0GHz. I've seen gaming centers (cyber cafes) use this in their PCs. The next higher processor would be the core2duo e7500 running at 2.9GHz, which also is a good overclocker, but costs Rs. 14,500/=. For the GeForce 9600 GT, the overclocked E5300 would be quite sufficient, but if you don't mind the extra Rs. 6,000, it's better to go for the E7500. Going for other similar processors such as E5200, E7400, etc. are pointless in my opinion.
The mostly recommended budget gaming processors such as the AMD Athlon II X3, are unfortunately not available in SL.
Core i5 is available in SL now, but is very expensive. The processor+m/b will cost you close to Rs. 40,000/=!

* Asrock m/bs are a good choice because of their tool set for overclocking; and their price.

* You need a minimum of 2GB. 1GB is simply insufficient these days. DDR3 is already here, but we wouldn't really need them yet; Besides they are expensive.

* GeForce 9600 GT is the best graphics card you can find for less than Rs. 12,000/= here in SL. GeForce 9800 GT is better but costs around Rs. 16,000/=. The newer 240 GT comes close to the 9600GT but not worth it's Rs 14,000+. The 250GT is way too pricey. For the E5300 processor I picked, 9600GT seems to be the perfect fit.

* Finally if you need to buy a new monitor, it's absolutely pointless to buy a CRT monitor or a 15" LCD. Just reach out for that few extra bucks and go for a 19" LCD. You will be thankful.

Let me know if you have found better prices / components / configurations.

Happy gaming!