As mk1975 says, 4 hours is very good. Battery technology is improving – it used to be recommended that rechargeable batteries were fully discharged rather than partially discharged, before re-charging to avoid ‘battery memory effects’.
But whenever you are operating the laptop via the mains, the battery is being kept fully charged – so such a strategy in nigh on impossible to implement.
My advice is to use the laptop on the most convenient power source (battery or mains) – and accept that sooner or later the battery will give up. No particular usage pattern is likely to give a significantly increased/decreased battery life.