<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Black Bag Operations Network &#187; programming</title>
	<atom:link href="http://www.blackbagops.net/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blackbagops.net</link>
	<description>Weapons and Intelligence in the War Against "Them"</description>
	<lastBuildDate>Sun, 03 Jan 2010 11:44:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Snow Leopard is out</title>
		<link>http://www.blackbagops.net/2009/08/30/snow-leopard-is-out/</link>
		<comments>http://www.blackbagops.net/2009/08/30/snow-leopard-is-out/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 11:54:00 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.blackbagops.net/?p=155</guid>
		<description><![CDATA[and while I don&#8217;t have my copy yet, I&#8217;ve been getting the betas and I know what&#8217;s in it.  There&#8217;s a lot there, but its not visible to the average user or non-programming so-called technology &#8220;pundit&#8221;.  This is unfortunate.  They are tossing it off as a &#8220;service pack&#8221; but its more like [...]]]></description>
			<content:encoded><![CDATA[<p>and while I don&#8217;t have my copy yet, I&#8217;ve been getting the betas and I know what&#8217;s in it.  There&#8217;s a lot there, but its not visible to the average user or non-programming <a href="http://techguylabs.com/radio/ShowNotes/Show591">so-called technology &#8220;pundit&#8221;</a>.  This is unfortunate.  They are tossing it off as a &#8220;service pack&#8221; but its more like having your car detailed and the tiny single cylinder engine replaced with a fuel injected turbo V8.  It looks like the same car &#8211; but it can go many times faster.  As applications get updated, it will get even faster. How?</p>
<p>The core OS has been restructured to allow it to take advantage of all those cores in newer computers.  So while we have the same body, it is all new under the hood.  </p>
<p>The truth is that 3GHz is about the theoretical limit for clock speeds for the Intel x86 family.  They&#8217;re not going to get faster.  They are getting cheaper though.  So now, instead of getting a processor that&#8217;s twice as fast every cycle, you get twice as many 3GHz processors.   That&#8217;s all well and good, but much of the core OS has been built assuming one processor. So even though I&#8217;ve got a dual quad with 8 processors in the box, most of them are idle most of the time.  That power is wasted.</p>
<p>Enter Snow Leopard.  It restructures the way the OS divides and schedules tasks and supplies new apis for applications to parallelize logic to much improve processing throughput.  Besides letting programmers take advantage of all of the Intel cores &#8211; OpenCL makes it easier to offload vector processing to the graphics processor &#8211; a largely underutilized resource most of the time.</p>
<p>The average <a href="http://techguylabs.com/radio/ShowNotes/Show591">non-technical user</a> won&#8217;t see much change and that&#8217;s no surprise &#8211; but if this were &#8220;just a service pack&#8221; there wouldn&#8217;t be so many broken programs that need updating.  The change is substantial and at this point, most application updates going forward are going to require Snow Leopard.  Its not practical to build apps that take advantage of Snow Leopard and still work on older releases so this is the line in the sand. </p>
<p>Fortunately, Apple realized this and Snow Leopard is priced &#8220;almost free&#8221;.  I&#8217;m not one to push people to upgrade working systems without a compelling reason.   </p>
<p>However, eventually an update or a new application will come out that you&#8217;ll want and it will require Snow Leopard and this is why it is good that Apple made the barrier to updating very low.  Certainly a forthcoming update to <a href="http://audiofreakshow.com">Jambalaya</a> is going to be Snow Leopard only.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackbagops.net/2009/08/30/snow-leopard-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Work is winding down</title>
		<link>http://www.blackbagops.net/2008/12/17/work-is-winding-down/</link>
		<comments>http://www.blackbagops.net/2008/12/17/work-is-winding-down/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 04:40:42 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.blackbagops.net/?p=143</guid>
		<description><![CDATA[The wrist thing took three weeks to heal, but I&#8217;m better and working again.
But now my availability is ramping up.
My San Diego contract is wrapping up early &#8211; at the end of January.  I&#8217;ve been fully booked for so long that I haven&#8217;t got any leads and, really, I&#8217;m just looking for stuff I [...]]]></description>
			<content:encoded><![CDATA[<p>The wrist thing took three weeks to heal, but I&#8217;m better and working again.</p>
<p>But now my availability is ramping up.</p>
<p>My San Diego contract is wrapping up early &#8211; at the end of January.  I&#8217;ve been fully booked for so long that I haven&#8217;t got any leads and, really, I&#8217;m just looking for stuff I can do remotely.  I like San Diego and I&#8217;d like to stay there so I guess I&#8217;d better get off my tail and start networking there.</p>
<p>If you&#8217;ve got any leads on software projects, send them along.  My preference is Cocoa/iPhone, but web work is always good.  I guess this is the time to really start marketing Jambalaya too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackbagops.net/2008/12/17/work-is-winding-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ignoring diacriticals while searching in PostgreSQL</title>
		<link>http://www.blackbagops.net/2008/11/13/ignoring-diacriticals-while-searching-in-postgresql/</link>
		<comments>http://www.blackbagops.net/2008/11/13/ignoring-diacriticals-while-searching-in-postgresql/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 23:14:39 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://www.blackbagops.net/?p=141</guid>
		<description><![CDATA[As mentioned before, I&#8217;m working with BaseTen for access to postgres.  One thing my client wants is the ability to just enter a search term and find most anything (Googly style database search).  This isn&#8217;t so hard, you just take any string and do case insensitive like searches on the most likely fields [...]]]></description>
			<content:encoded><![CDATA[<p>As mentioned before, I&#8217;m working with BaseTen for access to postgres.  One thing my client wants is the ability to just enter a search term and find most anything (Googly style database search).  This isn&#8217;t so hard, you just take any string and do case insensitive like searches on the most likely fields in the database in a big OR statement.</p>
<p>BaseTen builds queries out of NSPredicates and NSPredicate supports an operator &#8216;like[cd]&#8216; where the c option is to ignore case and the d option is to ignore diacriticals (accents and other funny squiggles found in non-english text).  Postgres does not offer an option to ignore diacriticals in search.  So how to support this?</p>
<p>The good news is that the unicode characters are laid out such that taking the numeric value and taking the modulo of 128 (the size of the ascii table) results in the stripped version.  </p>
<p>I wrote a PgPL/SQL function that converts every character in a string to its ascii equivalent, then compare those.</p>
<pre>
CREATE OR REPLACE FUNCTION asciify(unicode text) RETURNS text AS $$
DECLARE
    translated text;
BEGIN
    translated := '';
    FOR i in 1..(char_length(unicode)) LOOP
        translated := translated || chr(ascii(substring(unicode,i,1))%128);
    END LOOP;
    RETURN translated;
END;
$$ LANGUAGE plpgsql;
</pre>
<p>The asciify&#8217;d versions of Panama and PanamÃ¡ will end up being Panama and I can do searches like</p>
<pre>
SELECT name from countries where asciify(name) ~* asciify(?);
</pre>
<p>and get the equivalent of a case insensitive and diacritical insensitive &#8216;like&#8217;. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackbagops.net/2008/11/13/ignoring-diacriticals-while-searching-in-postgresql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Feast or Famine</title>
		<link>http://www.blackbagops.net/2008/10/08/feast-or-famine/</link>
		<comments>http://www.blackbagops.net/2008/10/08/feast-or-famine/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 07:34:39 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[personal]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.blackbagops.net/?p=140</guid>
		<description><![CDATA[It seems a bit odd to hear of the collapsing economy when I have more work than I can handle.  As of last Friday I had 5 projects in queue.  I busted tail and knocked one off and shipped it yesterday.  But now I am running 4 concurrent development threads in 3 [...]]]></description>
			<content:encoded><![CDATA[<p>It seems a bit odd to hear of the collapsing economy when I have more work than I can handle.  As of last Friday I had 5 projects in queue.  I busted tail and knocked one off and shipped it yesterday.  But now I am running 4 concurrent development threads in 3 languages (not counting a couple of personal development experiments I&#8217;m playing with &#8211; one is a GLORP based active record implementation &#8211; the other is some enhancements for JambaLaya).</p>
<p>Quite a change from the beginning of the year when my one client scaled back his work drastically.  Too much work is a good problem to have in a busted economy.  If this continues, I may have to farm some work out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackbagops.net/2008/10/08/feast-or-famine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;d forgotten what a lame pile J2EE is</title>
		<link>http://www.blackbagops.net/2008/10/05/id-forgotten-what-a-lame-pile-j2ee-is/</link>
		<comments>http://www.blackbagops.net/2008/10/05/id-forgotten-what-a-lame-pile-j2ee-is/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 03:45:29 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.blackbagops.net/?p=139</guid>
		<description><![CDATA[I&#8217;d kind of sworn off doing Java a few years ago but a little contract fell into my lap that seemed like it would be some quick cash for not too much work.  I already had a lot of code in the can that would help me do it quickly.  Also, I still [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d kind of sworn off doing Java a few years ago but a little contract fell into my lap that seemed like it would be some quick cash for not too much work.  I already had a lot of code in the can that would help me do it quickly.  Also, I still have IntelliJ 6, which can make Java almost tolerable.</p>
<p>Unfortunately, part of the system required a servlet to handle http requests (using http as an RPC mechanism).  I&#8217;ve used Jetty in the past with good results so I downloaded it.  Despite the existence of a &#8220;plugin&#8221; for IDEA to work with it, the debugger never worked.  </p>
<p>So I moved on to Tomcat.  I finally got IDEA configured to use Tomcat, the debugger worked, but the servlet was ignored every time without any kind of error message being logged.  Did it fail to link or something (it used a lot of external libs I had to bring in).  No clue.  I simplified the servlet to just printing &#8220;Hi there&#8221; and still it refused to load.</p>
<p>This resulted in a refamiliarization with web.xml files and all the rest of it.  In disgust I switched back to Jetty.  Jetty at least logged the errors to the console and I  fixed all the link issues, but still no debug.  Back to Tomcat but it still wouldn&#8217;t load my servlet at the url I wanted.  Eventually, I found the invoker servlet settings, turned that on, and the servlet began to work.  </p>
<p>The bottom line is that the entire J2EE architecture, the servlet containers, the zillion xml files specifying garbage I never want to change anyhow, all of it is MUCH TOO FRIGGIN COMPLICATED FOR WHAT IT DOES.  Too many descriptors.  Too much config.  Too much cargo cult xml. </p>
<p>Compare to PHP where I just drop a file in a folder under document root and I&#8217;m good to go.  Or rails, which is pretty much the same deal &#8211; just putting the file in the folder ought to be all that&#8217;s required to make the thing work.</p>
<p>I think this will be my last foray into Java hell.  At least for a few years until I forget how stupid it all is again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackbagops.net/2008/10/05/id-forgotten-what-a-lame-pile-j2ee-is/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BaseTen Rocks!</title>
		<link>http://www.blackbagops.net/2008/10/03/baseten-rocks/</link>
		<comments>http://www.blackbagops.net/2008/10/03/baseten-rocks/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 23:37:09 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[Objective C]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.blackbagops.net/?p=138</guid>
		<description><![CDATA[Like a lot of long time Cocoa developers, I&#8217;ve long lamented the loss of EOF for doing database applications.  CoreData is lame, too complicated and fiddly for document based development, too light weight for multi-user.  
OTOH, EOF wasn&#8217;t perfect either.  Having been doing Rails, I find I really like ActiveRecord.  It [...]]]></description>
			<content:encoded><![CDATA[<p>Like a lot of long time <a href="http://developer.apple.com/cocoa/">Cocoa</a> developers, I&#8217;ve long lamented the loss of <a href="http://en.wikipedia.org/wiki/Enterprise_Objects_Framework">EOF</a> for doing database applications.  <a href="http://developer.apple.com/macosx/coredata.html">CoreData</a> is lame, too complicated and fiddly for document based development, too light weight for multi-user.  </p>
<p>OTOH, EOF wasn&#8217;t perfect either.  Having been doing <a href="http://www.rubyonrails.org/">Rails</a>, I find I really like <a href="http://en.wikipedia.org/wiki/Active_record_pattern">ActiveRecord</a>.  It strikes just the right balance between SQL and objects and I like its use of the database schema as the primary meta model.</p>
<p>So I was excited to learn about <a href="http://basetenframework.org/">BaseTen</a>.  Right now it is <a href="http://www.postgresql.org/">PostgreSQL</a> only, but that&#8217;s fine &#8211; I like PG.  It allows for use of controllers and bindings like CoreData, but it is designed for multi-user use and it doesn&#8217;t have a separate model file &#8211; you just design the schema along with foreign key constraints and start using it.  It really is kind of the best of all worlds.  Bonus is it wires the database for notifications so applications stay in sync.  In autocommit mode &#8211; all objects are hot sync&#8217;d.  Usually this is exactly what you want for small business apps (think less than a dozen simultaneous users).</p>
<p>Definitely makes development of small business database backed apps easy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackbagops.net/2008/10/03/baseten-rocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Summer of Rails</title>
		<link>http://www.blackbagops.net/2008/09/21/summer-of-rails/</link>
		<comments>http://www.blackbagops.net/2008/09/21/summer-of-rails/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 10:10:00 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[Objective C]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[seaside]]></category>
		<category><![CDATA[smalltalk]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[squeak]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.blackbagops.net/?p=137</guid>
		<description><![CDATA[I&#8217;ve now worked on three different Rails applications.  One of them was from scratch, the other two I took over from someone else.  The thing I like most about Rails is Active Record &#8211; it just works and it is easy to use &#8211; even for existing databases (although it takes a bit [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve now worked on three different Rails applications.  One of them was from scratch, the other two I took over from someone else.  The thing I like most about Rails is Active Record &#8211; it just works and it is easy to use &#8211; even for existing databases (although it takes a bit more work to specify the mappings).</p>
<p>I have a project coming up that would probably be a great Seaside candidate.  The database has to be postgresql (according to the client).  There is a native cocoa component &#8211; I&#8217;ll probably give <a href-"http://basetenframework.org/">BaseTen</a> a try.  For the web component, the obvious candidates are Rails (although I don&#8217;t know the state of Rails with PG &#8211; only mysql), and Seaside/Glorp &#8211; but I need to use Glorp to work like Active Record since the DB will be the master source of record for the schema.</p>
<p>Sadly, it doesn&#8217;t look like Glorp&#8217;s ActiveRecord on Squeak is ready for prime time, I might have to kind of finish that implementation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackbagops.net/2008/09/21/summer-of-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails is Magic</title>
		<link>http://www.blackbagops.net/2008/05/22/rails-is-magic/</link>
		<comments>http://www.blackbagops.net/2008/05/22/rails-is-magic/#comments</comments>
		<pubDate>Thu, 22 May 2008 10:27:41 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.blackbagops.net/?p=134</guid>
		<description><![CDATA[And I hate magic.  First, I confess that I probably still don&#8217;t have a full command of all ruby&#8217;s features &#8211; I&#8217;m just getting the hang of mixins and some of the wacky compositional capabilities.  
I&#8217;ve just deployed my first soup to nuts rails application.  Well, nearly.  It certainly starts fast. [...]]]></description>
			<content:encoded><![CDATA[<p>And I hate magic.  First, I confess that I probably still don&#8217;t have a full command of all ruby&#8217;s features &#8211; I&#8217;m just getting the hang of mixins and some of the wacky compositional capabilities.  </p>
<p>I&#8217;ve just deployed my first soup to nuts rails application.  Well, nearly.  It certainly starts fast.  Generate ActiveRecord classes for your tables using scripts and you&#8217;re off and doing basic CRUD.</p>
<p>However, its the little things that made the experience less than satisfactory.  First &#8211; the changes in behavior moving from development to deployment were nerve wracking.  I have rails running under apache on my laptop, no problem.  On my production server, I cannot get byte one to come out of rails.  Webrick works fine.  Mongrel works.  Rails cgi produces no errors, and no output.  Even apache logs are totally silent.  I don&#8217;t get it.  For now it is running under mongrel &#8211; but I&#8217;ll have to put that behind apache and front it using modproxy.  Irritating as hell.</p>
<p>Second, I set up <a href="http://www.danga.com/memcached/">memcached</a><font style="position: absolute;overflow: hidden;height: 0;width: 0"><a href="http://kvantservice.com/">ÐºÐ¾Ð¼Ð¿ÑŽÑ‚Ñ€Ð¸ Ð²Ñ‚Ð¾Ñ€Ð° ÑƒÐ¿Ð¾Ñ‚Ñ€ÐµÐ±Ð°</a></font> on the advice of friends and was going to use it for my session cache.  But it turns out that objects don&#8217;t get saved in the memcached &#8211; apparently you can only store plist kinds of structures.  Objects get dropped.  I spent several hours beating my head against this using the usual hammer for this nail &#8211; require_dependency.  However, after listing every blessed model class as a dependency, it was still dropping a collection of objects.  Back to the file based session cache.</p>
<p>Another thing that drove me nuts is all the magic values you can&#8217;t use for attribute names.  I inherited this database and admittedly a bunch of columns and tables are stupidly named &#8211; however I kept running into problems with collisions with ActiveRecord extensions.</p>
<p>Another thing &#8211; camel vs underbar lowercase.  You generally specify relationships as lower case names, that ActiveRecord uses to infer a class name.  For instance, you specify the relationship as purchase_order and it figures you have a class PurchaseOrder that keeps its data in a table called purchase_orders with a foreign key purchase_order_id.  This can all be overridden, but understanding which form to use where got pretty trying.</p>
<p>Reciprocal relationships &#8211; at some level of circularity, ActiveRecord falls over with stack level too deep on save.  It isn&#8217;t even a very complex graph that does it in.  It became necessary to remove a bunch of back references to get a save to work properly.</p>
<p>Overall, I&#8217;d say towards the end I spent more time debugging magic gone awry than I did building application functionality.  So I have to chalk it up as a real learning experience, but not one I&#8217;m looking to repeat anytime soon.  The lack of decent debugging facilities was really crippling &#8211; especially coming from seaside.  ActiveRecord is cool, but it isn&#8217;t trouble free.  Doing basic inheritance was a huge exercise in wackiness I&#8217;m not eager to repeat.  If I hadn&#8217;t had a big old mysql database to build on top of, I probably would have used seaside instead.</p>
<p>So enough slamming &#8211; its not all bad.  One thing that helped a LOT was the discovery of <a href="http://activescaffold.com">ActiveScaffold</a> AS is AMAZING!  I was able to throw together a coherent admin interface with it very quickly &#8211; its customization options are very powerful, and in the end I think the back office app will be about 80% AS and 20% task oriented workflow.  That&#8217;s brilliant.  A data driven sensible ajax interface almost instantly.  Very cool.  </p>
<p>I may do more ruby apps, there are some seriously powerful go-fast kinds of technologies, but much of the time savings this go-round was lost to flukey behavior that changed from environment to environment, and really lame debugging tools.  </p>
<p>Rails is definitely a very mixed bag.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackbagops.net/2008/05/22/rails-is-magic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hoppin&#8217; on the Rails</title>
		<link>http://www.blackbagops.net/2008/04/04/hoppin-on-the-rails/</link>
		<comments>http://www.blackbagops.net/2008/04/04/hoppin-on-the-rails/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 19:31:14 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.blackbagops.net/?p=131</guid>
		<description><![CDATA[I&#8217;ve got two new clients &#8211; on is taking over expansion of an existing Ruby on Rails application.  The other is the replacement of the application I wrote in the previous article.  I want to stick a new codebase on the existing database.  Since rails excels at CRUD and I&#8217;m short on [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got two new clients &#8211; on is taking over expansion of an existing Ruby on Rails application.  The other is the replacement of the application I wrote in the previous article.  I want to stick a new codebase on the existing database.  Since rails excels at CRUD and I&#8217;m short on bandwidth and hand-off-ability is a concern with the new development, I&#8217;m going to use rails for that one too.  </p>
<p>I mean, I can only learn so many frameworks at once.  So here we go &#8211; working through Agile Web Development with Ruby on Rails.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackbagops.net/2008/04/04/hoppin-on-the-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software Design Tip: Minimize Number of Languages</title>
		<link>http://www.blackbagops.net/2008/04/01/software-design-tip-minimize-number-of-languages/</link>
		<comments>http://www.blackbagops.net/2008/04/01/software-design-tip-minimize-number-of-languages/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 00:58:31 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.blackbagops.net/?p=130</guid>
		<description><![CDATA[I was recently asked about taking over support for an existing application.  I&#8217;ll leave out what it does &#8211; suffice it to say it is web based, has a simple 3-5 page UI for the public to buy something, and about a 15-20 page set of back end interfaces for trained customer service and [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently asked about taking over support for an existing application.  I&#8217;ll leave out what it does &#8211; suffice it to say it is web based, has a simple 3-5 page UI for the public to buy something, and about a 15-20 page set of back end interfaces for trained customer service and admin people to use.  So less than 30 screens overall mKay?</p>
<p>The application was said to be written in Java.  I know Java &#8211; I don&#8217;t like it, but I know it.  If its small, I could be persuaded to pick up the maintenance.</p>
<p>However, I got a source drop and I was totally appalled.  First, it suffers from the usual Java framework-itus.</p>
<p>Its J2EE &#8211; so we got Jetty container.  They used Hibernate &#8211; so we have generated Java code based on some XML schema files.  There&#8217;s also a mysql database &#8211; which duplicates the information in the Hibernate XML schema files.  It uses cocoon &#8211; cocoon make use of xml and xsl to define navigation and transformations. There is also reporting that uses xsl.  Workflows use flow &#8211; more xml only they used the Javascript extension so the workflows are actually defined using server side javascript.  </p>
<p>Got all that?  We have Spring, Coccon, Flow for Javascript (flowscript), Hibernate, Jetty, Javascript, Html, CSS, SQL, XSL and god knows how many dozens of distinct flavors of XML.  For a 25 page web app.  Wait, did you notice I didn&#8217;t mention Java?  There is Java &#8211; the Hibernate generated classes are used &#8211; but indirectly &#8211; they may as well not exist at all since all the application code is some fractured XML or Javascript fragment stashed who knows where.</p>
<p>It seems we&#8217;ve lost track of something here.  &#8220;Locality of Reference&#8221;  In general, all the stuff that deals with the product selection page ought to be visible by looking into the file representing that page, then maybe drilling into components.  The problem here is that, everytime I have to drill down, I have to switch languages.  And context switches are bad for programmer productivity &#8211; mKay?</p>
<p>I&#8217;ve turned down the job.  I don&#8217;t have time to learn all that junk for this little app.  The client needs a new installation &#8211; for 25 pages that do mostly CRUD to mysql. If I do it, I&#8217;m thinking plain old PHP with an ORM.  If I can find an ORM for PHP.</p>
<p>So far I&#8217;ve looked at Doctrine (not yet ready for production but it looks cool), Propel &#8211; and some others.  The really off-putting bit is their slavish insistence on creating the xml mapping file &#8211; just like Hibernate.  Of course, I have an existing database.  The XML file they want is in the db.  It just isn&#8217;t XML.  Still, all the information is available for query &#8211; so why are they bothering me with this junk?  Read the damn schema and make me some classes.  I&#8217;ll eliminate the many to many mappings by hand.  Sheesh.  No wonder there&#8217;s a software crisis.  </p>
<p>Hey framework people, stop making me write monkey code &#8211; figure out how to eliminate extra work &#8211; not make it.  One meta model is enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackbagops.net/2008/04/01/software-design-tip-minimize-number-of-languages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
