<?xml version="1.0"?>
<!-- name="generator" content="bloxsom/0+3i" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
  <channel>
    <title>Christian Simms's Software R&amp;D</title>
    <link>http://simmsland.com/blog/</link>
    <description>Generative Programming and other R&amp;D.</description>
    <language>en</language>
  <item>
    <title>Introducing Botonomy LLC</title>
    <link>http://simmsland.com/blog//2006/Jan/16#botonomy-intro</link>
    <description>I recently started a company called &lt;a href=&quot;http://www.botonomy.com&quot;&gt;Botonomy LLC&lt;/a&gt;, and our
first product is &lt;a href=&quot;http://www.projectpipe.com&quot;&gt;ProjectPipe&lt;/a&gt;, a subscription service
to provide project-management thru the web.  I will be updating &lt;a href=&quot;http://www.botonomy.com/blogs/csimms/index.html&quot;&gt;my (Christian Simms) weblog&lt;/a&gt;
more frequently than this one.</description>
  </item>
  <item>
    <title>Evaluation of 3 Python Tools to Develop Apps with Postgresql</title>
    <link>http://simmsland.com/blog//2004/Aug/17#eval_python_postgresql_tools</link>
    <description>No, these aren't just Object Relational mapping tools. After doing applications that use O-R for
several years now, I've decided that you can't completely hide the relational features from the
object interface, so don't try.  I looked at the following tools:

&lt;ul&gt;
  &lt;li&gt; &lt;a href=&quot;http://www.mechanicalcat.net/tech/roundup/wiki/FrontPage&quot;&gt;Roundup issue tracker&lt;/a&gt;
      This is an issue tracker whose design is so good you can build an application on it.
      It's basically a Python app server.
		&lt;ul&gt; &lt;li&gt; Clever Features
				&lt;ul&gt;
				  &lt;li&gt; Really simple way to specify schema. Below creates 2 tables where second table has foreign key to first:
					  &lt;pre&gt;
						 project = Class(db,&quot;project&quot;, name=String(), creationDate=Date())
						 task = Class(db,&quot;task&quot;, name=String(), project=Link(&quot;project&quot;))
					  &lt;/pre&gt;
					   The above causes 2 main tables to be created, plus 2 shadow audit tables, plus integer primary keys.
					   Plus it creates indexes for the foreign keys.
					   &lt;/li&gt;
				  &lt;li&gt; Works out of the box:  just cd to its directory and run &quot;python demo.py&quot; and you have a fully functional
					   bug tracking system. &lt;/li&gt;
				  &lt;li&gt; Automatic schema upgrader -- when app server starts up, it compares current python model (as defined above)
					   with database's schema (stored in one row of special table schema which contains 
					   a repr()'ed dictionary of information about each Class that maps to a table  &lt;/li&gt;
				  &lt;li&gt; Mail integration - has a mail filter to receive bug reports through email. This filter also archives
					   email-based bug discussions, attaching the discussion to the appropriate bug. Wow this is a killer feature
					   for a bug-tracking system. &lt;/li&gt; 
				&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt; Flaws &lt;ul&gt;
				  &lt;li&gt; Instead of db-level triggers, it has app-level triggers -- changes made through python are stored in audit
					   tables, but those directly through db are not. &lt;/li&gt;
				  &lt;li&gt; Inflexible naming - for class project, it creates tables:  _project and project__journal. &lt;/li&gt;
				  &lt;li&gt; Hardcoded to use psycopg postgresql db driver (minor flaw). &lt;/li&gt;
				&lt;/ul&gt;
		&lt;/li&gt; &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt; &lt;a href=&quot;http://modeling.sourceforge.net/&quot;&gt; Modeling (Object-Relational Bridge for python) &lt;/a&gt; 
      This is a heavy-weight modelling tool, this is what a committee would design. Reminds me of
      &lt;a href=&quot;http://www.eclipse.org/emf/&quot;&gt; EMF (Eclipse Modelling Framework) &lt;/a&gt; which is just as heavyweight.
      If you think the way to start app development is to write a big UML model, then this is for you!
		&lt;ul&gt; &lt;li&gt; Clever Features
				&lt;ul&gt;
				  &lt;li&gt; Has a Zope product which lets you edit your model through Zope. This sounded cool to me, but when I tried
					   it out, it's basically a thin client data entry app -- sorry I don't need that, I like having my model defined
					   in a text file that I can version and use in text editors.
				  &lt;/li&gt;
				  &lt;li&gt; Really flexible - let's you specify lots of details about each object and field, either in XML or python model.
					   Also supports run-time APIs or generated code APIs. &lt;/li&gt;
				  &lt;/li&gt;
				&lt;/ul&gt;
		 &lt;/li&gt; &lt;li&gt; Flaws
		 		&lt;ul&gt;
				  &lt;li&gt; Heavyweight and complex. For instance, instead of writing SQL queries, it has its own SQL-like (but not SQL!) language.&lt;/li&gt;
				&lt;/ul&gt;
		 &lt;/li&gt; &lt;/ul&gt;
  &lt;li&gt; &lt;a href=&quot;&quot;&gt; Twisted Enterprise ROW (R)elational (O)bject (W)rapper. &lt;/a&gt;
      A really simple way to do twisted programming against an existing db schema (yes it doesn't create
      the schema for you). It requires you to write a class for each table, and in this class write out
      how to map db columns + their types to python attributes, including PK and FK relationships.
		&lt;ul&gt; &lt;li&gt; Clever Features
				&lt;ul&gt;
				  &lt;li&gt; Maps to whatever your existing db schema is. &lt;/li&gt;
				&lt;/ul&gt;
		 &lt;/li&gt; &lt;li&gt; Flaws
		 		&lt;ul&gt;
				  &lt;li&gt; Does not create schema for you. &lt;/li&gt;
				&lt;/ul&gt;
		 &lt;/li&gt; &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;
</description>
  </item>
  <item>
    <title>Intro to Business Strategy</title>
    <link>http://simmsland.com/blog//2004/Jul/5#business_strategy_intro</link>
    <description>One of the leaders of modern business strategy is Michael E. Porter, professor at Harvard Business School.
He presents a &lt;a href=&quot;http://www.quickmba.com/strategy/porter.shtml&quot;&gt;framework for analyzing any industry&lt;/a&gt;
by breaking looking at five forces:
&lt;ol&gt;
  &lt;li&gt;Degree of Rivalry&lt;/li&gt;
  &lt;li&gt;Threat of Substitutes&lt;/li&gt;
  &lt;li&gt;Buyer Power&lt;/li&gt;
  &lt;li&gt;Supplier Power&lt;/li&gt;
  &lt;li&gt;Barrers to Entry&lt;/li&gt;
&lt;/ol&gt;

If one was to start a new business, Ken Hess &lt;a href=&quot;http://www.klhess.com/bootstrap/&quot;&gt;recommends&lt;/a&gt;
that you apply this type of analysis to your choice of business.</description>
  </item>
  <item>
    <title>Interesting Async Programming Paradigm</title>
    <link>http://simmsland.com/blog//2004/Jul/2#async_arch_with_deferreds</link>
    <description>&lt;a href=&quot;http://python.fyxm.net/pycon/papers/deferex/&quot;&gt;Here's a good paper&lt;/a&gt; describing the approach that
&lt;a href=&quot;http://www.twistedmatrix.com/&quot;&gt;the Twisted networking framework&lt;/a&gt; uses when structuring asynchronous 
client programs. The paper mentions the influence of Smalltalk, one of my favorite languages. If you want
to play with SmallTalk, go to &lt;a href=&quot;http://www.squeak.org/&quot;&gt;Squeak&lt;/a&gt; and play with it!
You can also learn about an alternative to MVC programming, because that's what Squeak has. The MVC successor
is called Morphic programming. It's hard to describe, but it's basically direct manipulation development.
What you're working with under your mouse *is* the object that you're developing.  I believe 
that &lt;a href=&quot;http://developer.apple.com/tools/interfacebuilder/&quot;&gt;Apple's Interface Builder&lt;/a&gt;copied this model.
I say copy because Morphic programming comes from the people who originally developed SmallTalk, and Apple
grabbed the ideas we're used to like overlapped windows, mouse, IDEs, from the original SmallTalk developers.</description>
  </item>
  <item>
    <title>Build Automation</title>
    <link>http://simmsland.com/blog//2004/Jul/2#build_automation</link>
    <description>I've had great success in the past setting up automated build systems for Java projects.
The one I've personally used several times is &lt;a href=&quot;http://cruisecontrol.sourceforge.net/&quot;&gt;CruiseControl&lt;/a&gt;.
It takes a while to configure it, but once it's running it's pretty stable. It seems like each major release
they make they redo the internal architecture. You can set it up to monitor activity in your source control system,
and when commits happen, it can then kick off a new build (after waiting for a specified quiet period of say 60
seconds).  This build process can include:
&lt;ul&gt;
  &lt;li&gt;checking out the latest code&lt;/li&gt;
  &lt;li&gt;doing a clean build&lt;/li&gt;
  &lt;li&gt;starting the app server&lt;/li&gt;
  &lt;li&gt;running unit tests&lt;/li&gt;
  &lt;li&gt;shutting down the app server&lt;/li&gt;
  &lt;li&gt;updating the build statistics page&lt;/li&gt;
  &lt;li&gt;sending an email about success / failure of build and tests&lt;/li&gt;
&lt;/ul&gt;

&lt;p/&gt;
I found an interesting real-time build monitoring system called
&lt;a href=&quot;http://cia.navi.cx/&quot;&gt;CIA Open Source Notification System&lt;/a&gt;.
It's an open source GPL software application (based on Python, Twisted, among others).
Besides being a software project, it also has a live demo where it monitors about 200 open source systems.
Their demo site (or is it an open source ASP?) shows live web pages showing
&lt;a href=&quot;http://cia.navi.cx/stats/project&quot;&gt;overall activity on a per project basis&lt;/a&gt;.
You can drill down on each project to see 
&lt;a href=&quot;http://cia.navi.cx/stats/project/FreeBSD&quot;&gt;statistics of build / bug tracking activity&lt;/a&gt; for each project.
Each project can define rulesets to control routing of raw events into its knowledge scheme.
They also provide RSS feeds of the aggregated data. They have IRC bots, I think to monitor projects.

&lt;p/&gt;
A competitor to CruiseControl is &lt;a href=&quot;http://buildbot.sourceforge.net/&quot;&gt;the BuildBot&lt;/a&gt;, which
is written in Python and uses the &lt;a href=&quot;http://twistedmatrix.com/buildbot/&quot;&gt;Twisted&lt;/a&gt; network framework.
Here's a &lt;a href=&quot;http://twistedmatrix.com/buildbot/&quot;&gt;sample page&lt;/a&gt;.  I don't find the presentation
intuitive.  But one major feature it has over CruiseControl is that it supports distributing the build
over multiple machines in a network to test multiple platforms.

&lt;p/&gt;
My buddy &lt;a href=&quot;http://mikecoyle.com/blog/&quot;&gt;Mike&lt;/a&gt; has a technology-related weblog as well.</description>
  </item>
  <item>
    <title>Easiest way to create OpenGL scripts</title>
    <link>http://simmsland.com/blog//2004/Jun/25#vpython-intro</link>
    <description>The standardized &lt;a href=&quot;http://www.opengl.org/&quot;&gt;OpenGL API&lt;/a&gt; is a pain in the arse to use, it's too low-level for the casual programmer --
e.g., it requires you to do your own double-buffering, plus no scenegraph API.
There are many projects which provide easier to use wrappings of this API, but even these are often rather
low-level. The simplest and highest-level wrapper I've found is &lt;a
href=&quot;http://www.vpython.org&quot;&gt;VPython&lt;/a&gt;. It has some really impressive demos for such short programs.
Its biggest drawback I believe is that it's difficult to extend it (e.g., image/texture mapping is missing) because
it's basically python method wrappers of a C library the authors wrote.</description>
  </item>
  <item>
    <title>Inside Story on SWT vs. Swing</title>
    <link>http://simmsland.com/blog//2003/Dec/3#insider_swing_vs_swt_story</link>
    <description>I've spent some time recently learning Swing. It has a steep learning curve.
I've worked w/GUI toolkits before, and it's rather complicated compared to the others.

&lt;p/&gt;I found an &lt;a href=&quot;http://www.mail-archive.com/jug-discussion@tucson-jug.org/msg00355.html&quot;&gt;interesting email&lt;/a&gt;
from Nov. 2002 about the history of Swing. Bottom line: when IBM was porting their Visual Age to Java, they
found the Swing toolkit too buggy and difficult to use, so they developed SWT instead. I'm inclined to agree
with them. Maybe it's time to learn SWT!</description>
  </item>
  <item>
    <title>Clever way to XML Schema</title>
    <link>http://simmsland.com/blog//2003/Jun/24#cleverXMLSchema</link>
    <description>I don't know about you, but I find xml dtd's quite cumbersome to define -- so cumbersome
that I have never written one.  And xml schema language surely sucks in its verbosity.
&lt;a href=&quot;http://www-106.ibm.com/developerworks/xml/library/x-xmptron/&quot;&gt; Here's another approach&lt;/a&gt;
which I find pretty clever, where you specify an example xml document and the program
(would you believe they implemented the program in xsl!?!) generates a Relax NG validation file.</description>
  </item>
  <item>
    <title>Lisp-level macro system for Java:  OpenJava</title>
    <link>http://simmsland.com/blog//2003/Jun/6#OpenJavaIntro</link>
    <description>
&lt;p/&gt;
When I learned the C language years ago, I learned how to use its macro system,
but also learned the nasty side effects that macros could cause if used or defined
improperly.

&lt;p/&gt;
Years later, I learned what Lisp macros can do, and I realized what a pale imitation
C macros are by comparison. I believe the definitive description of Lisp macros
is &lt;a href=&quot;http://www.paulgraham.com/onlisptext.html&quot;&gt;On Lisp&lt;/a&gt; by Paul Graham.

&lt;p/&gt;
Apparently someone has gone ahead and provided a macro system for Java which is as powerful
as Lisp's system instead of C's:  &lt;a href=&quot;http://www.csg.is.titech.ac.jp/openjava&quot;&gt;OpenJava&lt;/a&gt;.

&lt;p/&gt;
JBoss has
&lt;a href=&quot;http://www.jboss.org/index.html?module=html&amp;op=userdisplay&amp;id=developers/projects/jboss/aop&quot;&gt;integrated&lt;/a&gt;
some sort of Aspect-Oriented features to JBoss. I like the idea of transforming source code at compile time,
but I don't know if I like the idea of deploying an application, and &lt;strong&gt;then at run-time&lt;/strong&gt;
modifying the bytecodes.  Then your app is some black box jumble of byte codes that have been mangled.</description>
  </item>
  <item>
    <title>In my spare time, I've been developing a J2EE code generator using python.</title>
    <link>http://simmsland.com/blog//2003/May/31#perf-test</link>
    <description>However, I noticed that as I added new features, the performance was degrading
considerably, so I decided to do some benchmarks.  This is what I found.

&lt;p/&gt;
Below, each column name is a link to the source code for the given language.
Each program is written in the style for that language, so for instance the Python
version uses the built-in dictionary for hash tables, whereas the Java version uses
HashMap class. Notice how these tests don't do something simple like test
using hashes of int's, because I haven't had to do that kind of thing since college.
&lt;p/&gt;

&lt;table border=&quot;1&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt; Test &lt;/td&gt;
    &lt;td&gt; &lt;a href=&quot;/blog/perf.py&quot;&gt;Python&lt;/a&gt; &lt;/td&gt;
    &lt;td&gt; &lt;a href=&quot;/blog/perf.java&quot;&gt;Java (classic) &lt;/a&gt; &lt;/td&gt;
    &lt;td&gt; &lt;a href=&quot;/blog/perf.java&quot;&gt;Java (hotspot) &lt;/a&gt; &lt;/td&gt;
    &lt;td&gt; &lt;a href=&quot;/blog/perf.cs&quot;&gt;C# &lt;/a&gt; &lt;/td&gt;
    &lt;td&gt; &lt;a href=&quot;/blog/perf.cpp&quot;&gt;g++ &lt;/a&gt; &lt;/td&gt;
    &lt;td&gt; &lt;a href=&quot;/blog/perf.cpp&quot;&gt;g++ (-O3) &lt;/a&gt; &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt; Dynamic Object Allocation &lt;/td&gt;
    &lt;td&gt; 141,000/sec &lt;/td&gt;
    &lt;td&gt; 168,000/sec &lt;/td&gt;
    &lt;td&gt; 1,400,000/sec &lt;/td&gt;
    &lt;td&gt; 52,300,000/sec &lt;/td&gt;
    &lt;td&gt; 1,060,000/sec &lt;/td&gt;
    &lt;td&gt; 1,450,000/sec &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt; Dynamic Object Allocation plus hash table get/set &lt;/td&gt;
    &lt;td&gt; 9,880/sec &lt;/td&gt;
    &lt;td&gt; 4,670/sec &lt;/td&gt;
    &lt;td&gt; 56,300/sec &lt;/td&gt;
    &lt;td&gt; 53,800/sec &lt;/td&gt;
    &lt;td&gt; 19,100/sec &lt;/td&gt;
    &lt;td&gt; 30,200/sec &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;

&lt;p/&gt;

So what can we learn from this?
&lt;ul&gt;
&lt;li&gt; Java with hotspot compares favorably to C# &lt;/li&gt;
&lt;li&gt; Java with hotspot is something like 10x faster than without &lt;/li&gt;
&lt;li&gt; Python's about 5x slower than Java/C# &lt;/li&gt;
&lt;li&gt; And most surprising (to me): Java and C# were both about twice as fast as C++! I had read that could be true, but seeing is believing. &lt;/li&gt;
&lt;/ul&gt;

I tried speeding up the Python code using the &lt;a href=&quot;http://psyco.sourceforge.net/index.html&quot;&gt;Psycho&lt;/a&gt; JIT compiler,
but without much luck.  Actually, it was slightly slower (maybe 10% slower), and I think I know why. The Python versions
of these tests primarily test the memory allocator and built-in dictionary type, neither of which can be JIT'ed because
they're already native in the Python language, so I just saw the overhead of the JIT).
</description>
  </item>
  <item>
    <title>First Post! :-)</title>
    <link>http://simmsland.com/blog//2003/May/30#firstPost</link>
    <description></description>
  </item>
  </channel>
</rss>