Programming

Programming languages

I've been programming for years now and have used many languages, here I talk about my favorites. On one level they're all quite similar - if you can program in any one of these, you've cleared the main hurdle; learning another is a smaller effort. There is no 'best' language - this depends on what you use it for. I can't even decide which my favorite is, though it's probably between Perl and Python.

Style Guide

Good code is essentially code that is easy to understand. This is subjective and no guidelines can completely specify it. Indeed, experienced programmers have their own individual style. I think the most important thing is to read over your code, imagining you knew nothing about it, and try to honestly assess if it's easy to understand.

My contribution to open source

As well as the code released on this site, I have contributed to:

Python Programming

Python!

wxPython Tips

  • Create the dialogs as XML resources, using XRCed.
  • If you have written your own customized controls, have them as "Unknown" in the XML, and attach them later using AttatchUnknownControl.
  • If you do any blocking calls, its best to use threads, as otherwise you'll block things repaint messages and the app will appear to have crashed.
  • Use the py2exe -w option to make a Windows .exe that doesn't create a DOS box.
  • Create an exception handler that logs to a file. This will greatly aid debugging if problems are reported.

© 1998 - 2008 Paul Johnston, distributed under the BSD License   Updated:06 Jan 2008