Choice of Programming Language

86 views
Skip to first unread message

William Waugh

unread,
Nov 23, 2016, 2:40:00 AM11/23/16
to The Center for Election Science
Sometimes participants in this discussion forum find reason to share code related to voting systems. Doing so has better effects if the readers can read the code. We may differ in terms of which programming languages we are more comfortable reading. I would like to conduct a poll to find out which languages we collectively can best read. I am not asking for votes yet, just nominations at this stage. I start the nominations with Ruby and CoffeeScript, both of which have well-known techniques for putting them under web pages (and in the case of CoffeeScript, on the client side as well as the server side). If someone wants to mention Lisp, they should probably finger a specific dialect. Without nominating them, I mention Smalltalk, Prolog, and Haskell as having potential advantages. Haskell is conceptually very clean, but I for one would have a long learning curve to be able to read it.

Jameson Quinn

unread,
Nov 23, 2016, 7:32:25 AM11/23/16
to electionsciencefoundation
I think for sharing code, coffeescript and python are the winners. I'm not saying that Python is a better language than Ruby or Haskell or Julia or Go or whatever, but it's more widely-known. I also find python remarkably easy to read (except for decorators, which I like but which require explanation). You can create clever DSLs in other languages, but while those may clarify in terms of how you're thinking about the problem, they obscure how the computer's actually thinking about it.

2016-11-23 2:40 GMT-05:00 William Waugh <2knuw...@snkmail.com>:
Sometimes participants in this discussion forum find reason to share code related to voting systems. Doing so has better effects if the readers can read the code. We may differ in terms of which programming languages we are more comfortable reading. I would like to conduct a poll to find out which languages we collectively can best read. I am not asking for votes yet, just nominations at this stage. I start the nominations with Ruby and CoffeeScript, both of which have well-known techniques for putting them under web pages (and in the case of CoffeeScript, on the client side as well as the server side). If someone wants to mention Lisp, they should probably finger a specific dialect. Without nominating them, I mention Smalltalk, Prolog, and Haskell as having potential advantages. Haskell is conceptually very clean, but I for one would have a long learning curve to be able to read it.

--
You received this message because you are subscribed to the Google Groups "The Center for Election Science" group.
To unsubscribe from this group and stop receiving emails from it, send an email to electionscience+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nevin Brackett-Rozinsky

unread,
Nov 23, 2016, 11:52:38 AM11/23/16
to The Center for Election Science
I have been using Swift recently.

Nevin

Clay Shentrup

unread,
Nov 23, 2016, 12:22:31 PM11/23/16
to The Center for Election Science
Go. Largely because it uses composition instead of inheritance, and doesn't have insane things like optional arguments.

William Waugh

unread,
Nov 23, 2016, 12:34:28 PM11/23/16
to The Center for Election Science
Nominated so far: Go, Swift, Python, Coffeescript, Ruby.

William Waugh

unread,
Nov 29, 2016, 12:35:22 PM11/29/16
to The Center for Election Science
Open for votes. Please vote Score on a range of -50 to 50. If you leave out a nominated language, I will tally it at -50 for your vote.

Kevin Baas

unread,
Nov 29, 2016, 3:40:14 PM11/29/16
to The Center for Election Science
Any code I share will be in Java.

William Waugh

unread,
Nov 29, 2016, 9:18:08 PM11/29/16
to The Center for Election Science
People can add nominations at any time and change their votes at any time. I will update the tally.

Nominated so far: Java, Go, Swift, Python, Coffeescript, Ruby.

Neal McBurnett

unread,
Nov 30, 2016, 12:33:29 AM11/30/16
to William Waugh, Center for Election Science
Original Context, from William:

Sometimes participants in this discussion forum find reason to share code related to voting systems. Doing so has better effects if the readers can read the code. We may differ in terms of which programming languages we are more comfortable reading. I would like to conduct a poll to find out which languages we collectively can best read.

Open for votes. Please vote Score on a range of -50 to 50. If you leave out a nominated language, I will tally it at -50 for your vote.
People can add nominations at any time and change their votes at any time. I will update the tally.

I'm adding "Rust" to the list - a fabulous modern language.

20 Java
30 Go
25 Swift
50 Python
27 Coffeescript
24 Ruby
35 Rust

Neal McBurnett http://neal.mcburnett.org/

William Waugh

unread,
Nov 30, 2016, 3:32:59 AM11/30/16
to The Center for Election Science
Should we divide the poll into two divisions, one for if the purpose of sharing the code is to express an algorithm (e. g. for a voting system or a voting strategy), and another if the purpose of sharing the code is to collaborate on simulations where performance matters because you are going to run zillions of simulated elections?

On Wednesday, November 23, 2016 at 2:40:00 AM UTC-5, William Waugh started https://groups.google.com/forum/?fromgroups#!topic/electionscience/SCTQki63Aws

Kevin Baas

unread,
Nov 30, 2016, 10:15:52 AM11/30/16
to The Center for Election Science
They say algorithm trumps hardware.

I believe in most cases, including this one, it also trumps programming language.


In other words, I think it's more important that, if one is going to run simulations, they take care to consider algorithmic complexity time.

Dylan Hirsch-Shell

unread,
Nov 30, 2016, 12:55:30 PM11/30/16
to The Center for Election Science
C

William Waugh

unread,
Dec 27, 2016, 12:21:15 AM12/27/16
to The Center for Election Science
At https://groups.google.com/forum/?fromgroups=#!topic/electionscience/SCTQki63Aws I solicited votes for what programming language to use for sharing algorithms.

Recall that I specified a range of -50..50.

I vote:

-40 Go
-40 Swift
-49 Python
+40 Coffeescript
+50 Ruby
-50 C
-50 Java
-50 Rust

There is some laziness in my scoring of Swift. Go is intellectually stimulating, but I don't want to take the time for static type declarations. In Python, I didn't like that nonce functions are limited to one line.

I decided to interpret people's remarks as votes when they didn't give an official vote in the form I requested. The most latitude I used in this interpretation, I applied to the remark by Kevin Baas, who only said what his own practice would be, not what he would like to see others do.

Currently the nominees are 
GoSwiftPythonCoffeescriptRubyCJavaRust

The one voter who listed scores (before this post), Neal McBurnett, has not explicitly scored C  (it was nominated after he voted). I stated that when people don't explicitly score, I will use -50 (I don't stand with Warren D. Smith regarding abstention with respect to a candidate without abstention with respect to the whole race). I also stated that people can change their votes and I will update the tally.

Currently Coffeescript is the winner with an average score of -12.

According to a tally with my vote removed, Python wins with an average score of -17.

Brian Olson

unread,
Dec 29, 2016, 11:13:45 AM12/29/16
to electio...@googlegroups.com
I've implemented election algorithms in C, Java, and Go

50 Python
21 C
20 Go
10 Java
-1 Swift
-20 Coffeescript
-30 Ruby
-40 Rust


Python is a pretty good language that's easy to write clear programs in that are easy to read.
C isn't a good modern language, it's just an incredibly widely known simple understandable portable language.
I'm going to try my next project in the Julia language, it seems to have originated for scientific computation but it has all the modern language features and it thinks the way I think.
Swift is the Apple language; great if you're writing for iOS. I don't think we can be sure if it has a future outside of that.
Ruby is the new perl. Ruby is okay, but Rails is terrible, and most Ruby programming is in service to Rails.
I get the impression that Coffeescript is dying and no new projects start using it.
Java was my favorite language 2006-2009. Oracle is slowly letting it rot.
Haskell would get -50 from me.

--

Neal McBurnett

unread,
Dec 29, 2016, 11:52:17 AM12/29/16
to electio...@googlegroups.com
I'm surprised and disappointed that people are voting some languages so low. Python scored at -49?

Remember the context is the readability of a language:

Sometimes participants in this discussion forum find reason to share code related to voting systems. Doing so has better effects if the readers can read the code. We may differ in terms of which programming languages we are more comfortable reading. I would like to conduct a poll to find out which languages we collectively can best read.

But of course this is a geeky voting methods list, where people know how to vote strategically, and apparently prefer to do so.

I think a -50 should mean "this language would actually hurt my ability to understand an algorithm" plus "using code written in this language would require lots of setup time and then produce no useful results in an practical amount of time".

So I'd like to add a few new languages, which begin to plumb the depths of languages which are the worst to read:

APL # We should get some supporters for this. I've enjoyed it. Compact!
Snobol # Note - I've actually programmed professionally in Snobol!)
Machine language for the Intel 4040
Laconic # for programming Turing machines - motivated by amazing article at
Shtetl-Optimized » Blog Archive » The 8000th Busy Beaver number eludes ZF set theory: new paper by Adam Yedidia and me
http://www.scottaaronson.com/blog/?p=2725
Whitespace # See https://en.wikipedia.org/wiki/Esoteric_programming_language
Brainfuck # See https://en.wikipedia.org/wiki/Esoteric_programming_language

20 Java
30 Go
25 Swift
50 Python
27 Coffeescript
24 Ruby
35 Rust
5 APL
2 Laconic
0 Snobol
-10 Machine language for the Intel 4040
-40 Whitespace
-50 Brainfuck

Please update your preferences. :)

Neal McBurnett http://neal.mcburnett.org/
> To unsubscribe from this group and stop receiving emails from it, send an email to electionscien...@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "The Center for Election Science" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to electionscien...@googlegroups.com.

William Waugh

unread,
Jan 1, 2017, 12:11:50 AM1/1/17
to The Center for Election Science
I updated the tally to reflect the two recent messages in this thread. I also made some changes to my own vote. Python has the lead.

In defense of Coffeescript, it is translated into Javascript and so can run in browsers. Both Ruby and Coffeescript require less punctuation than Python does, and the three of them pretty much do the same things semantically, relative to the needs of the subject matter at hand. Brian Olson says "Rails is terrible, and most Ruby programming is in service to Rails.". I don't see the relevance of what other uses (or misuses) the language is applied to, to the question of how good a fit it is for studying voting systems. Also, he calls it the "new Perl", and I'm not sure what that means. Isn't Perl shell-like, where a plain word self-quotes and you have to mark variables with dollar signs? Ruby isn't like that.

In Coffeescript, the K combinator (sort of) can be written:
(v) -> -> v

https://groups.google.com/forum/?fromgroups=#!topic/electionscience/SCTQki63Aws

William Waugh

unread,
Jan 1, 2017, 12:16:23 AM1/1/17
to The Center for Election Science

Brian Olson

unread,
Jan 1, 2017, 1:25:05 AM1/1/17
to electio...@googlegroups.com
At the risk of some redundancy, a 0..10 ratings poll across the 8 substantially nominated languages:

two write-in slots too!
Condorcet counted and with a nice histogram of ratings per choice.
e.g. the results

(requires google or fb identity to vote)



On Sun, Jan 1, 2017 at 12:16 AM, William Waugh <2knuw...@snkmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "The Center for Election Science" group.
To unsubscribe from this group and stop receiving emails from it, send an email to electionscience+unsubscribe@googlegroups.com.

Neal McBurnett

unread,
Jan 1, 2017, 11:09:40 AM1/1/17
to electio...@googlegroups.com
I get:

Error Warning App Not Set Up: This app is still in development mode, and you don't have access to it. Switch to a registered test user or ask an app admin for permissions.

-Neal

On Sun, Jan 01, 2017 at 01:25:02AM -0500, Brian Olson wrote:
> At the risk of some redundancy, a 0..10 ratings poll across the 8 substantially nominated languages:
> http://betterpolls.com/do/-sC2-bDXr-Ja
>
> two write-in slots too!
> Condorcet counted and with a nice histogram of ratings per choice.
> e.g. the results
> http://betterpolls.com/show/-sC2-bDXr-Ja
>
> (requires google or fb identity to vote)
>
>
>
> On Sun, Jan 1, 2017 at 12:16 AM, William Waugh <2knuw...@snkmail.com> wrote:
>
> OOps, I posted the wrong link. The tally is at:
>
> https://docs.google.com/spreadsheets/d/1k8SLx70aeYpWn-kvX1yLnNM65FeyUQs_lyRWnSlSGow/edit?usp=sharing
>
> --
> You received this message because you are subscribed to the Google Groups "The Center for Election Science" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to electionscien...@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "The Center for Election Science" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to electionscien...@googlegroups.com.

Brian Olson

unread,
Jan 1, 2017, 3:58:25 PM1/1/17
to electio...@googlegroups.com
Fixed. Thanks Neal.
For other analysis, the raw votes (of which there are now two) are available here as url-formatted ratings:

On Sun, Jan 1, 2017 at 11:09 AM, Neal McBurnett <ne...@mcburnett.org> wrote:
I get:

Error Warning App Not Set Up: This app is still in development mode, and you don't have access to it. Switch to a registered test user or ask an app admin for permissions.

-Neal

On Sun, Jan 01, 2017 at 01:25:02AM -0500, Brian Olson wrote:
> At the risk of some redundancy, a 0..10 ratings poll across the 8 substantially nominated languages:
> http://betterpolls.com/do/-sC2-bDXr-Ja
>
> two write-in slots too!
> Condorcet counted and with a nice histogram of ratings per choice.
> e.g. the results
> http://betterpolls.com/show/-sC2-bDXr-Ja
>
> (requires google or fb identity to vote)
>
>
>
> On Sun, Jan 1, 2017 at 12:16 AM, William Waugh <2knuw...@snkmail.com> wrote:
>
>     OOps, I posted the wrong link. The tally is at:
>
>     https://docs.google.com/spreadsheets/d/1k8SLx70aeYpWn-kvX1yLnNM65FeyUQs_lyRWnSlSGow/edit?usp=sharing
>
>     --
>     You received this message because you are subscribed to the Google Groups "The Center for Election Science" group.
>     To unsubscribe from this group and stop receiving emails from it, send an email to electionscience+unsubscribe@googlegroups.com

>     .
>     For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "The Center for Election Science" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to electionscience+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "The Center for Election Science" group.
To unsubscribe from this group and stop receiving emails from it, send an email to electionscience+unsubscribe@googlegroups.com.

Brian Goldman

unread,
Jan 1, 2017, 4:01:26 PM1/1/17
to electio...@googlegroups.com
You might find the Stack Overflow survey relevant to your decision making: http://stackoverflow.com/research/developer-survey-2016#technology

It has 50,000 participants as well as data collection from usage (40 million). Some highlights:
  • The most common used language by respondents is Javascript, Java, C#, Python (in that order).
  • The most common language tags on Stack Overflow posts is Javascript, Java, Python, and C# (in that order).
  • Respondents love Rust, Go, and Python, and dread Coffeescript.

On Sun, Jan 1, 2017 at 10:09 AM, Neal McBurnett <ne...@mcburnett.org> wrote:
I get:

Error Warning App Not Set Up: This app is still in development mode, and you don't have access to it. Switch to a registered test user or ask an app admin for permissions.

-Neal

On Sun, Jan 01, 2017 at 01:25:02AM -0500, Brian Olson wrote:
> At the risk of some redundancy, a 0..10 ratings poll across the 8 substantially nominated languages:
> http://betterpolls.com/do/-sC2-bDXr-Ja
>
> two write-in slots too!
> Condorcet counted and with a nice histogram of ratings per choice.
> e.g. the results
> http://betterpolls.com/show/-sC2-bDXr-Ja
>
> (requires google or fb identity to vote)
>
>
>
> On Sun, Jan 1, 2017 at 12:16 AM, William Waugh <2knuw...@snkmail.com> wrote:
>
>     OOps, I posted the wrong link. The tally is at:
>
>     https://docs.google.com/spreadsheets/d/1k8SLx70aeYpWn-kvX1yLnNM65FeyUQs_lyRWnSlSGow/edit?usp=sharing
>
>     --
>     You received this message because you are subscribed to the Google Groups "The Center for Election Science" group.
>     To unsubscribe from this group and stop receiving emails from it, send an email to electionscience+unsubscribe@googlegroups.com

>     .
>     For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "The Center for Election Science" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to electionscience+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "The Center for Election Science" group.
To unsubscribe from this group and stop receiving emails from it, send an email to electionscience+unsubscribe@googlegroups.com.

William Waugh

unread,
Jan 2, 2017, 11:13:40 AM1/2/17
to The Center for Election Science
On Sunday, January 1, 2017 at 1:25:05 AM UTC-5, Brian Olson wrote:
At the risk of some redundancy, a 0..10 ratings poll across the 8 substantially nominated languages:

two write-in slots too!
Condorcet counted and with a nice histogram of ratings per choice.
e.g. the results

(requires google or fb identity to vote)
 
I was able to authenticate with Google, but I tried Facebook first, and got "err". Both authentications asked for my e-mail address, which I would not prefer to give (would have been willing to give another e-mail address different from ones used with Google and Facebook), but I gave it anyway so as to be able to vote.

William Waugh

unread,
Jan 2, 2017, 11:34:12 AM1/2/17
to The Center for Election Science
Even the Score winner (currently), Python, does not have majority approval.

Coffeescript is in second place. If the election were held by the Frohnmayer score instant runoff method, Python would still win.

Reply all
Reply to author
Forward
0 new messages