The Cost of Laziness

See the original posting on DZone Python

Recently I had a dispute with my colleagues regarding performance penalty of lazy vals in Scala. It resulted in a set of microbenchmarks which compare lazy and non-lazy vals performance. All the sources can be found at http://git.io/g3WMzA.

But before going to the benchmark results let’s try to understand what can cause the performance penalty.

For my JMH benchmark I created a very simple Scala…

A Compound Name Is a Code Smell

See the original posting on DZone Python

Do you name variables like textLength, table_name, or current-user-email? All three are compound names that consist of more than one word. Even though they look more descriptive than name, length, or email, I would strongly recommend avoiding them. I believe a variable name that is more complex than a noun is a code smell. Why? Because we usually give a variable a compound name when its scope is…

[JavaScript] Shoud I have to cache my array’s length?

See the original posting on DZone Python

Happy new year!

To start this promising year, I would like to discuss about an interesting topic I saw on Twitter (@deltakosh if you want to discuss). The discussion was about array’s length access during a loop.

Simply put, should I use this:

var total = 0;
for (var i = 0; i < myArray.length; i++) {
total += myArray[i];
}

Or that:
Preview Text: 

The Hash Challenge

See the original posting on DZone Python

The Facebook discussion about my previous blog post went off-topic and resulted in an interesting challenge. One of the commenters (Stilgar) was not convinced that passwords hashed with MD5 (or SHA) are so easy to crack if there is salt. So he posted a challenge:
Preview Text: 

The Facebook discussion about my previous blog post went off-topic and…

Tapping Big Data to Your Own Advantage

See the original posting on DZone Python

Big data is the unfettered growth of an organization’s data, both organized and otherwise, in an unmanageable manner. This data, when managed well, can provide valuable insights to an organization, irrespective of the field it specializes in.Here, we present Cary, North Carolina-based SAS Institute’s, also referred to as SAS, take on big data. A developer of analytics software, the company…

Roll Your Own Pen-Test Linux

See the original posting on DZone Python

You’re here because you want to build your own Debian-based Linux. This article is intended as a guide to building atop an existing pen-testing distribution to do so, in this case Kali, using Debian live-build.
Preview Text: 

Have you ever wondered how to build your own pen-test Linux, like Kali? This article details the reasoning behind and…

Reflections on How the Devices We Have Can Affect What We Do or Think

See the original posting on DZone Python

Upon realizing that if I could do something on a PC in seconds but it takes lots longer on a phone and that’s all I have with me I often just don’t bother doing it at all.

5 things then:
Preview Text: 

Upon realizing that if I could do something on a PC in seconds but it takes lots longer on a phone and that's all I have with me I often…

Undefining “Technical Debt”

See the original posting on DZone Python

For me, technical debt is defined pretty loosely as stuff you don’t like in the code and need to change to keep up velocity. However, I’ve seen lots of articles lately discussing a precise definition of “technical debt.” I would sum them up as:
Preview Text: 

For me, technical debt is defined pretty loosely as stuff you don’t like in the…

Art For Non-Artists

See the original posting on DZone Python

Like to make a game, but held up somewhat by the practical issue of having absolutely no artistic ability whatsoever? Yep, we feel your pain. Quite thoroughly indeed. But here’s a series of videos to watch that might help you fake it enough to get by –

2D Game Art for Non-Artists
Preview Text: 

Like to make a game, but held up somewhat by the…

How the JavaScript Heatmap Implementation Works

See the original posting on DZone Python

A heatmap is a powerful way to visualize data. Given a matrix of data each value is represented by a color. The implementation of the heatmap algorithm is expensive in computation terms: for each grid’s pixel you need to compute its color from a set of known values. As you could imagine, it is not feasible to implement it on the client side because map rendering would be really…

Geek Reading January 16, 2015

See the original posting on DZone Python

Today we have some cool news from MIT where they figured out how to watch immune cells communicate. Also from MIT, researchers used evolutionary algorithms to determine how to plan a wind farm with 1000 turbines, a highly complex problem with a cool solution. And finally, Flowing Data shows another fine example of people abusing charts and statistics, a fascinating read as usual.

As always,…

1 152 153 154 155 156 168