Archive for June, 2007

SVN Working copy locked

I’m not really sure why, but I think it is likely I canceled a commit halfway, and subsequently I’m getting a Working copy xxxx is locked message that disallows me from doing anything with the locked resource (update/synchronize/commit).

Doing a “svn cleanup” fixes the locks. In Eclipse, right click the offending resource, select Team > Cleanup.

http://svn.haxx.se/dev/archive-2003-01/0551.shtml

Comments (1)

Symbols

Ruby symbols are so regularly used but are mystic to the amatuer developer. There’re several explanations what they are and how they should be used. To me, they are String constants, whose value is the name of the constant itself. Therefore :something contains the value “something” and cannot be changed.

This is preferred over using “something” in Ruby directly because unlike Java it doesn’t have a String pool and using “something” over and over creates separate String objects in memory. As such, symbols are useful if a particular String is repeatedly used in your application. Now go read again about the confusing stuff about being able to to_i and being an instance of a Symbol class. It should make a little bit more sense.

Comments