You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whimsical.apache.org by Patricia Shanahan <pa...@acm.org> on 2020/04/30 17:13:47 UTC

Decision point: node.js vs. Ruby

After a few days attending to other things, it is time for me to get 
back to learning Whimsy.

I can go in either of two directions, Ruby or node.js. Each involves 
getting fluent in a programming language in which I've only written tiny 
programs, as well as learning my way around Whimsy. Neither language 
looks particularly difficult, except perhaps for understanding "this" in 
JavaScript's object and class model.

If all of Whimsy gets converted soon to node.js, time spent learning 
Ruby would be wasted, and I should go for node.js. On the other hand, if 
substantial portions of Whimsy remain in Ruby learning it will 
contribute to the bus factor for those parts of Ruby.

Opinions? Any other considerations?

-- 
This email has been checked for viruses by AVG.
https://www.avg.com


Re: Decision point: node.js vs. Ruby

Posted by Matt Sicker <bo...@gmail.com>.
Being that a lot of Whimsy involves file manipulation, running svn and
git commands, and using the LDAP API, those are probably the key areas
to get familiar with for the relevant programming language. Ruby has a
lot of neat syntax for executing commands like a shell (similar to
Perl in that regard) for example.

On Fri, 1 May 2020 at 15:35, Patricia Shanahan <pa...@acm.org> wrote:
>
>
>
> On 5/1/2020 1:23 PM, Sam Ruby wrote:
> > On Fri, May 1, 2020 at 3:03 PM Patricia Shanahan <pa...@acm.org> wrote:
> >>
> >> I don't want to mislead you about my HTML skills. I understand the basic
> >> concepts and syntax. On the other hand, my last professional user
> >> interface experience was in the 1970's. I don't think modern user
> >> interfaces focus quite as much on organizing input into 80 column chunks.
> >
> > Oh, we could compare notes.  My first experience was with an ASR 33,
> > with a 110 baud modem and paper tape.  From there, I went to an
> > ADM-3A, which I still have in my attic.  I did punch cards and 3270s,
> > but I digress.
>
> I've used 110 baud modems and paper tape. My first employer was NCR, so
> I started with NCR Century computers.
>
> >
> >> I am much more into algorithms and data structures than user interfaces.
> >
> > I would suggest that learning HTML is a good place to start.  You have
> > a production quality web server installed and configured.  Drop the
> > following file into /srv/whimsy/ww/hello.html and then visit
> > http://whimsy.local/hello.html.
> >
> > <!DOCTYPE html>
> > <html>
> >    <head>
> >      <title>First title!</title>
> >    </head>
> >
> >    <body>
> >      <h1>First header!</h1>
> >      <p>Hello world!</p>
> >    </body>
> > </html>
> >
> >  From there, move on to learning bootstrap: https://getbootstrap.com/.
> > Mock up what you eventually want to implement without any logic.  Once
> > you have that ready, we can talk about algorithms and data structures.
>
> OK, I'll try that out.
>
> >
> > Meanwhile, I'm making good progress on my conversion of the board
> > agenda tool. Early next week, I will be sharing my findings - not just
> > running code, but some musings on a different approach to algorithms
> > and data structures than the current whimsy implementation.  You won't
> > need to know Ruby or JavaScript to contribute to that discussion, but
> > knowledge of JSON, and perhaps the ability to install the node.js
> > implementation (which you have already done) would be helpful.
>
> I can think in terms of language neutral algorithms and data structures,
> as well as practical implementations in different languages, so I would
> like to be involved in that discussion.
>
>
> --
> This email has been checked for viruses by AVG.
> https://www.avg.com
>


-- 
Matt Sicker <bo...@gmail.com>

Re: Decision point: node.js vs. Ruby

Posted by Sam Ruby <ru...@intertwingly.net>.
On Fri, May 1, 2020 at 4:35 PM Patricia Shanahan <pa...@acm.org> wrote:
>
> My first employer was NCR

http://www.dvorak.org/blog/ibm-and-the-seven-dwarfs-dwarf-seven-ncr/

You might find the paragraph that starts with "The sale of the
company" to be amusing.

- Sam Ruby

Re: Decision point: node.js vs. Ruby

Posted by Patricia Shanahan <pa...@acm.org>.

On 5/1/2020 1:23 PM, Sam Ruby wrote:
> On Fri, May 1, 2020 at 3:03 PM Patricia Shanahan <pa...@acm.org> wrote:
>>
>> I don't want to mislead you about my HTML skills. I understand the basic
>> concepts and syntax. On the other hand, my last professional user
>> interface experience was in the 1970's. I don't think modern user
>> interfaces focus quite as much on organizing input into 80 column chunks.
> 
> Oh, we could compare notes.  My first experience was with an ASR 33,
> with a 110 baud modem and paper tape.  From there, I went to an
> ADM-3A, which I still have in my attic.  I did punch cards and 3270s,
> but I digress.

I've used 110 baud modems and paper tape. My first employer was NCR, so 
I started with NCR Century computers.

> 
>> I am much more into algorithms and data structures than user interfaces.
> 
> I would suggest that learning HTML is a good place to start.  You have
> a production quality web server installed and configured.  Drop the
> following file into /srv/whimsy/ww/hello.html and then visit
> http://whimsy.local/hello.html.
> 
> <!DOCTYPE html>
> <html>
>    <head>
>      <title>First title!</title>
>    </head>
> 
>    <body>
>      <h1>First header!</h1>
>      <p>Hello world!</p>
>    </body>
> </html>
> 
>  From there, move on to learning bootstrap: https://getbootstrap.com/.
> Mock up what you eventually want to implement without any logic.  Once
> you have that ready, we can talk about algorithms and data structures.

OK, I'll try that out.

> 
> Meanwhile, I'm making good progress on my conversion of the board
> agenda tool. Early next week, I will be sharing my findings - not just
> running code, but some musings on a different approach to algorithms
> and data structures than the current whimsy implementation.  You won't
> need to know Ruby or JavaScript to contribute to that discussion, but
> knowledge of JSON, and perhaps the ability to install the node.js
> implementation (which you have already done) would be helpful.

I can think in terms of language neutral algorithms and data structures, 
as well as practical implementations in different languages, so I would 
like to be involved in that discussion.


-- 
This email has been checked for viruses by AVG.
https://www.avg.com


Re: Decision point: node.js vs. Ruby

Posted by Sam Ruby <ru...@intertwingly.net>.
On Fri, May 1, 2020 at 3:03 PM Patricia Shanahan <pa...@acm.org> wrote:
>
> I don't want to mislead you about my HTML skills. I understand the basic
> concepts and syntax. On the other hand, my last professional user
> interface experience was in the 1970's. I don't think modern user
> interfaces focus quite as much on organizing input into 80 column chunks.

Oh, we could compare notes.  My first experience was with an ASR 33,
with a 110 baud modem and paper tape.  From there, I went to an
ADM-3A, which I still have in my attic.  I did punch cards and 3270s,
but I digress.

> I am much more into algorithms and data structures than user interfaces.

I would suggest that learning HTML is a good place to start.  You have
a production quality web server installed and configured.  Drop the
following file into /srv/whimsy/ww/hello.html and then visit
http://whimsy.local/hello.html.

<!DOCTYPE html>
<html>
  <head>
    <title>First title!</title>
  </head>

  <body>
    <h1>First header!</h1>
    <p>Hello world!</p>
  </body>
</html>

From there, move on to learning bootstrap: https://getbootstrap.com/.
Mock up what you eventually want to implement without any logic.  Once
you have that ready, we can talk about algorithms and data structures.

Meanwhile, I'm making good progress on my conversion of the board
agenda tool. Early next week, I will be sharing my findings - not just
running code, but some musings on a different approach to algorithms
and data structures than the current whimsy implementation.  You won't
need to know Ruby or JavaScript to contribute to that discussion, but
knowledge of JSON, and perhaps the ability to install the node.js
implementation (which you have already done) would be helpful.

- Sam Ruby

Re: Decision point: node.js vs. Ruby

Posted by Patricia Shanahan <pa...@acm.org>.

On 4/30/2020 2:08 PM, Sam Ruby wrote:
> On Thu, Apr 30, 2020 at 1:14 PM Patricia Shanahan <pa...@acm.org> wrote:
>>
>> After a few days attending to other things, it is time for me to get
>> back to learning Whimsy.
>>
>> I can go in either of two directions, Ruby or node.js. Each involves
>> getting fluent in a programming language in which I've only written tiny
>> programs, as well as learning my way around Whimsy. Neither language
>> looks particularly difficult, except perhaps for understanding "this" in
>> JavaScript's object and class model.
>>
>> If all of Whimsy gets converted soon to node.js, time spent learning
>> Ruby would be wasted, and I should go for node.js. On the other hand, if
>> substantial portions of Whimsy remain in Ruby learning it will
>> contribute to the bus factor for those parts of Ruby.
>>
>> Opinions? Any other considerations?
> 
> If what you want to work on is forms and reports (i.e., things that
> HTML is good at) and NOT on the board agenda app, the roster tool, and
> the secretary workbench, then the short term answer is Ruby.  And that
> will either turn out to be the right long term answer, or there will
> be a well defined transition path.  Even if all the tools end up in
> JavaScript, that isn't going to happen in weeks or even a small number
> of months, and your HTML skills and overall design will transfer over.
> Syntax wise, JavaScript has a lot in common with C, C++, Java, and C#,
> so you likely will pick up the syntax quickly.  Semantically,
> JavaScript actually has a lot in common with Ruby and Python.
> 
> If the above doesn't describe you, then one way or another, you will
> need to learn a substantial amount of JavaScript.  That's either in
> addition to Ruby (and for that matter, you will need to learn the
> capabilities and limitation of the Ruby2JS[1] library I maintain), or
> it is instead of Ruby.

I don't want to mislead you about my HTML skills. I understand the basic 
concepts and syntax. On the other hand, my last professional user 
interface experience was in the 1970's. I don't think modern user 
interfaces focus quite as much on organizing input into 80 column chunks.

I am much more into algorithms and data structures than user interfaces.

> 
>> --
>> This email has been checked for viruses by AVG.
>> https://www.avg.com
> 
> - Sam Ruby
> 
> [1] https://github.com/rubys/ruby2js
> 

-- 
This email has been checked for viruses by AVG.
https://www.avg.com


Re: Decision point: node.js vs. Ruby

Posted by Sam Ruby <ru...@intertwingly.net>.
On Thu, Apr 30, 2020 at 1:14 PM Patricia Shanahan <pa...@acm.org> wrote:
>
> After a few days attending to other things, it is time for me to get
> back to learning Whimsy.
>
> I can go in either of two directions, Ruby or node.js. Each involves
> getting fluent in a programming language in which I've only written tiny
> programs, as well as learning my way around Whimsy. Neither language
> looks particularly difficult, except perhaps for understanding "this" in
> JavaScript's object and class model.
>
> If all of Whimsy gets converted soon to node.js, time spent learning
> Ruby would be wasted, and I should go for node.js. On the other hand, if
> substantial portions of Whimsy remain in Ruby learning it will
> contribute to the bus factor for those parts of Ruby.
>
> Opinions? Any other considerations?

If what you want to work on is forms and reports (i.e., things that
HTML is good at) and NOT on the board agenda app, the roster tool, and
the secretary workbench, then the short term answer is Ruby.  And that
will either turn out to be the right long term answer, or there will
be a well defined transition path.  Even if all the tools end up in
JavaScript, that isn't going to happen in weeks or even a small number
of months, and your HTML skills and overall design will transfer over.
Syntax wise, JavaScript has a lot in common with C, C++, Java, and C#,
so you likely will pick up the syntax quickly.  Semantically,
JavaScript actually has a lot in common with Ruby and Python.

If the above doesn't describe you, then one way or another, you will
need to learn a substantial amount of JavaScript.  That's either in
addition to Ruby (and for that matter, you will need to learn the
capabilities and limitation of the Ruby2JS[1] library I maintain), or
it is instead of Ruby.

> --
> This email has been checked for viruses by AVG.
> https://www.avg.com

- Sam Ruby

[1] https://github.com/rubys/ruby2js

Re: Decision point: node.js vs. Ruby

Posted by Matt Sicker <bo...@gmail.com>.
I’m also leaning towards node. Random ruby CGI scripts aren’t a big deal
compared to the full on apps, so no big rush there.

On Fri, May 1, 2020 at 07:09 Jim Jagielski <ji...@jagunet.com> wrote:

> Ruby is a fun language. It is also a different language, such that skills
> in Ruby don't necessarily migrate to skills in other languages all that
> readily. IMO, it is a niche language and I think its popularity has been
> waning lately. It's not a growth language. (again, all this is my own 2c)
>
> node.js is different. It's popular, heavily used and has a syntax which is
> very similar to Java, C, et.al. that picking it up is pretty easy. It's a
> valuable language to learn.
>
> I've no dog in this fight, but IMO node.js would be the more obvious and
> "correct" choice.
>
> > On Apr 30, 2020, at 1:13 PM, Patricia Shanahan <pa...@acm.org> wrote:
> >
> > After a few days attending to other things, it is time for me to get
> back to learning Whimsy.
> >
> > I can go in either of two directions, Ruby or node.js. Each involves
> getting fluent in a programming language in which I've only written tiny
> programs, as well as learning my way around Whimsy. Neither language looks
> particularly difficult, except perhaps for understanding "this" in
> JavaScript's object and class model.
> >
> > If all of Whimsy gets converted soon to node.js, time spent learning
> Ruby would be wasted, and I should go for node.js. On the other hand, if
> substantial portions of Whimsy remain in Ruby learning it will contribute
> to the bus factor for those parts of Ruby.
> >
> > Opinions? Any other considerations?
> >
> > --
> > This email has been checked for viruses by AVG.
> > https://www.avg.com
> >
>
> --
Matt Sicker <bo...@gmail.com>

Re: Decision point: node.js vs. Ruby

Posted by Patricia Shanahan <pa...@acm.org>.
On 5/1/2020 5:09 AM, Jim Jagielski wrote:
> Ruby is a fun language. It is also a different language, such that skills in Ruby don't necessarily migrate to skills in other languages all that readily. IMO, it is a niche language and I think its popularity has been waning lately. It's not a growth language. (again, all this is my own 2c)
> 
> node.js is different. It's popular, heavily used and has a syntax which is very similar to Java, C, et.al. that picking it up is pretty easy. It's a valuable language to learn.
> 
> I've no dog in this fight, but IMO node.js would be the more obvious and "correct" choice.

That is actually an argument, for me, in favor of learning Ruby.

I am retired, so there is no issue of future career. Apache lets me 
scratch my programming itch without the constraints of an actual job. My 
only criterion in selecting between the languages is what will best help 
Whimsy. Ruby being less popular means more Whimsy volunteers who already 
know one of the languages will know JavaScript. Even if, in the long 
term, Whimsy switches entirely to node.js, Ruby will be needed for a while.

For volunteers who know neither, many will have only worked with members 
of the C family, such as C++, Java, and C#. JavaScript is essentially a 
script-writing member of that family, and will be relatively easy for 
them. I have programmed in many different languages, some very different 
from the C family, such as Fortran, Cobol, Snobol, Matlab, Forth, 
Verilog, and Perl, so I am well prepared for learning a different language.

> 
>> On Apr 30, 2020, at 1:13 PM, Patricia Shanahan <pa...@acm.org> wrote:
>>
>> After a few days attending to other things, it is time for me to get back to learning Whimsy.
>>
>> I can go in either of two directions, Ruby or node.js. Each involves getting fluent in a programming language in which I've only written tiny programs, as well as learning my way around Whimsy. Neither language looks particularly difficult, except perhaps for understanding "this" in JavaScript's object and class model.
>>
>> If all of Whimsy gets converted soon to node.js, time spent learning Ruby would be wasted, and I should go for node.js. On the other hand, if substantial portions of Whimsy remain in Ruby learning it will contribute to the bus factor for those parts of Ruby.
>>
>> Opinions? Any other considerations?
>>
>> -- 
>> This email has been checked for viruses by AVG.
>> https://www.avg.com
>>
> 

Re: Decision point: node.js vs. Ruby

Posted by Jim Jagielski <ji...@jaguNET.com>.
Ruby is a fun language. It is also a different language, such that skills in Ruby don't necessarily migrate to skills in other languages all that readily. IMO, it is a niche language and I think its popularity has been waning lately. It's not a growth language. (again, all this is my own 2c)

node.js is different. It's popular, heavily used and has a syntax which is very similar to Java, C, et.al. that picking it up is pretty easy. It's a valuable language to learn.

I've no dog in this fight, but IMO node.js would be the more obvious and "correct" choice.

> On Apr 30, 2020, at 1:13 PM, Patricia Shanahan <pa...@acm.org> wrote:
> 
> After a few days attending to other things, it is time for me to get back to learning Whimsy.
> 
> I can go in either of two directions, Ruby or node.js. Each involves getting fluent in a programming language in which I've only written tiny programs, as well as learning my way around Whimsy. Neither language looks particularly difficult, except perhaps for understanding "this" in JavaScript's object and class model.
> 
> If all of Whimsy gets converted soon to node.js, time spent learning Ruby would be wasted, and I should go for node.js. On the other hand, if substantial portions of Whimsy remain in Ruby learning it will contribute to the bus factor for those parts of Ruby.
> 
> Opinions? Any other considerations?
> 
> -- 
> This email has been checked for viruses by AVG.
> https://www.avg.com
>