SDN Focus 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
Mike Bushong07/07/14
1324 views
0 replies

Network cost and complexity: As simple as changing the y-intercept?

Architects and operators should ask this question to see what kinds of answers come back. An honest answer should lead to follow-on questions.

Whitney Baker07/06/14
2683 views
0 replies

The Best of the Week (June 27): Agile Zone

Make sure you didn't miss anything with this list of the Best of the Week in the Agile Zone (June 27 to July 4). This week's topics include pair programming, agile vs. real life, collective ownership, product owners and the pursuit of empowerment.

Shane Willerton07/05/14
2760 views
0 replies

I.T. Managers need this book to foster an Agile transformation!

There is a plethora of books on Agile methodology and processes. These methodology books outline the tools and mechanics of implementing Agile transformations from the bottom of an organization to...

class WeatherController < ApplicationController
  
  def home
    @report = nil
  end
  
  def find
    @city = params[:q]
   @weather = WeatherModel.get("http://api.worldweatheronline.com/free/v1/weather.ashx?q=#{@city}&format=json&num_of_days=1&key=KEY")
  
  respond_to do |format|
    format.js { render 'find.js.erb'}
  end
   
   
  end
  
  
end
James Betteley07/04/14
5243 views
3 replies

On Collective Ownership and Responsibilities

Recently I’ve been butting heads with some people on the subject of Ownership, Responsibility and Accountability. There seems to be a very unhealthy obsession with these things sometimes, and I think this is indicative of a less-than-ideal culture.

Paul Underwood07/04/14
7933 views
0 replies

Dynamically Create CSS Classes With SASS

One of my favourite features of SASS is the ability to use loops to dynamically create your CSS classes. A good example of this is when you want to make a set of classes to use for changing the text colours and background colours of elements you would normally have to write CSS like this.

Chris Odell07/04/14
5374 views
0 replies

De-registering a WordPress Custom Taxonomy

You know how to register a custom taxonomy and how to register terms for that taxonomy. However what do you do if you want to de-register a taxonomy?

Lorna Mitchell07/04/14
4318 views
0 replies

Video: Git Remotes and Tracking Branches

Here's a little demo video that I put together to explain pushing/pulling with multiple remotes and how tracking branches make this easier.

Mike Bushong07/04/14
3431 views
1 replies

Converging your storage network without fear

We are collectively making the step into network based storage. We should also make the step to run this effectively with maximum performance and minimal interference on a single network. It really can be pretty simple…

Trisha Gee07/03/14
6255 views
3 replies

Readable, Succinct, or Just Plain Short?

Which is more readable? releaseVersion = version.substring(0, version.indexOf('-SNAPSHOT')) or releaseVersion = version[0..-10] ? I'm going to go with the first one because it’s easier to understand if/when something goes wrong.

Venkatesh Kris...07/03/14
2010 views
0 replies

Changing the Mindset of Agile Teams

Agile is not about practicing Scrum, XP or Kanban. It is a mindset that one needs to cultivate. It is not about doing a daily standup or retrospective but knowing the values/principles behind it. Most of the agile teams are interested in practices and very few are interested to learn the values/principles.

Mike Bushong07/03/14
5097 views
0 replies

UX is the new orange

If networking really is on the cusp of changing over, user experience has to be an input into the design process. This is a radical change in how products are conceived, built, and ultimately brought to market.

Allan Kelly07/03/14
3790 views
0 replies

How Do I Make Testing Faster?

Later in the day I found myself in conversation with two people concerned about software testing. They posed the question: “How do we make testing faster?” Specifically, how do we make SIT (“System Integration Testing”) and UAT (“User Acceptance Testing”) faster?

require "sinatra"
require "asposecloudsdk"


get "/" do
  erb :index
end

post "/convert" do
  unless params[:input_file] && (tmpfile = params[:input_file][:tempfile]) && (name = params[:input_file][:filename])
    return "No file selected"
  end

  app_sid = "67xxxxxd-xxx2-7xx3-1xx7-2xxxxxxxxxxd"
  app_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
  Aspose::Cloud::Common::AsposeApp.new(app_sid, app_key)

  request_url = "http://api.aspose.com/v1.1/"
  if /^.+\.(docx|doc|rtf)$/ =~ params[:input_file][:filename]
    request_url += "words/convert"
  elsif /^.+\.(xlsx|xls)$/ =~ params[:input_file][:filename]
    request_url += "cells/convert"
  elsif /^.+\.(pptx|ppt)$/ =~ params[:input_file][:filename]
    request_url += "slides/convert"
  elsif /^.+\.(pdf)$/ =~ params[:input_file][:filename]
    request_url += "pdf/convert"
  else
    return "Error: wrong file selected"
  end
  request_url += "?format=" + params[:format]
  signed_request_url = Aspose::Cloud::Common::Utils.sign(request_url)

  converted_file_stream = RestClient.put(signed_request_url, params[:input_file][:tempfile])
  response.headers["Content-Type"] = "application/octect-stream"
  response.headers["Content-Disposition"] = "attachment; filename=" + params[:input_file][:filename] + "." + params[:format]
  return converted_file_stream

end

//HTML Code Page for selecting file to upload
//views/index.erb

<html>
<head><title>doconv</title></head>
<body>
  <form action="convert" method="post" enctype="multipart/form-data">
    <label>Input file
      <input type="file" name="input_file"/>
    </label>
    <br/>
    <label>Output format
      <select name="format">
        <option value="pdf">PDF</option><option value="tiff">TIFF</option>
        <option value="xps">XPS</option><option value="svg">SVG</option>
        <option value="docx">DOCX</option><option value="doc">DOC</option>
        <option value="xlsx">XLSX</option><option value="xls">XLS</option>
        <option value="text">Text</option>
      </select>
    </label>
    <br/>
    <button type=submit>Upload</button>
  </form>
</body>
</html>

Johanna Rothman07/03/14
2563 views
0 replies

Do You Encourage People to Bring You Problems?

One of the familiar tensions in management is how you encourage or discourage people from bringing you problems. One of my clients had a favorite saying, “Don’t bring me problems. Bring me solutions.”

Alec Noller07/02/14
6292 views
0 replies

Dev of the Week: Hernâni Cerqueira

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 have something a little bit different: Hernâni Cerqueira, Lead Software Engineer for DZone and AnswerHub.

Maarten Ectors07/02/14
5633 views
0 replies

Software Defined Everything

5 smart programmers can bring down a whole multi-billion industry and change people's habits.

Whitney Baker07/02/14
3182 views
0 replies

DZone Weekly Link Round-up (July 2)

This week's topics include Google I/O, the Internet of Things, personal data ownership, programmers as the new digital working class, Facebook's mood study, bitcoin in California, Community, EasyRPG, Brogramming and cat memes.

John Cook07/02/14
3817 views
0 replies

Classical programming

It would be interesting to see a classical approach to teaching programming. The goal would be to write code that is testable, maintainable, and even occasionally eloquent.

Michael Norton07/02/14
2723 views
0 replies

The Love Contagion: Groupon and the Science of Developer Appreciation

The science of appreciation tells us that gratitude is lacking in most work environments, but even a little bit of appreciation can lead to a better work environment and higher performance. People start to feel better about themselves, perform better as a result, and are more likely to show appreciation to others.