Tuesday, December 28, 2010

Books I've read in 2010

I mostly read online articles/blog posts to keep me up to date. I read books whenever I get a chance. Below are some of the books which I've read this year.
  1. First, I finished reading the books I was in the middle of reading in 2009 - Programming Groovy and Eclipse - Building Commercial quality plugins. My comments about these books can be found from my last year's post.
  2. Java Puzzlers - This is one of the classic java books written by Josh Bloch and Neal Gafter. It has lots of java puzzles which are very interesting and I learned a lot about the intricacies of the language from this book. If you think you know Java very well, try solving the puzzles in this book and it would make you rethink about it. I highly recommend this book to any java programmer and I'm sure everyone (even if you have lot of experience in Java) will learn new things about the language from this book.
  3. The Mythical Man Month - This is one of the classic books on Software Engineering and Project Management. This book was originally published in 1975 and republished with few more chapters in 1995, but almost all of the things explained in this book still hold good. The classic saying "9 women cannot produce a baby in one month" comes from this book and the author says this to explain that adding more programmers to a delayed project will not make it faster. Some of the ideas presented in this book are explained in the wiki page of this book. I highly recommend this book to any programmer, more so to anyone who manages a project, be it a Development Manager or Project Manager.
  4. Design Patterns: Elements of Reusable Object-Oriented Software - I have been using design patterns in my code for several years now and mostly learned design patterns by reading online articles and blog posts. I have read this book on a on-demand basis in the past and always wanted to read it completely. Finally, got chance to read it completely this year and it was a good refresher to many of the design patterns and I also learned few new ones. I don't need to tell about this book, as it is a Classic Design Patterns book and is a must read for any programmer.
  5. 97 things Every Programmer Should Know - This book is a collection of thoughts on things which every programmer should know and has many nice ideas and tips. If you are new to programming, I'm sure this book will open your eyes. Even if you are someone with several years of experience, I'm sure your time will still be well spent reading this book and you will learn useful things. You can also get an online version of the contributions appearing in this book.
  6. Agile Software Development with Scrum - This is a basic book on what Scrum is and explains the concepts very clearly. One of the authors of this book is Ken Schwaber, who is one of the co-founders of Scrum. I have been using Scrum more more than 3 years now and have been ScrumMaster for most of this time. I have read parts of this book few years back and so wanted to read it again and it made some of the things more clear to me. I highly recommend this book to anyone interested in Scrum. If you are thinking about starting to use Scrum, but not clear about it or it's benefits, then this is the book you need to read.
  7. Kanban and Scrum - making the most of both - Kanban and Scrum are different Agile project management methodologies. This book explains about Kanban and Scrum - it's similarities and differences and how to use them together to get the advantages of both. You can get an online version of this book from InfoQ. You may have to register/sign-in first before downloading the book. I recommend this book to anyone who is using Scrum or Kanban or any other Agile management methodologies and is a must-read for any ScrumMaster.
  8. Agile Retrospectives: Making Good Teams Great - This book is the bible for Agile Retrospectives and is written by Esther Derby, who is well known for her thoughts on improving retrospectives. This book presents many techniques on how to gather data and generate insights in a retrospective. It also presents ideas on how to decide which ideas to implement immediately. This book offers good advice on how to lead retrospectives and is a must read for anyone who leads the retrospectives, mainly for any ScrumMaster. We used some of the ideas presented in this book and they worked great. We also plan to use more techniques presented in this book in upcoming retrospectives.
Looking forward for a very exciting year 2011. Wish everyone a very Happy and Prosperous New Year!

Monday, December 27, 2010

Managing dependencies in Maven

Managing dependencies in Maven, particularly managing the transitive dependencies and versions of the dependencies used can sometimes become a daunting task. Thankfully, there are some maven plugins and other resources to help in this. Just thought of sharing them in this post.
  1. Intro to maven dependency management - An intro to maven dependency mechanism can be found here (http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html). This article gives an introduction about transitive dependencies, dependency scopes and dependency management in maven. This is a must read for any maven beginner.
  2. Maven dependency plugin - You can find the goals and documentation for it here (http://maven.apache.org/plugins/maven-dependency-plugin/). The goals that I use frequently are dependency:resolve (resolves the dependencies and displays the versions used), dependency:tree (resolves the dependencies and displays them in tree structure - an easy way to find out which dependency brings which transitive dependency etc.,), dependency:copy-dependencies (copies all the dependencies including transitive dependencies to a specified location). dependency:analyze could be useful too.
  3. Maven versions plugin - You can find the goals and documentation for it here (http://mojo.codehaus.org/versions-maven-plugin/). The goals that I use frequently are versions:display-dependency-updates (tells which dependencies use the latest versions and which ones have newer versions available - could be very useful to see how stale your pom is), versions:use-latest-versions (searches pom for dependencies which have newer versions and replace them with latest version - could be useful to bulk update your pom to use latest version of all dependencies).
  4. Maven Repository Browser - This is a website (http://www.mvnbrowser.com/index.html), which I just encountered today while trying to search for a missing dependency in my pom. POM report (http://www.mvnbrowser.com/pom-report.html) seems interesting. You can copy paste your POM or just the dependencies section and this would tell you what are the available versions for all dependencies in your POM and if you are using the latest one or not. It also lists what other dependencies are in your classpath. Seems like a simple UI version of what maven dependency and versions plugin does. Apart from this, it also lists the licenses involved. I have used this website very little as I just found it, but it seems useful.
I just mentioned the goals I use most. These plugins have many other useful goals as well, which you might want to explore. Try these maven goals in your maven projects and see for yourself the power of these maven plugins. Hope this post introduced you some new things to manage your maven dependencies and pointed you to some good resources.