The JSON data is in the following format
{
"Genesis": {
"1": {
"1": "In the beginning..." ,
"2": "..."
| require 'rubygems' | |
| require 'yaml' | |
| # A demonstration of YAML anchors, references and handling of nested values | |
| # For more info, see: | |
| # http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/ | |
| stooges = YAML::load( File.read('stooges.yml') ) | |
| # => { | |
| # "default" => { |
| [user] | |
| name = Pavan Kumar Sunkara | |
| email = [email protected] | |
| [core] | |
| editor = vim | |
| whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
| [sendemail] | |
| smtpencryption = tls | |
| smtpserver = smtp.gmail.com | |
| smtpuser = [email protected] |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| $logger = new Logger('test logger'); | |
| $memoryStream = fopen('php://memory', 'w'); | |
| $memoryHandler = new StreamHandler($memoryStream); | |
| $logger->pushHandler($memoryHandler); | |
| // your code | |
| rewind($memoryStream); | |
| $logs = stream_get_contents($memoryStream); |
| <?hh | |
| class Fetcher { | |
| // async function: http://docs.hhvm.com/manual/en/hack.async.php | |
| // return type annotation: http://docs.hhvm.com/manual/en/hack.annotations.introexample.php | |
| // generics: http://docs.hhvm.com/manual/en/hack.generics.php | |
| public async function fetch(string $url) : Awaitable<int> { | |
| $ch1 = curl_init(); | |
| print "get $url \n"; |
| <?hh | |
| // Based on https://gist.github.com/chregu/9740519 | |
| class Fetcher { | |
| // async function: http://docs.hhvm.com/manual/en/hack.async.php | |
| // return type annotation: http://docs.hhvm.com/manual/en/hack.annotations.introexample.php | |
| // generics: http://docs.hhvm.com/manual/en/hack.generics.php | |
| public async function fetch(string $url) : Awaitable<array> | |
| { |
| <?php | |
| class Foo { | |
| private $bar = "private variable 1"; | |
| private $bar2 = "private variable 2"; | |
| } | |
| $foo = new Foo; | |
| echo current($foo)."\n"; |
Uncle Bob, the well known author of Clean Code, is coming back to us with a new book called Clean Architecture which wants to take a larger view on how to create software.
Even if Clean Code is one of the major book around OOP and code design (mainly by presenting the SOLID principles), I was not totally impressed by the book.
Clean Architecture leaves me with the same feeling, even if it's pushing the development world to do better, has some good stories and present robust principles to build software.
The book is build around 34 chapters organised in chapters.