HN user

hardboiled

48 karma
Posts0
Comments36
View on HN
No posts found.

Tidyverse code is not write-only; it is designed to be mostly read-only where the level of abstraction is at the level of the domain, which in this case is data frames and data pipelines akin to the same constructs in relational algebra/SQL or data processing (map/reduce).

Correct usage requires learning the right abstractions, but fortunately these abstractions are shared across language communities and frameworks.

If you are doing any data processing work and you do not know about foundational functional concepts ie map/reduce then I would argue the code you write is less readable, overly focused on the idiosyncracies of how to do something rather than how entities and data are related to each other - their logic and structure.

The main optimization is to be correct and expressive of one's intention and purpose. If you need performance use Julia.

I concur with your sentiments having cultivated data science teams from the ground up with diverse educational backgrounds.

Programming in base R is more akin to assembly language and has accreted a babel of inconsistencies that make it difficult to teach and learn. Learning base R isolates you into a Galapagos island of academics who are either ignorant of the needs of data workers or too elitist to engage with those not in their priesthood.

Learning Tidyverse is a considerably better transition for learning other languages, frameworks, and libraries.

Functional programming is closer to algebra than indexing into data structures with magic numbers. I've found more success teaching functional pipelines of data structures using the idioms in Tidyverse as a general framework for data work than base R. Abstraction has a cost but for learning it is the appropriate cost.

I sense that much of this `monopolistic` fear mongering is really about feeling out of date.

The Chinese government has prevented plenty of US companies from doing business in China including Google, but more importantly is the rejection of patents and intellectual property and espionage conducted by Chinese government, which has cost US companies billions and the US government hundreds of lives.

R is quite good at developing DSLs (quite Lispy), but Julia is even Lispy-er with a more flexible syntax and unicode identifiers. R, definitely, has a great statistical lineage, but that is also unfortunately what limits it from being as expressive - especially regarding new data types. No one in R creates their own domain-specific data types (that are performant as well) whereas this is the norm for the Julia ecosystem.

https://docs.julialang.org/en/v1/manual/metaprogramming/inde...

The irony is that if you use Patreon's search functionality to search for slurs and other hate speech you will find plenty more blatant and obvious instances on their own platform.

R in Ecology 9 years ago

Agreed. The `raw` data collection should be transparent and in a format that is not locked into Excel spreadsheets.

Reals are not equivalently as unrealizable or dubious as infinitesimals. Infintesimals can be constructively specified as nilpotent/nilsquare entities, numerical entities which when squared equal 0 but where those entities themselves aren't reducible to 0. All of this can be done in a constructive manner avoiding any use of infinity or classical logic that depends upon indirect proofs (ie excluded middle). John Bell's 'Primer of Infinitesimal Analysis' has good details.

The computational techniques from Automatic Differentiation use these types of entities to calculate derivatives exactly without approximating infinite (limiting) processes.

Calculus can be done constructively without infinite limiting processes purely algebraically using these nilpotents. And from a geometric interpretation there is nothing nonsensical about a tangent line to a curve.

Also you don't differentiate numbers (real or rational), you can only differentiate functions.

Also the idea of a actual infinity is a poetic mathematical one. It doesn't have to fit reality. The issue is whether it is useful and to what extent.

Disagree about the idea that those who are unfamiliar with type theory prefer dynamic typing.

Typing preferences are usually due to trends in language usage having little to do with knowledge.

Plenty of java programmers use static typing without ever having to understand type theory.

But looking to history of language designers/implementers

Dan Friedman

Gilad Bracha http://www.infoq.com/presentations/functional-pros-cons

Guy Steele

Rich Hickey

All of these guys have worked on static languages, have a keener understanding of type theory than most, and yet they seem to promote dynamic languages at least when it comes to their pet languages.

As a former academic I find this kind of behavior antithetical to the principle's of science. The scientific publishing industry is archaic and a burden on the progress of science. These journals are gatekeepers for both consumers and producers of public research. I've worked on some research projects that took nearly 2 years to get published after the all of the data collection and analysis had been already completed. The peer-review process can always be over-ridden by the editors and it is the editors who get to choose who reviews the research. So instead of having all of science practitioners to bear on work, it's a select group that an editor deems worthy. Despite all of our technology, the politics of control remain the same.

There is nothing wrong in not liking OO. But OO is an ambiguously defined paradigm and unlike functional programming doesn't really have a definitive calculus. However, Peter Landin did show that untyped OO could be reduced to lambda calculus.

I think there is a difference between OO as it is practiced and interpreted by mainstream languages such as Java, C++ and how it was originally intended to work (a la Smalltalk, Self). Interestingly as someone who got started with Scheme, I found that Javascript actually helped me understand OO and FP in a more integrated way: Functions/closures as these hybrid Objects or vice versa Objects as Functions/closures. Objects were intended to just abstract away the structure of data and state (but I see lots of OO that treats objects like data structures with lots of mutable state) whereas with functions they are coupled to the representation of the data structure, which is fine if there is either a small set of data structures (lists/trees for Lisp/Scheme) or the domain you're modeling has an optimal stable data representation.

Also after looking at Self, I think class based OO is a more difficult starting point into OO. Inheritance is one modeling method of OO but is way over used. And cause me all sorts of frustration when I started OO.

So if you think you don't like OO, you have to really define for yourself what OO to you means. It means a lot of things to different people. For java programmers it means making everything into classes and interfaces, lots of types and hierarchies, no lambdas(yet?). Some assume the difference between FP and OO is mutable state or first-class-functions. But I don't believe so.

It is really an approach to abstraction: does the structure of the data change more than the operations on that data, then OO is better suited there.

SICP is more for college level students with some high level mathematics background (basic calculus) and tackles computer science ideas directly. HTDP (at least the first edition http://www.htdp.org/ ) was intended for beginners without as much math background except for algebra. I actually prefer HTDP over SICP as an introductory text in computer programming and the Scheme language in particular. It's a great read in how to approach programming problems. I was actually exposed to designing with contracts through this text before I was ever exposed to Eiffel. And it's approach to teaching recursion was very gentle and practical. While SICP is great in ideas and prose, it is in some ways too abstract. HTDP is more grounded and covers those details that SICP assumed you'd have. No harm in reading both though.

R has always been a niche language/platform for dataists/statisticians and because of that it really hasn't had the contributions of programming language developers and modern techniques.

It'd be cool to see R evolve more quickly as a language (implementation wise). We're getting hints of it with the new byte code compiler though.

That would be ideal.

The only really good way to walk confidently is to feel confidence. In order to feel confident you have to be less self-conscious. The best way to do this is to focus your attention outside of yourself on your surroundings, other people, etc.

Where you look or focus conveys immense confidence. You can practice looking at people directly in the eyes as you walk up to them.

Confidence is relaxed and not self-conscious or tight. So if you must focus on yourself, I'd begin by focusing on breathing deeply and easily while walking. Try walking and moving your arms slower. Confident people seem to never hurry.

Confident walking is really tough thing to isolate outside of confidence in general.

Word. Agree completely with your comments georgie. Although there are high level abstract programming ideas that are beyond any particular language, the only true way to learn about them in any practical/actionable sense is to program in a language that can express those ideas.

It's very hard to understand recursion or closures without expressing them out through a language. I don't remember who said it 'but programming is understanding.' Likewise how do I know you understand object oriented programming unless you can program idiomatically in an object oriented language like Smalltalk, Self, or Ruby?

Or how do I know you can program functionally unless you can program idiomatically in a functional language like Scheme, Haskell, or Erlang and not in some hackish, crude way but idiomatically? But in order to program idiomatically and elegantly in the respective languages requires learning libraries, learn the constraints of the language, its quirks, its opinions,etc.

Actually it's a really good regimen. Not so sure about the curls. Depends on where you want to target I suppose. But to gain muscle you're going to have to lift heavy and to muscle failure with lots of rest, specifically squats and deadlifts. These exercises target the largest muscles and induce the most growth hormone production.

I've tried the 5x5 strong approach to lifts but haven't gained too much weight or muscle. But did get a lot stronger.

Personally, I've never been to into growing muscle. More into developing power and strength. For that I picked up power lifting and kettlebell training.

If pushups get too easy try doing one-arm pushups. One-legged squats (aka pistols) are also good. Best