News for hackers. Stuff that matters.
Re:Is “data scientist” the new “programmer”? by EdwardDiego on Tuesday September 18, 2018 @07:23PM (#18020211)
The fact that R has such buy-in despite being a rather awful programming language (a friend of mine worked on the next Lisp-like version of R under Ross Ihaka, and the next version is based on the fact that current R is a bit awful) is precisely because it offers such convenience to non-programmers.

In my sister company, they have data scientists, and data engineers. The data scientists write their algorithms in the language they're most comfortable with (typically JS), and the data engineers rewrite to perform efficiently in the application that's applying them.

Data scientist and programmer are two very different specialisations.

Re:Is “data scientist” the new “programmer”? by minimaxir on Tuesday September 18, 2018 @07:29PM (#18020245)
Base R is annoying, but IMO the tidyverse alone makes the language worthwhile.
Re:Is “data scientist” the new “programmer”? by peatmoss on Tuesday September 18, 2018 @10:47PM (#18021283)
It’s a great set of DSLs that show off some of the pretty decent meta programming facilities of R. I think those DSLs could be created elsewhere, but I also don’t think it's an accident that it happened in R.
Re:Is “data scientist” the new “programmer”? by mathematicaster on Tuesday September 18, 2018 @08:02PM (#18020484)
IMO it's the exact opposite. "Il mondo e' bello perche' e' vario".
Re:Is “data scientist” the new “programmer”? by 110285591136 on Tuesday September 18, 2018 @10:15PM (#18021132)
> ... despite being a rather awful programming language (...) it offers such convenience to non-programmers

I've heard people say similar things about MATLAB - that it's a poorly designed language, but many that people (mostly non-CS folk) use it out of convenience.

Can someone with experience using R explain what makes it so appealing to non-programmers? It seems like these two factors, "poorly designed" and "easy to use", should be at odds with each other.

Re:Is “data scientist” the new “programmer”? by peatmoss on Tuesday September 18, 2018 @10:44PM (#18021270)
Eh, it’s not as bad as people like to whinge that it is. There are indeed warts, but they’re pretty overblown. If you are comfortable with functional idioms R mostly does what you want without a great deal of fuss. If you’re predisposed to procedural idioms, then you’re going to be fighting the language.

I started learning R about the time I started reading How to Design Computer Programs, and I found it pretty easy to transfer that model of thinking to R. And I find Clojure, Racket, and Scheme to also be somewhat comfortable after a short reacclimation period.

Some of the convenience bits have to do with most functions working on vectors without needing to explicitly iterate most of the time. Also libraries. If you want to estimate a linear regression, or make some exploratory plots, or try some rando statistical method that your graduate advisor suggests, you don’t have to worry about whether it’s already been implemented for you in R.

You can do a lot of heavy lifting by cribbing off of example code because most code is short. You just get heaps of leverage by using R.

Look, I like to do things the hard way a lot. My whole life is pretty much a string of highest friction path choices. For data science R is easy because all the work has been done for you. It's the difference between writing GUI apps against Cocoa APIs vs, I dunno, XLib or Motif.

Re:Is “data scientist” the new “programmer”? by thousandautumns on Wednesday September 19, 2018 @10:16AM (#18024311)
Problem is that we are coming from completely different perspectives. When you say "programmer", you are likely referring to someone from a CS background, likely with software engineering experience, who has spent their lives working in C++, Java, Python, etc.

By that definition, I would be a non-programmer, as I come from a statistics background, and though I have lots of experience in C++ and Python, most of my experience and work is in R. But that is by choice.

If I'm trying to create an application or build a website, I wouldn't use R. But when it comes to ingesting data, transforming and cleaning data, and modeling data, R is second to none. Yes, its syntax looks ugly and bizarre if you are used to object-oriented programming, software development, etc. In the context of working with data, I have never found anything in R to be even remotely confusing or strange.

On the contrary, the next best option to R would almost certainly be Python, and the gulf between the two is massive in my opinion. Python is a great general purpose programming language, but its data analysis capabilities, using packages like Pandas and sci-kit learn, feel like poorly designed, bolted on, and unwieldy. R is better for virtually every aspect of data analysis than Python.

So it isn't that R is poorly designed. Conversely, its very well designed, for its purpose as a data analysis-focused programming language. It only seems to be poorly designed to "programmers" because programmers work on problems that R isn't meant for. But that is like complaining that a screwdriver looks poorly designed for hammering nails.

Re:Is “data scientist” the new “programmer”? by jhbadger on Tuesday September 18, 2018 @10:32PM (#18021206)
What makes R appealing is basically all statistical methods are available in it -- and it is often the initial implementation language of new methods in statistics. Often an R program involves very little programming as such other than to read in data, run some existing statistical methods on it and print or plot the results. I'm not a particular fan of the language itself (I kind of wish XLispStat hadn't died), but every time I feel like checking out Python or Julia I find things I need that haven't been implemented yet in those languages that are in R.
Re:Is “data scientist” the new “programmer”? by nicwilson on Tuesday September 18, 2018 @10:30PM (#18021197)
(Havn't used much R, Have used MATLAB)

Its all about availability of libraries. I did control systems in undergrad, and despite being a shitty language, being able to describe and manipulate dynamic systems (ODEs) was very useful. Doing numerical integration by hand for the nonlinear systems was horrible, though better than simulink (which is about as much fun as using LabVIEW or sculling H2SO4).

Re:Is “data scientist” the new “programmer”? by xaranke on Tuesday September 18, 2018 @07:40PM (#18020328)
Can you elaborate more on the "algorithms in JS" bit? What libraries/tools are they using? Why JS versus Python or JVM languages?
Re:Is “data scientist” the new “programmer”? by mythrwy on Tuesday September 18, 2018 @07:48PM (#18020389)
Seconded. "Data scientists" and "being most comfortable writing in JS" just sounds strange to me.
Re:Is “data scientist” the new “programmer”? by telchar on Tuesday September 18, 2018 @10:40PM (#18021252)
I don't want to pile on but that sentence strongly reminded me of the oldish saw about "a data scientist is a programmer who lives in SF". I've never heard of anyone using JS for data science. What might it have that's anywhere comparable to the tidyverse or numpy/scipy/sklearn?
Re:Is “data scientist” the new “programmer”? by EdwardDiego on Tuesday September 18, 2018 @11:51PM (#18021545)
They don't use JS to investigate the data, they use SQL (Hive, Impala etc.) as their lingua franca for exploring datasets. But they then write their algorithms based on that analysis in JS.

Again, I don't know why, it struck me as odd also, but hey, whatever they're doing, it works for them.

Re:Is “data scientist” the new “programmer”? by EdwardDiego on Tuesday September 18, 2018 @11:50PM (#18021538)
I have no idea why they use JS - it's a Berlin start-up so maybe trendiness is involved? All I know is that their data engineers have to make those algorithms work in production.
Re:Is “data scientist” the new “programmer”? by joycian on Wednesday September 19, 2018 @02:08AM (#18022084)
> The data scientists write their algorithms in the language they're most comfortable with (typically JS)

This seems weird to me, I associate JS with web dev (and even more with the front end side of it)

Re:Is “data scientist” the new “programmer”? by nsriv on Tuesday September 18, 2018 @10:16PM (#18021139)
R is cumbersome, but then you look at Matlab and Stata and try to explain that to social science graduate students that just managed to grok LaTex, and R starts looking like a streamlined vision of the future.
Re:Is “data scientist” the new “programmer”? by peatmoss on Tuesday September 18, 2018 @10:52PM (#18021304)
Totally. I’ve taught intro R to mostly social scientists, and intro Python to mostly physical scientists. Every workshop, the R group is coding circles around the Python group with the same number of hours of instruction. And the intro R curriculum that we use was largely a ported version of the Python curriculum.

Having seen brand new scientific programmers tackle two “beginner friendly” languages, man the differences after a day or two are stark.

Re:Is “data scientist” the new “programmer”? by noelsusman on Wednesday September 19, 2018 @08:56AM (#18023816)
>The data scientists write their algorithms in the language they're most comfortable with (typically JS)

I'm sorry, what? You know data scientists who use JavaScript to implement their algorithms?

Re:Is “data scientist” the new “programmer”? by dasmoth on Wednesday September 19, 2018 @07:03AM (#18023299)
a friend of mine worked on the next Lisp-like version of R under Ross Ihaka

Did anything come of this? I seem to remember seeing a paper or article where he proposed doing this, but I’ve never seen an implementation.

Edit: paper I was thinking of is https://www.stat.auckland.ac.nz/%7Eihaka/downloads/Compstat-...

Re:Is “data scientist” the new “programmer”? by lispm on Wednesday September 19, 2018 @08:04AM (#18023562)