16 ms·
Standardized Ladder of Functional Programming [pdf]
- pulisse 10y agoIt says something slightly worrisome about the functional paradigm that "profile, debug, and optimize purely functional code with minimal sacrifice" is considered an expert-level skill.
- llambda 10y agoOh come on. Please do not troll. That says absolutely nothing about functional programming in general and absolutely everything about the publisher. Not only could this not be further from the truth, but it's a cheap and lazy attack on a rigorous and proven paradigm. Give it a try. You might just surprise yourself.
- pron 10y ago> a rigorous and proven paradigm I'll give you rigorous, but how is it proven? I think it is a fair guess that the number of non-tiny programs (>100KLOC) making use of the "expert" concepts and skills is ~0. The number of large programs (>1MLOC) at the proficient level is also ~0.
- seanparsons 10y agoI would surmise from what I've heard that Standard Chartered easily on their own break this rule.
- pron 10y agoWhat I heard is that all of their Haskell software combined is about ~1MLOC (and they don't comprise a single system), and a huge chunk of that (a couple 100KLOCs at least) is the Haskell compiler itself, which they've modified and consider a part of their codebase. The Haskell compiler is still the largest Haskell program, and if it isn't, there are no more than a couple programs that are larger.
- seanparsons 10y agoSo in that case, what's important about your 1MLOC requirement? I can't even begin to imagine that much Haskell code versus a similar line count in say C.
- pron 10y agoModern programming languages do not vary in their line-count by too much. If you want to compare to C, you may be able to get a 1 order-of-magnitude reduction in size if you're lucky, but 10MLOC C programs are common (Linux kernel is >15MLOC; MS Office is 30MLOC; LibreOffice is 12.5MLOC), as are 1MLOC programs in more modern programming languages.
- tome 10y ago> a huge chunk of that (a couple 100KLOCs at least) is the Haskell compiler itself, which they've modified and consider a part of their codebase Please don't talk about what you don't know. Standard Chartered's Haskell compiler is written completely from scratch and is not based on any existing compiler.
- pron 10y agoSorry, that's what I'd heard (or I may have misinterpreted "a variant of Haskell" as "a variant of the Haskell compiler" all on my own); thank you for correcting me. So what you're saying is that biggest Haskell program isn't the Haskell compiler, but that the two biggest[1] Haskell programs are two completely different Haskell compilers. (Also, while it has little to do with my point, I've also heard that the person behind SC's Haskell compiler is the one who'd written the first ever Haskell compiler, long before he started working for SC; is that true?) [1]: Please don't take this too literally. In the two decades that have passed since Haskell was declared the language to end world hunger, someone may have written a bigger program. Maybe even two.
- tome 10y agoAFAIR the Mu compiler is not even the biggest program written in Haskell inside Standard Chartered.
- Silhouette 10y agoHow what proportion of the entire global population of functional programmers who qualify as proficient or better on this scale are employed by Standard Chartered? (This is intended as a serious question, not a troll. It often seems that in discussions of FP, and particularly of Haskell, someone will suggest that there are few widely-known, large-scale projects written in this style that can be used to evaluate its effectiveness, and someone else will then reply with one or more of the same very small collection of larger projects or high profile organisations using FP/Haskell that are publicly known.)
- jghn 10y agoHow many LOC do you think Verizon OnCue involves? Don't know myself but I picture it as being large and they're all in on this type of stuff
- jfmiller28 10y agoIts the 80-20 rule in effect. Most optimization happens either by choosing the more efficient implementation or by better use of IO (see Efficient Persistent Data Structures). By the time you are down to putting in your own rewrite rules in for the optimization pass you have gone a long way into the weeds and it is a pretty advanced skill.
- mrwinalot 10y agoAny resources on where to go to learn these topics?
- buffyoda 10y agoHaskellBook.com will teach you quite a number of them. :) The Reddits for the different functional programming languages are a good place to hangout (and a frequent source of blogs and videos on these topics), and for FP in non-FP languages, there are good Github communities (e.g. http://github.com/fantasyland/ http://github.com/fantasyland/, no association with FIOL). I'd also humbly suggest that LambdaConf 2017 (May 25-27) is a great place to learn more about functional programming. There will be a special two-day LambdaConf workshop prior to the conference that introduces the basics of functional programming (no background knowledge), another that is aimed at a slightly more experience audience, and then at the subsequent conference, plenty of workshops and sessions to learn many of these topics (and others). It's a journey, but everyone can get there if they have the interest. Most of the resources out there (blogs, videos, even e-books) are free, and the remainder are low-cost if you are already working in tech. Good luck and please just let any of us lurker functional programmers know if you need a hand. :)
- bogomipz 10y agoIs there anywhere to preview some content from HaskellBook.com ? Its a little pricey for to just take a chance without seeing any same content. The TOC looks good but that's not much indication of writing style.
- leoc 10y agoThere's a sample excerpt containing a few chapters: http://haskellbook.com/assets/img/sample.pdf http://haskellbook.com/assets/img/sample.pdf .
- endgame 10y agoIt is pricey, but it is also very good. The content is quite up-to-date (e.g. covers Foldable/Traversable, teaches the Functor-Applicative-Monad progression) and working through the exercises made a lot of things click that I didn't understand before.
- lotsoflumens 10y ago"Copyright Fantasyland Institute of Learning" - I think that says it all ... in case you missed the big unicorn logo at the top.
- qofcourse 10y agoI attended LambdaConf last year and felt it was not worth the money, to say the very least.
- hvs 10y agoWhen working with functional languages (my current choice is Scala), I do feel that they require a level of mastery that "traditional" imperative languages do not. I also feel that if computer science/software engineering is ever going to gain any sort of repeatability it will be through functional design. That said, functional programming is incredibly difficult to do well without years of practice and the languages still suffer from limitations with performance that are hard to debug. While I still feel that functional programming is the "future" of software engineering, I feel it is quite a ways in the future.
- stephen123 10y agoWith time travel debuggers being the notable exception, where FP is enabling much better debugging. http://debug.elm-lang.org/ http://debug.elm-lang.org/ as one example.
- Sean1708 10y agoMaybe I'm missing something, but how is that different to something like rr[0]? [0]: http://rr-project.org/ http://rr-project.org/
- dkoontz 10y agoFrom the rr site: Remember, you're debugging the recorded trace deterministically; not a live, nondeterministic execution. The replayed execution's address spaces, register contents, syscall data etc are exactly the same in every run. Elm's debugger (and similar projects like the Pux debugger from PureScript-land) are live systems. They are replaying all events deterministically but you can edit your code, reload it and then replay the exact same series of events or toggle events on/off and see what the resulting state is. rr is super cool and I'm very glad it exists but it's a static analysis tool where the Elm debugger is almost REPL-like in terms of how you can play with things and see the results live.
- deleted 10y ago[deleted]
- alexandercrohde 10y agoI get the sense that most engineers would almost never use, and never need to use, most things beyond advanced-beginner in this sheet. It may be fun to brag about knowing how to use "embedded DSL with combinators," but is that really the best thing to help your startup succeed? I suppose I'm slightly bothered by the fetishizing of challenging knowledge for challenge sake. Most of the people I know who learn about "Embedded DSLs with combinators" and set theory seem to not be able to stop rubbing in how smart they find themselves, and yet strangely they never seem to be the most productive engineers (in terms of delivering useful and reliable code). I know it can be a little disappointing to feel like there isn't a pot-of-gold at the end of the rabbit-hole, but this is no different than most disciplines. You use arithmetic daily, algebra weekly, calculus monthly, imaginary numbers annually or less.
- nine_k 10y agoThis is not about being smart. This is mostly about low defect rate and ease of modification and maintenance. Hopefully the smarter bits van be factored out as easier-to-use libraries.
- thelambentonion 10y agoTwo potential counter-examples to your productive software claim: Opaleye [0], an Arrow-based [1] DSL for Postgres SQL that allows the user to create type-safe, composable, and (generally) optimally fast SQL queries. Halogen [2], a type-safe frontend framework for PureScript [3] that models view component interaction as an algebraic datatype containing query actions (among other fairly advanced concepts). If someone is used to a certain level of abstraction, then the higher levels might seem unnecessary until they invest the time into learning them. The only thing unique to functional programming is that it has inherited a lot of terms from theory (profunctor, monad, algebra) rather than inventing friendlier ones. [0] https://github.com/tomjaguarpaw/haskell-opaleye https://github.com/tomjaguarpaw/haskell-opaleye [1] https://www.haskell.org/arrows/ https://www.haskell.org/arrows/ [2] https://github.com/slamdata/purescript-halogen https://github.com/slamdata/purescript-halogen [3] http://www.purescript.org http://www.purescript.org
- 10y ago
- andolanra 10y agoSome complaints about this list: 1. This list is very Haskell-focused: it includes lots of features which only make sense in Haskell or very Haskell-like languages, and lacks mention of many interesting functional programming concepts which don't appear in Haskell (like ML-style modules and functors, row types, macro systems and homoiconicity, and so forth.) There are a lot of functional languages which have very different ideas about how to program, and this list doesn't reflect that. 2. Some of the 'skill hierarchy' choices feel a bit confused and arbitrary. For example, 'Use lenses & prisms to manipulate data' appears as a Competent skill, but 'Use optics to manipulate state' appears as a Proficient skill, despite being slightly different ways to refer to an effectively identical skill. (I assume the latter means "…use lenses & prisms to manipulate data, but in a state monad," which is only a tiny difference.) 3. While I like the idea of a list of a road-map to learning, I feel like this gives the unfortunate impression that many of these are obligatory skills. It calls itself a "standard" hierarchy (which makes it sound like a consensus, rather than just a single person/group's opinion) and has language like "…skills that developers must master on their journey…" (emphasis mine), but the list includes a lot of things that are far from necessary for deeply understanding functional programming. You could lead a long (academic or industry) career in functional programming without a deep understanding of many concepts listed: things like comonads, recursion schemes, finally tagless interpreters, higher-order abstract syntax, and so forth. All of them are useful concepts and deserve study, but you can definitely be a functional programming expert without ever having seen a comonad. In many ways, I wish this list took a cue from Benjamin Pierce's Types and Programming Languages which features not an ordered list but a graph of the concepts related in the book, and how they relate to other concepts. It would be more complicated, true, but also a lot more honest about the academic and intellectual path you might want to take through functional programming, and without giving the idea that you need to master the vagaries of dozens of Oleg Kiselyov's papers just to be "competent" in functional programming.
- tel 10y ago> not an ordered list but a graph of the concepts I like this idea a lot
- 10y ago
- joostdevries 10y agoIt's funny to see that singleton types are within the highest level: 'expert'. While in Typescript they're, together with union types, the most intuïtive thing ever. I guess that's because to express them in a language that doesn't have native support requires advanced deftness in typelevel programming. Like f.i. implementing them yourself in Scala 2.x. So I expect the coolness factor of singleton types and union types to fall precipitously as soon as Scala 3.x/Dotty becomes prevalent. They'll be 'just' a powerful feature that everybody understands and uses all the time.
- sleexyz 10y agowrong "singletons" http://stackoverflow.com/questions/16017294/singleton-types-in-haskell http://stackoverflow.com/questions/16017294/singleton-types-... Singletons are a way to emulate dependent types with typeclasses, datakinds, and GADTs
- joostdevries 10y agoNo it isn't http://www.slideshare.net/yoozd/union-types-and-literal-singleton-types-in-scala-and-typescript http://www.slideshare.net/yoozd/union-types-and-literal-sing...
- sleexyz 10y agoMost useless thing ever created for functional programming anything. It's not even biased towards Haskell; it's biased towards working at Slamdata, where they abuse free monads for everything. When you write Javascript and use first class functions (ideally without side-effects, but who the fuck really cares), that's functional programming. Tired of this elitism.
- sleexyz 10y agoThe real point behind this is so programmers who understand trivia like singletons and recursion schemes can walk around during conferences and feel good about themselves for being "experts". Some of this stuff is cool and interesting, even to me -- but please don't rank people based on their inferiority of knowledge WRT to you, as you are explicitly doing
- Veen 10y agoI'm glad that's the general attitude. I've been learning Elixir for a couple of months now and my first though was: "crap! I've never even heard of most of this stuff, never mind understanding it." I know I have a long way to go before I'm a competent with functional programming, but I thought I at least understood the basic landscape, even if I don't know how to apply it properly yet.
- a-saleh 10y agoI.m.o. abusing free monads for everything is kinda awesome :-)
- seanparsons 10y agoElitism is learning more powerful constructs? There's a lot of elitism in the construction industry then with people checking the load bearing of materials rather than building everything from mud.
- pron 10y agoLoad bearing materials actually carry significantly higher loads than mud; those Haskell constructs have not even been used to build software as intricate as common industry practice, let alone break new ground. Are they truly more powerful? That's a popular hypothesis among those who are aesthetically drawn to those concepts.
- plinkplonk 10y agoOne way to process this list is to see it as an elitist construct intended to put you down or degrade you or extract money from you for training etc.(which might even be true, but generally it is better, ime, to assume that people are genuinely trying to provide what they see as value) The other is to ignore any insult, intended, perceived, or a mix of both, ignore all the hierarchy labeling - 'beginner', 'advanced beginner', "standard ladder" etc who tf cares? - and just see if there are skills you can pick up or explore on your own. That said, I laughed at 'equational reasoning' being considered an 'expert skill'. It is considered an advanced technique but imo the basics are trivial to pick up, and I had a lecture/demo on this at a local fp conf. Sure it can get very hard if you tackle a hard problem, but that is true for everything.
- tel 10y agoIn response only to the third point, there are some very nice examples of "advanced" equational reasoning in the work of Richard Bird. Pearls of Functional Algorithm Design [0] is a great book for exploring this and demonstrates a very "expert" nature. [0]: https://www.amazon.com/Pearls-Functional-Algorithm-Design-Richard/dp/0521513383 https://www.amazon.com/Pearls-Functional-Algorithm-Design-Ri...
- deleted 10y ago[deleted]
- JackMorgan 10y agoI saw this pdf before all the angry comments, and was very excited to see a list of fun topics to explore and learn. I love skill trees in Skyrim etc, and to me this looked like a real life version! Time to level up!
- nikojn 10y agoYeah, not sure what all the fervour is about. I've found the biggest hurdle to advancing is knowing what to study next; this helps solve that.
- bamurphymac1 10y agoLooking forward to Chris Allen (@bitemyapp) opining on this over on lobsters.
- coolsunglasses 10y agoI don't really want to though. Here's a couple threads: https://twitter.com/bitemyapp/status/803720075702255616 https://twitter.com/bitemyapp/status/803720075702255616 https://twitter.com/jdegoes/status/803721209439514624 https://twitter.com/jdegoes/status/803721209439514624
- geooooooooobox 10y agoI just found the path of light, I feel truly blessed
- pron 10y agoActual ladder: 1. Writes simple programs 2. Writes more complex programs 3. Writes programs that are maintainable 4. Writes programs that are maintainable by others, and communicate module intent clearly to team members who interact with it 5. Writes programs that are maintainable etc., and also make good use of resources, both computational and human The emphasis on language concepts seems so distracting that I wander how much time people have left to make their program externally better (better functionality, better performance, more maintainable by others) rather than internally better (make use of clever abstractions). That the two are related is a hypothesis which doesn't seem to be supported by evidence, and is believed by those who enjoy thinking about the latter more than about the former and want to justify their focus.
- tempodox 10y ago+1. Also, s/wander/wonder/.
- kriro 10y agoUnicorn level: Explain what a monad is to CS101 students and have them grasp the concept. ;P
- foo303 10y agoI love this list. Sure, shortcomings might be there, but trying to create a list of actual topics and ranking them is not a bad thing. It would really help folks at any end of the spectrum to explore new topics on their own.
- pyrale 10y agoEven being a Haskell enthusiast and loving playing with stuff in the list, this does not reflect well on Lambda conf and, unfortunately, on Haskell. The smugness and self-importance displayed in there is quite the opposite of the virtue of code simplicity put forward by e.g. Don Stewart at HX this year.
- js8 10y ago> e.g. Don Stewart at HX this year Can you give some link? I wasn't able to google it.
- dmit 10y agohttps://skillsmatter.com/skillscasts/9098-haskell-in-the-large-the-day-to-day-practice-of-using-haskell-to-write-large-systems https://skillsmatter.com/skillscasts/9098-haskell-in-the-lar... Requires registration.
- bbotond 10y agoBest way to convince someone that they will never, ever have any chance of understanding functional programming and therefore should not even bother trying it.
- seanparsons 10y agoComments like this are more likely to do that than the original post. Just give it a bash and someone will help you if you struggle, I would.
- the_af 10y agoWhy? Even at the level of Advanced Beginner (which is pretty concrete and easily attainable), FP is already hugely useful. Everything at that level is both useful and relatively easy to understand. It's going to improve your code even if you use a language not particularly tailored for FP. The rest is just icing on the cake, and you don't have to deal with it if you don't find it interesting.
- wlk 10y agoThere was something similar suggested by Martin Odersky for scala few years back: http://www.scala-lang.org/old/node/8610 http://www.scala-lang.org/old/node/8610 It didn't get much traction back then. But overall I like the idea as a roadmap for learning particular language or skill set. I'd like to something like that but with references to material where particular skill can be learned, etc
- loup-vaillant 10y agoReading this list, I was tempted to rename the hierarchy thus: Novice, Apprentice, Journeyman, Expert, Master. Maybe I'm playing too much Skyrim…
- hueving 10y agos/Ladder of Functional Programming/Our Ranking of Things We like in Haskell/
- toolslive 10y agos/Functional Programming/Haskell ?
- agumonkey 10y agospeaking of functional programming language, here's a nice history of ML (from stratchey to milner, landin et al.) https://www.youtube.com/watch?v=NVEgyJCTee4 https://www.youtube.com/watch?v=NVEgyJCTee4
- mannykannot 10y agoI am generally a pragmatic person, but some of these arguments are wandering into a defense of ignorance. I am hoping that learning about these things will improve my problem-solving in general, and I don't mind being labeled a beginner. It is also clear that there is not just one FP.
- chriswarbo 10y agoI agree with others that there's far too much Hasochism in this list. I do think of FP as being like a ladder or spectrum, but rather than progressing towards some elitist niche, I see it as more empowering and anti elitist. In my opinion, if you refactor a Java class to change a setter into something which returns an altered copy, you've just made your code a little bit 'more functional'; if you use a list comprehension in Python instead of a for-loop, you're code's become 'more functional'; and so on. The nice thing is that many of these small changes are also good practices to be following regardless of whether you want to be 'functional' or not. Regarding the 'advanced' concepts, I'd say they exist mostly for library/DSL authors who don't want their users to have to care about those concepts. Using libraries based on these ideas is great, as the author may have chosen these techniques in order to give the library correctness guarantees, or efficient resource usage, or good error messages, etc. Using these ideas to write a library can, occasionally, provide a solution to an otherwise tricky situation, e.g. if you need to maintain state, whilst offering the users a pure interface. Using these ideas to write a library for your own usage changes the cost/benefit calculation considerably, since you're not limited to providing an API: if you want efficient resource usage, can you achieve that by keeping resources in mind when writing the application code? If so, you probably don't need to over-engineer one particular component to enforce this for you. And so on. Another thing I'd change about this ordering is to put dependent types much earlier, e.g. at "advanced beginner". Dependent type systems are very simple; they're just a slightly more complex version of lambda calculus. Sure you can use dependent types in complicated ways, just as you can write complicated lambda functions. They're certainly easier to grasp, and strictly more powerful, than Haskell's complicated mess of monomorphism restrictions, singletons, kinds, type families, etc.
- the_af 10y agoI agree with you about the gradual refactoring. I love FP and according to that list, I'm mostly an "advanced beginner"... and I see nothing wrong with that. Even "just" refactoring Java or Python code to be more functional is a huge win. Even "just" using Scala in a more or less FP way is a huge win. I don't fret being unfamiliar with Lenses or whatnot yet.
- barrystaes 10y agoIn related news: How To Use Black Backgrounds To Make Sure Nobody Likes To Print Your Document .
- Fiahil 10y agoI prefer this one : http://www.scala-lang.org/old/node/8610 http://www.scala-lang.org/old/node/8610 I think it's a better idea to separate skills required to use most of the language, and the ones required to create libraries.