Tim\'s picture      Blogging Ottinger (tim)

2007-July-31

Eclipse and Someone Else’s Code

Filed under: Angst, Programming

I continue to have a very low opinion of Java as a programming language and Eclipse as an editing environment. I have never started an eclipse project from scratch, but all my “working from existing code” Eclipse attempts have been nothing but frustration and time waste. This is not how a wonderfully productive environment should work with the noob, and I’ve not found that moderately-experienced users have it any better. I wonder if they call it eclipse because it gets in the way of getting your work done?

What I think I should be able to do:

   svn co svn://someone-elses-code/ ./project
   cd project
   eclipse

What actually happens:

  eclipse opens and doesn't have any idea that this code is java, or a project, or a workspace.
  It doesn't see a \"workspace here\".  I can't get it to believe that it's sitting in a project
  directory full of java code. It just doesn't understand what it is doing here, and
  after a while I wonder what I'm doing messing with it, too.

What I should be doing:

  I have no idea.  I've never been able to get this to work on my own, and everyone who
  has helped me has done it wrong before they got it right.  But apparently Eclipse only
  wants you to ever use SVN as a plugin, and not as a separate utility.

My recommendation: Eclipse guys, java programmers, etc — can you try to fix this? By the time I learn enough java to be able to do this fix, I will have become acclimated to the stupid way it works and will probably forget. But if it’s not this easy, don’t you think maybe something is wrong? I do.

Now, most people use Java as “the escape pod from C++”, so whenever I talk bad about java the programmers tell me that C++ is worse. Of course it is worse to have badly written C++ than badly written Java to work with. Of course, the C++ syntax is worse in most ways. That’s a no-brainer, but in C++ I can check out from a version control system and go to work with my editor without having to jump through hoops like menu navigations and plugins and environment variables and paths and the like. It may be worse code, but it is easier to manage.

Sadly, the killing flaw in C++ is syntax, because once a tool finally is beaten into submission it will really give you help. I don’t see any good C++ dev tools loaded up with refactorings and code sense and the like. I do C++ best in gvim and build it with ‘make’. It’s predictable, but not as helpful. And, of course, bad C++ code is a penetrating stench. Good C++ code is okay.

Even when you are checking out, it’s not always obvious what you should do, esp if you don’t normally work in Java and Eclipse. I see these things as barriers to adoption:

Which checkout option makes sense?

So is a project configured with the wizard not going to be in the workspace?
Are these really mutually exclusive? I’m not sure.

I chose the second option, more or less randomly, to see if it would work, explode, or what. It seems to be okay right now. I hope it is not masking some crazy failure mode. I do notice that my project has a funny symbol, like a white snowflake on a black backgroundSnowing In Alaska . I don’ t know what that means, and I don’t know how to find out. It might mean that eclipse is struggling or failing or something, or that the weather in alaska is 6 months of night an lots of snow.

Oh, wait. No. It has the source code tree, but is totally unaware that the code is a java project, and is crippled. Ah, heck. I had to go pretty far down the road before I knew that there was anything wrong. This stinks. Why do people brag about java/eclipse being this great environment? I’ve never had so many problems getting an IDE up and running. This is moronic.

Oh. Apparently the point in the subversion repository I pulled down wasn’t quite what eclipse considered to be a “project”, but was a directory containing a number of them. Black Asterisk describes that perfectly… not! So my helper aided me in pulling down the correct directory though I’ve no idea was was correct about it. Now I get this wonderful greeting from eclipse:

GladToSeeYou
My happy greeting from Eclipse

I guess that just means he’s happy to see me? Hard to tell what is important and what is not important as a noob in Eclipse-land.

I think I’m missing the intended purpose of the “workspace” thing right now, and would love an eclipsian to tell me why it’s actually a good idea and what I’m expected to do with it. My eclipse-using friends tell me they either put every project in a separate workspace, or they put all their java projects in a big single workspace. So far I think that ‘workspace’ really means “however much you want to see in the browser window”, and I don’t see any other point in it.

Ah, java life: what joy. By that I mean “what joy?”



Update: After using several people’s time and myriad calories’ energy and a few nervous breakdowns (grin) we find that the .project file needed to be edited by hand to have entries for the builder and the nature of the project. I was right, it was not a java project when I checked it out, and no finagling with eclipse or subclipse plugins would change the fact of GIGO (garbage-in, garbage-out).

I learned that the people who write this code don’t use the .project file. They either overwrite it, or create a project elsewhere and then point that (valid java project) at the source and .jar files. Being a noob and having no daily contact (seven time zones away) I didn’t know this and couldn’t have been expected to.

I asked my buddy (the one who saved me and fixed everything) how I was supposed to know to do this, if there was something I should have read. He said no, you just see someone else do it and pick it up. So he was my remedy and I know more than I did before.

And now you know, too.

Comments »

The URI to TrackBack this entry is: http://tottinge.blogsome.com/2007/07/31/eclipse-and-someone-elses-code/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Get free blog up and running in minutes with Blogsome | Theme designs available here