News for hackers. Stuff that matters.
Re:Adopting Erlang by mononcqc on Monday October 28, 2019 @02:50PM (#21380212)
One of the authors here. This website is still a work in progress.

It's an ongoing effort to gather all the resources that will help you use Erlang in a business. The booksite is divided in three sections focusing particularly on Erlang/OTP’s higher level concepts in the current open source ecosystem, how to use it in production (while setting up a pipeline for continuous development and delivery), and how to build a team when you’re starting from scratch.

We're working mostly linearly in each section, but they're not all progressing at the same pace. We have nothing yet on "building a team" although our outlines are all planned; the "hard things to get right" chapter was supposed to come in later but we saw enough questions about these topics to rush it out.

We might release things from each section as they are ready and we see fit. In the meanwhile, we're always appreciating feedback and people checking in to see what's new in terms of content.

Re:Adopting Erlang by hinkley on Monday October 28, 2019 @03:59PM (#21380964)
One of the things I've learned from many attempts to document internal processes at organizations, is that often the authors are least equipped to explain things.

They know too much, they often don't recognize how many pieces of assumed information they're injecting into their so-called explanations. You often get circular explanations in addition to circular reasoning and it can be off-putting.

A better use of time is to get someone who is just started to exhibit competence to write the docs. They won't assume the jargon, they can't assume deep knowledge, and because they're living right at the pain point they can be especially sympathetic. And if what they explain is dead wrong, this is your chance to correct a horrible misunderstanding before they get too far along. Pointing out the 'false friends' in a system early on can be pretty powerful. Educationally or as an opportunity for improving the system.

In other words, I'd encourage you to invite new people to contribute. Just keep an eye on what they do and be ready to jump in with corrections.

Re:Adopting Erlang by K0SM0S on Monday October 28, 2019 @06:48PM (#21382599)
This is gospel for teachers / learners. Well put.

There's such as thing as too verbose, but it usually comes from writing stuff in the wrong kind of document: there is always a place for in-depth explanation, and there is a place for terseness to the point of familiarity.

One last thing: if your topic has a jargon of its own, a particular meaning to words, introduce these as early on as possible, and be excellent in consistency throughout docs (in addition, consider a definition link/info widget for each such term on its first occurence in any document, letting people 'jump right in' to any section/article). If you are going to force people to re-wire their brain to suit your particular vocabulary, you should maintain 'immersion' at all times.

If find this especially true in not-so-well-defined paradigms such as OOP when approached by various programming languages. You need a "map of terminology" more than anything else to quickly grasp how to use language XYZ.

Re:Adopting Erlang by tasogare on Tuesday October 29, 2019 @01:54AM (#21384532)
> You need a "map of terminology" more than anything else to quickly grasp how to use language XYZ.

Exactly why I hate Brew with passion. In the doc you find: formula, bottle, cask instead of package and... no idea what the others mean. I have no time to learn and remember the mapping, which exists for no other reason than the author trying to be cool.

Re:Adopting Erlang by K0SM0S on Tuesday October 29, 2019 @12:29PM (#21389010)
Totally agreed! I think Brew will eventually be remembered as "this bad way of entering the topic of interest", like BASIC for programming, or a learning js / web programming through a framework first.

It's teaching you the wrong way, making you almost illiterate about pm when you enter the real thing (here Linux/UNIX world, or Python after BASIC, vanilla web concepts, etc.)

Re:Adopting Erlang by hinkley on Tuesday October 29, 2019 @01:18PM (#21389608)
I've found that a glossary helps, especially if there's a link to at document that talks about that concept.

People who are bored or curious can pull on the thread at their own pace.

Re:Adopting Erlang by K0SM0S on Wednesday October 30, 2019 @05:19PM (#21402875)
110% agreed.

Anything that helps 'lateral' access to a knowledge base is helpful, because you don't need to go through all the bottom-up (learning) or top-down (prior knowledge) to explore and reach a given problem space. You can simply 'cheat' directly to 'stage N'.

Once there, you might be missing key information: principles above you, terminology and base config below; this is where a glossary (hyperlinked automatically ideally) is a life-saver. Follow 1-2-3 links and you've got the gist, back to 'stage N' to the next step, rinse and repeat.

When documentation is badly done, this approach may result in endless circular references, feeling 'trapped' at or around 'stage N' — you explore that stage all you want but gain no understanding of how it fits into the whole. But when it's well executed, such documentation is a treat — RHEL comes to mind as being very practical to use in that regard, for a rather complex/deep doc base.

Re:Adopting Erlang by mononcqc on Monday October 28, 2019 @04:07PM (#21381054)
Is this a general tip you're giving, or is there specifically pieces of information you feel are being too opaque in the text at this point?
Re:Adopting Erlang by hinkley on Monday October 28, 2019 @04:12PM (#21381103)
I'm just saying don't sweat people seeing it when it's not done yet. That's often enough exactly what you need.

(though maybe to clarify, that's not a subtle dig. I haven't read it yet, though I'm trying to get into Elixir so I'm bookmarking)

Re:Adopting Erlang by KingFelix on Monday October 28, 2019 @04:10PM (#21381081)
Can't speak for him but maybe both?
Re:Adopting Erlang by mononcqc on Monday October 28, 2019 @04:12PM (#21381102)
If both, we would certainly appreciate the feedback about which areas are considered unclear, in order to improve things further.
Re:Adopting Erlang by dmix on Monday October 28, 2019 @04:11PM (#21381101)
Can't people just remember what it was like to learn the things they know? They were all those newbies at one point.
Re:Adopting Erlang by mononcqc on Monday October 28, 2019 @04:19PM (#21381171)
Yes and no. Some of the struggles are fresher than others, and in some cases you do internalize things to the point they feel like a second nature.

The effort mentioned here of getting newer people to read the content and/or produce it is something I've done a lot in the past, and one of the ways I've used in on-boarding people as well. We (the co-authors of Adopting Erlang) tend to do it with topics where we don't know everything the other authors know, and provide feedback to each other about things that lack clarity.

I've also taught Erlang stuff in multiple places and started knowing some of the things people find confusing as a kind of pattern, which may get easier to address early on with time.

The thing that can never be done well, though, is predicting the things someone with an entirely different background from yours would find confusing; the context carried by their experience influences the things they understand and the information they extract from a text. Teaching to a functional programmer is different from teaching to a developer who has done OO their entire career. Teaching to someone doing front-end work is going to be a different experience from teaching to someone doing mobile or back-end work. The same may often extend to sociological, economical, or cultural factors as well.

All of this means that each teaching experience has new surprises as well and you can't just cover them by thinking very hard. Frequent reviews, both technical and from editors can help, though, along with your own experience when teaching.

Re:Adopting Erlang by jecxjo on Monday October 28, 2019 @04:27PM (#21381274)
No. What you're describing is the problem people have when teaching/providing insight/responding to questions online. They all use their current understanding and apply it to the question not assuming the other person has no knowledge of the subject.

Haven't you ever seen someone ask a question online that had a "newbie" answer that is generally correct, only to have a ton of people flood your response with all the caveats ignoring who their audience actually is. The default for most people is to use your current knowledge.

Re:Adopting Erlang by tropshop on Monday October 28, 2019 @04:31PM (#21381319)
This struggle is often referred to as the "Curse of Knowledge"

https://en.wikipedia.org/wiki/Curse_of_knowledge

Re:Adopting Erlang by ashton314 on Monday October 28, 2019 @04:15PM (#21381128)
Becoming familiar with a system makes you forget what was and what was not obvious. I experience this with myself. Once I've learned something well, then I can find it hard to explain it to someone else. I find it best if I write down assumptions that got corrected or unclear things as I encounter them.
Re:Adopting Erlang by hinkley on Monday October 28, 2019 @04:27PM (#21381276)
I've seen this in other disciplines, and if anything to worse degree. I've witnessed situations where the old masters can't talk to the journeymen, and the new masters can barely talk to the beginners. You learn by watching and whatever the people a couple years ahead of you can decipher for you.

To make matters worse, what often happens is that the instructors believe they have taught something, and they don't witness the actual learning take place, so they continue in their belief in their practices.

Re:Adopting Erlang by tarsinge on Monday October 28, 2019 @05:47PM (#21382074)
As someone who did a lot of professional training and love to teach complete beginners it’s definitely possible but it’s not intuitive and it’s a lot of conscious work.
Re:Adopting Erlang by davidw on Monday October 28, 2019 @03:15PM (#21380472)
I see you mention circuit breakers.

I think they deserve more thorough coverage because 1) you really need them in a lot of applications, and 2) they're not in OTP, so picking one (especially if you're not really an Erlang expert) and employing it in the right way are a bit trickier.

A simple example of an application that probably needs a circuit breaker is a web application that can keep running even if the database is not available, even if all it does is return an error message to the browser.

Re:Adopting Erlang by yawaramin on Monday October 28, 2019 @06:38PM (#21382510)
Don't circuit breakers arise naturally from configuring supervisors in a particular way? I.e. supervisor failover after a certain number/period of retries.
Re:Adopting Erlang by davidw on Monday October 28, 2019 @07:31PM (#21382911)
Not really, otherwise no one would have written things like this:

https://github.com/jlouis/fuse

Re:Adopting Erlang by rdtsc on Monday October 28, 2019 @06:21PM (#21382371)
Just wanted to thank you and Tristan for the great resource. It's much appreciated!

The cheatsheet about what the processes do when they trap exits/are linked/are port of OTP is awesome. I never remember that very well and was looking for a handy reference to have. Now I have it.

Docker and Kubernetes references are great as those are often involved in today's development and operations, and everyone is probably wondering what's the best way to combine those with Erlang.

Re:Adopting Erlang by Driky on Monday October 28, 2019 @02:57PM (#21380281)
Is it strictly Erlang only or does elixir has it's place in it as part of the ecosystem (no polemic intended here, hope for a direct yes or no)?
Re:Adopting Erlang by mononcqc on Monday October 28, 2019 @03:02PM (#21380334)
Erlang first.

There is a large overlap with Elixir stuff, mostly at a higher level; whatever covers OTP, handling supervision, releases, docker image practices, approaches to testing, production practices, etc. will very likely be useful to Elixir users.

But the lower-level details like handling dependencies, build tool commands, test framework specifics, the code snippets and samples, and so on are all going to be Erlang-specific.

I use both languages frequently for work and there's far more in common between them than there are differences. If that's not your cup of tea and Elixir is really all you're after, you can look for Ben Marx's Adopting Elixir (https://pragprog.com/book/tvmelixir/adopting-elixir) book. We are not affiliated with it and don't aim to cover the same content (we just have similar titles), but it's a good option that goes Elixir-first.

Re:Adopting Erlang by jacquesm on Monday October 28, 2019 @03:07PM (#21380394)
Props for promoting the book of another author.
Re:Adopting Erlang by davidw on Monday October 28, 2019 @03:20PM (#21380516)
Anyone who has written a technical book knows that in general they cost a lot in terms of time and don't generate great returns. The best case is probably if it boosts your consulting income or something to that effect.

I've never met Fred, but I feel his book "Learn You Some Erlang" is clearly in another category: it's a "labor of love". I can't speak to his precise motivations, but the book is so rich and thorough, that it's clearly something he worked way harder on than would have been strictly necessary just to whip out a quick book establishing himself as an Erlang Expert. Maybe it was "the Erlang book he wished he'd had when he got started"?

As such, it's one of the few tech books I've bought, and done so quite happily, in recent years.

Re:Adopting Erlang by mononcqc on Monday October 28, 2019 @03:26PM (#21380590)
Well this is technically the fourth one I'm working on. All are available for free online because I want these resources to be accessible first and foremost.

I've got:

Learn You Some Erlang, which has been published with No Starch Press. This was my first one, which I assume is the one you're talking about. Lots of drawings, something I no longer really have the time and energy for these days compared to early in my career. It's the big basics of Erlang. A bit dated now, particularly since the ecosystem evolved around it, but all the basics are still well-covered I think.

Erlang in Anger, only available as a self-published short e-book available for free, meant to teach people to operate Erlang in production.

Property-Based Testing with PropEr, Erlang, and Elixir; my latest published one (with Pragmatic programmers), covering property-based testing both with Erlang and Elixir at once. Pragprog have let me keep the initial website online, which only covered Erlang.

And Adopting Erlang is the latest one. We're still writing it (this time I'm a co-author rather than the sole author), and there's no physical or ISBN'd copy of it available at this point in time.

All of them have to be labours of love, just because it's a lot of work and effort, and at this point in my career, my name's well-known within the Erlang and Elixir communities, so you could say there are diminishing returns. I still enjoy writing though, it's just harder to make time.

Re:Adopting Erlang by davidw on Monday October 28, 2019 @03:27PM (#21380602)
I edited my comment to clarify.
Re:Adopting Erlang by toolz on Monday October 28, 2019 @03:19PM (#21380506)
unless I'm mistaken your parent is Fred and he is one of the authors.

edit: sorry I glossed over Freds comment and see what you mean now - ignore me xD

Re:Adopting Erlang by Driky on Monday November 04, 2019 @03:48PM (#21446341)
thank you for the answer. I'm not too interested in erlang (I'm still learning elixir so 1 horse at a time) but I'll keep your book close since both overlap quite a bit and the OTP part is common to the two languages. Thank you for writing that book !
Re:Adopting Erlang by dandelo19 on Monday October 28, 2019 @04:20PM (#21381185)
Purchased!
Re:Adopting Erlang by cpeterso on Monday October 28, 2019 @04:24PM (#21381239)
What are the arguments for adopting Erlang instead of Elixir for new projects in 2019? I understand there is a lot of existing Erlang code out there, but it has a reputation for being less approachable than something like Elixir (syntax and tooling).
Re:Adopting Erlang by mononcqc on Monday October 28, 2019 @04:57PM (#21381583)
Erlang's tooling has vastly improved in the last few years to the point it's not as much of a concern anymore (a formatter is the big missing thing), and I just happen to prefer its syntax to Elixir's in the first place.

While I can argue in favor of tooling being roughly on-par (sometimes better, sometimes worse), I can't really discuss syntax since this is often just related to taste more than anything.

My stronger argument would usually be in favor of the community you end up with. While both communities are starting to merge and grow closer over time, your average Erlang dev is likely to work on infrastructure components, and your average Elixir dev is likely to be working on web apps. I personally like working on the former better, so there's more limited interest for me in terms of most Elixir jobs anyway, even if it's not like no infra work exists in Elixir.

Both can have a great time working on APIs of any kind, and both can reuse most libraries of each other's community, so as I said, this is starting to become a moot point though. I personally have no problem with either.

Re:Adopting Erlang by rkangel on Tuesday October 29, 2019 @06:05AM (#21385505)
In what cases do you see Erlang's tooking as better than Elixir? I have generally found Elixir's tooling more approachable, but I haven't yet had to do anything difficult.
Re:Adopting Erlang by mononcqc on Tuesday October 29, 2019 @07:26AM (#21385908)
I'm obviously biased since I'm one of the Rebar3 maintainers but: I prefer a declarative approach to config files and whatnot; composable profiles are really neat; the plugin system for reusable tasks; dialyzer "just works" with it; the ability to compile and build projects in non-elixir BEAM languages.

That being said, Mix does have its advantages in other ways (easier to extend for one-off scripts, for example, since it won't actually need a whole plugin; the ability for mixed-language projects with Elixir and Erlang), and they're clearly the reason (with Hex) why we have good package management today.

Again, I'm not ready to say one language has better tooling than the other; it's just that I feel it's a far cry from the situation from a few years ago where Elixir was just miles ahead -- the gap has closed since then.

Re:Adopting Erlang by _asummers on Thursday October 31, 2019 @09:40PM (#21415589)
I wrote the Dialyzer pretty printer for Elixir, and I had to jump through myriad hoops to get that to play nicely, and I still do not have it 100% working in all cases yet, though there's way fewer bugs reported these days.
Re:Adopting Erlang by macintux on Monday October 28, 2019 @07:52PM (#21383032)
I would argue, probably without a great deal of agreement, that Erlang’s syntax is simpler than Elixir. It’s less familiar, but there’s practically nothing to it.
Re:Adopting Erlang by davidw on Monday October 28, 2019 @04:23PM (#21381217)
Another random thought:

A section on "stuff that's not in OTP, but many people end up using".

For instance, poolboy comes to mind, alongside the circuit breakers I mentioned in the other comment.

lager for logging.

At one point, there was a lot of stuff in the basho github repo that seemed pretty widely used.

It's been a bit since I've used Erlang so maybe there are some others that come to mind as "you're likely to see this included in a production Erlang system".

Re:Adopting Erlang by _asummers on Monday October 28, 2019 @05:09PM (#21381703)
Logging is included out of the box in recent OTP versions (21+ I think?) with no need to include lager!
Re:Adopting Erlang by davidw on Monday October 28, 2019 @05:10PM (#21381716)
Yeah, I recall reading that. Does it include everything lager does to the point where people are removing lager from their projects?
Re:Adopting Erlang by _asummers on Monday October 28, 2019 @05:24PM (#21381870)
As far as I know, yes. Elixir sends its own internal logs through it, and some of the Erlang libraries have begun making it optional recently. I don't include lager on purpose in any of my Elixir projects, for what it's worth.
Re:Adopting Erlang by verttii on Monday October 28, 2019 @04:05PM (#21381040)
You could and probably should promote this to the Elixir community too. Especially the OTP parts are very relevant fundamental knowledge for any Elixir dev.
Re:Adopting Erlang by jlarocco on Monday October 28, 2019 @05:01PM (#21381613)
This might be on your radar already, but the rendering is broken in Firefox. I'm using version 60.8.0esr, which is what I get with "apt-get install firefox".

When I open the link I see the table of contents on the left and a bunch of empty white space. Scrolling down, the content eventually comes into view, but scrolls on top of the table of contents, making it impossible to click.

I'm blocking the google fonts site, so maybe that's part of the problem.

Re:Adopting Erlang by fiter on Monday October 28, 2019 @05:18PM (#21381797)
For reference, Firefox 60 was released May 2018.
Re:Adopting Erlang by _randyr on Tuesday October 29, 2019 @04:21AM (#21385072)
There seems to be a slight encoding issue with external URLs. In the dependencies section under "Private Hex Mirrors", there is a link to mini_repo which results in a 404. It seems like the underscore in mini_repo is encoded to %5f which github doesn't seem to like?