I haven't actually read the online book (I did read the chapter on the Game Loop that's referenced in this article but this article is a really cool story about creating something really massive.
I really like this piece of advice and agree that this is how you get things done:
Around this time, I’d stumbled onto that article about Jerry Seinfeld’s trick for staying productive. It’s pretty simple: work on it every single day. Don’t break the chain of sequential days.
http://journal.stuffwithstuff.com/2014/04/22/zero-to-95688-how-i-wrote-game-programming-patterns/
When I'm working on a remote server it's sometimes useful to get data out of mysql using the command line mysql client (don't EVERY install phpMyAdmin on a public server) but it's hard to read data from tables that have lots of columns.
Normally, you end up with something like this when you terminate your command with a semicolon (;):
SELECT * FROM User WHERE id = 13;
But if you terminate your command with a \G you end up with the same data in a much more readable format:
SELECT * FROM location_cities\G
I was working on fixing a performance issue on a page that requires a login to work. To work through the issue I wanted to send a bunch of requests to the page using ab but need to have the user logged in. In order to do this you can specify a cookie value using the -C
parameter:
ab -C PHPSESSID=co1d400krhndtumi5orsfr70c4 -n 10 -c 10 http://hostname/controller/action
Between the new addition to my family and health issues I've gotten super behind on my podcasts. I've recently started walking again at night so I've made progress in my giant list of podcasts and I wanted to highlight some episodes that I think people should be hear/watch. I should point out I listen to all of these so I can't comment on the video.
FLOSS Weekly has an excellent podcast on nginx (pronounced Engine X). I've heard about nginx a lot recently and read about it in the Scaling PHP Book and I'll be looking into using it for when we upgrade our servers this summer.
http://twit.tv/show/floss-weekly/283
Security Now has a set of episodes that explain [http://images.apple.com/ipad/business/docs/iOS_Security_Feb14.pdf](this document) that Apple released about security in iOS. Steve read through the document and talks about each piece. I think it creates the gold standard for how we should treat our user's data and it's awesome that Apple is willing to share this information.
I should warn you these total about 6 hours so I wouldn't plan on sitting down and watching them all in one go but they're nice to listen to.
Another Security Now set of episodes that discuss the Heartbleed vulnerability.
Finally, I listened to this podcast about Jasmin for unit testing JS which I'm currently evaluating for my projects.
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
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/
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-type: application/x-gzip');
header('Content-Length: ' . filesize($filename));
header('Content-Disposition: attachment; filename="' . $file . '";' );
ob_end_flush();
readfile($filename);
exit;
subscribe via RSS