Saturday, October 22, 2011

Occupy Toronto

I had just finished eating dinner at Urban Herbivore in the Toronto Eatons Center, and was walking home.  I passed by Nathan Phillips Square (Toronto City Hall) and saw the Occupy Toronto protesters lining up to parade down Queen Street.  I wondered what they were protesting about because this is Canada, not the USA or Europe.  Other than the auto workers union, I'm not sure that anyone noticed the recession in 2008 or now.  It's like nothing happened here in Canada other than rising food and gas prices.

The parade began with a pickup truck and loud speakers.  A transsexual was expressing "her" frustration about how nobody will accept that he is a she.

Next there were a ton of people holding up signs about how the rich should be taxed more.  Who is rich? Am I rich -- the middle class person making a bit more money than average? Even if you are talking about the hundred millionaires and  billionaires, are they the real root of the problem? I don't think so.

There was also someone holding a sign asking why we pamper cats and dogs, but eat pigs.  The sign was telling people to become vegan.  I became vegan earlier this year for many reasons, including the point she was making.  I just don't think Occupy Toronto is the right platform to make this statement. How about Toronto Rib Fest?

Also in the parade was a woman dressed up like a clown walking her pet Styrofoam lizard, teenagers dressed up like zombies, people on drums, and a guy wearing a Canadian flag with a marijuana leaf instead of a maple leaf.  He was shouting nonsense in a megaphone.

Up to this point I was completely disappointed in this protest because holding up signs that say "Corporate Greed" or "higher taxes for top 1%" isn't going to have an impact.  All they have succeeded in doing is to convince me that they don't understand what's really going on. I can't say that I do either, but I am trickle fed bits every day on infowars.com

There was ONE guy handing out flyers.  I looked at his flyer, and it was clear that he was the only person who really understood what the protest is about, or what it SHOULD be about (in my opinion). I've scanned and posted it below:


Monday, May 30, 2011

Why I Am Vegan

This video shows the factory farming norm, not exceptional cases:



Farmers & Slaughterhouses: YOU PEOPLE ARE SICK!!! Nothing you can say justifies this. Period. There are many better ways you can make a living and earn a higher income.

Meat eaters: Think of the animals when voting with your wallet. Every time you eat meat or animal products such as dairy, you are justifying what you saw in this video to satisfy your taste buds.

I've been taking vegetarian cuisine classes one evening a week at George Brown College in Toronto for the last six months. I've learned a lot of recipes and know there are tons more. There is a lot more to being vegan than salad and steamed vegetables. I eat a lot of delicious foods and have a lot of variety in my diet. I've been ALMOST meat and dairy free for months now and feel just as good or better than I did before -- probably because I'm eating a healthier diet now.

Any time I feel the urge to eat meat or other animal products, all I have to do is watch a video like this one to remind me why I chose to be vegan.

Sunday, October 17, 2010

Java's biggest threat is Microsoft

I've never been one to believe that languages like Ruby, Groovy or Scala are going to be a threat to Java the language and platform.   I think the real threat is the .NET platform. 

I have a friend who works for the Canadian Federal Government in IT.  He says that Microsoft sales people are phoning the decision makers every week or two offering huge incentives to migrate to the Microsoft platform (Windows and .NET).  They are offering huge discounts, practically giving the stuff away, and sometimes they do give things away.   Microsoft is succeeding because the government is starting to use .NET more.

Another friend of mine, also in IT, works pretty high up at the corporate headquarters of a major bank. 70% - 80% of their systems are written in Java.  Within the last couple of years they brought in consultants to help them decide which current Java technologies to focus on.  Initially they chose Hibernate / Spring / Wicket, but later I heard they changed their minds and went with iBatis / Spring / Struts 2.  Meanwhile, Microsoft has been calling their decision makers frequently offering deep discounts to switch to the Microsoft platform.  Someone at the very top of the bank made a decision to rewrite EVERYTHING in .NET. Legacy systems, recently developed systems, and new systems.  All Java programmers had to learn .NET.  Why? They looked at the cost of upgrading their WebLogic and WebSphere application servers and doing some maintenance work on one of their applications.  The cost was going to be $1M - $2M.  They were able to complete the project in .NET for $150K, so they decided that Java is too expensive.  I also heard something about a lawsuit that made it impossible for enterprises to use open source application servers like JBoss and Tomcat, which was another major reason they switched.  WHAT??  Did this information come from Microsoft?  I am unaware of this lawsuit.

Another friend who works in London England said his company had a mixture of Java, PHP and .NET programmers.  The company wanted to consolidate onto one platform and they chose .NET. He said the main company HQ was a Microsoft shop, and his satellite office was the only one using Java and PHP.

The same thing is happening at my company.  We currently use five programming languages, and it looks likely that we will consolidate on .NET.

Here is a list of reasons why I think a company would choose to switch to .NET:

1) The company has some reason to only buy middleware from companies like IBM, Oracle, and Microsoft.  If they want to run on WebLogic or WebSphere then they are going to spend a TON of money which gives them the impression that Java is expensive.  This has never been a problem for JBoss, GlassFish, Resin and Tomcat customers.  You can use these products for free, or buy support for much less than WebSphere or WebLogic. Upgrades don't cost anything.  In my eyes, Java is not expensive.

2) The Java programming language has stagnated over the last 4 - 5 years. .NET has pulled ahead with closures, lambda expressions, properties, LINQ, WPF, etc.  Knowing that these features are coming to Java, this doesn't really bother me.  Java FX 2.0 is Java's answers to WPF & Silverlight, and we'll have a production release by JavaOne 2011.  Closures and lambdas are coming in Java 8 (2012). At JavaOne 2010 they hinted about the possibility of adding properties to Java 8.   I'm not sure if we'll ever see LINQ, but that's not enough to make me abandon the entire Java platform. 






3) Too much choice.  For every decision you have to make there are many choices of libraries and frameworks.  You have to spend a lot of time and effort to evaluate all of the options.  This has fragmented the Java community into several religions.   If you want to hire a Java programmer, you have to make sure they have experience with your choice of technology stack.   In .NET land, the King (Microsoft) has made all the decisions for you. Just use it.  In Java, there is a King (JCP) who tries to make decision making easy by providing standardized APIs for everything imaginable like in .NET, but the mistakes from the past have tarnished many developers' view and support of the King, so some choose to ignore anything and everything he has to offer. Then they have to wire together a plethora of libraries and frameworks before writing their application which is difficult and time consuming.  I choose JCP standard APIs and open source Java EE application servers, so decision making and ease of use is not a problem for me

4) Politics. There's nothing you can do about this other than being well informed to try and sway the decision.

I hope Oracle and IBM realize what is happening and do something NOW.

Monday, September 27, 2010

Vacation in San Francisco - Part 1 of 2 : JavaOne 2010

I just returned from an incredible one week vacation in San Francisco. The primary purpose of the trip was to attend the five day JavaOne 2010 conference, but I also spent a couple of days touring the city and Bay area. I'll cover my after conference activities in a separate blog post.

This is the first JavaOne since Oracle bought Sun. It was moved from June to September to coincide with Oracle's existing OpenWorld and Oracle Develop conferences, but managed to keep its identity by being held at a separate venue. It was clear that the conference organizers tried very hard to please us, and I think they did an excellent job. The conference hotels were all together on a block, upscale, clean, and were well run. It was a bit disorienting at first but I eventually figured it out.


New to JavaOne was the Oracle Customer Appreciation Event on Treasure Island. It's hard to find words to describe it other than WOW. They bused tens of thousands of people from their hotels, over the Bay Bridge, onto Treasure Island, and then back again. Police had to control traffic the whole way. The event was a carnival with rides and two simultaneous concerts. Unlimited free food, beer, wine, soda/pop, water, etc. On stage #1 (outdoors) there was Berlin, The Black Eyed Peas, and the Steve Miller Band. On stage #2 (indoors) there was The English Beat, Don Henley, and Montgomery Gentry.


While I was waiting in line at the Hilton to catch the bus to the event I made friends with the guys in front of me. AJ and Levon are from a new startup called postup.com. Many years ago, the founder of the company (someone else) invented a technique for online advertising which he sold to another company, who sold it to Yahoo, then was "blatantly copied" by Google (Ad Words). AJ and Levon have previously worked at Yahoo, and AJ worked at Microsoft too. We hung out for the whole night since we didn't really know anyone else. At one point I saw someone I met on Sunday night, and he seemed to be alone. It was Jaroslav Tulach, the original creator of the NetBeans IDE and author of Practical API Design. He was happy to see a familiar face and joined us for the rest of the night. We had some really geeky conversations about modularity and the JDK while The Steve Miller Band was setting up stage. It was really fun being able to meet any random person and start talking about programming; even at a Black Eyed Peas concert.

Speaking of free beer, this year I made a point of finding the conference parties and attending them. The first one was the GlassFish Party at The Thirsty Bear. It seemed like hundreds of people filled two floors, and the beer was free. There was a real who's who of the Java and GlassFish communities at this party. People such as Eduardo Pelegri-Llopart, Alexis Moussine-Pouchkine, John Clingon, Arun Gupta, Roberto Chinnici, Anil Gaur, etc. I finally met fellow members of the NetBeans Dream Team such as Geertjan Wielenga, Adam Bien, Sven Reimers, Tonni Epple, etc. as well as some superstars such as James Gosling (father of Java) and Jaroslav Tulach (original creator of NetBeans IDE.)



Surprisingly it was us NetBeans guys who left the bar last. We ended up at a small bar up the street. What do geeks do in a bar? Whip out laptops and show cool demos of NetBeans, of course.

Hours before the GlassFish party there was a 2.5 hour GlassFish Community Event. To my surprise, my name was listed on one of the Power Point slides as an important member of the community, and the speaker (Alexis) recognized me in the audience and pointed me out. After the talk I met many people on the GlassFish team. They all knew who I am and were happy to finally meet me. They say I ask a lot of good questions on the forums and create good bug reports. I also wrote the tool everyone uses to set up a Windows service for GlassFish V2, and several tutorials related to web services that still generate most of the traffic to my blog. I think we were one of the very first paying customers of GlassFish V2 in September 2007. Eduardo thanked me for my contributions and gave me one of ten printed 5th anniversary posters that has the usernames of all bug reporters in the issue tracker.

I attended the JSF 2.0 Community Discussion led by Ed Burns who is the JSF 2.0 specification lead. It was one of the last sessions of the night so there weren't a lot of people attending, but I would guess around 20. I was surprised to find that I was the only person who had things to discuss other than Kito Mann (jsfcentral.com, book author). The speaker had us write discussion points on large sheets of paper on the wall. Things I remember writing down were:

  • branded screens/skinning in a multi-tenant environment
  • having to write my own radio button component because the built-in one renders them in a table
  • sandboxing the EL context of templates for including user submitted templates in screens and emails
  • multi field validation

I have come up with solutions to all of these problems because I needed to solve them in my projects at work. The speaker asked me to come up to the microphone to discuss some of my bullet points. We mainly discussed multi component validation, but he also mentioned that the sandboxed EL context is a really good idea. Earlier I discussed some of these ideas with him in emails, and he said that he really liked my solution for sandboxing the EL context of templates. After the session I sat down with him for fifteen minutes to chat about the other items in more detail. When I told him my name he recognized it right away and was happy to finally meet me. We discussed the challenges I have with JSF's radio button component and why I think it is important to fix it in the spec. He seemed genuinely interested in my issue and apologized that my 2008 ticket had not been addressed yet. I showed him how IceFaces built a solution that fits in nicely with the existing component and suggested that he standardize that. He said if I can help by implementing it myself in the Mojarra reference implementation, then he can help with the spec documentation and we can get it into JSF 2.2 (because JSF 2.1 is now feature complete.) I don't need to implement the change for JSPs, but would. I think I will do this work and am excited about contributing to the spec. I have a number of other small spec changes that I think would make a big improvement for developers.

Ed encouraged me to come to his session on composite components, so I updated my agenda and attended. He is a very good speaker and gave exactly the kind of technical session that I expect at JavaOne. His presentation was in the code editor, not Power Point. After the session I asked him to sign a couple of his books that I own. His publisher was there and took some pictures us:


Another really good session was Reza Rahman and Debu Panda's presentation on Java Enterprise Edition 6 Testing. I know Reza from online so it was great getting to meet him in person and attending one of his presentations. He is an excellent speaker. He invited me to the Caucho Resin party at a restaurant later that night, so I came. There was a good size crowd of people, mostly ones who visited the Caucho booth in the exhibitors hall. I met many people from Caucho and they were all very friendly. There was free beer and food (lots of food), so thank you! Reza had to leave early because he had another presentation, and I left shortly after to attend sessions as well. What I find particularly interesting about Caucho is that their embedded container can be used for automated testing and it run instantly, whereas the GlassFish embedded container seemed slow (10 - 20 seconds to run a Hello World test.) From speaking with Reza, I also know that they have some great ideas on how to further improve EJB 3.1 and CDI in Java EE 7, and have implemented these changes in Resin so you can try them today. For example, you should be able to add security or transactions to a CDI managed bean without having to turn it into an full EJB. In Resin, some or all of the EJB annotations can be used on CDI managed beans. Unfortunately I didn't get a picture with Reza.

Monday, August 2, 2010

Civic Long Weekend Ends With Freak Accident - Everyone is OK

This year, like every year, I went to the summer cottage for the annual regatta.  There was alcohol, songs by the campfire, BBQ, etc.  Sunday morning I decided to take the canoe out and I brought my dog Bandit.  The scenery and silence was very peaceful. Bandit was hot so I shielded him from the sun with extra life jackets and dripped some cold lake water on his back.  I snapped this picture while we were canoeing:


After dinner I decided to go home.  The drive wasn't too bad and we made it home safely.  After unloading some things into my condo I took Bandit out for a walk.  I let Bandit run to the elevator with his leash dragging behind him while I locked the door.  I got lost in thought while we were waiting for the elevator, and then the door opened.  We entered, I pressed G for ground, then I stared at my sunburned face in the mirror.   A second or two later I heard a thump.  I turned around, and Bandit was gone!  I looked up and to my horror he was hanging by the neck near the ceiling at the top right of the elevator door. My primal instinct was to scream in terror.  I probably screamed two or three times before pulling myself together enough to figure out how to save him.  First I checked to see if his head was still in the elevator because I could only see his legs and body. It was.  Next I lifted him a bit to hopefully help him breath, then I was able to unclip his collar.  He landed in my arms and appeared fine. No choking, no shaking, no whining... it was like nothing had happened.  I could hear people in another elevator saying "What the f*** is going on???" because of my screaming.  The hairs on the backs of their necks must have stood up on end because the way I was screaming made it clear that I was truly terrified... like death was imminent.

When we got to the ground floor the door opened, and Bandit's leash was all wound up in the door jam.  I was able to pull it out easily, then I carried Bandit over to the security desk.  I put him down, re-attached the collar then told the security guard what just happened.  I also told him that if anyone reports screaming, it was me.  A moment later another elevator door opened and a crowd of people came out.  I figure they were the same people that said "What the f*** is going on???".  They probably had no idea it was me as they walked by, or that it is even possible for a man to scream like that :)  My throat still hurts a few hours later.

Bandit seems totally fine.  He pulled me along the walk as usual, didn't hesitate to get back in the elevator, ate some food, drank water, and slept on the floor.  I think I'm more traumatized by this incident than he is!  I will now be very conscious of his leash when using the elevator, and will educate other dog owners about the potential danger.