Friday, March 29, 2013

Failure Is Always An Option - Programming With Anthony

A few days ago, I posted a video about how to become a better developer. There were a few interesting comments made, but one in particular from the Reddit thread ( http://www.reddit.com/r/PHP/comments/... ) peaked my interest. So I decided to do a reply. Check it out:

Wednesday, March 27, 2013

Becoming A Better Developer - Programming With Anthony

In today's episode, I talk a little bit about what it takes to become a better developer. Nobody will ever expect you to know everything, but you better know how to find it...

I'm trying out a new format with this video. Less scripted, more free-form, and with less visuals. This is not going to replace the other format (which I'm still working on), but instead compliment it from time to time. Let me know what you think in the comments below! Check it out:

Thursday, March 21, 2013

Upcoming Talks - Spring 2013

It's been a little while since I've posted anything here or on YouTube. I've been working on some interesting ideas that hopefully will be pretty decent, so it wasn't time wasted. But I figured now would be a good time to tell you about some upcoming speaking engagements that I have, and where I'll be over the next few months. So with no further adue:

April 9th: 

Where: Lehigh Valley Tech Meetup
Location: Allentown, PA, USA
What: PHPPHP - A guide to how PHP works under the hood -
Huh? I'll be giving a talk about my PHPPHP project, and using it to explain how PHP works under the hood. 
Cost: Free
Register: On Meetup.

May 20 - 24:

Where: DrupalCon Portland
Location: Portland, OR, USA
What: Development, By The Numbers
Huh? I'm going to be talking about quantitative code quality analysis tools and how to implement them into your development workflow. I'll be covering things like NPath Complexity, CRAP Indexes, Fanout and Average Hierarchy Height, and how tracking them over time can help improve the quality of your codebase.
Cost: $500 (until April 26)
Register: On The DrupalCon Site

Where: Symfony Live Portland
Location: Portland, OR, USA
What: Cryptography For The Average Developer
Huh? I'll be giving my popular Cryptography talk again at Symfony Live.
Cost: $390 (Until April 26)
Register: On The Symfony Live Site

OR You can buy a combo ticket for both conferences (Symfony Live and DrupalCon) for just $600 from either registration page!

June 6 - 9:

Where: Dutch PHP Conference
Location: Amsterdam, NL
What: Code Review for Security Workshop
Huh? I will be leading a workshop intended to teach developers how to perform code review with security in mind. I'll be introducing some vulnerabilities and some of the methods that I use to find them while performing code reviews.
Cost: € 306
Register: On MyUpComing.nl

Where: Dutch PHP Conference
Location: Amsterdam, NL
What: PHP, Under The Hood
Huh? I'm going to be exploring PHP and how it works, by presenting PHPPHP, an implementation of PHP written in PHP itself.
Cost: € 306
Register: On MyUpComing.nl

OR You can buy a combo ticket to the workshop and the talk for € 550.

I hope to see you at one of these events!

Thursday, March 7, 2013

On "Wealth Inequality In America"

There's been a viral video that's been circulating the internet recently called Wealth Inequality In America. It's actually been published for quite some time, but it's crossed my plane of vision a few times in the past few days. While I don't believe that the content is wrong (in fact, it is actually quite right), I believe that the point the video makes and how it makes it are both misleading. The video tends to imply some nefarious plot to keep the poor down. But in reality, all it is showing is the natural tendency for any system of sufficient complexity to trend towards having a power-law distribution. 

Want to see something shocking? Let's run the same analysis against the top 50,000 websites on the internet, comparing the number of visitors each gets (as provided by Quantcast). When we run the numbers, we get some really interesting data points. In total, there were about 12 billion site-vistiors (since each visitor can be counted multiple times by different sites, that makes sense). Let's take a look at a graph of this data:


Now at first glance, it doesn't look like much. It could be anything. But let's zoom in a bit...
That looks surprisingly like the graph that was shown in the video. So let's not rely on looks, let's look at the numbers. The bottom 20%, makes less than 2% of the total traffic. The top 20% of websites account for 82% of the traffic on the internt. Taking it a step further, the top 1% of sites accounts for 42% of all traffic on the internet.

These numbers look shockingly like the ones from the video. But there's a very important difference. I've cut out a very large number of small sites, and only focused on the top 50k sites. If I included all sites (or the top 1 million sites, for example), the exact same thing would happen. The numbers may change slightly, but the shape and the effect will stay the same...

Power law graphs have a really interesting property: they have a fractal quality. That means that if you pick any sub-range of a graph, it will have the same basic shape as the main graph. Why is that important? Because once we realize that this is a power law graph, we don't need all the information. We know instantly that this sub-graph will have the same shape and behavior as the full graph.

So what does this tell us about the economy? The fact that the economy fits a power law graph shows us that it's operating properly. There's no conspiracy by the richest 1% to keep the other 99% down. Just like there's no conspiracy by the top 1% of websites to keep the other 99% down. The trends and actualities of the distribution of wealth is natural. 


We could conjecture for years about why this happens, and likely none of us would be right. But the point I want to make is that we need to get past this notion of fair and balanced. What makes a stable equilibrium? The video points out several "ideal distributions", but without explaining why or how they should be ideal. What are the forces that are supposed to keep income evenly distributed (or at least linearly distributed)? 


However there is another way of looking at it. Since the entire graph is fractal, that means that everyone on the list can get a significant gain from a small increase in position. Going from a position at 80% to 81% gives a 6% return. Going from 20% to 21% (bottom 20% up one slot) gives a 2.5% return. So what does that mean?

This power-law model favors those who try to advance themselves. By moving up a fairly small amount you can get good gains. The harder it is to move up (meaning that there are fewer people infront of you to pass), the more the gains that are available. It promotes growth by rewarding it significantly. It doesn't punish those in low positions, but instead it doesn't reward people who don't want to move up (advance)... Is that right? It depends on your priorities and sense of school-yard justice...

If you want to know more about power laws and networks, I HIGHLY recommend the book Linked: How Everything Is Connected to Everything Else and What It Means.