Post thumbnail of How to make a dictionary of dictionaries with Python
18 October 2011
Continue reading How to make a dictionary of dictionaries with Python

How to make a dictionary of dictionaries with Python

Create a simple class of dictionaries to make a dictionary of dictionaries. No need for generators, iterators or lambdas. Use a deck of cards for example.

Post thumbnail of Python: two-way thread communication made simple
13 September 2011
Continue reading Python: two-way thread communication made simple

Python: two-way thread communication made simple

You don’t need heavyweight communication layers for very simple message passing between threads in python. It’s pretty simple to use pipes and implement your own thread class.

Post thumbnail of Toggling debug output within a PHP class
6 August 2009
Continue reading Toggling debug output within a PHP class

Toggling debug output within a PHP class

I don’t care what anyone says, I like lots of debug output available in my programs. It helps me crank out code faster with less errors. You can keep a private member called debug and just flip it on and off when you want to see the output. It’s a lot cleaner than interjecting prints and echos all over the place.

Powered by Wordpress   |   Lunated designed by ZenVerse