Skip to main content
news

Re: spreadsheet ergonomics

owl
SubjectRe: spreadsheet ergonomics
Fromowl
Date2017-04-03 06:12 (2017-04-03 04:12)
Message-ID<z9b003gaew.hy@rooftop.invalid>
Client
Newsgroupscomp.os.linux.advocacy
FollowsSnit
Followupsowl (40m)
Snit (13h & 40m) > owl

Snit <usenet@gallopinginsanity.com>wrote:

Snit
On 4/2/17, 6:46 PM, in article hvjjz003.gah@rooftop.invalid, "owl" <owl@rooftop.invalid>wrote:

owl
Snit <usenet@gallopinginsanity.com>wrote:

Snit
On 4/2/17, 5:14 PM, in article ykahvj003ta.yr@rooftop.invalid, "owl" <owl@rooftop.invalid>wrote:

...

Ok, the looping in the background is clearly kludgy.

owl
It's not a kludge. It's the way it works.

Snit
Except as you note, it does not auto-update without you writing such scripts and then you see flashing on the screen.

owl
The "flashing" is not an artifact, but a message notifying you that it's running an external script. I'm not sure that you can turn that off.

Snit
Right... it is flashing and jumping up and down screaming for attention even when you are NOT updating data. That is worse than the damned Mac dock icons which can jump up and down.

Can you even go from table to table and modify them without starting and stopping scripts?

owl
Yes. You can click the menu on the xterm and uncheck "Allow SendEvents" when you need to edit the sheet. Then turn them back on when you're done.

Snit
But you do not consider this to be a kludgy work-around?

owl
No, that's setting it back to default mode, which has "Allow SendEvents" turned off.

Snit
I mean turning it on and off just to work with tables.

You don't have to turn it on at all. That's just to have the data in one table update automatically from changes in another table. If you don't need that, the just move your mouse to the target table and type "@" or enter some data into any cell. The external data will then be automatically calculated.

I mean, really, tables should just have the data flow. For older spreadsheets, like back in the Apple IIe days, you had to say update -- but now it just happens.

It does update automatically, if you're *in* that sheet. And remember, this is something that you said is not even possible with Numbers -- updating a sheet with data from a completely separate file.

This turning on and off is because it's xterm. It is left of by default for security reasons. It cannot be programmatically be turned on. I showed last year hacking the xterm source code to allow for SendEvents to be turned on by default. Not all terminals need this. I just like the flexibility that xterm gives you in other areas so that's what I use. Mate-terminal for instance allows SendEvents by default, so that could be used. I just tried it, and it works fine for updating the sheet.

If you goof and make a circle it tells you immediately (does yours even do that).

Huh? What do you mean by "a circle"?

<https://youtu.be/wiRBQDhanC0>

Will show other info on other errors. You can see the results of that on the shared copy... no added work from me.

I will say I tried it online and while you can enter formulas you cannot do it with point and click with kinda sucks. That makes it MUCH easier to do.

You also cannot play embedded videos. OK, sure, that is an odd thing to do with a spreadsheet but they do play on the desktop version.

I might be able do that, depending on the video player.

...

owl
All of that can be scripted so it is transparent. What do you think is happening behind the scenes within a docx file?

Snit
The point is one you have to script and set up and have as multiple files and assume a pretty high level of knowledge on the part of the recipient and an even higher level of knowledge from the developer... NONE of it dealing with actually just putting numbers and formulas and charts into a spreadsheet.

owl
You said you didn't care what is happening behind the scenes -- just the presentation.

Snit
Right... I care about what the user has to do. I do not care if it is REALLY saved in one file or 100 as long as to the users working with it the data is in one APPARENT file (and even then if there is something just as simple I would be fine with that).

The point is to focus on the task (working with a simple spreadsheet) and not on scripting and fiddling and other stuff. AGAIN, not that there are not absolutely times when such things can offer benefits... but when the the work is just the spreadsheet you should not have to do stuff outside of that (again, not counting basics you need to do to do pretty much ANYTHING on a computer).

You have to fiddle with a bunch of externals and not just focus on the work. What I am showing you is focusing on (pretty much) just the work. It is true the person needs to know the basics of how to turn their computer on, use a mouse and keyboard (or use the either one to emulate the other, basically), etc. But all very basic things.

owl
So Numbers has no learning curve. Why were you having to "help" those kids again?

Snit
It has a much lower learning curve than what you are describing. Most of this they figured out on their own. I did show them some examples and answer some questions along the way... but even those were focused on the direct tasks (building the spreadsheet... they did not think of the idea of having blue being a sign of what SHOULD be edited (but they figured out how to do it on their own), they were a bit confused with the options for sharing online (and those have since changed to be easier), and they wanted help annotating a related PDF of a recipe. Oh. Wait. Not that last part... just seeing if you were still reading. :)

But, as I have said, with Numbers you need an Apple made OS (the program comes with it, I think). So that is a pretty big hurdle to jump.

Really comes down to from the user perspective is it one item they are dealing with or multiple?

owl
As I said, it can be made to appear to be a single item.

Snit
Can you show this single item? I will happily double click it on a Linux VM and we shall see if it is as easy as the simple URL I provided you (which you can use to download the file, too).

owl
I'll put something together.

Snit
Also, with yours, will I need to give it special permissions?

You will need to make it executable:

chmod 755 thescript

Then run it in a terminal with

./thescript

Kill it with Ctrl-C, which I trap, and it will give you a prompt to save the changes and rebuild the file. Everything will then be cleaned up and you will be left with just the one file, now with the changes remembered .

The code is at the bottom of this post.

It only presents two windows, main and otherin1. Hit ctrl-left-click on the xterm window and check Allow SendEvents. Saving is done with "P".

When you're done, hit "q" on each window, then Ctrl-C in the terminal where it was started, which will now be scrolling with error messages because xdotool cannot find the windows that you destroyed. It will then present you with the option to save the changes you may have made. Hitting "y" will save rebuild the script with a new tarball enclosed that holds the changes. It will then clean up all the files and the directory, leaving you with just the script once again.

If so, well, fine to do in a VM but I would not do it on a system I cared about. Heck, look at your attempt to rename an open file... yes, *I* knew it was going to lead to disaster but most people would have no clue and there are lots of things you could add -- on purpose or not -- which I would not know would lead to disaster.

LOL

...

Right... all sorts of scripting and working with multiple files. That is what I am talking about.

owl
You have a primitive view of what scripting can do.

Snit
Could be... but how do you think that is relevant? Keep in mind I am talking about how these things are done -- focusing on the tool itself (the spreadsheet) or focusing on all sorts of external things such as scripts and working with multiple files, etc.

owl
The user needn't notice that it's multiple files.

Snit
Even the user making it?

Picture this as the application that the user runs to make the file. In this case it's just operating on one that's already built, but the principal is the same.

If so that is very different than what I am picturing. Even for the end user I think they likely would if you did not have embedded xterms in other windows and the like. Which, sure, you can do. Maybe we found a reason for it ... to get around limitations of sc. :)

Let me know when Numbers can handle a similar task of linking separate files with automatic updates.

-------------------- begin thescript -------------------- #!/bin/bash

trap cleanup SIGINT

repackage () { echo "repackaging..." csplit thescript /^################SPLIT###################/1 {*} cp xx00 top cp xx02 bottom rm adir.tar.gz tar cf adir.tar adir gzip adir.tar uuencode adir.tar.gz adir.tar.gz >mid echo "################SPLIT###################" >>mid cp top tmpscript echo "uudecode <<'EOF'" >>tmpscript grep -v SPLIT mid >>tmpscript echo "EOF" >>tmpscript echo "################SPLIT###################" >>tmpscript cat bottom >>tmpscript cp tmpscript thescript }

cleanup () { killall -9 xdotool echo echo echo "**** would be doing repackaging of saved files here ****" echo echo -n "repackage saved data? [y/n]: " read answer if [ "${answer}" = "y" ];then repackage fi echo echo "**** cleaning up ****" echo echo rm top rm mid rm bottom rm update rm -rf adir rm adir.tar.gz rm tmpscript rm xx00 rm xx01 rm xx02 }

################SPLIT################### uudecode <<'EOF' begin 644 adir.tar.gz M'XL("#S"X5@``V%D:7(N=&%R`.V:46_B.!#'>>93C-B';777DK$30EGMJD#+ MZ:135[KKZ;2/:3`0;4A6B;/=ONQG/SMQ(,#V`.E"83L_B4[MQ!YCY^_,)'CC M(&DWZL52N(ZC+;J.5;4E#>26:W';<ES6L-"R[4X#G)K'E9.ETDL`&EX41_]U MWK;C)XJGUS^6,Y'$F>27J5^##[W`'=M^=OT=5JX_.HAZ_9F+:OVM&L:RP2M? M_S=P/PM2&'O2@TD0"GCT4IB*2"2>%&-X>`)U;<!?7Q+AC=.9$!*&7NAGH2?C MY++Y!C[%&7CA/$XE^"*17A"%3Y#.XBP<1V\EB'$@(9"7S6:JFD;97"2!#^*; MG&01^(GGRR".X#T@^'$8)\5?D23-29S,/0E]X!8PL,KR`!#S<G$ZJJ;7#Z'G M?WYW_23",'YLAF(B4YD$T10&ECK<2F4VF;14O6J-'=T@S>9G`^P-T#E?.9UU M]?GO]Z75G,8RAH$#?:OYTNNY+TO]!Q&K1_[;]:_$OM"_E>M?;PFD_P-P>OIG MS^C??_*B%U0_.T7U&_W/U;+5I'W-%OUS1+N,_]#2]8@NDOX/PM'KGV%5_S?0 MK19O`?DSV\$T$2(R];Q2_S@+I##U?>SUF0MHBGI7J!2'V!OBHC3"WHB#79;< MWN@*G,6Q3D]]@#>38#HK=Y1^O@'=B-1/@B_Z>[96#A?[T^]WJ[7#O/;CW_>K MU:.B6M^G5P_<ZN_<*@-X+':Z43X1J8RCLVLUUV>MU(>+?Q[4*-4'+MLK03\J MY0/[T!Z+K^TH"\/6K];Y^:H/5O7!C`^VAP^VW0>O^N#&!]_#!_^AC\H.WW>T M"VPS\-6%G(J'+)EN3*=3'8:,I1F(4]XY\LM@;>CNHDT0E2O@[CIRU63[Y'0K M'LKY[^[N88?IOZIX*&?_:G<//Y[\U0L5*RZ6,XNXF%JMJ?5&MFXDU195::'K MU,W\8HB=M;.7JU<Y75<J-Q<CY_DP0&UKR^I<^,[Z2/3AUF]_]N]NX/[C??^/ MLOM.WKW]BW+T_\038>Q_UL%$;@?&#HV],?;6V%%IT5AF+#?6-M8QMF.L:VS7 MV*NRGT6'98]8=HFF3S6#9E#JGR+Z03W0E[Z7$?NSOA'5X6/W_$_%?S8O\C]& M\=\A./KX[U3R/SS]_.][33ZVYG^<+?7/.EK_B$CZ/P1'KW_*_S;ROV(ST[.F MU$/9(&6#E`U2-GA,V2"C;/!4V-B8:_"QU_M_;M[_NQ3_'8*CC_]VSO]>_/W_ M2;X!W`C^:O"QG_ZM0O\VZ?\0D/Y?]Q.@]=2CCF=`6_7/*\]_E?"U_NGW/X?A MY]'_#L]_S2,3RZ)HH&0];:_#QWZ__W.*]S]T_S\(KTK_=>J=GX;>"8(@"((@ <"((@"((@"((@"((@"((@B)^3?P&"A+'=`%`````` ` end EOF ################SPLIT###################

tar zxf adir.tar.gz xterm -title main.sc -geometry 80x24+200+200 -e "sc ./adir/main.sc" & xterm -title otherin1.sc -geometry 80x24+400+400 -e "sc ./adir/otherin1.sc" & sleep 3 windowid=$(xwininfo -tree -root |grep main.sc |awk '{print $1}')

cat <<EOF >update while [ 1 ];do xdotool type --window ${windowid} "@" sleep 1 done EOF chmod 755 update

./update

-------------------- end thescript --------------------

owl (40m)
Snit (13h & 40m) > owl