Showing posts from February, 2012

Online Businesses in Greek and Stool Samples

According to this article, Greece is a particularly difficult place to start an online business:Antonopoulos and his partners spent hours collecting papers from tax offices, the Athens Chamber of Commerce and Industry, the municipal service where the company is based, the health inspector’s office, the fire department and banks. At the health department, they were told that all the shareholders of the company would have to provide chest X-rays, and, in the most surreal demand of all, stool samples.For the sake of all that is decent, I really hope this is an error in translation or understanding, or a plain exaggeration. Thank goodness I didn't start Poker Copilot in Greece.

What I'm Cooking for Dinner Tonight

PETER SINGER'S DAL RECIPEINGREDIENTS:1 tablespoon olive oil2 cloves garlic (crushed/chopped)1 medium onion (diced)1- 2 tablespoons curry powder, to tasteSalt, to taste1 cup small red lentils3 cups water2-3 bay leaves, to taste1 cinnamon stick1 tin tomatoes, (chopped)1/4 cup coconut milk2 tablespoons lemon juiceMETHOD:In a large saucepan, saute garlic til fragrant.Add onions and cook until they begin to soften.Add curry powder and salt, to taste, and cook over medium heat til mixture begins to brown.Add lentils and stir for a minute or so before adding water, the bay leaves and cinnamon stick. Bring to boil, then turn heat down very low and simmer for 20minutes, stirring occasionally.Add chopped tomatoes, and simmer a further 10minutes, until thick. The lentils should be soft and the consistency just liquid enough to pour.Add coconut milk and lemon juice. Stir through, and remove from heat.Serve over rice with lime pickle and mango chutney.

Expensive creation of a Java instance

Execute this code in your Java program:SimpleDateFormat df = new SimpleDateFormat();Here are the consequences:55 distinct methods are called a total of 123 times44 new instances of objects are createdThat is one badly-designed class. And that's before considering the non-thread-safety of SimpleDateFormat that leads it to be probably the #1 cause of concurrency issues in Java programs. And which prevents reusing one instance across an entire application.I sourced this here.