Software design done right

Apr 18, 2006 15:51

Periodically, I have another go at using LaTeX to see if it's still as ghastly as I'd remembered. So far, my current attempt has gone on for longer than any of the others, and I haven't yet run screaming back to plain TeX. ( Rant about the evils of LaTeX )

computers, tex, maths

Leave a comment

pozorvlak April 25 2006, 12:14:24 UTC
First paragraph: good point about aspects and Java (Perl can support aspects too, by the way), but I don't agree with you about scientists and Fortran. That's just inertia and ignorance. Actually, I find it incredibly frustrating and depressing to watch all my numerical colleagues get sucked into Fortran - in many cases it's their first programming language, and it causes them huge amounts of unnecessary grief. In general, science seems to use computing paradigms that were abandoned years ago by industry: show me a scientist who uses a version control system, for instance, or even knows what one is :-(

I agree with you about rewriting (La)TeX from scratch. And about the picture placement. What I'd like to do, actually, is write a TeX-like language as an embedded DSL within (say) O'Caml, so you could take advantage of having an ACTUAL PROGRAMMING LANGUAGE around when writing extensions. A lot of the pain of extending TeX is down to the fact that it's based on macro-expansion, so you have no variable scoping or anything like that. If it were based on a less brain-dead paradigm, then implementing a constraint engine for picture placement ought to be slightly less ghastly than it is now, and you could do stuff like pretty printers for code with relative ease.

LyX is (sort of) a WYSIWYG interface for LaTeX, as is TeXmacs: I've tried LyX (and gave up on it quickly), but not TeXmacs. DocBook might be closer to what you want, but something about it makes me shudder. Verbosity, probably. Ask GDS, he's used it and likes it.

Perl syntax is too complicated, I completely agree. If I don't use a feature much, I end up looking it up every time - references are a major villain here (and why do we even need them? At least by default). I'd be interested to read your rant.

Reply

elvum April 25 2006, 12:24:12 UTC
show me a scientist who uses a version control system, for instance, or even knows what one is

http://savannah.cern.ch/

I definitely recognise the problem though. GDS and I were writing an internal memo on VCS before he left the department, in reaction to exactly that sentiment. :-)

The perl syntax rant would be hard to write due to my largely successful efforts to forget most of its horrors, but maybe I'll keep notes next time I have to write some...

Reply

pozorvlak April 25 2006, 13:49:24 UTC
Cool!

The other thought I have about VCS is that it would be very useful for collaborating on documents. Stick your TeX source in a VCS, and away you go... I'm using Darcs for a paper I'm writing atm, and it's been moderately helpful, but it would really come into its own if I had a collaborator.

Reply

Late to the party... pozorvlak May 2 2006, 21:19:17 UTC
"The other thought I have about VCS is that it would be very useful for collaborating on documents."

I was chatting to an accademic the other day who was so convinced of this fact, that she wrote a web front end to her subversion install, so that her less IT-literate collaborators could still use it to collaborate with her. They reacted very well to the experiment - productivity, as they say, is up.

LFM vs LFSP:

Those that know me will probably have guessed that I instinctively rail against the idea that there is a one dimensional "smartness" axis. Most of us on the net accept that a person can have characteristics which were once considered symtomatic of being "dumb" (an inability to catch sarcasm or irony, for example), while still being first class mathematicians. I believe that people are often different in more ways than is easily enumerable, and that this notion of a hierarchy of 1337ness in programming languages is likely not a useful one. Possibly actively damaging.

I note that my 2 favouriate languages for writing programmes are haskell and java. Haskell helps me to think in elegant ways about little, subtle things and java helps me to think in elegant ways about really big (and sometimes surprisingly subtle) things. I've written quite a lot of java, and never once thought "if I have to write one more while(iterator.hasNext()) I shall scream" - I think because I was always occupied by what was going on at the UML level at the time.

The accademic I mentioned earlier talked in that same conversation about what I shall call the religion of modularity. It's a religion that she takes care to propagate among her students, and it has many names. "the UNIX philosophy of small tools", "structured programming", "modular programming", "OOP", "AOP", etc. At the end of the day, it's all about doccumenting interfaces, and keeping all the little chunks between the interfaces small enough to fit in one head. All these programming paradigms (so she said) are tools for achieving that goal. I think I believe her.

A problem she noticed was that when she was teaching particularly "bright" students (especially in environments full of other particularly "bright" students - for some value of "bright" which is functionally defined on the task in hand), was that they could hold more in their heads than the national average. Getting them to write in units small enough to be maintainable by any programmer they were likely to work with in a future career could be a real challenge.

Perhaps an LFSP - or at least the impression of one - gives us the excuse we need to do just that? To exercise the mind by writing as abstractly as possible, or in as few as possible lines, or as CPU or MEM-effeciently as possible, or whatever? Because writing it the obvious way is just far too dull....

If that's the attraction, then perhaps all languages are LFSPs - you just have to find the metric to brace your mind against when you're writing in it.

Perhaps the world would be a safer place if we took hourly 5 minute perl-golf/ioccc/icfp-programming-contest/whatever breaks from our nuclear coolant system jobs?

--gds

Reply


Leave a comment

Up