Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #38604

Re: Displaying a ragged array

From Martin Gregorie <martin@mydomain.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Displaying a ragged array
Date 2018-09-19 19:29 +0000
Organization albasani.net
Message-ID <pnu82h$skk$1@news.albasani.net> (permalink)
References (3 earlier) <pnp6d1$vj6$1@dont-email.me> <pnpe6d$ivs$1@news.albasani.net> <pntsi7$t5j$1@dont-email.me> <pnu278$1o1$1@news.albasani.net> <pnu4b1$qao$1@dont-email.me>

Show all headers | View raw


On Wed, 19 Sep 2018 14:25:36 -0400, Eric Sosman wrote:

> It might be better to teach the users how to use a spreadsheet in a
> mode that isn't "helpful."
>
That's not an issue: the Roster Manager, thats me currently, is the only 
person who uses the roster setup program and, as I said, that only done 
every six months and takes more than a day but less than a week to do. 
Once the rosters are built they get uploaded to our webserver which does 
everything else: displays rosters, sends reminders of upcoming duties and 
has a swaps tool for dealing with cases when a member can't do a 
scheduled duty due to illness, family commitments, work, etc.

Learning to set up the rosters is quite a big deal (there are 
manuals...). The reason I built my rostering program is because my 
predecessor did it with a giant spreadsheet (8 large interconnected 
worksheets that needed to be edited before each season to adjust each 
roster page for the number of rosterees and days in the season before it 
could be used, IOW almost unmaintainable by anybody except its author. 

I replaced it with a Java program that has a very similar user interface. 
That was pretty good on the original, both to use and in the way its 
presented data it its user. My tool configures itself automatically when 
it sucks in the static data: lists of members, their availability 
patterns, preferences and new season's calendar. I'm pleased with the 
result: its easy to use, fast enough and also automates several 
crosschecks, duty spreading rules etc. that were purely manual tasks with 
the spreadsheet.

> If you're in an environment where the users can't be taught (maybe
> they're downloaders unknown to you, maybe they're just dense), then
> you'll be in the unpleasant position of offering them Yet Another Editor
> Interface To Learn Unaided, and they'll be in the unpleasant position of
> Struggling With An Editor Less Powerful Than Their Favorite.
>
I think its a safe bet that anybody like that won't take on being Roster 
Manager in the first place: apart from having to get used to the 
rostering process, which is much harder IME than than using any rostering 
tool such as my RosterEdit, they'll also be faced with downloading member 
details and their availability & preferences data from the website and 
uploading the completed rosters. 

Both the downloads and uploads are screen scraping cut 'n paste 
operations via a simple transfer program (also Java) that I wrote to make 
that as fast and simple as possible: it just converts the websites' TAB 
delimited CSV formats to comma delimited files when I pull stuff off the 
website and does the opposite when uploading completed rosters for 
publication. The previous incumbent just cut 'n pasted directly into and 
from his spreadsheet.

In any case, once somebody else gets lumbered with the Roster Manager 
job, I'll pass over this CSV editor (always assuming that I think its any 
good when its built - it may not be) but I won't really care if they use 
that, a spreadsheet, or their favourite text editor if they have to tweak 
any of the files used or output by RosterEdit.

> Store the data as actual spreadsheet files -- as
> .ods rather than as .csv, for LibreOffice.  That way you can set up the
> proper formatting (all "Text," most likely) to begin with, and the
> spreadsheet will remember it and preserve it each time it's opened. Java
> tools for reading and writing ODF exist (I know of jOpenDocument and
> ODFDOM, although the freely-available documentation isn't great), or you
> can even use UNO to control a running LibreOffice instance from Java.  I
> found the official ODF spec rather daunting and gave up trying to read
> it; nonetheless I was able to reverse-engineer enough of the format to
> load simple .ods spreadsheets.  Unsupported code available on request.
>
Could be done: an interesting thought, though probably not worth the 
effort to change my code now its been settled down and stable for the 
last couple of years. 

Using CSV was a no-brainer since the import/export formats used by the 
website were already CSV and I already had a decent, well-tested CSV file 
i/o class when  I started work on the rostering system.  In any case the 
extra complexity may make the load/save operations somewhat slow. I 
prefer comma separators to TABs because I find those easier to read and 
manipulate during development and trouble-shooting, but that's trivia.

BTW, I'm surprised there isn't a CSV file handling class in the Java 
standard library.


-- 
Martin    | martin at
Gregorie  | gregorie dot org

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-16 22:17 +0000
  Re: Displaying a ragged array Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-09-17 16:00 +0200
    Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-17 19:32 +0000
      Re: Displaying a ragged array Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-09-17 23:29 +0200
        Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-17 23:43 +0000
          Re: Displaying a ragged array Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-09-19 18:12 +0200
            Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-19 17:49 +0000
              Re: Displaying a ragged array Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-09-19 14:25 -0400
                Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-19 19:29 +0000
                Re: Displaying a ragged array Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-09-20 15:30 +0200
                Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-20 15:06 +0000
              Re: Displaying a ragged array Eric Douglas <e.d.programmer@gmail.com> - 2018-09-24 08:11 -0700
                Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-24 17:52 +0000
                Re: Displaying a ragged array Eric Douglas <e.d.programmer@gmail.com> - 2018-09-24 12:01 -0700
                Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-10-23 21:00 +0000
  Re: Displaying a ragged array Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-09-17 10:17 -0400
    Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-17 19:46 +0000
      Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-17 23:53 +0000

csiph-web