tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
[personal profile] tim
Long overdue, here are my notes on the talks at CUFP 2014 (September 6, 2014). This is the last in a series of conference write-up posts from me that cover CUFP, the Haskell Symposium, Erlang Workshop, and the three days of ICFP itself. CUFP is the workshop for Commercial Users of Functional Programming, and I was honored to have served on the program committee for it this year.

Joe Armstrong's invited talk, "Making Money with FP", was quite entertaining... for the most part anyway. His comment that you can't sell a language, and must sell a project written in it, harked back for me to working at Laszlo Systems in 2005.

He made the point, about adoption of FP, that "nobody ever got sacked for using Microsoft products (or Java, or C++" -- also this gem, "You get paid based on the number of people you manage, so people hate the idea that ten Haskell programmers can do what 100 C++ programmers can do." (I'm not confident that that generalization always holds, but it does seem to be true in my experience.)

One aside that marred an otherwise great talk was an unnecessary use of "guys" on a slide, when Armstrong said (while speaking to the same slide) "technical guys enjoy an argument". One or the other and I might have let it slide, but not all "technical guys" enjoy an argument, plus technical women who enjoy arguments are punished for that while technical women who don't enjoy arguments tend to get steamrolled.

Then, Armstrong went on to talk about different business models for making money from FP. Most of this advice seemed broadly applicable, but it was still good to hear it coming from one of the people who is most qualified to talk about "how to make money with FP". He implied, I think, that the best two routes for a person trying to get into business with FP were either a consultancy (where you are an independent businessperson who sells consulting hours or services to other companies) or a development/R&D company where the goal is to "develop a product and sell it to a bigger company that can sell it." He explained how a good way to gain a reputation is to participate in the standardization of a language or framework: either choose a new standard or invent one of your own, and then make the best and first implementation. Then, you sell or give away software to build your reputation (which is why you can't sell a language, I guess!) and finally, sell the company :D

I wondered, based on that disquisition, whether the software necessarily has to be proprietary. (I don't know the answer.) Armstrong said that half the battle was settling, half was exit strategy. He notes that the lack of experienced programmers is "slowing things down" (something I find plausible, though I wonder how different that would be if more than half of women in tech stayed in the industry past the ten-year mark, which is to say, if men stopped harassing them until they quit.)

Finally, he talked about setting consulting rates, recommending that a benchmark is that a sixth of potential clients should say "no, you're too expensive". He noted that if you charge twice as much and get half as many jobs, your income stays the same and you have less work to do :D

Next was Timothy Perrett talking about functional programming at Verizon OnCue (video). They redesigned a system completely, writing the new version in Scala from the start.

I find the claim that programmers who didn't start with a functional language "have to unlearn a lot" to be misleading. For one thing, how many people are there as a baseline who learn a functional language as their first language and become professional programmers? Some, but not many. So it seems like there's not much of a baseline to compare to. And to me, how much somebody has to unlearn depends a lot on the quality of their education (whether formal, self-directed, or both).

Perrett described moving from Java to Scala as being a "constant struggle against your own instincts"; he said that we need two types of education to help people make the jump to FP, evangelism ("internal marketing") and more grassroots distributed learning. He said something I completely agree with, which is that many computer science people don't learn well in classrooms (I certainly don't, and I wonder how many people do in general, computer science or not -- given that the educational system is designed by people for whom the existing system worked well). He recommended distributed learning, pair programming, and team sessions, all of which are things I think are useful for many people, at least when used wisely.

He recommended that people beware of too much abstraction, since library re-use tends to engender inconsistent abstractions. Grudgingly, I'd agree with that. He described the end result as a "functional core with an imperative wrapper", which seems to resonate with how good Haskell and Rust code was written. His overall feeling was "we'd do it again" -- he commented "happy teams are productive teams", and it sounded like the teams he managed were happy using FP.

Next, Maxime Ransan from Bloomberg video spoke about porting a system from C/C++ to Ocaml (with some JS for the front-end). He commented that Ocaml made people more productive than they were in C++ because of its shorter write/compile/run cycle; that it was more fun; that using Ocaml changed the way in which they wrote JS and C++; and that writing in Ocaml improved the code's separation of concerns. None of these findings are surprising to me, but it's always good to have more evidence!

He said that one difficulty was that of relating types to each other in order to use foreign libraries, which is certainly something I've struggled with in Haskell and Rust. He also said that there was a real lack of practical guides on writing good OCaml programs, and that a lot of the documentation out there was "just reference manuals". Indeed... how do people learn that, other than the hard way? I really don't know.

Eirik Tsarpalis talked about F# for gaming; he said it's used a lot in that community and that the F# community is a good one. (Though no one ever seems to say "we have a bad community ;-) The good things, he said, were that (like OCaml) F# is functional and has static types (motherhood and apple pie stuff) and that it runs anywhere (which, admittedly, is a little different).

Michael Oswald from Siemens gave a quite entertaining talk on Haskell and mission control [video?]; his comment about low-level hacking was "Unfortunately, I'm quite good at this stuff." He led a rewrite in Haskell of software for controlling telecom satellites, approaching this by rewriting independent non-critical components first, with the same requirements as the original components. This helped with getting buy-in, but meant they needed to simulate some parts during development.

He said that he estimated the productivity gain moving from C++ to Haskell as "a factor of 1.5 to 4". This seemed like a pretty wide range, so I asked how he would estimate more precisely; he said the imprecision was due to ramp-up time for people learning Haskell for the first time. He also said that eventually, imperative programmers "hit a wall". I asked what they got stuck on, precisely, and he said "it's just a different mindset... there are things they assume won't work that do." I also asked whether line count was a good metric for productivity, and he said it wasn't, but that he hadn't found a better one. I'll be interested to check out Oswald's blog sometime.

Bjorn Buckwalter gave another talk on satellites and Haskell; he's an independent consultant who has consulted for Kiruna (the/a Swedish space corporation), among others. His priority is allowing satellites to have a longer lifetime; there's a trade-off between level of control and fuel usage, which can be the difference between a satellite lasting just a few months, or years. He started by writing small tools to address shortcomings in vendor software, rewriting Excel and shell tools in Haskell. He took the stealth approach: he was asked to fix these tools, not to use Haskell, but once he presented the results of his rewrites, his clients liked them. He built credibility for Haskell with an analysis to compare the new and old versions, which helped with buy-in as well.

He noted correctness and development time as being advantages of Haskell, and also that the fact that his clients weren't software developers was an opportunity: they weren't dogmatic about what languages he used, since they cared more about the results than the tools used to create them. He relied on `cabal freeze` a lot for ensuring reproducible builds, as well as keeping the Cabal config in a git repository to "protect users from cabal". When somebody asked, he went into more detail about some magical Cabal flags he uses (stay tuned for my next paper, "Improving Cabal with Machine Learning" ;)

In summary, I had a better time at ICFP 2014 (and all the related events) than I've had at any academic conference in a long time! I think it's something to do with not being under pressure to perform -- now that I'm not a grad student, I don't have to impress anybody or prove I'm smart; I just get to absorb neat ideas and talk to fun people. I'm happy to be able to (maybe) take some of these ideas back into my work and/or recreational-programming life, and to feel like I'm still a part of the FP community, loosely knit as it can be.

(no subject)

Date: 2014-11-05 06:00 pm (UTC)
aka_rat: (Default)
From: [personal profile] aka_rat
"I find the claim that programmers who didn't start with a functional language "have to unlearn a lot" to be misleading. For one thing, how many people are there as a baseline who learn a functional language as their first language and become professional programmers?"

There can't be many at all! I started learning Haskell after a decade of hobbyist game programming and my difficulties haven't been so much unlearning what I already knew but in learning jargon from imperative programming just so I could understand what Haskell tutorials were talking about! Like when Haskell tutorials say, "this is like generics in Java". I've done a little Java and a little OOP but I've never used generics so I don't know what that means. Even worse is when you're trying to use a library that's just redoing something from another language, and the documentation just assumes that you've used that tool in the other language. Like web frameworks. It's really frustrating! I'm actually taking a break from Haskell now to learn Python, because Python tutorials don't assume you already know another language...

Profile

tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
Tim Chevalier

November 2021

S M T W T F S
 123456
78 910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags