comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: can i place a job advert
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: can i place a job advert [message #28126] Mon, 26 November 2001 09:13 Go to next message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
William Thompson wrote:
>
> Paul van Delst <paul.vandelst@noaa.gov> writes:
>
>> "Pavel A. Romashkin" wrote:
>>>
>>> Oh, people have done much worse things here and got away with it. Like
>>> admitting to using common blocks. Go ahead...
>
>> Wot's wrong with common blocks? They seem like quite useful beasties to me.
>
> Paul:
>
> You obviously don't belong to the right religion. ;^)

Well, my comment was meant to try to get those that swear profusely that common blocks are a
Bad Thing to explain why. I place common blocks in the same category as GOTO statements - if
used incorrectly they can lead to unbelievably bad source code that may or may not work.
However, used correctly and judiciously they can greatly simplify the code - for both the
programmer and subsequent user/readers. Having dealt with particularly blech f77 code replete
with common blocks (anonymous, named, different lengths, etc.) I can sympathise with those that
despise common blocks but, to use a building analogy, it's not the hammer's fault when the
framing for the house falls down....

> Seriously, I also use common blocks. I use them because:
>
> 1. They're easy, and get the job done.

I even use them in Object programs!!! :o)


> The main objections to common blocks have been:
>
> 1. Sloppy programming can cause problems, if different programs have different
> versions of the common block. That's pretty easy to get around, though.
> Typically, I use include files, so that all programs have exactly the same
> common blocks.

No argument there, but sloppy programming can cause problems regardless of what construct one
uses to manage variables, memory, etc. Pointers are what come immediately to mind..... with
objects a close second.

paulv

--
Paul van Delst Religious and cultural
CIMSS @ NOAA/NCEP purity is a fundamentalist
Ph: (301)763-8000 x7274 fantasy
Fax:(301)763-8545 V.S.Naipaul
Re: can i place a job advert [message #28129 is a reply to message #28126] Mon, 26 November 2001 08:24 Go to previous messageGo to next message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
Paul van Delst <paul.vandelst@noaa.gov> writes:

> "Pavel A. Romashkin" wrote:
>>
>> Oh, people have done much worse things here and got away with it. Like
>> admitting to using common blocks. Go ahead...

> Wot's wrong with common blocks? They seem like quite useful beasties to me.

Paul:

You obviously don't belong to the right religion. ;^)

Seriously, I also use common blocks. I use them because:

1. They're easy, and get the job done.

2. Not everything is a widget program!!!

3. Even in widget programs, they can be used to maintain information after the
widget program has been killed.

The main objections to common blocks have been:

1. Sloppy programming can cause problems, if different programs have different
versions of the common block. That's pretty easy to get around, though.
Typically, I use include files, so that all programs have exactly the same
common blocks.

2. In widget programs, common blocks restrict you to only one copy of the
widget at any one time. I think this is sometimes overemphasized, but is
certainly a true disadvantage.

William Thompson
Re: can i place a job advert [message #28132 is a reply to message #28129] Mon, 26 November 2001 07:22 Go to previous messageGo to next message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
"Pavel A. Romashkin" wrote:
>
> Oh, people have done much worse things here and got away with it. Like
> admitting to using common blocks. Go ahead...

Wot's wrong with common blocks? They seem like quite useful beasties to me.

paulv

--
Paul van Delst Religious and cultural
CIMSS @ NOAA/NCEP purity is a fundamentalist
Ph: (301)763-8000 x7274 fantasy
Fax:(301)763-8545 V.S.Naipaul
Re: can i place a job advert [message #28134 is a reply to message #28132] Mon, 26 November 2001 04:03 Go to previous messageGo to next message
Russell Layberry is currently offline  Russell Layberry
Messages: 5
Registered: August 2001
Junior Member
ok, here goes then...

Bristol, SouthWest England (Silicon Gorge!) - software engineer required for
company involved in

a.. digital television (hardware or software)
b.. Linux
c.. distributed computing
d.. embedded systems
e.. 32bit microprocessors closely coupled to fast processing logic
f.. testing and validation

(see website esgem.com)

but we also do testing of distributed systems and need a software engineer
with a numerate background and experience of data processing/visualisation
(ie with WAVE) and perhaps data mining. The post is to replace me who is
leaving for some overseas travel. My background is
Physics/Geophysics/Glaciology - so you don't have to be a total geek for
this one!

You can get more information from me and/or contact Stephen Maudsley direct
via the website with a resume.

Thanks for your time

Russ
Re: can i place a job advert [message #28136 is a reply to message #28134] Mon, 26 November 2001 04:48 Go to previous messageGo to next message
Robert Stockwell is currently offline  Robert Stockwell
Messages: 74
Registered: October 2001
Member
Pavel A. Romashkin wrote:

> Oh, I did not tell anybody. My own little program (Display) uses Common
> because, like you said, there's no other way to communicate a *totally*
> independent object in IDL.



I'm just mentioning this in lieu of getting real work done
this early in the morning, but I fake a singleton object in
IDL in the following way.

I use a system variable to hold the object, and in
a init procedure, I check to see if the sys var is
defined, and if not I define it. Of course, that merely
changes the line 'Common name,blah1 blah2' to 'initobject',
in each routine you use, but hey, its not a common block. :)

Cheers,
bob
Re: can i place a job advert [message #28139 is a reply to message #28134] Sun, 25 November 2001 18:29 Go to previous messageGo to next message
Bhautik Joshi is currently offline  Bhautik Joshi
Messages: 21
Registered: November 2001
Junior Member
> or will i get in trouble?
hehe well I managed to get a two-month overseas job via an advert posted
on this newsgroup so I personally don't see how its a bad thin :)

--
/--------------------------------------------------(__)----- ----\
| nbj@imag.wsahs.nsw.gov.au | phone: 0404032617 |..|--\ -moo |
| ICQ #: 2464537 | http://cow.mooh.org | |--| |
\--------------------------------------------------\OO/|| ------/
Re: can i place a job advert [message #28146 is a reply to message #28139] Fri, 23 November 2001 12:08 Go to previous messageGo to next message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
David Fanning wrote:
>
> Pavel, I *knew* you would spot that common block in
> MPI_PLOT! But, believe me, without a singleton object
> there is no other way. *Please* don't tell the rest of
> the newsgroup. My reputation will be completely ruined.

Oh, I did not tell anybody. My own little program (Display) uses Common
because, like you said, there's no other way to communicate a *totally*
independent object in IDL. Thus, my own posts from now on are going to
be totally depreciated.

Cheers,
Pavel

P.S. Do you think my last sentense will provoke an outburst of Singleton programs?..
Re: can i place a job advert [message #28147 is a reply to message #28146] Fri, 23 November 2001 10:59 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Pavel A. Romashkin (pavel.romashkin@noaa.gov) writes:

> Oh, people have done much worse things here and got away with it. Like
> admitting to using common blocks. Go ahead...

Pavel, I *knew* you would spot that common block in
MPI_PLOT! But, believe me, without a singleton object
there is no other way. *Please* don't tell the rest of
the newsgroup. My reputation will be completely ruined.

Completely in your hands,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: can i place a job advert [message #28148 is a reply to message #28147] Fri, 23 November 2001 11:22 Go to previous messageGo to next message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
Oh, people have done much worse things here and got away with it. Like
admitting to using common blocks. Go ahead...

Cheers,
Pavel

Russell Layberry wrote:
>
> or will i get in trouble?
>
> --
> Russ
Re: Commons, Was: can i place a job advert [message #28217 is a reply to message #28126] Mon, 26 November 2001 11:21 Go to previous message
Richard Younger is currently offline  Richard Younger
Messages: 43
Registered: November 2000
Member
Paul van Delst wrote:
>
> Well, my comment was meant to try to get those that swear profusely
> that common blocks are a Bad Thing to explain why. I place common
> blocks in the same category as GOTO statements - if used incorrectly
> they can lead to unbelievably bad source code that may or may not
> work.

Well, the snooty Computer Science answer to this is that common blocks
or global data completely separate the context of the data from its
content. Similarly, with GOTOs, it's easy to separate the context of
one snippet of code from another. When you have a global variable, you
(the indefinite you, which could actually include someone else :-) )
have no real idea what sort of code is using that data. I think the
idea of prohibiting them is to remove the chore and responsibility of
keeping track of the context from anyone else (or any other process of
yours) that wanders along. It's a Good Thing(tm) when the programming
system you use discourages methodologies that tend to cause confusion
and mistakes.

Admittedly, common blocks have some features apart from purely global
data that discourage errors. They have to be specifically invoked, can't
be resized (upwards), and usually IDL projects aren't so big that one
person can't keep track of a set of well controlled commons. The
examples given why commons in IDL specifically are bad seem to involve
doing multiple things at the same time, or with multiple copies of the
same program running.

For myself, I seem to get along nicely without commons. Instead, I
generally use objects, which can carry lots of data implicitly while
still keeping them in context for many routines. The only application I
have thought seriously about using common blocks is a global hardware
lock on some I/O hardware. Even then, I could use a file, since I don't
need to access the lock often. I don't do nearly as much heavy-duty
object graphics (I'm still in line to buy that book when it comes out,
David!) or widgeting as many on this group, though.

Mind you, I'm not supporting banning commons as dogma, but I think there
are enough general objections to them to ask people to think a bit
before they rush out and use them everywhere they can.

Best,
Rich

--
Richard Younger
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Capturing screen output
Next Topic: IDL 5.4 on Solaris? Please test

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:27:23 PDT 2025

Total time taken to generate the page: 0.00727 seconds