[om-list] Column Count in Code

luke call luke350 at onemodel.org
Tue Apr 26 12:00:50 EDT 2016


On 04/26/16 09:34, burundanga at gmx.com wrote:
> At least in Entity.scala it seems like lines are wrapped at 160 characters, with any lines that go past this getting indented between 14x to 16x the normal indent. I'm assuming this variance is due to sloppiness and not design, which I'm not judging at all; we've all written sloppy code. But if I were going to make the indentation consistent across the codebase, what stylistic standard would this project aspire to? Semi-separate question: how would Good King Call feel about wrapping lines at 80 characters instead of 160?

That's funny.

Except in windows (where I don't know how, though I saw a recent 
headling that MS might have added a related feature to one of their 
kinds of console), OM tries to judge the terminal width and truncate 
there.  On windows it gives up and says "93" or such.

Yes, there is some, but any sloppy code should be 1) avoided but keeping 
priorities in mind, *and* (not or) 2) justified with a good reason a 
commented explanation).

I chose 160 because in theory it is a *name*, and text attributes should 
be used for longer stuff, and I liked that width on my own screen.  But 
it might be better to make it a user preference now the enabling code is 
there.

It currently truncates instead of wrapping, because
   1) wrapping seemed ugly,
   2) I wanted to see beginnings of more lines more than the entirety of 
fewer lines (really for speed of getting the "gist" of an entity's 
attributes+relations, since a single keystroke shows the rest of any 
given line when needed).

But probably that could be overriden with a user preference also.

I mention, to save time, the comments in
   https://github.com/onemodel/onemodel/blob/master/CONTRIBUTING
...where I tried to make each part either as brief as I could, OR 
skimmable (ie, read 1st sentences, caps or bullets...), with 
explanations of reasoning.  Naively no lawyers, so far; point out risks 
you see, if you like.

I am thrilled that someone besides me is in the code now, even if just a 
little.

There's more code related to this, in Controller (see refs to jline, 
terminal, ...), and maybe in TextUI (similar search).  If it's in 
Entity, that does seem sloppy.

-Luke

-- 
Luke A. Call
--------------------------------------
- Knowledge management consulting: inquire.  (Also for Free software & 
software dev. process.)
- A Free, fast personal organizer for touch typists:  if you ever liked 
to-do list programs, mind maps, collapsible outlines, or emacs org-mode, 
you might love this: http://www.onemodel.org (no mobile support yet).
- Things I'd like to say to more people: 
http://www.onemodel.org/1/e-9223372036854618449.html .


More information about the om-list mailing list