Wednesday, June 13, 2012

All in a day

- Compiling shopizer on a VPS( virtual private server) absolute pain in the ass. Seems like the VPS blocks some resource leaving the reference thread waiting for some object. Not sure what.   Will have to do some magic if successful  will write it here.

My solution to the problem build the shopizer locally :) and then copy the war to the tomcat on VPS \m/. I want to get my shopizer up and running. Of course you need to give the settings of the vps where you are going to run shopizer when building it locally. hope it runs.

- brings me to the second issue. I have a 75 mb file of the shopizer build which i have to upload to my VPS. I have shitty 3G connection which never lives up to its name. Upload speed it unreliable and the connections keeps on disconnection. My TSP has very weak signals. yes i am awesome in stupidity.

My solution split my file into 75 mb files and upload them as and when i can one by one.

local> split -b 100000 myfile.tar

remote> cat x*>myfile.tar

- On the Java design front. What is strategy pattern. Hehehe. Smart thing you see. Sometimes inheritance doesnot live upto its promise of code reuse in the maintenance phase of any project. When the requirements change in a way that part of subclasses have a property and part of it dont need it. A solution is to create an interface and give the property as interface to the subclasses who need it  but this means a lot of code change and you will have to implement methods in the subclasses. errors bugs increased.
All the changable behaviors should be put in separate class which are then made part of the class as a property.this make the system loosely coupled and dynamic.
A cool feature is that your objects can change properties at run time and truely free :)











No comments:

Post a Comment