Live data from Hacker News

Wat (2012) [video]

destroyallsoftware.com

11–20 of 29 posts

Re: Wat (2012) [video]

#11
post #7

WAT is classic and very funny, but I recommend all software engineers to watch all of Gary Bernhardt's talks on his website: https://www.destroyallsoftware.com/talks His talk about "Boundaries" taught me one of the most illuminating concepts I've learned in my career, about separation of concerns, functional core & imperative shell, unit testing, etc., and radically changed the way I write code - the talk uses Ruby a…

> I recommend all software engineers to watch all of Gary Bernhardt's talks

They are all great talks, but please don't use "The Birth & Death of JavaScript" as an instruction manual!

In addition to the talks on his website, I also recommend watching "The Unix Chainsaw"[1]. It's a great introduction into using the full power of the unix shell as an interactive programming language.

[1] https://www.youtube.com/watch?v=ZQnyApKysg4

Re: Wat (2012) [video]

#12
it shows that at the fringes nobody in the audience correctly predicts what will happen...

anyways, here's the abductee-programming-language-conundrum:

consider Language X: there is a nuclear power plant, and you or loved ones live within 10 miles. it is your responsibility to select the language for implementing the emergency shutdown procedures. would you use language X?

Re: Wat (2012) [video]

#13
You had me all fired up when I thought some new video is coming from Destroyallsofware / Gary Bernhardt.

Missing 2012 from the Title.

I think with COVID, way deep in our subconscious. We are releasing all the emotionally attachment we have in our old programming tools.

Re: Wat (2012) [video]

#14

it shows that at the fringes nobody in the audience correctly predicts what will happen... anyways, here's the abductee-programming-language-conundrum: consider Language X: there is a nuclear power plant, and you or loved ones live within 10 miles. it is your responsibility to select the language for implementing the emergency shutdown procedures. would you use language X?

For something like that I would be more concerned about the tests than the language. In other words, I'd trust my own code not at all, in any language.

Re: Wat (2012) [video]

#15

The WAT talk was rhetorically nice because it managed to joke about weird corners of the language without going into ranty programmer mode, but opted for a more gentle style of bemused boggling. It also kind of cemented for me that weird edge cases don't actually matter in practice (in my experience), and that a language can have lots to make fun of while still being lovely to use.

If you don’t keep in mind all the quirks you create bugs and waste manhours. If you keep in mind all the quirks you reduce your cognitive capacity and waste manhours. Languages with quirks are categorically worse than languages without quirks.

Re: Wat (2012) [video]

#16
post #7

WAT is classic and very funny, but I recommend all software engineers to watch all of Gary Bernhardt's talks on his website: https://www.destroyallsoftware.com/talks His talk about "Boundaries" taught me one of the most illuminating concepts I've learned in my career, about separation of concerns, functional core & imperative shell, unit testing, etc., and radically changed the way I write code - the talk uses Ruby a…

I also strongly endorse the Boundaries talk and am re-watching it now, https://www.destroyallsoftware.com/talks/boundaries

The core concept of immutable values as the boundaries between components now seems self evident, but I can recall not appreciating this concept earlier in my career. Further, I don't think one can fully appreciate the importance of this concept until they've had to develop, maintain, and operate code both before and after this principle is applied. Here’s my story of being educated in the importance of “Boundaries”.

I started my career at a relatively small company that grew rather quickly. In developing more robust and reliable systems, I experienced the importance of this principle first hand. Commonly, a system that started as a small, low-value prototype could grow into a substantially large and important engineering system. Initial functionality may have been implemented in brittle, mutating code and these quickly became a pain point, particularly in testing.

I can recall several times where one seemingly innocent Java static method that mutated inputs or static fields was repeatedly the source of production errors. Adding test cases for these situations got increasingly complicated and time consuming with more and more mocks, stubs, and inspection of mutated state. Further, changing and adding functionality of the code itself became a tribulation of mentally working through the complexity of code and existing tests.

And what do you know, our recent changes reintroduced an old bug despite all of the tests passing. Turns out our existing tests to catch that bug only handled a specific manifestation of the fault, but didn't capture other cases. So of course, let us add some more test cases, each with their own menagerie of mocks, stubs, and inspection of mutated state.

Eventually, an experienced engineer would guide me to refactoring this functionality into isolated components. A single static method could be replaced by several Java classes; some classes to hold immutable state and others to perform state transformation. We may even introduce an interface so that different functionality could be provided through polymorphism. Tests became simpler and more robust such that fewer faults were discovered in production.

From the outside this may appear to be the classic Java Architecture Astronauts menace with a single static method replaced by a collection of classes and interfaces. We may have even had some XFactoryProvider interfaces. Yet the end result was easier to reason about and test, with the tangible benefit of fewer errors in production.

And I tell this story only so that I can say that I now appreciate this talk even more after living through the application of the “Boundaries” principle.

Re: Wat (2012) [video]

#17
post #15

The WAT talk was rhetorically nice because it managed to joke about weird corners of the language without going into ranty programmer mode, but opted for a more gentle style of bemused boggling. It also kind of cemented for me that weird edge cases don't actually matter in practice (in my experience), and that a language can have lots to make fun of while still being lovely to use.

If you don’t keep in mind all the quirks you create bugs and waste manhours. If you keep in mind all the quirks you reduce your cognitive capacity and waste manhours. Languages with quirks are categorically worse than languages without quirks.

Large areas of ridiculous behaviour are, if easily characterised, maybe easier to avoid than more finely-graned edge-case zones that you'd get in more elegantly top-down designed languages, and result in less mental overhead. "just stay clear of doing anything remotely weird with arrays" might result in better, more readable code than a langauge with more easily-understandable array behaviour, and have lower mental overhead than what you might get in a better designed language where it might feel more feasible to keep in mind the edge-cases.

I've made a scripting language for videos games that some people use, and kept the semantics super informal, growing it quite organically, and it's worked out pretty well. Every time I try to nail down the edge cases I think "ah no, I'd prefer to have this all be undefined/erratic that to have people rule-lawyering their way into technically-correct but inelegant code". The main loss I've had from this is the inability to write a fuzzer, and in annoying some people (who use it or, for instance, wanted to write compatible compilers/interpreting). I do rely a lot on test suites for it (which also helps other when they want to do reimplementations), which provides a good amount of stability in spite of the fact that I never tell anyone what exactly counts as a valid variable name and amn't exactly sure what that is off the top of my head.

That said, nicely-specified programming languages that one can accurately comprehend + model with a human brain are super nice, allow for great tooling + better portability, and eliminate a large class of bugs that can be very troublesome. I'm a big fan of Go/C#, but they're not everything, and not from my point of view at all categorically better than other options.

Re: Wat (2012) [video]

#18

it shows that at the fringes nobody in the audience correctly predicts what will happen... anyways, here's the abductee-programming-language-conundrum: consider Language X: there is a nuclear power plant, and you or loved ones live within 10 miles. it is your responsibility to select the language for implementing the emergency shutdown procedures. would you use language X?

I'd select a redundant mechanical device.

Re: Wat (2012) [video]

#19
post #10

The WAT talk was rhetorically nice because it managed to joke about weird corners of the language without going into ranty programmer mode, but opted for a more gentle style of bemused boggling. It also kind of cemented for me that weird edge cases don't actually matter in practice (in my experience), and that a language can have lots to make fun of while still being lovely to use.

>It also kind of cemented for me that weird edge cases don't actually matter in practice I had the exact opposite impression. Indeed, this stuff is the cause of so much that gets attributed to something else (e.g. JavaScript framework churn being attributed to culture). The problems caused by these issues compound as you work your way up the stack.

I think I get where you're coming from, that weird low-level behaviour could result in the things you build on top being unstable (I have been able to avoid the employment of the big javascript frameworks/systems, so have not had to suffer a lot of technology churn), or harder to build on top of [see my reply to another comment], but OTOH abstracting away weirdness one of the fundamental functions of engineering? And why would, say, undesirable array semantics result in framework churn on top? Because people are trying to 'fix'/'mitigate' the behaviour but can't settle on a single solution?

Re: Wat (2012) [video]

#20

it shows that at the fringes nobody in the audience correctly predicts what will happen... anyways, here's the abductee-programming-language-conundrum: consider Language X: there is a nuclear power plant, and you or loved ones live within 10 miles. it is your responsibility to select the language for implementing the emergency shutdown procedures. would you use language X?

If X is formally verifiable and conducive to writing testable, contractual code then yes.
Post reply on HN