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
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?
- Tests should be very easy to write and run
- They should run relatively quickly
- The order in which tests run should not matter
- Test output should be clean
- It should be obvious where to find tests for a particular piece of code
- Testing code should not be duplicated
- Code coverage should be able to analyze different aspects of the system
In order to generate the SQL for any changes in your Doctrine 2 entities run the following command:
vendor/bin/doctrine-module orm:schema-tool:update --dump-sql
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.
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-Length: ' . filesize($filename));
header('Content-Disposition: attachment; filename="' . $file . '";' );
If you need a quick way to duplicate a table (for testing or whatever) it’s as simple as:
CREATE TABLE newTable LIKE oldTable;
insert into newTable select * from oldTable;
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
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
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.