Learn by intuition
This is a very nice article by Steve Yegge.
One click resizing of browser window in MAC
One problem I faced with my new MacBook Pro was not being able to maximize, minimize (or custom size) and re-center the firefox window with a click of a button. So I found some interesting tips online and finally came up with this solution (more…)
Serving fast and effective static content
With AJAX becoming more and more popular most of us, developers, have to deal with static content like Javascript, CSS, IMG, XML etc… sooner or later. To improve the overall performance of the web application HTTP specification provide guidelines for caching the static content on the browser.
Caching is very good because the browser doesn’t have to query for the static content for every page request. Most popular browser like IE, FireFox, Safari, Opera first check their local cache for the static file/resource and only if they don’t find do they make a request to the webserver for the same.
With this arises a problem! What if I needs to update one of these static files? Can I force a browser to let go of the old cached instance of the same?
Well the answer is, the infamous, it depends
(more…)
Anemic Domain Model Illustrated
One thing that keeps coming back to me time and again, something that people often misunderstand, at least in my opinion, is Anemic Domain Model. Martin Fowler wrote an excellent article about this but I would like to illustrate, as I understand, what best describes an Anemic Domain Model through an example.
Stripping off domain logic from Domain Model is what is “Anemic Domain” and as Martin Fowler said, quote domain logic is the antidote to domain anemia unquote. (more…)
MySql Master Master Replication
I have been wanting to setup MySQL Master Master configuration, for a project I have been working on lately, for a while and finally got my hands dirty and got it done. Its quite easy and there are tons of tutorials out there describing how to do it. Let me point out that there are many ways of achieving this. This is just my experience and not really a full fledged tutorial.
The main reason for doing this is for HA
Here is what I had
1. Clean database (no previous data to deal with)
2. Two clean instances of MySQL 5.0.27 running on separate machines (Host A and Host B)
3. Host A is running 6.0.6 and Host B is running Fedora 5.0
Step 1 (Setup the system)
- Make sure you are able to ping Host B from Host A and vice-versa.
- Make sure that you are able to reach port 3306 on Host B (or whatever port your MySQL is configured to run on) from Host A and vice-versa. If there is a firewall configured then make sure to allow the port MySQL is running on. (ex: MySQL -h hostB -u username -p password)
- It is recommended to have same versions of MySQL running on both the machines, if possible. Otherwise you’ll have to run some additional steps (not described here) to create this configuration. (more…)
