Some dreams live on in time forever
Those dreams, you want with all your heart
And I'll do whatever it takes
Follow through with the promise I made
Put it all on the line
What I hoped for at last would be mine..
Thursday, December 24, 2009
Wednesday, April 22, 2009
So will the Sun JDK be known as the Oracle JDK in the future?
I guess Oracle could infuse some of the JRockit tricks into the Sun JVMs too.. But I wish IBM bought Sun!
http://www.oracle.com/sun/index.html
http://www.oracle.com/sun/index.html
Sun's Garbage First Collector Largely Eliminates Low Latency/High Throughput Tradeoff
Can't wait to try this with JDK 6 u14!
In a recent podcast, James Gosling highlights the importance of G1 for certain kinds of large-scale Java applications, such as financial exchanges, which are characterised by large amounts of live heap data and considerable thread-level parallelism, and are often run on high-end multi-core processors:
"...the deep hidden secret about many of these Java apps is that they don't really use databases. Instead of databases they use huge amounts of RAM and push the garbage collector like mad because they cannot afford to touch the disk ever. When you are doing many, many thousands of transactions per second it's all about keeping everything in RAM, using hash tables, getting as many cores focused on the transactions as possible, and they usually have big issues about transaction latency."More details: http://www.infoq.com/news/2009/04/g1
Friday, March 06, 2009
Getting back the iPhone!
My first generation iPhone running firmware 1.1.4 hacked to work in Sri Lanka, started to give trouble from a few months back, and taking almost a day of being kept switched off to magically recover! I never understood why a 8hr switch off was different to a 10 minute switch off.. but then again, people even suggest keeping the iPhone in the freezer to make it recover :).. I only tried that for 5 minutes..
Anyway on the 10th of February, I upgraded to the new version 2.2.1 firmware.. and immediately realized I had done something really bad.. by Wifi was not working at all.. I then tried down grading to 2.2 - but still no luck.. then I tried going back to v.1.1.4 by even installing an old iTunes version and downloading the ipsw image files.. but trying quite a lot of hints, I was never able to get my modem firmware downgraded.. it had got to 04.05.04_G and I was stuck! Then things got even worse.. the phone would not ring.. but silently record missed calls.. then I gave up everything, and was waiting for someone to find a fix patiently.. I realized that the phone does ring, when its kept unlocked - but that soon drains the battery.. another option was keeping it connected to the charger.. so I did both of these until today the 6th of March..
.. and today, I felt lucky! suddenly.. I felt my phone ring again!.. and I tried it a few times to make sure.. and yes, it has started to work again :).. then I tried my Wifi.. and thats back too! I hope this will help someone else who is like me to get back their iPhones.. the secret being patience! I'm happy to have a real ringing phone back with me.. and I will not try any more upgrades for a loooong time.. its currently running 2.2.1(5H11), Carrier 2.9 and Modem firmware 04.05.04_G
Anyway on the 10th of February, I upgraded to the new version 2.2.1 firmware.. and immediately realized I had done something really bad.. by Wifi was not working at all.. I then tried down grading to 2.2 - but still no luck.. then I tried going back to v.1.1.4 by even installing an old iTunes version and downloading the ipsw image files.. but trying quite a lot of hints, I was never able to get my modem firmware downgraded.. it had got to 04.05.04_G and I was stuck! Then things got even worse.. the phone would not ring.. but silently record missed calls.. then I gave up everything, and was waiting for someone to find a fix patiently.. I realized that the phone does ring, when its kept unlocked - but that soon drains the battery.. another option was keeping it connected to the charger.. so I did both of these until today the 6th of March..
.. and today, I felt lucky! suddenly.. I felt my phone ring again!.. and I tried it a few times to make sure.. and yes, it has started to work again :).. then I tried my Wifi.. and thats back too! I hope this will help someone else who is like me to get back their iPhones.. the secret being patience! I'm happy to have a real ringing phone back with me.. and I will not try any more upgrades for a loooong time.. its currently running 2.2.1(5H11), Carrier 2.9 and Modem firmware 04.05.04_G
Thursday, March 05, 2009
The Secrets of Housing Loans and Taxation
Ever wondered how much a housing loan would really help you get your OWN house, AND save you tax? Well I've been looking for answers on this topic from many years ago, but was only able to fully figure out everything once I got my own housing loan and tax file some years ago.. All this time I have been secretly giving out information to my friends on this, and today I am going to make it publicly available..
First for some history on this topic, I wrote a tiny Java Script EMI calculator few years back, and its still available on my GeoCities website, which I haven't updated for quite sometime :)
I've also blogged about "How to Get a Loan in 3 days" previously, and would recommend reading it for anyone who is considering this in Sri Lanka
So now for the goodies..
The worksheet has been made available in M Excel format - to support those who still pays Microsoft for software provided free by many others, and is much better most of the times.. It allows you to first key in your EMI details - i.e. how much you want to borrow, how much interest the financial institution is asking for, and the duration of the loan, and then you can calculate your monthly EMI (Equated Monthly Installment)
Search Google for more information on what EMI is and means - its a very fair scheme, where you pay interest for what you really get in a loan. Each month you pay the same amount, but during the start of the repayment, most of this money is counted as interest, and a little as capital repayment, and towards the end of the loan, most will be counted as capital repayment, and less as interest. Thus if you take an EMI loan for 20 years, and pay it for 3 years and want to exit, you still would have to pay back a large sum of the amount you've borrowed - but hey - its a FAIR calculation.. a bank is not your relative, to give you free money!
Next, enter your salary details, and see how much you will save as Tax. BUT this comes at a price.. you will need to open a Tax File and ask for a salary direction to your employer, so that PAYE tax will not be deducted from you each month.
A Tax file is like a Driving License in Sri Lanka, they never expires :).. so thereafter, each year you WILL have to send your tax information to the Inland Revenue Department. These people sometimes even ask people who has died to keep filing tax as well, probably to cover up the massive VAT fraud the officials of this department helped themselevs into. But then again, officials in Sri Lanka rarely resign, even AFTER they are found guily by the supreme court!.. but we know of one who had to bite the dust finally!
So finally .. here is the goodie I promised.
http://people.apache.org/~asankha/personal/Salaries_and_Tax_DEMO.xls
Please let me know if you have any corrections, or suggestions for improvement.. and feel free to share it with others, but please do respect the copyright notice and the name of the original author.
First for some history on this topic, I wrote a tiny Java Script EMI calculator few years back, and its still available on my GeoCities website, which I haven't updated for quite sometime :)
I've also blogged about "How to Get a Loan in 3 days" previously, and would recommend reading it for anyone who is considering this in Sri Lanka
So now for the goodies..
The worksheet has been made available in M Excel format - to support those who still pays Microsoft for software provided free by many others, and is much better most of the times.. It allows you to first key in your EMI details - i.e. how much you want to borrow, how much interest the financial institution is asking for, and the duration of the loan, and then you can calculate your monthly EMI (Equated Monthly Installment)
Search Google for more information on what EMI is and means - its a very fair scheme, where you pay interest for what you really get in a loan. Each month you pay the same amount, but during the start of the repayment, most of this money is counted as interest, and a little as capital repayment, and towards the end of the loan, most will be counted as capital repayment, and less as interest. Thus if you take an EMI loan for 20 years, and pay it for 3 years and want to exit, you still would have to pay back a large sum of the amount you've borrowed - but hey - its a FAIR calculation.. a bank is not your relative, to give you free money!
Next, enter your salary details, and see how much you will save as Tax. BUT this comes at a price.. you will need to open a Tax File and ask for a salary direction to your employer, so that PAYE tax will not be deducted from you each month.
A Tax file is like a Driving License in Sri Lanka, they never expires :).. so thereafter, each year you WILL have to send your tax information to the Inland Revenue Department. These people sometimes even ask people who has died to keep filing tax as well, probably to cover up the massive VAT fraud the officials of this department helped themselevs into. But then again, officials in Sri Lanka rarely resign, even AFTER they are found guily by the supreme court!.. but we know of one who had to bite the dust finally!
So finally .. here is the goodie I promised.
http://people.apache.org/~asankha/personal/Salaries_and_Tax_DEMO.xls
Please let me know if you have any corrections, or suggestions for improvement.. and feel free to share it with others, but please do respect the copyright notice and the name of the original author.
Wednesday, January 21, 2009
Dead men may not tell tales.. But dead JVMs do!
During the last couple of days, I was troubleshooting a critical server crash encountered by an airline, on behalf of a software consulting firm which requested my help. The symptoms were that WebSphere 6.0.2 was crashing with an Out of Memory (OOM) condition, sometimes reaching 100% (or a very high) CPU utilization level in addition. Although you can profile an application with excellent profilers such as JProbe, it becomes much more difficult when you are unable to re-create the issues in any other environment but they keep happening on the live production instances, to which you only have limited access.
Luckily the IBM JVM's generate a Portable Heap Dump (PHD) on an OOM, and has an array of extremely helpful tools to analyze information from heap/thread dumps and and other information offline. Thus it is still possible to detect memory leaks in applications, even when they only occur in live production systems. Sometimes the cause would be heap fragmentation, where even if a considerable percentage of memory is still available, a contiguous chunk of the size required cannot be freed.
The above image shows the IBM Heap Analyzer, detecting a memory leak by the WebSphere DRS / Session Replication, where 923MB of heap has been consumed by 14,011 HashMap#Entry objects held onto by the WebSphere Data Replication Service, used for HTTP session replication.
It is also interesting to look for the use of Xalan 2.6.0 by any application code, as I have at earlier instances found memory leaks that are typically more difficult to trace - but which occurs primarily due to a well known bug in 2.6.0 of Xalan.
Luckily the IBM JVM's generate a Portable Heap Dump (PHD) on an OOM, and has an array of extremely helpful tools to analyze information from heap/thread dumps and and other information offline. Thus it is still possible to detect memory leaks in applications, even when they only occur in live production systems. Sometimes the cause would be heap fragmentation, where even if a considerable percentage of memory is still available, a contiguous chunk of the size required cannot be freed.
The above image shows the IBM Heap Analyzer, detecting a memory leak by the WebSphere DRS / Session Replication, where 923MB of heap has been consumed by 14,011 HashMap#Entry objects held onto by the WebSphere Data Replication Service, used for HTTP session replication.
It is also interesting to look for the use of Xalan 2.6.0 by any application code, as I have at earlier instances found memory leaks that are typically more difficult to trace - but which occurs primarily due to a well known bug in 2.6.0 of Xalan.
Monday, January 05, 2009
A project for Christmas 2008
During the last Christmas holidays, I wanted to use my vacation time to build a corner sofa set for use at home.. however, due to many unexpected obligations, I couldn't finally find any time for it.. So this year, I got a deadline to either build it before the 24th, or to buy it! Since I finally had to get someone else to build the pantry cupboards (which I wanted to do - if I had the time) as well, I decided not to let this opportunity pass by.. after all, I am working as an independent consultant now, and it was holidays around the world anyway!
So I started to look for a simple software to design the structure, the Google Sketchup came in very handy! I also used the measurements I took some time ago from the corner sofa set bought for the WSO2 office in Colombo. I had to spend on the fabric, wood and the foam and it cost around the equivalent of $500.. it took about a week to come into shape, and finally my wife helped with the sewing of the fabric and the cushions. I did stay up all night on the 23rd, to ensure that everything was ready by the morning of the 24th :)
Here are some pics taken during the construction.. if you need the Sketchup files, let me know
Finishing off with padding and foam..
Making the frame..
Cutting the wood.. with the use of support 'templates' to get correct edges with the circular saw..
Subscribe to:
Posts (Atom)