Join 3,572 readers in helping fund MetaFilter (Hide)


You want to go and slay all the false statements in the world
August 1, 2014 11:28 AM   Subscribe

This Letter to a Young Haskell Enthusiast is mostly not about Haskell, or about programming, but about being a good person in an online community.
posted by swift (40 comments total) 20 users marked this as a favorite

 
I get the sense from reading this that the author may have conflated Haskell enthusiasts with Eddie Haskell enthusiasts.
posted by Sys Rq at 11:51 AM on August 1 [3 favorites]


Believe in everyone, attack nobody, even the trolliest.


AKA, Assume No Malice. Great advice, as it simultaneously avoids inflaming situations and frustrates trolls.
posted by ChurchHatesTucker at 11:56 AM on August 1 [2 favorites]


I'm heartened to read this today. Thanks.

I know it would belie the serious tone of the essay, but I'm a little surprised that no reference at all was made to Wheaton's Law.
posted by ob1quixote at 11:58 AM on August 1


Wheaton's Law is silly and gendered and in need of revision anyway.
posted by Invisible Green Time-Lapse Peloton at 12:04 PM on August 1 [2 favorites]


A Unix zealot, having heard that Master Foo was wise in the Great Way, came to him for instruction. Master Foo said to him:

“When the Patriarch Thompson invented Unix, he did not understand it. Then he gained in understanding, and no longer invented it.”

“When the Patriarch McIlroy invented the pipe, he knew that it would transform software, but did not know that it would transform mind.”

“When the Patriarch Ritchie invented C, he condemned programmers to a thousand hells of buffer overruns, heap corruption, and stale-pointer bugs.”

“Truly, the Patriarchs were blind and foolish!”

The zealot was greatly angered by the Master's words.

“These enlightened ones,” he protested. “gave us the Great Way of Unix. Surely, if we mock them we will lose merit and be reborn as beasts or MCSEs.”

“Is your code ever completely without stain and flaw?” demanded Master Foo.

“No,” admitted the zealot, “no man's is.”

“The wisdom of the Patriarchs” said Master Foo, “was that they knew they were fools.”

Upon hearing this, the zealot was enlightened.
posted by jenkinsEar at 12:10 PM on August 1 [21 favorites]


> Wheaton's Law is silly and gendered and in need of revision anyway.

Oh, come on. To call “don’t be a dick” gendered because a dick is literally an attribute of a gendered element of the population is to mistake metonymy for identity, metaphor for reality, and a brilliant and memorable slogan for sexist rhetoric. What are we supposed to say, "Don't be the kind of person who does and/or says mean things"? I would suggest saving your laudable concern for things that are actually worth the effort.
posted by languagehat at 12:12 PM on August 1 [26 favorites]


Great article. Should be required reading for all learner zealot programmers.

Wheaton's law is memorable, but not brilliant. It doesn't handle the "I'm not being a dick" response. It's my belief that very, very few people know that they are being a dick, and set out to act dickishly. "Be less of a dick" doesn't need external verification, for it acknowledges the potential for dick nature in us all.
posted by scruss at 12:21 PM on August 1 [1 favorite]


"Don't be a jerk" means the same thing and isn't particularly gendered.
posted by muddgirl at 12:21 PM on August 1 [1 favorite]


If it helps, I call women dicks all the time. Well, not ALL the time, only when they're acting like dicks.
posted by Mrs. Pterodactyl at 12:22 PM on August 1 [4 favorites]


"Don't be a jerk" means the same thing and isn't particularly gendered.

Think about it...
posted by ChurchHatesTucker at 12:23 PM on August 1 [6 favorites]


(psst, people with internal genitalia can also jerk off...)
posted by muddgirl at 12:25 PM on August 1


I recently had a baffling encounter with an Erlang fan on twitter. He could learn from this.

Is it me, or do functional coding people seem to lose all their humour? It was like talking to an objectivist about Rand; no ability to see out of the narrowest terms.
posted by clvrmnky at 12:51 PM on August 1 [2 favorites]


The problem with Don't be a dick is that it shuts down people who have legitimate cause to be critical or angry.
posted by i_am_joe's_spleen at 12:55 PM on August 1 [3 favorites]


Some of them tend to "see the light" and become a bit proselytic in their discourse, unfortunately.
posted by Monday, stony Monday at 12:56 PM on August 1 [1 favorite]


See also: Python Community Code of Conduct.

I like this world where we think of mathematics as a human activity and computer languages are distinguished by their communities.
posted by benito.strauss at 1:02 PM on August 1


...do functional coding people seem to lose all their humour?

The clojure community is pretty easy-going. For a while #clojure on freenode had just the sort of haskeller this essay is targeting in their midst, and I think they dealt with it with pretty good humor, although temporarily only allowing haskell proselytization between the hours of 2 a.m. and 5 a.m. UTC might seem a little harsh to some.
posted by fivebells at 1:11 PM on August 1 [6 favorites]


In fact, if anyone's self-esteem should be cared for, it is that of the people you are talking to. The more confident they are in their capacity and their worth, the more willing they will be to learn new things, and to acknowledge that their knowledge, like all of ours, is limited and partial. You must believe in yourself to be willing to learn new things, and if you want to cultivate more learners, you must cultivate that self-belief in others.
This is really, really good stuff for anyone doing technical work. The Haskell-specific bits are almost incidental to how good this advice is.
posted by brennen at 1:15 PM on August 1 [5 favorites]


I was like "oh GOD I think he's actually specifically addressing a close friend of mine, I know the target of his open letter" and then I realized that in fact there are more people like this

Thousands
...
(stares into the distance, hears the sound of a hyoshigi clapping once with heavy reverb)
posted by jake at 1:36 PM on August 1 [2 favorites]


Thousands

How many programmers are there?
posted by brennen at 2:08 PM on August 1 [2 favorites]


The "Young Haskell Enthusiast" part is important because it perfectly captures the type who will go online and lecture people about how bad their choice of technology is. It's frustrating when you have perfectly valid reasons for choosing a language, but most people just want to stick with what they know and get their work done. It's more frustrating because the types of languages that succeed (C++, JavaScript, PHP) do so mostly for historical reasons like timing and luck instead of being inherently better than other languages.

Basically, the summary isn't Wheaton's Law but from Big Lebowski: "You're not wrong Walter. You're just an asshole".
posted by Gary at 2:16 PM on August 1 [6 favorites]


> See also: Python Community Code of Conduct.

Which seems to be generally well followed, except for their continuous low-level digs at Perl programmers. Srsly; drop it, folks. We've both got incompatible $VERSION++ releases now, so Python has arrived too …
posted by scruss at 2:27 PM on August 1 [3 favorites]


Is the situation really this bad? I thought he kind of belabored the point. But maybe he needs to, to get it across.

I would fear that the kind of person who should go forth and sin no more after reading this is probably not going to read all of it.
posted by thelonius at 2:46 PM on August 1


Thelonius: yes, really.
posted by fivebells at 3:14 PM on August 1 [1 favorite]


OK now I DO want to learn Haskell.
posted by anadem at 5:21 PM on August 1


You know, despite knowing a few nice Haskellers, I have often thought "well I will leave Haskell and Erlang and OCaml and Stuff Like That till I am more advanced as a programmer, because I don't feel smart enough yet to try it," and this letter makes me feel more like it would be fun for me to try it, and like there are people I don't already know who would be friendly and helpful if I ran into problems and had questions.

I especially appreciated:
Will this leave you satisfied? That depends. If your goal is to understand everything and have everybody agree with regards to everything that is in some sense objectively true, it will not.
I have brushed up against a few people who seem to have that goal. I think I was that person once.
posted by brainwane at 5:24 PM on August 1 [2 favorites]


My first CS class was taught in Gofer, which was like a simplified Haskell. I liked it a lot, really. We did a lot of recursion, learned about currying, and so on. I remember the pattern matching syntax (like "x:xs") was really cool. I should take another bite at the apple.

I had very little idea of what was happening down in there, when I ran my Gofer programs. Sometimes it would die, and tell me "The stack has collided with the heap". Whoops! Sounds pretty bad, whatever it meant. But it became sort of a gentle koan of program failure to me.
posted by thelonius at 6:07 PM on August 1


thelonius: in fact, the stack and heap have very descriptive names.

They are two places to store data, one is meant to be used in order (the stack), so you take things off in the opposite order they are put on, it is used to coordinate function arguments and return values and local values inside functions. The other (the heap) is disorganized and meant to be used in whatever order and it needs to be cleaned up explicitly (as opposed to the stack which you kind of move through as you go and implicitly free up).

Since the memory is all in a line, a common convention is to build the stack from one end, and grab bits of the heap as needed from the other. If the two collide, that means you ran out of space, and you can't do anything else.
posted by idiopath at 7:01 PM on August 1 [1 favorite]


Oh, come on. To call “don’t be a dick” gendered because a dick is literally an attribute of a gendered element of the population is to mistake metonymy for identity, metaphor for reality, and a brilliant and memorable slogan for sexist rhetoric. What are we supposed to say, "Don't be the kind of person who does and/or says mean things"?

It is entirely gendered. It is also useful. Holding those two concepts in your mind shouldn't require such Jesuitical contortions.

Wonderful article.
posted by Sebmojo at 9:42 PM on August 1 [1 favorite]


We are cooperating with you, you're just not aware that your goal is learning Haskell.
posted by yonega at 10:07 PM on August 1 [6 favorites]


13:18 <quchen> | Haskell is invariant under gender. Really!

posted by sammyo at 11:07 PM on August 1


thatnks, idiopath - this was nearly 20 years ago, and I eventually found out what the error message was talking about. In that class, the Professor told us not to worry about it, and that we'd learn about it later, if we took more CS. Typically I'd get this collision when I wrote failed recursive functions that didn't actually reduce to a basis case, so the stack grew with calling frames, and the heap was probably also churning away allocating space for local variables etc.

That was a really good programming class, although it wouldn't have killed him to give a brief and clear explanation about the error message, like yours. The project we did that I liked best was a package to represent and do arithmetic on large integers, larger than the fairly small maximum Int in the Gofer package. That makes a good sized program for an intro class, which can be broken into modules for several assignments, and it introduced a lot of good ideas about design choices and their consequences.
posted by thelonius at 11:42 PM on August 1


That was a good programming class, because it was 20 years ago and you still basically remember exactly what happened in pretty vivid detail.

I was gonna post something like "LOL UR RECURSIVE FUNCTIONZ RAN TOO MANY TIMES AND DID NOT STOP AT RIGHT PLACE" and realized I couldn't exactly express what I was trying to say, but was gonna be nice unlike the meanies in this article, with nothing really to say other than to gotcha-quote your "recursive" piece and then the error and be like "GOTCHA, BUT IN A SMILEY-FACE WAY"

I always had some basic non-CS ingrained understanding of it and would not be able to explain it to a 14-year old other than to say "if you're going to write a function that calls itself, it has to stop at some point with something useful accomplished or you'll be like ...... until the OS or runtime kills you." Modern computers really have blown up the stack to the point where you can do some amazing things with recursion. I'll have to find out what those are.

School good!

I was always a utilitarian type programmer, learning things as I needed them, and need to go back and revisit the fundamentals and patterns...my first "use case" for recursive functions was deleting all of the files off of somebody's computer by uploading them a fake "BBS Door Game" (I was a dick, it worked, and in this MS-DOS 5.0 era literally no files were locked by the OS and spared) and it was basically a QuickBASIC program (compiled to EXE) that did something like this. I was amazed to see it work in the wild (never tested locally, I had but one lowly computer with a 40MB hard drive) and then learn what "recursion" was afterward and how does this tie back to this article? Not well, other than the fact that the guy was sort of like the subject of this article, and so was I -- a know-it-all who uses his knowledge to one-up others. I think he was a little worse though, but ultimately it was a dick move that ended with more mutual respect, somehow, because he was the uber-est-one-upper but demanded the source code thinking he would be able to reverse the effects on his own. I was simultaneously like "What a dumbass LOL" in my mind while feeling very guilty explaining that he was pretty much fucked, and he realized how he had provoked me (yo dog I heard you like computers so I'm gonna slag on you about how you don't know about computers because I like computers) and explained that he wanted to re-start his BBS over from scratch anyway so it was no big deal.

I don't think "UNDELETE" was able to handle this amount of carnage.

Initially he slammed me into a locker in a WWF sort of way where it made a lot of noise and I apologized and all was good after I gave him my one printout of the source for him to admire. I was shocked that QB and COMMAND.COM actually did manage to handle this as DEL /S or RMDIR / S were not options at the time, and would like to see it rewritten in a function language without Googling it just to make this slightly on-topic-er, or re-write it without the "CLOSE #1" step repeated in both conditions with the same or less LOC. This is from memory actually and I think I did use the "CD" command instead of literally putting the "Path" folder everywhere, which means I was a little more elegant/atomically thinking 20 years ago:

REM Sorry

PRINT "tHIS IS SOME cOOL bBS DOOR GAME"

DeleteFiles "C:"
END

SUB DeleteFiles (Path As String)
DIM NewPath As String
SHELL "ATTRIB -S -H " + Path + "\*.* > NUL"
SHELL "DEL " + Path + "\*.* /Y > NUL"
SHELL "DIR /AD " + Path + "/B > " + Path + "\A.TXT"
OPEN "A.TXT" FOR INPUT AS #1
IF NOT EOF(1) THEN
LINE INPUT #1,NewPath
CLOSE #1
DeleteFiles NewPath
ELSE
CLOSE #1
SHELL "DEL " + NewPath + "\A.TXT"
SHELL "RMDIR NewPath"
END IF

END SUB
posted by aydeejones at 12:15 AM on August 2 [4 favorites]


(If DOS 5.0 did lock files preventing deletion, this would've totally generated a stack overflow eventually because it wouldn't neatly stop calling itself, and I forgot the -R in my ATTRIB command removing the hidden and system attributes but not "read only")
posted by aydeejones at 12:19 AM on August 2


(and the last two "NewPath" references need to be "Path", I was much better without beer and 20 years younger apparently)
posted by aydeejones at 12:22 AM on August 2 [1 favorite]


idiopath: "Since the memory is all in a line, a common convention is to build the stack from one end, and grab bits of the heap as needed from the other. If the two collide, that means you ran out of space, and you can't do anything else."

Indeed, it's a little depressing because thats one of the few bits you need to know about to be a good not functional programmer. Stack is where parameters and local variables are stored as functions call other functions. The situation where they collide is commonly known as a stack overflow, which is famous enough they named a pretty good programming website after it.

Functional programming novices typically trigger stack overflow in one of two ways: infinite recursion, or merely too much recursion. Infinite recursion is obvious: any function, no matter how small a footprint* will overflow stack when called ad nauseam.

Too much recursion is more subtle. You might imagine iterating over a list in heap; in an imperative language you would use a for loop, and encounter no stack overflow. The naive functional implementation uses recursion, and maximum depth of the stack is the size of the list. Process a large list and you might stack overflow.

The common solution is what's called tail recursion, where you write your function such that the last thing it does is the recursive call. The recursion is the tail end of the function. In that case, the only thing left to do when the recursive call finishes is to pass the results back up. Good compilers will identify tail recursion, and reuse the same stack record, with updated parameters, effectively generating the same machine code as a for loop would.
posted by pwnguin at 12:50 AM on August 2 [3 favorites]


> It is entirely gendered.

Only if you think etymology is destiny, which I don't. But I can sympathize with the contrary argument.
posted by languagehat at 8:16 AM on August 2


Thanks for sharing this, swift.
posted by safetyfork at 10:17 AM on August 2


I would fear that the kind of person who should go forth and sin no more after reading this is probably not going to read all of it.

It's one of those quiet little certainties that in this class of prescriptive writing, the lessons worthy of contemplation are mostly only available to those who have learned them before, and the hard way.

Which is to say: I would encourage a novice programmer to read a piece like this, but I wouldn't expect it to really land for most 'til "novice" no longer applies.
posted by brennen at 12:46 PM on August 2


I know one social media account, owned by an aggressive Haskell advocate, where the last visible act taken before deletion of the account was to favorite a link to this article.
posted by idiopath at 1:38 PM on August 2


Haskell Researchers Announce Discovery of Industry Programmer Who Gives a Shit
posted by jcruelty at 12:32 AM on August 3


« Older Mysterious lake in Tunisian desert turns from turq...   |   In recognition of his tireless... Newer »


This thread has been archived and is closed to new comments