[OT] driver's license exam app?

[OT] driver's license exam app?

Daniel Shahaf d.s at daniel.shahaf.name
Sun Aug 23 11:18:56 IDT 2015


Omer Zak wrote on Fri, Aug 21, 2015 at 07:51:51 +0300:
> Hello Daniel,
> Three years ago, I developed an Android application which does the same
> thing [1].
> 
> I hoped to get more volunteers to polish and improve it, however there
> was very little interest in it.

Haven't seen it, but in my case I needed a desktop app, not a smartphone one.

> Nevertheless, it was a good way to tell the world that yes, I am an
> Android developer.  I got other projects thanks to it (such as [2]).
> 
> So I suggest that you release your application but without expecting
> anything from it beyond being a showcase of your software development
> skills.

That's good advice.

However, I don't think the code showcases anything: it's a chunk of glue
code that any first-year student could write.  It saves time but is not
enlightening to read.  The only value I see in it is that it might save
someone else the need to redo the work I have done.

> While you are it, I strongly urge you to split off the part of the code,
> which deals with Hebrew terminals, and make it a library that people can
> take and use in their own projects. Maybe you'll be able to contribute
> to terminfo/ncurses projects.

All I have is a chunk of code that decides whether or not to insert
fribidi into the output filter chain based on whether 
$(ps -o comm= -p $(xprop -id $WINDOWID _NET_WM_PID | sed 's/.*= *//g'))
contains "mlterm" or "konsole".

While that chunk of code does solve a problem that is in scope for
ncurses, I believe the approach it takes is unsuitable for inclusion
therein, for several reasons: (a) it would require ncurses to link
libx11 (to get window properties); (b) it hardcodes terminal names that
behave differently — that is a duct-tape solution, not a long-term one;
(c) it is sometimes wrong: konsole can be configured to behave either
way, but the code hardcodes a specific behaviour for it.

In short, what I have is a duct-tape solution, not a long-term one.
That was fine for the context I wrote it in (I needed to get my app to
work in today's terminal emulators without changing them), but it's not
suitable for upstreaming.  The proper long-term fix would be either to
make terminal emulators all behave the same way with respect to
directionality, or to invent a terminfo capability that terminals would
set in their terminfo descriptors and ncurses could query.

Cheers,

Daniel

> --- Omer
> 
> 
> 
> [1] https://github.com/Hamakor/teuria
> [2]
> https://play.google.com/store/apps/details?id=com.heliconbooks.epub.epubreader
> 
> 
> On Fri, 2015-08-21 at 01:24 +0000, Daniel Shahaf wrote:
> > I've got here a desktop app that quizzes the user with questions from
>  <מבחן התיאוריה (the one people take when they learn driving).  It's
> > basically a self-test/study app, using the questionset from the
> > Ministry's web site.  (They publish questionsets in six languages,
> > I only tried the Hebrew set.)
> > 
> > By "app" I mean a python script that prints questions to stdout, reads
> > answers from stdin, and displays images by invoking display(1) [a
> > minimal image viewer from imagemagick].  It doesn't have a GUI (beyond
> > the image displayer) since my target audience didn't need one.
> > 
> > I can't release it as-is because $LEGAL_REASONS, but I could clean it up
> > to make it releaseable.  Before I spend too much time on that, is that
> > something anybody would be interested in?
> > 
> > [feel free to reply offlist]
> > 
> > Cheers,
> > 
> > Daniel
> > 
> > P.S. It wasn't fun to get Hebrew to print correctly on all terminals:
> > there are differently-behaving terminals that use the same value of
> > $TERM (undermining terminfo-based solutions).  I ended up using
> > $WINDOWID to get the terminal emulator's argv[0], and hardcoding
> > exceptions based on that.  That's so 1990...
> -- 
> QA People of Curse.
> My own blog is at http://www.zak.co.il/tddpirate/
> 
> My opinions, as expressed in this E-mail message, are mine alone.
> They do not represent the official policy of any organization with which
> I may be affiliated in any way.
> WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html
> 
> 
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il



More information about the Linux-il mailing list