Posts Tagged ‘github

29
Jul
14

UnitC++

This post is an introduction to a library I have written, UnitC++.

UnitC++ is a modern, light weight, header-only c++ library for making unit testing easy. The intention of this library is to make it really easy to test c++ code in a portable way.

 

Continue reading ‘UnitC++’

Advertisement
18
Apr
13

Resource Acquisition is Initialization (RAII)

This post will be about the Resource Acquisition is Initialization (RAII) pattern which is a creational pattern. This is going to be the first non Gang of Four pattern I will write about.

The Purpose

The idea behind this pattern is to correctly dispose of all the resources that you acquire. This pattern was first written about by Bjarne Stroustrup, the creator of C++. The most common examples of this pattern are in opening and closing files and web sockets. It is also important in controlling mutexes so you can write tread safe code.

Continue reading ‘Resource Acquisition is Initialization (RAII)’

22
Feb
13

Iterator Pattern

This post will be about the Iterator pattern which is a behavioural pattern.

The Purpose

The idea behind this pattern is to have an object which you can loop over without needing to know the internal representation of the data. While in python nothing is private so you can find out the internals of the class, the iterator pattern gives you a standard interface.

Continue reading ‘Iterator Pattern’

21
Jan
13

Builder Pattern

This post will be about the Builder pattern which is a creational pattern.

The Purpose

The idea behind the builder pattern is to abstract away the construction of an object so that many implementations can use the same builder. This separates the construction logic of the desired class from it’s representation.

Continue reading ‘Builder Pattern’

21
Jan
13

Strategy Pattern

The strategy pattern is a behavioural design pattern. This means that it is a common communication method between objects and not concerned with how those objects are created or structured.

The Purpose

The idea behind the strategy pattern is to encapsulate the implementation details of an algorithm and make them interchangeable. This gives more flexibility in how an object can be used and enables each algorithm to be tested independently of the calling object.
Continue reading ‘Strategy Pattern’

07
Jan
13

Facade Pattern

This is the first of actual posts in my series on design patterns in python.

This will be about the Facade pattern which is a structural pattern.

The Purpose

The facade pattern is used to make one object with a simple interface represent a complicated system. The problem often occurs in programming where you have a series of interconnected classes where the functions must be called in a certain order or have complicated interdependencies.

This pattern is to give a standard interface to such a system, so you don’t have to rely on reading how you call the system in one of the files or look at example usage.
Continue reading ‘Facade Pattern’

07
Jan
13

Design Patterns in Python

This post is 2 things;

  1. A statement of intent
  2. An apology for inaction

Recently this blog has not been nearly as active as I would like it to be. This is due to many things but mostly me simply being very busy.

So that’s the apology done, now for the statement of intent!

I have intended to write a short e-book about design patterns using the python programming language. This is inspired by the aptly titled Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides who are collectively known as the Gang of Four (GOF).
Continue reading ‘Design Patterns in Python’

17
Sep
12

I’m Back, and This Time There’s Versioning!

It has been a while! Sorry about that but I’ve been on holiday and moving etc, but now I’m back and a lot has changed since I last posted. I have started using distributed version control with git and mercurial via GitHub and BitBucket. This means that you don’t have to just look at my code on Box with it’s limited syntax editing and no versioning. Now you can see exactly what I’ve been up to! Continue reading ‘I’m Back, and This Time There’s Versioning!’

16
Jul
12

Finding Primes: Part I

Over the last week or so I’ve been working on some old code of mine. As the title of this post suggests it is to do with that odd pastime of mathematicians: finding prime numbers. I have made a few attempts to make lists of prime numbers over the years in numerous different ways. This is a small introduction to what will no doubt be a small series of many posts. This is an on going work in C++ although I’ll also be writing about an implementation I wrote in Python and a discussion of why I no longer use it for large calculations. During this process I have also taught myself to use git and in particular GitHub. So if you are interested in being ahead of my posts here is my GitHub and in particular this project.




Call Me
Endorse davidcorne on Coderwall

Categories

Copyright


© 2013 by David Corne.

Creative Commons License

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.