540 karma · joined Oct 12, 2011 (15y ago) · 101 submissions
Also run a site about classical guitar, my instrument: http://www.classicalguitar.org/
Email: chris {AT} classicalguitar.org
comment 4y ago · link · parent
Info/debug level logs sure, I don't disagree. As long as there is some built in or community standard logger and not the libraries own custom thing.
Errors, I'd rather they throw and my own app's logging facilities kick in that can provide more context: which server, which container, request info (method, path, request ID), etc. Granted some of that could come from configuring a logger with it.
comment 4y ago · link · parent
For something like a library: no logging, that's not a library's job -- unless it's a logging library! If the language has exceptions, then throwing only subclasses or implementations of a single exception parent/interface from the entire library is nice for clients of the library.
comment 6y ago · link · parent
As far as bedtime/sleep stuff: I pretty much just wind down after the kids go to bed. Meditate if I haven't got that in yet (or maybe do a shorter session if I have and am feeling stressed). Read. Then try to get to bed early enough to give myself an 8-ish hour sleep window.
comment 7y ago · link · parent
> Can you describe the practical benefit?
For a test case that produces a bug, you might find the bug manually. Getting that manual process into a test case is often a chore, but in doing so you'll better understand how the system with the bug failed. Did it call collaborators wrong? Did something unexpected get returned? Etc. In those cases, I think the benefit really is a better understanding of the system.
> Do you happen to rewrite the tests completely while doing the implementation?
A TDD practicioner will probably tell you taht you're doing it wrong if you do this. You write the minimum viable test that fails first. It might be something simple like "does the function/method exist". You add to your tests just in time to make the change in the real code.
comment 9y ago · link · parent
This is coupled with a move away from cookies[0].
0. https://adwords.googleblog.com/2017/01/making-youtube-better...
comment 9y ago · link · parent
PMG is looking for some senior-level engineers to help us build in house advertising tools. These are usually more than just web apps and tend to be fairly interesting to work on. PMG works with a lot of high end fashion/retail and travel clients (https://www.pmg.com/clients/).
Lots of freedom to choose your own technologies, but we use a lot of PHP (Symfony, Doctrine), Python, JavaScript, and Go currently along with the usual mix of databases (Elasticsearch, MongoDB, MySQL, PostgreSQL, Redis).
- https://www.pmg.com/careers/positions/#job/05bbd107-30fc-4fa...
- https://www.pmg.com/careers/positions/#job/ce0c5068-3625-479...
- https://www.pmg.com/careers/positions/#job/bc07d1f3-46dc-4d3...
11.
On the Myth of the 10X Engineer and the Reality of the Distinguished Engineer(redmonk.com ↗)
1 points · by chrisguitarguy · 9y ago · discuss
comment 11y ago · link · parent
There's a lot more opportunity to do messaging between businesses and individuals (eg. customer service) as well -- see messenger for business.
Not saying Facebook isn't out to sell ads, just that there's probably a lot of reasons that Facebook might want WhatsApp's technology and team. Especially as they try to move more conversations onto their platform and reach out into other markets.
comment 11y ago · link · parent
comment 12y ago · link · parent
Write adapters or facades that wrap external libraries, use those in your own code's unit tests. This makes you less bound to a specific library as well. Don't mock the outside world [0] for testing your adapters/facades/whatever, but do integration tests that cover your adapters using the real outside world.
You'd also do complete end to end tests where the entire system is used as if it were in production (acceptance testing). TDD makes a lot more sense if you think of it in those three layers: acceptance, integration, unit.
[0] Outside world means anything that's not your code -- networking, filesystem, external libraries, etc.
comment 12y ago · link · parent
> I'm proud to release the result of a Facebook-sponsored study on the feasibility of using the RPython toolchain to produce a PHP interpreter. The rules were simple: two months; one person; get as close to PHP as possible, implementing enough warts and corner cases to be reasonably sure that it answers hard problems in the PHP language. The outcome is called Hippy VM and implements most of the PHP 1.0 language (functions, arrays, ints, floats and strings).
comment 12y ago · link · parent
Named after the software that powers the wiki.
comment 13y ago · link · parent
remove_action('init', 'wp_cron');
Then just set up your own real cron job to run the `wp-cron.php` script however often you'd like.> If your site gets a large influx in traffic the server runs wp-cron for every page hit and further slows things down.
Which involves a single database hit and a `foreach` loop. Or, if you're using an external object cache (memcached, APC, etc), no DB hits.
Probably not as dire a situation as it seems. This...
> If your site gets no traffic then it doesn't run at all.
...is a huge problem.
comment 13y ago · link · parent
This is true for WordPress, which uses PHPass. You have to replace `wp_hash_password` to get WP to use bcrypt: http://wptip.me/wordpress-bcrypt
comment 13y ago · link · parent
https://github.com/ircmaxell/password_compat
Written by Anthony Ferrara, the same guy behind the `password_*` API in PHP 5.5
comment 13y ago · link · parent
If you're thinking in terms of PHP's primitive types, then yes: that's probably the best equivalent. PHP has the whole objects always being "passed by reference" [0] thing going on too.
comment 13y ago · link · parent
Or you can build reasonably powerful abstractions over top of it that let you get a lot of stuff done quickly.
The power of the settings API is users can go in and remove fields. This plugin I installed has a field I don't want to show to my client? Let's just remove it. And we can do that without editing the plugins files directly and keep it safe for upgrading.
comment 13y ago · link · parent
Look in the theme's directory for `wp_deregister_script` and see if anything was deregistered and re-registered (`wp_register_script`).
> Wordpress hasn't adequately documented which APIs are stable and not
If it's it in a major release, it's stable. When you buy any piece of software you're relying on its author knowing "the right thing to do (tm)". The author of the commercial theme thought it was okay to replace some bit of core javascript and din't bother to check on it. Or they didn't bother to be specific about it -- only do custom JS stuff on their theme's options page or on the front end. It's easy to do that, but you have to know how to do it (it's not documented in the Codex).
comment 13y ago · link · parent
location ~ "(^#.*#|~|\.sw[op])$" {
return 401;
}
Or something along those lines.Nodesocket's answer is good as well: http://news.ycombinator.com/item?id=5164017
comment 13y ago · link · parent
Replaces and error page in WordPress with a search for the request URI. Now we just need someone at jQuery HQ to use it.
Still uses WP's built in search functionality, which is less than great.
comment 13y ago · link · parent
Ubuntu 12.04 uses version 3.2, 12.10 is on kernel 3.5.