Re: Great SWT Program
- From: blmblm@xxxxxxxxxxxxx <blmblm@xxxxxxxxxxxxx>
- Date: 19 Nov 2007 11:33:03 GMT
In article <e35e981f-f545-468a-a84c-f22e84e66f30@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
<twerpinator@xxxxxxxxx> wrote:
On Nov 16, 7:58 am, blm...@xxxxxxxxxxxxx <blm...@xxxxxxxxxxxxx> wrote:
One of the things I most resent about Word, though, is -- and it
seems to me that this rather goes against what you've been claiming
about GUI tools putting everything out in plain sight -- that it's
very difficult to expose the logical structure of the document [*].
That's because it's a WYSIWYG word processor. It doesn't HAVE a
logical structure to the document.
Styles don't exist / don't count?
What's under the hood is probably
akin to tag soup, the poor unstructured quasi-HTML of the early days
of the public Web.
I didn't claim Word was a great word processor. WordPerfect is better
(and has a command to toggle display of markup, as I recall). For
something where you're really concerned to work on the logical
structure, you may want something TeX-based instead of WYSIWYG.
(MiKTeX is a good choice of backend for Windoze; its previewer is a
particularly nice one. Add a decent text editor,
Such as emacs with AucTeX? Sorry, couldn't resist.
a copy of lshort.pdf,
and a Firefox tab parked on Google, and you're good to go.)
And yet I seem to remember your saying, a while back in
comp.text.tex, that this way of working was somehow clunky or
bad -- something about not being able to easily have lshort.pdf
visible at the same time as the text being edited. I guess I'm
misremembering.
[ snip ]
You mentioned (in another subthread) having to get out
the manual to write a shell script, oops, .bat file. I rarely
have to consult the documentation for my shell of choice.
That seems strange. Do you also rarely need to consult the Javadoc on
the lawyerly details of what some library call will do? Perhaps you
just don't code anything very ambitious, or go outside a very small
core set of commands much.
Could be. It could also be that, having worked with these tools
for a couple of decades, the set of things I know how to do with
them is fairly large.
Any time I need a loop in a script I find myself reaching for the
syntax help, because it isn't very simple to do in any shell language
unlike Java's for and while syntax. Particularly the hairy syntax (and
different for every shell and each OS!) for local variables,
arguments, and other such variables is a pain to cope with and
requires referring to the documentation to disentangle. There's also
no simple notion of an Iterable or a Collection or integers, so much
as separate things for looping over files or directories (with arcane
options to look up for the particular combination of directories,
normal files, hidden files, system files, hidden system files, etc.
that you want it to skip; on the unix side you can add, at minimum,
device files and soft symlinks), over strings, over numbers ... and no
Integer.valueOf() or toString() type stuff.
Huh. I use "for" loops in my current shell of choice (bash) often
enough to find the syntax straightforward:
for <loop-variable> in <list-of-items>
do
<list of loop-body-commands>
done
where <list-of-items> is typically generated using another command,
or using the shell's filename "globbing" (wildcard expansion).
If <list-of-items> is meant to be a list of integer values, yeah,
that might not be straightforward in some Unix-like systems. Linux
has a "seq" command. OS X seems not to have that. <shrug>
Most of what you want to
do requires launching an external command to massage some data, such
as to parse an integer out of a string, and there's never a handy and
easy to browse command reference listing all of these; instead it's
man this, man that until man <name of some binary from ls /bin> turns
out to describe something that fits the bill. This may have something
to do with the lack of a) a comprehensive how-to-oriented part of the
help; b) an index (other than ls /bin's output!); c) hyperlinks; and
d) better organized, descriptive command names.
All problems for beginners. Not so much for experienced users.
:P MS-DOS is if
anything even worse here due to the relative paucity of those helper
commands, and a particularly hairy syntax for distinguishing variables
of different scope and applicability. Writing a script to strip the
first six characters off every file name in a directory took half an
hour or more with frequent use of Google recently. And that's just a
single for loop, some simple string manipulation, and a rename
command, without nesting. (One of the hairier bits was getting it to
correctly use paths where needed, but cut the six characters off only
the filename part and then glue the rest of the path back onto the
rear; very easy to do in Java with
String.lastIndexOf('/'), .substring(foo), and the + operator, by
contrast.
Ah, a challenge .... In bash, something like this maybe:
for f in <directory>/*;
do
b=`basename $f`
d=`dirname $f`
n=`echo $b | sed s/^......//`
mv $d/$b $d/$n
done
Five minutes, no perusing of man pages required. Would a beginner
be able to do that? Probably not.
Huh. A lot of what I do involves preparing various kinds of
documents -- "slides" for classes/talks, homework assignments,
research papers .... mostly non-code, and rarely do I have to
start completely from scratch.
Slides obviously can't be edited in vi, though. Unless you're going to
tell me it has circle, line, polygon etc. commands and ways to choose
various shading options ... all of it done blind, of course, so you
type it all in (type! All kinds of geometry stuff! Ouch!) and run the
output through some kind of presentation software and pray. And then
go and rewrite half of it. And then do it all again. And again. AND
AGAIN. :P
Well, the "slides" in question are usually text only, made with
LaTeX. Figures take long enough to draw (in any tool I've used)
that for lectures I usually don't bother; easier to draw them at
the whiteboard on the spot.
Thinking back, though .... Yeah,
when I made a living writing code, mostly what I was writing
*was* code. I'm not sure it would have been obvious to me back
then -- well, I probably didn't think much at all about what might
be involved in an academic job. Hard to say.
This begets another theory on the search vs. scroll thing. Search is
more likely to be helpful with code. And all that code writing might
have caused you to develop habits leading to your writing English
prose in a very artificially consistent sort of way, with the same
synonym chosen consistently for various things, and various consistent
organizational principles, that make *the specific prose that you
write* more amenable to search-based navigation/remembering what text
is at a given place than "normal" prose.
I guess it's possible. Of course, I had been writing prose
for many years before I wrote my first piece of computer code.
I suppose it's possible I changed my writing habits when I
started writing prose with a text editor and do now write in an
"artificially consistent sort of way" without being aware of it.
Or it could be that I'm just more apt to remember *how* I said
something than *where* I said it.
--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
.
- Follow-Ups:
- Re: Great SWT Program
- From: twerpinator
- Re: Great SWT Program
- References:
- Re: Great SWT Program
- From: nebulous99
- Re: Great SWT Program
- From: blmblm
- Re: Great SWT Program
- From: twerpinator
- Re: Great SWT Program
- Prev by Date: Re: Great SWT Program
- Next by Date: Re: Great SWT Program
- Previous by thread: Re: Great SWT Program
- Next by thread: Re: Great SWT Program
- Index(es):
Relevant Pages
|