Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile to Improve the Dvorak Layout?

2011-06-13 Thread Elena
On 13 Giu, 06:30, Tim Roberts  wrote:
> Studies have shown that even a
> strictly alphabetical layout works perfectly well, once the typist is
> acclimated.

Once the user is acclimated to move her hands much  more (about 40%
more for Qwerty versus Dvorak), that is.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile to Improve the Dvorak Layout?

2011-06-13 Thread Elena
On 13 Giu, 15:19, Steven D'Aprano  wrote:
> On Mon, 13 Jun 2011 00:21:53 -0700, Elena wrote:
> > On 13 Giu, 06:30, Tim Roberts  wrote:
> >> Studies have shown that even a
> >> strictly alphabetical layout works perfectly well, once the typist is
> >> acclimated.
>
> > Once the user is acclimated to move her hands much  more (about 40% more
> > for Qwerty versus Dvorak), that is.
>
> The actual physical cost of typing is a small part of coding.
> Productivity-wise, optimizing the distance your hands move is worthwhile
> for typists who do nothing but type, e.g. if you spend their day
> mechanically copying text or doing data entry, then increasing your
> typing speed from 30 words per minute (the average for untrained computer
> users) to 90 wpm (the average for typists) means your productivity
> increases by 200% (three times more work done).
>
> I don't know if there are any studies that indicate how much of a
> programmer's work is actual mechanical typing but I'd be surprised if it
> were as much as 20% of the work day. The rest of the time being thinking,
> planning, debugging, communicating with customers or managers, reading
> documentation, testing, committing code, sketching data schemas on the
> whiteboard ... to say nothing of the dreaded strategy meetings.
>
> And even in that 20% of the time when you are actively typing code,
> you're not merely transcribing written text but writing new code, and
> active composition is well known to slow down typing speed compared to
> transcribing. You might hit 90 wpm in the typing test, but when writing
> code you're probably typing at 50 wpm with the occasional full speed
> burst.
>
> So going from a top speed (measured when transcribing text) of 30 wpm to
> 90 wpm sounds good on your CV, but in practice the difference in
> productivity is probably tiny. Oh, and if typing faster just means you
> make more typos in less time, then the productivity increase is
> *negative*.
>
> Keyboard optimizations, I believe, are almost certainly a conceit. If
> they really were that good an optimization, they would be used when
> typing speed is a premium. The difference between an average data entry
> operator at 90 wpm and a fast one at 150 wpm is worth real money. If
> Dvorak and other optimized keyboards were really that much better, they
> would be in far more common use. Where speed really is vital, such as for
> court stenographers, special mechanical shorthand machines such as
> stenotypes are used, costing thousands of dollars but allowing the typist
> to reach speeds of over 300 wpm.
>
> Even if we accept that Dvorak is an optimization, it's a micro-
> optimization. And like most optimizations, there is a very real risk that
> it is actually a pessimation: if it takes you three months to get back up
> to speed on a new keyboard layout, you potentially may never make back
> that lost time in your entire programming career.
>
> --
> Steven

I don't buy into this.  For one, could you possibly lose so much time
while learning a new layout, time you won't recover in an entire
career, if entering text were such a little time consuming task of
yours?

In my experience, an inefficient layout would disrupt my flow of
thought whenever I would sit at the keyboard and type something.
That's the reason I use a Vim-like editor, as well.

Sure, better is worse, once you push beyond a certain limit, and
that's exactly what Xah was talking about.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile to Improve the Dvorak Layout?

2011-06-14 Thread Elena
On 13 Giu, 11:22, Chris Angelico  wrote:
> On Mon, Jun 13, 2011 at 6:42 PM, Yang Ha Nguyen  wrote:
>
> > Could you show which studies?  Do they do research just about habit or
> > other elements (e.g. movement rates, comfortablility, ...) as well?
> > Have they ever heard of RSI because of repetitive movements?
>
> And did any of the studies take into account the fact that a lot of
> computer users - in all but the purest data entry tasks - will use a
> mouse as well as a keyboard? The classic "grasp mouse" sitting to the
> right of the keyboard mandates either a one-handed typing style (left
> hand on keyboard, right hand on mouse) or constant re-aiming and
> re-grasping. Or you can use a touchpad; what are the consequences of
> that on typing speed? And my personal favorite, the IBM TrackPoint - a
> stick mouse between the G/H/B keys, a design which other manufacturers
> have since copied (although IMHO the IBM/Lenovo type still beats the
> others hands down) - keep your hands where you want them and just
> reach out to grab the mouse with your index finger, or slide your
> fingers one key over (works fine if you're used to it).
>
> Typing speed depends on a lot more than just your layout, and it's
> going to be nearly impossible to narrow it down viably.
>
> Chris Angelico

Moreover, I've seen people move the mouse faster than I could achieve
the same task by keyboard.

To me, the advantage of ergonomic layout is not about speed - I'm sure
there will always be people able to type blazingly fast on any random
layout - but about comfort.  Even when typing slowly, I don't want my
fingers and my hands neither moving much more nor contorting much more
than necessary.
-- 
http://mail.python.org/mailman/listinfo/python-list


Help with research

2005-02-17 Thread elena
Apologies for this off-topic post.

I'm a Java/C++ developer who is also studying psychology.

I would really appreciate it if you would complete a survey that I'm
using for a research project on programmers.

It's easy [Yes/No answers] and takes about 5 minutes.

I will be presenting the results at the American Psychological
Association convention in August.

The study link is:

 http://www.elena.com

The survey measures "cognitive style" (analytical/intuitive) which
describes how you process information and learn. The people I've
pre-tested it with found it to be pretty interesting.

I can go to my friends, however it occurred to me that it might be
better to post in a newsgroup and get a larger, more diverse, and
random sample. 

Thanks again for your time, 

Elena

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Help with research

2005-02-18 Thread elena
Thanks for input. You're right. Programmers would probably look for the
abolute value of an answer. That's one reason why people sometimes get
annoyed with us (I guess I'm thinking of the product managers I've
worked with). In any case, this is an existing instrument and was not
developed specifically for programmers. I will be very careful. But I
will be using it to compare groups of progammers, so the results should
have some value.

I know I promised not to discuss, but I couldn't resist. I like
discussing our culture.

Elena

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Scheme as a virtual machine?

2010-11-25 Thread Elena
On Oct 13, 9:09 pm, namekuseijin  wrote:
> On 11 out, 08:49, Oleg  Parashchenko  wrote:
>
>
>
> > Hello,
>
> > I'd like to try the idea that Scheme can be considered as a new
> > portable assembler. We could code something in Scheme and then compile
> > it to PHP or Python or Java or whatever.
>
> > Any suggestions and pointers to existing and related work are welcome.
> > Thanks!
>
> > My current approach is to take an existing Scheme implementation and
> > hijack into its backend. At this moment Scheme code is converted to
> > some representation with a minimal set of bytecodes, and it should be
> > quite easy to compile this representation to a target language. After
> > some research, the main candidates are Gambit, Chicken and CPSCM:
>
> >http://uucode.com/blog/2010/09/28/r5rs-scheme-as-a-virtual-machine-i/...
>
> > If there is an interest in this work, I could publish progress
> > reports.
>
> > --
> > Oleg Parashchenko  o...@http://uucode.com/http://uucode.com/blog/ XML, TeX, 
> > Python, Mac, Chess
>
> it may be assembler, too bad scheme libs are scattered around written
> in far too many different flavors of assembler...
>
> It warms my heart though to realize that Scheme's usual small size and
> footprint has allowed for many quality implementations targetting many
> different backends, be it x86 assembly, C, javascript or .NET.  Take
> python and you have a slow c bytecode interpreter and a slow
> bytecode .NET compiler.  Take haskell and its so friggin' huge and
> complex that its got its very own scary monolithic gcc.  When you
> think of it, Scheme is the one true high-level language with many
> quality perfomant backends -- CL has a few scary compilers for native
> code, but not one to java, .NET or javascript that I know of...

Take R5RS Scheme and you get a language which doesn't allow you to get
things done.

Scheme is as far from Assembly as one language can be.  Assembly
exists to get things done, R5RS Scheme does not even allows you load
native libraries of the underlying operating-system, does it?  It's
easy to stay small and clean when you don't have to dirty your hands
with such crap as real-world applications development.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Which is the best implementation of LISP family of languages for real world programming ?

2010-06-11 Thread Elena
On 10 Giu, 23:33, bolega  wrote:
> I mean ordinary people, who may want to do things with their computers
> for scripting, tasks that python can do...

Lisp is not for ordinary people, Python is.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Which is the best implementation of LISP family of languages for real world programming ?

2010-06-11 Thread Elena
On 11 Giu, 20:03, Chris Hulan  wrote:
> Haven't used it but Racket (http://racket-lang.org/) looks to be a new
> and improved Scheme

I have checked it out and I don't recommend it to others.

Racket is not Scheme anymore (it can't use SLIB, which relies on
common Scheme facilities). Racket is a language and an environment on
their own. For instance: debugging facilities are hidden into its IDE,
therefore you'll have to leave your debugging environment of choice.
Yes, you can run a REpL outside of its IDE, but you can't do much more
than that.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: If Scheme is so good why MIT drops it?

2009-07-19 Thread Elena
On Jul 19, 7:33 pm, fft1976  wrote:
> How do you explain that something as inferior as Python beat Lisp in
> the market place despite starting 40 years later.

To be mainstream a language has to fit in most programmers' minds.

-- 
http://mail.python.org/mailman/listinfo/python-list


optimization of rule-based model on discrete variables

2021-06-14 Thread Elena via Python-list
Hi, I have, say 10 variables (x1 ... x10) which can assume discrete finite 
values, for instance [0,1 or 2].
I need to build a set of rules, such as:

1) if x1==0 and x2==1 and x10==2 then y = 1
2) if x2==1 and x3==1 and x4==2 and x6==0 then y = 0
3) if x2==0 and x3==1 then y = 2
4) if x6==0 and x7==2 then y = 0
...
...
(actually it can be seen as a decision tree classifier).

y can assume the same discrete value [0,1 or 2]
I don't know a-priori anything about the number of rules and the 
combinations of the tested inputs.

Given a dataset of X={(x1... x10)} I can calculate Y=f(X) where f is this 
rule-based function.

I know an operator g that can calculate a real value from Y: e = g(Y)
g is too complex to be written analytically.

I would like to find a set of rules f able to minimize e on X.

I know the problem can become NP-hard, but I would be fine also with a 
suboptimal solution.

What's the best way to approach the problem?
In case, does something already exist in python?


thank you
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: optimization of rule-based model on discrete variables

2021-06-14 Thread Elena via Python-list
Il Mon, 14 Jun 2021 19:39:17 +1200, Greg Ewing ha scritto:

> On 14/06/21 4:15 am, Elena wrote:
>> Given a dataset of X={(x1... x10)} I can calculate Y=f(X) where f is
>> this rule-based function.
>> 
>> I know an operator g that can calculate a real value from Y: e = g(Y)
>> g is too complex to be written analytically.
>> 
>> I would like to find a set of rules f able to minimize e on X.
> 
> There must be something missing from the problem description.
>  From what you've said here, it seems like you could simply find
> a value k for Y that minimises g, regardless of X, and then f would
> consist of a single rule: y = k.
> 
> Can you tell us in more concrete terms what X and g represent?

I see what you mean, so I try to explain it better: Y is a vector say [y1, 
y2, ... yn], with large (n>>10), where yi = f(Xi) with Xi = [x1i, x2i, ... 
x10i] 1<=i<=n. All yi and xji assume discrete values.

I already have a dataset of X={Xi} and would like to find the rules f able 
to minimize a complicated-undifferenciable Real function g(f(X)).
Hope this makes more sense.

x1...x10 are 10 chemical components that can be absent (0), present (1), 
modified (2). yi represent a quality index of the mixtures and g is a 
global quality of the whole process.

Thank you in advance

ele  
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: optimization of rule-based model on discrete variables

2021-06-15 Thread Elena via Python-list
Il Tue, 15 Jun 2021 10:40:05 +1200, Greg Ewing ha scritto:

> On 15/06/21 12:51 am, Elena wrote:
> Hmmm, so the problem breaks down into two parts:
> (1) find a vector Y that minimises g (2) find a set of rules that will
> allow you to predict each component of Y from its corresponding X values
> 
> Is that right?

Correct, the split can be an interesting approach.

> 
> I ztill don't really understand. What are you going to do with this
> function f once you have it?
> 
> I would have thought the idea was that if someone gives you a new
> mixture X[n+1] you can use f to predict how well it will work.
> But that will just give you a y[n+1], and it's not clear what to do with
> that. Do you append it to Y and feed an n+1 component vector into g?
> 
> I think I still need more information about the underlying problem
> before I can help you much.

After the optimization, I will use f just to predict new Xi.

Thanks

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: optimization of rule-based model on discrete variables

2021-06-15 Thread Elena via Python-list
Il Tue, 15 Jun 2021 01:53:09 +, Martin Di Paola ha scritto:

> From what I'm understanding it is an "optimization problem" like the
> ones that you find in "linear programming".
> 
> But in your case the variables are not Real (they are Integers) and the
> function to minimize g() is not linear.
> 
> You could try/explore CVXPY (https://www.cvxpy.org/) which it's a solver
> for different kinds of "convex programming". I don't have experience
> with it however.
> 
> The other weapon in my arsenal would be Z3
> (https://theory.stanford.edu/~nikolaj/programmingz3.html) which it's a
> SMT/SAT solver with a built-in extension for optimization problems.
> 
> I've more experience with this so here is a "draft" of what you may be
> looking for.
> 
> 
> from z3 import Integers, Optimize, And, If
> 
> # create a Python array X with 3 Z3 Integer variables named x0, x1, x2 X
> = Integers('x0 x1 x2')
> Y = Integers('y0 y1')
> 
> # create the solver solver = Optimize()
> 
> # add some restrictions like lower and upper bounds for x in X:
>solver.add(And(0 <= x, x <= 2)) # each x is between 0 and 2
> for y in Y:
>solver.add(And(0 <= y, y <= 2))
> 
> def f(X):
># Conditional expression can be modeled too with "If"
># These are *not* evaluated like a normal Python "if" but # modeled
>as a whole. It'll be the solver which will "run it"
>return If(
>  And(x[0] == 0, x[1] == 0),  # the condition Y[0] == 0,  # Y[0] will
>  *must* be 0 *if* the condition holds Y[0] == 2   # Y[0] will *must*
>  be 2 *if* the condition doesn't hold )
> 
> solver.add(f(X))
> 
> # let's define the function to optimize g = Y[0]**2 solver.maximize(g)
> 
> # check if we have a solution solver.check() # this should return 'sat'
> 
> # get one of the many optimum solutions solver.model()
> 
> 
> I would recommend you to write a very tiny problem with 2 or 3 variables
> and a very simple f() and g() functions, make it work (manually and with
> Z3) and only then build a more complex program.
> 
> You may find useful (or not) these two posts that I wrote a month ago
> about Z3. These are not tutorials, just personal experience with a
> concrete example.
> 
> Combine Real, Integer and Bool variables:
> https://book-of-gehn.github.io/articles/2021/05/02/Planning-Space-
Missions.html
> 
> Lookup Tables (this may be useful for programming a f() "variable"
> function where the code of f() (the decision tree) is set by Z3 and not
> by you such f() leads to the optimum of g())
> https://book-of-gehn.github.io/articles/2021/05/26/Casting-Broadcasting-
LUT-and-Bitwise-Ops.html
> 
> 
> Happy hacking.
> Martin.
> 
> 

Interesting, I completely didn't know about this Z3 tool, I'll try to go  
into that.
Thank you for hint.
BTW the first two links I think are broken.

Ele
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: optimization of rule-based model on discrete variables

2021-06-16 Thread Elena via Python-list
Il Wed, 16 Jun 2021 11:37:42 +1200, Greg Ewing ha scritto:

> On 15/06/21 10:07 pm, Elena wrote:
>> After the optimization, I will use f just to predict new Xi.
> 
> So you're going to use f backwards?
> 
> I don't see how that will work. Where are you going to find a new yi to
> feed into the inverse of f?
> 
> I think I don't understand what role g plays in all of this. If the
> ultimate goal is to find a better mixture,
> you need some kind of figure of merit for an individual mixture. But you
> don't have that, you only have this thing g that somehow depends on all
> of your mixtures at once.
> 
> I'm still not seeing the big picture.

sorry I wrote it wrongly, my bad, I will use f just to predict yi from new 
coming Xi.

-- 
https://mail.python.org/mailman/listinfo/python-list