5 ms·
My description of R: It makes hard things easy and easy things hard. Ergonomically it is the absolute worst "programming language" I've touched in my life. Howe
by blacktriangle 5y ago
My description of R: It makes hard things easy and easy things hard. Ergonomically it is the absolute worst "programming language" I've touched in my life. However somehow it managed to become the official language of statistics research and has packages to do any type of analysis you can dream of.
I think the reason you and I dislike R is because we just work differently than non-programmers. Non programmers think in purely imperative, straight-forward semantics. They write one-off unmaintainable code tying together libraries that solves their immediate problem. Programmers try and write R code as if it was a proper programming language and immediately run into walls. Non-programmers never see the walls because they don't even know there's another way.
- dragontamer 5y agoR > Matlab. But both suck as programming languages. But that's because neither R nor Matlab are primarily programming languages. They're primarily mathematical exploration tools.
- osalberger 5y agoRight. Julia is looking fairly promising as a "real" programming language that is still an excellent Matlab replacement, and possibly to a lesser extent an R replacement, and it does show that there is nothing about filling the exploratory math programming niche that requires it to have the warts that the incumbents have. Fundamentally, R and Matlab are probably best comparable to Perl in terms of how they got popular. While they are rather ugly, they were the first to provide a simple solution to a few specific problems that a lot of people had, which snowballed them into popularity and network effect advantages
- mushufasa 5y agoThe fact that Julia requires compilation seems like such a huge hurdle to adoption in light of the above. When the alternatives are a REPL and the users aren't programmers, to use Julia they have to first learn the difference between code and compiled code.
- beforeolives 5y agoJulia is JIT compiled and most people use it through a REPL. For a beginner there's hardly a difference in the experience.
- dash2 5y agoNo, there is a difference. My day-to-day use case is: start the REPL, start typing some code, wanna see a graph. I might literally only want to write a single command. If that takes a minute to compile, it's a problem. Julia is pushing hard to address this and I'm really interested to see where it goes - I tried it for the first time recently and saw a lot to like.
- adolph 5y agoProject Jupyter's name is a reference to the three core programming languages supported by Jupyter, which are Julia, Python and R https://en.wikipedia.org/wiki/Project_Jupyter https://en.wikipedia.org/wiki/Project_Jupyter
- edgyquant 5y agoJulia isn’t compiled tho it has a REPL?
- TeMPOraL 5y agoOne isn't precluding the other. For example, SBCL is an implementation of Common Lisp that compiles everything ahead-of-time down to native code, and like all Common Lisp implementations, it offers a powerful REPL suited for interactive development. The compiler has low overhead, so you don't even notice that it compiles everything you type into your REPL. Another common misconception is that AOT compilers can only be used to build libraries/executables, which then get executed. Again, SBCL is an example of an AOT compiler that works at function-level granularity[0], in accordance with Lisp heritage of image-based development, where you write your program by starting it, and then adding/removing/modifying code into a running instance. SBCL achieves this by having the compiler being a part of your application runtime. I don't know how Julia is implemented internally, but since it's essentially a Lisp clothed in syntax that's more pleasant to the masses, it inherits a lot of Lisp family heritage. That could easily include a fast, to-native, in-process AOT compiler. -- [0] - Or maybe even lower.
- kuang_eleven 5y agoLuckily, Python >> R > Matlab, and the fight between R and Python is core to data science. Last I did any real investigation, R still had the edge in highly-theoretical and new techniques, for whatever reason it was much more used by academics, but Python was eating R's lunch for non-academic data science.
- dragontamer 5y agoI've given SciPy a try, but its performance is grossly lower than R and Matlab in my experience. SciPy also seems to be missing plenty of things. You get pretty far (basic filter design seems easier in SciPy than Matlab), but Matlab has so many different mathematical fields in it that Matlab vs Python are just incomparable in terms of mathematical usability. Matlab has way more features. R is statistical-slant, so you have all sorts of distributions and statistical features. Matlab is general mathematics (but especially matricies). So you can grab say... Galois Fields between 2^2 through 2^16 and just start working with them immediately. Matlab itself is decently replicated by Octave (which is a great project), but it should be noted that Octave aims to be largely compatible with Matlab (so all of my complaints about how awful that programming language still applies).
- bachmeier 5y ago> somehow it managed to become the official language of statistics research There's zero mystery to this. The intended audience is people that want to get stuff done. Professional software developers commenting on R are like this: "He's such a good salesman. He does everything the right way. He dresses right. He talks right. He has the best smile of any salesman I've ever seen. He fills out his reports on time. Granted, he doesn't make many sales, but why would you hire one of those other guys over someone that's perfect?"
- Grimm1 5y agoMmmm more like like they try to put the salesman in an operations role and wonder why the company has broken down. If you tried to use R for an actual engineering project you'd wind up with a system that is always on fire. Where as these one off analysis it's fine because it's just a one off. We want to get stuff done too, but we need it to hold up for more than a few hours so that's the mode we think in.
- bachmeier 5y agoEvery HN discussion: I do real programming. Everyone else works on toy problems.
- Grimm1 5y agoIt's all real programming and it has all the real consequences, but there is a distinction between something that needs to live for a day, a few months, maybe years and then maybe have multiple people work on it, have it communicate with other systems or not and the level of investment and structure you need to put into a system to make sure that's possible. Programming has a very low barrier to entry and that is incredibly powerful but there is a big gap between someone writing one off scripts to solve immediate problems and people writing highly connected systems that withstand scrutiny. I've always personally been for accreditation for software engineers much like pretty much every other engineering discipline.
- blacktriangle 5y ago
- andyonthewings 5y ago> It makes hard things easy and easy things hard. People also say it for k8s. And it kind of explains why k8s is creating so many jobs.
- ghaff 5y agoI'd generally argue that, if you're trying to do easy things with Kubernetes, there's a good chance you're using the wrong tool.
- outworlder 5y ago> And it kind of explains why k8s is creating so many jobs. Is it 'creating' jobs? I think it's merely making it easier to specialize. A few problems are unique because of container usage, but by and large K8s is trying to do what's otherwise a difficult job. Try assembling your own distributed container system with scheduling and whatnot and see if you can build something easier to understand or that works better. Maybe you can, but there's inherent complexity. The criticism of K8s should really be criticism of indiscriminate container usage and the attempts to ship a company's organization chart as microservices. Many applications should really be monoliths and would work better that way. Some should be split on different "services" (not _micro_) along obvious interface points. Just a minority should be architected as microservices from the get go. Distributed systems are _hard_
- collyw 5y agoI imagine that you could get rid of kubernetes in 90% of the projects it is used in. We have it at my work, must have taken around six months to a year for on dev. Sure we can autoscale now, but we never actually need to. It saves us a bit in server costs, but more in maintenance / dev time.
- jokethrowaway 5y agoWhat's the previous system you had which required less maintenance than k8s?
- sedeki 5y agoFWIW, R started to make sense to me (as a programmer) once I read Advanced R by Wickham.
- mbreese 5y agoI have a colleague that use R as a general purpose language (I'm in science), and it's horrible. He runs into problems all the time and usually the answer is "more RAM". For the things it's good at, it's great. For everything else I avoid it like the plague. More often I find it easier to use a quick Python script to generate a data table that I can then read into R to perform whatever stats or plots I need. It's almost always faster than if I had just run everything in R to begin with. But I think your description is spot-on. Non programmers just want to get something done and if it works in R, then great. For those of us that think in terms of software engineering, good practices can be difficult in R. The vanilla-R vs Tidyverse split has made this all worse too. These are two completely separate dialects of R that while still the same language, are completely different. It's like the R folks took the "there's more than one way to do it" mentality from perl and said "challenge accepted!".
- A4ET8a8uTh0 5y agoI agree overall. In my particular case, my employer won't let me have Python for fear I will do things with it. But it is perfectly ok for me to RStudio with 2 million useful extensions that will do similar things. For better or worse, sometimes the tools we use are the tools we are left with. And I am saying this as a recent RStudio convert. I love how easy it makes some otherwise hard things. I hate the sheer amount of hoops you have to jump through to make some stuff work. But it works and I am definitely not an engineer.
- crispyambulance 5y agoJust like any other programming language, it DOES take a good programmer to make a decent library in R that people can use on their own problems. R has had a very long evolution. It is a very different beast today in its most common usage, than it was the earlier days 10, 20+ years ago. Even the Tidyverse has some libraries that are very much crafted with a programmer mindset like purrr and tidyr. These tools are decidedly non-imperative and not straight-forward in their semantics. What makes R difficult for experienced programmers, I think, is the inconsistency of paradigms that are the result of its long history. This complicates how one writes library code. There is, however, a "sweet-spot" for R and that would be as a "notebook" based programming language much like Mathematica, Matlab, and Julia. Which one you like, I guess, depends on your taste, your own history, and the killer libraries you want to use. Whenever I have to describe what R is all about to excel jockeys at work, I just say it's "excel on sterioids". I think that's fair (albeit reductive) description. To be honest, I probably would have never learned R if Julia had existed when I started picking up R. I think I would have preferred a more ahistorical language with less "baggage" than R. But it's always worked out for me, so I am sticking to it at least for now.
- haihaibye 5y ago> R: It makes hard things easy and easy things hard Maybe you'd like this post: http://bioinfomofo.blogspot.com/2014/01/r-hard-things-are-easy-and-easy-things.html http://bioinfomofo.blogspot.com/2014/01/r-hard-things-are-ea...