Wednesday, February 21, 2007

log4j.properties

Whenever you use log4j, make sure you stuff the log4j.properties inside your classpath. I always put the file inside the directory, but I forget to put it in the classpath. I then spend a hours wondering why nothing is being outputted into the logs.

Tuesday, February 20, 2007

Install Notify Errors for Motorola Phones

Be careful.... sometimes the url on the install notify for OTA is too long, and it will causes some motorola devices to reject the jad and jar.







Content Delivery [The Wireless FAQ]

906 Invalid descriptor Indicates that the device could not interpret the Download Descriptor. This typically means a syntactic error.

Monday, February 19, 2007

Nokia Cell Phones ignore the meta refresh....

For all you mobile wap developers...



The nokia phones like to ignore the meta-refresh tag.



 http-equiv="refresh" content="5" />

If you need do a long operation for a website like loading email or pulling up data for a report, this tag will be unreliable.



You will need to implement some sort of polling mechanism, where the user clicks on the link manually every 5 seconds to gather the information.



To go through a directory of log files and delete them on unix

for FILE in `find /home/evilsquid/logs -maxdepth 1 -mtime -1 -name *.log`

do

echo $FILE

rm $FILE

done



This is a useful tidbit if you need to do some log file monitoring....



Friday, February 16, 2007

Don't eat my kitty





Chinese animal rights victory takes cats off the menu | Special reports | Guardian Unlimited


Chinese animal rights victory takes cats off the menu


Jonathan Watts in Beijing
Tuesday February 13, 2007
The Guardian

China's nascent animal rights movement claimed a rare victory today after rescuing more than 400 cats that were about to be slaughtered for their fur and meat.

They were saved from a market in Tianjin after a standoff last week between 100 pet lovers and police which left one protester hospitalised.

Until recent years, respect for animal rights was almost non-existent in China, but the country's rising affluence has brought with it a pet-pampering middle class. Activists are becoming bolder, posting video footage of cruel treatment on YouTube and staging protests.

Article continues
In the latest confrontation, 100 supporters of the "Love Kitty" group in Tianjin surrounded a market, where cats and dogs were being slaughtered. Many of the protesters were local people who had lost their pets and suspected the animals had been abducted by furriers. The police refused to support the animal protection group because there is no law in China against killing cats and dogs, and all the animal traders were licensed.

Lu Di, director of the Small Animal Protection Association, said: "The demonstrators were afraid that the killings were continuing behind the closed doors so they made their way inside. They found cats crammed inside tiny wire cages about 10cm [4ins] high. About 80 police officers arrived and there were scuffles. One man suffered a head injury and is still in hospital."

To avoid further clashes, the Hebei provincial government allowed the cats to be taken to Ms Lu's shelter in Beijing. It has been difficult for her small, non-profit organisation to cope with so many mistreated animals.

Thursday, February 15, 2007

Bow Wow





Mother cat adopts newborn Rottweiler - Yahoo! News

The tiny pup, named Charlie by Humane Society volunteers, nurses alongside a jumble of black and gray kittens recently born to Satin, who was taken to the shelter by an owner unable to care for her.

Tuesday, January 16, 2007

how to get the imei for a nextel phone



Every Nextel phone has a unique number that identifies it. Depending on your phone model,
you will need to locate a SIM ID or an IMEI number.





SIM ID phones






















i30sx, i35s,
i50sx, i55sr, i58sr, i60c, i80s, i85s,
i88s, i90c, i95cl, i99cl, i205, i305,
i530, i730, i733, and 2004 NASCAR NEXTEL Cup Series™ phones
1. In a quick sequence, press # * MENU right arrow on your phone's keypad
to pull up the Trace Mode menu.
2. Scroll down to IMEI/SIM ID and press the option button (•) under VIEW,
or press OK to display your IMEI and SIM ID.
3. Add a zero to the end of your SIM ID for the complete, 15-digit number.



stolen from





http://www.nextel.com/registration/wiz_info_imei-sim.shtml

Adding unix services on startup

As root run:



/sbin/chkconfig --add mysqld



then run



/sbin/chkconfig --list to check

Monday, January 08, 2007

Should I do it? Should I modify my old controllers to make a xbox 360 controller?

http://www.gamersreports.com/article/24/

Launching new blog

Hey folks!



I am launching a new blog at evil pufferfish.com!



please visit and click on links! Add a link on your blog please!

Thursday, January 04, 2007

Good Log4j documentation

This page here has good log4j documentation.



http://www.vipan.com/htdocs/log4jhelp.html



I usually do not need to modify my log4j.xml very often, but it's often pretty hard to find good documentation.



Monday, January 01, 2007

Happy New Year!

Happy new year everyone!



I'm amazed it's 2007 already. I am such a lucky person, my amigos and wife pitched in and got me a xbox 360!



Anyone on xbox live? what is your friendtag?





Happy new year!

Alert tabby saves family from fire

Timmy the tabby sprang into action by waking his unidentified owner when a mattress caught fire as the family slept early Friday in Cairns in Australia's tropical north.

"The cat was probably the best smoke alarm system ... it was clawing at the occupant's face and got him up and out of bed," Cairns fire service spokesman Robert White-Macfarlane told reporters.


Alert tabby saves family from fire

powered by performancing firefox

Monday, December 11, 2006

If you are using maven to generate your intellij project files, and you get a:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1

make sure you add a slash to all of your basedir variables

${basedir}/

Saturday, December 09, 2006

This is how to run an ant script from a maven pom file. Useful if you do not want to do silly things like rewrite ant scripts.




4.0.0
my-test-app
my-test-group
1.0-SNAPSHOT





org.apache.maven.plugins
maven-antrun-plugin


compile
compile








run





ant
ant-antlr
1.6.5


antlr
antlrall
2.7.4





Saturday, October 28, 2006

CruiseControl verses Ant verses Maven2

This week, I took at look at what CruiseControl and Maven2. I have used ant and customized versions of ant in for J2EE builds for many modules source tree as well as projects with one giant nested ant file.

Here is an overview of what the separate items are:

  • Ant – Build script written in XML that is used to compile and run java projects. Ant build files are simple at first, but easily become more complex.
  • Maven 2 – Build system that forces your source code to live in a directory layout. Maven supports all development lifecycle steps such as development, testing, deployment, versioning, and also remote libraries. This is definitely very complex.
  • CruiseControl – Continuous integration tool. It will check out all your source files whenever it detects a change and kickoff another build and test. Pretty simple once you have it running.

This is my recommendation.

  • Use CruiseControl for build automation and setting up the nightly builds.
  • Don’t use CruiseControl if you do not needed automated builds.
  • Use Maven2, if you want to follow the best practices for J2EE development.
  • Don’t use Maven2 if your builds are too customized, or the work required to convert to maven2 would be too involved for your organization.
  • Use Ant if your build is highly customized.
  • Don’t use ant if Maven or Cruisecontrol can take care of the functionality that you need
I know that ant, and cruse control definitely have a place in the build environment at my current work. We’ll see if maven2 has a place.

Sunday, October 22, 2006

Webservices Best Pratices

I have used webservices in a variety of ecommerce, enterprise, and mobile development enviroments. I thought of these quick pointers for Webservices Best Pratices.
  • Make sure you version the your web services.
Webservices are often used for integration. Changing any deployed or used webservices will have significant impact on your clients. It would be disastrous for the method signature or data returned by a web services to no longer match.
  • Use asynchronous model for web services communications.
Often webservices will perform some sort of business operation, which may take a significant amount of time to process. This time taken for processing introduces delays for users of your service. To prevent applications from use either a publish and subscribe method or a callback.
  • Use caching for heavily accessed web services.
On certain web services, I have developed would be called millions of times per day. Even the WSDL on the apache axis 2.0 is generated dynamically. You might want to cache the data being returned or retrieved to improve the performance of your application.

Tuesday, October 17, 2006

Shortage of Engineers in India

Skills Gap Hurts Technology Boom in India - New York Times: "A study commissioned by a trade group, the National Association of Software and Service Companies, or Nasscom, found only one in four engineering graduates to be employable. The rest were deficient in the required technical skills, fluency in English or ability to work in a team or deliver basic oral presentations."

This is just like the united states. No one can work in teams or speak in english.

Friday, October 13, 2006

Damnit Juliet!

Why do you always win at tetris… My secret practicing with Steve has not helped at all.

1-5

Bleh!

Tom

Sunday, September 03, 2006

Man lives to 112 despite junk-food diet - Yahoo! News: "'He had terrible bad habits. He had a diet largely of sausages and waffles,' Dr. L. Stephen Coles, founder of the Gerontology Research Group at the University of California, Los Angeles, said Friday."

This is my old roomate.