Categories News

Annual cost of clean water for every human

According to a 2010 WHO-backed study the cost of safe water for every human would be about 10 billion US dollars per year. The UK government revenue for 2010-2011 was about 639 billion US dollars. I would vote for a political party proposing to raise this money and…

Read More
Categories News

Planet Code updates – Andy Balaam’s Blog

Add a comment Your comment Comments welcome. I review them manually, so there will be a delay before they appear. Markdown is allowed. To prevent spam, please type ‘Scheme’ below: Andy’s home page Categories Sitemap RSS Feed No AI was used to create this site or any of…

Read More
Categories News

Make Android Gradle display unit test failure messages

May 10, 2017 [Android, Gradle, Java, Tech, Test Driven] By default, Gradle does not show you what happened when a unit test failed: $ ./gradlew test ... MyTest > Black_is_white FAILED org.junit.ComparisonFailure at MyTest.java:6 ^^^ WHAT ACTUALLY FAILED???? ... This is insane, and can be fixed (thanks to…

Read More
Categories News

C++ iterator example (and an iterable range)

May 11, 2017 [C++, Tech] Series: Iterator, Iterator Wrapper, Non-1-1 Wrapper To make your own iterable range in C++ that you can loop over or make a vector out of (mine is called Numbers): // Prints: // 3,4, for (auto n : Numbers(3, 5)) { std::cout << n…

Read More
Categories News

How to write a programming language ACCU talk

My talk from ACCU Conference 2017 where I describe a tiny programming language I wrote: Slides: How to write a programming language Cell source code: github.com/andybalaam/cell PakarPBN A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used…

Read More
Categories News

C++ iterator wrapping a stream not 1-1

May 17, 2017 [C++, Tech] Series: Iterator, Iterator Wrapper, Non-1-1 Wrapper Sometimes we want to write an iterator that consumes items from some underlying iterator but produces its own items slower than the items it consumes, like this: ColonSep items("aa:foo::x"); // Prints "aa, foo, , x" for(auto s…

Read More