<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="'en-US'">
  <title>body blog - Home</title>
  <id>tag:blog.splitbody.com,2009:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.8.0">Mephisto Drax</generator>
  
  <link href="http://blog.splitbody.com/" rel="alternate" type="text/html" />
  <updated>2009-07-29T16:25:32Z</updated>
  <link rel="self" href="http://feeds.feedburner.com/amaximov" type="application/atom+xml" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Famaximov" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Famaximov" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Famaximov" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/amaximov" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Famaximov" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Famaximov" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Famaximov" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2009-07-27:1609</id>
    <published>2009-07-27T16:33:00Z</published>
    <updated>2009-07-29T16:25:32Z</updated>
    <category term="export" />
    <category term="ruby" />
    <category term="tips" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/nhTxQmiF7XI/rubymine" rel="alternate" type="text/html" />
    <title>rubymine</title>
<content type="html">
            &lt;p&gt;&lt;a href="/2009/7/24/ode-to-vi"&gt;scarred, but not defeated by vim&lt;/a&gt;, i decided to try a &lt;a href="http://www.jetbrains.net/confluence/display/RUBYDEV/RubyMine+EAP"&gt;recently released beta&lt;/a&gt; of &lt;a href="http://www.jetbrains.com/ruby/"&gt;rubymine 1.5&lt;/a&gt;, and it’s been great so far.&lt;/p&gt;


	&lt;p&gt;&lt;/p&gt;


	&lt;p&gt;massive disclaimer: i have not tried anything else for ruby/rails coding except for &lt;a href="/2009/7/24/ode-to-vi"&gt;vim&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;unlike a &lt;a href="http://www.netbeans.org/features/ruby/"&gt;similar offering from netbeans&lt;/a&gt;, rubymine is a standalone install that seems to reuse a lot of the existing &lt;a href="http://www.jetbrains.com/idea/"&gt;intellij idea&lt;/a&gt; codebase.&lt;/p&gt;


	&lt;p&gt;it was great experience out of the box – i pointed it at the local svn working copy and it verified all the installed gems (even though i am fortunate enough to run on cygwin, it recognized them all).&lt;/p&gt;


	&lt;p&gt;it has great &lt;code&gt;rake&lt;/code&gt; support, and all rake tasks run without any modifications. however, for &lt;code&gt;script/server&lt;/code&gt; in cygwin evironment i had to replace &lt;code&gt;-e"STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift);"&lt;/code&gt; with &lt;code&gt;-e"STDOUT.sync=true;STDERR.sync=true;RAILS_ROOT='/cygdrive/c/project/root/dir';load($0=ARGV.shift);"&lt;/code&gt; in &lt;code&gt;ruby arguments&lt;/code&gt; field. once the server runs, it also displays its log with proper color-coding.&lt;/p&gt;


	&lt;p&gt;i still run &lt;code&gt;script/console&lt;/code&gt; from cygwin command line, since rubymine does not do &lt;code&gt;readline&lt;/code&gt; support (i use &lt;code&gt;ctrl+L&lt;/code&gt;, &lt;code&gt;ctrl+R&lt;/code&gt;, tab completion, &lt;code&gt;ctrl+e&lt;/code&gt;/&lt;code&gt;ctrl+a&lt;/code&gt; and other goodness quite a lot in my &lt;code&gt;irb&lt;/code&gt;).&lt;/p&gt;


	&lt;h5&gt;things to love&lt;/h5&gt;


	&lt;ul&gt;
	&lt;li&gt;color-coding, auto-indenting (including color-coding of matching brace/bracket/do-end block)&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;ctrl+shift+n&lt;/code&gt;/&lt;code&gt;ctrl+n&lt;/code&gt; for finding files and getting around; with &lt;code&gt;alt+f1&lt;/code&gt; to show current file in different contexts/views&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;ctrl+f12&lt;/code&gt; for current file structure&lt;/li&gt;
		&lt;li&gt;visible spaces (otherwise the ruby coding standards make the code look too squeezed to me)&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;ctrl+click&lt;/code&gt; when mousing over (jump to all kinds of things, including template names, css style names – all of it very nicely integrated)&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;ctrl+/&lt;/code&gt; for toggling comments&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;rails project structure&lt;/li&gt;
		&lt;li&gt;parsing my stacktraces and linking them to the source code&lt;/li&gt;
		&lt;li&gt;autocompletion, although i do not find myself using it too much&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;all the usual things that idea has – svn and git support out of the box (and shelving works, just like in &lt;code&gt;idea&lt;/code&gt;, in case you have to work with svn)&lt;/li&gt;
		&lt;li&gt;pretty sweet diff (&lt;code&gt;ctrl+d&lt;/code&gt;) that rivals tortoisesvn visual diff&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;ctrl+shift+up/down&lt;/code&gt; to move the current line&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;ctrl+d&lt;/code&gt; to clone selection&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;shift+delete&lt;/code&gt; to delete the whole line&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;ctrl+shift+f12&lt;/code&gt; to go full-screen&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;alt+number&lt;/code&gt; to toggle between tool windows&lt;/li&gt;
		&lt;li&gt;file structure tool window (&lt;code&gt;alt+7&lt;/code&gt;)&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;alt+f7&lt;/code&gt; to find usages&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;alt+shift+f10&lt;/code&gt; to bring up run menu&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;shift+f10&lt;/code&gt; to run current run&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;simple refactorings (introduce method, rename variable/method, etc).&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;it is pretty damn stable, and occasional errors do not kill the &lt;span class="caps"&gt;IDE&lt;/span&gt;.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h5&gt;things to improve&lt;/h5&gt;


	&lt;ul&gt;
	&lt;li&gt;unlike netbeans, it is not a full-blown ide with ruby support, so some things that exist in idea are missing (notably, database support, some of the team communication and code sharing features, and other bells and whistles)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;ctrl-q&lt;/code&gt; for docs is a bit wonky (frankly, i’d rather jump to matching place in the online api docs – it gives me context)&lt;/li&gt;
		&lt;li&gt;code folding fscks stuff up sometimes&lt;/li&gt;
		&lt;li&gt;still do not know how to jump to matching brace/do-end block&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;svn switch&lt;/code&gt; could not be found&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;ctrl+shift+f10&lt;/code&gt; to run current test (and any other ad-hoc run tasks) does not work on cygwin, unless you do &lt;code&gt;RAILS_ROOT&lt;/code&gt; trick above&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;i have not tried all the other stuff, like haml support, cucumber support, rspec, and rspec w/ drb.&lt;/p&gt;


	&lt;p&gt;overall feel is nice and polished – most things just work out of the box (unlike the frankenstein monster that eclipse can be sometimes – truly a Windows of IDEs).&lt;/p&gt;


	&lt;p&gt;i do believe in using “idiomatic” shortcuts with an &lt;span class="caps"&gt;IDE&lt;/span&gt;, thus i did not try any of the “compatibility” keyboard modes.&lt;/p&gt;


	&lt;p&gt;for now, i do not see myself coming back to vi for rails development – for a hundred bucks, rubymine is a great development tool.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/nhTxQmiF7XI" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2009/7/27/rubymine</feedburner:origLink></entry>
  <entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2009-07-25:1610</id>
    <published>2009-07-25T21:00:00Z</published>
    <updated>2009-07-25T21:01:01Z</updated>
    <category term="quote" />
    <category term="reading" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/bPVR3jqerJ0/reading-maister" rel="alternate" type="text/html" />
    <title>reading: maister</title>
<content type="html">
            &lt;p&gt;&lt;a href="http://www.amazon.com/Managing-Professional-Service-David-Maister/dp/0684834316/"&gt;managing the professional services firm&lt;/a&gt; is my second book on consulting (first one being weinberg’s &lt;a href="http://www.amazon.com/Secrets-Consulting-Giving-Getting-Successfully/dp/0932633013/"&gt;secrets of consulting&lt;/a&gt;).&lt;/p&gt;


	&lt;p&gt;&lt;/p&gt;


	&lt;p&gt;i have been resisting the temptation to gobble up the whole book in one sitting. i am taking it slowly, giving myself time to think through each chapter, since every one is loaded with so much insight and relevant quotes, that at times i even get frustrated, not able to take it all in.&lt;/p&gt;


	&lt;p&gt;it has it all – from marketing to clients, finding work, to running a consulting business, motivating and growing people. i am only half-way through, but i am tempted to label it as a required reading for anyone starting in consulting.&lt;/p&gt;


	&lt;p&gt;here’s a quote from “motivational crisis” chapter:&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;Are professionals different from other types of workers? Do they need to be managed (and motivated) in special ways? While it is difficult to support the assertion that all professionals are different from all other workers, my work has led me to suspect that, when it comes to motivating forces, the average professional &lt;em&gt;is&lt;/em&gt; different from the average worker in other environments: a difference based, I suspect, not on such things as educational levels, but on the psyche of those who choose professional careers.&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;blockquote&gt;
		&lt;p&gt;The typical professional is apt to describe him or herself in the following way: “I am the type of person who gets bored easily. I hate doing repetitive sorts of work, and always like to seek out new challenges. Once I know I can do something, it tends not to satisfy me anymore.” This is, of course, a somewhat self-flattering description. In my experience, however, it is an accurate one. Professionals, certainly the best among them, are constantly driven to seek out the new, the unfamiliar, the challenging. The key word here is driven.&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;blockquote&gt;
		&lt;p&gt;People who feel the (neurotic?) need to constantly and repeatedly test their skills against unfamiliar problems with an uncertain probability of success are frequently insecure, with a low sense of self-worth (never expressed in public), in constant need of external tests of their merits to prove (to themselves) that they still “got it.”&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;blockquote&gt;
		&lt;p&gt;Many professionals, I would assert, are prime examples of what is now termed “The Impostor Syndrome”—successful people who live in constant dread that someone will, one day, tap them on the shoulder and say “We’ve found you out. You’ve been faking it all these years.”&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;blockquote&gt;
		&lt;p&gt;Because of this, professionals tend to exhibit some clearly defined behavioral characteristics. They require continual challenge and personal growth to retain their interest, and are impatient when they do not receive it. They constantly ask themselves, and their superiors, “Am I still on track?” Because of their insecurity, and the ambiguity that surrounds the definition of “good work” in professional contexts, they need quick, repeated feedback on their performance to validate their efforts. They tend to be “scoreboard-oriented”: eager for visible, well-defined measures of success that can reassure them. They like to have unambiguous goals to shoot at. From their need to achieve self-respect by receiving the respect of others, it follows that professionals value both autonomy in their work and involvement in policy decisions, whether on engagements or firm-management matters. As much as these “rewards” are valued in their own right, they are valued more as signs that the organization trusts and respects them.&lt;/p&gt;
	&lt;/blockquote&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/bPVR3jqerJ0" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2009/7/25/reading-maister</feedburner:origLink></entry>
  <entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2009-07-24:1608</id>
    <published>2009-07-24T12:26:00Z</published>
    <updated>2009-08-14T20:53:47Z</updated>
    <category term="export" />
    <category term="ruby" />
    <category term="tips" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/X3D4lAcjsaI/ode-to-vi" rel="alternate" type="text/html" />
    <title>ode to vi</title>
<content type="html">
            &lt;p&gt;i recently had to do a small rails project. so i did what i &lt;a href="/2006/2/5/default-cygwin-terminal-and-environment"&gt;usually do&lt;/a&gt; in these cases – fired up the easiest &lt;span class="caps"&gt;IDE&lt;/span&gt; that runs anywhere – vim.&lt;/p&gt;


	&lt;p&gt;now let me reminisce a bit – i’ve been using vi on and off ever since i got my hands on linux in 1997, and i have not learned much beyond the basics over the years. it works the same way on half a dozen unixes i’ve used it on, as well as on cygwin and macs; even dreaded beasts like mks toolkit provide it. it is an indispensable cross-platform tool.&lt;/p&gt;


	&lt;p&gt;&lt;/p&gt;


	&lt;p&gt;it does not require much horsepower, and it fits well with the back-to-command-line ideology of rails.&lt;/p&gt;


	&lt;p&gt;if all you are using it for is editing occasional file or two,  it does everything you need out of the box. throw in basic syntax highlighting, auto-indenting, split windows, buffers – and you have enough to survive.&lt;/p&gt;


	&lt;p&gt;oh, did i mention the macho factor? it takes some effort to tame the menu-less monster of an interface with a barrage of keystrokes that appear as magic incantation to others.&lt;/p&gt;


	&lt;p&gt;vi has a peculiar physical effect –  i often surprise myself when i remember certain editing commands, but at the same time i am utterly unable to remember them when standing behind someone, advising them what to type – my fingers twitch, but my higher brain functions are not firing.&lt;/p&gt;


	&lt;p&gt;curiously, this reminds me too much of some of the mainframe folks i’ve seen, or even an  occasional &lt;span class="caps"&gt;SAP&lt;/span&gt; jockey. consider it a compliment – there is a lot of power in short mnemonic commands compared to drill-down menus. yes, every powerful system must have a command line, but it must degrade gracefully. with vi the &lt;em&gt;discoverability&lt;/em&gt; of interface is pretty much non-existent, and the learning curve is steep.&lt;/p&gt;


	&lt;p&gt;my current theory is that the muscle memory vi creates leads to a particular form of addiction which explains its appeal (and perhaps the religious zeal).&lt;/p&gt;


	&lt;p&gt;when i work in a context of a project, where i constantly need to bounce around different files, vim UI starts to break down: built-in buffers support is inadequate. the editor needs to have a concept of a project i am currently working on, and, ideally, the framework i use.&lt;/p&gt;


	&lt;p&gt;i know that the usual answer is &lt;em&gt;customize, customize, customize&lt;/em&gt; – and in this respect it follows very much a linux tradition – if you are 15yrs old, and have tons of time, and only one machine, you can spend days crafting that perfect setup that is just right. having done that a number of times, i have learned that it is just not worth my time – I switch computers often, work on client sites, bounce between different teams, so i want stuff that is reasonably workable out of the box.&lt;/p&gt;


	&lt;p&gt;i can take it easy and install some basic plugins – &lt;a href="http://www.vim.org/scripts/script.php?script_id=1984"&gt;fuzzy finder&lt;/a&gt; to give me files i want fast, &lt;a href="http://www.vim.org/scripts/script.php?script_id=1658"&gt;nerd tree&lt;/a&gt; for filesystem navigation, &lt;a href="http://www.vim.org/scripts/script.php?script_id=1567"&gt;rails&lt;/a&gt; for rails integration, &lt;a href="http://www.vim.org/scripts/script.php?script_id=1173"&gt;tComment&lt;/a&gt; for toggling comments on blocks of text.&lt;/p&gt;


	&lt;p&gt;but now i need to manage them across several machines, and perhaps i do not want to spoil my vi muscle memory that can cripple my vi-&lt;em&gt;fu&lt;/em&gt; on that hp-ux 11.11 when i come across it (yeah right).&lt;/p&gt;


	&lt;p&gt;so perhaps i will draw the line and use some other ide for project work, leaving vi for simpler stuff.&lt;/p&gt;


	&lt;p&gt;to add some substance to this post, a few significant lines from my &lt;code&gt;.vimrc&lt;/code&gt;:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
syntax enable
filetype on
filetype plugin on

set tabstop=4
set shiftwidth=4
set expandtab

autocmd FileType ruby set shiftwidth=2|set tabstop=2|set expandtab

set number
set ai
set si
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;and some of the commands i use often (besides the usual navigation/editing/searching ones that are in my muscles, but refuse to be articulated):&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;:e!&lt;/code&gt; to reload the file i am currently editing&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;:retab&lt;/code&gt; i really hate those tabs&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;:ls&lt;/code&gt; to look at open buffers (the listing is a pain to read, trying to remember what those little symbols mean and matching numbers to file names)&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;:e filename&lt;/code&gt; to open a file in a new buffer&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;:bd&lt;/code&gt; to close the current buffer&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;:e#&lt;/code&gt; to bounce between two last buffers (how can i cycle between all the buffers ala &lt;code&gt;alt+tab&lt;/code&gt;?)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;ctrl+w&lt;/code&gt; followed by &lt;code&gt;s&lt;/code&gt; or &lt;code&gt;p&lt;/code&gt; to start splitting windows, then bounce around them with double &lt;code&gt;ctrl+w&lt;/code&gt; or &lt;code&gt;ctrl+w&lt;/code&gt; and arrows&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;ctrl+w&lt;/code&gt; followed by &lt;code&gt;&amp;lt;number&amp;gt;+&lt;/code&gt; or  &lt;code&gt;&amp;lt;number&amp;gt;-&lt;/code&gt; to shrink or grow the split windows&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;ctrl+w&lt;/code&gt; followed by &lt;code&gt;q&lt;/code&gt; to close current window&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;zz&lt;/code&gt; to center screen on current line, accompanied by &lt;code&gt;zt&lt;/code&gt; op and &lt;code&gt;zb&lt;/code&gt; ottom&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;%&lt;/code&gt; to jump to matching brace&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;o&lt;/code&gt; and &lt;code&gt;O&lt;/code&gt; to insert the line and switch to editing mode&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;I&lt;/code&gt; to insert at the beginning of the line (that i always forget, unlike its companion &lt;code&gt;A&lt;/code&gt;)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;m + letter&lt;/code&gt; to place a named mark, &lt;code&gt;' + letter&lt;/code&gt; to jump to the beginning of the line, &lt;code&gt;` + letter&lt;/code&gt; to exact position of the mark&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;&amp;lt;&lt;/code&gt; are much easier for indenting, as opposed to my muscle-memorized &lt;code&gt;number + &amp;gt; + enter&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;shift+v&lt;/code&gt; or &lt;code&gt;v&lt;/code&gt; to do visual selection&lt;/li&gt;
		&lt;li&gt;once you visually selected stuff, you fold it with &lt;code&gt;zf&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;finally, i find the whole &lt;code&gt;:tabnew&lt;/code&gt; business utterly useless and insulting.&lt;/p&gt;


	&lt;p&gt;what i do miss in addition to project structure navigation, is easily looking up/jumping between methods, code block folding that follows language semantics, and decent tabs.&lt;/p&gt;


	&lt;p&gt;jamis buck &lt;a href="http://weblog.jamisbuck.org/2008/10/10/coming-home-to-vim"&gt;blog&lt;/a&gt; &lt;a href="http://weblog.jamisbuck.org/2008/11/17/vim-follow-up"&gt;entries&lt;/a&gt; on the subject were really informative and inspiring (especially the comments).&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/X3D4lAcjsaI" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2009/7/24/ode-to-vi</feedburner:origLink></entry>
  <entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2009-06-07:1603</id>
    <published>2009-06-07T14:25:00Z</published>
    <updated>2009-06-07T14:39:32Z</updated>
    <category term="conference" />
    <category term="export" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/sWi_VUsBDrk/cloudcamp-nyc-2009" rel="alternate" type="text/html" />
    <title>cloudcamp nyc</title>
<content type="html">
            &lt;p&gt;i am organizing my notes from &lt;a href="http://www.cloudcamp.com/newyork/"&gt;cloudcamp nyc 2009&lt;/a&gt;. the whole thing was done the &lt;a href="http://en.wikipedia.org/wiki/FooCamp"&gt;unconference style&lt;/a&gt;, and i bounced around different groups for a few hours.&lt;/p&gt;


	&lt;h4&gt;taxonomy&lt;/h4&gt;


	&lt;p&gt;&lt;/p&gt;


	&lt;p&gt;it seems that folks were struggling to come up with the taxonomy of the cloud. i see it is a continuum from bare OS instances (amazon’s &lt;span class="caps"&gt;EC2&lt;/span&gt;) to increasingly specialized services (google app engine, S3, salesforce, and even facebook).&lt;/p&gt;


	&lt;p&gt;bare OS instances are easy – nothing there is new, and what is changing is the elasticity of the capacity – you can spin up and wind down instances much faster (and recently announced &lt;a href="http://aws.amazon.com/autoscaling/"&gt;amazon’s auto scaling&lt;/a&gt; makes it even easier). the only catch there is that you have to design for scalability yourself. but you have all the power and the flexibility, and there is no lock-in.&lt;/p&gt;


	&lt;p&gt;the latter is when you give up some of the flexibility for scalability out of the box – the design and implementation are taken care of for you – google app engine and facebook just scale. there is a lock-in there, but you might not care. somewhat unrelated, but &lt;a href="http://blog.pmarca.com"&gt;pmarca&lt;/a&gt; &lt;a href="http://blog.pmarca.com/2007/09/the-three-kinds.html"&gt;had some things to say about it&lt;/a&gt; a while ago.&lt;/p&gt;


	&lt;h4&gt;automation&lt;/h4&gt;


	&lt;p&gt;when dealing with OS instances, these developments make it obvious that if you have not embraced automation yet, it is time to do so. the lone admin doing things by hand does not cut it anymore; even barebones shell scripts and basic packaging might not be enough.&lt;/p&gt;


	&lt;p&gt;the sad thing is that i do not see an easy, thorough, cross-platform management tool that does everything out of the box. &lt;a href="http://www.cfengine.org/"&gt;cfengine&lt;/a&gt; was the closest thing back in the day, but i want something that embraces source control and declarative configuration; something that is transparent and easy to use; something that is cross-platform. &lt;a href="http://wiki.opscode.com/display/chef/Home"&gt;chef&lt;/a&gt; and &lt;a href="http://reductivelabs.com/products/puppet/"&gt;puppet&lt;/a&gt; look promising.&lt;/p&gt;


	&lt;p&gt;so there are a lot of new vendors coming out and touting their products for managing the cloud.&lt;/p&gt;


	&lt;h4&gt;monitoring&lt;/h4&gt;


	&lt;p&gt;same thing with monitoring – &lt;a href="http://en.wikipedia.org/wiki/SiteScope"&gt;sscope&lt;/a&gt; was a killer app almost a decade ago, but i have not seen a compelling polished replacement (until, possibly, &lt;a href="http://www.hyperic.com/"&gt;hyperic&lt;/a&gt;) – something that could scale down and up, something that can be either agentless for small easy deployments and agent-based to be able to scale beyond that. amazon’s &lt;a href="http://aws.amazon.com/cloudwatch/"&gt;cloud watch&lt;/a&gt; is a step in the right direction, but it is just the beginning.&lt;/p&gt;


	&lt;p&gt;i hope that cloud computing developments will give this industry a push it needs to clean up its act and finally come up with comprehensive convenient set of tools that is sorely overdue.&lt;/p&gt;


	&lt;p&gt;bottom line is that with clouds there will be more stuff to manage, and the demands for the management tools will become stricter.&lt;/p&gt;


	&lt;p&gt;i want commodization of these tools – monitoring, deployment, etc. ideally they will be independent of cloud provider and i want them to be simple and transparent and composable and hackable.&lt;/p&gt;


	&lt;h4&gt;usage scenarios&lt;/h4&gt;


	&lt;p&gt;&lt;/p&gt;


	&lt;p&gt;it is almost a no-brainer these days for startups writing green-field apps to rely on amazon for their capacity. it is great, since they are not as concerned with SLAs and lock-in is not that big of a deal.&lt;/p&gt;


	&lt;p&gt;amazon truly has kick-started the industry that lurked in the shadows for so many years with all the major players trying and failing to launch a successful pay-as-you-go cloud computing service. i guess their secret was extracting a service from their own successful projects, instead of trying to come up with something new for others.&lt;/p&gt;


	&lt;p&gt;as for enterprises though, i do not see them embracing the cloud platform as it is now, however there are some scenarios possible right now, and i am sure many more will emerge:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;a single batch that needs to be processed (amazon now has &lt;a href="http://aws.amazon.com/elasticmapreduce/"&gt;hadoop services&lt;/a&gt; ; also consider load testing from the cloud, some sort of one-off processing, or anything else that is a spike in demand could be good)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;overflow capacity for something like flash traffic during holidays for retailers – extend your private infrastructure, or certain pieces of it into the cloud and wind down when you are done&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;span class="caps"&gt;POC&lt;/span&gt;, development – it is hard to test on the same hardware as prod, so roll your stuff out on the cloud and then for prod/uat deployment put it back inside&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;one-off isolated apps that can deal with current state of SLAs and lack of private clouds, or even pieces of existing apps&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;there is a chance for internal infrastructure folks to learn something from the cloud experience. in most large companies servers and storage have been increasingly provided as a service and billed back to the projects, but provisioning is still not elastic, and utilization is often the usual low numbers. granted, more and more are using vmware to virtualize (at least dev/uat) to increase utilization, but it is a far cry from the experience of the likes of amazon.&lt;/p&gt;


	&lt;p&gt;the ideas and some of the tech from the public clouds could and should be looked at by the internal infrastructure people, and not just the servers/storage, but also those that provide middleware services – messaging and monitoring, for instance.&lt;/p&gt;


	&lt;p&gt;clouds in your own data centers? some of the vendors seem to head this direction – give us the servers and the datacenters and we will create cloud infrastructure for you, taking care of management, monitoring, apis, provisioning, etc.&lt;/p&gt;


	&lt;p&gt;i wonder how the chargebacks in organizations will change between departments – since instead of a capital investment upfront with depreciation we can convert it to operating expense with pay for use billing – would that allow us to win anything? of course, for small companies it is great – no upfront costs, no hardware, etc.&lt;/p&gt;


	&lt;p&gt;ms azure is somewhat an outlier here – first of all, it lacks tinkerability (yes, it is a term) – the barrier for entry is too high, but at the same time it is not a vertical app, but a full-blown platform with all the development tools in place. the problem is that it is too opaque, and i would imagine it will be a while before the whole kitchen sink has proper api, billing, provisioning, etc working properly – as usual the idea is fantastic, but the implementation, knowing the track record, is something to be wary of. since windows is notoriously hard to automate, perhaps azure will finally sidestep this problem and offer that as a service, but i cannot see how it can completely do it, unless it provides something as easy and transparent as ssh+shell scripts and declarative versioned management for that.&lt;/p&gt;


	&lt;h4&gt;coming up&lt;/h4&gt;


	&lt;p&gt;development in several directions – granularity of service, privacy of the cloud; standards – one must talk about a certain place in the continuum – standards for infrastructure level monitoring/provisioning are perhaps possible, but once we run into more vertical services, standards make little sense, since you are buying into the provider.&lt;/p&gt;


	&lt;p&gt;there will be consolidation, since, as failures of ibm and sun showed and success of amazon shows, it is a low-margin business, and amazon knows it first-hand.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/sWi_VUsBDrk" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2009/6/7/cloudcamp-nyc-2009</feedburner:origLink></entry>
  <entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2009-06-06:1605</id>
    <published>2009-06-06T22:11:00Z</published>
    <updated>2009-06-06T22:23:29Z</updated>
    <category term="conference" />
    <category term="ruby" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/EoysM2F8G6I/goruco-2009" rel="alternate" type="text/html" />
    <title>GoRuCo 2009</title>
<content type="html">
            &lt;p&gt;&lt;a href="http://www.goruco.com/"&gt;gotham ruby confrence&lt;/a&gt; is the nyc’s own ruby conference organized by &lt;a href="http://nycruby.org/"&gt;nyc ruby users group&lt;/a&gt;. it was my second time attending it. this post is an attempt to organize my own notes, as well as an attempt at feedback that i think i owe to the speakers and the organizers.&lt;/p&gt;


	&lt;p&gt;i really like the smaller focused gatherings like this with around a hundred-plus attendees – there is definitely a community spirit there, since a lot of the folks are local and already know each other.&lt;/p&gt;


	&lt;p&gt;there is also more focused discussion, since the background of the people in the room is similar. a lot of the culture is shared, a lot of the values are implied, and the conversation zips along nicely. i have stopped attending local java groups precisely for the lack of this common background – the topics are too broad, the backgrounds are too different, and it takes a lot of effort to communicate ideas.&lt;/p&gt;


	&lt;p&gt;i am a bit uneasy about my own relationship with the ruby community – i am not really contributing, nor am i doing paid ruby work. i also am a bit weary of the monoculture (look at them macboys and macgirls!) that tends to re-invent the wheel way too often. but i am there for the excitement, for the bright-eyed kids that tinker and create things – this energy is infectious and i feed off it. it is inspirational and energizing.&lt;/p&gt;


	&lt;p&gt;so why am i going to the conferences like these? in addition to the energy boost i mentioned above, there is also the trivia of learning about tools, projects, approaches; getting the feel for the zeitgeist, where things are heading, what folks are thinking. deep down inside i am always looking for the “blow your mind” experience, something that can turn a familiar topic on its head, something that can make me discover things i have never suspected existed.&lt;/p&gt;


	&lt;p&gt;GoRuCo had a nice balance – things technical and detailed, and also approaches/techniques/principles. the reject conf at the end – a series of quick lightning talks – was an icing on the cake, stuffing you full of references, pointers, tips that you could take home and work through at your own pace.&lt;/p&gt;


	&lt;h4&gt;&lt;a href="http://www.goruco.com/speakers.html#brown"&gt;Gregory Brown: Where is Ruby really heading?&lt;/a&gt;&lt;/h4&gt;


	&lt;p&gt;more of a book report, talking about different versions of ruby out there. for anyone following the community, none of it was a surprise. no hard data either, just his personal anecdotal experience. this part of the talk was more suited to a short user group presentation.&lt;/p&gt;


	&lt;p&gt;there were a few nice tips and personal war stories related to moving between 1.8.6, 1.8.7 and 1.9.1, unicode, side-by-side installs and very basic crude techniques to code for different versions.&lt;/p&gt;


	&lt;p&gt;these are typical growing pains – everything from the compatibility issues between versions to the curse of the system-wide install that makes one go an extra mile in order to run different apps under different ruby versions on the same box (i always preferred the semi-structured self-contained java jdk installs and jars controlled by the classpath).&lt;/p&gt;


	&lt;p&gt;there were some props to &lt;a href="http://jruby.codehaus.org/"&gt;jruby&lt;/a&gt; (it is a real distro, not a hack to reach out for when all else fails!), mentions of &lt;a href="http://kenai.com/projects/jffi/"&gt;ffi&lt;/a&gt; in jruby that allowed gregory’s project to run on windows.&lt;/p&gt;


	&lt;h4&gt;&lt;a href="http://www.goruco.com/speakers.html#mchugh"&gt;Eleanor McHugh: The Ruby Guide to *nix Plumbing&lt;/a&gt;&lt;/h4&gt;


	&lt;p&gt;this could have been a great talk, but it seems like eleanor was really hungover, so instead it was a very disconnected series of ramblings on the general subject of unix and coding. very poor delivery, and at times plain embarrassing.&lt;/p&gt;


	&lt;p&gt;only towards the end she managed to find the message for the talk, which was “you can code against kernel internals using ruby, since it makes it much easier. do not automatically assume that you need to write in C for performance – try ruby first.”&lt;/p&gt;


	&lt;p&gt;she also highlighted ruby community’s respect for bare-metal – the ability to tinker, the taste for small simple tools that do the job well, and the affinity for unix. this is exactly what attracted me to the language in the first place.&lt;/p&gt;


	&lt;p&gt;there were a lot of references that at times seemed like name-dropping: &lt;a href="http://nginx.net/"&gt;ngnix&lt;/a&gt;, &lt;a href="http://beej.us/guide/bgnet/"&gt;beej’s guide to network programming&lt;/a&gt;, &lt;a href="http://beej.us/guide/bgipc/"&gt;beej’s guide to unix interprocess communication&lt;/a&gt;, &lt;a href="http://ttsky.net/ruby/ruby-dl.html"&gt;ruby/dl&lt;/a&gt;, &lt;a href="http://blog.headius.com/2008/03/duby-type-inferred-ruby-like-jvm.html"&gt;duby&lt;/a&gt;, &lt;a href="http://rubyeventmachine.com/"&gt;event machine&lt;/a&gt;, &lt;a href="http://www.kegel.com/c10k.html"&gt;c10k problem&lt;/a&gt;, &lt;a href="http://www.amazon.com/Advanced-Programming-Addison-Wesley-Professional-Computing/dp/0131411543"&gt;advanced unix programming&lt;/a&gt; book&lt;/p&gt;


	&lt;h4&gt;&lt;a href="http://www.goruco.com/speakers.html#yoder"&gt;Dan Yoder: Resource-Oriented Architecture With Waves&lt;/a&gt;&lt;/h4&gt;


	&lt;p&gt;dan briefly talked about his &lt;a href="http://rubywaves.com/"&gt;waves&lt;/a&gt; framework that tries to present a simple &lt;span class="caps"&gt;DSL&lt;/span&gt; around &lt;span class="caps"&gt;HTTP&lt;/span&gt; and resource representation in a &lt;span class="caps"&gt;REST&lt;/span&gt; fashion.&lt;/p&gt;


	&lt;p&gt;the meat of the talk that was interesting to me dealt with &lt;span class="caps"&gt;REST&lt;/span&gt; in general, its differences from &lt;span class="caps"&gt;MVC&lt;/span&gt;, resource-oriented architecture, self-describing data, returning links to other data inside of data to aid discoverability. he mentioned how a resource identifier (e.g. &lt;span class="caps"&gt;URL&lt;/span&gt;) should not specify representation (i.e. do not add .xml to specify that you need an &lt;span class="caps"&gt;XML&lt;/span&gt; document back), but rely on client’s &lt;code&gt;Accept&lt;/code&gt;* headers to negotiate representation (caveat being that CDNs like Akamai do not currently care about these headers, so you will always get the same content).&lt;/p&gt;


	&lt;p&gt;there was also a mention of the fact that sometimes one can view &lt;span class="caps"&gt;HTTP&lt;/span&gt; protocol as something dealing with a distributed hash table (DHT) using &lt;code&gt;get/put/delete&lt;/code&gt; operations (with &lt;code&gt;post&lt;/code&gt; reserved for everything else).&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.w3.org/RDF/"&gt;&lt;span class="caps"&gt;RDF&lt;/span&gt;&lt;/a&gt; and &lt;a href="http://www.freebase.com/"&gt;freebase&lt;/a&gt; were also mentioned.&lt;/p&gt;


	&lt;p&gt;i have a strange relationship with &lt;span class="caps"&gt;REST&lt;/span&gt;: i get it on the technical level, i sort of get it on the architecture level, but it did not fully “click” yet, perhaps due to the fact that i do not have enough practical implementations under my belt. i should go through the &lt;a href="http://oreilly.com/catalog/9780596529260/"&gt;restful webservice&lt;/a&gt; book again and play around.&lt;/p&gt;


	&lt;p&gt;good talk overall, but lacking concrete examples that could have brought things more into focus.&lt;/p&gt;


	&lt;h4&gt;&lt;a href="http://www.goruco.com/speakers.html#howerton"&gt;Jake Howerton: Into the Heart of Darkness: Rails Anti-Patterns&lt;/a&gt;&lt;/h4&gt;


	&lt;p&gt;a bit of a disappointment, since the title promised so much. i usually really liked the anti-pattern talks, since you learn nothing when things work as expected – the real learning comes when things break, and you are forced to dig in and figure out why. plus these talks also give you an idea of applicability of certain techniques, which is really a required counterpart for all patterns to begin with (beware of &lt;a href="http://www.codingthewheel.com/archives/dartboard-driven-design"&gt;dartboard-driven design&lt;/a&gt;).&lt;/p&gt;


	&lt;p&gt;instead we were treated to a very few amusing short code snippets, but no larger patterns in the sense of fowler’s &lt;a href="http://www.refactoring.com/"&gt;refactoring book&lt;/a&gt; or even rails-specific patterns.&lt;/p&gt;


	&lt;p&gt;he did mention &lt;a href="http://cukes.info/"&gt;cucumber&lt;/a&gt;, &lt;a href="http://wiki.github.com/kevinrutherford/reek"&gt;reek&lt;/a&gt; and &lt;a href="http://metric-fu.rubyforge.org/"&gt;metric_fu&lt;/a&gt; and some general well-known testing techniques. i liked his term “flight check” for the smoke tests that run before deployment to prod, and a notion of sandbox test environment where mocks are replaced with real classes that do destructive things without impacting the real world (like sending emails).&lt;/p&gt;


	&lt;p&gt;i also like his term “irb-driven design” for something that was copy-pasted from the exploratory irb session into the production code.&lt;/p&gt;


	&lt;p&gt;there was also some treatise of legacy code, but i think &lt;a href="http://itc.conversationsnetwork.org/shows/detail3987.html"&gt;dhh’s talk on the subject&lt;/a&gt; was much better.&lt;/p&gt;


	&lt;p&gt;overall it was a fun, light talk that was well-received. i blame the deceiving title and the lack of focus for initial feeling of disappointment; it felt like jake was simply talking about things he does and prefers to do during development, without specific overarching theme in mind.&lt;/p&gt;


	&lt;h4&gt;&lt;a href="http://www.goruco.com/speakers.html#metz"&gt;Sandi Metz: &lt;span class="caps"&gt;SOLID&lt;/span&gt; Object Oriented Design&lt;/a&gt;&lt;/h4&gt;


	&lt;p&gt;&lt;a href="http://sandimetz.com/"&gt;sandi&lt;/a&gt; stole the show; she set the level that none of the speakers matched and showed what it really means to have a solid, gripping presentation that is lucid, focused, well-prepared, and superbly delivered.&lt;/p&gt;


	&lt;p&gt;she talked about &lt;a href="http://www.butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod"&gt;&lt;span class="caps"&gt;SOLID&lt;/span&gt;&lt;/a&gt; design principles: Single Responsibility, Open Closed, Liskov Substitution, Interface Segregation, Dependency Inversion which all boil down to managing dependencies.&lt;/p&gt;


	&lt;p&gt;she went through the fowler’s &lt;a href="http://www.martinfowler.com/bliki/DesignStaminaHypothesis.html"&gt;value of design&lt;/a&gt; argument, and then iteratively went through a refactoring example, invoking the &lt;span class="caps"&gt;SOLID&lt;/span&gt; principles along the way.&lt;/p&gt;


	&lt;p&gt;i think the most impressive for me was how well the whole talk came together, how the arguments were presented to support the refactorings, and how well it got into my head (almost uncanny, similar to the effect the best books in &lt;a href="http://headfirstlabs.com/readme.php"&gt;head first series&lt;/a&gt; have).&lt;/p&gt;


	&lt;p&gt;some of the principles she kept bringing up – using the rate of change as the indicator for splitting the functionality; refactor in small steps to let the design emerge – not because you &lt;em&gt;know&lt;/em&gt;, but because you want to &lt;em&gt;find&lt;/em&gt; the design; red-green-refactor; mock at the seam; only mock classes i own; those that change often should depend on those that change less often.&lt;/p&gt;


	&lt;p&gt;this once again brings up the importance of developing a language to discuss design (e.g. patterns) – i think this is a crucial step for every practitioner, when something intuitive and personal (e.g. a vague code smell) becomes something that you can articulate and communicate to others.&lt;/p&gt;


	&lt;p&gt;she also mentioned &lt;a href="http://blog.objectmentor.com/articles/category/uncle-bobs-blatherings"&gt;uncle bob&lt;/a&gt;, &lt;a href="http://blog.thinkrelevance.com/2009/3/26/introducing-micronaut-a-lightweight-bdd-framework"&gt;micronaut&lt;/a&gt;, steve freeman and nat pryce &lt;a href="http://www.mockobjects.com/"&gt;mock objects site&lt;/a&gt;&lt;/p&gt;


	&lt;h4&gt;&lt;a href="http://www.goruco.com/speakers.html#stein"&gt;Benjamin Stein: Building Cross Platform Mobile Apps with Ruby &amp; PhoneGap&lt;/a&gt;&lt;/h4&gt;


	&lt;p&gt;the main promise of &lt;a href="http://phonegap.com/"&gt;PhoneGap&lt;/a&gt; is quite compelling – build cross-platform apps on the phones using javascript while taking advantage of the native features (vibrate, storage, accelerometer, sound, gps, etc).&lt;/p&gt;


	&lt;p&gt;it was a fine presentation, with a story to tell and with a perspective that put all the low-level details in context. makes me itchy to get my hands on some phone development; i was also quite impressed with their adoption of latest standards (e.g. &lt;span class="caps"&gt;HTML5&lt;/span&gt;).&lt;/p&gt;


	&lt;h4&gt;&lt;a href="http://www.goruco.com/speakers.html#katz"&gt;Yehuda Katz: From Rails to Rack: Making Rails 3 a Better Ruby Citizen&lt;/a&gt;&lt;/h4&gt;


	&lt;p&gt;rails3 perspective from the horse’s mouth – quite detailed look at how rails is trying to be less opinionated in its choice of frameworks to work with, and how it exposes its internals for others to integrate with (orm, rack, js frameworks). some very interesting examples of design decisions and the overall future path of the framework.&lt;/p&gt;


	&lt;p&gt;this was a bit tedious, but quite informative talk.&lt;/p&gt;


	&lt;h4&gt;Lightning Talks&lt;/h4&gt;


	&lt;p&gt;i really like these, since most people do not have enough material for a long talk; in fact some of the main talks earlier should probably have been half their size.&lt;/p&gt;


	&lt;p&gt;the highlights include &lt;a href="http://www.sunlightfoundation.com/"&gt;sunlight foundation&lt;/a&gt; and &lt;a href="http://www.data.gov/"&gt;data.gov&lt;/a&gt; plug, a great pair of fast talks by &lt;a href="http://github.com/tmm1"&gt;aman gupta&lt;/a&gt; on &lt;a href="http://code.google.com/p/google-perftools/"&gt;google-perftools&lt;/a&gt; that he tweaked to work with ruby and used on some real-world code and &lt;a href="http://timetobleed.com/"&gt;joe damato&lt;/a&gt; on &lt;a href="http://timetobleed.com/fixing-threads-in-ruby-18-a-2-10x-performance-boost/"&gt;tweaking the thread performance in ruby 1.8&lt;/a&gt; (in retrospect, these two talks were something i wish eleanor would have done).&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/EoysM2F8G6I" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2009/6/6/goruco-2009</feedburner:origLink></entry>
  <entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2009-05-26:1604</id>
    <published>2009-05-26T11:55:00Z</published>
    <updated>2009-05-26T13:02:16Z</updated>
    <category term="db" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/kX-XHPb6BtM/michael-stonebraker" rel="alternate" type="text/html" />
    <title>michael stonebraker</title>
<content type="html">
            &lt;p&gt;i really enjoyed &lt;a href="http://itc.conversationsnetwork.org/shows/detail4009.html"&gt;this talk&lt;/a&gt; by michael “&lt;a href="http://www.databasecolumn.com/2008/01/mapreduce-a-major-step-back.html"&gt;map reduce is crap&lt;/a&gt;” &lt;a href="http://en.wikipedia.org/wiki/Michael_Stonebraker"&gt;stonebraker&lt;/a&gt;. it is a terse and mind-blowing romp through the current database landscape, focusing on inability of one-size-fits-all “dinosaurs” to deal with streaming data (like tick market data) as well as data warehousing. he has some benchmark numbers and proposes some alternatives.&lt;/p&gt;


	&lt;p&gt;i have been looking into streaming databases and column data stores for a while, but I am yet to have a production hands-on experience with them.&lt;/p&gt;


	&lt;p&gt;i always had somewhat of an inferiority complex when it came to databases, since these guys have done so much work decades ago that tackled so many problems, and it seems to have had a hard time escaping the database world and affecting CS population at large.&lt;/p&gt;


	&lt;p&gt;so this new twist in the evolutionary spiral that comes due to the availability of cheap machines, lots of &lt;span class="caps"&gt;RAM&lt;/span&gt;, and the need to process lots of data should yield interesting results. i do hope that this will lead to a whole bunch of lean and mean specialized solutions instead of (loosely quoting stonebraker), “here’s oracle, what’s your problem?” approach.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/kX-XHPb6BtM" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2009/5/26/michael-stonebraker</feedburner:origLink></entry>
  <entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2009-04-14:1602</id>
    <published>2009-04-14T03:39:00Z</published>
    <updated>2009-04-14T04:32:40Z</updated>
    <category term="quote" />
    <category term="reading" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/y46eFlcDMdw/the-essential-drucker" rel="alternate" type="text/html" />
    <title>the essential drucker</title>
<content type="html">
            &lt;p&gt;perhaps it is my destiny to stumble into things that i should have known (and probably have known at some point, but they only became relevant now). in any case, i am happy to add drucker to my pantheon of striking bald men (already staffed with the likes of foucault, seth godin, and crowley).&lt;/p&gt;


	&lt;p&gt;&lt;/p&gt;


	&lt;p&gt;i really enjoyed this updated/revised “best of” collection of drucker essays. he is not instantly quotable – i do not think he goes after the effect of catchy parables, so it is hard to pick out the pearls to quote here.&lt;/p&gt;


	&lt;p&gt;but of course, i cannot resist:&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;[...] the three stonecutters [...] were asked what they were doing. The first replied, “I am making a living.” The second kept on hammering while he said, “I am doing the best job of stonecutting in the entire county.” The third one looked up with a visionary gleam in his eyes and said, “I am building a cathedral.”&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;perhaps proverbs and fables are a retreat for those that cannot come up with an original wording themselves, but dammit, this is the kind of stuff that you hit people over the head with to get your idea across.&lt;/p&gt;


	&lt;p&gt;anyway, i really liked his writing on building innovation into the organization. his essays on the place of the organization in the society were also quite eye-opening, especially with respect to the non-profits. he does not go into heavy theorizing – everything is quite high-level and appears simplified, but there are a lot of good observations, especially once you read them in context. yes, some of it is a bit dated, but it is easy to make a quick mental adjustment to see the core of what he is getting at.&lt;/p&gt;


	&lt;p&gt;i’ll have to pick up a few more of his books; at this rate i will be reading f. w. taylor in no time. oh boy.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/y46eFlcDMdw" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2009/4/14/the-essential-drucker</feedburner:origLink></entry>
  <entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2009-01-29:1597</id>
    <published>2009-01-29T06:21:00Z</published>
    <updated>2009-01-29T06:22:30Z</updated>
    <category term="people" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/0QyijJQ9TOI/manual-override" rel="alternate" type="text/html" />
    <title>manual override</title>
<content type="html">
            &lt;p&gt;there is something i noticed about myself – oftentimes, when faced with a problem, i immediately jump to the technical means of solving it, which usually implies building some sort of automation. after that jump, the initial problem becomes less and less important, while i am speeding away, thinking through the technical details.&lt;/p&gt;


	&lt;p&gt;it turns out that sometimes an excel spreadsheet and a manual process is far superior solution, although it might hurt your ego and make you feel vaguely dirty.&lt;/p&gt;


	&lt;p&gt;another variation of the above is fascination with “cool” tech (for your definition of “cool”) – i noticed that sometimes i would use every opportunity to startup &lt;a href="http://www.wireshark.org/"&gt;wireshark&lt;/a&gt; or &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx"&gt;Process Monitor&lt;/a&gt; and gloriously wallow in data, gleefully probing tiniest details. it turns out that almost always there are better tools out there that can get the job done with less noise.&lt;/p&gt;


	&lt;p&gt;so as a personal first-line defense, i opt for trying to &lt;a href="http://en.wikipedia.org/wiki/5_Whys"&gt;ask the right questions&lt;/a&gt; early on – perhaps a manual solution would do, or a problem really is a non-issue.&lt;/p&gt;


	&lt;p&gt;it seems that too much knowledge may be a curse, but the real challenge is to keep your personal toolbox organized.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/0QyijJQ9TOI" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2009/1/29/manual-override</feedburner:origLink></entry>
  <entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2009-01-29:1593</id>
    <published>2009-01-29T05:23:00Z</published>
    <updated>2009-01-29T05:30:46Z</updated>
    <category term="people" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/wvgAkwRtFF0/elevator-test" rel="alternate" type="text/html" />
    <title>elevator test</title>
<content type="html">
            &lt;p&gt;building software for a business, i established an interesting test that shows me whether i am thinking in the right direction:&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;off the top of your head name five most important things that technology can improve for the business as it is right now&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;i’ll wait – can you do it? right here, on the spot?&lt;/p&gt;


	&lt;p&gt;the way i see it – if, after having worked in a new team for a few months, you cannot do it – you have failed. you are not thinking about the business, you do not know the business, you do not care.&lt;/p&gt;


	&lt;p&gt;as technologists we are all too often drawn to the technical problems, forgetting that it is really the business that we should have in mind. the catch is that the domain of the software problems is infinite, so one can submerge forever without delivering anything of value to the business.&lt;/p&gt;


	&lt;p&gt;disclaimers apply, of course – it particularly matters for those developers working closely with the business. but then your definition of “business” might vary; the point is that sometimes a correct technical solution is the wrong one.&lt;/p&gt;


	&lt;p&gt;so while you are at it, type up this list and stick it somewhere visible, so that you can have it in front of you every day (as i’ve talked about it &lt;a href="/2008/7/28/reading-team-dysfunctions"&gt;before&lt;/a&gt;).&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/wvgAkwRtFF0" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2009/1/29/elevator-test</feedburner:origLink></entry>
  <entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2009-01-29:1596</id>
    <published>2009-01-29T04:33:00Z</published>
    <updated>2009-01-29T04:41:02Z</updated>
    <category term="java" />
    <category term="tip" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/yHpcrQPQDqQ/public-enemy-no-1" rel="alternate" type="text/html" />
    <title>Public Enemy No.1</title>
<content type="html">
            &lt;p&gt;&lt;a href="http://tech.puredanger.com/"&gt;Alex Miller aka Pure Danger Tech&lt;/a&gt; has &lt;a href="http://tech.puredanger.com/2009/01/27/java-concurrency-bugs-mutable-statics/"&gt;a great entry&lt;/a&gt; on most common concurrency bugs.&lt;/p&gt;


	&lt;p&gt;the timing is perfect – this very thing bit me today. long story short, an old app, previously perceived to be multi-threaded, was recently converted to actually be multi-threaded, and then, once traffic ramped up a bit, exhibited peculiar behavior when perfectly good dates could not be parsed. thank god it blew up, as opposed to quietly corrupting the data.&lt;/p&gt;


	&lt;p&gt;so something as innocent-looking as &lt;code&gt;private static final SimpleDateFormat&lt;/code&gt; declaration was the culprit: &lt;a href="http://java.sun.com/javase/6/docs/api/java/text/DateFormat.html"&gt;&lt;code&gt;java.text.DateFormat&lt;/code&gt;&lt;/a&gt; is not thread-safe.&lt;/p&gt;


	&lt;p&gt;luckily, it is easy enough to spot and reproduce (&lt;code&gt;threadPoolSize&lt;/code&gt; and &lt;code&gt;invocationCount&lt;/code&gt; in &lt;a href="http://testng.org/"&gt;TestNG&lt;/a&gt; simplify it even further).&lt;/p&gt;


	&lt;p&gt;a pessimist would heave a mighty sigh, once again swear on the copy of &lt;a href="http://www.javaconcurrencyinpractice.com/"&gt;&lt;span class="caps"&gt;JCIP&lt;/span&gt;&lt;/a&gt; to find and root out every frivolous &lt;code&gt;static&lt;/code&gt; out there with the help of &lt;a href="http://findbugs.sourceforge.net/bugDescriptions.html#STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE"&gt;FindBugs&lt;/a&gt; or a simple regex.&lt;/p&gt;


	&lt;p&gt;meanwhile, there is &lt;a href="http://joda-time.sourceforge.net/faq.html#threading"&gt;joda-time&lt;/a&gt; and a promise of &lt;a href="http://jcp.org/en/jsr/detail?id=310"&gt;jsr310&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;but of course this whole experience still leaves you feeling cheated and dirty – why, god, why?! something so function-like and stateless in nature insists on stowing things away.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/yHpcrQPQDqQ" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2009/1/29/public-enemy-no-1</feedburner:origLink></entry>
  <entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2009-01-05:1590</id>
    <published>2009-01-05T08:20:00Z</published>
    <updated>2009-01-05T08:22:13Z</updated>
    <category term="people" />
    <category term="quote" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/bua8cW5DcyQ/go-with-the-flow" rel="alternate" type="text/html" />
    <title>go with the flow</title>
<content type="html">
            &lt;p&gt;a damn nice quote from  Eric Brechner’s &lt;a href="http://blogs.msdn.com/eric_brechner/archive/2005/09/01/September-1-2005-go-with-the-flow-retention-and-turnover.aspx"&gt;I. M. Wright "Hard Code"&lt;/a&gt; blog regarding team dynamics, specifically about retaining people:&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt; [...] the best way to deal with turnover is to expect it and embrace it. How? Think flow, flow, floooooooow.&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;blockquote&gt;
		&lt;p&gt;Think of your team as a river instead of a lake. A lake stagnates. There’s no energy or impetus to change. The same is true of groups that stagnate. They cultivate mediocrity and complacency; they abhor risk. A river is always running and changing with lots of great energy. You want a river.&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;a nice metaphor and it strikes a chord – building an ideal team is one thing, but perhaps it is more about building a self-sustaining culture when individuals might be coming and going. the latter seems to be a more important goal in the long run.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/bua8cW5DcyQ" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2009/1/5/go-with-the-flow</feedburner:origLink></entry>
  <entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2008-12-23:1588</id>
    <published>2008-12-23T06:27:00Z</published>
    <updated>2008-12-23T06:34:34Z</updated>
    <category term="meta" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/KvNz5CduPNg/depth-first-search" rel="alternate" type="text/html" />
    <title>depth-first search</title>
<content type="html">
            &lt;ul&gt;
	&lt;li&gt;decide to write a blog post
	&lt;ul&gt;
	&lt;li&gt;play with formatting
	&lt;ul&gt;
	&lt;li&gt;realize that there is a new version of a blogging tool 
	&lt;ul&gt;
	&lt;li&gt;start upgrading blogging tool in test in vmware instance
	&lt;ul&gt;
	&lt;li&gt;realize that new vmware server is out
	&lt;ul&gt;
	&lt;li&gt;upgrade vmware
	&lt;ul&gt;
	&lt;li&gt;upgrade vmware tools (never easy!)&lt;/li&gt;
		&lt;li&gt;play with new vmware server options&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;realize that the new version of os is out
	&lt;ul&gt;
	&lt;li&gt;upgrade the os&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;notice that &lt;code&gt;logrotate&lt;/code&gt; is not working correctly
	&lt;ul&gt;
	&lt;li&gt;fix log rotation&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;realize that &lt;code&gt;rsync&lt;/code&gt; backups are b0rked
	&lt;ul&gt;
	&lt;li&gt;attempt to fix them, but fail&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;upgrade db while at it&lt;/li&gt;
		&lt;li&gt;upgrade web server while at it&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;screw around with formatting on the upgraded blog platform
	&lt;ul&gt;
	&lt;li&gt;fail to get pagination to work (like i fail every single time)&lt;/li&gt;
		&lt;li&gt;fix the theme since upgrade broke it&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;start upgrading prod and realize it does not have enough physical resources
	&lt;ul&gt;
	&lt;li&gt;consider switching hosting providers
	&lt;ul&gt;
	&lt;li&gt;&lt;em&gt;really&lt;/em&gt; consider switching hosting providers
	&lt;ul&gt;
	&lt;li&gt;...
	&lt;ul&gt;
	&lt;li&gt;...
	&lt;ul&gt;
	&lt;li&gt;...
	&lt;ul&gt;
	&lt;li&gt;...
	&lt;ul&gt;
	&lt;li&gt;no, no, no! there lies madness!
	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;stack overflow&lt;/code&gt;!&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;two days later write this blog post&lt;/li&gt;
	&lt;/ul&gt;


&lt;div&gt;&lt;/div&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/KvNz5CduPNg" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2008/12/23/depth-first-search</feedburner:origLink></entry>
  <entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2008-09-19:1551</id>
    <published>2008-09-19T11:59:00Z</published>
    <updated>2008-09-19T16:26:23Z</updated>
    <category term="java" />
    <category term="ruby" />
    <category term="software" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/ur9xy9tQF8I/concurrency-part-2-actors" rel="alternate" type="text/html" />
    <title>concurrency: part 2 - actors</title>
<content type="html">
            &lt;ul&gt;
	&lt;li&gt;&lt;a href="/2008/9/12/concurrency-part1"&gt;part 1&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h1&gt;message-passing&lt;/h1&gt;


	&lt;p&gt;&lt;/p&gt;


	&lt;p&gt;if &lt;a href="/2008/9/12/concurrency-part1"&gt;shared memory makes concurrent programming difficult&lt;/a&gt;, what else is there that an app developer can use?&lt;/p&gt;


	&lt;p&gt;one way of representing coarse-grained parallelism is through &lt;em&gt;message-passing concurrency&lt;/em&gt;.&lt;/p&gt;


	&lt;p&gt;the idea is pretty simple – the only way to share state between isolated components is through message passing. what happens inside the components, is their own business.&lt;/p&gt;


	&lt;p&gt;there is no global state of the whole system, unlike in shared memory program that behaves like a giant state machine. sending and receiving of messages happens concurrently together with the computations by the components themselves. this approach is much easier for the developer to reason about and it maps easily to multiple CPUs and multiple machines.&lt;/p&gt;


	&lt;p&gt;a lot of the enterprise workflow-like processing falls into this model. it is basically a pipeline of worker pools, configured independently and possibly running on separate machines. a unit of work travels through the pipeline, as it is being handed off from one set of workers to another.&lt;/p&gt;


	&lt;h1&gt;actors&lt;/h1&gt;


	&lt;p&gt;&lt;/p&gt;


	&lt;p&gt;one of the common implementations of message-passing concurrency is &lt;a href="http://en.wikipedia.org/wiki/Actor_model"&gt;actor model&lt;/a&gt;. i’ll take a liberty to interpret this model to fit my own developer needs, even though i am butchering decades of academic research in the process.&lt;/p&gt;


	&lt;p&gt;actors model represents well multiple computers talking to each other using network packets, components exchanging messages using &lt;span class="caps"&gt;JMS&lt;/span&gt;, independent processes or threads talking to each other using messages – basically anything where isolation is possible and interactions are loosely coupled.&lt;/p&gt;


	&lt;p&gt;usually each actor has a &lt;em&gt;mailbox&lt;/em&gt; associated with it (often represented with a queue), where messages are stored until an actor processes them. messages map well to physical artifacts in the real world – they are immutable, and only one actor can handle a given message at a time.&lt;/p&gt;


	&lt;p&gt;actors are connected with &lt;em&gt;channels&lt;/em&gt;; individual actors are isolated from each other – a failure of an actor does not affect another actor. no other actor can change the inner state of a given actor – the only way to communicate is through message-passing.&lt;/p&gt;


	&lt;p&gt;messaging is usually asynchronous, but synchronous messaging could also be useful.&lt;/p&gt;


	&lt;p&gt;depending on implementation, beware of deadlocks if you are using synchronous messaging. another issue to keep in mind is order of messages – depending on implementation it might not be preserved.&lt;/p&gt;


	&lt;p&gt;while some advocate “everything is an actor” approach, and I get dizzy imagining the possibilities, the pragmatic app developer in me is living in the real world among existing apps. in this case actors work best as a library for the existing language.&lt;/p&gt;


	&lt;h3&gt;erlang&lt;/h3&gt;


	&lt;p&gt;although i shied away from “actors everywhere” approach above, &lt;a href="http://www.erlang.org/"&gt;erlang&lt;/a&gt; is the most successful implementation that actually does just that. it is not just the language, but a whole platform that transparently runs actors within a single process as well as across multiple machines.&lt;/p&gt;


	&lt;p&gt;as this topic is heating up, one should at least &lt;a href="http://www.pragprog.com/titles/jaerlang/programming-erlang"&gt;read the book&lt;/a&gt; and play with the language. after all, &lt;em&gt;a language that doesn’t affect the way you think about programming is not worth knowing&lt;/em&gt;, and erlang is enough of a paradigm shift to kickstart your concurrency thinking.&lt;/p&gt;


	&lt;h3&gt;Tibco BusinessWorks&lt;/h3&gt;


	&lt;p&gt;as i’ve &lt;a href="/2007/8/21/dsl-for-integration"&gt;described before&lt;/a&gt;, BusinessWorks (BW) is an example of an integration &lt;a href="http://en.wikipedia.org/wiki/Domain_Specific_Language"&gt;&lt;span class="caps"&gt;DSL&lt;/span&gt;&lt;/a&gt; that happens to use actors.&lt;/p&gt;


	&lt;p&gt;given an integration &lt;em&gt;process&lt;/em&gt; (e.g. receive a message on &lt;span class="caps"&gt;JMS&lt;/span&gt; queue A, enrich it from a database, transform it, and send it to a &lt;span class="caps"&gt;JMS&lt;/span&gt; topic B), you describe it using BW language constructs. then it becomes an actor &lt;em&gt;definition&lt;/em&gt; that you can deploy on an &lt;em&gt;engine&lt;/em&gt; (really a managed &lt;span class="caps"&gt;JVM&lt;/span&gt; instance). there could be multiple engines running on multiple machines, and each engine can have many process &lt;em&gt;instances&lt;/em&gt; (aka &lt;em&gt;actors&lt;/em&gt; in our terminology) running inside of it. a process &lt;em&gt;instance&lt;/em&gt; gets created from a process definition whenever a new message arrives on a queue (&lt;em&gt;mailbox&lt;/em&gt; in actors’ terminology).&lt;/p&gt;


	&lt;p&gt;a scheduler inside the individual engine takes care of creating process instances (there could be thousands) and scheduling them on the worker threads.&lt;/p&gt;


	&lt;p&gt;all of this mapping happens at deploy time, as a developer you do not worry about it.&lt;/p&gt;


	&lt;p&gt;actors talk to each other using message-passing, thus your actor implementation does not even have to worry about threads or concurrency – you just express your integration logic. you could use shared memory, but it would not scale well, since you are limited to one &lt;span class="caps"&gt;JVM&lt;/span&gt;; nor would it be natural, since you have to use explicit language constructs; this language support for immutability is very convenient, as i have &lt;a href="/2008/9/12/concurrency-part1"&gt;mentioned earlier&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;if you use a &lt;span class="caps"&gt;JMS&lt;/span&gt; server to pass messages around, it becomes a sort of a &lt;em&gt;mailbox&lt;/em&gt;, holding messages for you in the queue. each incoming message would eventually spawn an instance of the actor, feeding it the message as an argument. multiple instances of the same actor can read from the same queue, thus achieving load-balancing.&lt;/p&gt;


	&lt;p&gt;once you recall that jms supports &lt;del&gt;-filters&lt;/del&gt;- &lt;em&gt;selectors&lt;/em&gt; you have the actors implementation that curiously matches something like &lt;a href="http://www.erlang.org/"&gt;erlang&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;note that this is not fine-grained parallelism; your units of work are more coarse-grained and very loosely coupled, but fundamentally, the model is the same, and it scales like crazy achieving massive throughput.&lt;/p&gt;


	&lt;p&gt;even if you do not end up using BW, you can implement this model by hand relatively easy.&lt;/p&gt;


	&lt;p&gt;so what if i wanted more fine-grained and more efficient support for actors in my language of choice (provided i am not using &lt;a href="http://www.erlang.org/"&gt;erlang&lt;/a&gt;)?&lt;/p&gt;


	&lt;h3&gt;ruby&lt;/h3&gt;


	&lt;p&gt;&lt;a href="http://revactor.org/"&gt;revactor&lt;/a&gt; networking library includes actors implementation (also see &lt;a href="http://revactor.org/philosophy"&gt;this great intro to actors&lt;/a&gt; by Tony Arciery), but i have not seen a more generic approach yet.&lt;/p&gt;


	&lt;p&gt;note that ruby is really hampered by lack of proper threading support; this is why &lt;a href="http://jruby.codehaus.org/"&gt;jruby guys&lt;/a&gt; are in a much better shape if they were to roll their own actors implementation.&lt;/p&gt;


	&lt;h3&gt;scala&lt;/h3&gt;


	&lt;p&gt;this is probably the most mature implementation i’ve seen (see &lt;a href="http://lamp.epfl.ch/~phaller/doc/haller07actorsunify.pdf"&gt;this paper&lt;/a&gt;). they take advantage of scala language features to simplify the syntax and unify synchronous and asynchronous message-passing. individual actors are represented as threads or more light-weight primitives that get scheduled to run on threads in the thread pool. it is type-safe, but it relies on convention to make sure you do not mutate your messages.&lt;/p&gt;


	&lt;p&gt;although i could see where representing actors as threads could be too heavyweight for some tasks, in the case of java and scala, your mileage may vary (see &lt;a href="http://www.classhat.com/tymaPaulMultithread.pdf"&gt;this presentation&lt;/a&gt; from Paul Tyme).&lt;/p&gt;


	&lt;h3&gt;groovy&lt;/h3&gt;


	&lt;p&gt;given language features like closures and general simpler syntax, together with the fact that it sits on top of &lt;span class="caps"&gt;JDK&lt;/span&gt; that includes &lt;code&gt;java.util.concurrent&lt;/code&gt;, one would imagine that &lt;a href="http://groovy.codehaus.org/"&gt;groovy&lt;/a&gt; would be a perfect candidate for actors implementation. however, the only thing i found so far was &lt;a href="http://www.groovyactors.org/"&gt;groovy actors&lt;/a&gt;, and it seems to have been dormant for a while.&lt;/p&gt;


	&lt;h3&gt;python&lt;/h3&gt;


	&lt;p&gt;i do not know enough about python’s memory model and its implementation, but i suspect is suffers from the same “feature” as ruby – i.e. global interpreter lock, which means that it won’t be able to scale to multiple CPUs (and, similar to ruby, &lt;a href="http://www.jython.org/Project/"&gt;jython&lt;/a&gt; that builds on &lt;span class="caps"&gt;JVM&lt;/span&gt; comes to the rescue).&lt;/p&gt;


	&lt;p&gt;the only thing i’ve looked at so far is &lt;a href="http://www.stackless.com/"&gt;stackless python&lt;/a&gt;, which is a modified version of python that makes concurrency easier (see &lt;a href="http://members.verizon.net/olsongt/stackless/why_stackless.html"&gt;this tutorial&lt;/a&gt; by Grant Olson that also includes actors). it introduces &lt;em&gt;tasklets&lt;/em&gt; aka fibers, channels, and a scheduler among other things.&lt;/p&gt;


	&lt;h3&gt;java&lt;/h3&gt;


	&lt;p&gt;this is where i am a bit surprised – i do not see a good drop-in-a-jar-and-go actors library blessed and used by all. there seems to be some research projects out there, but i want something that works for me now and supports in-memory zero-copy message passing, sync/async messaging, and type safety. i am OK with abiding by conventions instead of compiler checking things for me.&lt;/p&gt;


	&lt;p&gt;i suspect that the reason for this is the fact that some rudimentary form of actors can be implemented relatively easy using existing concurrency libraries, and this approach is intuitive without putting labels on it.&lt;/p&gt;


	&lt;p&gt;nevertheless, this is what i found:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://code.google.com/p/jetlang/"&gt;jetlang&lt;/a&gt; is a port of a .NET library and looks at Scala actors for inspiration. it is still quite beta, but it looks promising&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.malhar.net/sriram/kilim/"&gt;kilim&lt;/a&gt; (from one of the principle engineers of weblogic server) still seems to be a bit too much of a research project for my taste, but the theory behind it is sound&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;and there is a number of research projects out there:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://wcl.cs.rpi.edu/salsa/" title="Simple Actor Language System and Architecture"&gt;&lt;span class="caps"&gt;SALSA&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://functionaljava.org/"&gt;functional java&lt;/a&gt; contains actors implementation; see &lt;a href="http://blog.tmorris.net/actor-concurrency-for-java/"&gt;this blog entry&lt;/a&gt; as well as &lt;a href="http://apocalisp.wordpress.com/2008/07/28/threadless-concurrency-with-actors/"&gt;this one&lt;/a&gt; for examples&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.cs.kent.ac.uk/projects/ofa/jcsp/" title="JCSP"&gt;Communicating Sequential Processes for Java&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h1&gt;bottom line&lt;/h1&gt;


	&lt;p&gt;actors is a great abstraction, and “good enough” version of it is easy to implement – think about it, consider it, use it!&lt;/p&gt;


	&lt;p&gt;it helps if your language/platform supports concurrency primitives to build upon. this includes true threading support that scales to many CPUs, although we could also benefit from a standard &lt;a href="http://en.wikipedia.org/wiki/Fiber_%28computer_science%29"&gt;fibers&lt;/a&gt; implementation, since they are more lightweight than typical threads and would allow creation of a large number of actors that later could be mapped onto threads for execution.&lt;/p&gt;


	&lt;p&gt;each language could benefit from a well thought-out actors library, since it would push developers in the right direction.&lt;/p&gt;


	&lt;p&gt;it is not right for everything though – it might not be fine-grained enough, it might not map well to problems that rely on ordering of messages or presence of any other state across multiple actors or multiple messages.&lt;/p&gt;


	&lt;h1&gt;to be continued&lt;/h1&gt;


	&lt;p&gt;what is on the horizon that is worth noting? what are some of the interesting research topics? what have we forgotten over the years? what other heuristics/patterns and libraries could be immediately useful?&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="/2008/9/12/concurrency-part1"&gt;part 1&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/ur9xy9tQF8I" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2008/9/19/concurrency-part-2-actors</feedburner:origLink></entry>
  <entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2008-09-12:1538</id>
    <published>2008-09-12T09:10:00Z</published>
    <updated>2008-09-19T13:15:07Z</updated>
    <category term="java" />
    <category term="ruby" />
    <category term="software" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/p9iA7xW9rN8/concurrency-part1" rel="alternate" type="text/html" />
    <title>concurrency: part 1</title>
<content type="html">
            &lt;p&gt;true to the &lt;a href="/2005/10/2/hello-world-readme"&gt;purpose of this blog&lt;/a&gt;, below is an attempt to organize my (admittedly very superficial) experience with concurrency.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="/2008/9/19/concurrency-part-2-actors"&gt;part 2&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h1&gt;my 10GHz &lt;span class="caps"&gt;CPU&lt;/span&gt;&lt;/h1&gt;


	&lt;p&gt;&lt;/p&gt;


	&lt;p&gt;you probably noticed that &lt;a href="http://en.wikipedia.org/wiki/Moore%27s_Law"&gt;moore’s law&lt;/a&gt; does not really apply anymore when it comes to &lt;span class="caps"&gt;CPU&lt;/span&gt; speed. if it were holding up, we would have had 10GHz CPUs by now, but for half a decade we haven’t really moved past 3GHz.&lt;/p&gt;


	&lt;p&gt;that is to be expected for the current generation of hardware – the gains have to happen elsewhere. for a little while we’ll get performance boost due to increase in size and speed of the caches that would improve &lt;a href="http://en.wikipedia.org/wiki/Locality_of_reference"&gt;locality&lt;/a&gt;, but in the long run it seems that multiple CPUs is where the improvements are to be mined from (this also includes specialized CPUs like &lt;a href="http://en.wikipedia.org/wiki/Cell_microprocessor"&gt;Cell&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Graphics_processing_unit"&gt;GPUs&lt;/a&gt; in general).&lt;/p&gt;


	&lt;p&gt;this means that more and more people will have to think about their applications in terms of parallel processing. this also means that optimizations will become more and more important for those workloads that cannot be parallelized and therefore will be stuck on a single &lt;span class="caps"&gt;CPU&lt;/span&gt; (for a good introduction see &lt;a href="http://www.gotw.ca/publications/concurrency-ddj.htm"&gt;The Free Lunch Is Over&lt;/a&gt; at Dr. Dobb’s Journal).&lt;/p&gt;


	&lt;p&gt;the bottom line is that as an app developer you cannot ignore the problem any longer; to make matter worse, there is no automagical solution in the nearest future that would make your application take advantage of multiple processors.&lt;/p&gt;


	&lt;h1&gt;my concurrency story&lt;/h1&gt;


	&lt;p&gt;in past decade most of the stuff i’ve worked with had some sort of coarse-grained parallelism; the rest was taken care of by the underlying framework.&lt;/p&gt;


	&lt;p&gt;i started with a unix philosophy of small programs connected via pipes, each performing a simple task. a little later came in &lt;code&gt;fork&lt;/code&gt; and signals. things were simple, and OS took care of everything.&lt;/p&gt;


	&lt;p&gt;then came the web – it was mostly stateless with the database doing all the heavy lifting when it came to shared state. we just added boxes if we needed to grow. in &lt;a href="http://en.wikipedia.org/wiki/Extract,_transform,_load"&gt;&lt;span class="caps"&gt;ETL&lt;/span&gt;&lt;/a&gt; multi-box, multi-cpu setup was also natural, and the tools were designed to conceal concurrency; same goes for &lt;a href="http://en.wikipedia.org/wiki/Enterprise_application_integration"&gt;integration&lt;/a&gt;, where concurrency was at the level of data flows, which made things rather simple.&lt;/p&gt;


	&lt;p&gt;it is only in the past year or so when i had to really dive in deeper into relatively low-level concurrent development with java.&lt;/p&gt;


	&lt;p&gt;&lt;/p&gt;


	&lt;p&gt;my &lt;a href="http://techbus.safaribooksonline.com/0321349601"&gt;dog-eared copy&lt;/a&gt; of &lt;a href="http://www.javaconcurrencyinpractice.com/"&gt;Java Concurrency in Practice&lt;/a&gt; has proved to be quite an indispensable reference. the book is a bit uneven, and the editor should have spent more time on it, but you get used to it. it is a great practical resource, especially in the presence of so much confusing and incomplete information online.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://gee.cs.oswego.edu/dl/concurrency-interest/index.html"&gt;jsr-166&lt;/a&gt; introduced in java5 (and the primary subject of the book) is such a productivity boost; being a part of &lt;span class="caps"&gt;JDK&lt;/span&gt;, it is a big step forward towards letting mere mortals like me really embrace concurrent programming.&lt;/p&gt;


	&lt;p&gt;i find myself using &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/Executors.html"&gt;Executors&lt;/a&gt; convenience methods all the time: it is so easy to create a pool, and then just feed it &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/Callable.html"&gt;Callable&lt;/a&gt; instances, getting a &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/Future.html"&gt;Future&lt;/a&gt; instance as a handle in return. if more flexibility is needed, i use &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ThreadPoolExecutor.html"&gt;ThreadPoolExecutor&lt;/a&gt;. &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Queue.html"&gt;Queues&lt;/a&gt; are great as a communication channel for any sort of producer/consumer scenario, anything that requires message-passing or any sort of other work hand-off. &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/atomic/package-summary.html"&gt;Atomics&lt;/a&gt; are also great – i do not have to think twice when implementing counters or any other simple data structures.&lt;/p&gt;


	&lt;p&gt;most of the time i do not even have to work with threads or low-level synchronization primitives directly – they are buried deep within the libraries. i have less nightmares, since i do not have to touch &lt;code&gt;volatile&lt;/code&gt; as often.&lt;/p&gt;


	&lt;p&gt;at some point i’ve read both editions of &lt;a href="http://www.amazon.com/Concurrent-Programming-Java-TM-Principles/dp/0201310090"&gt;doug lea’s book&lt;/a&gt;, but i was always hesitant to recommend it; i’d rather rely on libraries that abstracted all of this away. now that &lt;code&gt;java.util.concurrent&lt;/code&gt; has been out for 4 years, and &lt;a href="http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601"&gt;Java Concurrency in Practice&lt;/a&gt; has become a bestseller, there are no more excuses.&lt;/p&gt;


	&lt;p&gt;one thing i’ve learned though – when you think you got this stuff, you discover a whole new class of problems that make you realize how complicated all of this really is, and how truly difficult it is to write larger concurrent programs.&lt;/p&gt;


	&lt;p&gt;you really, really have to think hard about how you share your objects, how you compose them and operate on them. you need to really understand how the language and the runtime work (i find myself checking &lt;a href="http://java.sun.com/docs/books/jls/"&gt;&lt;span class="caps"&gt;JLS&lt;/span&gt;&lt;/a&gt; quite often). this is where good OO practices like encapsulation become even more important, since you are not just risking maintenance overhead, but you are risking the correctness of your program.&lt;/p&gt;


	&lt;p&gt;now, i always told myself that programming is not an exercise in manliness. i am just an app developer; i want to ship a working code that solves customer’s problems, not spend countless hours trying to reason through non-blocking algorithms just because i decided to do something non-trivial with &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html"&gt;ConcurrentHashMap&lt;/a&gt;. at the same time i do not want to waste my precious CPUs, so what am i to do? shouldn’t this stuff be easier? is there something I am missing?&lt;/p&gt;


	&lt;h1&gt;threads considered harmful&lt;/h1&gt;


	&lt;p&gt;&lt;/p&gt;


	&lt;p&gt;actually, there is no problem with threads per se; the problem is with &lt;em&gt;shared state&lt;/em&gt;.&lt;/p&gt;


	&lt;p&gt;in a normal sequential program you only worry about the logic as it is unfolding before you – one statement after another, in order. in a concurrent program that uses threads and shared state in addition to all your usual problems you also have problem of the &lt;em&gt;non-deterministic state&lt;/em&gt;: since at any point in time any thread can come in and mess with your data, even between the operations you considered atomic before (like &lt;code&gt;counter++&lt;/code&gt;), the number of states that your program can be in suffers a combinatorial explosion. this makes it really hard to reason about its correctness.&lt;/p&gt;


	&lt;p&gt;your code becomes brittle, sacrificing &lt;em&gt;failure isolation&lt;/em&gt; – one misbehaving thread can potentially harm the whole runtime (a good analogy is &lt;a href="http://en.wikipedia.org/wiki/Blue_Screen_of_Death"&gt;&lt;span class="caps"&gt;BSOD&lt;/span&gt;&lt;/a&gt; caused by a device driver).&lt;/p&gt;


	&lt;p&gt;in addition, things don’t &lt;em&gt;compose&lt;/em&gt; – a transfer operation performed by a thread-safe &lt;em&gt;customer&lt;/em&gt; between two thread-safe &lt;em&gt;accounts&lt;/em&gt; is not going to be automatically thread-safe.&lt;/p&gt;


	&lt;p&gt;to make matter worse, some of the errors remain hidden when run on commodity 1-2 &lt;span class="caps"&gt;CPU IA32&lt;/span&gt; hardware, but as the number of CPUs grow, or their architecture becomes less restrictive to help with concurrency, things start to break down.&lt;/p&gt;


	&lt;p&gt;for more thorough discussion see &lt;a href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf"&gt;The Problem With Threads&lt;/a&gt; by Edward A. Lee and Cliff Click’s &lt;a href="http://blogs.azulsystems.com/cliff/2008/04/we-dont-know-ho.html"&gt;We Don’t Know How To Program…&lt;/a&gt;&lt;/p&gt;


	&lt;h1&gt;now what?&lt;/h1&gt;


	&lt;p&gt;a natural reaction is to forget about fine-grained parallelism and offload the hard stuff onto someone else. after all, i am an app programmer, i care about business problems, what’s all of this &lt;a href="http://www.catb.org/jargon/html/Y/yak-shaving.html"&gt;yak shaving&lt;/a&gt; about?!&lt;/p&gt;


	&lt;p&gt;in some cases we can get away with firing up individual processes to take advantage of multiple CPUs. most of the time though it means that the problem has been pushed further down the stack, which often turns out to be the database. this is the route that &lt;a href="http://www.rubyonrails.org/"&gt;rails&lt;/a&gt; folks went, and it certainly was pragmatic approach at the time (now that they are forced to deal with efficiency, threading is back in the picture. for discussion of issues see &lt;a href="http://blog.headius.com/2008/08/qa-what-thread-safe-rails-means.html"&gt;Q/A: What Thread-safe Rails Means&lt;/a&gt;).&lt;/p&gt;


	&lt;p&gt;if you can get away with using individual processes, go for it (see &lt;a href="http://www.google.com/googlebooks/chrome/small_04.html"&gt;google chrome&lt;/a&gt;) – you get &lt;em&gt;failure isolation&lt;/em&gt;, you get &lt;em&gt;immutability&lt;/em&gt; in respect to other processes (it won’t be as easy for another process to mess with your data), and as an additional benefit, you get to use all the standard tools that the OS has when it comes to managing and troubleshooting processes (as opposed to using often incomplete and idiosyncratic tools for thread management that your runtime platform of choice offers – if any).&lt;/p&gt;


	&lt;p&gt;still, as we need more and more fine-grained concurrency and as the level of concurrency increases (it is not just a handful of CPUs now, but dozens, and even &lt;a href="http://www.azulsystems.com/"&gt;hundreds&lt;/a&gt;), one process per task becomes too expensive (context switching, high costs of creating a new process, memory overhead, etc). so we are back to some sort of lightweight thread-like primitives running within the same process, sharing some common resources.&lt;/p&gt;


	&lt;p&gt;most of the popular languages/platforms these days provide some sort of threading and shared memory support. but as outlined above, they suffer from some fundamental problems. there are some practical things at various levels of abstractions that that can help: low-level constructs within the language/platform itself, tooling, and higher-level libraries/&lt;a href="http://en.wikipedia.org/wiki/Domain_Specific_Language"&gt;mini-languages&lt;/a&gt;&lt;/p&gt;


	&lt;h4&gt;language&lt;/h4&gt;


	&lt;ul&gt;
	&lt;li&gt;make &lt;em&gt;immutability&lt;/em&gt; easier – take note of functional languages, but also make it practical. in java case, for instance, it could mean extending immutability to some core data structures (see &lt;a href="http://www.scala-lang.org/"&gt;scala&lt;/a&gt; collections) or making it easier to tag an instance as immutable (&lt;a href="http://www.ruby-doc.org/core/classes/Object.html#M000354"&gt;see&lt;/a&gt; ruby’s &lt;code&gt;freeze&lt;/code&gt;; this reeks of boilerplate though) – this way errors will be caught at compile time&lt;/li&gt;
		&lt;li&gt;consider sharing data only through explicit, ideally checked at compile-time, means. thus by default nothing is shared, and in order to make something shared you have to explicitly tag it as such. ideally, this would also come with some sort of namespace support, thus limiting mutations to a sandbox (see &lt;a href="http://clojure.org/concurrent_programming"&gt;clojure&lt;/a&gt; for reference)&lt;/li&gt;
		&lt;li&gt;make language safer to use when it comes to exposing shareable state (this is when something like &lt;code&gt;static&lt;/code&gt; &lt;a href="http://gbracha.blogspot.com/2008/02/cutting-out-static.html"&gt;becomes a problem&lt;/a&gt; – see &lt;a href="http://blog.headius.com/2008/04/shared-data-considered-harmful.html"&gt;Shared Data Considered Harmful&lt;/a&gt; for an example that applies to concurrency)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h4&gt;tooling&lt;/h4&gt;


	&lt;ul&gt;
	&lt;li&gt;static analysis tools might help, but we need to give them a bit more than just an infinite number of states. &lt;a href="http://findbugs.sourceforge.net/"&gt;findbugs&lt;/a&gt; for instance, supports &lt;a href="http://www.javaconcurrencyinpractice.com/annotations/doc/index.html"&gt;concurrency annotations&lt;/a&gt; and something like &lt;a href="http://chord.stanford.edu/"&gt;chord&lt;/a&gt; could also be promising. this stuff is complex though and there are limits to static analysis (and i do not even want to bring up formal proofs using &lt;a href="http://en.wikipedia.org/wiki/Process_algebra"&gt;process calculi&lt;/a&gt;)&lt;/li&gt;
		&lt;li&gt;i want more support from the platform to help me troubleshoot lock contention, deadlocks, cpu-intensive threads, and other concurrency-related infrastructure. sun’s hotspot has some &lt;a href="http://java.sun.com/javase/6/docs/technotes/guides/visualvm/index.html"&gt;rudimentary&lt;/a&gt; &lt;a href="http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html"&gt;stuff&lt;/a&gt; in place, but i want more things out of the box (&lt;a href="http://www.azulsystems.com/"&gt;azul&lt;/a&gt; claims that they have always-on built-in tools in their product, but i have not played with them)&lt;/li&gt;
		&lt;li&gt;speaking of azul, i need to study them more. although perceived as a boutique solution, they are addressing issues that everyone will be facing in just a few years. seems like they ported sun’s hotspot to their hardware which allowed them to achieve scaling by automatically replacing synchronization with &lt;a href="http://en.wikipedia.org/wiki/Optimistic_locking"&gt;optimistic concurrency&lt;/a&gt; which scales much better. incidentally, this truism about optimistic concurrency has been obvious to database folks for decades&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h4&gt;libraries/mini-languages&lt;/h4&gt;


	&lt;p&gt;one of the approaches is to focus on your problem domain and come up with a library/language that solves your particular problem and abstracts away concurrency. web frameworks (J2EE, rails), or &lt;span class="caps"&gt;ETL&lt;/span&gt; tools, or even databases are all examples of such approaches.&lt;/p&gt;


	&lt;p&gt;this is where my interest lies as an app developer – how can i make concurrent programming easier for me, the layman.&lt;/p&gt;


	&lt;p&gt;the bottom line is that if we insist on using low-level synchronization primitives, it would be really hard to paper over the underlying complexities. right now there is no generic universal approach that will simplify concurrent programming. so at this point a pragmatic programmer is left with patterns, supporting libraries, and heuristics.&lt;/p&gt;


	&lt;h1&gt;to be continued&lt;/h1&gt;


	&lt;p&gt;there are some patterns (for the lack of a better word) that i found to be helpful in dealing with concurrency; there is also some stuff on the horizon that promises all sorts of benefits – is there really a silver bullet? but also there is plenty of stuff that has been with us for decades, and i would be the first one to bow my head in shame, acknowledging my ignorance.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="/2008/9/19/concurrency-part-2-actors"&gt;part 2&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/p9iA7xW9rN8" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2008/9/12/concurrency-part1</feedburner:origLink></entry>
  <entry xml:base="http://blog.splitbody.com/">
    <author>
      <name>anton</name>
    </author>
    <id>tag:blog.splitbody.com,2008-08-22:1529</id>
    <published>2008-08-22T15:10:00Z</published>
    <updated>2008-10-08T06:51:37Z</updated>
    <category term="people" />
    <category term="work" />
    <link href="http://feedproxy.google.com/~r/amaximov/~3/_-KjtafYGnc/focus" rel="alternate" type="text/html" />
    <title>focus</title>
<content type="html">
            &lt;p&gt;this is a bit of a wandering post, but i know i think best through writing things out, and while personal journals are a great thing, i cannot force myself to write them if there is no (even hypothetical) audience.&lt;/p&gt;


	&lt;p&gt;&lt;/p&gt;


	&lt;p&gt;i think as i get older, i realize that there is so much stuff out there that i am interested in, that the importance of focusing is becoming increasingly apparent.&lt;/p&gt;


	&lt;p&gt;the distractions are getting more targeted and more fine-grained – it is getting simpler to fill up all the cracks of time between activities – reddit, twitter, google reader – scan the headlines while you are waiting for the build, and &lt;em&gt;boom&lt;/em&gt; – you’ve blown your stack and lost the context. this is when discipline often loses to muscle memory; i suppose it is the usual story of combating the addiction. all this technology i surround myself with to be more effective just makes it simpler to waste time without achieving anything.&lt;/p&gt;


	&lt;p&gt;in this sense (all other things being equal), i find pair programming to be very helpful – it is so much harder to get distracted with someone else sitting next to you.&lt;/p&gt;


	&lt;p&gt;in certain cases i’ve observed that the proverbial &lt;a href="http://forums.construx.com/blogs/stevemcc/archive/2008/03/27/productivity-variations-among-software-developers-and-teams-the-origin-of-quot-10x-quot.aspx"&gt;order of magnitude difference in productivity between individual developers&lt;/a&gt; can simply be attributed to the ability to focus.&lt;/p&gt;


	&lt;p&gt;this became even more apparent to me in the past year at work as i have been faced with thousands of stored procedures for a given system – some of these storprocs being 2K+ lines long and recursive(!). talking about a new level of immersion!&lt;/p&gt;


	&lt;p&gt;one behavior i am guilty of is perfectionism in the face of overarching bigger goals – trying to make something flawless all the while the solution has to be out now and has to be good enough. i think i became immune to rolling out frameworks when a quick point solution is needed, so now the battle has moved to a finer level – testing as risk management, for instance – in the absence of time i test the stuff that is most likely to contain bugs, and i test coarse-grained user-level functionality first instead of polishing up individual unit tests.&lt;/p&gt;


	&lt;p&gt;but really, all this “micro focusing” business above is not that bad and is quite manageable on day to day basis. what i am trying to figure out though is how it applies to my career in general.&lt;/p&gt;


	&lt;p&gt;&lt;/p&gt;


	&lt;p&gt;my problem right now is that after a decade in IT i realize that i have some hands-on skills that would always be in demand, and that there always will be plenty of filler work that will keep me busy and provide some sort of satisfaction (the kind similar to mindless exhaustion you feel after a workout).&lt;/p&gt;


	&lt;p&gt;i know i tend to become absorbed in day to day stuff, and lose the sight of everything else. &lt;span class="caps"&gt;NYC&lt;/span&gt; is dangerous in this respect – the pace and the energy make you work harder, and one can get fixated on something with a lot more intensity. this is when i find myself performing all sorts of &lt;a href="http://www.catb.org/jargon/html/Y/yak-shaving.html"&gt;yak shaving&lt;/a&gt; feats; is it really what i should be spending my time on?&lt;/p&gt;


	&lt;p&gt;i think paul graham got it right in &lt;a href="http://www.paulgraham.com/cities.html"&gt;his essay&lt;/a&gt; – &lt;span class="caps"&gt;NYC&lt;/span&gt; has the drive and the ambition, and i feed on it, but i also need to be fully cognizant of its true target. doing something pointless twice as hard isn’t something i am after.&lt;/p&gt;


	&lt;p&gt;so what is it that i &lt;em&gt;should&lt;/em&gt; be doing? so let’s see if i can talk through this.&lt;/p&gt;


	&lt;p&gt;i always took pride in knowing a great deal about a lot of technical things all the while aspiring to grasp “the bigger picture.” i enjoy being able to build things, drive them to completion, and deliver. i also know that i like dealing with people, solve organizational problems, motivate and build teams.&lt;/p&gt;


	&lt;p&gt;i really enjoy doing hands-on stuff, and i am pretty good at it; at the same time i’ve seen all too often that most of the technology problems stem from people problems. it pains me to be on the receiving end of business blunders that render my technical efforts useless.&lt;/p&gt;


	&lt;p&gt;&lt;/p&gt;


	&lt;p&gt;one of the trends in large companies is increasing specialization on many levels of IT. it is inevitable to a degree, but this is precisely where my skills would be least utilized. the image that haunts me is the nine to five drone with atrophied knowledge of everything but the immediate responsibilities of everyday job, unable to survive outside of the large corporation. there are plenty of slots like that – just waiting to be filled.&lt;/p&gt;


	&lt;p&gt;i want to work in the environment where people around me do have a vision that we all share, and this is what drives our everyday work.&lt;/p&gt;


	&lt;p&gt;i also like small teams (or small companies) – you get to do a lot of different stuff, you learn much faster, and you feel the impact you make.&lt;/p&gt;


	&lt;p&gt;so ideally it comes down to focusing on my strengths and consciously building upon them, which means spending less time on everything else.&lt;/p&gt;


	&lt;p&gt;it sounds quite absolute and final (an also quite fluffy), so perhaps a better approach is to set a goal, timebox it, and focus. if it works – great, and if not – review and start again.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;current work: spend less time on it; spend less time on filler work; focus on business – actually read the pile of books i have here instead of reading up on tech stuff.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;spend more time on hobby projects, get back into languages/platforms i abandoned, pick a few projects and actually contribute; build the brand – push for talks at user groups, use real name in forums, blog more on technical topics.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;as far as career choices go:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;i’ve done the &lt;em&gt;enterprise architecture&lt;/em&gt; thing for a couple of years before, and despite the raging pundits that the title has accumulated, i think there are great things to be done. you do not have to abandon the technical skills, but you have to realize that your success does not depend on tech anymore. you do end up building and running systems in this role, but they also include people, culture, and organization – not just technology. there is a lot to be said about &lt;a href="http://www.amazon.com/Introduction-General-Systems-Thinking-Anniversary/dp/0932633498/"&gt;systems thinking&lt;/a&gt;, and there is plenty more reading i need to do. i am also yet to find a good no-bullshit community that thinks along these lines (so far i’ve been really enjoying &lt;a href="http://www.stucharlton.com/blog/"&gt;Stu Charlton’s blog&lt;/a&gt; for instance) and people i can work with and learn from…&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;...which leads me to &lt;em&gt;consulting&lt;/em&gt;. what appeals to me here is focus on solving a particular problem (compare that to a less focused role of a regular employee), as well as a great variety of problems, and generally a higher level of expertise expected. you grow and learn so much faster, and ideally this might lead to a product idea, if you see the same problem repeated over and over again. one skill that i know i have is what jerry weinberg calls “jiggling” (see &lt;a href="http://www.amazon.com/Secrets-Consulting-Giving-Getting-Successfully/dp/0932633013"&gt;Secrets of Consulting&lt;/a&gt; and &lt;a href="http://www.amazon.com/Are-Your-Lights-Figure-Problem/dp/0932633161"&gt;Are Your Lights On?&lt;/a&gt;) – helping people get “unstuck” by asking questions, suggesting tools, practices. often i realize that in many teams although i could do all the work myself, the team would get so much more out of me if i create an environment where people can learn and grow on their own.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;another option is a &lt;em&gt;product/program owner&lt;/em&gt; in a larger company. the biggest selling point is the diverse set of skills required and the sense of ownership. you have a bigger picture, you are responsible for it, and at the same time you need tech, people, and organization to be a success.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;the refinement of the above is a &lt;em&gt;startup&lt;/em&gt; – you build and deliver a product. your impact is tangible, you actually “own” something, and you contribute on many levels, which is a great use for a broad set of skills.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;and the last option is to get a foot in the door in a larger company as a regular developer (since this is an easy lowest common denominator that is versatile enough and faceless enough) and then try and grow into some sort of a role similar to one of the above. it is terribly inefficient though – most of the energy will be spent on the wrong things.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;it does help to write all of this out – having a stake in the ground is a start. let’s see how it goes from here.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/amaximov/~4/_-KjtafYGnc" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.splitbody.com/2008/8/22/focus</feedburner:origLink></entry>
</feed>
