Pages tagged #cplusplus

by . Last updated .

1. Friday 8th May 2015
Friday 8th May 2015: 10.27am. Link shared: http://cppnow2015.sched.org/event/37beb4ec955c082f70729e4f6d1a1a05#.VUuMqvkUUuU As part of publicising my C++ Now 2015 talk next week, here is part 3 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:3. PORTABILITY: Strongly consider trying your library on Microsoft Visual Studio 2015More than half the libraries reviewed had no support for Microsoft Visual Studio, and only supported GCC and clang. When the authors were asked why, in many cases it was simply assumed that MSVC didn't implement much C++ 11/14 and the authors hadn't attempted MSVC support. ...

2. Saturday 9th May 2015
Saturday 9th May 2015: 12.28am. Link shared: http://cppnow2015.sched.org/event/37beb4ec955c082f70729e4f6d1a1a05#.VUuMqvkUUuU As part of publicising my C++ Now 2015 talk next week, here is part 4 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:4. QUALITY: Strongly consider using free CI per-commit testing, even if you have a private CIDespite that Travis provides free of cost per-commit continuous integration testing for Linux and OS X, and that Appveyor provides the same for Microsoft Windows, there were still libraries in those reviewed which made use of neither and furthermore had no per-commit CI testing whatsoever. ...

3. Monday 11th May 2015
Monday 11th May 2015: 6.01pm. Link shared: http://clang-analyzer.llvm.org/scan-build.html As part of publicising my C++ Now 2015 talk next week, here is part 5 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:5. QUALITY: Strongly consider per-commit compiling your code with static analysis toolsIn Travis and Appveyor it is easy to configure a special build job which uses the clang static analyser on Linux/OS X and the MSVC static analyser on Windows. ...

4. Monday 11th May 2015
Monday 11th May 2015: 6.05pm. Link shared: http://cppnow2015.sched.org/event/37beb4ec955c082f70729e4f6d1a1a05#.VUuMqvkUUuU As part of publicising my C++ Now 2015 talk next week, here is part 6 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:6. QUALITY/SAFETY: Strongly consider running a per-commit pass of your unit tests under both valgrind and the runtime sanitisersIn Travis it is highly worth adding a special build job which runs your unit tests under:valgrind memcheck (Linux only)This detects illegal reads and writes, use of uninit values, use of unaddressable memory, illegal/double frees, and memory leaks. ...

5. Monday 11th May 2015
Monday 11th May 2015: 6.06pm. Link shared: http://llvm.org/docs/LibFuzzer.html As part of publicising my C++ Now 2015 talk next week, here is part 7 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:7. SAFETY: Strongly consider a nightly or weekly input fuzz automated test if your library is able to accept untrusted inputIf your library can consume any form of serialisation or parameters supplied from a network or file or query, including any regular expressions or any type of string even if you don't process it yourself and hand it off to another library, then you need to be doing input fuzz testing for a few hours weekly. ...

6. Monday 11th May 2015
Monday 11th May 2015: 6.12pm. Link shared: http://cppnow2015.sched.org/event/37beb4ec955c082f70729e4f6d1a1a05#.VUuMqvkUUuU As part of publicising my C++ Now 2015 talk next week, here is part 8 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:8. DESIGN: (Strongly) consider using constexpr semantic wrapper transport types to return states from functionsThanks to constexpr and rvalue refs, C++ 11 codebases have much superior ways of returning states from functions. ...

7. Tuesday 12th May 2015
Tuesday 12th May 2015: 5.46pm. Link shared: https://github.com/boostorg/test As part of publicising my C++ Now 2015 talk next week, here is part 9 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:9. MAINTENANCE: Consider making it possible to use an XML outputting unit testing framework, even if not enabled by defaultA very noticeable trend in the libraries reviewed above is that around half use good old C assert() and static_assert() instead of a unit testing framework. ...

8. Tuesday 12th May 2015
Tuesday 12th May 2015: 5.49pm. Link shared: http://ispras.linuxbase.org/index.php/API_Sanity_Autotest As part of publicising my C++ Now 2015 talk next week, here is part 10 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:10. DESIGN/QUALITY: Consider breaking up your testing into per-commit CI testing, 24 hour soak testing, and parameter fuzz testingWhen a library is small, you can generally get away with running all tests per commit, and as that is easier that is usually what one does. ...

9. Wednesday 13th May 2015
Wednesday 13th May 2015: 11.10pm. Link shared: https://github.com/ned14/Boost.APIBind/blob/master/include/cpp_feature.h As part of publicising my C++ Now 2015 talk this week, here is part 11 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:11. PORTABILITY: Consider not doing compiler feature detection yourselfSomething extremely noticeable about nearly all the reviewed C++ 11/14 libraries is that they manually do compiler feature detection in their config.hpp, usually via old fashioned compiler version checking. ...

10. Wednesday 13th May 2015
Wednesday 13th May 2015: 11.12pm. Link shared: https://coveralls.io/r/krzysztof-jusiak/di?branch=cpp14 As part of publicising my C++ Now 2015 talk this week, here is part 12 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:12. CONVENIENCE: Consider having Travis send your unit test code coverage results to Coveralls.ioThere is quite a neat web service called coveralls.io free for open source projects which graphically displays unit test line coverage in a pretty colour coded source code browser UI. ...

11. Thursday 14th May 2015
Thursday 14th May 2015: 9.13pm. Link shared: https://boostgsoc13.github.io/boost.afio As part of publicising my C++ Now 2015 talk this week, here is part 13 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:13. CONVENIENCE: Consider creating a status dashboard for your library with everything you need to know shown in one placeI like all-in-one-place software status dashboards where with a quick glance one can tell if there is a problem or not. ...

12. Friday 15th May 2015
Friday 15th May 2015: 4.23pm. Link shared: https://en.wikipedia.org/wiki/Policy-based_design As part of publicising my C++ Now 2015 talk this week, here is part 14 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:14. DESIGN: Consider making (more) use of ADL C++ namespace composure as a design patternMost C++ programmers are aware of C++ template policy based design. This example is taken from https://en.wikipedia.org/wiki/Policy-based_design:#include <iostream>#include <string> template <typename OutputPolicy, typename LanguagePolicy>class HelloWorld : private OutputPolicy, private LanguagePolicy{ using OutputPolicy::print; using LanguagePolicy::message; public: // Behaviour method void run() const { // Two policy methods print(message()); }}; class OutputPolicyWriteToCout{protected: template<typename MessageType> void print(MessageType const &message) const { std::cout << message << std::endl; }}; class LanguagePolicyEnglish{protected: std::string message() const { return " ...

13. Tuesday 19th May 2015
Tuesday 19th May 2015: 5.00pm. Link shared: https://github.com/sakra/cotire As part of publicising my C++ Now 2015 talk last week, here is part 15 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:15. BUILD: Consider defaulting to header only, but actively manage facilities for reducing build timesMaking your library header only is incredibly convenient for your users - they simply drop in a copy of your project and get to work, no build system worries. ...

14. Thursday 28th May 2015
Thursday 28th May 2015: 6.22pm. Link shared: https://github.com/BoostGSoC13/boost.afio/blob/master/include/boost/afio/config.hpp As part of publicising my C++ Now 2015 talk two weeks ago, here is part 16 of 19 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:16. COUPLING: Consider allowing your library users to dependency inject your dependencies on other librariesAs mentioned earlier, the libraries reviewed overwhelmingly chose to use STL11 over any equivalent Boost libraries, so hardcoded std::thread instead of boost::thread, hardcoded std::shared_ptr over boost::shared_ptr and so on. ...

15. Friday 14th August 2015
Friday 14th August 2015: 11.48am. I just crashed my dev workstation hard drive firmware when running the second tutorial program for proposed Boost.AFIO - as in, drive dropped out and was no longer recognised by the system until the next power off. This is rather worrying - SMART says everything is fine, though it's an old drive at 16,800 hours powered on. I think I might run a backup anyway tonight of all 400Gb, better safe than sorry. ...

16. Sunday 16th August 2015
Sunday 16th August 2015: 4.14pm. Got 97% percentile in this IKM online C++ 11 test I had to take for a job interview. I really didn't think much of the quality of the exam, and said so in the feedback form.I also rather like how poor I am at compiler optimisation heh ...#cplusplus #cpp #boostcpp ...

17. Friday 21st August 2015
Friday 21st August 2015: 5.40pm. Just sent proposed Boost.AFIO off for its final CI pass before it is submitted for Boost peer review starting later today and lasting until 31st August. The last few days have been stressful - the new workshop tutorial for AFIO is a step-by-step workshop on implementing an asynchronous key-value store, and that meant running many benchmarks which heavily stressed my mechanical hard drive, which began to hang itself until power cycle. ...

18. Friday 21st August 2015
Friday 21st August 2015: 9.13pm. Location: Dromahane. And proposed Boost.AFIO is submitted for peer review (the one failing test is a test timeout and can be disregarded)!#boostcpp#cplusplus#boostafio ...

19. Sunday 23rd August 2015
Sunday 23rd August 2015: 9.19pm. Yay just got a direct-from-mmap dense hash map implementation working, so this hash table works straight from a memory mapped file which means it can scale out to really huge hash tables - like billions of entries. On modification, it rehashes the entries into a new hash table which can also go straight into a mmap, though I suspect the linear complexity would make modifying billion entry hash tables rather slow. ...


Contact the webmaster: Niall Douglas @ webmaster2<at symbol>nedprod.com (Last updated: 2015-08-23 21:19:36 +0000 UTC)