<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>PhD on Tony Andrew Meyer</title><link>https://tonyandrewmeyer.com/categories/phd/</link><description>Recent content in PhD on Tony Andrew Meyer</description><generator>Hugo</generator><language>en-nz</language><lastBuildDate>Thu, 19 Nov 2009 20:10:21 +1200</lastBuildDate><atom:link href="https://tonyandrewmeyer.com/categories/phd/index.xml" rel="self" type="application/rss+xml"/><item><title>Dr? No.</title><link>https://tonyandrewmeyer.com/2009/11/19/dr-no/</link><pubDate>Thu, 19 Nov 2009 20:10:21 +1200</pubDate><guid>https://tonyandrewmeyer.com/2009/11/19/dr-no/</guid><description>&lt;p>I finally withdrew from my PhD today (probably many people thought that this had happened some time ago).&lt;/p>
&lt;h2 id="in-the-beginning">In the beginning&amp;hellip;&lt;/h2>
&lt;p>The story really starts in 1999.  I started working consistently while studying, and also got rather bored with the study that I was doing.  I also got involved in the &lt;a href="http://asa.ac.nz">Students&amp;rsquo; Association&lt;/a> - first lightly, then pretty heavily.  As a result, at the end of 2000, I was about 1.5 papers short of finishing my BSc and BBS.  I needed to do half a semester of work, and so I decided to go those at the same time as a Postgraduate Diploma in Science (these went along with running for ASA President).  The ASA job didn&amp;rsquo;t work out, but I did finish the last undergrad stuff I needed to do, and rather unexpectedly found that I really enjoyed the postgrad study.
I was able to do all the papers for the postgrad diploma along with the undergrad work, except for the double-paper research project, in that year.  That meant that the next year started off with finishing off the research project - normally half of a semester&amp;rsquo;s load, but since I didn&amp;rsquo;t have anything else to be doing, I poured in a whole semester&amp;rsquo;s effort into it.  That left me at the middle of the year with everything complete.&lt;/p></description></item><item><title>Tools</title><link>https://tonyandrewmeyer.com/2006/01/03/tools/</link><pubDate>Tue, 03 Jan 2006 11:28:57 +1200</pubDate><guid>https://tonyandrewmeyer.com/2006/01/03/tools/</guid><description>&lt;p>(Moved over from &lt;a href="http://www.massey.ac.nz/~tameyer">my Massey site&lt;/a>.
Future entries will be separate, but in the &lt;a href="http://tonyandrewmeyer.wordpress.com/tag/tools/">Tools&lt;/a> category).
These are the tools that I regularly use, and which I would obviously recommend:
&lt;strong>Coding&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="http://python.org/">Python&lt;/a> is my preferred programming language.&lt;/li>
&lt;li>&lt;a href="http://starship.python.net/crew/mhammond/">Mark Hammond&amp;rsquo;s pywin32 extensions for Python&lt;/a> are invaluable, especially the PythonWin IDE.&lt;/li>
&lt;li>&lt;a href="http://py2exe.sf.net/">py2exe&lt;/a> is perfect for creating Python executables.&lt;/li>
&lt;li>&lt;a href="http://www.jrsoftware.org/">Inno Setup&lt;/a> is a great, free, installer builder for Windows.&lt;/li>
&lt;li>&lt;a href="http://spambayes.org/">SpamBayes&lt;/a> is the best spam filter there is .&lt;/li>
&lt;li>&lt;a href="http://kodos.sourceforge.net/">Kodos&lt;/a> is fantastic for testing/creating regular expressions (particularly ones to be used in Python). &lt;a href="http://www.massey.ac.nz/%7Etameyer/writing/tools.html#kodos">[more]&lt;/a>&lt;/li>
&lt;li>&lt;a href="http://www.wxpython.org/">wxPython&lt;/a> is my preferred Python GUI development library.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Editors&lt;/strong>
I&amp;rsquo;ve given up on the editors I was using, and for the moment, I&amp;rsquo;m just using &lt;a href="http://starship.python.net/crew/mhammond/">PythonWin&lt;/a> for everything. The search may resume&amp;hellip;
&lt;strong>PhD Research&lt;/strong>&lt;/p></description></item><item><title>Finding libstdc++.so.6</title><link>https://tonyandrewmeyer.com/2005/12/13/finding-libstdcso6/</link><pubDate>Tue, 13 Dec 2005 11:12:11 +1200</pubDate><guid>https://tonyandrewmeyer.com/2005/12/13/finding-libstdcso6/</guid><description>&lt;p>When I tried to build &lt;a href="http://python.org">Python&lt;/a> &lt;a href="http://python.org/2.4.1">2.4.1&lt;/a> on &lt;a href="http://doublehelix.massey.ac.nz">doublehelix&lt;/a> I ran into two problems:&lt;/p>
&lt;ul>
&lt;li>configure wouldn&amp;rsquo;t complete, saying that it couldn&amp;rsquo;t run compiled C programs.  I looked at the configure script and right before this it had something about not removing this section with autoconf 3.0:&lt;/li>
&lt;/ul>
&lt;h1 id="fixme-these-cross-compiler-hacks-should-be-removed-for-autoconf-30">FIXME: These cross compiler hacks should be removed for Autoconf 3.0&lt;/h1>
&lt;h1 id="if-not-cross-compiling-check-that-we-can-run-a-simple-program">If not cross compiling, check that we can run a simple program.&lt;/h1>
&lt;p>So I went ahead and commented out that section and it ran.  I suspect that this was actually caused by the second problem.&lt;/p></description></item><item><title>The importance of priority</title><link>https://tonyandrewmeyer.com/2005/12/13/untitled/</link><pubDate>Tue, 13 Dec 2005 11:01:46 +1200</pubDate><guid>https://tonyandrewmeyer.com/2005/12/13/untitled/</guid><description>&lt;p>As part of my &lt;a href="http://www.massey.ac.nz/%7Etameyer/research/computertheatre">PhD research&lt;/a>, I have to link together a lot of separate components, many of which are running on separate machines, as they&amp;rsquo;re too much for a single one. You&amp;rsquo;d think that this was relatively simple, given that a good non-blocking synchronous socket module is part of the standard &lt;a href="http://www.python.org">Python&lt;/a> library. Not so! Everything always runs too slowly, even when it&amp;rsquo;s the only thing running on the machine.
The first time I came across this problem, I was running the vision module and the speech module on the same machine, which communicated with the graphics module on a different one. The speech module just wouldn&amp;rsquo;t run nicely at all.
Sleep()ing
An obvious solution was to get the various processes to call time.sleep() every so often, so that the other processes would have a chance to do their work. This really didn&amp;rsquo;t work at all!
Shutting off background processes
My main machine runs a lot of stuff in the background, from my CVS server, to a &lt;a href="http://ultravnc.sf.net">VNC server&lt;/a>, to &lt;a href="http://www.apple.com/iTunes">iTunes&lt;/a>. I wondered if some of this was causing the problem, so I shut everything that wasn&amp;rsquo;t essential down. To my surprise, this made things worse!
The solution
Finally, I clicked on the solution - setting the thread/process priority. By setting the vision module to have a &amp;lsquo;below normal&amp;rsquo; thread priority, the speech module worked happily.
Part Two
Many months later, though, I ended up with the same problem - the speech module just wouldn&amp;rsquo;t work fast enough. Things were a little different, though - the speech module was the only one running on the machine, and synthesis worked ok (last time it stuttered), but the recognition was way slow. The speech module is a complex beast, because it doesn&amp;rsquo;t actually do the speech stuff itself, but uses COM to get the Microsoft Speech kit to do it.
Once again, I played around with time.sleep()ing, wondering if the network traffic was what was slowing it down (because without the network traffic, it worked nicely), and lots of other things. I even tried increasing the priority of the speech process, and that just made things worse.
Finally, though, I clicked to the actual problem - the speech process wasn&amp;rsquo;t the one that was doing the speech work, some other process was (accessed via COM), and that one wasn&amp;rsquo;t getting enough time. The network traffic probably made things worse because it mean that more time was allocated to the speech module process, which is the opposite of what needed to happen.
So I again dropped the priority - this time of the speech module, and lo-and-behold it worked like a charm.
The lesson? Be very careful to set the priorities carefully, and don&amp;rsquo;t always assume that you want a higher priority for your process. Remember that Windows will do a reasonable job of giving everyone enough time if the priorities are set right.
Note that to set the process priority, the win32process.SetPriorityClass function is used, with the first parameter equal to the result of win32api.GetCurrentProcess(), but the constants needed for the second parameter are missing, even though the win32 help says they are there (I&amp;rsquo;ll submit this as a pywin32 bug). The &amp;lsquo;below normal&amp;rsquo; constant is 16384. [Later: this is fixed in recent versions of pywin32]
technorati tags: &lt;a href="http://technorati.com/tag/Coding">Coding&lt;/a>, &lt;a href="http://technorati.com/tag/PhD">PhD&lt;/a>&lt;/p></description></item></channel></rss>