About Code Structure

Posted by techstonia on November 25, 2013

From time to time I try to post (mainly for me) some useful information I have found online. So I found a good post on 2+2 poker forum. The post seems like a good summary of what I have been reading in order to improve my skills:

Just focus on refactoring and improving your code. Functions should do one thing. Classes should have one responsibility. Classes should have cohesion – most member functions should operate on most/all of the class variables. Otherwise you can usually split the class into smaller pieces. Functions and classes should be small. Try to limit the use of mutable data.

muttiah on 2+2

Source on 2+2 poker forum

Get an email whenever I publish a new post - no bullshit ever
or follow me on Twitter - @techstonia