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
Michael Sahota09/15/14
1 replies

Stop Agile Initiatives!

I am sick to death of Agile Initiatives because they usually fail. The core problem is that the typical approach used to initiate Agile is inconsistent with Agile goals of empowerment and engagement.

Abby Fichtner09/12/14
3 replies

Fun Ways to Teach Kids to Code

Following up on my Why We Need to Teach Kid to Code, here are some fun ways to help them learn. So cool – wish some of these were around when I was an 8 year old learning to code on my Atari 800!

Gil Zilberfeld09/12/14
1 replies

The Hidden Cost Of Estimation

“Why would you want a rough estimate, when I can do a more precise one?” And really, if we can do something better, why do it half way? There’s a simple answer, but I’ll give it after the long detailed one.

Rob J Hyndman09/12/14
0 replies

Generating quantile forecasts in R

A “quan­tile fore­cast” is a quan­tile of the fore­cast dis­tri­b­u­tion. Still assum­ing nor­mal­ity, we could gen­er­ate the fore­cast quan­tiles from 1% to 99% in R using...

Chen Harel09/11/14
0 replies

Java 9: The Ultimate Feature List

All new features, expected features and speculations regarding the upcoming Java 9 release: the Jigsaw project, performance improvements and long awaited APIs

Kai Wähner09/11/14
0 replies

Comparison of Alternatives for Stream Processing and Streaming Analytics

The article discusses what stream processing is, how it fits into a big data architecture with Hadoop and a data warehouse (DWH), when stream processing makes sense, and what technologies and products you can choose from. Comparison of open source and proprietary stream processing / streaming analytics alternatives: Apache Storm, Spark, IBM InfoSphere Streams, TIBCO StreamBase, Software AG's Apama, etc.

Chris Odell09/11/14
1 replies

The Codesmith

We are at a point in time where people who write software are much like the craftspeople and artisans in times past. Software is not yet something that can be easily manufactured on an assembly line. So are you a codesmith?

//Adding Attachments to a New Email Message

public static void main(String[] args)
    // Base folder for reading and writing files
    String strBaseFolder = "D:\\Data\\Aspose\\resources\\";

    //Initialize and Load an existing MSG file by specifying the MessageFormat
    MailMessage email = MailMessage.load(strBaseFolder + "anEmail.msg", MessageFormat.getMsg());

    //Initialize a String variable to get the Email Subject
    String subject = email.getSubject();
    //Append some more information to Subject
    subject = subject + " This text is added to the existing subject";
    //Set the Email Subject

    //Initialize a String variable to get the Email's HTML Body
    String body = email.getHtmlBody();
    //Apppend some more information to the Body variable
    body = body + "<br> This text is added to the existing body";
    //Set the Email Body

    //Initialize MailAddressCollection object
    MailAddressCollection contacts = new MailAddressCollection();

    //Retrieve Email's TO list
    contacts = email.getTo();
    //Check if TO list has some values
    if (contacts.size() > 0)
        //Remove the first email address
        //Add another email address to collection
    //Set the collection as Email's TO list

    //Initialize MailAddressCollection
    contacts = new MailAddressCollection();

    //Retrieve Email's CC list
    contacts = email.getCC();
    //Add another email address to collection
    //Set the collection as Email's CC list

    //Save the Email message to disk by specifying the MessageFormat + "message.msg", MailMessageSaveType.getOutlookMessageFormat());

//Loading a Message with Load Options

//To load a message with specific load options, Aspose.Email provides the MessageLoadOptions class that can be used as follow:

MesageLoadOptions options = new MesageLoadOptions();
options.PrefferedTextEncoding = Encoding.getEncoding(1252);
MailMessage eml = MailMessage.Load("EMAIL_497563\\test3.msg", options);

Michael Crump09/10/14
0 replies

How to Run HTML files in your Browser from GitHub

If you have a .html file in a GitHub repository and want to view that page directly, you would typically download or clone the repo to your local hard drive and run it from there. There is an easier way.

Alec Noller09/10/14
0 replies

Dev of the Week: Adam Diaz

Every week at DZone, we feature a new developer/blogger 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 Adam Diaz, Hadoop Architect at the Teradata Big Data Center of Excellence and featured author in DZone's upcoming 2014 Guide to Big Data.

Alec Noller09/10/14
0 replies

The Best of DZone: September 3 - September 10

If you missed anything on DZone this week, now's your chance to catch up! This week's best include the reasons why Vaadin is a Passat, named parameters in Java, mobile gaming with Haskell and SDL, NoSQL job trends, and more.

Quinten De Swaef09/10/14
0 replies

Event driven programming using Spring Boot and Reactor

This article will teach you how you can setup an environment to develop in an event-driven fashion using Spring Boot and the Reactor framework.

Rob Galanakis09/10/14
2 replies

Can you quantify trust?

Bad managers, who are by definition less trusted, can easily rationalize away any attempt at quantification. One quantifiable measure would be employee turnover.

Andrew Fuqua09/09/14
1 replies

Don't Estimate Stories In Sprint Planning

I don’t estimate stories in sprint planning. Nor do I re-estimate stories in sprint planning. I estimate stories in a separate estimating meeting and usually at least a couple sprints in advance, if not more. There are a few reasons why (re)estimating during sprint planning is a dangerous practice:

Allan Kelly09/09/14
3 replies

Agile outside of software

While not every Agile practice can be taken out of software development and used someplace else the roots of Agile mean that the principles, values and ideas which Agile is built on can be. In your domain Agile as now known might work quite well, but in someone else’s domain there may be more need to think deeper.

Mike Bushong09/09/14
2 replies

On building teams: experience or talent?

Obviously when you hire, you want to find a good mix of experience and talent. But a perfectly balanced straddle between the two is impossible. So when forced to choose between them, which do you choose: experience or talent?

Chris Odell09/09/14
0 replies

SOHO Agile: Is agile relevant to the SOHO developer?

Agile is often seen as a team process, and certainly agile lends itself to team activities. So can you apply agile to the Sole Home Office developer?

Mateusz Haligowski09/08/14
15 replies

Programmer, know thy tools!

On the importance on non-programming skills in the job of a programmer.

import java.util.Scanner;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

 * Servlet Filter implementation class filter
 * @author prgrmmr.aben [at] gmail (dot) com
 * please give back a small donation if you find
 * this little educational snippet of code useful 
public class filter implements Filter {

     * Default constructor. 
    public filter() {
        // TODO Auto-generated constructor stub

  * @see Filter#destroy()
 public void destroy() {
  // TODO Auto-generated method stub

  * @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain)
 public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
  HttpSession session;
  System.out.println("being filtered"); //you can use logging instead
  HttpServletRequest req = (HttpServletRequest)request;
  HttpServletResponse res = (HttpServletResponse)response;
                res.addHeader("X-FRAME-OPTIONS", "DENY" ); 
  String requestedPath = req.getRequestURI().substring(req.getContextPath().length());
                // I was using the test bellow when developing the app
  /*Scanner verify = new Scanner(;
  session = req.getSession(false);
  if(req.getSession(false) == null){
   session = req.getSession(true);
   req.getServletContext().getRequestDispatcher("/login.jsp").forward(request, response);
   long timeElapsed =  System.currentTimeMillis() - (long) session.getAttribute("lastTime"); 
    System.out.println("spams are not allowed"); //you can use logging instead
   else if (timeElapsed<2000) {
    session.setAttribute("spam", true);
    System.out.println("spam need to be blocked");
   }else if (session.getAttribute("logged").equals(false)) {
    session.setAttribute("lastTime", System.currentTimeMillis());
    req.getServletContext().getRequestDispatcher("/login.jsp").forward(request, response);
   }else{//if session.getAttribute("logged").equals(true) which should be set to true after user is logged
    session.setAttribute("lastTime", System.currentTimeMillis());
     req.getServletContext().getRequestDispatcher("/main.jsp").forward(request, response);
     req.getServletContext().getRequestDispatcher(requestedPath).forward(request, response);

  //chain.doFilter(request, response);

 private void sessionInit(HttpSession session) {
  // TODO Auto-generated method stub
  session.setAttribute("spam", false);
  session.setAttribute("logged", true);
  session.setAttribute("lastTime", System.currentTimeMillis());

  * @see Filter#init(FilterConfig)
 public void init(FilterConfig fConfig) throws ServletException {
  // TODO Auto-generated method stub