The Java Rocker

I am a 20 year veteran of the IT industry. I have been using both JavaEE and Java SE since 1998. I have developed Web and Desktop applications for a variety of clients in various industries, including the airline and banking fields. I was a tester for Java Studio Creator, and was the first Creator Hero, highlighting my emergency responder application. I have been a presenter at the JavaOne conference, and I earned the 2008 JavaOne rockstar award which highlights outstanding presentations. I am currently a Java trainer, presenter, and consultant in the Cincinnati area, and the owner of JFrets, an open source guitar teaching and tablature creation application. I am a guitar player for The Stone Bunnies and bass player for G.P.S.

The Great Ubuntu Experiment

Friday, October 29, 2010 by Matt Warman

I recently blogged about our move to virtualized desktops. Well the saying that being a pioneer means getting arrows in your back is not entirely true! I have taken the plunge and have swapped out my work PC of 5 years to run Ubuntu. If you are a hard core Linux application development person, this post may be familiar, but as long time Windows user I was cautiously optimistic. Disclaimer, I have been a long time proponent of open source software and a fan “from afar” when it comes to the Linux desktop. I have used Linux and UNIX systems in the past, so the terminal learning curve was slight. This really isn't about the terminal, but all about the desktop, and how productive I can be. For the Windows based application development people and management unaware of Ubuntu, the desktop has a clean, simple feel, similar to Windows, but easier to manage. Instead of on desktop, I have four by default, so I can different applications in different spaces. What you know as the system bar is now a small strip at the top. Your chat and email notifications are in the upper right hand corner. This actually catches my eye better, Instead of a start button, the applications are in the upper hand corner. Linux applications have package information, so they can be grouped into categories. This makes finding specific programs much easier than Windows. I don't have to periodically go through the start reorganize anymore. I personally like a clean desktop, but for those of you who want shortcuts, you can do it in Ubuntu. Some applications can be found in the Ubuntu software center, a library of Linux packages. There are hundreds of apps to choose from, each within a category. You can search for specific titles too. All of the major technical applications have Linux versions, and I had no time finding and installing MySQL, Netbeans, and the VMware player. Ubuntu comes with Open Office 3.2, and Firefox 3.6, so I can surf and and open my Word document with ease. It found our work network, so I had access to all of our files. I have Wine, the Windows emulator installed, but I don't have any Windows applications running. Really, if I need that, I can use a Windows VM. As for the productivity, well my Windows application friends you'd be jealous. It takes 20 seconds from pushing the button to start to actually doing something on the desktop. It used to take 5 minutes. I had to change my routine, as I could start my machine and get some water downstairs before I could do work. My boss saw me open the Domino client in 10 seconds, down from the minute plus, and even he was impressed. I get updates daily, but I usually don't have to restart the system. Shutdown takes 5 seconds instead 2 ½ minutes. It's been 2 weeks since I switched, and I haven't missed Windows at all!

JavaFX and Visage

Wednesday, October 6, 2010 by Matt Warman

The big news out of JavaOne this year was that JavaFX script was not going to be used in the next version of JavaFX, but rather baked into the Java APIs. For application development people, this means that you can just use JavaFX directly in your project, without a separate compiler. I am guessing that this will make data binding easier, and help the adoption rate of Swing application development people. JavaFX 2.0 probably won't be out until next summer. For those of you that already have used and enjoyed JavaFX Script, fear not. The code has been forked and been given a new name: Visage. What's interesting with Visage is that the mission is not only to keep the language alive, but to fix the issues and make it a first class language. Discussions on Visage are going on right now. If you ever wanted to get in on the ground floor of a language, now is definitely the time. Your suggestions and efforts can directly shape a language! I hope to see you on the discussion boards.

Get Healthy

Monday, October 4, 2010 by Matt Warman

In an earlier blog post, I wrote about the dangers of working in IT. It is very important for application development people and really anyone who has a desk job to get regular exercise. My shocking moment was when I went to London with my son, and I saw myself walking across Abbey Road. There I am, and my “overhang”! To put more fuel on my weight fire, my boss is doing P90X. He has dropped several pant sizes and is looking good. To figure out how I was to lose weight, I did what all good application development people do, I observe what works for others. I recently read (and saw his picture) that Drew Carey lost 90 pounds in 8 months. His secret for his weight loss was getting on the treadmill for at least 30 minutes everyday, and eating broccoli. I looked at people who run regularly, and they are skinny! So I decided to run and eat broccoli. My diet currently consists of an apple in the morning, turkey for lunch, a banana in the afternoon, a protein shake after my run, broccoli, a small dinner, and maybe some skinny cow ice cream. This may be too much for some, but try these simple things to start: drink water instead of soda pop. Swap out a candy bar with a piece of fruit. As for the running, I go six times a week. I created a “course” at an executive park by my house. My first time, I barely got through a half mile. It doesn't really matter how far you go, just set a goal for yourself. Every day I wanted to go further, and eventually my course became three quarter of a mile. I found this Android app that is my favorite and most useful piece of software I have used. It's called Cardio Trainer. It uses GPS and Google Maps to track your running. It keeps track of you distance, time, and calories burned. I save my workouts, and now I have a history of my runs! In six weeks I am up to 16.5 miles a week while running three 5Ks in my training. I have lost at least 12 pounds (I am sure I have added muscle to my legs). My “overhang” has dramatically decreased, I have more energy, I sleep better, and I feel happier. The point of my story is that we application development folk need to get up and do something. If you have bad knees, try swimming. Find something that will make you active. Set a reachable goal, achieve it and set another one. I want you guys to hang around and read my stuff!

The Virtual Desktop

Friday, September 24, 2010 by Matt Warman

I know some of my application development colleagues my say “heard it”, but a virtual desktop is cool! We are currently running Windows XP as our company standard. We moved our 9 physical servers running Windows 2000 on ancient (and failing hardware) about 2 years ago. Most of our clients are currently on XP, but some are looking into moving to Windows 7, and one is going to Vista. When my application development friends stop laughing, they are doing this because they have certified their testing with Vista, and they will have to re-certify with Windows 7. They want to move to Vista now, and move again in a year or two.
We can just follow the Windows upgrade path, but given the success of virtualizing our servers, my boss gave me the green light to review our desktop strategy. Some application development and management people would say why? Well it gives us flexibility in what we can do. If we just move to Windows 7, and our clients are still on XP, then we are too ahead of the curve in terms of support. We do have some XP only development tools, so why not just keep them on their OS? With a virtualized desktop, we can run any OS we want. If our clients want us to run specialized software, we can set up an OS just for that client. The other big change is that we are using Ubuntu 10.4 as our host operating System. This is to reduce the memory requirements, but it has other great side effects. Our consultants can learn (at least the basics) of a new OS! If they are under constraints, they can fire up their Windows VM and get to work, or they can do the basic stuff (surfing, checking email) on Ubuntu. In time they can learn how to install packages and other tasks without disrupting productivity. The can even use Windows 7 and learn it too. The best side effect (for management anyway) is that we can still get a lot of mileage out of our 5-7 year old laptops. Our laptops have 2 gigs of RAM, so even if we went pure Windows 7, we would have a performance hit, especially when you fire up an IDE like Eclipse! The more I play with Ubuntu, the more I like it. I will probably use it as my main OS, but others can use XP, Vista, Windows7, or whatever we can virtualize. Choice is a great thing!

On The Front Lines of The Great IT Wars

Tuesday, September 14, 2010 by Matt Warman

On of the big things all application development people know (and I guess business development people know as well), is how their department is treated by management. This battle has been raging since companies decided to have an IT department. The perfect company would have an IT department that supports the business goals and objectives, and can scale and change quickly. I can hear some application development folks laughter already. It can happen. Management needs to let the IT department make the decisions on the software, hardware and infrastructure. IT must understand the business needs, and managements' objectives. The business needs to articulate their needs, and help IT understand the business concerns. In balance, all departments fulfill their roles and the business grows. I have seen some companies that at least understand this principle, and try to implement it, but most companies have one side dominating the other. I will highlight the major factors for the Great IT Battle.

Management treats IT as a cost center – That is correct only if you are an accounting firm. IT brings great value to any organization by streamlining your business processes, which gives you your competitive advantage. I think that more than justifies the cost.

Business “owns” the IT department – This is very common where the business was mature before IT was around. Management came from the business, and doesn't understand that IT is a separate department. IT cannot scale and maintain their infrastructure, so once every 5 – 7 years there is a project like the Big Dig. If you like complex, over budget projects, continue in this manner.

IT “owns” the business - This is  common with organizations that see growth when they added IT. Usually this is caused by management thinking that IT solves all of the problems. IT supports the business. You still need a business plan and a vision.

Political battles between the three – This is the crux of the issue. Management usually comes from the business side, so when in a political battle, IT loses. Unless management views IT as the “magic bullet”, then IT wins. All political battles boil down to my next point:

Risk aversion - an executive at one of my clients pointed this out to me. All of the executives are the winners of many years of political battles. Any decision made is with the idea that they are near retirement, and will not make any drastic change that could hurt their position.

There are a lot of other factors that nuance these scenarios, so your view to the struggle is unique. We at STAR BASE would like to know where you are in this struggle by taking a brief (17 questions on 1 page) survey. STAR BASE can help your organization call a truce to the Great IT wars.

New JavaFX Features

Thursday, September 2, 2010 by Matt Warman
Even though I was critical of the JavaFX's owner, I still think it is a great language that Java development people should consider using. The ability to make ordinary applications special is really cool. The latest version of JavaFX (1.3.1) has been out for a couple of months. I was on assignemt until recently, so I just now have been able to get to the new stuff, and  it is really cool. JavaFX has had CSS in the background, but it was used inconjunction with the making controls Skinnable. It was a bit confusing and tedious, but useful to make your controls pop. That has been replaced with a using CSS to not skin your controls, but creat custom skins too. For Example I wrote this as a splash screen:


The star is a polygon:
var star = Polygon {
        layoutX: 30
        layoutY: 10
    points : [40,10, 48,30, 68,30, 54,44, 62,64, 40,54, 18,64, 26,44, 14,30, 32,30]
    fill: Color.RED
}


With CSS, I can create a star shaped button like this:
#star.button {
     -fx-shape: "M 50,5 L 37,40 5,40 30,60 20,95 50,75 80,95 70,60 95,40 63,40 Z";
     -fx-base: red
}


and use it in my application like this:
var star =  Button {
    id: "star"
    translateX:35
    translateY:30
    layoutInfo: LayoutInfo {
         width: 250
         height: 250
    }
}


it may seem the similar, but by using CSS you can resize and modify the behavior the star. Easy Code resue without "cut and paste".

New Controls

The controls haven't been finalized, but are available to you. Primarily the use of menus and menuItems. This is great for application development folks porting over their old Swing applications. I was really looking forward to these controls, and they don't disapoint. Since I have been using JavaFX, I have been thinking of ways other than menus to present information. I guess its a familiar metaphor for many users, so it is welcome. There is a new Grid container, which is the precursor to a full blown table. It lacks the maturity of a JTable, but allows you to dynamically create rows. You can use the Grid as a Table holder, or just to align labels and text boxes in an input form. The other control I have been using is the ChoiceBox. There has been a swing combobox available, but this is a native control. It uses a checkbox to display your selection in a list. There are still some issues though, as you can only display text, and the list is not editable to the user.

ChoiceBoxes in a Grid Layout

Open Sourcing JavaFX
The issue I have with the ChoiceBox demonstrates the need to open source JavaFX. I can't change the display unless I have access to the source. It is important that application development has access to code for just these situations. There is a petition headed by Steven Chin to do this. Any Application developemnt person who wishes to sign the petition can go here: steveonjava.com/petition-to-open-source-javafx/

Oracle Vs Google = No JavaFX On Android

Thursday, September 2, 2010 by Matt Warman
One of the coolest languages for me to come out is JavaFX. I have been one of many application development people who wished they could write an application that could run on multiple platforms and devices. Finally, The Java development world has one in JavaFX. The one glaring area where JavaFX doesn't run is in the smartphone arena. The iPhone runs on objectC, and Android uses Java code, but the code is compiled using Dalvik, Google's implementation of a JVM. So Java code gets compiled to run on Android only. Google created their own JVM for performance reasons. Sun/Oracle hass addressed the issue since Google released Android (better, but it still needs work), but Google has put too much work into Android to go back, even if they wanted to. Certainly, it sounds like the Microsoft case, where early in Java's life, Microsoft Embraced and Extended Java in their J++ offering.  Microsoft's version was to run in Windows only. Sun sued and won, leading to Microsoft creating C#.  This case is different in couple of respects, First off, the Language itself is not being changed. Secondly, You are free to write your own JVM implenetation. IBM uses their own implentation. Whatever the outcome, this will hurt JavaFX the most. JavaFX is the youngest of the RIA languages (compared to SilverLight or Flex). JavaFX early on claimed that it could run on Android, but I haven't seen anything recently. It makes great sense to have a JavaFX/Android combination for both companies because the urge to learn objective C is lessened, application development folk can port their JavaFX applications to millions of new users, and JavaFX now has an intriquing use as language for smartphones, attracting more application development people. It could even replace Flash as a dominant RIA language. Instead of working with Google, Oracle decides to throw its IP around for what purpose? Is Oracle even competing with Google in any key area? It's not like Oracle didn't know of Android. Rather than cooperate and try to lure more development people to your platform. you alienate your best partner on something that is not your core business. If Oracle thinks they can charge developers to use Java, they have bigger problems. The only hope for JavaFX is that it gets open sourced. There is a movement afoot, so it is possible

Why? Because that’s The Way It Is!

Friday, July 30, 2010 by Matt Warman

If you thought your job as an application development person is difficult, try being a consultant. I love my job as a consultant because I am able to affect change, that is, when people want it. The most dreaded phrase a consultant can hear is “that’s the way it is”. Those words have no rebuttal, no further review. It’s the organization’s way of saying “talk to the hand”! My job is to find gaps in code or process and bring them up to the client. Often times the client has fallen into way of doing things that are counter productive, or more likely, have not changed since the process was in place. A case in point, I was having a discussion with an architect about code review. I noticed that they had the Legacy style user, date, and change comments at the top of their classes. I made a review comment that they weren’t necessary, because Subversion tracks the changes for them. It was due to their work process that comments would be lost by Subversion on multiple merges. I mentioned that several high profile companies use Subversion and don’t seem to have a problem. The architect said that research was performed and it doesn’t, and if I have a better solution, I should do my own research before making a comment. I told him that software does indeed improve, and that if research has been done, it should be reviewed periodically to see if the issue had been fixed. I did research the issue, and Subversion did have bug but was fixed, and my client could use comments in their merged code. The key here is that the staff complains that changes don’t get done, but when they are in a position to make it better, they don’t do it. If anyone investigates a new technology or work process it should be DOCUMENTED AND REVIEWED! I don’t know if it will be investigated because it seems like a trivial issue, but the main problem is that the application development people complain that nothing changes. It’s our Culture. Culture is people, and all people, especially application development people can change culture. If there are deprecated methods and TODOs in production code, bring them up in your code review. I don’t accept “that’s the way it is” as a reason. You can’t change a decision for business reasons easily, but you can fix how things get done. If I don’t like the way that it is, I make it better.

Phone Questions and Blog Roundup

Friday, July 23, 2010 by Matt Warman

I have been writing a lot about phones recently. What application development person wouldn’t be excited about the new smart phones? I will talk about that later, but first, the news!  My colleague Aaron Whitenberger has been interviewed about his role as a Certified Business Analysis here at STAR BASE.  If you didn’t know there was such a thing, you should read it now. I wrote my take about Google VS Viacom. Google spent 100 million dollars to defend their right, and it didn’t even go to trial. Vicacom is appealing, of course. The price of freedom is very steep.

Now on to my phone questions! A Java application development  peer my client site refuses to get a Android phone because of “market fragmentation”.  “I like that iPhone is walled off, but it’s on ATT”. He loves his blackberry, so maybe he doesn’t need it. This post from Slashdot  seems to support his case. My questions to you are why did you get a smart phone? Did you consider the operating system when you got your phone? Which would you rather choose, a fragmented but open system where you can get any type of app but could have bloatware, or an operating system ruled by a “benevolent dictator” which strictly controls your hardware and software, but you are free of bloat issues? I choose Android because of its openness. I do have the technical skills to root my phone to remove bloatware if I need to. Some people can’t or don’t. I think Apple went down this road before, and I think you will see Android be the market share winner. Let’s see if Google can do better than Microsoft in maintaining some control of  the platform, but still give 3rd parties the tools to innovate.

The Value of Communication

Monday, July 12, 2010 by Matt Warman

There are many skills needed as an application development person to be successful, but none more important than communication. In fact, that is point of our job, to be able to communicate to our peers, partners, and customers. I believe that most organizations make money in spite of the immense lack of communication. Most of the application development people I know complain more about the policies and procedures than about anything else (although it’s always something!). Aren’t policies and procedures communication? Certainly, but it’s the internal communication that enables and drives the external communication. Everything we do has an impact on our ability to communicate. Say the wrong thing to a journalist, and you will be removed. Miss that deadline, forget about the promotion. Governance is important for the security of communication, but when do these rules get reviewed? Ask any software development person or manager why, and the answer usually is “that’s how we do things here”. The real answer is that someone set that restriction to an event that happened long ago, and nobody is willing to change things. If communication is the life blood of an organization, why would we restrict the life blood arbitrarily?  If this sounds like your organization, maybe you need to review how you are handling your communications. If you need help, STAR BASE Consulting has years of experience triaging your life blood, and making it flow easier, better, and stronger.

Phone from England

Tuesday, July 6, 2010 by Matt Warman

I wrote in my last post about looking forward to using my phone in England. Well, I am back (It was wonderful) to tell all of my application development people and friends about my experience. It was a bit of a struggle to get my phone unlocked. I had just unlocked my G1, and when I purchased my new phone, my provider said that they only allow a phone number to be unlocked once every 90 days no exceptions. I understand that, as unlocked phones are very desirable on the open market, but I want to use my phone. After not taking "no" for an answer several times, a workaround was found. Once landing in England, finding a phone provider was easy. Unlike the US, you have to purchase your phone at full price, and then select a provider. Sure, you don’t get a cheap new phone, but you aren’t saddled with a poorly operating service provider either. My first stop was at an O2 store by my Tube (London underground) station. They were very helpful, even though they couldn’t provide me with a plan. They suggested I go to T-Mobile, and even gave me directions! I would like to know from my application development friends if they ever had helpful service from their phone provider. I went to T-Mobile, and got my SIM card. This is a pay as you go card. I got the card and put 5 pounds for use. Since my phone is not available in the UK yet, I got to show it off. I also got the free international rate of 5 pence (about 8 cents) a minute to the US. My roaming charges would have cost me $1.49 a minute. The data plan was 1 pound a day for unlimited surfing at about 10 MPS. That was much better than $15 per Megabyte usage. How difficult was it to switch networks? I just swapped out SIM cards and it was ready to go. I was able to use Google maps (with turn by turn walking directions), get tube updates, and find places on the Internet. It was the fastest my phone had ever worked. I had used up my initial 5 pounds, so I went to Tesco (like CVS or Walgreens) and added another 5 pounds there. Super easy! Now, if I go back, I have everything I need to use my phone. On my return trip I swapped my SIM card back to my original, and everything worked from home again. I wished the US had this as the competition was on consumer services, and better features and not trying to make it difficult to use your phone or change services.

Roaming the UK

Monday, June 21, 2010 by Matt Warman

In my recent post, I talked about my new phone for my upcoming trip to London. I am excited about my new phone, but not the cost. My carrier charges .35$ per outgoing SMS, .20$ per incoming SMS, and 15$ per MB for data. Since my phone is always “listening” on the Internet, it would cost a lot to actually use my phone in London. I can put my phone in “airplane” mode and use the camera, games, and music capabilities, but why have smartphone and not use its features? Fortunately, the solution is relatively simple. I can unlock my phone and use a pre-paid SIM card while in the UK. For my application development friends who are not phone savvy, let me explain. US phones are “locked” for US usage only. All carriers also make some phone features unavailable to the customer. In some cases, you are charged an additional fee for a feature your phone could perform for free! In this case however, I am unlocking my phone so I can use it on other networks. You may have heard of the term “Jail Breaked”.  This refers to a phone that has been hacked to allow all features on your phone to be used. Some phone manufacturers and carriers don’t like this, and can make your phone unusable, or “Brick” your phone. Unlocking through your carrier is perfectly fine though. Once your phone is unlocked, the second part is to get a SIM card in the country you are traveling to.The SIM card is how the network recognizes you. If you opened your phone and swapped your SIM card with a friend, you would get all of his calls, and he would get yours! You can pick up a prepaid SIM card with a data plan for about 10 pounds (approx. 15$) a week. That’s a hefty monthly bill for a local customer, but it is much cheaper than the roaming plan. Remember, your phone number is different with a different SIM card! I can use my phone features to post messages and images on Facebook, for example, like I was at home. I can communicate with people at home without paying hundreds! I will let you know how this works out when I return.

New Android Phone!

Wednesday, June 16, 2010 by Matt Warman

In a break from my recent posts, I am going to give my application development peeps a review on my new Android phone, a MyTouch 3G Slide. The reason I got a new phone is that I am going to England with my son in a couple of weeks, and I want to use my phone as a camera and video device (and GPS, etc). The G1 can do these things, but it doesn’t have a flash or zoom. Besides, it’s been nearly 2 years since I have switched. Phones have become the new computers; a drastically newer, faster, cooler version comes out every 6 months. I was seriously looking into a Nexus One, but Google makes it too difficult for existing T-Mobile customers. To get a Nexus One, I had to get a NEW line. The T-Mobile representative said I could have folded that account into my existing account, but I couldn’t use my existing phone number with the new phone. That was too many hoops to jump through just to get a new phone. Could I find a comparable phone by T-Mobile? I was in luck, the new MyTouch 3G slides just came out! In specs, the only glaring difference was that the MyTouch doesn’t use a snapdragon processor. One of the other big selling points was that the MyTouch has a QWERTY keyboard. I have big fingers, and I enjoy the tactile feel of a real keyboard. The MyTouch comes with Android 2.1, with Froyo (2.2) coming soon. Some cool new things about my new phone:
3.5 MM jack (My G1 had a proprietary jack)
Larger storage- comes with 8G SD card, accepts up to 32G
Syncing my ITunes library with my phone
Adding movies to my phone

Overall, I am very happy with the speed and features. The only drawback is that my apps didn’t come along for the ride. I think I am going to create a backup on the G1 and try to move them to the new SD card. Hacking type application development people would love Android! The funny thing is that my phone comes with Swype, a new way to type by tracing a line to each letter of a word. It sounds complicated, but it is fast! I don’t need to use my QWERTY to be productive! I can hear my application development friends asking what will I do with my G1? I can now play around with rooting my phone and flashing Cyanogen without worrying about bricking my phone. If my experiments work, my son may be getting a sweet phone!

Youtube Versus Viacom

Wednesday, June 2, 2010 by Matt Warman

For those of you not following geek things, there is a lawsuit going on between Youtube (owned by Google), and Viacom (CBS, Daily Show, Colbert Report). Viacom is angry that some of their content was posted on Youtube. Apparently, there was 63,000 separate items on Youtube that were copyrighted by Viacom. Viacom has been supported with a “Friend of the Court” brief by NBC, BMI, and ASCAP (Basically the RIAA). Google has similar briefs by EBay, Facebook, Amazon, and Yahoo. How does this court case affect me as an application development person? Well, it could determine your web application development. There are many interesting issues here: fair use, piracy, site owner responsibility. The key issue here is for the very soul of the Internet. As you probably know, the Internet was created to share information amongst researchers around the globe. This communications device allows us to share voice, text, audio, and video. This makes it easy to share ideas, even if those ideas weren’t ours. A part of that communication is the same kind “water cooler” talk that everybody has done for years. “Did you see what that talk show guy said last night”? The only difference is now you can post it. This song expresses how I feel, and I have added some pictures to show how it has affected my life.
The media outlets want the site owners to control the content on their site. They claim that Youtube is a content provider, and thus are “stealing” their content for gain. This would be analogous to suing the U.S. mail for getting a threatening letter. We have fair use,  so any signal sent through the airwaves is free for anyone take and use. This meant that anyone who broadcasted, the content could be consumed by anyone. The content providers made money by placing advertisements in the content. Since that time, content providers have been using congress to side step these boundaries by changing the length of copyright, putting "digital" rights on formerly analog content, and pushing for laws that allow content to be controlled by the provider. The large media companies ignored the Internet because there wasn’t any correlation to their business. When companies like Google started to compete for the same advertising dollars, the large media outlets saw the Internet as a threat to their business model, and are now looking to destroy it.
No one is trying to deny content providers money. It was agreed long ago that your work was yours, but eventually it would be owned by the public. That changed when media companies are entirely built upon their own content (just look Mickey Mouse at Disney). Do people take content that doesn’t belong to them? Yes. Are people just posting items broadcasted to make their point, or to inform? Yes. We have to decide as a society whether the Internet is place to allow copyrighted material as a form of communication. NBC found it distasteful that their shows were on Youtube. That’s why they created Hulu.

What do you want the Internet to be, a free (as in liberty) communication device, or a pay-per-view broadcast medium?

 

Know Your Role

Thursday, May 20, 2010 by Matt Warman

I am finding out things at my current client that everyone, including application development people knows; having a process is only half the battle. I have been to organizations where business workflow processes were not in place, and the productivity gains were huge when implemented. But over time, those processes stop getting followed. There are many reasons for this; the IT culture rejects the change, the processes don’t get reviewed in a timely basis and become a burden, and the players forget their role.
My client has a decent development workflow in place. Analyst get requirements from the business units, architects turn the business requirements into technical requirements, and application development people execute the requirements. Managers should manage the process, making sure that the resources are available when needed. I always wondered why top technical guys get passed over for management in favor of PHB (Pointy Haired Bosses), and now I know. It’s that PHBs know their role. Managers are managing the PROCESS, not the solution. Often, technically savvy managers want to work the issue. Software development is a very fluid process, and what works now, may not work three years from now. If you are manager for more than six months, you probably don’t know the correct solution. Regardless, your role is to make sure application development staff are available for the solution designed by the architects. Managers have a right to review the design during the design phase, but once finalized, let the architects and application development people do their jobs.
The same is true for consultants. Yes, they are using older technology, and yes it’s a pain to use, and yes it needs to be updated. Your job is to help resolve those issues within the framework of their organization. Unless you are brought in as a CIO consultant, the choice is probably not yours to make. It may be that the business has urgent needs that supersede modernization. They may not have the technical people to maintain the new code. The organization could be planning to replace the system with a prepackaged application like SAP. Or it could be that the technical staff knows their role, and is waiting patiently for their opportunity to upgrade.

The Secret to Good Performance

Tuesday, May 11, 2010 by Matt Warman

I am now in my second stint as a performance architect. There are many tools to measure performance. Usually there is some criteria like time or memory that is failing. I think most application development people know that the secret to good performance is good code. The problem is that good code is impossible to measure. There isn’t any metric you can show your boss that shows refactoring this class will make the code run faster, or at least will not remove that class from the performance list. Besides we have these new features that need to be added. So how do I make code perform at a high level?
Write unit tests. Make sure that the tests cover all of your method calls. Make sure that your test captures error situations, not just the "happy path". Write your test cases BEFORE you write your code so you can "code to the test". Of course, you need good use cases from your architect and business analyst to write the unit tests.
Comment your code. Make sure your method names describe the function it is performing. Most IDEs add the parameters and returns for you; all you have to do is describe the reason for the method. These are easy things to do. They are boring yes, but when it comes to adding that new feature, or changing a method call, it saves a lot of time when you can run a test to prove that your changes work.
Refactoring. All application development people should learn refactoring. The Java language has changed tremendously in the last 15 years, and your code hasn’t. I think that the Date object has been revamped twice since the 1.x days. New features like annotations and generics may not change the performance of the code, but it sure does affect the readability of the code. Readable, easy to understand code is also easy to maintain and update. It makes a six month project become a three month project. The business always has more projects, so they will be happy. Fewer errors happen, so your boss is happy. You get to solve more interesting problems so you are happy. When you are happy, both you and your code performs better.

Death by A Thousand Cuts

Wednesday, May 5, 2010 by Matt Warman

My client has great code promotion rules. All code that changes gets system tested or it doesn’t get promoted. Code doesn’t change unless it has a bug tracking ticket. You say Matt, that’s great! Why is this a problem? The problem resides in the fact that everyone in IT is stretched to the limit, and deadlines are tight. Application development people are getting the code working with little refactoring, architects struggling to get the analysis piece out and little time for code review, and not enough testers. This situation makes it difficult for performance. As part of the performance team, I can review all of the code, and make some changes, but the problem is that if the code is not a part of the release, it will be impossible to get promoted due to time/resource constraints.
For example, a process was taking a long time to complete because of improper error handling, but the call is not necessary. The proper fix is to remove the call, but the fix going in only resolves the exception. Why? The low priority of the code, coupled with the testing constraints and lack of testers makes these changes common. Some application development people may say, "Well, the code is fixed". True the performance issue is resolved, but there is an unneeded call. If the attitude from application development people is "I would fix it, but it’s too much trouble to test", unneeded code can add up quickly. Extra code is in all projects, but if changes like this or, removing a variable passed to a method, or even changing code to remove unused variables don’t get fixed, the "extras" add up. Not one of these changes significantly affects performance, but all of them will. The solution is to work with management and your application development people to limit "extra" code. This can be done by reviewing and fixing code in your maintenance or enhancement project. Have a "refactoring time" built in to the project plan. The time put in up front will bring great dividends both in performance and future coding effort.

Got Tools? Use Them!

Friday, April 30, 2010 by Matt Warman

I have a new client in Cincinnati. New clients are always interesting because you never know what issues and opportunities you will find. My client seems to have their act together. My application development friends will appreciate their setup; Maven 2 projects with built-in JUnit tests, a code coverage dashboard that show code complexity, code coverage, and Find Bugs reports. Things seem great, them why do they need a performance engineer?

The reason is common; who defines the duties of ITsets the rules. IT and the business need to be aligned to work on the common goals and increase productivity. If IT is too dominant, there is too much focus on technology and the business doesn’t get the tools they need to be productive. If the business unit is dominant, only projects that have a tangible return get done. In this case the business is more dominant, so projects like refactoring code, or cleaning up errors found by software like Find Bugs has a much lower priority. They do happen only if performance is an issue to the business. The performance team is set up like a clean up crew that comes in after the fact, to make things work better. There are coding style forms and best practices, but is up to the each developer to follow them. Since the focus is getting the project done on time, the developers are concerned on getting code that works,not what works best. The performance team is used to fix the worst performance offenders.To be fair, I have been at clients where IT treats the business units as a nuisance. The best tools are there, but little support for the business.
What’s the solution? IT needs select a technology that best suits the solving of business problems. The business should prioritize their issues, but work with IT to plan for fix releases. IT must utilize the tools that they have and encourage the usage of them. If you have the tools, use them!

Getting Some REST

Monday, April 19, 2010 by Matt Warman

After playing with JPA, I realized that I really don't want to directly hit the database from the client, because that would mean opening up the database port to potential attackers. JPA is really great, but either you hit the database locally, you hit the database directly from a remote location, or you access the database through a connection pool. JNDI is the best way to access a server resource, but it needs to be in a server container. I could not find a way to call JPA using a JNDI context from the client. All database servers have some mechanism to accept multiple connections. But besides the obvious security issue, I already have an application server and connection pool. I should let the connection pool do the work, and figure out plan B.

I reviewed all of my options. I am lucky because I can use the latest and greatest since this is all new. I am using Java 1.6, so I can use EE5 or EE6. Most application development people know that EJB has had a history of being complex, and at times, unwieldy. I could call JPA via servlet, but I was concerned about performance. I decided to use RESTful web services to push data to my JavaFX application. Using REST in JavaFX is quite easy, because the 1.2 specification has a HTTP request object. That means I can write all of my access and utility objects in JavaFX, instead of accessing a class library externally. The big drawback I have thus far is that all of the related objects are another link, and another call to a REST resource. For example, if you look up a specific Customer Record using REST, you will get the details in XML or JSON. To get the collection of Orders related to the Customer, the XML returns a link. You must make another call to get another XML/JSON to parse the related information. The parsing process would not be to big of a deal, except that everything is done asynchronously. I have a Table A object where one of the fields would be a collection of Table B objects. The Table B object contains a collection of Table C objects. In JPA, all of the related collection objects are there and ready for me. Since REST is asynchronous, It makes it very difficult to set up a Table A row object, because Table B is a separate call which will start and finish without Table A's call knowing anything about it. For my database application development people, the key is to de-normalize your relationships. Since this is a big departure to my original schema, I decided to create a whole new database in case I wanted to go back to JPA. After some trial and error, I have a way to asynchronously access and display REST resources in a JavaFX application. I now have to work on writing that data.


Everything Old Is New Again

Monday, March 8, 2010 by Matt Warman

This post may shock you... the Java Rocker is going to talk about legacy iSeries and AS/400! Before you panic, and call it the end of the world, let me continue. This post is about running all of the cool new Web 2.0 things on your IBM hardware. Really! Even in Cincinnati! Many people, (myself included) thought the old IBM hardware was only for RPG and COBOL (shudders). It turns out that IBM has been adding functionality to run Linux on the box. That means Wikis, Ecommerce, blogs, and web applications are now there for iSeries-AS/400 people. The catch is that your iSeries needs to be up to date, which sadly for most organizations is not. My IT consulting colleagues at STAR BASE are good with taking your tired old hardware and doing the maintenance necessary for the modernization piece. They get your hardware and software cleaned up and ready, so I can help you with all of the cool new application development projects that I have been talking about.