Link Post: How ‘DevOps’ is Killing the Developer

Not every company is a start-up. Start-ups don’t make developers wear multiple hats by choice, they do so out of necessity. Your company likely has enough resource constraints without you inventing some. Please, don’t confuse “being lean” with “running with the fewest possible employees”. And for God’s sake, let developers write code!

An interesting article, any company that’s of a decent size shouldn’t be pulling this crap and I’m guessing if they’re having their developers to do this then they’re also a shitty place to work.

http://jeffknupp.com/blog/2014/04/15/how-devops-is-killing-the-developer/ via Reddit

Link Post: 75 Essential Cheat Sheets for Designers and Programmers

I didn’t even know some of these were things (Google Chrome Plus) and I’ve seen a few before (I had the JavaScript and CSS ones printed out when I worked at the NSCL) but the HTML5 one looks really nice and I might actually print it out until I learn the new tags (and unlearn the old ones :-) ).

http://designzum.com/2014/04/03/best-cheat-sheets-for-designers-and-programmers/

Link Post: The Zen of Application Test Suites

Link

This article talks specifically about testing Perl but most of the concepts are relevant to all languages.

I think this is the important point:

[W]hat features do we want to see in large-scale test suites?

  1. Tests should be very easy to write and run
  2. They should run relatively quickly
  3. The order in which tests run should not matter
  4. Test output should be clean
  5. It should be obvious where to find tests for a particular piece of code
  6. Testing code should not be duplicated
  7. Code coverage should be able to analyze different aspects of the system

https://github.com/Ovid/zen-of-test-suites

Link Post: How I Lost My $50,000 Twitter Username

Yet another reason to stop using GoDaddy and PayPay.

My claim was refused because I am not the “current registrant.” GoDaddy asked the attacker if it was ok to change account information, while they didn’t bother asking me if it was ok when the attacker did it. I was infuriated that GoDaddy had put the burden on the true owner.

https://medium.com/p/24eb09e026dd

Quick Tip: Downloading Large Files Through PHP

We wanted to provide a secure download feature to one of the sites I work on and it worked fine with smaller (< 1MB) files but when we tried large files (>550 MB) it would just output a empty file. After some troubleshooting (and a helpful post on php.net) it turns out that because output buffering was enabled it was running out of memory. This is the code that allows for the download to succeeded.

header('Content-type: application/x-gzip');
header('Content-Length: ' . filesize($filename));
header('Content-Disposition: attachment; filename="' . $file . '";' );

ob_end_flush();
readfile($filename);
exit;

Quick Tip: See Local Commits That Haven’t Been Pushed In Git

If I’m switching between a couple projects a lot (which I have been this week) I try to run git status whenever I start working in a project again. Usually, it’s just the files I have failed to commit because I was working on something “really quick” but today I was presented with the following:

# On branch master
# Your branch is ahead of 'origin/master' by 3 commits.
#

I was of course confused because I didn’t remember what it was that I changed but didn’t commit. In order to check this I ran the following command which
gave me exactly what I was looking for:

git log origin/master..HEAD

Only You Can Prevent Zombie Code

I’ve had to take over a lot of crappy code bases in my life and they always have their problems. Poor class (or lack thereof) structure, poor error handling, crappy UIs, lack of unit testing, and the list goes on. One of the more difficult things to deal with is the code that has, for one reason or another, been left in the code base but doesn’t actually run. This is called Zombie Code because, much like the popular monster, it’s not really dead and it’s not really alive it’s just there waiting to bite your face off when you least expect it (by deleting hundreds or thousands of records). Here are some of my favorite varieties. Continue reading

Link Post: Triangulation 125: Ladar Levison

Another interesting interview on Triangulation. This time it’s with Ladar Levison who is the creator of a secure email service called Lavabit. Lavabit was used by Edward Snowden which caused it be noticed by the FBI and was then shutdown by Ladar in order to prevent his secure email service from being not secure. It’s interesting if you’ve followed the NSA revelations and a nightmare if you’re a business owner in the US. He was basically treated like a criminal and because of the heavy handed surveillance we seem to be allowing forced to close his business.

http://twit.tv/show/triangulation/125