Showing posts with label Dev. Show all posts
Showing posts with label Dev. Show all posts

Tuesday, July 01, 2014

Google Guice: Why does it not appear that the @Singleton Annotation is not being respected by the Injector?

This took me a little while to figure out, apparently the Singletons you're injecting are per instance of the Injector. So if you are doing what I was, (creating an Injector in each class I was trying to inject a singleton into), that is incorrect.

Thank you, StackOverflow!

Specify a Block of Code to NOT Run in the NetBeans Form Designer

Sometimes, you will have code in the constructor of a Swing form that you do not want to execute when opening the form in the NetBeans form designer. I recently had this problem when working with Dependency Injection using Google Guice. Opening the form in the designer resulted in an exception with a call stack about 80 levels deep.

To avoid this problem, do the following:

Add the following import to your form:

import java.beans.Beans;

Surround any code you do not want to execute when opening the form in the NetBeans form designer in the following block:

        // Don't execute the following code in the designer
        if (!Beans.isDesignTime()) {
            // unexecuted code goes here

        }

Friday, July 05, 2013

Enterprise Learning: notes from IBM Innovate 2013

IBM described how their enterprise training strategy for their Global Business Solutions division has evolved to support their new DevOps culture.

IBM realized that their training model resulted in many of their employees having what they referred to as “shelf skills”: meaning skills that are not used (think shelfware).  They referred to this as ‘waterfall learning’: gaining knowledge without knowing why or how you are expected to use this information. At the same time, their development organization was making the push towards becoming a more agile, DevOps-focused institution.  They realized that formal training and continuous delivery would have a hard time co-existing, since the deployed software had the potential of changing faster than it would take to develop a traditional training course. 

This encouraged IBM to change the way they train their employees on technical items that are important to the organization over the past few years, switching their focus from a formal, managed method to more of an informal, supported method.

They have done this by transitioning their classroom learning model to a “community of practice” (COP) model. The COP model at IBM is formal, with employees encouraged in their annual objectives to actively participate in COPs.

They quickly found that implementing this model was somewhat harder than they initially thought. A traditional weakness of a COP is how to onboard new members to the community; you would want the level of technical topics in the community to be of a certain complexity to encourage domain experts to participate fully.  In order to ensure that employees joining a COP had a certain base level of understanding of the topic, IBM created what they called “Learning Circles”.  The premise behind a learning circle is: if an individual wants to learn about a topic, they should have access to a trusted list of resources that have been vetted by a known expert. Domain experts were encouraged to contribute material to the Learning Circle to become better known in the community and build their ‘trust network’.  Learning Circles have the goal of getting their members a baseline level of knowledge so they would feel comfortable participating in discussions in the affiliated COP.  

A participant in a Learning Circle has the goal of demonstrating competency in the field of study.  When they feel they are ready to participate in the full COP, they have the option of ‘self-graduating’ from the Learning Circle. At this point, IBM management starts to keep track of the use of this skill – the employee has six months to use these new skills in their job or engagement.  This encourages employees to keep their skills current to their jobs, or help gain skill that can move their career along a new path. This approach appears to align individual training with the needs of the organization, IBM measured that 82% of LC graduates reported that they used their new skills within 6 months of graduation.  Additionally, there was an 80% overlap between the list of skills being learned by employees to a survey of skills that customers said they wanted.

When measuring the effectiveness of the LC/COP model, IBM realized that the communities with higher rates of participation had much better content than smaller communities. In order to boost participation in communities across the board, IBM opened up the communities so members from outside of IBM could join a COP: first business partners, then to the general public.  These will soon be available on the IBM developerworks site.  The concept is the creation of a ‘system of engagement’ with customers using their tools.  IBM hopes to strengthen relationships with their clients by giving away this basic ‘how to use our tools’ content.  They are looking to use this as a new engagement model; it gives many of the advantages of a face-to-face meeting, but is much more scalable.

Enterprise Learning Key Take-Aways:
A key for the IBM training model was that as they transitioned from a traditional learning environment to a self-guided model is that they continued to give their employees time to learn new skills and tools, trusting them to learn the skills that would help the organization. 

Tuesday, July 02, 2013

Culture Change: notes from IBM Innovate 2013

I attended a session which described how IBM built what they referred to as an ‘Agile Roadmap’ using a cross-business team. 

The presentation began with some alarming statistics from an IBM-funded study: 59% of companies listed culture as the key inhibitor to the adoption of agile practices. 70% of all change initiatives fail, with the following key areas listed as the cause of organizational failures:
1.       Poor executive sponsorship
2.       Lack of employee involvement
3.       Ineffective change champion
4.       Underestimating the change effort
5.       Ad-hoc approach to change

The IBM ‘Agile Enterprise Transition Community’ realized that if they wanted the organization to fully benefit from an agile transformation, they would have to focus on changing the underlying culture of IBM. A direct quote from the presenter: “you can not change culture by adopting a new set of tools.” Corporate culture reflects the reality of the organization – the values, practices and traditions that have made a corporation successful; this is something that is very difficult to change.
IBM consulting has a “Better Change” process that they have used to help their clients make cultural transitions; this was used as a framework for framing the changes the committee proposed to make internally.  The process is loosely based on John Kotter’s Leading Change approach, which has eight steps:
  1. Establish a sense of urgency: Determine what is driving your need for change – the greater the urgency, the better chance you have of making changes.
  2. Create a powerful guiding coalition: Bring together business and technical personnel to remove impediments to success. Change cannot be enforced; it must be encouraged and supported. Determine how to achieve many small successes early in the initiative to build momentum and gain credibility. Use these lessons to determine how to leverage wins across the organization. Put out a call for volunteers at this point, who believe in the need for change and will act as additional grass roots voices across the organization. The coalition at IBM was organized in this fashion:
  3. Develop a vision and a strategy: Craft a mission statement, articulating this will help the community get on the same page.  Ensure everyone uses a common set of definitions to describe key goals and deliverables.  Make sure everyone understands the problem, such as: “if we cannot make this change, the contract is going to be awarded to another company who can make this change.” The mission statement will simply lay out the strategic vision, but will not give any indication about what will need to be done to achieve the goals. Again, mandating change will reduce the chances of success.  If the vision is dictated, it isn’t our vision – work out the vision together.  As an example, the IBM vision was: "Uses continuous stakeholder feedback to deliver high-quality, consumable code through use cases (user stories) and a series of short, stable, time-boxed iterations."
  4. Communicate the change vision: The vision needs to be communicated from the top, all the way down the management chain to the individual practitioner. Do not be shy about communicating the vision to anyone and everyone!  The presenter made the analogy of two workers in a quarry: when the project manager asked one what he was doing, he said “cutting stone.” When he asked the other, he said “building a cathedral.” The second worked understood the project vision.
  5. Empower a broad base of people to take action: The volunteers identified in step 2 are essential to this step. They need to be empowered and supported to make change. It is essential to have volunteers from a wide range of responsibilities, they can be used to identify and eliminate blockers to change. Some examples were given; volunteers can lead courses, coach other employees, and help craft new practices. IBM would bring the most influential volunteers together to hold an “Academy of Technology Agile Conference.” This was a series of virtual conferences, webinars and events, plus face to face local events. Members detailed successes and failures, and gave them an opportunity to engage with other change enablers across the organization.  The committee took this time to formally recognize the valuable work the volunteers were doing.
  6. Generate short-term wins: Scrum is very good to do this, due to the short turnaround time for deliverables and the quick incorporation of lesson learned. Wins will help you gain credibility across the organization.
  7. Consolidate gains and product more change: This is one of the more difficult steps. Adopting agile practices can directly impact business investment gates: does your business process framework hinder, tolerate, or actively support agile practices? As an example, one of the first IBM business gates required the proposal to completely define requirements; this needed to be changed.  IBM is currently in the third iteration of changing their business practices to support agile practices.
  8. Anchor the new approaches into the culture: It may take some time for employees to practice the new behaviors before they become ingrained – making the new culture. Some problems may occur during this phase: the executives sponsoring the initiative may move on, or you may declare victory prematurely. The agile steering committee needs to be kept in place and vigilant to ensure that the organization sustains the transformation.

One of the last points emphasized was a quote from John Kotter regarding what does not work when changing a culture:
"Some group decides what the new culture should be. It turns a list of values over to the communications or HR departments with the order that they tell people what the new culture is."

Key Take-Aways:
  • This was an excellent presentation. The presenter was Elizabeth Woodward, who was an Organizational Consultant in IBMs Office of Strategy.
  • An overall change vision must be created and articulated across the organization, to the point that any practitioner knows how they are contributing to this vision.
  • Employees effecting change need to be empowered and supported by the organization.
  • Cultural change cannot be made through the incorporation of tools, or by dictating new processes.
  • Practitioners need to be part of the transformation if this is to be successful.

Monday, July 01, 2013

Overview of DevOps: notes from IBM Innovate 2013

DevOps was by far the main concept that IBM was pushing at the Innovate Technical Summit; nearly every session I attended had some portion dedicated to how they fit into the IBM DevOps infrastructure/methodology.

In general, DevOps refers to best practices a company can use to reduce friction when handing off software between development and operations.  This reduces the time it takes a company to deliver something of value to their customers. Reducing friction refers to changing the culture of an organization to eliminate any technical or procedural barriers that hinders the ability to deliver software in a predictable way with the minimal amount of manual work.

By adopting some common-sense practices, a company can become more agile, deliver products to their customers sooner, and increase their chance for success. Some of the DevOps best practices highlighted were:
  • Ensuring development and production environments are as similar as possible
  • Automating as much as possible – tests, system setup, deployment
  • Flexibility of processes – IT and project management should be as agile and flexible as the development teams
  • Fostering an environment of open communication between the groups tasked with developing and deploying software – this should be done through as many channels as needed to make communication between these groups easier.

The final key concept of DevOps is the amplification of feedback loops between stakeholders; it is critical to have the ability to observe how changes impact a system, and apply this data to the next set of changes.  To enable this, continual monitoring and observation about critical system metrics must be collected and used.
IBM refers to this philosophy as the DevOps Lifecycle. They have taken steps to evolve their tool chain to support this in any organization.

Lessons Learned:
  • Configuration and Change Management: DevOps encourages the versioning of every asset needed to build a product. This is not just source; this is all libraries, environment scripts, virtual systems. Without an established source of truth, you will not be able to continuously deliver. Leverage Automation: This refers to a concept called ‘Change Management,’ where you need to have an idea of how any change effects the system as a whole. The goal of this is to automate the complete test and delivery process of the system; eliminating all manual changes will allow you to synchronize all areas during a ‘deployment’. This will encourage developers to make many small incremental changes to a system, which reduces integration risk.
  • Leverage Virtualization: most of the methods in which IBM recommended implementing DevOps at a company involved the use of virtualization. Virtualization of systems and network topologies allows the organization to consider the environment needed to build and deploy a project as ‘code’, which is also versionable – ‘infrastructure as code’.
  • Continuous Delivery: In order to implement Continuous Delivery, an organization must make investments in Continuous Testing, Continuous Integration, and Continuous Monitoring.  In order to implement continuous testing and integration, a program will need to make improvements to their development infrastructure such as build automation and virtualization. When considered in this way, a program could be ready to make the transition to Continuous Delivery.  

Rational tools such as Team Concert, Rhapsody, etc. are very mature and can support an agile DevOps culture. IBM development teams are using their own tools to enable their internal DevOps efforts.

Wednesday, May 23, 2012

JetBrains releases dotPeek, a new free .NET decompiler

JetBrains has thrown their hat into the .NET decompiler ring with the recent release of dotPeek.  I've been using it for a couple of days now and have found it to be a fully-featured competitor to the standalone .NET Reflector by Red Gate Software.

The standalone version of .NET Reflector is priced at $70, while dotPeek is free.  I wonder if this is going to change anytime soon.  .NET Reflector also has version that adds Visual Studio integration to the basic utility (available for $130) and a Professional edition that adds VS integration and some very useful debugging features (available for $190). Sadly, I have not been able to convince my program manager to buy any licenses for our team.

dotPeek doesn't do anything other than decompile assemblies, but it does that well.  This is good news, since I have really missed having a decompiler available in my daily work.

Thursday, December 15, 2011

Overheard at Work

From the two developers pair programming across from me:

"Ooo! We did it! That's good, right?"
"I'm not so sure that's good. Or right."
"All right. We'll put it back."
"Damn."

Pair programming is the best.

Thursday, April 15, 2010

Visual Studio 2010 and the Platform Toolset

On Monday, Visual Studio 2010 became officially available to MSDN subscribers. If you're developing in C++, there are a number of new features available to you which are detailed  in a great article in this month's MSDN Magazine.

One of the best features I've had experience with so far is the Platform Toolset project setting.  This is designed for making a phased migration of an existing project that has been developed in Visual Studio 2008 to Visual Studio 2010.  Proper use of this feature will allow you to migrate your application as it makes sense to you, by allowing you to choose which portions of your application to build with VS 2010 and which to build with VS 2008 at the project level.  How's that for granularity?

To take advantage of this, you'll need a system with a side-by-side installation of Visual Studio 2008 and Visual Studio 2010.  You then load up your Visual Studio 2008 solution in VS2010, and allow the project conversion wizard to do it's magic.  The first thing you'll notice is that your projects have a new extension: *.vcxproj.  It's not just an extension change: the underlying structure of the project file has changed significantly. 

In order to access the Platform Toolset, you need to open the properties for the project you wish to build with Visual Studio 2008 and select the Configuration Properties | General node of the tree.  You'll notice the Platform Toolset option is set to v100 by default, which is the product version of Visual Studio 2010.  If you want to build with the Visual Studio 2008 tools, change the drop-down to v900.

platformtoolset

What is going on under the hood is that the PATH, BIN, and LIB directories for Visual Studio 2008 will be used by MSBuild for any project with the Toolset property set to v900 - just as if you were building the project directly from Visual Studio 2008.

This setting looks like it will mitigate a lot of upgrade pain. 

If you would like to know more about the Platform Toolset, here's a pointer to an article by one of the developers who created this feature.

Wednesday, February 24, 2010

Build Breaker!

One of the most noticeable features of the team room I work in is the traffic light which reports the status of our Continuous Integration builds. We really like it when the light is green. However, what happens when one of the builds is broken and the light is red? You can immediately tell there is a problem, but don't have any visual cue that anyone is working to fix it.
At past jobs, I've seen a highly-visible token of some sort used for this purpose, developers working on a critical fix would put something on their desk to indicate that someone is working on the problem.
On Monday, our scrum master presented the team with the best token I've seen to date; I'll let the picture of it speak for itself.
100_0200 (Small)
Congratulations, Phil - for being the first bearer of our stylish build-break hat!

Wednesday, January 27, 2010

Pair Programming - when your pair is 20 miles away?

I am working at home today, my furnace broke last night and I am waiting for a plumber to get the part he needs to fix it. However, our team is in the middle of a sprint and I need to get work done on a number of tasks I was planning on doing with another member of the team in a pair programming exercise.  What's a 21st century developer to do? Enable himself with collaboration tools!
This morning, we set up a online meeting, and shared one of our screens.  I was fortunate enough to have a VOIP headset, so I was comfortably able to be on a long phone call without having to take my hands off the keyboard.
Much to my surprise, this arrangement worked out better than I could have ever imagined. We have both been working away on our task without any loss of productivity - actually even having a minor productivity gain when we needed to run the same test in another development environment to compare the results of our changes versus the baseline and all I had to do was click a button to share my screen -  allowing us to work on another system without having to move.
I am amazed that technologies such as Remote Desktop Connection, VPNs, and IP telephony have matured to a point that allows me to pair program with someone in another office almost better than if I was sitting next to him. These tools certainly help out in cases like this, when someone is forced to stay at home unexpectedly.

Wednesday, August 12, 2009

Visual Studio TFS: Why no keyboard shortcut to view the Source Control Explorer?

In case you were looking for a keyboard shortcut to bring up the Source Control Explorer in Team Foundation Server, stop now: there isn't one mapped by default.

Here's how to set one so there will be one less thing you need to touch your stinking mouse for:

  1. In Visual Studio, select Tools Options. Select Environment Keyboard.
  2. In "Show commands containing", enter View.TfsSourceControlExplorer.
  3. Map this to whatever keyboard command you want! If you want this command to be available anywhere in VS, make sure "Use new shortcut in" is set to Global. I mapped this to Ctrl+F8, which surprisingly was not mapped to anything.
  4. I then mapped View.TfsPendingChanges to Ctrl+Shift+F8.

I have to give a shout out to the free SlickEdit Gadgets addin, which has a Command Spy window which made it very easy to find which commands I needed to map.

Wednesday, June 17, 2009

Blogging from Code Generation 2009

For the past three months, I've been working on a team that has a charter to develop a Software Factories capability at my company. It's been a really good experience for me. I'm working on a small team with some very capable people, and the working environment reminds me a lot of my days working at NuMega.

To learn more about current methodologies and best practices in Domain Specific Languages and code generation, I find myself in Cambridge (not the one down the street - the original one in the UK) with two of my colleagues attending the Code Generation 2009 conference. This experience has encouraged me to dust off the old blog and start talking tech again. When I get back, I'm planning on blogging about some of my experiences here and what I have learned.

Stay tuned!

Tuesday, January 22, 2008

Here's a Quick Way to Separate a File Name from a Path in Microsoft Excel

It happened again. I was presented with a text file that contained a large list of full paths and I needed to separate the file name from the path.

I can't count the number of times I have had to rewrite this Excel macro over the years; this typically happens whenever I get a new laptop and forget to back up my Excel macro modules, but this time it's because I'm at a new job and my backups are on my external hard drive at home. It's a simple problem, but anything is annoying to have to do from scratch, so I'm finally going to document it here.

Here's what I came up with. This macro assumes you have selected the first cell in your list of files, and there is a blank row immediately following the last entry in your list. It will write the path to the column immediately to the right of the current cell and the file name two columns to the right of the current cell. If you have any data in these two columns, it will be overwritten - so make sure you insert two columns to the right of your file list if you need to.

Sub SeparateFileFromPath()
 'turn off screen updating to make macro run faster
 Application.ScreenUpdating = False
 
Dim
fullpath As String
 fullpath = ActiveCell.Value
 
' do this for the whole list of files
 Do While Len(fullpath) > 0
  Dim n As Integer
  Dim m As Integer
  n = InStrRev(fullpath, "\")
  m = Len(fullpath) - n

'everything to the left of the last '\' is the path
  Dim path As String
  path = Left(fullpath, n)

' everything to the right of the last '\' is the filename
  Dim filename As String
  filename = Right(fullpath, m)

ActiveCell.Offset(0, 1).Value = path
  ActiveCell.Offset(0, 2).Value = filename

'move to the next row
  ActiveCell.Offset(1, 0).Activate
  fullpath = ActiveCell.Value
 Loop
 
' turn screen updating back on
 Application.ScreenUpdating = True
End Sub
Enjoy! If you have any improvements, let me know in the comments; I'll give you credit and make revisions.

Wednesday, October 03, 2007

Microsoft is Releasing the Source Code for the .NET Framework Libraries

Big news! This is what is going to be released (from Scott Guthrie's blog):

We'll begin by offering the source code (with source file comments included) for the .NET Base Class Libraries (System, System.IO, System.Collections, System.Configuration, System.Threading, System.Net, System.Security, System.Runtime, System.Text, etc), ASP.NET (System.Web), Windows Forms (System.Windows.Forms), ADO.NET (System.Data), XML (System.Xml), and WPF (System.Windows). We'll then be adding more libraries in the months ahead (including WCF, Workflow, and LINQ).

This news would have been greeted with glee at my last job.

Thursday, April 19, 2007

Creating Custom MSDN Help Filters

I was putting together a new development box today and forgot how to do this (since the VSIP installation doesn't create a custom help filter on it's own). The instructions are here on Aaron Marten's blog. Thanks, Aaron.

Google, Google, Google. Is there anything you can't find?

Thursday, March 08, 2007

SlickEdit Gadgets for Visual Studio 2005

I just had a chance to install SlickEdit Gadgets, a free Visual Studio 2005 add-in brought to you by the developers who created my favorite editor, SlickEdit. This is a really great set of utilities! Some of my favorites:

File Explorer: Displays an explorer window as a tab in VS2005. This is pretty handy when you're opening a lot of files.
Command Spy: This tool window shows you the keyboard binding for the menu item or toolbar button you just selected, helping you to learn how to work faster in the IDE.
Editor Gadgets: You can have your current line highlighted with what they call a line ruler. I like the effect. There are a number of other visualization aids in this tool too.

There are a couple of more utilities, but you get the idea; and you can't beat the price. There wasn't even any registration required.

Wednesday, February 28, 2007

Creating Custom Word 2007 Shortcuts

If you want to create a custom shortcut to a often-used command in Word 2007, try this:

  1. Open Word and press 'Alt + Ctrl + numeric keypad '+' key.' Your cursor will change to a command cursor.
  2. With the command cursor, click on the command you want to bind your keyboard shortcut to.
  3. The Customize Keyboard dialog will appear with your selected command highlighted.
Thanks to Cappy for finding this one.

Wednesday, January 24, 2007

Wednesday, November 08, 2006

Is Your VS.NET 2005 Text Editor Running REALLY slowly?

Try this tip: goto Tools | Options | Text Editor | C# | General and uncheck the Navigation Bar option.

Thanks to Cappy for finding this post which described the fix. Look about half-way down the comments for a macro which enables you to turn this on and off programatically.