other-languages

here be heresies and things we have to use for work
jsa-aerial 2016-05-25T04:32:07.000950Z

This is something that is really worth taking in: https://vimeo.com/74354480

borkdude 2016-05-25T07:31:22.000952Z

@jsa-aerial: looks interesting, thanks for sharing

borkdude 2016-05-25T08:09:49.000953Z

@jsa-aerial: just watched it. nice

tjg 2016-05-25T08:17:00.000954Z

@jsa-aerial: Thanks, just watched it too. I suspect there's a large space for meta-programs (ones which take your program as input) to help you, and static vs dynamic is just one of many possibilities.

tjg 2016-05-25T08:19:14.000955Z

(One reason I like the lisps is because of that promise of meta-programming... coding in data structures seems like an important step to that, at least for practical engineering reasons.)

borkdude 2016-05-25T11:11:02.000961Z

Maybe it's better to go the route dynamic -> static -> dynamic, so you know for certain why you use it and not just as a given.

martintrojer 2016-05-25T11:16:05.000964Z

good talk

martintrojer 2016-05-25T11:16:22.000965Z

a bit unfair to paint all static languages as bad and use C++ as proof

martintrojer 2016-05-25T11:16:40.000966Z

(I do agree, C++ is worse than cancer)

martintrojer 2016-05-25T11:19:08.000969Z

The metrics of 'what is a type error' can be argued ofc. I'd put all null related bugs in there aswell.

martintrojer 2016-05-25T11:19:39.000970Z

The argument is; there is no silver bullet, use the right tool for the job, use the right tool for the team.

martintrojer 2016-05-25T11:20:00.000971Z

The fact is that people are different, and some work better with a type system and some don't.

martintrojer 2016-05-25T11:20:16.000972Z

One big mistake is to claim that dynlangs are better "because I think so"!

borkdude 2016-05-25T11:20:54.000974Z

@martintrojer: I agree. What I'm wondering is: is the preference for dyn. or static learned behaviour or really something personal

martintrojer 2016-05-25T11:21:03.000975Z

the truth is that there is no winner here. we're all on a jouney

martintrojer 2016-05-25T11:21:22.000976Z

some teams kick butt in F#, some in Clojure.

martintrojer 2016-05-25T11:21:42.000978Z

which is better? clojure.spec or Monads?

martintrojer 2016-05-25T11:22:05.000979Z

> The answer my friend is blowing in the wind

borkdude 2016-05-25T11:22:46.000980Z

you can have both clojure.spec and monads 🙂

martintrojer 2016-05-25T11:23:03.000981Z

To get specific, I can only speak of my own (recent) experience, and that tells me that Elm >> CLJS.

martintrojer 2016-05-25T11:23:09.000982Z

But your milage will vary

borkdude 2016-05-25T11:23:12.000983Z

However I'm not a big fan of monads in Clojure. Feels too unnatural.

borkdude 2016-05-25T11:24:07.000985Z

@martintrojer: In isolation I can imagine, but with a backend in Clojure it's just too easy to build it all in the same language.

martintrojer 2016-05-25T11:24:50.000987Z

same language FE / BE is irrelevant for me / my team

martintrojer 2016-05-25T11:24:55.000988Z

but, might be for you

borkdude 2016-05-25T11:25:38.000989Z

some project I've worked in, it would be a major win if some guy didn't start what is now 200k lines of AngularScript what could have been 10k lines of cljs

borkdude 2016-05-25T11:26:24.000991Z

but then again, I've built a Clojure front/backend that could have been built with RoR even quicker probably

borkdude 2016-05-25T11:26:42.000992Z

Right tool... hard problem.

borkdude 2016-05-25T11:31:38.000993Z

what I like about clj + cljs is that you can pass values back and forth without thinking about it too much

sveri 2016-05-25T11:56:58.000994Z

and to add more to @borkdude point, I can even define schemas in .cljc that I can reuse in clj / cljs which is another major win. And as soon as spec is ported to cljs the same is possible there.

martintrojer 2016-05-25T12:00:27.000995Z

I don't dispute that is useful. But in my case totally irrelevant.

martintrojer 2016-05-25T12:00:40.000997Z

and we have clojure backend

jsa-aerial 2016-05-25T14:06:20.000999Z

@martintrojer: I think you are bringing some baggage there. Smallshire didn't paint static languages as 'bad' (nor equally that dynamic languages are 'good'). And he didn't use just C++. The well done F# example is a significant piece of the talk. And his statistical analysis included F# and Haskell in it. And, as he points out, C++ had the 'best' results - because it is used (tested) by all the others, since so much of it is at the bottom of the stack.

martintrojer 2016-05-25T14:16:13.001Z

Agreed. I just came away feeling most objections on static langauges was using C++

martintrojer 2016-05-25T14:16:31.001001Z

Sure, he found the case when F# units-of-measures broke the laws of the universe

jsa-aerial 2016-05-25T14:16:40.001003Z

IMO, there are several real take aways from this. 1) that a real (HM) type system will pass a (reasonably well done) type construction and produce wrong results (F# example). In a sense this is not much of a surprise since these systems can't be both sound and complete. 2) We need to get beyond 'good' and 'bad' and simply realize that the hard data (such as there is) shows zero evidence for any effect on robustness wrt static vs dynamic. 3) 'type errors' constitute an extremely small percentage of errors. Again, not too surprising when you realize that most errors concern domain semantics and types don't really capture that well or in most cases at all. 4) Static tends to complect the elements of a system, where in the limit, you end up with a monolithic artifact. 5) Expressivity is far more important in robustness and productivity.

martintrojer 2016-05-25T14:18:00.001005Z

Agree with many of those points, but not 3, 4 and 5

jsa-aerial 2016-05-25T14:18:02.001006Z

I disagree that 'most objections' concerned C++

jsa-aerial 2016-05-25T14:18:37.001007Z

Hard to disagree with 3 (1-2% is small - 98-99% are not type errors)

jsa-aerial 2016-05-25T14:18:54.001008Z

4 is still debatable

martintrojer 2016-05-25T14:18:56.001009Z

His categorization of type errors was far too narrow IMHO. I'd include all null related stuff there, keyword typos in clojure etc etc

martintrojer 2016-05-25T14:19:15.001010Z

I'd say it be far greater a number

jsa-aerial 2016-05-25T14:19:29.001011Z

5 has real evidence from all the studies - admittedly these studies are small and not a good signal

martintrojer 2016-05-25T14:19:52.001012Z

4,5 suffer from haskell, ocaml, F# etc not being part of the studies

jsa-aerial 2016-05-25T14:19:55.001013Z

keyword typos would be in his type errors as well

martintrojer 2016-05-25T14:19:59.001014Z

Sure, C++ and Java sucks

jsa-aerial 2016-05-25T14:20:46.001015Z

they were part of his github study and if you look at severall other studies, haskell is often included. So, this is incorrect

martintrojer 2016-05-25T14:21:04.001016Z

keyword types leading to nill wouldn't be in his numbers (I might have misunderstood). But in my personal experince, type errors are the vast majority in (mine my teams) clojure bugs.

jsa-aerial 2016-05-25T14:21:12.001017Z

and 5 has nothing to do with dynamic vs static

jsa-aerial 2016-05-25T14:21:32.001018Z

Unless you claim static can't be as expressive

martintrojer 2016-05-25T14:21:35.001019Z

I have a very wide type-error bucket tho

martintrojer 2016-05-25T14:22:42.001020Z

I'm only offering an opinion here, what's true for me. I'm not claiming its universally true.

martintrojer 2016-05-25T14:22:52.001021Z

but I am faster / better in a typed language.

jsa-aerial 2016-05-25T14:26:52.001022Z

I think what you are really saying is 'belief'. That's one thing Smallshire (and others) has pointed out as a sad state of affairs - there are few (and not significant in scale etc) real studies giving hard evidence on this stuff. Peoples claims largely boil down to belief - or as Smallshire puts it 'religion'.

martintrojer 2016-05-25T14:26:56.001023Z

I don't dispute the scientific 'hard' data -- just wished it was a bit more up to date

martintrojer 2016-05-25T14:27:18.001025Z

but I do disagree with his categorization of what is a type error.

martintrojer 2016-05-25T14:28:42.001026Z

Re; religion, I guess. Writing code is still a by-hand artisan trade.

jsa-aerial 2016-05-25T14:28:53.001027Z

My belief (!!) and fear is that you just can't create good scientific studies at the scale needed to get a signal from the noise. If there is to be any good evidence, I think it is going to have to come from data mining stuff like github. So, in that sense his (admittedly not well controlled) study is in the right direction

martintrojer 2016-05-25T14:29:32.001028Z

Counting resported issues in GH vs langauges is quite misleading

martintrojer 2016-05-25T14:29:45.001029Z

ignoring bug-reporting culture in communities etc

martintrojer 2016-05-25T14:30:56.001030Z

But, if we get scientific / put money into it. It'll probably still be a wash

martintrojer 2016-05-25T14:31:18.001032Z

I don't think you can prove that either is better.

martintrojer 2016-05-25T14:31:26.001033Z

The answer is always; 'it depends'

sveri 2016-05-25T14:32:14.001035Z

I want to point at: http://research.microsoft.com/apps/mobile/news.aspx?post=/en-us/news/features/nagappan-100609.aspx which showed the the two most significant factors for bugcount are TDD and the structure of the organization a team works in.

sveri 2016-05-25T14:32:39.001037Z

I also think that static / dynamic never showed a big benefit in either way.

sveri 2016-05-25T14:33:57.001038Z

Also it might be that Haskell has a good HM implementation, but, if I imagine that all my colleagues would have to learn Haskell (myself included here) and have to become as productive as we are now, it would take months to years, for sure.

sveri 2016-05-25T14:35:07.001039Z

Its nice to have a good type system, but, if I think of the last months of my work, none of the problems I had would have been hit by a type system (OSGI / classpath problems mostly)

martintrojer 2016-05-25T14:35:39.001040Z

agreed. A big bias is what individuals you've got in your team. How the team works, and their experiences.

martintrojer 2016-05-25T14:36:02.001042Z

If the team is working, language doesn't really matter

jsa-aerial 2016-05-25T14:36:18.001043Z

Of course naive 'counting' in github is not good enough. That's obvious but irrelevant to the point, which is that things like github are the only place where you have enough data to work with.

jsa-aerial 2016-05-25T14:37:36.001044Z

As for $$ for real studies, you won't find anyone willing to throw (literally) millions at this. Actually probably 10s of millions to get real at scale controlled studies across all manner of variables involved.

martintrojer 2016-05-25T14:38:09.001045Z

its cost / benefit.

martintrojer 2016-05-25T14:38:25.001046Z

Lets say microsoft did this study and dynamic came out on top.

martintrojer 2016-05-25T14:38:38.001047Z

what would they do? force the office team to switch from C++ to http://VB.NET?

sveri 2016-05-25T14:39:50.001048Z

Looking at the M$ study I would not even think about static / dynamic, but instead enforce TDD for all teams and think about how to improve my organizational structure

jsa-aerial 2016-05-25T14:40:06.001049Z

Yes, but the problem here is the cost is to a single (or small group) while the benefit would go to others. This is a classic govt type thing, but again, the numbers involved pretty much guarantee no agency (NSF, DARPA, etc) will dump that level of $$ at this in the current 'climate'

martintrojer 2016-05-25T14:41:06.001050Z

the thing is that the software teams are tribal. If the bosses forces a F# team to swtich to Clojure they'd all quit.

martintrojer 2016-05-25T14:41:18.001051Z

and they cripple the company

martintrojer 2016-05-25T14:41:39.001052Z

so even if a massive study came out saying dyanmic is slightly better, nothing would change

jsa-aerial 2016-05-25T14:42:47.001054Z

Certainly nothing would change any time soon. In the long run maybe