HTML5 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
Chase Seibert06/23/14
0 replies

Debugging an IE7 browser crash (manual git bisect)

Every once in a while, you have to put in a heroic effort to diagnose a bug. When you finally figure it out, you want to run around the office singing “We are the champions”, even if it turns out to be a trivial issue. Because that doesn’t mean it took a trivial amount of effort.

Mike Bushong06/23/14
0 replies

The re-emergence of the Operating System

None of us should be surprised when the industry starts talking a bit more broadly about the role of the operating system going forward.

$postText = '..includes html + image tags';
// find first image and redo it
preg_match_all('/<img[^>]+>/i', $postText, $images);
$postThumbnail = isset($images[0][0]) ? $images[0][0] : '';
$postThumbnail = preg_replace('/(width|height|style)="*"/', '', $postThumbnail);
$postThumbnail = preg_replace('/<img/', '<img class="blog-post-thumbnail"', $postThumbnail);
echo $postThumbnail;
echo $postText;
// prepare reload to local version according by first visit        
$location_reload = isset($_SESSION["loc_reload"]) ? (bool)$_SESSION["loc_reload"] : false;
// prepare reload to local version according by first visit
    $location = visitor_location();
    if(in_array($location["country"], array("RU", "BY", "UA"))){
        $_SESSION["loc_reload"] = true;
        header("location: ru/index.php");
    }else if(in_array($location["country"], array("IL"))){
        $_SESSION["loc_reload"] = true;
        header("location: he/index.php");
function visitor_location(){
    $client  = @$_SERVER["HTTP_CLIENT_IP"];
    $forward = @$_SERVER["HTTP_X_FORWARDED_FOR"];
    $remote  = @$_SERVER["REMOTE_ADDR"];
    $result  = array("country"=>"", "city"=>"");
    if(filter_var($client, FILTER_VALIDATE_IP)){
        $ip = $client;
    }elseif(filter_var($forward, FILTER_VALIDATE_IP)){
        $ip = $forward;
        $ip = $remote;
    $ip_data = @json_decode
    if($ip_data && $ip_data->geoplugin_countryName != null){
        $result["country"] = $ip_data->geoplugin_countryCode;
        $result["city"] = $ip_data->geoplugin_city;
    return $result;

Whitney Baker06/22/14
0 replies

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

Make sure you didn't miss anything with this list of the Best of the Week in the Agile Zone (June 13 to June 20). This week's topics include accountability, pair programming, fitness and coding, agility as an idea and organizational structure.

John Cook06/22/14
2 replies

Benchmarking C++, Python, R, etc.

The other day Travis Oliphant pointed out an interesting paper: A Comparison of Programming Languages in Economics. The paper benchmarks several programming languages on a computational problem in economics.

Benjamin Ball06/21/14
0 replies

Illustrating and Visualizing Continuous Delivery

Nhan Ngo, a QA engineer at Spotify, made a series of illustrations about visualizing Continuous Delivery that are available under a Creative Commons license. She's done an amazing job at making a concept easy to visualize that many are unable to understand even after a great deal of educating.

Jonathan Levene06/21/14
0 replies

Creating a Culture of Quality

Every product company wants to delight customers with a high-quality product, and many engineering organizations naturally focus on process improvements to reach quality goals. But organizational culture eats strategy and process for breakfast. So how do you create a culture of quality?

David E Jones06/21/14
0 replies

Why I Work Without Pay on Free Software: Flow and Autotelic Creative Work

Work on free software projects is a good way to experience flow, is a good autotelic creative work experience. This article describes what flow is, how to recognize it, how to cultivate it, and how it can be applied to your work life and career in general.

Mahesh Chopker06/20/14
0 replies

Java Code Review Checklist

There exist many code review checklist blogs/articles in the net telling standard Java best practices/guidelines; And I have come up with a checklist accommodating best practices from some of the recent popular books (reference given) and guidelines from Oracle (on Security).

Mike Bushong06/20/14
0 replies

Network Autonomy: Feedback Defined Networking

If nothing else, SDN in whatever definition you like, is giving us the concept of a programmable network. And what use is programming a network if all you use it for is to automate basic configuration information?

Raymond Camden06/20/14
0 replies

ColdFusion UI The Right Way: HTML version

Back when Adam Cameron and I launched the ColdFusion UI - The Right Way project, I mentioned that initially we would accept submissions from the community to build out the content before releasing an actual readable version. Earlier this week I got off my rear and actually built a process to make this happen.

Steven Lott06/20/14
0 replies

The Swift Programming Language

Swift lowers the bar for entry to the iOS market. Does it also lower the bar for Mac OS X?

Gil Zilberfeld06/20/14
1 replies


When I started my career as a software developer, there was a running joke in the company. For each level of management, we should multiply an estimation by 1.3.

Mike Cottmeyer06/20/14
0 replies

Agile Assessments

When working with a team or organization, an assessment can be introduced as a tool to assist in guiding an agile transformation and team improvement. For me as a coach, it’s an invaluable mechanism to communicate the transformation strategy and to measure progress.

Roman Pichler06/19/14
0 replies

The Product Owner's Guide to the Sprint Retrospective

The sprint retrospective is an opportunity to pause for a short while and reflect on what happened in the sprint. This allows the attendees to improve their collaboration and their work practices to get even better at creating a great product.

Benjamin Ball06/19/14
0 replies

Electric Cloud Launches Two Products and Brings New Attention to Continuous Delivery

Yesterday, Electric Cloud announced two new products, as well as several new industry initiatives, that show a lot about what the company has learned after 10 years of software pipeline and delivery experience. The company is coming out with a number of new focuses on DevOps in the Enterprise.

Luis Aguilar06/19/14
1 replies

Why is Node.js so Popular?

Basically EVERYONE is talking about it right now. But, really, why has it become so popular all of a sudden? Sounds like yet another web technology like any other else, right? Well, in a nutshell... (continue reading)

Ashwin Jiwane06/19/14
0 replies

Test Your Third-Party Providers to Stay Reliable

Most businesses depend on third parties to reliably deliver products or services to their customers. E-commerce sites rely on delivery services. Broadcasters rely on cable and satellite providers. And web platforms rely on cloud infrastructure to keep their systems accessible.

Erich Styger06/19/14
0 replies

Updated Freedom Board Logic Analyzer with DMA

Question: How to build a low-cost logic open source logic analyzer for less than $15? Answer: combine the Freedom KL25Z board with OLS!