
7 Ways to be a Better Programmer in 2014
Great tips to help you sharpen your skills
Coders make resolutions, no? If your to-do-better list is still empty, consider these ideas from other programmers to put to use in the New Year. Even the smartest folks have room to grow. The following excerpts are contained in the book 97 Things Every Programmer Should Know edited by Kevlin Henny.

Snow and Fire Make Light
Ice lanterns give you a reason to look forward to the cold
A few years ago, muttering about how incapable I was of creating anything beautiful, I decided to try something that seemed simple but different. I’d seen candles lighting up the winter night in containers of ice, and remembered how the candles’ movement combined with the variations in the ice to make something ever-changing and unique.
I ordered some star-shaped ice lantern molds, and set about doing something fun with the Upstate New York winter. They were a little smaller than I expected, but even my initial experiments turned out well. With a votive candle inside, they were easily visible from both my house and the road, flickering and different from the LED lights on the house.

Function = Var + Return: A Functional Style of JavaScript Programming
Functional Programming with JavaScript isn't as hard as you think
Functional programming, for most working programmers, is exotic. I’ve been experimenting with it as a way to get cleaner code and to expand my mind a bit. Here I describe a minimal approach to JavaScript which makes it intensely functional.
Functional programming avoids side effects (also known as state or mutable data) by using functions that operate on other functions. It emphasizes expressions over commands, and computation over assignment. There are lots of functional languages, including Lisp (the original) and XSLT (the one I happen to know best).
JavaScript is a flexible language with first-class functions, so it supports a functional programming style. Usually people do this with a library such as Underscore.js
, which provides array operations like “map” and “reduce” and function operations like “bind” and “compose”. This is very cool. For example, when you use “map”, you work at a higher level of abstraction. You don’t have to worry about a temporary index variable for iterating over the array, so the code becomes shorter and clearer.

Preventing Problems in PHP Security
Taking a look at the usual suspects: SQLi, XSS & CSRF
As any PHP developer that’s been around for a while will tell you, there’s a certain kind of stigma that comes with the language. They’ll hear it from their peers using other languages that PHP is “sloppy” or that “it’s just a scripting language, not a real one.” There’s one other that seems to follow the language around as well—that it’s insecure. Sure, PHP’s not without its problems—but any language is going to have its share. Ruby’s had several major vulnerabilities in the press lately and Java has definitely had its own list over its extensive lifetime. People put down PHP for not being secure, but they forget that it’s not the language that makes for insecure code, it’s the developer.
PHP, by its nature is “meant to die” at the end of every request, so the developers don’t have to worry about some things that more persistent languages do. There’s still some common dangers, though, that you as a PHP developer should be aware of. The most common ones come from the well known OWASP Top 10 list. Here’s a quick look at how to help prevent just a few:

Declare and It Happens
CSS already making Web code more approachable
Last week, I wrote about the need to make programming, at least much programming, more accessible. I was thinking in terms of business processes, so spreadsheets and flow-based programming sprang to mind. Today, though, Jeremy Keith reminds me that on the Web, we already have much of that world in Cascading Style Sheets (CSS).
“Being a programming language” was never a goal for CSS, which pushed the opposite direction in contrast to Netscape’s JavaScript Style Sheets. There are moments, of course, when developers wish otherwise, and the SASS and LESS preprocessors can give them more functionality. As Keith points out, however:
There are a lot of really powerful programmatic concepts that we could add to CSS, all of which would certainly make it a more powerful language. But I think that power would come at an expense.
Right now, CSS is a relatively-straightforward language.
I suspect some readers are scratching their heads, wondering why CSS is even being considered a language, much less why adding programming features to it would be a bad thing. If you think of CSS as a simple object-manipulation language, though, it fits pretty neatly into the sweet spot I described last week.

Tim O’Reilly Urges Developers and Entrepreneurs to Make Moonshots
OSCON Mainstage Talks: Create more value than you capture
At OSCON 2013, Tim (@timoreilly) asked us to aim higher and work on difficult problems while highlighting the most important trends that should be guiding open source developers and entrepreneurs. To illustrate his points, he offered up great examples from companies as diverse as Google, Square, Wikipedia, and O’Reilly Media.
Read more…

Email: The Internet’s First and Last Killer App
I’m dating myself here, but I remember a time when AOL was obviously going to replace email (or at least that’s what the pundits and day traders told us). Standard Internet email was clearly too anarchic, uncontrolled, and uncommercial to be suitable for real business. Now that email was escaping the ivory towers of academia, it had to be owned and managed by a corporation. That…didn’t happen.
A few years later, MySpace was obviously going to replace email. Email was only used by old fogies like myself. Anyone under 18 didn’t send or read email; and as teenagers grew up, graduated from college, and joined the work force, email was going to fade away much like Usenet news before it. That also…didn’t happen.

Update Mobility: The Year in Mobile
Plus ?a change, plus c'est la m?me chose.
As the end of December approaches, it’s time to take a look at the year that was. In a lot of ways, 2013 was a status quo year for mobile, with nothing earthshaking to report, just a steady progression of what already is getting more, um, is-y?
We started the year with Apple on top in the tablet space, Android on top in the handset space, and that’s how we ended the year. Microsoft appears to have abandoned the handset space after a decade of attempts to take market-share, and made their move on the tablet space instead with the Surface. In spite of expensive choreographer board room commercials, the Surface didn’t make a huge dent in Apple’s iPad dominance. But Microsoft did better than Blackberry, whose frantic flailing in the market has come to represent nothing so much as a fish out of water.

The Future of Monitoring Data is In the Cloud
Scale and complexity call for leaving it to specialists
As applications move from on?premise to SaaS, the scale of deployments increases by orders of magnitude (to “web?scale”). At the same time, application development and operation become tightly integrated and continuous deployment brings the frequency of updates down from months to days or even hours.
The larger scale makes the health of SaaS applications mission-critical and even existential to its providers, while the frequent updates increase the risk of failures. Therefore, monitoring and root cause analysis also become mission critical functions, and more instrumentation is needed to ensure the application’s quality of service. At the company I co-founded, we see customers using extensive and often tailored instrumentation that generates massive amounts of data (think hundreds of thousands of data streams and billions of data points per day).

Bringing Programming Out of Its Temples
If everyone should learn to code, code needs to change
2013 may have seen a tipping point for the popularity of programming. Even people who aren’t programmers are suddenly arguing that it’s a good idea for everyone to learn programming. Computers are now everywhere, traveling with us, common in places where they would once have seemed an extravagance, and it seems obvious that we need to be able to do more with them.
Anil Dash looked beyond the basic vision of teaching everyone to code this week. Dash leads with President Obama’s encouragement of computer science as part of this week’s Hour of Code project, and his suggestions to young Americans:
“Don’t just play the latest video game. Make one.
Don’t just download the latest app. Help design it.
Don’t just play on your phone. Program it.
(It’s not just the President—it’s House Majority Leader Eric Cantor too.)
It is, of course, harder than that. I love Dash’s piece, which reflects on the value of code, the challenges of crossing tech culture boundaries, and the need for tech culture itself to support and make more valuable such efforts at democratizing coding. I shared it on Facebook, happily citing the part about: