Navigation: Page 1 | Page 2 | Page 3 | Page 4 | Page 5

September 07, 2006

Language Links

Python Related

  • Python Unit Testing Tools
  • Of snakes and rubies; Or why I chose Python over Ruby
    I have already made my choice 5 years ago over Java, PHP, Perl, JavaScript, Visual Basic. I'm sure like other developers, we haven't regretted it yet. (knock-on-wood). The link is a write-up of the path of someone else making the choice.
  • Python Infrequently Answered Questions
  • pyNSource - class diagramming tool
    This is great for reverse-engineering existing code or just to give a framework diagram of existing code.
  • HappyDoc - Python Documentation Extraction Tool
    I had used this successfully back in 2002 and decided to try it again. It didn't work for me with ActiveState's Python 2.4 distribution. Hmm, I wonder why.. then again the last release of HappyDoc was quite a few years ago too. pydoc (which is now included in the regular python batteries distribution) gives about the same functionalities. I will stick with pydoc just to simplify matters.
  • IPython
    Like above, I checked this out some time back but since it didn't automatically come with the Python distribution, my usage of the tool didn't stick. However, as I will be using Python more regularly now, there are several issues relating to the standard Python Shell that needs scratching. The latest IPython was just release in June. Hopefully it will alleviate the itching from the standard shell.

Other Languages

  • programming APIs in different languages
    This is a good reference for programmers.
  • PHP shell
    Have I ever mentioned how useful an interactive shell is for rapid development cycles? Everytime I talk to other PHP folks, the topic comes around debugging a script that crashed while executing on the server. Our concensus was that the only option is the printf statement. Yuck!!!

Just Useful Tools

  • TextRep - Text Replacement across multiple files.
    Visual Studio has a text replacement function that is applied across multiple files. After working with Python regularly and editting with plain-ole-editors, the loss of this function is making itself felt. This free and relatively miniscule tool helps alleviate the problem.
  • Free compilers: Turbo Delphi, C++, C#
    It's wonderful that Borland is deciding to release free versions of these tools.

May 25, 2006

updated Stock Quotations

I got tired of coming back to the Yahoo page just to check on stock quotes. This is a small program that gathers and updates stock quotes from Yahoo Finance. It utilizes HTTP to obtain the quotes so will work through corporate firewalls.


Installation instructions:

  • unzip into a new directory
  • create an icon that points to app1.exe
  • Edit symbols.lst using NotePad to include the stock symbols that you choose.


  • It can only gather while the market is open. Note that Yahoo uses a delayed quote system where each quote is about 15 minutes old and not exactly realtime.
  • The list is limitted to 5 symbols.
  • It queries and updates from Yahoo each minute. To do so immediately, click "update"
  • Don't muck with the menus, they don't work.
  • I apologize for the large file. It is a result of py2exe packaging for windows programs.
  • Do with it what you will; it is just a good use of wxPython and Yahoo web-services together on a Win32 platform.
  • Disclaimer: to the best of my knowledge, the program only performs what is stated above.
Posted by Hoang at 09:23 AM | 1 Comments | Python Programming

May 04, 2006

some links of interest

  • Five Truths about Code Optimization
    This is a very good read to pass along to people working in the realm of programs. A lot about optimizing relies on fighting your first instincts. More often than not, first instincts (about the root cause of the problem) are wrong. Before changing working code, it's important to know that the piece of code being changed is actually causing a problem. Next up is to be confident that the new code you introduce won't cause further instability in the system.

March 31, 2006


This quick idea got flushed out from my habit of coming back again-and-again to the python module library and flipping through its pages to figure out the methods that a module supports. The code-completion feature of modern IDEs is convenient, but all the scrolling that one has to do grew somewhat tiring. Ok, this is what it looks like:


You just type in the module name and all its supported methods get displayed via the dir() function. It only displays the top-most level hierarchy of the module. However, many times it is good enough; and the purpose here is to present a cheat sheet of the module.
This quickie tool requires wxPython. You need this installed to run it. Much of the code is generated from using Boa Constructor. It makes use of Python's dynamic import mechanism. You can download the 2 source files that are zipped here. Execute from the command-line by running

March 10, 2006

Does Python cause suffering via the Tyranny of Choice?

First of all, Tyranny of Choice is a condition of American society that psychologist Barry Schwartz has been trying to make the us aware of. It basically says that having some choices in our decision making process is good, but having too many choices cripples us. Having many choices, we are immensely pressured to not make a wrong choice. (who in their right mind wants to be the idiot making a wrong decision?) The process of making the right choice takes up so much of our time, effort, and causes a great amount of frustration. Multiply this by the number of things we have to make decisions on: what kind of pancakes for breakfast, what kind of coffee at Starbucks, what kind of dressing on the salad.... and the list goes on-and-on within the routine that is our everyday lives. It is a wonder we can ever get through our day at all.

In terms of developing computer programs with Python, there is a great benefit in that it include a large set of batteries/library to leverage your program off of. In addition, there is a plethora of 3rd party libraries that we could leverage from. This can be seen as a boon.

However, I am noticing the Tyranny effect happening. My previous difficulty in choosing a networking library is one instance. If you do GUI programming, your array of choices are: TK, wxPython, PythonCard, BOA, QT, EasyDialogs, Wax, .... and the list goes on. Someone else can probably make a list of the array of choices available for web-frameworks or even Templating.

I am going to say that this is just a general observation so that it won't invoke backlash from proponents of Python. I don't want to start a word war just because of an observation. But the pattern is there. Even the Effbot noticed: we really don't need eight ways to open the trunk.

3-17-06 . Addendum: There was a jot previously of the opposite effect in - Monopolies and software resuse. Contrary to popular thought, this is where monopolies might just be good for you.

Posted by Hoang at 11:55 AM | 14 Comments | Python Programming

March 08, 2006

Old Python Programs breaking

It has been 3 years since I have done any programming with wxPython. In order to refresh myself, I bring out an old project and try to execute it. It crashes with various Exceptions and as I fix each one, another just takes its place. In this instance, it was that wxPython was changing its interfaces fairly recently.

Let's just ignore the specifics and just notice the general behavior that python projects just seem to break over time. As much as I enjoy working with Python, again-and-again this scenario arises. Some source code even stopped working when a new Python distribution is released. Have other people experienced the same? If you have, what do you do about it? The realization of hearty efforts put into development can easily go down the drain in the pretty near future disturbs me.

Posted by Hoang at 07:48 AM | 7 Comments | Python Programming

February 28, 2006

More Things Python

Python apparently has slowly increased its momentum over the past few years. I am not sure how well it is accepted in corporations. Is it acceptable to mention it more than casually above a whisper? There are more books about it in the bookstores. Here are some of the big names in Python that are now working for Google: Alex Martelli & Guido van Rossum. Are there anymore that I don't know of?

These are some of the more interesting links recently:

February 05, 2006

Why Twisted?

I am expecting to do lots of socket programming to implement some new protocols in the near future. Having seen the ugliness of the C++ code, I have chosen to use the Python batteries (i.e. socket and thread classes built into the python library) to lessen the amount of code that would have to be written. After a couple of days at it, the code is flowing decently.

Today, I am perusing an O'Reilly book at Barnes and Noble about the Twisted Framework. I have looked at Twisted before but never really paid close attention. After perusing the book, I still have that question on my mind: What does Twisted give us that we can't already get from the python library? FTP, sockets, threading, NNTP, POP3, etc....every protocol that Twisted provides seem to be available as some class already existing in the library. The example programs given (written against the framework), were about the same length as when written with the Python Libraries.

Again, why Twisted?

Navigation: Page 1 | Page 2 | Page 3 | Page 4 | Page 5