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.

Sunday, October 3, 2010

Effective Leadership/Communication skills needed for a Manager

Recently, I got promoted to a development manager and being primarily a technical guy before, I'm trying to improve my leadership/communication skills. Below is my personal notes (gathered from various sources) on the qualities to possess to become a great manager.
  1. Technical Subject knowledge - Need not be expert in all areas, but need to understand things well enough to make better decisions.
  2. Be assertive, not aggressive though.
  3. Be cool under pressure.
  4. Competent.
  5. Integrity/Honesty.
  6. Ability to delegate tasks.
  7. Conduct meetings effectively (proper agenda, starting/ending on time, insisting full participation etc.,).
  8. Empathy - Understand and relate to individual's issues.
  9. Body language and tone is important (sometimes more than content).
  10. Tone is very important in meetings, conference calls and even on the email.
  11. Smile (even on the phone) helps a lot.
  12. Different people in the team want/appreciate different things. Need to understand that and communicate appropriately. There is no one way to communicate to a big diversified team.
  13. Create a positive atmosphere for the team and promote collaboration.
This list is not comprehensive by any means and just serves as a reminder/personal note to me at this point, so that I can improve in these areas. Just thought to add it as a post, in case it might help someone else. If you have other points, feel free to add comments.

Key Points for any Project (Traditional or Agile)

I'm using Scrum for the past 3+ years and have been ScrumMaster for most of this time. I embrace and advocate Scrum, but last week, I attended a FredPryor Seminar on project management, mainly to better understand the similarities and differences between traditional project management and Scrum. This also helped me in appreciating how basic project management skills applies to any industry. I want to highlight some of the common basic points which came up in the seminar, which are important irrespective of which methodology we are using.
  1. Kick-off meeting is important when starting projects (or Sprint in Agile) - I see this as similar to Sprint Planning in Agile. Everyone involved need to get a clear idea on what they are building.
  2. Team buy-in from the very beginning is critical.
  3. Brainstorming with the team on topics is important.
  4. Everyone (Team, Management, Stakeholders) agreeing on specific, realistic goals is important.
  5. Clear project definition and scope is very important. Avoid scope creep.
  6. Be SMART when defining a project (or Sprint in Agile) - Specific, Measurable, Achievable, Realistic, Timely.
  7. Risk Assessment - Understand constraints between Time, Cost and People. Often, when risk comes the trade-off is between one of these.
  8. Progress - Gantt-Chart in traditional project management becomes Burndown chart in Agile (at least on the high level).
  9. Meetings - Need to have team meetings on time, in regular schedule with a specific agenda. Full participation of team is important. Also, need to respect other's time and end the meeting on schedule. Finally, need to take meeting notes and follow up promptly.
  10. Team working collaboratively is very important. This will create a co-operative and productive atmosphere.
  11. Start the project with self-esteem and end it with self-esteem (for the team).
  12. Always recognize the team and celebrate success.
  13. Review all outstanding issues after the project (or Sprint in Agile) is done and see what can be improved - Similar to Sprint Retrospective.
I understand the differences between Traditional and Agile and how Agile improves the success of the project. But, still there are many basic things that apply to any project management methodology. Many of these seem like common sense, but if we think about it, lot of these are not being practiced in our day to day projects. I'm sure following these points will surely improve the success rate of any project. I just listed some of the points, which comes to my mind at this time. If you have other points, feel free to add comments.

Sunday, June 13, 2010

New Features in Eclipse 3.6 (Helios)

There are many interesting features coming up in Eclipse 3.6 code named as Helios . Below, I will discuss about some of these features which I came across.

Java/Plugin Development:
  1. Reports missing @Override notation if a method overrides a superclass method and has the notation missing. This only works for 1.6 code. Previously, we only had warnings when we added @Override but did not override a superclass method, but now this works the other way also. This would be helpful in removing the possibility of accidentally overriding a method.
  2. Variables view now has a new column (accessible by Layout->Select Column) to display the instance count of the variable.
  3. Package names in Java views can be customized by setting rules in Preferences->Java->Appearance->Abbreviate package names preference. For example, org.eclipse.ui can be mapped to {UI} etc.,
  4. Users can see source of UI contributions using ALT +SHIFT +F3 in IDE. This is very similar to what PluginSpy used to provide, but now this functionality is provided by the platform. This also means that our Eclipse RCP application can expose this functionality to end users.
  5. -consoleLog program argument is now added to launch configuration of Eclipse applications by default. This argument prints errors in Console view that normally go to ErrorLog to console. This would be very useful to debug Eclipse RCP applications.
  6. Console view now has option to open as OSGi console. This console is useful for plugin developers and can be used to interact with OSGi framework.
  7. "Add Artifact to Target Platform" dialog allows users to search a set of repositories for dependencies and add them to target platform.
  8. Resolving dependencies (similar to above point) is also available via quick fix, when there is a missing imported package.
  9. It is now possible to export contents of target platform to destination directory. You can get to this wizard by doing File->Export->Plug-in development->Target definition.
  1. Clients can now set an overlay image to Taskitem using TaskItem#setOverlayImage(Image).
  2. Clients can now set an overlay text to TaskItem using TaskItem#setOverlayText(String). Setting overlay image and text can be useful. For ex, this can be used to indicate the result of an operation which user kicked off in the application.
  3. Clients can now set the progress of an operation to TaskItem using TaskItem#setProgressState(int).
  4. Example for the above functionality can be seen in this snippet.
  5. Clients can now set the menu to application TaskItem using TaskItem#setMenu(Menu).
  6. Jobs progress can also be shown in Platform task bar. See this bug for more info on the API.
Eclipse Help :
  1. Help UI footer can be customized by using the preference org.eclipse.help.base/footer.
  2. Help topics can now by sorted using sort attribute in toc and topic elements.
  3. Table of contents and help contents editors now report XML errors.
  4. Table of contents and help contents editors has spell check functionality.
  5. New extension points introduced to allow addition of buttons and frames to Help UI.
  6. "See" entries can now be added to Help index. i.e when user searches for a word, the results would appear and along with it "See" entries can also be displayed to direct users to related topics.
Install Wizard:
  1. Install wizard is now grouped by license. This means we no longer have to select each item and accept the license.
  2. We can now do compare in installation history i.e we can select any two installations from history and compare them by clicking on the compare button.
Intro page:
  1. Intro page can now have news feeds from multiple RSS news readers using EclipseRSSViewer.
Local History:
  1. Users can now disable local history cleanup. This might help in faster shutdown since local history cleanup need not be done, but local history size would keep growing indefinitely.
Release Schedule:
  1. All 7 milestone releases and release candidates are done.
  2. Final release expected on June 23rd.
The features mentioned here are just a small subset of the features coming up in new release. I just mentioned few which I came across and was of interest of me. This post gives detailed notes on what is added in each of the milestone releases.

Saturday, June 12, 2010

Changing Eclipse RCP application workspace

We are developing an Eclipse RCP application and we wanted the default location of workspace to be under user's home directory and not under current directory (which is the default). By googling, I found that I can use -data program argument. But, when I put that option in .ini file it did not work. Some posts said that I should put the path argument after data in double quotes for it to work. But, that is not true either.

Finally, it turned out that I should specify the path in the next line after -data. Specifying the path in next line is the key here. So, in your application .ini file, it should look like:


Also, make sure that this (or any other program argument) appear before vm arguments.

But, we did not want to hardcode the path and instead wanted to point it to users home directory. For this, you could use:


This program argument can also be supplied as command line parameter. For example, eclipse.exe -data @user.home/MyAppWorkspace would work. Also, this could be supplied in the shortcut target in windows, if the application needs to be launched using double click.

In your RCP application, you can just specify these program arguments in "Launching" tab in your application .product editor. When you export your product, it will put the appropriate entry in your application .ini file.