<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8368266563629751701</id><updated>2012-01-19T22:29:27.720+01:00</updated><category term='ruby'/><category term='merging'/><category term='blocks'/><category term='cvs'/><category term='scala'/><category term='ant'/><category term='bad'/><category term='java'/><category term='refactoring'/><category term='bug'/><category term='webdav'/><category term='override'/><category term='dr.no'/><category term='random'/><category term='macros'/><category term='PriorityQueue'/><category term='tortoise'/><category term='svn git'/><category term='ssh'/><category term='macos ssh agent'/><category term='lisp'/><category term='syntax'/><category term='intuition'/><category term='git cvs interoperation'/><category term='programmer soul'/><category term='cvsnt'/><category term='git'/><category term='bgga'/><category term='eclipse'/><category term='blogging'/><category term='c++'/><category term='closures'/><category term='vcs'/><category term='anonymous functions'/><category term='distribution'/><category term='ide'/><category term='svn'/><category term='git-svn'/><title type='text'>it's just me...</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-6899293474754009161</id><published>2011-03-06T13:35:00.004+01:00</published><updated>2011-03-06T14:11:32.531+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='intuition'/><category scheme='http://www.blogger.com/atom/ns#' term='random'/><category scheme='http://www.blogger.com/atom/ns#' term='distribution'/><title type='text'>Skewed distribution</title><content type='html'>Distributing items (IP packets, phone calls, http requests) randomly onto a set of machines (say, four) is easy (in C here):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;int slot = random_nonnegative () % 4;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The number space returned by the random number generator is big enough that the items are essentially evenly distributed even if the number of slots wasn't a divider of the size of the random number space.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I want a skewed distribution, however. The slots shall be loaded unevenly. Thus:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;int slot = random_nonnegative () % 4;&lt;br /&gt;slot = random_nonnegative () % (slot + 1);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That is, if slot is 3 after the first line, then we have an even change to get to any of the slots in the second line. If it is 0 we can only end up there. In essence there are four ways to get to slot 0, three to slot 1, two to slot 2, and one to slot 3. Zeroth-order intuition would thus say that four out of ten (1+2+3+4) items would end up in slot zero.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Except that the experimental results don't match. And for a reason. For slot being 3 in the first line, a fourth of the item go to each slot; for slot being 2, a third goes to each of the three first slots, and so on. Thus slot 3 receives a quarter of a quarter, or 1/16th of all items (and not one tenth); slot 2 receives a quarter of a quarter likewise, plus a third of a quarter via slot being 2 on first line; slot 0 finally gets 1/16+1/12+1/8+1/4, which is 3/48+4/48+6/48+12/84, which is 25/48, or about 52%. Which is a bit more than the 40% of our first guess.&lt;br /&gt;&lt;br /&gt;(PS:&lt;pre&gt;&lt;br /&gt;char *target = targetarray [&lt;br /&gt;     random_nonneg () % (&lt;br /&gt;           random_nonneg () % (sizeof (targetarray) /&lt;br /&gt;                               sizeof (targetarray [0]))&lt;br /&gt;            + 1)];&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;for the golfing old-style C hacker.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-6899293474754009161?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/6899293474754009161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=6899293474754009161' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/6899293474754009161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/6899293474754009161'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2011/03/skewed-distribution.html' title='Skewed distribution'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-4582652214222982971</id><published>2009-12-23T21:35:00.003+01:00</published><updated>2009-12-23T21:43:24.230+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ide'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>svn needs IDE integration</title><content type='html'>It's funny; all the world craves for svn integration for their IDE and doesn't want git because of lack of such integration. On the other hand I am quite happy without the integration, but then I was raised on a command line.&lt;br /&gt;&lt;br /&gt;And then I noticed that, for the usual IDEs (java dev, that is), you &lt;i&gt;need&lt;/i&gt; IDE integration for svn for a very simple reason: refactoring. If you rename or repackage a class, the source file changes location, and svn needs to record that as a file rename, and you need to tell it so. Now, if the IDE has moved the file, you can't do again with svn, and that would be the only way to make svn to know the move. (You could stop the IE, move the file back and then with svn move it forth again, but...shudder.)&lt;br /&gt;&lt;br /&gt;Thus the IDE &lt;i&gt;must&lt;/i&gt; be able to talk directly with svn. It's not just a question of avoiding a suboptimal command line, it's a necessity. With git, on the other hand, there is no such need as it does not directly track renames anyway and &lt;a href="http://andreas-krey.blogspot.com/2009/10/awesomeness-of-no-rename.html"&gt;is much smarter about them and merging&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-4582652214222982971?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/4582652214222982971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=4582652214222982971' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/4582652214222982971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/4582652214222982971'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2009/12/svn-needs-ide-integration.html' title='svn needs IDE integration'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-7718658161670632357</id><published>2009-11-15T12:19:00.004+01:00</published><updated>2009-11-15T12:30:25.966+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bad'/><category scheme='http://www.blogger.com/atom/ns#' term='tortoise'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>svn: more bad</title><content type='html'>Ranting about tortoisesvn and it committing new files with CR/LF in them, I finally found that there is apparently no way to make svn behave the right way (in our sense) of doing &lt;tt&gt;svn:eol-style=native&lt;/tt&gt; automatically. You need to do a setup like &lt;a href="http://www.apache.org/dev/svn-eol-style.txt"&gt;this&lt;/a&gt;. Yet another misdesign. (And if you work on two projects where these defaults differ, then you are out of luck.)&lt;br /&gt;&lt;br /&gt;By the way, somehow nobody did think that a by-line diff of &lt;tt&gt;svn:externals&lt;/tt&gt; would be a good thing. We usually have one directory with six or so externals, and when you change one of them &lt;tt&gt;svn diff&lt;/tt&gt; just shows the whole property text as changed, and not individual lines. Tortoisesvn is smarter here (as in other places), reinforcing my claim that with svn you need GUI support because the command line interface isn't exactly pretty.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-7718658161670632357?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/7718658161670632357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=7718658161670632357' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/7718658161670632357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/7718658161670632357'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2009/11/svn-more-bad.html' title='svn: more bad'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-6515619297427444144</id><published>2009-11-08T22:59:00.003+01:00</published><updated>2009-11-08T23:40:41.530+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='svn git'/><title type='text'>svn: BAD</title><content type='html'>svn &lt;i&gt;is&lt;/i&gt; just broken.&lt;br /&gt;&lt;br /&gt;Google for &lt;tt&gt;git commit&lt;/tt&gt;. First link points to the current documentation. Dito for &lt;tt&gt;svn commit&lt;/tt&gt;. First hits point to outdated versions of the manual (usually 1.0, maximum 1.5).&lt;br /&gt;&lt;br /&gt;Checkout a module. Unfortunately, the URL to check out usually ends on &lt;tt&gt;trunk&lt;/tt&gt; so the default sandbox directory name isn't really helpful. Likewise, it took 'til 1.6 that they found out that typing the repository URL in many commands is a waste, and allowed &lt;tt&gt;^/repo-relative&lt;/tt&gt; paths not only in svn:externals but also in commands.&lt;br /&gt;&lt;br /&gt;Just for kicks try an &lt;tt&gt;svn ls http://...&lt;/tt&gt; operation over GPRS. Will take on the order of half a minute because GPRS round trip time is about a second, and &lt;tt&gt;svn ls&lt;/tt&gt; does a good dozen http requests to the server, all serialized, but not reusing the connection. It is actually a good idea to prefix commands with &lt;tt&gt;ssh elsewhere&lt;/tt&gt;; the ssh login is faster, and the svn command is then done on fast links. (Doesn't work for commands involving a sandbox, of course.)&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;svn import&lt;/tt&gt; can only import a given tree into a &lt;i&gt;new&lt;/i&gt; location within the svn repo; it can't do updates, like they are needed to import newer versions of vendor software and keep the file identity that will be needed to keep future merges smooth. There is a script in contrib that can do that, but it never got integrated into the import command proper.&lt;br /&gt;&lt;br /&gt;Likewise, don't even expect a command that can create an archive (tar/zip) from the versioned files in the current directory (&lt;tt&gt;git archive&lt;/tt&gt;), or that can delete all unversioned files in the sandbox (&lt;tt&gt;git clean&lt;/tt&gt;). Or that tells you a human-readable name for the current revision based on the last tag (&lt;tt&gt;git describe&lt;/tt&gt;).&lt;br /&gt;&lt;br /&gt;And, of course, there is the &lt;a href="http://blogs.open.collab.net/svn/2008/07/subversion-merg.html"&gt;big thing&lt;/a&gt;: the hyped merge support of svn 1.5 is broken by design. Isn't fixed in 1.6, and probably can't be fixed without changing the repository format. (I suspect the whole mergeinfo property stuff is just wrong.) In the meanwhile, and in a much shorter timespan than from the announcement of svm merge support to its eventual functional delivery, git appeared, and just did it right.&lt;br /&gt;&lt;br /&gt;I don't like that. We've been waiting for svn 1.5 because of the merge support, and then started to switch. At the same time git appeared on my radar; I could use &lt;tt&gt;git cvsimport&lt;/tt&gt; and &lt;tt&gt;git filter-branch&lt;/tt&gt; to do our conversion from cvs to svn, in a way that allows to pull future changes from cvs to svn as well, and without manual intervention. Unfortunately I lost all liking for svn in the process, because git turned out to be just much better tooled, capable, and flexible. And faster in its development, its version number is bound to pass that of svn soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-6515619297427444144?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/6515619297427444144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=6515619297427444144' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/6515619297427444144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/6515619297427444144'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2009/11/svn-bad.html' title='svn: BAD'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-4720961929537532854</id><published>2009-10-22T22:43:00.002+02:00</published><updated>2009-10-22T22:50:01.920+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><title type='text'>The awesomeness of no rename</title><content type='html'>git does not store renames. All it does is store each version of the whole tree of the managed project. The diff and merge tools are those that look at the trees and file contents and notice that  a file has been renamed.&lt;br /&gt;&lt;br /&gt;For example, I had a project where a program was converted to C++, piecewise. One file was originally &lt;code&gt;foo.c&lt;/code&gt;, then &lt;code&gt;foo.cpp&lt;/code&gt; was created by copying and fixing the original C source. &lt;code&gt;foo.c&lt;/code&gt; was not removed until later, so for a few commits both existed simultaneously. Indeed this was in CVS, and I just imported the stuff to git, to work on newer stuff there.&lt;br /&gt;&lt;br /&gt;Now it was time to merge the line originating in CVS into the work branch. git merge just looked at the changes that needed to be merged all at once, and saw that &lt;code&gt;foo.c&lt;/code&gt; was gone and &lt;code&gt;foo.cpp&lt;/code&gt; was new over that stretch, and that they were 95% similar, so it assumed this was a rename, and properly merged the rename into the work branch.&lt;br /&gt;&lt;br /&gt;That is the power of not doing or saving renames.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-4720961929537532854?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/4720961929537532854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=4720961929537532854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/4720961929537532854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/4720961929537532854'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2009/10/awesomeness-of-no-rename.html' title='The awesomeness of no rename'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-850782259333495196</id><published>2009-09-28T21:26:00.004+02:00</published><updated>2009-09-28T21:51:18.554+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git cvs interoperation'/><title type='text'>git and cvs: Coexistence</title><content type='html'>There is a relatively trivial way to use git on trees managed by cvs which I use often to carry around cvs projects for new work and enjoy the distributed nature (which comes quite handy when on a train). Recipe: Check out the target tree with cvs, go into the root, &lt;tt&gt;git init&lt;/tt&gt;, and &lt;tt&gt;cvs-files | xargs git add&lt;/tt&gt;. One &lt;tt&gt;git commit -m initial&lt;/tt&gt; and you are &lt;a href="http://twitpic.com/jhzwe"&gt;ready to go&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Now you can clone around as you like, and do cvs updates in the gitted sandbox, and commit those into git, and back. Only thing is that on the way back to cvs you manually need to track file additions/deletions.&lt;br /&gt;&lt;br /&gt;The script &lt;tt&gt;cvs-files&lt;/tt&gt; looks like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;find * -name CVS -type d | while read cdir&lt;br /&gt;do&lt;br /&gt;  dir=`dirname $cdir`&lt;br /&gt;  if test X$dir = X. ; then&lt;br /&gt;    dir=""&lt;br /&gt;  else&lt;br /&gt;    dir="$dir/"&lt;br /&gt;  fi&lt;br /&gt;  sed -ne 's:^/\([^/][^/]*\)/.*$:\1:p' /dev/null ${dir}CVS/Entries* | \&lt;br /&gt;    sort -u | while read name&lt;br /&gt;  do&lt;br /&gt;    if test -r $dir$name; then&lt;br /&gt;      echo $dir$name&lt;br /&gt;    fi&lt;br /&gt;  done&lt;br /&gt;done&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;It just goes through the &lt;tt&gt;CVS/Entries&lt;/tt&gt; files to find out what's under CVS control to initially put those into git.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-850782259333495196?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/850782259333495196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=850782259333495196' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/850782259333495196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/850782259333495196'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2009/09/git-and-cvs-coexistence.html' title='git and cvs: Coexistence'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-2692041348668671385</id><published>2009-04-07T23:22:00.003+02:00</published><updated>2009-04-07T23:41:26.908+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cvsnt'/><category scheme='http://www.blogger.com/atom/ns#' term='vcs'/><title type='text'>There isn't enough coffee in the universe</title><content type='html'>&lt;a href="http://www.cvsnt.org/pipermail/cvsnt/2009-April/032055.html"&gt;EVS is me going "Screw it, I'm not playing any more" and writing a &lt;br /&gt;system that can talk to anything, given enough time and coffee.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And this mail came after a loooong day filled with nothing actually, unless you count trying in vain to get some GeForce running with openSuSE as work. (Which would have been fun if the driver would not only support portrait mode but also draw correctly and use the panel's natural resolution. eclipse look quite good on a portrait screen.)&lt;br /&gt;&lt;br /&gt;Anyway, how can one get the idea that all version control systems are basically created equal, &lt;i&gt;and&lt;/i&gt; that that is enough to write an universal server that can talk each protocol equally and fully? Even with cvs you can trivially create a repository than can't be converted to, say, git, and vice versa create a repository in git that can't be represented in cvs. In the latter case the revisions would all be there, but the merge information would be missing.&lt;br /&gt;&lt;br /&gt;If you take out all the edge cases, that is, sufficiently many of them, then it may be made to work. But neither would many existing repositories match those requirement, nor would the resulting functionality be very interesting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-2692041348668671385?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/2692041348668671385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=2692041348668671385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/2692041348668671385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/2692041348668671385'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2009/04/there-isnt-enough-coffee-in-universe.html' title='There isn&apos;t enough coffee in the universe'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-704782941568158591</id><published>2009-02-25T20:46:00.002+01:00</published><updated>2009-02-25T20:51:26.773+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='macos ssh agent'/><title type='text'>MacOS surprise: ssh-agent</title><content type='html'>I'm new on my macbook. Anyway, since leopard ssh asks for passphrases using a dialog instead of on the command line. This is not necessarily a bad idea, for example a git push from within git gui has no good place to ask.&lt;br /&gt;&lt;br /&gt;On the other hand, using ssh-agent for that is even more convenient, and since this dialog allows you to store the password on the keyring I assumed that that is the preferred way and no one would bother to start an ssh agent under the whole of the leopard gui session. Turn out I was wrong. And my workaround of using xterms started from another xterm with an agent in there was quite unnecessary.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-704782941568158591?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/704782941568158591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=704782941568158591' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/704782941568158591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/704782941568158591'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2009/02/macos-surprise-ssh-agent.html' title='MacOS surprise: ssh-agent'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-110103587233791437</id><published>2009-01-01T13:46:00.002+01:00</published><updated>2009-01-01T22:57:20.585+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bad'/><category scheme='http://www.blogger.com/atom/ns#' term='ant'/><title type='text'>ant: BAD</title><content type='html'>Who doesn't know history is condemned to repeat it. Or not even that, as &lt;a href="http://ant.apache.org/"&gt;ant&lt;/a&gt; managed. In my option, ant started with a bad idea and then made it worse. In other words, it is Broken As Designed.&lt;br /&gt;&lt;br /&gt;The quotes are form the aforementioned page, section 'Apache Ant'.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Apache Ant is a Java-based build tool. In theory, it is kind of like Make, but without Make's wrinkles.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Yeah, the wrinkles have been replaced by pointy brackets, and all the deep problems haven't even been &lt;i&gt;addressed&lt;/i&gt; at all.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Why another build tool when there is already make, gnumake, nmake, jam, and others? Because all those tools have limitations that Ant's original author couldn't live with when developing software across multiple platforms.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Well, at least I don't want to live with ant. As little as possible. Granted, make isn't usable for building java projects either, but then neither is ant, without working around the buggy javac task.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Make-like tools are inherently shell-based -- they evaluate a set of dependencies, then execute commands not unlike what you would issue in a shell.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;That's the point! Why invent another scripting language when you can have one for free? Instead ant goes along inventing a new scripting language (which may not even be turing complete), and it takes them years to come to a point where ant can at least &lt;a href="http://ant.apache.org/manual/CoreTypes/filterchain.html"&gt;do&lt;/a&gt; what the good old shell always could.&lt;br /&gt;&lt;br /&gt;And still, to do a simple &lt;tt&gt;grep Whatever | sed -e s/XX/YY/&lt;/tt&gt; you need to write java programs, compile them, feed the jars to ant, and after a few hour get it actually working. Not to menting the fact that those classes can't easily be part of your project because you need them before starting ant. (Ok, that's not actually true, but in an ugly way.)&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;This means that you can easily extend these tools by using or writing any program for the OS that you are working on. However, this also means that you limit yourself to the OS, or at least the OS type such as Unix, that you are working on.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Gladly so. Nowadays you can easily get VMs oder cygwin if you should really need to work elsewhere.&lt;br /&gt;&lt;br /&gt;At least it's much better than making everything complicated, everywhere. The average trivial &lt;tt&gt;build.xml&lt;/tt&gt; contains about 60 lines, of which three do actually vary with the project, and the rest is always the same. Don't repeat yourself, huh? At least we hope it's the same, and there aren't any copy&amp;amp;paste bugs lurking.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Makefiles are inherently evil as well. Anybody who has worked on them for any time has run into the dreaded tab problem. "Is my command not executing because I have a space in front of my tab!!!" said the original author of Ant way too many times.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;The original author of ant obviously had the wrong editor, or was missing a little script to check for that. I've written my share of makefiles, and I can't remember ever running into that problem.&lt;br /&gt;&lt;br /&gt;If only the original author of ant ran into the real problems that make poses; then ant wouldn't have been such a terrible misdesign.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Ant is different. Instead of a model where it is extended with shell-based commands, Ant is extended using Java classes. Instead of writing shell commands, the configuration files are XML-based, calling out a target tree where various tasks get executed. Each task is run by an object that implements a particular Task interface.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;So, instead of writing little one-liners I need to write code in a programming language that itself is known as verbose, write additional build targets to get those compiled, and finally knit it all together in XML, yet another source of bloat to the whole end. (And for the nitpickers, ant uses two extra syntactic elements: comma-separated lists and property value replacements. Guess why they don't do that as XML elements.) ant has a serious &lt;a href="http://andreas-krey.blogspot.com/2008/02/dr-no-vs-anonymous-functions.html"&gt;Dr. No&lt;/a&gt; syndrome.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Granted, this removes some of the expressive power that is inherent by being able to construct a shell command such as `find . -name foo -exec rm {}`, but it gives you the ability to be cross platform -- to work anywhere and everywhere.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;...and making that a &lt;i&gt;lot&lt;/i&gt; of work. Ant really does not fall into the category 'make the easy things easy and the hard things possible'.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;And hey, if you really need to execute a shell command, Ant has an &amp;lt;exec&amp;gt; task that allows different commands to be executed based on the OS that it is executing on.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Now that't a cop-out. If our uber-tool happens to not support what we want we can still go platform-specific. Thanks; due to general disgust with &lt;a href="http://blog.gloop.iocl.org/2007/03/they-all-say-nothing.html"&gt;XML&lt;/a&gt; I wrote a little shell script (of all things) that does everything I need to do in the projects I need to manage, including compiling and collecting used libraries of my own. &lt;tt&gt;/bin/sh&lt;/tt&gt; isn't exactly the best way to do, but the &lt;tt&gt;whole&lt;/tt&gt; thing is just five times larger than the (broken) build.xml I got for those projects (and shorter than this blog entry), and the actual build script for one of those condenses to&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  #!/bin/sh&lt;br /&gt;  . "`dirname "$0"`"/../proj-a/tools/buildtool.sh&lt;br /&gt;  depdir ../proj-a&lt;br /&gt;  javacomp&lt;br /&gt;  mkjar proj-b&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and is also a shell script.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Now what?&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Ok, more details on how ant is misdesigned. The javac task is broken:&lt;br /&gt;It only compiles java files that have no corresponding class file or&lt;br /&gt;whose class file is older than the java file. It does not erase class&lt;br /&gt;files for which there is no longer a source file, nor does it&lt;br /&gt;recompile dependencies between the classes. Especially the latter&lt;br /&gt;makes for interesting bugs. Workaround: Always clean before compiling,&lt;br /&gt;either manually or by the 'dependencies'.&lt;br /&gt;&lt;br /&gt;And these 'dependencies'. They aren't, really. The individual tasks sometimes execute conditionally depending on whether the destination is newer than the source, but you need to state dependencies explicitly, no matter whether ant could deduce the dependency itself. For example, when a javac task produces what a jar task consumes ant won't make them dependent automatically. Otherwise, when you put a target into the dependencies list of another, it is executed, no matter what. As opposed to the following make fragment&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  prog : main.c gen.c&lt;br /&gt;      cc -o prog main.c gen.c&lt;br /&gt;  tool : tool.c&lt;br /&gt;      cc -o tool tool.c&lt;br /&gt;  gen.c : tool gen.in&lt;br /&gt;      ./tool &lt;gen.in &gt;gen.c&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;which tells that &lt;tt&gt;gen.c&lt;/tt&gt; needs to be generated by &lt;tt&gt;tool&lt;/tt&gt; which in turn needs to be compiled from &lt;tt&gt;tool.c&lt;/tt&gt;. The point here is that when you call make, the tool won't be recompiled unless you modified its source, and &lt;tt&gt;gen.c&lt;/tt&gt; won't be generated unless you modified either the generator or its input file.&lt;br /&gt;&lt;br /&gt;Ant stays blissfully unaware of any of this dependency management, and thusly degenerates to the fixed execution of a number of scripts (called targets) with a number of commands (called tasks) each. If you want your task not to do work when none is needed, don't expect support from ant. Ant is not really a build tool, it is a simple script executor, however their creators talk about declarative operations and the ant way which seems pretty long-winded to me.&lt;br /&gt;&lt;br /&gt;The 'declarative way' does not keep people from relying on the fact that the dependencies of a target are executed in the order they are specified. A &lt;tt&gt;dependencies="clean, compile"&lt;/tt&gt; to work around the javac problem is all but uncommon, and clearly will break when ant decides to run the dependencies in inverse oerder.&lt;br /&gt;&lt;br /&gt;To be fair, the dependency problem isn't exactly trivial, especially without support from the actual compiler. make doesn't do a good job for java, either. But on the other hand side we'd expect an industrial-strength build system to have invested not just a little thought?&lt;br /&gt;&lt;br /&gt;Then ant completely ignored the lesson of the X windowing system. Those guys actually improved on make by using the C preprocessor. Their &lt;tt&gt;Imakefile&lt;/tt&gt; system inspired another (proprietary) system that could just say&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  CProgramFromSources (prog) {&lt;br /&gt;    CSource (gen)&lt;br /&gt;    CSource (main)&lt;br /&gt;  }&lt;br /&gt;  CProgram (tool)&lt;br /&gt;  gen.c : tool gen.in&lt;br /&gt;      ./tool &lt;gen.in &gt;gen.c&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;with one important difference: The macros expand so that not only &lt;tt&gt;make prog&lt;/tt&gt; does the expected thing, but also that &lt;tt&gt;make clean&lt;/tt&gt; removed all the temporaries, except for &lt;tt&gt;gen.c&lt;/tt&gt; which was done with a plain make rule. We need to add&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  clean ::&lt;br /&gt;       rm -f gen.c&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;to make that work, too. This also shows another overlooked make feature: You can actually combine a target from multiple separate commands and dependencies. It's just not possible to have multiple clean targets in ant, making it even more error-prone to do the right cleanout.&lt;br /&gt;&lt;br /&gt;Ant simply aims too low by one or two levels of abstraction.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Then what?&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately ant has gotten a lot of traction in the java community. Proves again that you need to be the first, not the best. Compounded by the fact that most programmers don't care about the build system any more than needed to make it apparently work. And everything and the kitchen sink is available as an ant task, so it's not just programmers to turn around.&lt;br /&gt;&lt;br /&gt;And I'm not exactly in a position to get a lot of traction for a change. The most promising way is to fight the system from within; perhaps by actually having some preprocessor (again) generating a &lt;tt&gt;tmp/build.xml&lt;/tt&gt; to then be included.&lt;br /&gt;&lt;br /&gt;The most depressing thing is that ant will make the majority of people think that this is the state of the art in build system design. Far from it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-110103587233791437?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/110103587233791437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=110103587233791437' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/110103587233791437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/110103587233791437'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2009/01/ant-bad.html' title='ant: BAD'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-8854332713089162590</id><published>2008-12-31T21:22:00.001+01:00</published><updated>2008-12-31T21:29:21.533+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='refactoring'/><title type='text'>Factoring out helper classes</title><content type='html'>The job is to get a source and a destination path for a java compile. Because it's mostly the same, we want defaults for source and class directory. Because we occasionally have more than one separate hierarchy to compile, we want to provide a base path on which the defaults are applied. Thus this is the wet (aka non-dry) code:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    AttrList al = new AttrList (l.getParam ());&lt;br /&gt;&lt;br /&gt;    String base = al.pull ("dir");&lt;br /&gt;    if (base == null) base = "";&lt;br /&gt;    else base += "/";&lt;br /&gt;&lt;br /&gt;    String src = al.pull ("src");&lt;br /&gt;    if (src == null) src = "src";&lt;br /&gt;    src = base + src;&lt;br /&gt;&lt;br /&gt;    String cls = al.pull ("classes");&lt;br /&gt;    if (cls == null) cls = "classes";&lt;br /&gt;    cls = base + cls;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;We first get the base path and fiddle it a bit, especially when not given. Then we obtain source and destination, set it to default when not there, and prepend the base (which we fiddled so we can always do so even when it does not change the path).&lt;br /&gt;&lt;br /&gt;The repetition looks ugly. So: Factor it out. We can't purely do it with a helper function, so we need a class (this is java, everything needs to be done in a class):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class Basifier {&lt;br /&gt;  String base;&lt;br /&gt;  public Basifier (String param) {&lt;br /&gt;    if (param == null) base = "";&lt;br /&gt;    else base = param + "/";&lt;br /&gt;  }&lt;br /&gt;  public String basify (String arg, String def) {&lt;br /&gt;    return base + (arg != null ? arg : def)&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and use it:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    AttrList al = new AttrList (l.getParam ());&lt;br /&gt;    final Basifier base = new Basifier (al.pull ("dir"));&lt;br /&gt;    final String src = base.basify (al.pull ("src"), "src");&lt;br /&gt;    final String cls = base.basify (al.pull ("classes"), "classes");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Not too bad, except that we need to define a helper class and instantiate it for each invocation of ours; and we note that the useful lifetime of the object is tied exactly to the lifetime of the invocation of our funktion. In my optinion the latter is a sign that we are doing something wrong: If two things always have the same lifetime, they should really be parts of one thing.&lt;br /&gt;&lt;br /&gt;If java had local functions and closures, we could spare the separate class:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    String base = al.pull ("dir");&lt;br /&gt;    if (base == null) base = "";&lt;br /&gt;    else base += "/";&lt;br /&gt;&lt;br /&gt;    public String basify (String arg, String def) {&lt;br /&gt;      return base + (arg != null ? arg : def)&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    final String src = basify (al.pull ("src"), "src");&lt;br /&gt;    final String cls = basify (al.pull ("classes"), "classes");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;We save the need for the extra object, and the need to reference it. Arguably the helper class has the advantage that the basification is encapsulated there, but it is not just that but also the default value handling for the other parameters that is done in there. Besides, the basification may also be usable in other locations.&lt;br /&gt;&lt;br /&gt;One interesting sidepoint is that the basifier is almost, but not quite, implementable as an anonmous class:&lt;br /&gt;&lt;pre&gt;    &lt;br /&gt;    final Whatever base = new Object () {&lt;br /&gt;      String base;&lt;br /&gt;      {&lt;br /&gt;         base = al.pull ("dir");&lt;br /&gt;         if (base == null) base = "";&lt;br /&gt;         else base += "/";&lt;br /&gt;      }&lt;br /&gt;      public String basify (String arg, String def) {&lt;br /&gt;        return base + (arg != null ? arg : def)&lt;br /&gt;      }&lt;br /&gt;    };&lt;br /&gt;    final String src = base.basify (al.pull ("src"), "src");&lt;br /&gt;    final String cls = base.basify (al.pull ("classes"), "classes");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The only thing that does not work is that we cannot name the type of the anonymous class for declaring &lt;tt&gt;base&lt;/tt&gt;, and we need that type to be able to invoke basify on that object. In scala that actually works by type inference; the variable is just declared as a variable, and the type is assumed to be the type of the initializing expression.&lt;br /&gt;&lt;br /&gt;Is the class Basify something that is worthy of a separate existence, or is just a little bit of code that gets factored out, and because of the needed scope of the data it works with, it is forced to become a separate class. It may also be done as a static inner class; only the option of a local function is out.&lt;br /&gt;&lt;br /&gt;Basically in the latter case the function invocation serves as a kind of object; we could view the local function as a member function of the invocation. If that is so, we might also view the function invocation as some kind of a class, and then we might actually make it to extend another class (or implement an interface):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    public void methodAsObject (String p, String q) extends Basifier {&lt;br /&gt;      super (p);&lt;br /&gt;      final String here = basify (q, "def");&lt;br /&gt;      ..&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;It only does not work because we don't have the constructor parameter at that time.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Over the fence&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;By the way, other languages just do it differently. In C++ you decide whether a local variable is just a reference to an object&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  Basifier *base = new Basifier (param);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;or whether you actually want the object itself to be a local variable:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  Basifier base (param);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the latter case the lifetime of the object is directly tied to the function invocation. This can't work in safe garbage-collected languages because you can't remove the object before you know there are no more pointers to it, and this is incompatible with with stack allocation.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;Oops&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;So, this was planned to be a rant against excessive objectification and turns out to motivate me to actually use the basifier class. Will eventually show up &lt;a href="http://github.com/apk/anteater/tree/master/src/Gen.java"&gt;here&lt;/a&gt;; look for &lt;tt&gt;"javac"&lt;/tt&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-8854332713089162590?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/8854332713089162590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=8854332713089162590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/8854332713089162590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/8854332713089162590'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2008/12/factoring-out-helper-classes.html' title='Factoring out helper classes'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-1451877696547620651</id><published>2008-12-30T09:58:00.003+01:00</published><updated>2008-12-31T21:30:39.573+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bad'/><category scheme='http://www.blogger.com/atom/ns#' term='merging'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>svn: BAD</title><content type='html'>Executive summary: Read about &lt;tt&gt;svn merge --reintegrate&lt;/tt&gt; and weep.&lt;br /&gt;&lt;br /&gt;We waited long for subversion 1.5 to come out. It was hyped to have proper merge support and thus be a real step forward for cvs users. Actually we were using cvsnt which already had some merge support until &lt;i&gt;they&lt;/i&gt; broke part of it, and we kept using a patched version.&lt;br /&gt;&lt;br /&gt;Anyway, 1.5 finally came out this summer, and since we did not only want to keep having merge support but the history-preserving renaming of subversion as well, the step was done. (We were not migrating but only using svn for new projects.)&lt;br /&gt;&lt;br /&gt;Then I started reading the updated svnbook, and wondered: Why on earth &lt;i&gt;is&lt;/i&gt; there an option &lt;tt&gt;--reintegrate&lt;/tt&gt;? It turns out that you can only open a feature branch and merge repeatedly into it, to keep it in sync with new stuff on the trunk. But you can only once merge back into the trunk or wherever you came, and then the feature branch must be killed because further merging won't work.&lt;br /&gt;And then it turns out that svn 1.5 was released with this half-working merge support on purpose because it was overdue already and &lt;a href="http://blogs.open.collab.net/svn/2008/07/subversion-merg.html"&gt;they managed to represent the merge info in the repository in a way that makes a correct implementation impossible&lt;/a&gt;, and thusly, it won't happen before 1.6 or so.&lt;br /&gt;&lt;br /&gt;And in nearly the same time frame, another &lt;a href="http://git.or.cz"&gt;star&lt;/a&gt; appeared and ran circles around svn in terms of ease of use (just count the number of times you need to type absolute urls in svn command), &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/gitcvs-migration.html"&gt;possible&lt;/a&gt; &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html"&gt;workflows&lt;/a&gt;, &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/git-clean.html"&gt;breadth&lt;/a&gt; &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/git-archive.html"&gt;of&lt;/a&gt; &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/git-bisect.html"&gt;utilites&lt;/a&gt;. And it's a nice &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/git-svn.html"&gt;svn&lt;/a&gt; &lt;a href="http://andreas-krey.blogspot.com/2008/12/git-svn-without-root.html"&gt;client&lt;/a&gt;, too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-1451877696547620651?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/1451877696547620651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=1451877696547620651' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/1451877696547620651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/1451877696547620651'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2008/12/svn-bad.html' title='svn: BAD'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-2713732819934490398</id><published>2008-12-23T16:19:00.003+01:00</published><updated>2008-12-23T16:31:37.948+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='git-svn'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>git svn without root</title><content type='html'>&lt;tt&gt;git svn&lt;/tt&gt; is my favorite way of working with svn. Uses less space than a native svn sandbox, still contains the complete bloody history, and doesn't fool grep-find with the pristine copies.&lt;br /&gt;&lt;br /&gt;Installing both the right way isn't quite easy. For git you just need the standard install, but you need to install svn including its perl bindings. And you can control the installation location of svn with the usual &lt;tt&gt;--prefix=$HOME/local&lt;/tt&gt; to &lt;tt&gt;configure&lt;/tt&gt;, but this does &lt;i&gt;not&lt;/i&gt; change the place where &lt;tt&gt;make install-swig-pl&lt;/tt&gt; wants to place the shared libraries and other perl binding code. You can only change that by doing some steps manually:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;tar xzf subversion-deps-1.5.4.tar.gz &lt;br /&gt;cd subversion-1.5.4&lt;br /&gt;CFLAGS=-fPIC ./configure --prefix=$HOME/local&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;make swig-pl-lib&lt;br /&gt;make install-swig-pl-lib&lt;br /&gt;cd subversion/bindings/swig/perl/native&lt;br /&gt;perl Makefile.PL PREFIX=$HOME/local&lt;br /&gt;make install&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Basic point: You need to invoke the perl make separately, and tell it where to install. Seems not to be so easy to include an option for that into the toplevel &lt;tt&gt;configure&lt;/tt&gt;?&lt;br /&gt;&lt;br /&gt;Also note the need to manually say &lt;tt&gt;CFLAGS=-fPIC&lt;/tt&gt; even though the target system (Novell SuSE) isn't exactly unusual, and &lt;tt&gt;configure&lt;/tt&gt; should figure this out.&lt;br /&gt;&lt;br /&gt;Anyway, the perl library path (&lt;tt&gt;PERL5LIB&lt;/tt&gt;) seems to already include &lt;tt&gt;$HOME/local&lt;/tt&gt;, so after above commands, &lt;tt&gt;git svn&lt;/tt&gt; works. If you use a different location you need to fix &lt;tt&gt;PERL5LIB&lt;/tt&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-2713732819934490398?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/2713732819934490398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=2713732819934490398' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/2713732819934490398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/2713732819934490398'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2008/12/git-svn-without-root.html' title='git svn without root'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-4352026524500632714</id><published>2008-12-20T21:11:00.004+01:00</published><updated>2008-12-20T21:58:49.279+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='webdav'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>git on svn</title><content type='html'>git can push onto &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt"&gt;webdav-enabled&lt;/a&gt; http servers.&lt;br /&gt;&lt;br /&gt;svn is a webdav-enabled http server.&lt;br /&gt;&lt;br /&gt;Unfortunately, it does not quite work. Cloning via http://svnhost/whatever.git/ works, but I can't push back there. It says &lt;tt&gt;error: Error: no DAV locking support&lt;/tt&gt;, and I tend to believe that. svn can lock, but &lt;a href="http://svnbook.red-bean.com/en/1.0/apcs02.html"&gt;apparently&lt;/a&gt; not over http &lt;i&gt;and&lt;/i&gt; svn urls, and equally apparently locking is not enabled on our server. And I can't change that, and setting up my own svn server just to test that is out of the question.&lt;br /&gt;&lt;br /&gt;Not to mention the usefulness of this exercise. Operating a git repository versioned in svn is...strange. It just would enable one to really use git and still claim to work with svn.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-4352026524500632714?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/4352026524500632714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=4352026524500632714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/4352026524500632714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/4352026524500632714'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2008/12/git-on-svn.html' title='git on svn'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-150496678534328482</id><published>2008-12-16T11:25:00.003+01:00</published><updated>2008-12-16T11:31:47.140+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><title type='text'>Under attack</title><content type='html'>I have a DSL link home, and by now I operate a regular unix system for the router, and it's the first system I have with an internet-facing sshd. Now, every once in a while some bot comes along and seems to try out a lot of account/password combinations, not withstanding the fact that I only enabled public key authentication.&lt;br /&gt;&lt;br /&gt;Idea: Whenever massive login attempts are detected, just reflect further incoming connection attempts from the same address back to that address. Thus the bot just attacks its own machine.&lt;br /&gt;&lt;br /&gt;Question: How to do this without hacking the sshd itself? Possibly temporary static nat rules?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-150496678534328482?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/150496678534328482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=150496678534328482' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/150496678534328482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/150496678534328482'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2008/12/under-attack.html' title='Under attack'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-2075271895900085093</id><published>2008-11-08T12:28:00.003+01:00</published><updated>2008-11-08T12:45:34.240+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='cvs'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>git usage</title><content type='html'>cvs was easy to take on, even though I didn't know any version control system beforehand.&lt;br /&gt;&lt;br /&gt;git was harder, even though I did know some systems by then.&lt;br /&gt;&lt;br /&gt;The difference: cvs has basically one way to work with it, while with git you are much freeer in how you want to work. With freedom comes the problem of choice and the need of experience. For example git practically doesn't let you destroy any history, but sometimes it can be tough to find out &lt;i&gt;how&lt;/i&gt; to recover from a particular mistake.&lt;br /&gt;&lt;br /&gt;Also in the mix: When I started cvs, I had nothing. When I started with git, I had quite some history to import and to deal with.&lt;br /&gt;&lt;br /&gt;As long as you don't do branches (and with plain cvs, you better shouldn't), cvs is just a way of sharing a common tree without risking accidential overwrites. With git there is a wealth of things &lt;a href="http://andreas-krey.blogspot.com/2008/09/cvs-to-svn-via-git.html"&gt;you can do&lt;/a&gt;, and of those you can do &lt;i&gt;nearly&lt;/i&gt; right. I don't think that I am yet in a position to foist git over a bunch of developers &lt;i&gt;and&lt;/i&gt; to give them enough training so that they can get along without big mishaps or frustration. Especially not for windows guys.&lt;br /&gt;&lt;br /&gt;So mostly I still use git-svn, live with the company decision to use svn, and sometimes use git hackery for special effects that nobody else needs to know about that git was even involved.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-2075271895900085093?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/2075271895900085093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=2075271895900085093' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/2075271895900085093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/2075271895900085093'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2008/11/git-usage.html' title='git usage'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-4655404506787033104</id><published>2008-11-07T13:39:00.002+01:00</published><updated>2008-11-07T13:43:16.423+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogging'/><title type='text'>Comment notification</title><content type='html'>Blogger bites too. I just noticed that there &lt;i&gt;are&lt;/i&gt; some comments here, and I remember turning on email notifications for comments, and relied on these.&lt;br /&gt;&lt;br /&gt;Consequence: Only today did I even notice the existence of any comments on this blog, for which I do want to thank you, dear readers!&lt;br /&gt;&lt;br /&gt;(Note to self: Rework the post labels.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-4655404506787033104?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/4655404506787033104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=4655404506787033104' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/4655404506787033104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/4655404506787033104'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2008/11/comment-notification.html' title='Comment notification'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-1899312369168126488</id><published>2008-11-07T12:54:00.003+01:00</published><updated>2008-11-07T13:05:27.839+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='PriorityQueue'/><title type='text'>Priorities and signs</title><content type='html'>This was almost going to be titled 'signs are hard'. I hat a problem that a simple timer queue implementation did not quite work. Problem: Some timers seemed to vanish from the &lt;tt&gt;java.util.PriorityQueue&lt;/tt&gt;, or were in the wrong order. I tried, for lack of other ideas to change the sign of the compare method, to see if I got that wrong. Letting the handler thread wait for and pick the latest timer is not a good idea. But alas, that wasn't it, and there goes the title.&lt;br /&gt;&lt;br /&gt;Google ("java PriorityQueue remove"): Somewhat unexpectedly, the first result is &lt;b&gt;not&lt;/b&gt; the documentation of the queue but rather exactly the &lt;a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6207984"&gt;report for the bug&lt;/a&gt; that is biting me: &lt;tt&gt;remove&lt;/tt&gt; does remove the first element it finds that compares equal to its argument, not that exact object: Voila: wrong element removed; that timer never fires, I'm not getting &lt;tt&gt;#tick&lt;/tt&gt;s.&lt;br /&gt;&lt;br /&gt;Good. So now I &lt;b&gt;know&lt;/b&gt; what's wrong and can finally implement a strategy to do fewer removes in the first place. Many timers here serve as a timeout and leave the queue not at the front but by remove. And the timeout is constant. So if a timer is set to a later time I can just leave it in the queue and reposition it when it finally appears up front.&lt;br /&gt;&lt;br /&gt;Also there is a decision to be made whether I leave the workaround in. It's fixed somewhere in 1.6 (b51?), and I can't rely on the JVM always being that new.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-1899312369168126488?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/1899312369168126488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=1899312369168126488' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/1899312369168126488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/1899312369168126488'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2008/11/priorities-and-signs.html' title='Priorities and signs'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-7893186227788777590</id><published>2008-09-24T19:06:00.006+02:00</published><updated>2008-11-07T13:25:43.194+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='cvs'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>cvs to svn via git</title><content type='html'>It actually works. The problem: I wanted to take the history of a partial cvs repository into svn. Directly using the tools was out for two points: First, one needs access to the svn repository itself (at least I think so and didn't bother to check because of) second I wanted to patch the paths of the java packages contained therein. Apparently eclipse doesn't quite want to deal with &lt;tt&gt;company_name.com&lt;/tt&gt;, so it needs to converted to &lt;tt&gt;companyname.com&lt;/tt&gt; even though the company only owns the former domain.&lt;br /&gt;&lt;br /&gt;Anyway, I did not figure out yet how to use git-cvsimport and git-svn both on the same repository sensibly; and I think git-svn rewriting of the commits doesn't quite make that feasible. But the problem already starts with getting both histories to have a common ancestor. Unfortunately git does not have a null commit as the universal base.&lt;br /&gt;&lt;br /&gt;Ok, final approach: Create project base directories (the ttb) in svn, do an &lt;tt&gt;git svn clone&lt;/tt&gt; on that. Separately, use git-cvsimport to get the history from cvs into git. (Caveat: The approach does only handle a single linear history well.) Use &lt;tt&gt;git format-patch --root commit&lt;/tt&gt; to get a series of patches, run those through &lt;tt&gt;sed -e s:company_name.com:companyname.com:g&lt;/tt&gt; (which patches directory names as well as imports and package declarations). Then apply (git-am) the resulting commits in the git-svn repository, and git-svn dcommit them. Done.&lt;br /&gt;&lt;br /&gt;Except that my link to the svn repository isn't exacly fast at the moment (roundtrip at about a second), and the 60 commits took two hours. svn does not seem to like slow links; a simple tag operation (svn cp trunk tag/some) on a small thingy took me more than a minute over GPRS once.&lt;br /&gt;&lt;br /&gt;Here's the complete commands:&lt;br /&gt;&lt;pre&gt;mkdir myproj-cvs&lt;br /&gt;cd myproj-cvs&lt;br /&gt;git-cvsimport -p x -v -k -a -d :pserver:krey@localhost:/opt/cvs mystuff/myproj&lt;br /&gt;git-format-patch -o out --root `cat .git/refs/heads/master`&lt;br /&gt;mkdir mod&lt;br /&gt;cd out&lt;br /&gt;for i in *.patch; do sed -e s:company_name:companyname:g $i &gt;../mod/$i; done&lt;br /&gt;cd ../..       &lt;br /&gt;svn mkdir http://localhost:4080/repos/mystuff/myproj -m 'base dir'&lt;br /&gt;svn mkdir http://localhost:4080/repos/mystuff/myproj/trunk -m 'trunk dir'&lt;br /&gt;git-svn clone -s http://localhost:4080/repos/mystuff/myproj&lt;br /&gt;cd myproj&lt;br /&gt;git am ~/myproj-cvs/mod/*&lt;br /&gt;git svn dcommit&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-7893186227788777590?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/7893186227788777590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=7893186227788777590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/7893186227788777590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/7893186227788777590'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2008/09/cvs-to-svn-via-git.html' title='cvs to svn via git'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-4605467449748112078</id><published>2008-09-22T18:09:00.003+02:00</published><updated>2008-09-24T20:04:27.473+02:00</updated><title type='text'>Inband signalling is evil</title><content type='html'>In telephone inband signalling is, or rather, was to control circuit setup and teardown by tone signals within the speech band that is also transmitted from speaker to listener. Had the unfortunate effect that you use a specific whistle on the phone and lose the connection. Soon got exploited in more creative ways.&lt;br /&gt;&lt;br /&gt;Anyway, in C++'s &lt;tt&gt;std::string&lt;/tt&gt; often the same thing happens. When in C, you have a &lt;tt&gt;char*&lt;/tt&gt;, and you can null it to mark the &lt;i&gt;no value&lt;/i&gt; case. Not so in C++. You need a special value, and usually this is the empty string &lt;tt&gt;""&lt;/tt&gt;. Fine and dandy as long as you can be sure that that value will never actually occur. Once this happens all the code will already be riddled with &lt;tt&gt;if (val != "")&lt;/tt&gt; and you never find them all. Bad luck, just like with Y2K.&lt;br /&gt;&lt;br /&gt;Neither do you have &lt;a href="http://www.haskell.org/onlinereport/basic.html#sect6.1.8"&gt;&lt;tt&gt;Maybe&lt;/tt&gt;&lt;/a&gt;, the Haskell way of avoiding null pointer exceptions completely.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-4605467449748112078?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/4605467449748112078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=4605467449748112078' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/4605467449748112078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/4605467449748112078'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2008/09/inband-signalling-is-evil.html' title='Inband signalling is evil'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-30578288090391232</id><published>2008-02-15T10:47:00.003+01:00</published><updated>2008-11-07T13:27:51.326+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='anonymous functions'/><category scheme='http://www.blogger.com/atom/ns#' term='closures'/><category scheme='http://www.blogger.com/atom/ns#' term='dr.no'/><category scheme='http://www.blogger.com/atom/ns#' term='syntax'/><title type='text'>Dr. No vs. anonymous functions</title><content type='html'>You may remember the first James Bond &lt;a href="http://www.imdb.com/title/tt0055928/"&gt;movie&lt;/a&gt; where the hero gets into contaminated areas and thus gets the decontamination treat. Now, this doesn't just happen but is shown in quite some details. As if to show off 'hey, look, we know all this stuff' instead of simply assuming it.&lt;br /&gt;&lt;br /&gt;Now there is a similar thing with the syntax of anonymous functions. In some languages it is like &lt;code&gt;function (x) return 2 * x; end&lt;/code&gt; while others say the same as &lt;code&gt;\x{2 * x}&lt;/code&gt;. The shorter syntax stand less in the way and makes it possible to write, say, &lt;code&gt;list.filter (\x{x.city == quest}).map (\x{x.zipcode})&lt;/code&gt; in one line, while the former notation will cause massive keyword clutter hiding the actual operations.&lt;br /&gt;&lt;br /&gt;There is a case in that the longer syntax may have been judiciously chosen to make clear that the use of anonymous functions (plus closures) is not encouraged in this language. I don't assume that it is a case of show-off, as in Cobol which needs to make clear that it can &lt;code&gt;DISPLAY&lt;/code&gt; or &lt;code&gt;COMPUTE&lt;/code&gt; something, as if this wasn't to be expected of a computer language. But the question remains, whether, in any specific language the form of anonymous functions wasn't just chosen because of its similarity to named functions. In named functions this is no big deal as their opening has a line for itself anyway. Anonymous functions need to be unobtrusive to be really useful, while the more verbose forms make many uses unwieldy. The question is whether the language designers really wanted to discourage that use or whether they didn't think quite that far in that direction, not having actively used functional style themselves.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-30578288090391232?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/30578288090391232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=30578288090391232' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/30578288090391232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/30578288090391232'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2008/02/dr-no-vs-anonymous-functions.html' title='Dr. No vs. anonymous functions'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-2052811536012353568</id><published>2008-02-04T22:57:00.000+01:00</published><updated>2008-02-04T23:18:39.215+01:00</updated><title type='text'>The other ternary operator</title><content type='html'>There is an interesting stain on OO languages like C++ and Java, namely with member function invocation. Normally, complex expression can be taken apart, and the intermediate value stored in a variable. &lt;code&gt;int a = 2 * (3 +1);&lt;/code&gt; can equally be written &lt;code&gt;int helper = 3 +1; int a = 2 * helper;&lt;/code&gt;. However, this breaks with &lt;code&gt;obj.meth ()&lt;/code&gt;. When you try instead to say &lt;code&gt;helper = obj.meth; helper ();&lt;/code&gt;, you will run into a problem: What is the type of &lt;code&gt;helper&lt;/code&gt;? It should be a function pointer/reference. Java does not even have functions; in C++ you are equally at a loss for a proper type. (I'm not going into that actually the parameter types aka signature form a part of the method name.)&lt;br /&gt;&lt;br /&gt;Indeed the compilers simply go to treat the combination &lt;code&gt;a.b(c)&lt;/code&gt; as a single operator. In Java the method and member name spaces are actually separate; a method can have the same name as a member. (Does that make it a Java-2?)&lt;br /&gt;&lt;br /&gt;The only language that makes this explicit is Lua. Member invocation is &lt;code&gt;obj:meth(arg)&lt;/code&gt;, which is the same as &lt;code&gt;obj.meth(obj,arg)&lt;/code&gt; (except that &lt;code&gt;obj&lt;/code&gt; is only evaluated once).&lt;br /&gt;&lt;br /&gt;I don't know of any language that does it properly. Even though a member function exists as code only once, logically there is a distinct function for each object. The member selection needs to bind the function code address and the object pointer together, into something that is quite similar to a closure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-2052811536012353568?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/2052811536012353568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=2052811536012353568' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/2052811536012353568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/2052811536012353568'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2008/02/other-ternary-operator.html' title='The other ternary operator'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-7698052763830431754</id><published>2008-02-04T21:58:00.001+01:00</published><updated>2008-11-08T12:25:31.646+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='lisp'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='blocks'/><category scheme='http://www.blogger.com/atom/ns#' term='bgga'/><category scheme='http://www.blogger.com/atom/ns#' term='macros'/><title type='text'>Custom syntax: Macros and closures</title><content type='html'>I'm lots interested in getting custom syntax for this and that where I get annoyed by C++ or especially Java simply not letting me doing any. For example, in Java you need to write all these EJB-style accessors yourself. In ruby you just say &lt;code&gt;attr_reader :attr1, :attr2&lt;/code&gt;, and when reading other people's code you can be sure that there isn't a typo that let &lt;code&gt;getAttr1&lt;/code&gt; return &lt;code&gt;attr2&lt;/code&gt; by accident.&lt;br /&gt;&lt;br /&gt;Just as I was embracing the idea that macros are absolutely necessary for much stuff,&lt;br /&gt;ruby came along and brought block arguments. And tada, you can do map and everything without macros just as regular function. Some guys even &lt;a href="http://www.javac.info/closures-v05.html"&gt;ported&lt;/a&gt; the idea to java. So I became unsure whether macros are really necessary. Ok, basically I still believe that because (programmatic) macros can do &lt;i&gt;anything&lt;/i&gt;; I think they are the best way to integrate custom code generators.&lt;br /&gt;&lt;br /&gt;And then came along &lt;a href="http://weblog.raganwald.com/2008/01/objectandand-objectme-in-ruby.html"&gt;Raganwald&lt;/a&gt; and wanted something like &lt;code&gt;ph = find_whatever()&amp;&amp;.author&amp;&amp;.phone&lt;/code&gt;: Call &lt;code&gt;find_whatever&lt;/code&gt;, and if it returns something, get the author, and if there is one, get his phone number. Otherwise the whole expression is &lt;code&gt;nil&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;Now it is amazing that you can get ruby to do something like that at all, even though it cheats on two points: It does not use the intended syntax (&lt;code&gt;obj&amp;&amp;.name&lt;/code&gt;)  but &lt;code&gt;obj.andand.name&lt;/code&gt; (note the conspicious second dot), and it does not actually take the shortcut but instead goes through the rest with a dummy object.&lt;br /&gt;&lt;br /&gt;But he does not &lt;i&gt;just&lt;/i&gt; to avoid the helper variables, but also to get a left-to-right reading. You just can't do that in lisp, for instance. (Ok, it's going to be the inverse.)&lt;br /&gt;&lt;br /&gt;But why this hit me: While I have somes idea how I would bring macros into language with syntax, I have no idea yet how I would make &lt;code&gt;&amp;&amp;.&lt;/code&gt; definable. The problems here:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;When you get to the &lt;code&gt;&amp;&amp;.&lt;/code&gt; you are already in the middle of the expression the macro would need to replace, so there would be a need to allow operators be a kind of macro&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Member selection is not a binary, but a postfix operator! While it looks like one, the right hand side is not an expression, but a compile-time constant. (In a sense there are many different operators, one for each possible member name.)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I guess I need to think about that some more...how to enable user-defined operators not only as functions, but also as macros.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-7698052763830431754?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/7698052763830431754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=7698052763830431754' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/7698052763830431754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/7698052763830431754'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2008/02/custom-syntax-macros-and-closures.html' title='Custom syntax: Macros and closures'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-7096678407754016155</id><published>2008-02-02T21:53:00.001+01:00</published><updated>2008-11-08T12:26:30.636+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='override'/><category scheme='http://www.blogger.com/atom/ns#' term='scala'/><title type='text'>Burned by override: Limits of refactoring by compiler</title><content type='html'>In OO programming (here: java) there is the difference between redefining a method in a subclass, and adding a new method in a subclass. It also is quite easy to accidentally add one instead of override one by having a subtly different method signature.&lt;br /&gt;&lt;br /&gt;Then there is 'refactoring by compiler' as I call it. Just do the intended interface change at one place and be guided by the compiler errors to all the places that needs adatptions to that. In sufficiently static languages that does actually work (and it is a bit hard to get a program that compiles but does not work).&lt;br /&gt;&lt;br /&gt;Anyway in this case I changed, compiled, fixed, and the program did not work in very strange ways. Well, it was the case from above: I started my refactoring by changing the signature of a overridden method, thereby making it into a new one that never got invoked. The macro did no longer think it was one, it went downhill.&lt;br /&gt;&lt;br /&gt;Good thing scala requires to declare whether a method is an override. Java does too, but my personal java-fu is from times too old to actively use @override (or to sprinkle code with &lt;code&gt;final&lt;/code&gt;s, for that matter).&lt;br /&gt;&lt;br /&gt;Back to coding...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-7096678407754016155?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/7096678407754016155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=7096678407754016155' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/7096678407754016155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/7096678407754016155'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2008/02/burned-by-override-limits-of.html' title='Burned by override: Limits of refactoring by compiler'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-644219357906818455</id><published>2007-11-03T22:01:00.000+01:00</published><updated>2007-11-03T22:14:39.514+01:00</updated><title type='text'>Giles Bowkett: IRB: What Was That Method Again?</title><content type='html'>&lt;a href="http://gilesbowkett.blogspot.com/2007/11/irb-what-was-that-method-again.html"&gt;Giles Bowkett: IRB: What Was That Method Again?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well, #methods is a good start. But it doesn't capture the method_missings. This shows just the power as well as the shortcoming of ruby and rails: You can't look everything up, you need to know some parts.&lt;br /&gt;&lt;br /&gt;On another note, I'm just working on a small code generator that turns a protocol spec (of a proprietary thing) into java classes that offers the protocol commands as connection object methods. It's actually the same thing: We decided for the code generator, because that way, the IDE can show what is there; were we using annotations, this wouldn't be possible and things more dynamic. This isn't the whole cause; performance (as of exceptions, not primarily reflection) also played a role.&lt;br /&gt;&lt;br /&gt;Still, I'd rather like to do the generation within the java compiler, which would save us some subclassing.&lt;br /&gt;&lt;br /&gt;The generator itself is not in java, but in haskell, because of parsec, and generally to do some actual hacking in haskell. I like it; it is very nice when you change some definition and the compiler tells you the places you need to adapt.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-644219357906818455?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/644219357906818455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=644219357906818455' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/644219357906818455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/644219357906818455'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2007/11/giles-bowkett-irb-what-was-that-method.html' title='Giles Bowkett: IRB: What Was That Method Again?'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-3116662339594451176</id><published>2007-10-18T22:14:00.000+02:00</published><updated>2007-11-03T22:48:00.687+01:00</updated><title type='text'>Quoting haskell</title><content type='html'>&lt;div style="float:left; margin:0 10px 10px 0; padding: 5px; border: 1px solid gray"&gt;&lt;img src="http://images.iocl.org/egwarn.jpg" border="0" alt="supposed warning sign" /&gt;&lt;/div&gt;Well, Haskell is getting really interesting. I always wanted a language that allows me to intersperse fragments of other syntaxes (especially for a message syntax; think s-expr), and on the haskell workshop was an interesting talk about how to introduce exactly that for expresssions and even for pattern matching.&lt;br /&gt;&lt;br /&gt;Right now I struggling with the right way to approximate the same in java, and bump into acceptance problems from some sides, whether I go via annotations or some code generation.&lt;br /&gt;&lt;br /&gt;It's not that haskell isn't still rather foreign on me. I think I have a hint of understanding monads, but this doesn't go anywhere near how to design them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-3116662339594451176?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/3116662339594451176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=3116662339594451176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/3116662339594451176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/3116662339594451176'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2007/10/quoting-haskell.html' title='Quoting haskell'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-5517842199489902626</id><published>2007-06-24T21:07:00.000+02:00</published><updated>2007-06-24T21:25:02.955+02:00</updated><title type='text'>Blub at large</title><content type='html'>There are actually blub programmers who are not &lt;a href="http://www.javangelist.de/space/No-One-Cares-About-My-Language-And-Therefore-I-hate-Java"&gt;too shy to boast&lt;/a&gt; their status. Not only that, they point to the very people explaining their misconception and don't get it. They also manage to create a website that tells you that you need to login only after you click the comment link, and provide no visible of means to create a login in the first place, which is the reason for me posting this here.&lt;br /&gt;&lt;br /&gt;(Seems the site has been dead for a while.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-5517842199489902626?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/5517842199489902626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=5517842199489902626' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/5517842199489902626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/5517842199489902626'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2007/06/bub-at-large.html' title='Blub at large'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-2552835568722085592</id><published>2007-06-24T20:59:00.000+02:00</published><updated>2007-11-03T22:22:13.152+01:00</updated><title type='text'>Trust and Guarantees</title><content type='html'>&lt;a href="http://archive.eiffel.com/general/people/meyer/"&gt;Bertrand Meyer&lt;/a&gt; had me laughing for a change. Obviously trust doesn't mean the same in computer science as it does in normal life; he wants to build '&lt;i&gt;trusted components -- reusable software elements whose quality can be guaranteed&lt;/i&gt;'.&lt;br /&gt;&lt;br /&gt;The department of defense actually uses the same misconception: They are initiating a program for verifying the functions of chips manufactured abroad, and call this program TRUST.&lt;br /&gt;&lt;br /&gt;Now trust implies that we don't &lt;i&gt;know&lt;/i&gt; that a system has a specific property; we &lt;i&gt;assume&lt;/i&gt; it has, on more or less sound reasons. Guarantees come via control, at a price. It's the same as in project management; either you have people you can trust to deliver results, or you need processes to control the output (and hopefully only of those you can't trust).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-2552835568722085592?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/2552835568722085592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=2552835568722085592' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/2552835568722085592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/2552835568722085592'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2007/06/trust-and-guarantees.html' title='Trust and Guarantees'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-5676004216653535423</id><published>2007-06-24T11:02:00.000+02:00</published><updated>2007-11-03T22:35:31.739+01:00</updated><title type='text'>Blogger oops</title><content type='html'>Blogger does not give me the delete button, and it should also not have posted this twice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-5676004216653535423?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/5676004216653535423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=5676004216653535423' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/5676004216653535423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/5676004216653535423'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2007/06/trust-and-guarantees_24.html' title='Blogger oops'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-1515182955232558735</id><published>2007-06-24T10:53:00.000+02:00</published><updated>2007-06-24T11:01:56.369+02:00</updated><title type='text'>Learning at the barber's</title><content type='html'>I accompagnied my wife to the barber's recently. The cutting looks so easy, everybody should be able to that! (Just like software.) I kept looking and learned. Even though it looks like he is just cutting away, he doesn't. There are different movements for the different stages, and there are tricks to check if the (long) hair has the same length on both sides.&lt;br /&gt;&lt;br /&gt;Learned: To make it look easy you need to know what you are doing &lt;i&gt;and what you can do&lt;/i&gt;. The last part, your options, are the hard part. You can't just bash away (at the scissors or at the keyboard), you need the confidence that you can handle upcoming difficulties.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-1515182955232558735?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/1515182955232558735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=1515182955232558735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/1515182955232558735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/1515182955232558735'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2007/06/learning-at-barbers.html' title='Learning at the barber&apos;s'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-8105633266514542114</id><published>2007-05-27T18:35:00.000+02:00</published><updated>2007-05-27T19:02:33.258+02:00</updated><title type='text'>Shackles of Compatibility</title><content type='html'>&lt;div style="float:right; margin:0 0 10px 10px; padding: 5px; border: 1px solid gray"&gt;&lt;img src="http://images.iocl.org/light.jpg" border="0" alt="indicator light" /&gt;&lt;/div&gt;&lt;a href="http://www.dcs.warwick.ac.uk/~hugh/TTM/HAVING-A-Blunderful-Time.html"&gt;The Shackle of Compatibility means you can never recover from mistakes in language design.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well, I don't think so. If you do an incompatible feature you could just make it possible to enable and disable it. For example the newest rage amongst Java programmers is to declare every variable and parameter &lt;tt&gt;final&lt;/tt&gt;. This is intended to catch accidental (as opposed to purposeful) variable reuse, which is a good idea.&lt;br /&gt;&lt;br /&gt;But it is questionable whether sprinkling the source with &lt;tt&gt;final&lt;/tt&gt; isn't too high a price. Ok, you can't just change the language semantics to have final be the default. But, why not make it switchable? Add something like &lt;tt&gt;pragma "default_final_vars";&lt;/tt&gt;, and enjoy the best of two worlds. Old code stays as it is, new code can be not cluttered.&lt;br /&gt;&lt;br /&gt;Similarly, any language could make the subversion or misfeatures selectable.&lt;br /&gt;&lt;br /&gt;Of course there is a drawback as you must be aware which dialect is in use. But you need to do that anyway since many of the mainstream languages look pretty similar to each other.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-8105633266514542114?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/8105633266514542114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=8105633266514542114' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/8105633266514542114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/8105633266514542114'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2007/05/shackles-of-compatibility.html' title='Shackles of Compatibility'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-5896079089422973897</id><published>2007-05-07T16:55:00.000+02:00</published><updated>2007-11-03T22:17:35.514+01:00</updated><title type='text'>Speech recognition</title><content type='html'>&lt;a href="http://gilesbowkett.blogspot.com/2007/05/languages-only-do-so-much.html"&gt;Giles Bowkett&lt;/a&gt; argues that every programmer should develop a personal style,&lt;br /&gt;and &lt;a href="http://listeningtoreason.blogspot.com/2007/05/languages-matter.html"&gt;Andrew Norris&lt;/a&gt; responds that this is not a good goal. He seems to think that this is akin to writing Fortran in any language.&lt;br /&gt;&lt;br /&gt;I don't quite agree. Personal style should be orthogonal to the style imposed by the idioms of a language. It reminds me of speech recognition, which can have several outputs: First, the words spoken. Second, who's talking. Third, the mood of the speaker. I don't have experienced 'speaker recognition' (that isn't tied to idiom usage) in source code yet, however, and can't quite think how that would look like.&lt;br /&gt;&lt;br /&gt;I do remember, however, reading a german book about electronics, whose tone was just slightly unusual. It turned out to be a translation from finnish.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-5896079089422973897?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/5896079089422973897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=5896079089422973897' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/5896079089422973897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/5896079089422973897'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2007/05/speech-recognition.html' title='Speech recognition'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-4368677688546388244</id><published>2007-04-25T22:46:00.000+02:00</published><updated>2007-04-25T23:21:57.564+02:00</updated><title type='text'>Desperate...sort of</title><content type='html'>I'm back from holidays, and I just scan the blogs and don't get started with work. A year or so ago I stopped reading usenet, and now it's blogs... Anyway, finally I did start work, and then almost got desperate over my brain not immediately wrapping itself around every line of code of that smallish programm I'm supposed to extend (in a way rather cross to its design).&lt;br /&gt;&lt;br /&gt;&lt;div style="float:right; margin:0 0 10px 10px; padding: 5px; border: 1px solid gray"&gt;&lt;img src="http://images.iocl.org/bwstones.jpg" border="0" alt="yin/yang stone garden" /&gt;&lt;/div&gt;At the same time I wonder why I &lt;i&gt;read&lt;/i&gt; so much about Haskell et al where I should be wanting to &lt;i&gt;do&lt;/i&gt; some work with it. I got it into my head to attend the haskell workshop end of september which is conveniently located quite close this year.&lt;br /&gt;&lt;br /&gt;I even got the strange idea of giving a talk there, about solving a relatively specific communication problem in haskell. Problem: I haven't &lt;i&gt;used&lt;/i&gt; haskell for more than ten minutes yet and thus doesn't have hardly any idea how to implement it at any level, the submission deadline is in mid of june, and I have sufficient urgent real work on my desk to fill most of may.&lt;br /&gt;&lt;br /&gt;So if I'd be any serious about that I should be prototyping haskell like crazy instead of continuing to read blogs, shouldn't I? Seems not... At least I'm not alone with &lt;a href="http://www.joelonsoftware.com/articles/fog0000000339.html"&gt;programmers block&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;And they I am not sure about the motivation for the workshop. See exciting things, maybe get a gig, or both? I suspect mostly academia there, so not much of a commercial opportunity.&lt;br /&gt;&lt;br /&gt;So many ideas, so little time, and drive.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-4368677688546388244?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/4368677688546388244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=4368677688546388244' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/4368677688546388244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/4368677688546388244'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2007/04/desperatesort-of.html' title='Desperate...sort of'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-2498443176669045477</id><published>2007-04-25T21:10:00.000+02:00</published><updated>2007-04-25T23:24:07.771+02:00</updated><title type='text'>Synchronizing</title><content type='html'>&lt;div style="float:left; margin:0 10px 10px 0; padding: 5px; border: 1px solid gray"&gt;&lt;img src="http://images.iocl.org/umts.jpg" border="0" alt="bluetooth to laptop, gprs to the world" /&gt;&lt;/div&gt;It is a longstanding problem of how to really synchronize mail folder, schedules etc. between home and mobile computers. Again, I can't remember who observed that originally. But the problem is about to dissolve instead of being solved, simply by being always online and no longer needing multiple replicas of one's data.&lt;br /&gt;&lt;br /&gt;Now, a similar thing has happened before: There has been tremendous effort to make precise clocks as these were needed to get exact coordinates in ship navigation. You were on sea for months and did not want more than a minute of error. Then radio came and soon allowed worldwide transmission, and the need for mobile precision clocks disappeared.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-2498443176669045477?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/2498443176669045477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=2498443176669045477' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/2498443176669045477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/2498443176669045477'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2007/04/synchronizing.html' title='Synchronizing'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-8982416063556670249</id><published>2007-04-24T19:28:00.000+02:00</published><updated>2007-04-25T23:27:03.659+02:00</updated><title type='text'>Spell checking</title><content type='html'>&lt;div style="float:left; margin:0 10px 10px 0; padding: 5px; border: 1px solid gray"&gt;&lt;img src="http://images.iocl.org/stick.jpg" border="0" alt="hiking stick point" /&gt;&lt;/div&gt;A blog post completely irrelevant to this topic complained that some software's spell checker did not know firefox and some others. Reminds me primarily that I practically never used them. The wiggly red line just had too many false positives. I seem to have a rather good spell checker built in anyway, and I wondered what an external checker would do to the internal one.&lt;br /&gt;&lt;br /&gt;I found a strange analogy. This year I had a hiking stick (of the old-fashioned kind), and in the mountains it still had snow. The stick proved very useful to keep the balance crossing small snow fields, or, more exactly: It made me feel saver, but it damaged my ability to cross them without its help.&lt;br /&gt;&lt;br /&gt;Although this analogy is quite probably limping, I shall continue to stay away from spell checkers. And let haskell check my spells.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-8982416063556670249?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/8982416063556670249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=8982416063556670249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/8982416063556670249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/8982416063556670249'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2007/04/spell-checking.html' title='Spell checking'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-1839233956014231196</id><published>2007-03-15T21:55:00.000+01:00</published><updated>2007-03-15T22:10:42.075+01:00</updated><title type='text'>Drowning in the swamp of pixels</title><content type='html'>Yesterday it hit me hard. I 'just' had to fix up the logging of an application (which enables it to reconstruct its exact state after a crash). Unfortunately, it wasn't my application in the first place; I just had to 'fix' it. And all kinds of annoyances came together...&lt;br /&gt;&lt;br /&gt;It was a shared office, meaning occasional meetings and all kinds of small discussions happening right behind my back. Pretty much impossible to build up &lt;i&gt;any&lt;/i&gt; concentration in these phases, not even for reading blogs!&lt;br /&gt;&lt;br /&gt;Then I had my laptop at 1024x768 and the local PC with 1600x1200 on its glass monitor. Problem: Apart from some silence I needed the big screen estate for actually getting all relevant code in eyesight. But unfortunately looking at that monitor only made me wonder what was wrong with my eyes; I couldn't actually focus on reading. In the old office it was just working for me, in this new one it didn't any more.&lt;br /&gt;&lt;br /&gt;So I was getting desperate: To be able to actually getting anything done I needed to head back home to the fullsize LCD screen. The alternative would be to start massive notetaking, which is a form of thrashing and would just kill productivity as well.&lt;br /&gt;&lt;br /&gt;I never experienced either workspace disturbances nor bad equipment that hard before, and now I am considering to buy another LCD for that workplace. Probably some silencer, too?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-1839233956014231196?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/1839233956014231196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=1839233956014231196' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/1839233956014231196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/1839233956014231196'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2007/03/drowning-in-swamp-of-pixels.html' title='Drowning in the swamp of pixels'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-1177516167146003322</id><published>2007-03-02T22:17:00.000+01:00</published><updated>2007-03-02T22:19:45.733+01:00</updated><title type='text'>Flying</title><content type='html'>When aboard a plane, give me a seat and a window, and I'm happy. Give me a stewardess telling me to close the window so that the sun does not keep the guy on the other side watching the move, and I'm &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; happy.&lt;br /&gt;&lt;br /&gt;Looking around in business class I notice that most people don't care at all that they're just experiencing mankind's dream come true. As Richard Bach said, this is aviation, not flying, and thus these people don't care just how they get to Cairo, only make it fast. And that happens to be by air. Since most of them aren't good at waiting for the arrival, there is also a lot of entertainment of diverse kind abord.&lt;br /&gt;&lt;br /&gt;Who would book a flight just to be able to watch a movie? And yet that is exactly what happens: Sit down and turn on the flick, even one they wouldn't think of going to the movies for. Just because there isn't anything else to do. Remember: When you're bored, it's because you're boring.&lt;br /&gt;&lt;br /&gt;The trick of flying isn't, by the way, to fling yourself on the ground and miss it, as Douglas Adams had it. Actually, that's orbiting. You need to stand high enough and throw yourself not directly to earth but a bit to the side, and voila, your in a rather elliptical orbit if you manage to actually miss the earth (and the atmospehere). Flying is simply to throw down enough air so that in exchange you can stay up.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-1177516167146003322?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/1177516167146003322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=1177516167146003322' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/1177516167146003322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/1177516167146003322'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2007/03/flying.html' title='Flying'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-5428577735610229467</id><published>2006-11-29T11:58:00.000+01:00</published><updated>2006-11-29T12:04:14.737+01:00</updated><title type='text'>How not to blog</title><content type='html'>I just stumbled over a few micro-blog entries, like 'what is time'. Cool title, completely disappointing content. The guy is just asking his commenteers exactly this questions.&lt;br /&gt;&lt;br /&gt;Let me put it this way:&lt;br /&gt;&lt;br /&gt;If you have something to &lt;b&gt;say&lt;/b&gt;: Blog. (And 'that URL is interesting' is not interesting by itself, thanks.)&lt;br /&gt;&lt;br /&gt;If you have somthing to &lt;b&gt;ask&lt;/b&gt;: Google! (Instead of additionally providing misleading google fodder.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-5428577735610229467?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/5428577735610229467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=5428577735610229467' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/5428577735610229467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/5428577735610229467'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2006/11/how-not-to-blog.html' title='How not to blog'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-1642686537708306319</id><published>2006-10-28T21:54:00.000+02:00</published><updated>2006-10-28T22:02:50.907+02:00</updated><title type='text'>^X^S</title><content type='html'>I wrote the beginning of the previous entry twice. The old mozilla managed to crash just while editing that post (and googling for the URLs). Ok, if you can't even remember what you wrote then it's not worth it anyway. But being a programmer I do not like repeating myself, or repeating the refinements of text; I even notice that it bugs me when I actually write code fragments on paper and can't just insert the argument I forget and have to rewrite the whole line.&lt;br /&gt;&lt;br /&gt;So forgo the blogger edit window and use the friendly local emacs, where your idle process types ^X^S anyway after a few seconds' timeout.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-1642686537708306319?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/1642686537708306319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=1642686537708306319' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/1642686537708306319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/1642686537708306319'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2006/10/xs.html' title='^X^S'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-2496079361644279502</id><published>2006-10-28T21:51:00.000+02:00</published><updated>2006-10-28T21:54:09.038+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programmer soul'/><title type='text'>Teardrops in the programmer's eye</title><content type='html'>Tears are a sign of pain. Or of being deeply touched, the soul's indication of a profound truth (and pain of internal readjustment). I had three pages recently doing that to me. The first was a the end of &lt;a href="http://www.paulgraham.com/vanlfsp.html"&gt;LFM and LFSP&lt;/a&gt;, about people stopping coding because they were forced to use langages inadequate for their mind. I feel the beginning of that myself.&lt;br /&gt;&lt;br /&gt;Second: &lt;a href="http://www.oreillynet.com/ruby/blog/2006/03/transformation.html"&gt;Transformation&lt;/a&gt; by Steve Yegge. The guy can write, and does so a lot, but this piece has an absolutely beautiful final point. You may not agree with his conclusions but he is interesting reading. And read the book first.&lt;br /&gt;&lt;br /&gt;Third: This &lt;a href="http://davenet.scripting.com/1997/05/07/Programmers"&gt;piece&lt;/a&gt;. My detector slightly beeped all the way through--there must be something to it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-2496079361644279502?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/2496079361644279502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=2496079361644279502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/2496079361644279502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/2496079361644279502'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2006/10/teardrops-in-programmers-eye.html' title='Teardrops in the programmer&apos;s eye'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-693802255639684111</id><published>2006-10-18T21:22:00.000+02:00</published><updated>2006-10-18T21:24:16.262+02:00</updated><title type='text'>Rigging your Poll, #2781</title><content type='html'>A majority of germans would &lt;a href="http://www.heise.de/newsticker/meldung/79608"&gt;accept more video surveillance in railway stations&lt;/a&gt; (german) to fight terrorism.  Says the headline. Now, the actual poll asked whether said surveillance would increase security. Note the difference?&lt;br /&gt;&lt;br /&gt;I am actually quite convinced that monitoring every fart of the population would will provide less opportunity to do stupid things.  But this is a far cry from whether I would accept cuts to my personal freedom, which I don't. Just look at the numbers. Getting innocently killed in a car accident is still must more probably than getting killed in a terror strike, even with 9/11. But for some reason nobody wants to cut driver's freedom to make traffic safer. Strange, isn't it?&lt;br /&gt;&lt;br /&gt;Also, I fear to some extent that massive surveillance will not actually prevent terrorist acts. Even the israeli don't succeed in that. What will be easier is to identify the terrorists after the fact which is pretty pointless with the current crop of suicide terrorists.&lt;br /&gt;&lt;br /&gt;At least I'm not the first one to notice, so I don't need create an account with them to be able to file a comment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-693802255639684111?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/693802255639684111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=693802255639684111' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/693802255639684111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/693802255639684111'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2006/10/rigging-your-poll-2781.html' title='Rigging your Poll, #2781'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-6139344738597021234</id><published>2006-10-13T23:16:00.000+02:00</published><updated>2006-10-13T23:44:28.827+02:00</updated><title type='text'>You shouldn't be reading this</title><content type='html'>Well, this blog is just of the kind of dual-use that Steve Yegge had in &lt;a href="http://steve.yegge.googlepages.com/you-should-write-blogs"&gt;mind&lt;/a&gt;: Making up one's mind and training writing. So as much as I would like readership I can hardly expect them. I like reading Steve's &lt;a href="http://steve-yegge.blogspot.com/"&gt;blog&lt;/a&gt;; usually they are long essay-style texts carefully crafted, and also happening to be in my line of thought yet inspiring. And he gets to points from seemingly unrelated starting points which I think is much better than just stating the point. At least when it's written in an entertaining way, which he usually does. No idea how much work he puts into that stuff.&lt;br /&gt;&lt;br /&gt;Most other blogs feature rather shorter texts that just pound out a point or two (or even just an annoyance without any actual positive ending); I seem not to like those as much. Good thing about them: technical solutions presented there are preserved for googling, which sometimes made me want to write up stuff that I found out myself and isn't quite in any howto, for example.&lt;br /&gt;&lt;br /&gt;For me, blogging work seems to happen primarily at late weekend evenings (when the next day need not start early). Don't be fooled by the posting times, by the way; I'm probably not sitting in the same time zone as you are.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-6139344738597021234?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/6139344738597021234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=6139344738597021234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/6139344738597021234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/6139344738597021234'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2006/10/you-shouldnt-be-reading-this.html' title='You shouldn&apos;t be reading this'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-909088123200788249</id><published>2006-10-13T23:06:00.000+02:00</published><updated>2006-10-13T23:15:01.653+02:00</updated><title type='text'>Certificates</title><content type='html'>I just had to sign a few of these. You know, the kind saying 'John Doe has successfully slept through "Incompatibility obfuscation complication library"'.&lt;br /&gt;&lt;br /&gt;I could hardly keep a straight face through this. For, first thing, I just basically gave a talk along some slides, and, unaware of the certificates beforehand, I did not do any tests. (Wouldn't have if I knew, either.) Only indication of achieved understanding were the questions I got underway, which for some people were interesting, for other largely nonexistent, which again has many possible reasons.&lt;br /&gt;&lt;br /&gt;And what does 'successful' mean? Has been there and awake the whole time? May be able to clone the demo examples? Has grokked the purpose and intent of that library? They first two are somewhat easy to verify; the third would take me many hours. But only that kind of understanding is useful, only it does not come immediately when presented with the whole set of concepts; it usually takes time to 'get' it.&lt;br /&gt;&lt;br /&gt;And foremost, what are these certs good for? Since they are generally only vaguely correlated with true understanding, they are only useful for people who have no idea on the matter themselves (think &lt;a href="http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html"&gt;recruiters-using-grep&lt;/a&gt;); in an job interview you could more easily find out by asking a few questions if the candidate knows that library or would easily learn it.&lt;br /&gt;&lt;br /&gt;But in this case the course topic was a proprietary library that no one outside the company uses, so the certs are as shiny as they are exactly useless.&lt;br /&gt;&lt;br /&gt;Also you wouldn't really want to work for someone who asks for the cert instead of asking you whether and how much you know the topic. They show that they don't trust you, and instead they risk getting someone who learned just for the cert. If you ask for crooks you get them.&lt;br /&gt;&lt;br /&gt;The only advantage gained by looking for certs is the same as by buying software: you have someone else to blame if it doesn't turn out so good. John Doe should have known the iocl; Microsoft should have delivered a working Word, it's not my fault. Unfortunately finding the guilty doesn't help you at all (unless you are SCO). It covers your seat, but even your seat would have been financed from the project that just went down the drain.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-909088123200788249?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/909088123200788249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=909088123200788249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/909088123200788249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/909088123200788249'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2006/10/certificates.html' title='Certificates'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368266563629751701.post-1067856926751529585</id><published>2006-10-01T12:48:00.000+02:00</published><updated>2006-10-13T16:51:19.808+02:00</updated><title type='text'>...forced to find out</title><content type='html'>I just stumbled over why there is a word verification (aka captcha) which keeps robots from posting comments to these blogs even though only registered users can post at all: There were enough of those that post automated 'nice article, here's my blog'. State of the humanity: Disgusting?&lt;br /&gt;&lt;br /&gt;And yesterday we were shopping for shoes. We came over a nice pair that was unfortunately only available in 36 (yeah, we have strange sizes over here) and not in her size. We then decided on another pair, and I wonder if we later will find out that we don't actually like them that much and instead have only transferred our liking of the first pair to everything in the shop. Well, at least they costed less than the lunch beforehand. (We also have strange habits regarding relative opulence of lunch and dinner.) State of the humanity: Easily fooled?&lt;br /&gt;&lt;br /&gt;And would you believe that people willingly buy stuff that is more expensive and less functional just because it is a bit better looking? Ok, it happens with shoes all the time, but I'm talking of glasses now. Last round I selected an open frame, which means no glass lenses because of danger of damaging. So, plastic was required, and the clerk quickly talked me into aspherical lenses which he said were thinner, due to being aspherical and also due to being available with a higher refractive index. A lot of time went by until they arrived (which is another story and not related to any complex production process). And then they turned out to be simply &lt;i&gt;shitty&lt;/i&gt;. The regular glasses had a field where everything goes blurry, and the sun glasses had a bit of that nearly everywhere except when looking exactly straight through. Now, I intend to do viewing around by moving my eyes, not my head.&lt;br /&gt;&lt;br /&gt;As it turns out, 'aspherical' is not the same as in photographical lenses. There the surfaces are not exactly spherical because their properties can be improved by slight, but properly computed deviations. In glasses, however, they simple start to flatten out the lenses from the (basically) correct spherical form so that they don't end up being so thick at the rim. This means simply that the lenses do &lt;b&gt;not&lt;/b&gt; work properly in some areas! And you get sold that as an advantage: The lenses are indeed slightly slimmer, but more expensive and less functional. I wonder how anyone would want to live with that who has has proper lenses before. (Someone who gets her first glasses may however think that the imperfect correction is unavoidable, never having seen it better.)&lt;br /&gt;&lt;br /&gt;Only good thing is that these days the shops offer full refund if there is anything you don't like about the glasses. I had other glasses made for the regular frame (at no extra cost), returned the other, ordered sunglasses in another shop (also spherical), neglected to specify exact kind of glass and thus spent an extra minor fortune on those, got two glasses that work everywhere I can look through them, and learned a lot more about spherical, cylindrical and prismatical refraction, eye distance yaddayadda that I wanted to know. But you &lt;i&gt;need&lt;/i&gt; to know to get glasses you want to wear.&lt;br /&gt;&lt;br /&gt;Funnily I hear a lot of people complain about colored borders (aka chromatic aberration) but I hardly ever notice those, and I don't mind them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368266563629751701-1067856926751529585?l=andreas-krey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreas-krey.blogspot.com/feeds/1067856926751529585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8368266563629751701&amp;postID=1067856926751529585' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/1067856926751529585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368266563629751701/posts/default/1067856926751529585'/><link rel='alternate' type='text/html' href='http://andreas-krey.blogspot.com/2006/10/forced-to-find-out.html' title='...forced to find out'/><author><name>Andreas Krey</name><uri>http://www.blogger.com/profile/18011171943440483489</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://images.iocl.org/ak.jpg'/></author><thr:total>0</thr:total></entry></feed>
