Downdetector – a weatherman for the digital world

Downdetector is yet another one of those services that monitor major web services and provides and lets you see if any of them is experiencing any issues or outages.

You can search for specific providers or browse by company or issue type.  There’s also a weekly top 10.  What I like in particular are comments for each report, where you can get some feedback from other users experiencing the problem.

 

Creative Commons beta tests new search

Creative Commons is beta testing a new search implementation.  It helps with finding creative work (mostly images for now) that one can use commercially, modify, adapt, and build upon.  For now, it brings the results from a few different sources that you’d have to search separately before – 500px, FlickrMetropolitan Museum of ArtNew York Public Library, and Rijksmuseum.

I’m sure once the functionality and performance are stabilized, more resources and types of creatives will be added.  After all, Creative Commons works with quite a few platforms.

Oh, and if you’ve spent the last few years in a cave and don’t know what Creative Commons is all about, here are a couple of links for you:

Via WordPress Tavern.

 

pds/skeleton is now stable

PHP Package Development Standard, aka pds/skeleton, is now stable.  I’ve linked to it before and I think it’s a great idea and I’m glad I’m not alone:

Roughly 78,000 packages already comply with the pds/skeleton standard, although they may not know it. To formally show that your package has adopted the standard, “require-dev” it via Composer, or display a badge on your README.

I’d gladly follow this standard for my own work too, except that I mostly work with WordPress and CakePHP these days, both of which do things differently from the standard and from each other.

WordPress kind of assumes that the whole project is public, so you don’t really get public/ folder.  It also organizes the code into wp-includes/, wp-admin/ and wp-content/ folders, instead of the src/ suggested by PDS.  And, in terms of configuration, everything goes into wp-config.php file instead of something in the config/ folder.

CakePHP is much closer to PDS in terms of organization of files.  The only difference that I can spot is the use of webroot/ folder instead of the suggested public/.

I’d really love to see larger libraries and frameworks adhere to the PDS, but until that happens, I’ll keep an eye on things.

P.S.: The standards comic strip is of course from xkcd.

PHP assertions

When I hear the word “assertion”, the first thing that comes to my mind is PHPUnit assertions.  Sure, I write assertions in my unit tests.  But is that the only application?  Today I decided to figure it out, or, at least, learn more about the subject.

It turns out that PHP has assert() and assert_options() functions.  And those were there since the ancient times of PHP 4.  Sounds cool, but how useful are these?  Well, not that much:

Assertions should be used as a debugging feature only. You may use them for sanity-checks that test for conditions that should always be TRUE and that indicate some programming errors if not or to check for the presence of certain features like extension functions or certain system limits and features.

Assertions should not be used for normal runtime operations like input parameter checks. As a rule of thumb your code should always be able to work correctly if assertion checking is not activated.

This StackOverflow discussion expands a bit on the subject and concludes that assertions are just a developer tool used for troubleshooting and such. Bummer!

But I’m not that easily stopped.  Next stop – search for tools and libraries on GitHub and Packagist.  There’s more luck here!  A whole lot of different libraries exist that help with asserting facts and matching values to patterns.  I’ve checked a few of them and here’s the Top 3 List that I’m considering for use in my code:

  • beberlei/assert – simple to use library, with a respectable number of implemented assertions.  It supports chained methods, lazy assertions, and is easy to extend.  (See this blog post, announcing version 2 a few years back.) Also, the fact that almost 300 projects depend on it, makes it an attractive choice.
  • nilportugues/php-assert – also an easy to use library, which offers even more assertions, grouped into a number of categories (generic, string, integer, float, array, date and time, object, and file upload).  It’s not anywhere near as popular as the previous option, but that is probably just a question of time.
  • peridot-php/leo – a much more advanced assertion and matching library than the previous two options.  In fact, so much more advanced, that it has a dedicated documentation website.  This is understandable, as this library is a part of the Peridot BDD testing framework.  It is easy to extend too, but I’m not sure yet that I need that level of complexity in my projects.

I found a few more alternatives, but they looked like side projects or small toolboxes for specific needs.  None of those impressed me enough to be linked here.

It’s too late at night to make a decision right now on which project I like the most.  But I will definitely play more with the ones above.  If you have any experience with those or with any other assertion/matching library, I’m interested to hear.

 

Mcrouter: a memcached protocol router

Mcrouter is an Open Source tool developed by Facebook for scaling up the memcached deployments:

Mcrouter is a memcached protocol router for scaling memcached (http://memcached.org/) deployments. It’s a core component of cache infrastructure at Facebook and Instagram where mcrouter handles almost 5 billion requests per second at peak.

Here is a good overview of some of the scenarios where Mcrouter is useful.  There’s more than one.  Here are some of the features to get you started:

  • Memcached ASCII protocol
  • Connection pooling
  • Multiple hashing schemes
  • Prefix routing
  • Replicated pools
  • Production traffic shadowing
  • Online reconfiguration
  • Flexible routing
  • Destination health monitoring/automatic failover
  • Cold cache warm up
  • Broadcast operations
  • Reliable delete stream
  • Multi-cluster support
  • Rich stats and debug commands
  • Quality of service
  • Large values
  • Multi-level caches
  • IPv6 support
  • SSL support

The Most Mentioned Books On StackOverflow

Slashdot links to “The Most Mentioned Books On StackOverflow“.

How we did it:

  • We got database dump of all user-contributed content on the Stack Exchange network (can be downloaded here)
  • Extracted questions and answers made on stackoverflow
  • Found all amazon.com links and counted it
  • Created tag-based search for your convenience
  • Brought it to you

I’ve previously linked to a similar selection of “Top 29 books on Amazon from Hacker News comments“.

Open Source Lawyer as a Career

OpenSource.com runs this article on “What to know before jumping into a career as an open source lawyer“.  Whether or not you are planning to take that path, the article has a few interesting links and quotes.

Recently, at work, we’ve been trying to get a hold of a lawyer with Open Source experience.  Just for the consultation or two.  I wasn’t very optimistic about it, as I had a feeling those are rare beasts.  My suspicion was confirmed to a degree.  But this article reaffirms it even further:

Only a few dozen new grads a year are hired to do anything even vaguely involving open source. Only a few dozen lawyers in the entire world dedicate more than a quarter of their time to open source. Only a lucky handful, like those at Software Freedom Law Center (SFLC) and Software Freedom Conservancy (SFC), work primarily directly for communities and volunteer developers.

The article also links to a couple of books on the subject, which I’m pretty sure I’ll need to buy and read soon, unless we find somebody who is actually a lawyer and has done some work in Open Source space.

The first one is “The Tech Contracts Handbook: Cloud Computing Agreements, Software Licenses, and Other IT Contracts for Lawyers and Businesspeople“.

The Tech Contracts Handbook is a practical, user-friendly reference manual and training guide on cloud computing agreements, software licenses, and other IT contracts. It’s a clause-by-clause “how to” resource, covering the issues at stake and offering negotiation tips and sample contract language.

The Handbook is for both lawyers and businesspeople — including contract managers, procurement officers, in-house and outside counsel, salespeople, and anyone else responsible for getting IT deals done. Perhaps, most important, it uses clear, simple English, like a good contract.

Topics covered include:

  • Software-as-a-service (SaaS) subscriptions
  • Warranties and service level agreements (SLA’s)
  • Data security and privacy
  • Indemnities
  • Disaster recovery (DR)
  • Non-competes
  • Limitations of liability
  • Clickwraps
  • Open source software
  • Nondisclosure agreements (NDA’s) and confidentiality
  • Technology escrow
  • Copyright and other intellectual property (IP) licensing
  • Internet and e-commerce contracts
  • And much more …

The second one is “A Primer on Intellectual Property Licensing“.

A PRIMER ON INTELLECTUAL PROPERTY LICENSING (Second Edition) is a compact, practical guide to one of the most dynamic and popular areas of legal practice today-intellectual property licensing. Developed by an attorney in private practice who specializes in Silicon Valley technology licensing, this guide presents the basic rules of law you need to know for a licensing practice, along with helpful examples of contractual language, practice tips, and insights on custom and practice in the industry. This textbook is appropriate for a law school or business school seminar, or for practicing attorneys who wish to expand their practice into this exciting field. Individual chapters from this text are also available for seminars and CLE presentations (in electronic format).

PHP vs Python vs Ruby: Detailed Comparison

PHP vs Python vs Ruby: Detailed Comparison compares the three popular languages in a variety of categories, such as total market share, large website deployments, usability, learning curve, popularity, performance, etc.  It’s a nice overview if you are about to pick one of these languages for the future projects, or if you are (like me) have been stuck with one of them for a long time, and haven’t really kept an eye on what’s going on in the rest of the world.