Newbie questions about managing code

Göran Hultgren gohu at rocketmail.com
Thu Dec 20 11:25:32 UTC 2001


Howdy all!

--- Chris Muller <afunkyobject at yahoo.com> wrote:
> I am a fascinated Squeak-newbie bursting with questions.  I have lots of Smalltalk experience,
> but in other dialects (VA & VW).  I'm finally ready for Squeak, but am still trying to get
> familiarized with my new environment.  I have a couple of questions.

Welcome! There seem to be a lot of newbies joining up right now. Cool!

> - What are some best-practices for maintaining my code in a safe-as-ENVY way.  If I'm writing
> new code every day that I do not want to lose, is it reliable enough to simply back up my
> changes file every day?  Or do I need to file-out all of my ChangeSets for a more reliable
> recovery should the need arise.  I imagined there would be some sort of automatic recovery
> script that would re-apply all changes in the changes file after the timestamp of the image
> save, similar to the "Make Image Consistent" command in an Envy-based environment.  I noticed a
> couple of interesting methods:
> 
>  Utilities applyUpdatesFromDisk
> 
> wants to pull fileouts out of a folder named 'updates', accounting for the version number tag
> appended when I file out a ChangeSet.  So this doesn't seem to be intended for the changes file.

As noted - that is not appropriate (I think) - that's stuff used by the central team to manage the
numbered updates to the base image.

> I also noticed:
> 
>  Smalltalk recover: 100000
> 
> but this doesn't seem to be what I'm looking for either.  Is there something else I can use?  I
> noticed there are code-elements known as a "projects" but my naive understanding about their
> intent is to have multiple "desktop" displays.  They offer no code-management advantage over
> ChangeSets.  Is this correct?

I think so. I haven't really used Projects that much. Obviously we all work differently.
Personally I save images from time to time so that I can back out of disasters. Then if it
happens, I just use the menu choices available under "changes..." to recover from my last good
image. Hasn't happened that often though.

In order to make sure I have something if everything goes MEGABOOOM I fileout changesets now and
then and store them somewhere safe. Changesets are good - learn how to use them. ChangeSets is
currently also what everybody uses for sending code around etc.

NOTE: The upcoming new Modules system will change a lot of this.

<plug>Then as a sidenote there is CVST - code for using CVS as a source repository. Funny enough I
can't tell you how cool it is to use because I haven't used it myself! But I play a small part in
that project. Those developing it uses it though for "itself" on SourceForge.</plug>

There are also other projects in this area and the new Modules system is meant to be
open/pluggable for different solutions for source management.

> - What is the best way to minimize method collisions when extending base classes?  I have used
> two-character method prefixes in other Smalltalks.  It was effective and tolerable for me, but I
> think I would feel like I was littering the simple and gorgeous world of Squeak if I did it
> there.  Does anyone have have an opinion about this?

I personally place my extensions in separate ChangeSets so that they can be easily studied. And
normally they should of course be avoided altogether (extensions I mean). I think you should stay
clear of method prefixes. Squeak nows who did what method anyways (developer signatures - mine is
"gh" - sign up on the Swiki) Class prefixes is alright I think personally. And this too will
probably change a lot when the new Modules system comes out.

> - The same question also applies to classes.  I saw the article about "Environments" on the
> Swiki.  But it appears that "root environment" (Smalltalk) is not an instance of Environment,
> but of SystemDictionary, so I was unable to makeSubEnvironmentNamed:.  

In this respect I think you should wait a little bit and see what happens with the new modules
system "Due Any Day Now". :-) I think it will turn out to be very good - kudos to Henrik.

> I welcome and appreciate your input..
> 
>   - Chris Muller

regards, Göran

=====
Göran Hultgren, goran.hultgren at bluefish.se
GSM: +46 70 3933950, http://www.bluefish.se
"Department of Redundancy department." -- ThinkGeek

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com




More information about the Squeak-dev mailing list