Agile Zone is brought to you in partnership with:
DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
  • submit to reddit
Ian Mitchell03/08/14
0 replies

Pull in Practice

Pull is the driving force behind smooth and efficient agile practice. What is its nature though, and how can we harness it? In this article we explore where pull comes from and how it propagates. Can the strange magic behind it be explained in terms of scientific management?

#!/usr/bin/env ruby
require 'digest/md5'
require "addressable/uri"

# this is based on gravatar image API
# options :
# size : <integer> size of image
# default: <string> url of image if email not found or:
#  * 404
#  * mm
#  * identicon
#  * monsterid
#  * wavatar
#  * retro
#  * blank
# forcedefault: "y" force default image to load
# rating: <string> one of the values : g, pg, r, x
def gravatar email, *options
	email_md5 = Digest::MD5.hexdigest email
	unless options.empty?
		params =
		params.query_values = options.first
		params_query = "?#{params.query}"

puts gravatar('')
puts gravatar(
	size: 200, 
	default: ''
George Dinwiddie03/07/14
0 replies

What does it mean for an estimate to be right?

If we choose conformance to actuals as the definition for the “rightness” or “goodness” of an estimate, we’re certainly encouraging overestimation. It’s easier to overestimate and then waste effort as needed to be “accurate” than to underestimate and try to hit a possibly impossible target. Those who ask for estimates using this definition know this, so they are likely to arbitrarily cut the estimate in order to put pressure on development and prevent padding.

Chris Haddad03/07/14
0 replies

DevOps = DevOps Principles + DevOps Practices

Successful, long-lasting movement have a clear manifesto outlining goals and principles. Many DevOps adopters may not be aware of the DevOps Manifesto (created by Jez Humble @jezhumble) nor how successful DevOps requires keeping a clear focus on principles, practices, and value (instead of infrastructure tooling).

David Green03/07/14
11 replies

Why shouldn't I test private methods?

Why shouldn’t you test private methods? Because the fact you’re asking the question means the method shouldn’t be private – it’s a piece of independent behaviour that warrants testing. The hard choice, the design decision, is where you stick it.

#!/usr/bin/env ruby
require 'mail' # gem install mail --no-document

# Credit to : 

def ask question
  print "#{question} ? : "

# get it from : 
# in the Post by Email section
tumblr_email = ''

email = ask('what is your gmail address')

$options = { 
	:address              => "",
  :port                 => 587,
  :domain               => email,
  :user_name            => email,
  :password             => ask('what is your password'),
  :authentication       => 'plain',
  :enable_starttls_auto => true  

Mail.defaults do
  delivery_method :smtp, $options

Mail.deliver do
  from     $options[:user_name]
  to       tumblr_email
  body     ask('write any message associated with the image')
  ARGV.each do |file|
    add_file file

puts 'Posting to tumblr succeeded :)'
Avishek Sen Gupta03/06/14
0 replies

Advice for the New Tech Lead: The Realities of Distributed Development

Let’s face it; not everyone has been there and done that, when it has come to Distributed Development. And if you have, there is a high probability that you were probably in a distributed team, you mostly worked with one group or the other, but not both. These words I will probably keep repeating in the future, but I’m not apologising for them: Never be Complacent.

#!/usr/bin/env ruby

# Credits to :
# i modified the script alittle bit to read files from params
require 'net/http'
require 'json'

uri = URI("")

files = {}
ARGV.each do |f|
	files[f] = {

payload = {
  'public' => true,
  'files' => files

req =
req.body = payload.to_json

puts req.inspect
puts req.body.inspect

# GitHub API is strictly via HTTPS, so SSL is mandatory
res = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => true) do |http|

response = JSON.parse res.body
puts response['html_url']
Alec Noller03/05/14
0 replies

Dev of the Week: Matt Butcher

Every week here and in our newsletter, we feature a new developer/blogger from the DZone community to catch up and find out what he or she is working on now and what's coming next. This week we're talking to Matt Butcher, Lead Cloud Engineer at Revolv, Inc, author, and teacher at Loyola University Chicago.

Benjamin Ball03/05/14
0 replies

DZone Weekly Link Roundup (March 5)

This week in the link roundup: Intel joins the smartwatch arms race with a $100M purchase, Facebook looks to go into low-orbit, Flexcoin shuts its doors, PHP gets a renaissance, a programmer finally admits his limitations, we learn that God created the universe on Rails, and Jurassic Park comes to your browser.

Mike Cottmeyer03/05/14
0 replies

Don’t sell me agile, solve my problem

A wise, retired CIO told me, “Don’t sell me your solution, solve my problem.” That statement further solidified my belief that I am not “implementing agile” (hang with me), but rather I am solving a problem or a set of problems that commonly occur in enterprise environments.

Nikita Salnikov...03/05/14
0 replies

How (Not) to Create a Permgen Leak

The code snippet is rather straightforward, iterating over a loop and generating classes at the runtime. When facing an Error, the code above is well prepared to catch it and print out the stacktrace. Apparently, the situation is a bit more complex than this - half an hour later I found myself still staring at a somewhat different error message. I

Paul Duvall03/05/14
0 replies

Creating a Secure Deployment Pipeline in Amazon Web Services

Many organizations require a secure infrastructure. I’ve yet to meet a customer that says that security isn’t a concern. But, the decision on “how secure?” should be closely associated with a risk analysis for your organization.

George Dinwiddie03/05/14
0 replies

Tracking Agile Velocity

It’s very common for organizations to track the velocity of the Agile teams over time. This is quite a reasonable datapoint to plot. Combined with other data, it might give you some insights when you look back, and insights based on data are typically more useful than insights based on opinion. Remember, though, to keep in mind what the data is, and what it is not.

Nathan Slippen03/05/14
0 replies

Scaling Agile for Enterprise: Biggest Mistakes and How to Avoid Them

Applying Agile methods to an organization on an enterprise level can be difficult. In order to ensure product quality, minimal time-to-market and increased value, avoid these mistakes when embarking on this transformation.

#!/usr/bin/env ruby
require 'mail'

mysql_username = 'root'
mysql_password = '123456'
mysql_database = 'test'
system("mysqldump --user=#{mysql_username} --password=#{mysql_password} #{mysql_database} > backup.sql")

# Credit to : 
options = { 
	:address              => "",
    :port                 => 587,
    :domain               => '',
    :user_name            => '',
    :password             => 'xxxxxxxxx',
    :authentication       => 'plain',
    :enable_starttls_auto => true  

Mail.defaults do
  delivery_method :smtp, options

Mail.deliver do
  from     options[:user_name]
  to       options[:user_name]
  subject  "Database #{mysql_database} backup #{}"
  body     "Database #{mysql_database} backup #{}"
  add_file 'backup.sql'

File.delete 'backup.sql'
Richard Warburton03/04/14
0 replies

An open source JVM Sampling Profiler

It's a well known deficiency of most existing sampling Java profilers that their collection of stack traces has to happen at a safe point. A while back Jeremy Manson open sourced some proof of concept code where calls are made to the AsyncGetCallTrace JVMPI method which avoids the need for threads to reach a safe point in order to read their call trace. I've taken this code dump and started converting it into a usable open source project.

Ayende Rahien03/04/14
0 replies

Tweaking xUnit

In particular, we current have over three thousands tests, and they take hours to run. We are doing a lot of stuff there “let us insert million docs, write a map/reduce index, query on that, then do a mass update, see what happens”, etc.

Mike Cottmeyer03/04/14
0 replies

Compensation Strategies for Agile Teams

The key challenges around compensation, at least for me, center around figuring out how to reward individual performance without encouraging internal competition, local optimization, or one person feeling rewarded while another feels punished. You want compensation to motivate people, not to have a negative impact on performance.

Mike Hadlow03/04/14
0 replies

Git Tips: Revert with a new commit

Sometimes you want to set the state of your project back to a previous commit, but keep the history of all the preceding changes. You want to make a commit that reverses all the changes between your previous commit and the current HEAD.