29 October 2009

What would you call the enemy of innovation?

/dev/null : Weblog
I was interviewed recently on the topic of innovation as part of the Oracle Innovation Showcase. Reading back through it, I liked this question and answer:

Q: What would you call the enemy of innovation?

A: The first is complacency. A lot of people are satisfied with what they have. If you can convince yourself you're satisfied, you'll stop looking for a better solution. The other is an inability to listen and appreciate the complexity of a problem. Everyone wants to believe they have the answer before the question even gets asked. People don't take the time to listen and appreciate the individual complexity of each customer's problem and the nuances of their environments.


26 October 2009

Centos 5.4 released

Manuals/ReleaseNotes/CentOS5.4 - CentOS Wiki
yum clean all
yum update glibc\*
yum update yum\* rpm\* python\*
yum clean all
yum update
shutdown -r now


19 October 2009

DriverMax to to automatically download Windows drivers

Downloaded DriverMax today and it found quite a few drivers on my laptop that needed updating even though I have Windows Update switched on.
DriverMax is a new tool that allows you to download the latest driver updates for your computer. No more searching for rare drivers on discs or on the web or inserting one installation CD after the other. Just create a free account, log in, and start downloading the updates that you need.


18 October 2009

Google Collections MapMaker

Google Collections MapMaker - referencing http://www.javaperformancetuning.com/news/news105.shtml
Google commons ConcurrentMap builder, providing any combination of: soft or weak keys, soft or weak values, timed expiration, and on-demand computation of values

IntelliJ IDEA Community Edition

IntelliJ IDEA Open Sourced | JetBrains IntelliJ IDEA Blog
Starting with the upcoming version 9.0, IntelliJ IDEA will be offered in two editions: Community Edition and Ultimate Edition. The Community Edition focuses on Java SE technologies, Groovy and Scala development. It’s free of charge and open-sourced under the Apache 2.0 license. The Ultimate edition with full Java EE technology stack remains our standard commercial offering. See the feature comparison matrix for the differences.

OnlineOCR Converts Your Scanned Documents to Editable Text - Conversion - Lifehacker

OnlineOCR Converts Your Scanned Documents to Editable Text - Conversion - Lifehacker
You can upload documents in a variety of formats like PDF, TIFF, JPG, and other image files as well as a ZIP of your document.

Selecting the Best Java Collection Class for Your Application

Selecting the Best Java Collection Class for Your Application - referenced from http://www.javaperformancetuning.com/news/newtips104.shtml
* With CopyOnWriteArrayList all operations that change the contents of a CopyOnWriteArrayList collection cause the underlying array to be replaced with a copy of itself before the contents of the array are changed. Any active iterators will continue to see the unmodified array, so there is no need for locks.
* HashSet is faster than TreeSet, so only use the TreeSet preferentially when you need elements to remain in sorted order.
* HashSet is faster than LinkedHashSet so only use the LinkedHashSet preferentially when you need elements to remain in insertion order.
* ConcurrentSkipListSet keeps it's elements in sorted order and is thread-safe and usually preferable to a synchronized wrapped set.
* With CopyOnWriteArraySet all operations that change the contents of a CopyOnWriteArraySet collection cause the underlying array to be replaced with a copy of itself before the contents of the array are changed. Any active iterators will continue to see the unmodified array, so there is no need for locks.
* PriorityQueue add and remove methods take time that is proportionate to the number of objects in the queue. Queues based on the PriorityQueue class do not block. PriorityBlockingQueue is similar in performance but does block.
* For situations when multiple threads are waiting to perform operations on a queue, the behavior of an ArrayBlockingQueue object will be more consistent and predictable than for a LinkedBlockingQueue.
* ConcurrentLinkedQueue is thread-safe and usually preferable to a synchronized wrapped queue.
* DelayQueue is a specialized blocking queue that consults the objects it contains as to when they can be removed from the queue.
* A SynchronousQueue object is always empty; the put method blocks unless another thread is waiting for the object's take method to return.
* If you are not interested in how objects will be organized in a collection, then the only other consideration is performance. In that case, use the ArrayList class. It is fast and makes efficient use of memory.

Continuous Performance Testing

Continuous Performance Testing - referenced from http://www.javaperformancetuning.com/news/newtips104.shtml
* Industry has learned the hard way that holding a big testfest at the end of the development phase of a project is a great way to ensure failure - this applies equally to performance testing.
* Avoiding premature optimizations has been confused by some as avoiding performance aspects of a project altogether, only focusing on it when it becomes necessary - this is wrong. You need to consider performance at all stages, or you are setting yourself up for failure or much more work later on.
* During requirements gathering phase you need to collect users expectations for performance.
* During architecture defining, you should use benchmarking to determine that your decisions will not prevent your architecture from meeting your performance goals.
* During development you should integrate Continuous Performance Testing to your system so that you can gain an understanding of how your system is progressing.
* Performance testing at unit test level (i.e. method level) isn't completely wrong, but is a level of granularity that isn't advisable.
* Performance testing during development should be done at an appropriate level of granularity: at the component level, or possibly at the class level for some types of classes.

Dilbert: Deadlines

Causes of Java PermGen Memory Leaks « Amped and Wired

8 Monkeys

8 Monkeys | Gleez
Put eight monkeys in a room. In the middle of the room is a ladder, leading to a bunch of bananas hanging from a hook on the ceiling.

Each time a monkey tries to climb the ladder, all the monkeys are sprayed with ice water, which makes them miserable.

Soon enough, whenever a monkey attempts to climb the ladder, all of the other monkeys, not wanting to be sprayed, set upon him and beat him up.

Soon, none of the eight monkeys ever attempts to climb the ladder.

One of the original monkeys is then removed, and a new monkey is put in the room. Seeing the bananas and the ladder, he wonders why none of the other monkeys are doing the obvious. But undaunted, he immediately begins to climb the ladder.
All the other monkeys fall upon him and beat him silly. He has no idea why.

However, he no longer attempts to climb the ladder. A second original monkey is removed and replaced. The newcomer again attempts to climb the ladder, but all the other monkeys hammer the crap out of him. This includes the previous new monkey, who, grateful that he's not on the receiving end this time, participates in
the beating because all the other monkeys are doing it. However, he has no idea why he's attacking the new monkey.
One by one, all the original monkeys are replaced.

Eight new monkeys are now in the room. None of them have ever been sprayed by ice water. None of them attempt to climb the ladder. All of them will enthusiastically beat up any new monkey who tries, without having any idea why.

This is how any company's policies get Established.

Interns and HR

Javva The Hutt July 2009 - Java The Hutt
I had an intern last week. No, not for my lunch, actually doing stuff for me. The company decided to fork out all of a whole unused seat and workstation, an actual security pass, and an actual system account for this intern to do a week of work experience. No pay for the poor blighter, not even expenses to cover transport costs. It was just one week, I was amazed that he actually got onto the system, whenever I've seen new employees come in, it's usually taken the best part of a week just to get them setup. But our one-week intern was properly on the system on day one. Email and internet access and all he needed! I think we have a rogue monkey.

A rogue monkey? Well, in every big organisation I've ever been in, it takes a week to get people setup. It shouldn't, realistically after the company sets up a few employees, someone should say, 'golly, these are all the things you need to do to setup a new employee, and look 99% of it can be automated, so here, I've done that, now you just need these half a dozen pieces of information entered on this screen, and press the button and presto, it's all done'. But that's not company policy, so anyone that does that gets beaten up by the other monkeys. I am, of course, referring to the parable of the eight monkeys (if you've not heard of it, web search 'the eight monkeys', it's worth reading).

So I can only assume that given our intern was up and running on day one, nay not even day one, but actually immediately after Monday morning induction, that somehow a rogue monkey has slipped in and got the bananas. Congratulations unknown rogue monkey, I am sorry to say that your career here is likely to be short. And will involve being beaten up by the other monkeys when they find you got the bananas. That's life.

Anyway, knowing that I had the use of an untrained newbie for a week, I thought to myself 'what on earth can I give him to do to keep him out of my hair and busy'. After all, interns rarely provide anything useful even when they do the three month internship, what could he do in a week? So I looked through the very bottom of my retired to-do lists, you know, the ones you've given up even bothering to list since you are only going to get to them on your fifth life. And I gave him those to do. Comparative analysis of performance products, resolutions to simple issues that need no knowledge, just a bit of time spent on the internet, that sort of thing. And just in case he was fast (you never know), I gave him enough for two weeks worth of work.

By the end of Wednesday he had finished the lot. And quality work too. He found out stuff that would make us more efficient, that would improve the quality of our work. I wanted to hire him, but HR did their HR job of saying no, we can't have efficiency. Maybe I should just start my own company. At least now I know who'd be employee number 2.

05 October 2009

Monitoring direct buffers : Alan Bateman

Discover and Promote What Works

Discover and Promote What Works
The thrill of greenfield development is enticing. It's the mark of a young developer to want to invent (for example) their own web framework the moment they discover something they don't like in existing web frameworks.

It doesn't sound at first to be as exciting, but finding something that works and promoting that gives you the thrill of success (rather than just the thrill of invention). I don't know about you, but I'm finding success to be much more attractive than exploring for the sake of exploration. Indeed, I'd rather not have the glory of raw invention; I'll happily trade that in for success, and I'll happily credit the person who made that success happen. Stand on the shoulders of giants, and all that.

Seth Godin says this might be the most important concept in Tribes. His example is even more compelling: societal change. Rather than going into a village with some Westernized idea of how to solve a health problem, you "find the mom with the healthy kids ... then help others in the village notice what she was doing."

This is a subtle but compelling mental shift when seeking answers. One of the biggest aspects is that it isn't about coming up with some argument to convince people that something will work. There is no argument about whether it will work -- you can start doing something because you know it works, and later you can argue about what exactly is producing the success, presumably in an attempt to refine the process (or you can refine by discovering other things that work).

Note that this is a "natural selection" process. You allow the equivalent of genetic mutation to produce lots of solutions and choose the one(s) that work rather than assuming you can use logic and first principles to invent a solution (not that the latter approach is bad per se; rather we are over-fixated on it as the only way to solve problems).