Skip to content

Git on Ubuntu with a Windows Client

If you happen to have a decent Linux VPS lying around you might get it into your head to set up your own private git repository to stash your various writings, recipes, world domination plans, and the occassional LOLcats picture. This is a bit easier said than done so I thought I’d take a moment to document my own efforts.

I’m assuming that you have an Ubuntu server and a Windows client. The first step is to get git installed on the server. But before this can be done you’ll need to generate a SSH keypair. See the Ubuntu SSH keys tutorial for how to do this and once you’ve done so use WinSCP to grab a copy of your private key (the one that doesn’t end in .pub) and stash it in the C:\Documents and Settings\$USER\.ssh directory.

Now you can go ahead and install git and gitosis on your Ubuntu box. Be sure to initialize gitosis using the correct public key. Also note that gitosis may store your public key in a file named $USER@$HOST.pub in its keydir directory. This will only cause problems later so rename it to simply $USER.pub. You’ll also need to modify, commit and push gitosis.conf to refer simply to your username.

Now create a new repository in gitosis. Make sure you run the mysterious git remote add origin gitosis@$HOST:$PROJECT.git command and make sure you can then push the new origin to the remote master. You should now be able to modify, commit and push on the server. It’s time to setup the Windows client.

Install msysgit on your Windows box. The net install can be very flaky. If it breaks on you just delete the C:\msysgit directory and run the full install.

Now install Tortoise Git. When you do, as noted here, be sure to tell Tortoise Git to use the OpenSSH, Git default SSH Client and not TortoisePLink.

Now you can go ahead and clone the repo you created on the server using Tortoise Git. The repo URL will be of the form gitosis@$HOST:$PROJECT. Note that unlike the Linux git client, Tortoise Git doesn’t seem to like it when you add a .git to the end of the repo name. Also note that the username is gitosis. Technically you could use other usernames here, like your own, but then you won’t be able to share the repo.

Make some changes in the repo and commit. But if you try to push your changes back to the master you’ll get a very strange error message telling you you’ve already checked out the ‘master’ branch. In fact you have: on the server, when you initially created the repo. To fix this you’ll need to convert the repo on the server to a bare repository. Once this is done you can now happily commit and push away!

Enjoy!

Cognitive Load and Other Loads

Cognitive load is a nice, science-y term. It almost sounds like a real physical phenomenon, something we might observe or even measure in a laboratory. Of course it’s not. It’s nonsense jargon made up to describe the “pause” some people experience when they read text with links embedded in it. It does make me wonder though what else might cause “cognitive load”? Pictures in the text? Listening to music? …breathing? Are all these people doing absolutely anything other than concentrating — with all their might and focus — on each and every word of the text “shallow” reading?

It’s difficult to take the latest “Google made me stupid!” nonsense from Carr seriously. We’re supposed to believe that links are a “distraction”. A distraction from what? From the author’s message? But unless you’re reading Viagra spam the links were added by the author for the very purpose of increasing your understanding of her message. They contribute to the “meaning” of the text just as much, perhaps even more, as any other literary artifacts like punctuation and composition. Carr plays a transparent, naturalist game by trying to draw some deep, inherent distinction between the text and the links when no such distinction is meaningful. This leads to such silliness as putting links at the end of his blog posts so as to not distract his dear readers. (No, seriously, he does this — see the first link.) This ripping of the links out of the text is as reasonable as ripping out punctuation, capital letters, or paragraph breaks. So why stop at links? Perhaps Carr’s quest for pure, focused text will lead him to haiku. What’s next on the man’s hitlist? Does he even have a reliable process for identifying those artifacts that contribute to “cognitive load”?

Links have obvious benefits. Anybody who’s ever researched a topic on Wikipedia understands that links contribute significantly to a deeper understanding of the matter at hand by allowing the reader to place the idea in a context, to see how it’s connected with other ideas and events, to see not only the static, serialized form of the idea but grasp where it came from, how it moves and lives in its environment. Anybody who’s read a blog (like this one) quickly grasps how links can expose readers to contrarian viewpoints as well as introduce evidence that makes the argument stronger or weaker. And anybody who’s ever, say, browsed the web understands that links can be a powerful mechanism for discovery and exploration. Links are an extraordinary force for creating understanding, spreading knowledge, and learning new things. (See: the world wide web). And yet Carr suggests that links via the mechanism of cognitive load “impede comprehension and learning.”

What’s really going on here?

The cardinal sin of links is they make the reader think. Their crime is that they indicate a universe larger than the text. For people like Carr this is a real problem; reading is no longer a one-way transmission of wisdom, no longer a matter of a dumb receiver picking up a broadcast. With links the authority of the text is inherently compromised and the text is no longer, literally and figuratively, an end in and of itself. This is a pretty dangerous turn of events, particularly if you’re in the broadcasting business.

Links

Hey Gruber, what about the users?
Makes you wonder why users put up with this crap. I guess some people never learn.

In Defense of Links, Part One: Nick Carr, hypertext and delinkification
This is such a dumb argument. Once you move past Carr’s trite, science-y “cognitive load” it should be clear to everybody that links, more often than not, only deepen one’s understanding of material.

This is how I feel about buying apps
This makes difficult sense. Most apps are worthless, not even use-once-throw-away valuable.

The problems with ACID, and how to fix them without going NoSQL
That’s actually very nifty. Such a scheme makes perfect sense — when you’re not using disks at all. But this doesn’t describe all the problems with ACID, notably the problem of having to split different types of data across many different systems.

Goodbye Blog. Hello Letter.
Really? This seems like a huge step backwards to me. But at least it’s good to see the “amateurs” gravitating towards paid content.

Rely your web startup on Rackspace Cloud? Think again.
I expect this kind of horror story to become increasingly common going forwards…

The Future of Silverlight
I find it interesting that developing serious functionality in Javascript is so universally loathed and yet also still so popular. It explains a lot about C, Windows 95, and the universe.

The Hunt for Value

What is ‘value’ in software development? It’s a term that gets thrown around a lot. Value this. Value that. Tests add value except when they don’t. Design patterns are valuable but not as valuable as good old simple code. The myriad tradeoffs are always presented in terms of value or rather values — speed vs simplicity, reliability vs speed, and so on. In the end we apply the term to ourselves; are we really adding value to the business?

It seems value is a very overloaded term that can mean most anything. Any defnition would be reductive. Fortunately, we don’t need to know what value is so much as how to find it. Value is like Bigfoot: it’s existence is uncertain, it’s never been conclusively seen but we’ll know it when we see it, and in our quest for it all we have to guide us are some tracks, some traces, maybe a blurry video or three.

A more interesting question might be where is the value in software development? Of course this suggests a further, even more interesting question: value — for who?

Links

Android MVC – Forward and Backward Navigation
Looks like a pretty interesting framework.

Email needs to be realtime
Email already is effectively real-time for anybody with access to a smartphone and google mail. At this point the interface really is the problem. Google Wave was right to understand what’s really happening here are conversations and conversations are necessarily fluid.

Introducing fise, the Open Source RESTful Semantic Engine
That’s pretty durn cool. This sort of data enhancement does need to be its own service rather than everybody reinventing the wheel.

Code and data
It’s not so much a matter of code vs data as it is one of strong typing. It’s true what they say: every bug is a type error…

Another App bites the dust – Briefs goes open-source after Apple ponders its review for three months
I do wonder if Apple has any clue about the sort of culture they are building.

Links

Proposal: A new kind of blog comment system
I’ve always felt that comments should be completely decentralized particularly because it already is… and I, for one, like putting comments on my own blog rather than spreading them across hundreds of sites. Seems like there’s already been some work in putting threading extensions in Atom

12 Standard Screen Patterns
If these are really patterns have to wonder why people are still building them from scratch.

A Unit Test You Should Never Write
Yeah, that’s a pretty awful test. It’s not just that it’s stale it’s that it’s really very procedural. Testing not only ought to capture requirements it ought to read like requirements…

Bad developer != novice developer
It’s an excellent point. I’d go further and suggest that what separates a great programmer from a good programmer is that the great ones are good at sharing their deep understanding of the problem and solution space.

Down With Social
It seems to me that social media is the new television. It’s just more of the same old, same old broadcast advertising but now for the web.

Mobile Magic

Whoever would have believed that the year 2010 would involve a critical battle between operating systems? After all the years of crowing about how the web had made the OS obsolete we now find that they’re more important than ever. Perhaps even more important than the web itself? If I were a hack writer for a hack magazine, I’d have to ask the question: Is the operating system back from the dead?

But that’d be dumb. In reality it is the web that is driving virtually all of the innovation and growth in the smartphone market. Without the web both the iPhone and the latest Android “superphone” are nothing more than overly expensive, shiny bricks. The same holds true for netbooks and many ultraportables whose utility is, again, significantly reduced without the web. Mobile isn’t some sort of alternative to the web rather it’s just the opposite: mobile’s value is wholly dependent upon being another point of access for the web. Steve Jobs’ real innovation was simply understanding how valuable such mobile access to the web really is — and in fact this is something Palm users and the few hardcore WinCE users had understood for years.

So as “interesting” as it is to discuss the merits of the mobile operating system race it’s ultimately really of little consequence who wins. No matter who wins the end result will be same: thousands of people carrying powerful devices that have deep integration with the web everywhere they go. This is the real “magic” of mobile and it’s what developers ought to be thinking about as they charge into the “app goldrush.”