Tag Archives: ACCU

ACCU Meetup: A Visual Perspective on Machine Learning, Maksim Sipos

meetup-machine-learningMaksim gave a very interesting presentation on Machine Learning, from his perspective as a physicist.

Machine Learning, AI and NLP are some of the most exciting emerging technologies. They are becoming ubiquitous and will profoundly change the way our society functions. In this talk I hope I can provide a unique perspective, as someone who has entered the field coming from a more traditional Physics background.

Physics and Machine Learning have much in common. I will explain how the two fields relate and how a physical point of view can help elucidate many ML concepts. I will show how we can use Python code to generate illustrative visualizations of Machine Learning algorithms. Using these visual tools I will demonstrate SVMs, overfitting, clustering and dimensional reduction. I will explain how intution, common sense and careful statistics matter much when doing Machine Learning, and I’ll describe some tools used in production.

Maksim used Jupyter Notebooks for the demonstration parts of his talk. It’s a great way to show snippets of code as well as plotting charts – I’ve also been using it for a Python library that I’m working on.

The big take-away was that the audience should think of machine learning as very accessible – although there are hard problems left to research, there are a lot of materials available on the internet and much can be understood readily, especially from a visual perspective.

Leave a comment

Filed under Meetup

ACCU Meetup: Quicker Sorting, Dietmar Kühl

Meetup - Quicker SortingI was lucky to get an invite to this month’s ACCU London meet-up on the topic of sorting. Dietmar Kuhl hosted the presentation at the plush Bloomberg offices on Finsbury Circus. The talk brought together a sample of approaches to speeding up QuickSort:

  • insertion sort
  • sentinel partitioning
  • hand-rolled sorting for small collections

Overall, these changes (and others) made an impressive improvements, such that the combined algorithm rivalled std::sort for sorting std::vectors of integer. However, the algorithm wasn’t as competitive for other important element types such as std::string.

Dietmar intended the talk to be accessible to all, rather than an in-depth presentation using advanced C++ techniques. I think it was a good example of how you can iterate and bring in multiple techniques to optimise an algorithm for a specific use case.

Leave a comment

Filed under C++, Meetup, Programming

ACCU: Overload 127 (June 2015)

Overload127CoverCatching up on back issues of ACCU’s Overload magazine from June 2015, a couple of articles are worth mentioning for future reference:

  • Terse Exception Messages by Chris Oldwood.  Here,  Chris relates his experience of unnecessarily long debugging sessions due to limited error information in exception messages.  Often, this is due to laziness on the part of the programmer, sometimes because they expect to refactor a block of code soon and will come back to “do the error handling later” – then the refactoring never happens.  I see this as a false economy – even during unit testing, having proper error messages in exceptions can speed up your own debugging.
  • Get Debugging Better by Jonathan Wakely.  Here, Jonathan lists a few tips for using GDB effectively, aimed at programmers like me who typically use an IDE.

Leave a comment

Filed under Programming

ACCU: CVU magazine 266

Catching up on back copies of ACCU’s CVU magazine, there was plenty of good material in January 2015’s edition.
CVU Jan 2015

  • Simplicity Through Immutability – Chris Oldwood provides a worked example of the benefits of introducing an immutable type. The example is pretty simple, but experience with F# shows that this approach frequently simplifies logic (most of the time without noticeable performance penalties)
  • Delayed Copy Pattern – Vassili Kaplan compares ways to push huge objects into an STL container, with timings showing that a delayed-copy wrapper is comparable in performance to emplace-back (and the wrapper can be used for older compilers)
  • Standards Report – I was particularly taken by Mark Radford’s note on Operator Dot. At first sight, it could be dismissed as a typical C++ programmer’s wish to overload any operator available, which is currently prohibited for operator dot. However, Bjarne Stroustrup himself is named on the paper, and the motivating case is for ‘smart reference’ classes.
  • Scott Meyers Interview – more than just a subtle book plug, gives an insight into Scott’s introduction to programming and C++.

[The links to CVU articles are accessible to ACCU members only]

Leave a comment

Filed under C++, Programming

ACCU: Introducing Concepts for C++

Overload 129October 2015’s edition of Overload includes an excellent article by Andrew Sutton on Concepts for C++. I first heard about Concepts at the ACCU 2013 conference and it’s exciting to hear that they have reached Technical Specification stage.

There’s no doubt in my mind that concepts will play a huge role for those involved in generic programming. In F#, we already have the ability to state constraints on template arguments e.g. to ensure that ‘T satisfies the comparison constraint:

type Container<'T when 'T : comparison>( items : 'T[] ) =
    // ...

However, I wasn’t expecting the ability to use concepts for placeholders (so that, once you’ve defined a concept, you can use it where you might have used auto to gain the benefits of type deduction without the loss of information).

Leave a comment

Filed under C++, F#, Programming

C++: std::make_array (N4315)

I read in May 2015’s CVU that there’s a proposal for std::make_array, a utility method in the same family as std::make_tuple and std::make_pair.

This would be a useful shorthand:

// Existing usage
std::array<double, 3> a = { 1.1, 2.2, 3.3 };

// Proposed usage
auto a = std::make_array( 1.1, 2.2, 3.3 };

The obvious benefit is that you would no longer need to specify the number of elements in the array, making the code more maintainable.

Leave a comment

Filed under C++, C++ Code

Overload magazine: Order Notation in Practice

Overload 124Roger Orr wrote an excellent article for Overload about complexity measurement. It’s amazing how many candidate for programming roles in general, and C++ roles in particular, aren’t comfortable with order notation. This introduction should be a must read before interviewing!

Leave a comment

Filed under C++, Programming

ACCU Meet-up: Lies, Damn lies and Estimates, Seb Rose

Seb Rose gave an excellent presentation on the difficulty of providing estimates in the software industry. He debunked some myths, including the shape of Cone of Uncertainty, and recommended several books on the subject for further reading:

The Leprechauns of Software Engineering 20141021-143907.jpg

A few other points to take away:

  • We are best at estimating small tasks, so split them into 1, 2 or 3 days tasks
  • Express estimates as a range with a confidence level – 90% confident that will take between 2-3 weeks
  • Communication with stakeholders is most important – assess the impact on upstream and downstream systems

I’ve downloaded the Leprechauns eBook – it’s main intention is to persuade the reader that several views that are taken for granted have not been proven in the literature – such as the Cone of Uncertainty as projects progress (the further into a project, the less error in estimates) and the 10X Programmer (some programmers are ten times more productive).

For what it’s worth, my view on the 10X Programmer issue is that, whilst it’s hard to gather the necessary evidence to compare performance across real world projects, there’s little doubt that some developers add much more value to a project than others. This is true of any human activity – queuing in a coffee shop with a handful of baristas serving while the queue barely moves, it’s usually possible to tell the one person who’s actually getting any work done. On holiday, I watched at a cycle hire place while one guy served at least three times as many families as any other.

It may not be 10X productivity in programming, but a star developer will: eliminate swathes of work by adopting a suitable 3rd party library; consistently check-in code that works (unlike his unproductive colleague who always breaks the build and leaves edge cases untested); produce intuitive user interfaces, reducing the hours of support to train new users.

I have Waltzing with Bears on order – PeopleWare by the same authors was excellent, so looking forward to this one.

Leave a comment

Filed under Meetup, Programming, Soft skills, Technology

ACCU Meetup: Machine Learning for Fun and Profit

I went to the ACCU London Meet-up on 20th March: Burkhard Kloss on Machine Learning for Fun and Profit.

The core message was that Machine learning is an easy technique to invoke these days, especially with 3rd party libraries on hand like Numpy, Sci-kit Learn. The speaker has used these from Python and demonstrated programs to classify the XOR problem and a data set on Iris flowers dating from Victorian times.

Leave a comment

Filed under Meetup, Programming

More interesting topics from ACCU 2013

  • Aleksander Fabijanic talked about Dynamic C++, with reference to rival approaches to representing dynamic types: boost::any, boost::variant, boost::type_erasure, Facebook folly::dynamic and poco::dynamic::var.
  • Stig Sandres presented a way to use boost::coroutines and std::future to emulate “await” from N3564.  This follows on from N3558, which includes the ability to add “.then(…)” to a std::future.
  • I hadn’t heard of reference-qualifiers, which C++11 allows you to put on a method declaration to restrict its use to either l-value or r-value references.  See this post on Stack Overflow.  In particular, there was a proposal to restrict standard library assignment operators to l-values (since it makes no sense to assign to an r-value reference).
  • Russell Winder used std::iota from the standard <numeric> library in an example to populate a container with sequentially increasing values
std::vector<int> elements(10);
std::iota( elements.begin(), elements.end(), 0 );
std::for_each( elements.begin(), elements.end(), 
    [] (int i){ std::cout << i; }); // prints 0123456789

Leave a comment

Filed under C++