August 20, 2007

Aha! Java

Jon Bentley talks about the Aha! Insight in his book Programming Pearls.

I got 2 such 'Aha!s' today :

1) Java does support Short Circuit Operators(or short circuit evaluation)
public class myTest2 {

public static void main(String[] args) {
myTest2 sct = new myTest2();
if (sct.isTrue("left") || sct.isTrue("right")) {
//you may swap the 'left' and the 'right' and observe the behaviour
System.out.println("Expression is true.");
} else {
System.out.println("Expression is false.");
System.out.println("All done.");

public boolean isTrue(String msg) {
System.out.println("in isTrue (arg = '" + msg + "')");
if (msg.equals("right")) return true;
else return false;

2) Loop unrolling leads to instruction level parallelism. But am not sure whether this will have any effect on the way Java is architectured. I presume that stack based architectures(Java/JVM) do not have any effect on ILP.

Any thoughts or Ahas!!!!!

August 07, 2007

Getting Leh'ed

Plans are canceled and am not going to Leh this year :(

August 04, 2007


Seth speaks about Toxic bosses in one of his latest posts...

".....toxic bosses are far worse than toxic employees. Because bosses are often able to define reality, at least for those in their sphere of influence, they can cause whole sections of an organization to go off the rails....."

I would like to add couple of more observations here :

I find that toxic bosses do not only cause the derailing of the system but they infuse a sense of low-morale and inferiority complex in the team (this is among the non-toxic employees.....the dumb ones remain dumb); not to mention the complete lack of direction and doing-things-for-the-heck-of-it syndrome. Now let me change my gears slightly here and direct you to what Scott Adams mentions about smarter people having lesser intercourse than dumb people ; he rationales that

"....dimwitted get so much action is that they tend to be more attractive than smart people.Hot/dumb people are more likely to mate with other hot/dumb people and produce hot/dumb kids...."

Are Toxic bosses byproducts of this observation!!!

Along similar lines... Toxic bosses recruit more Toxic employees(who are essentially dumb) and the virality spread across the entire organization.The generality of the dumbness increases ( and i dont want to think about what happens to the future state of the organization).

Check out Seth's post on Toxic Employees too ;)
Related Posts Plugin for WordPress, Blogger...