Law & Behold

People around the world have come up with all kinds of strange laws in their efforts to maintain law and order. The following is the list some of the strangest laws in effect around the world

  1. In Thailand, it is illegal to leave your house if you are not wearing underwear – how do they actually find that??
  2. In Switzerland, it is illegal to flush the toilet after 10pm if you live in an apartment – what??
  3. It’s also illegal for a chicken to lay an egg on Friday or Saturday in Israel – and it does then??
  4. Picking your nose on Saturday is forbidden in Israel – what???
  5. In Denmark, attempt to escape from prison is not illegal, however, if one is caught he is required to serve out the remainder of the term – they are really nice people!
  6. In Liverpool, it is illegal for a woman to be topless in public except as a clerk in a tropical fish store, or in a bank if handling foreign currency
  7. In Ireland, it is illegal for a student to walk through Trinity College without a sword – they actually go to college to war?
  8. In Texas, ‘when two trains meet each other at a railroad crossing, each shall come to a full stop, and neither shall proceed until the other has gone’ – and when do they proceed actually?
  9. No man may purchase alcohol without written consent from his wife in Pennsylvania
  10. In Pennsylvania, ‘any motorist driving along a country road at night must stop every mile and send up a rocket signal, wait 10 minutes for the road to be cleared of livestock, and continue’ – I am not going to that country with my bike! never
  11. In Paulding, Ohio, a policeman can legally bite a dog to quiet him – eek
  12. In Oxford, Ohio, it’s illegal for a woman to strip off her clothing while standing in front of a man’s picture – no comments!!
  13. A man cannot go outside wearing un-matching jacket and pants in Carmel, New York – what?
  14. In Cresskill, New Jersey, cats must wear three bells to warn birds of their whereabouts
  15. It’s illegal for a husband to make love to his wife if his breath smells like garlic, onions, or sardines in Alexandria, Minnesota. The wife can, by law, force her husband to brush his teeth
  16. In Michigan, a woman’s hair legally belongs to her husband. Consequently, she’s not allowed to cut her own hair without her husband’s permission – of course.. I mean this should be implemented all over the world.
  17. All dogs are required to have their hind legs tied during the month of April in Massachusetts – and why is that so?
  18. Carrying an ice cream cone in our pocket is prohibited in Kentucky – poor boy
  19. In Natoma, Kansas, it’s against the law to practice knife-throwing at men wearing striped suits – hey, give me a break
  20. In Zion, Illinois, it’s illegal for anyone to give lighted cigars to dogs, cats, and other domesticated animals kept as pets
  21. In Chicago, eating in a place that is on fire is forbidden – and who does that? I mean, its fire all over and you are eating… my last supper
  22. In Kenilworth, Illinois, rosters must be at least three hundred feet away from any residence if they wish to crow- now rules are for the animals also… poor guys
  23. It is illegal for a cab in the city of London to carry rabid dogs or corpses
  24. It is illegal to die in the Houses of Parliament in the UK – if somebody dies… hang him till death..?
  25. In France, it is forbidden to call a pig Napoleon
  26. Under the UK’s Tax Avoidance Schemes Regulations 2006, it is illegal not to tell the taxman anything you don’t want him to know, though you don’t have to tell him anything you don’t mind him knowing – I don’t have any problem you knowing everything… So I don’t tell you anything!!
  27. In Ohio, it is against state law to get a fish drunk – fish… drunk… how… why???
  28. Royal Navy ships that enter the port of London must provide a barrel of rum to the Constable of the Tower of London – that guy must be lucky
  29. In the UK, a pregnant woman can legally relieve herself anywhere she wants- even if she so requests, in a policeman’s helmet – eek…
  30. In Miami, Florida, it is illegal to skateboard inside a police station – crazy… is it legal to play golf?
  31. In San Salvador, drunk drivers can be punished by death before a firing squad
  32. In the UK, a man who feels compelled to urinate in public can do so only if he aims for his rear wheel and keeps his right hand on his vehicle
  33. In Florida, unmarried women who parachute on Sundays can be jailed
  34. In Kentucky, it is illegal to carry a concealed weapon more than six feet long
  35. In Chester, Welshmen are banned from entering the city before sunrise and from staying after sunset
  36. In the city of York, it is legal to murder a Scotsman within the ancient city walls, but only if he is carrying a bow and arrow
  37. In Boulder, Colorado, it is illegal to kill a bird within the city limits and also to ‘own’ a pet – the town’s citizens, legally speaking are merely ‘pet minders’
  38. In Vermont, women must get written permission from their husbands to wear false teeth
  39. In London, it is illegal to flag down a taxi if you have the plague
  40. The head of any dead whale found on the British coast is legally the property of the king; the tail, on the other hand, belongs to the queen – in case she needs the bones for her corset

There are much more, some weirder than others. It is really amusing that these kinds of rules exist.

Advertisements

10 Commandments for Java Developers

 

There are many standards and best practices for Java Developers out there. The article 10 Commandments for java Developers outlines ten most basic rules that every developer must adhere to and the disastrous outcomes that can follow if these rules are not followed. Briefly summarizing the 10 commandments:

  1. Add comments to your code. – It is true comments do not literally contribute to the functionality of a program. But time and time again you return to the code that you wrote two weeks ago and, for the life of you, you cannot remember what it does!
  2. Do not complicate things.Developers tend to come up with complicated solutions for the simplest problems. We introduce EJBs into applications that have five users. We implement frameworks that an application just does not need. We add property files, object-oriented solutions, and threads to application that do not require such things. For those who do not know any better, I recommend reaching out to the more experienced programmers for advice.
  3. Keep in Mind – “Less is more” is not always better. Code efficiency is a great thing, but in many situations writing less lines of code does not improve the efficiency of that code.
  4. No hard coding please. Developers often forget or omit this rule on purpose because we are, as usual, crunched for time. But maybe if we had followed this rule, we would not have ended up in the situation that we are in. How long does it take to write one extra line of code that defines a static final variable?
  5. Do not invent your own frameworks.There are literally thousands of frameworks out there and most of them are open-source. Many of these frameworks are superb solutions that have been used in thousands of applications. We need to keep up to date with the new frameworks, at least superficially. One of the best and most obvious examples of a superb widely used framework is Struts. This open source web framework is a perfect candidate to be used in web-based applications.
  6. Say no to Print lines and String Concatenations. I know that for debugging purposes, developers like to add System.out.println everywhere we see fit. And we say to ourselves that we will delete these later. But we often forget to delete these lines of code or we do not want to delete them.
  7. Pay attention to the GUI. No matter how absurd it sounds; I repeatedly observe that GUI is as important to the business clients as functionality and performance. The GUI is an essential part of a successful application. Very often IT management tends to overlook the importance of GUI. Many organizations save money by not hiring web designers who have experience in design of “user-friendly” applications. Java developers have to rely on their own HTML skills and their limited knowledge in this area.
  8. Always Prepare Document Requirements. Every business requirement must be documented. This could be true in some fairy tale, but it is far from that in the real world. No matter how time-pressed your development is, no matter how tight the deadlines, you must always make sure that every business requirement is documented.
  9. Unit-test. Unit-test. Unit-test. I am not going to go into any details as to what is the best way to unit-test your code. I am just going to say that that it must be done. This is the most basic rule of programming. This is one rule that, above all, cannot be omitted. It would be great if your fellow developer could create and execute a test plan for your code, but if that is not possible, you must do it yourself. When creating a unit test plan, follow these basic rules:
    1. Write the unit test before writing code for class it tests.
    2. Capture code comments in unit tests.
    3. Test all the public methods that perform an “interesting” function (that is, not getters and setters, unless they do their getting and setting in some unique way).
  10. Remember – quality, not quantity. – Do not stay late (when you do not have to). I understand that sometimes production problems, urgent deadlines, and unexpected events might prevent us from leaving work on time. But, managers do not appreciate and reward their employees because they stay late on regular basis, they appreciate them because they do quality work. If you follow the rules that I outline above, you will find yourself producing less buggy and more maintainable code. That is the most important part of your job.