Ben J. Christensen

Software Development and Other Random Stuff

Useless SVN Error Message: Network connection closed unexpectedly

If you’re trying to do a subversion checkout using svn+ssh like this:


svn co svn+ssh://hostname/path

… and are getting a useless error like this …

svn: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
svn: Network connection closed unexpectedly

Try removing .ssh/known_hosts (which fixed my issue) or ensure that the private/public keys in .ssh have the right permissions, such as this:

benjchristensen-notebook:~ benjchristensen$ ls -al .ssh/
drwx------ 6 benjchristensen staff 204 Jun 1 09:30 .
drwxrwxrwx+ 39 benjchristensen staff 1326 Jun 1 09:24 ..
-rw------- 1 benjchristensen staff 1743 Jun 1 09:17 id_rsa
-rw-r--r-- 1 benjchristensen staff 423 Jun 1 09:17 id_rsa.pub
-rw-r--r-- 1 benjchristensen staff 413 Jun 1 09:30 known_hosts

Filed under: Tools

Ideal Equipment

The following is my opinion of ideal equipment for developing – and anything else I do.

Picture 6

MacBook Pro 15-inch: 2.8GHz

8GB Memory

7200 RPM 500GB Drive

Picture 7

LED Cinema Display (24″)

Because one display is never enough.

Filed under: Tools

Impact of Tools on Productivity

Yesterday I was analyzing java heap dumps at my office using a Mac Pro with 8 Xeon CPU cores and 16GB of memory.

It took 30-60 seconds to load a 3.5GB file and was very usable while browsing the heap and analyzing it.

When I got home I wanted to peruse it a little more. I just had my laptop, a MacBook Pro with a Core 2 Duo 2.5GHz and 4GB memory.

It took over 20 minutes just to load the file, and the machine was virtually unusable that entire time. Once loaded, every click of the mouse took time ranging from a noticeable lag to multiple seconds of being hung. The machine was swapping to death. Even though I have a very high end laptop, it just couldn’t handle what I was throwing at it as compared to the very powerful desktop machine.

I gave up rather quickly as the friction of using the system was too high. I didn’t have the patience to deal with it – I just waited until I returned to the office today and again used the Mac Pro.

It has made me think again about what kind of equipment is provided to development teams. I know for a fact that my extended team of 40+ overseas don’t have a single machine in their office as powerful as the Mac Pro I was using.

So, if one of them needed to analyze that heap dump, profile a large server application or do some other intensive task, what would they do? Deal with 20 minute waits as opposed to 30 seconds, and multi-second pauses between each mouse click – and waste a day in their effort instead of minutes or hours of effective work allowing their tools to work as fast as their thoughts?

One could argue that a remote server, such as one at EC2 could be used for a couple hours by using a web based solution like JHat to analyze the heap. Except that didn’t work so well.

How much productivity is lost because a developer is given equipment below actual requirements, or by making them use the same machine long past its usefulness (3 years is an eternity for a developer, yet is a standard ‘depreciation’ time for which a developer is often made to endure their machine).

For example, I have 4GB on my laptop and push on that limit constantly. Yet I know a lot of my team only has 2GB, and are working on CPU architectures several years old.

For a US developer this is just silly – as having new equipment every 18-24 months is a fraction of the cost of the persons salary, and in my opinion more than makes up for itself in improved productivity as well as morale.

For an offshore developer, with much lower salary costs it’s a higher fraction, but still I believe its dividends are worth it.

This applies to all types of tools and equipment for developers: faster machines, more memory, dual large monitors, commercial software as opposed to everything being opensource and other such things.

People are expensive. I think it’s more cost effective to spend a little on the right equipment and increase productivity and morale of development teams by giving them the right tools – as I had while analyzing heap dumps.

Filed under: Tools

Netbeans Heap Profiler Works. Well.

Netbeans (which I never use) has seemingly come a long way since I last looked at it. The UI is certainly a lot nicer.

Today however, it’s the Heap Profiler that I’m happy with – cause it actually works unlike anything else I’ve tried today.

It loaded a 3.5GB  heap in less than 30 seconds! (I had set my max heap for Netbeans to 12GB on my 16GB, 8-core machine).

Finally a tool for heap analysis that works and works well. And it’s elegant looking at the same time.

Netbeans Heap Profiler

Filed under: Production Problems, Tools

Memory Analyzer Can’t Handle Large Heaps

Despite the claims that Memory Analyzer works well with large heaps, the following screenshot is the evidence of my continued inability to have it parse a 3.5GB heap dump.

I have attempted JDK 5 and JDK 6, both 64-bit, with up to 14GB of memory allocated on an 8-core machine with 16GB of memory.

Note the memory bar at the bottom showing it’s using only 2121M out of 11879M – yet it still thinks it’s running out of memory.

The settings are:

-vmargs

-Xms12g

-Xmx14g

-XX:MaxPermSize=1G

-Dorg.eclipse.swt.internal.carbon.smallFonts

-XstartOnFirstThread

 

-vmargs
-Xms12g
-Xmx14g
-XX:MaxPermSize=1G
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XstartOnFirstThread

 

Memory Analyzer OutOfMemory

Filed under: Production Problems, Tools

Micro-Blogging with Twitter

I started using Twitter about 2 weeks ago. Before that I thought Twitter was a silly thing. Why would I want to post “what I’m doing” at any given moment?

However, a handful of people whose blogs I follow began migrating more and more of their commentary to Twitter. In fact, one of them retired from blogging and only uses Twitter now. Thus, I started an account so I could follow these few people.

I soon came to recognize Twitter for what it can actually be used for – micro-blogging. It’s not just “status updates” as used by teens, tweens and soccer moms – but a viable communication platform for short thoughts and messages that would often go un-written, un-shared, un-communicated (pardon the poor grammar) because traditional blogging (if a 5 year old concept can be considered traditional) needs more content than a single sentence to be bothered with.

To post a blog entry it needs at least a title plus a paragraph.

With Twitter, you just need the title.

Thus, the sharing of thoughts, ideas, quotes, links etc all become more natural because there is less friction in doing so.

As I commented in an earlier post on “Speed of Thought“, if something has friction, it it less likely to be used or performed. The same with sharing of thoughts and ideas.

Blogging reduced the friction greatly from the techniques before it, and Twitter (or micro-blogging more generically) appears to be doing the same for a realm of communication previously not very feasible to attempt.

I have posted 83 messages in 18 days since starting – some benign, others more thoughtful. A mixture of personal and professional.

I do not see Twitter as a replacement of blogs. I see them as very compatible mediums that mix together to create a stream of thoughts and ideas – to be shared and create dialog. In fact, I have mixed them now on this blog as shown by the Twitter feed in the right column, providing a single place to find my thoughts – both those well thought out and edited as blog entries, and those more “sound bite” sized from Twitter.

Despite my views on the subject just 3 weeks ago, I now think Twitter is a valuable addition to our communication toolset alongside email, RSS and blogs.

If you’re still questioning the significance of Twitter and think it’s just celebrities, teens and tweens, check out some of the following which are a few I follow:

The fact that companies, news agencies and governments are using the medium for instant communication – not just personal friends – is an amazing convergence of parties making the medium that much more powerful and useful.

Communicating and staying in touch with so many diverse parties has never had as little friction as this.

Filed under: Personal, Tools

Eclipse Galileo (3.5) and Subversion

Eclipse still does not ship with subversion support by default.

Here’s how I enabled it. Much easier than with Ganymede, but I still shouldn’t have to do this considering Subversion is used by 57.5% of the Eclipse users who responded to the recent survey.

See page 3 of http://www.eclipse.org/org/press-release/Eclipse_Survey_2009_final.pdf:

Subversion is the dominant Source Code Management system used by developers, with 57.5%.”

Anyways, the following screenshots show how to install it from “Help -> Install New Software”.

  • The first site “Galileo” is already included in Eclipse 3.5.
  • The second site is the following URL: http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/

Picture 4

Picture 3

Filed under: Tools

Eclipse Ganymede Subversion Support Sucks

You’d think that after integrating millions of lines of code, and the amount of bad press this has gotten, they could manage to make this work out of the box. Nope.

See here for the best I’ve found on how to make it work: Subversive In Ganymede

Filed under: Tools

Java and Adobe Flex

Bruce Eckel talking about “Hybridizing Java” through the use of Flex for the UI.

http://www.artima.com/weblogs/viewpost.jsp?thread=193593

See Flex.org for more information.

I’m starting to get tired of continually messing with DHTML, CSS and AJAX … it may be the right time for Flex now that it’s version 2, it’s going opensource, and costs are down.

Filed under: Code, Tools

WTP 1.5M4

I’m running Eclipse 3.2M4 and WTP 1.5M4 and so far things seem to be working well.

It’s a pain to convert a MyEclipse project in SVN, but straightforward …

When checking out from CVS/SVN, if a .project file exists, it automatically configures the project with that. To allow me to checkout the project as a “Dynamic Web App”, I had to delete the .project file in SVN first.

The files I removed in SVN are:

.project
.classpath

Here is an image showing the project in Eclipse.

This next picture shows how my “Project Preferences” looks … particularly the “Project Facets” which is how WTP dictates what a project is … Java and Dynamic Web Module are necessary ones.

This picture shows the server manager.

I personally don’t like waiting for validation so I turned off several of the validators. The following picture shows it.

Ben

Filed under: Tools

Twitter Updates

  • I *really* wish iBooks and Kindle would let me copy/paste text so I can quote a sentence or paragraph! Ridiculous that I can't. 22 hours ago
  • Great weekend (and ‘food tourism’) in Los Angeles. "Sooo fun!" as described by a certain short person when asked on the drive home. 23 hours ago
  • Small world! Just ran into a colleague from work - a 7hr drive from the office! 1 day ago
  • We made it to LA! Feels like returning home :-) 3 days ago
  • Peter Pan Baby http://twitpic.com/2kg6n4 5 days ago
View Ben Christensen's profile on LinkedIn