tylosaurus source code is here

13 views
Skip to first unread message

Dave Jordan

unread,
May 18, 2021, 2:41:07 AM5/18/21
to fltkg...@googlegroups.com

supposedly the above link will give you access to a folder on my google drive, where you will find a zip file.

the app is still very much a work in progress.

comments welcome.

-dave

Albrecht Schlosser

unread,
May 18, 2021, 10:24:34 AM5/18/21
to fltkg...@googlegroups.com
On 5/18/21 8:40 AM Dave Jordan wrote:

supposedly the above link will give you access to a folder on my google drive, where you will find a zip file.

Yep, but a strange way to download it. I actually had to use right-button-click and select "download". But anyway, got it.


the app is still very much a work in progress.

comments welcome.

All your (supposedly) text files are only links to your own home folder which is obviously not accessible.

$ file *.txt
tylo-games.txt:  broken symbolic link to /home/dave/progs/tylo/tylo-games.txt
tylo-misc.txt:   broken symbolic link to /home/dave/progs/tylo/tylo-misc.txt
tylo-opts.txt:   broken symbolic link to /home/dave/progs/tylo/tylo-opts.txt
tylo-tmplts.txt: broken symbolic link to /home/dave/progs/tylo/tylo-tmplts.txt

I took only a very quick glance at the source code: looks like you are using tab width 3 (is that correct?) and I see very strange code formatting ...

Dave Jordan

unread,
May 18, 2021, 11:26:57 AM5/18/21
to fltkg...@googlegroups.com
oops, yeah, i forgot about the links. fixing now.
can you be more specific about the strange formatting?

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/55c01eb5-b1ce-f938-eb9f-a344b455a127%40online.de.

Greg Ercolano

unread,
May 18, 2021, 1:48:34 PM5/18/21
to fltkg...@googlegroups.com

Dave Jordan wrote:

Albrecht wrote:
I took only a very quick glance at the source code: looks like you are using tab width 3 (is that correct?) and I see very strange code formatting ...
can you be more specific about the strange formatting?

    1. A tabstop of 3 is very odd.
    2. Even with the tabstop of 3 the code is a bit unusual.

    Configuring the editor to fold tabs into spaces is best, so that the code reads easily
    in any editor, and in diffs/patches/lp/more/etc, and avoids weird whitespace diffs when
    making changes. Prevents someone reading the code from having to guess your tabstop.

    Here's how the code looks in a default editor, more(1), printed to paper/converted to PDF,
    etc.  Hard to read, and I think few would guess a tabstop of 3:



    When the right tabstop of 3 is used, I'd agree with Albrecht, the code is still oddly formatted.

    While it's good that effort was made to keep all the comments flush right and aligned,
    having conditional code /also/ be indented far out to that comment column is confusing
    to the reader, making it hard to parse the code flow, causing the eye to have to zig-zag
    across the page to see if code or comments or both are in the far right column:



    In other words, it isn't expected code would be separated with so much horizontal white space.
    Even with syntax highlighting it's a bit of an effort to follow the code flow.
   
    This would be clearer to the reader and more standard:




    The reader expects the code to be indented flush left in a "stair-step" pattern
    as per the code flow, and only comments indented far out to the right.

Albrecht Schlosser

unread,
May 19, 2021, 6:44:27 AM5/19/21
to fltkg...@googlegroups.com
On 5/18/21 7:48 PM Greg Ercolano wrote:

Dave Jordan wrote:

Albrecht wrote:
I took only a very quick glance at the source code: looks like you are using tab width 3 (is that correct?) and I see very strange code formatting ...

I still didn't look closer at the code, being distracted by other stuff.

can you be more specific about the strange formatting?

    1. A tabstop of 3 is very odd.
    2. Even with the tabstop of 3 the code is a bit unusual.

    Here's how the code looks in a default editor, more(1), printed to paper/converted to PDF,
    etc.  Hard to read, and I think few would guess a tabstop of 3

That guessing was pure trial and error (8, 4, 2, 3!) with VS code that lets you easily change it (other editors will for sure do that too). The default "tab width guessing" mode of VS Code failed ("guessed" 8).


    When the right tabstop of 3 is used, I'd agree with Albrecht, the code is still oddly formatted.

[lots of good stuff elided]


    The reader expects the code to be indented flush left in a "stair-step" pattern
    as per the code flow, and only comments indented far out to the right.

Thanks, Greg, well put. I couldn't have said it better.

Reply all
Reply to author
Forward
0 new messages