Wednesday, August 25, 2010

Where was that method or exemplar defined?

Do you ever want to know the source file for a particular method? You can use the class browser to jump to the code or you can do this...

MagikSF> circle.method(:new|()|).source_file
$

Most of the time, jumping to a method is faster in the Class Browser than using this code snippet.

But what if you want to jump to the file where the actual class exemplar (not the method) is defined? Then you can do this...

MagikSF> circle.method(:exemplar).source_file
$

I know of no way to do this latter action from the Class Browser.

Tuesday, August 24, 2010

#FME Users Exchange at #swuc topics

The FME Users Exchange at the 2010 Smallworld Users Conference will take place in Baltimore, Maryland on Thursday, September 9 from 1pm to 4pm (EDT). You can read more details of the agenda at http://bit.ly/cvok0h.

I will be presenting a section on "Best Practices: Tweaking FME-Magik code to improve your FME experience in Smallworld". It turns out that I have more material to cover than the approximately 30 minutes allotted to me. So in the spirit of conference collaboration, I thought I would put all my proposed topics up for a vote. The topics with the most votes get moved to the top of my presentation list. The ones with the least votes get used as filler at the end :)

Please vote on the topics here http://bit.ly/9nFvkd ( you are also welcome to add your own topics).

See you in Baltimore!

Tuesday, August 17, 2010

How much does an alternative contribute to file size?

If you want determine how much a particular alternative contributes to the overall size of a .ds file, use these debug methods...


_block
_local v << gis_program_manager.cached_dataset(:gis)

v.dump_file_usage(v.file_usage())
_endblock
$


See the public comments for ds_version_view.file_usage() for a description of the data that is returned. Based on that, you can figure out what percentage of total blocks used is attributable to a particular alternative.

This can give you guidance for which alternatives to merge/post/delete, etc.