Archive for September, 2004

So many ways to skin that scm cat

Saturday, September 18th, 2004

While pulling sources for tortoisesvn, I came across the better-scm site; from there, I found David Wheeler’s essay on OSS/FS scm tools, which primarily discusses CVS, subversion, gnu ARCH, and Monotone (the latter two were new to me).

Having recently moved to subversion, and being very happy with it, I was surprised to see a lukewarm review. Of course, my previous experience with scm has been primarily HP’s softbench, clearcase, and RCS (and, fortunately, the briefest of encounters with VSS), so I’m already lightheaded with being set free from the pessimistic-lock camp of version control. Liberal use of branching, and easy separation of commits and lands, has been a major major improvement in my sw development team lead experience. Funny just how long you can work in a cruddy setup without knowing how cruddy it is.

So Wheeler’s paper turned me on to the next scm things that I don’t even know that I don’t know. A basic difference looks to be centralized vs. decentralized models:

Some people believe SCM systems should primarily aid in controlling a centralized repository, and so they design their tool to support a centralized repository (such as CVS and Subversion). Others believe SCM systems should primarily aid in allowing independent developers to work asynchronously, and then synchronize and pull in changes from each others, so they develop tools to support a decentralized approach (like GNU arch, monotone, darcs, and Bitkeeper).

Though even centralization can mean different things; he quotes Bastiaan Veelo:

In short, one could say that Arch is centralized around a code integrator, and that Subversion (like CVS) is centralized around a repository.

Wheeler’s darc horse for scm leapfrog is darcs, something written in Haskell, a language I’ve never even heard of. His example of token replacement showing the handling inter-patch dependencies was pretty cool. But he doesn’t think it will happen: most scm tools are working well enough (yeah, CVS worked well enough for a long time), and Haskell’s functional programming is a serious barrier to contribution.

I had no idea what I was missing in scm. It seems wherever you go, someone has gone a lot, lot further.

Haskell is Functional

Saturday, September 18th, 2004

Both the Haskell language and functional programming were new to me; I came across both while reading about darcs. From the horse’s mouth:

Haskell is a computer programming language. In particular, it is a polymorphicly typed, lazy, purely functional language, quite different from most other programming languages. The language is named for Haskell Brooks Curry, whose work in mathematical logic serves as a foundation for functional languages. Haskell is based on lambda calculus, hence the lambda we use as a logo.

[…]
A functional program is a single expression, which is executed by evaluating the expression. Anyone who has used a spreadsheet has experience of functional programming. In a spreadsheet, one specifies the value of each cell in terms of the values of other cells.

The same page contrasts functional languages with the imperative languages most of us app programmers are more familiar with: java, C#, etc, and emphasizes the level of abstraction:

This focus on the high-level “what” rather than the low-level “how” is a distinguishing characteristic of functional programming languages.

Another well-known nearly-functional language is the standard database query language SQL. An SQL query is an expression involving projections, selections, joins and so forth. The query says what relation should be computed, without saying how it should be computed. Indeed, the query can be evaluated in any convenient order.

Okay, now I see that SQL and LISP are functional, so it’s not so new to me as I thought.

Is there much Haskell going on? Well, it has a wiki that is getting daily update activity. Though monster.com finds only nine jobs in four companies in the US.

Wikipedia is very helpful; here are articles on functional and imperative programming, and there is also a one-page programming paradigms at-a-glance category page.

I wonder if this is one of Ward Cunningham’s 100 languages?

Yes, we do need those stinkin’ badges

Saturday, September 18th, 2004

While it’s a tentative thing, I’m trying to generally use my real name on the net; I like when others do, I take their writing more seriously, and I think it’s an accountability I like for myself. I still have a pseudo or two; maybe later I’ll figure out if they are more crutch or more good judgement.

I see amazon is encouraging their reviewers to use their real names, and is even using that as input to the reputation calculation. Those opting in will have a Real Name badge attached to any review they write.

A Real Name is a signature based on the name entered by the author as the cardholder name on his or her credit card, i.e. the author represents this name as his/her identity in the “real world.” An author willing to sign his or her real-world name on a piece of content is essentially saying “With my real-world identity, I stand by what I have written here.” Real Name signatures therefore establish credibility much as reputations built over time in the Amazon.com community, and just as high-reputation authors and their works receive badges, authors who use Real Names receive badges. In the absence of a reputation or helpful/not helpful votes, the presence of a Real Name becomes a data point on where to place the review. People with lots of helpful votes will still be the top-ranked reviewers, even if they choose not to use a Real Name.

While I suppose it’s not so hard to fake a credit card name, I like the promotion of transparency at such a mainstream site.

The Rise and Fall of the Great Verbial Expressions

Saturday, September 18th, 2004

I wonder what the relative incidence of “stumbled onto” is, before and after the arrival of the internet?

A first look at Steve McConnell

Monday, September 6th, 2004

A couple weeks ago, MSDN TV had an interview (transcript available here) with Steve McConnell, of Code Complete and Construx.

The missing interview question for me is “what do you think of swebok?

Learning from SWT

Sunday, September 5th, 2004

Although blogs often suggest the freshest of web content, I often find myself reading things months or years old, by following a blog’s links.

An example is some OTI stuff on SWT, from way back in 2001. The first article shows rather clearly the impact of two different approaches to using JNI for accessing platform-specific GUI widgets. By strictly using JNI as no more than a forwarding proxy, they get a single API to support, all the power of java for all of their programming logic, and much simpler debugging and profiling.

This led me to a second SWT article which is a good example of coding standards in action. The standards are defensive, and influence the api design, e.g.

This rule occasionally leads to API that seems artificial. For example, GC.getClipping (Region) forces the programmer to create a Region in order to get the clipping region from a GC. Although it might have been a bit “prettier” to provide GC.getClipping () that returned a Region, this would break the rule because it would have to allocate an operating system resource outside of a constructor. While it could be documented that the programmer needs to free the Region returned by GC.getClipping (), programmers don’t always read the documentation. Making the programmer call the constructor for the Region makes it clear that it is the programmer’s responsibility to free the resource.

In the “how did I get here” department: wanting to see the contents of Steve McConnell’s second edition of Code Complete, I bugmenotted my way past cc2e’s registration. Out of curiosity, I clicked the “profile” button for the bugmenot user, and saw a mailinator email address. “That’s cool,” I thought, and seeing that its creator had a blog, I stopped by there and read his java rant. Which had a kind reference to SWT.