Hacker News Re-Imagined

Cold Showers

  • 629 points
  • 18 days ago

  • @blopeur
  • Created a post

Cold Showers


@hourago 18 days

Replying to @blopeur 🎙

> Hype: "We need big data systems to handle big data."

I do not get this one. It's incorrect by definition: "Big data refers to data sets that are too large or complex to be dealt with by traditional data-processing application software. "

If you do not need a big data system, then it's not big data.

Reply


@slaymaker1907 18 days

Replying to @blopeur 🎙

Where I work, static analysis has found quite a few bugs. It's primarily through CodeQL and I think it's greatest strength is how flexible it is. Our code base is weird (it's C++ and has its own memory allocators and schedulers).

Reply


@WuxiFingerHold 17 days

Replying to @blopeur 🎙

> Compared to other languages, Go's concurrency system of goroutines and channels is easier to understand, easier to use ...

True and not a hype: Compared to other languages, Go has a runtime and built-in concurrency primitives that makes it easier to write concurrent code.

> and is less prone to bugs and memory leaks.

Who is actually claiming this? I've got a collection of good Go resources and nowhere something like this is stated. In contrast, some actually make it very clear to be very careful when sharing memory or actually better no sharing memory at all.

Concurrency is conceptually hard in Java, C#, Javascript, Python, C, C++ ... there's no reason to bully Go.

Rust makes the claim of "fearless concurrency" and the compiler indeed saves us from race conditions, but those are not the only concurrency related bugs, e.g. deadlocks are very well possible in Rust. Therefore Rust would be a proper candidate on this "Cold Showers" list.

Reply


@Tade0 18 days

Replying to @blopeur 🎙

> Hype: "Identifiers should be self-documenting! Use full names, not abbreviations."

Most names aren't particularly good - especially when someone tries to make them sound like a full sentence. My experience is that at around four words they start getting less accurate. At seven I would probably read more from an interpretive dance about the function in question.

Reply


@zigzag312 17 days

Replying to @blopeur 🎙

> Hype: "Static Typing reduces bugs."

> Shower: A review of all the available literature (up to 2014), showing that the solid research is inconclusive, while the conclusive research had methodological issues.

Which research is supposedly solid?

Skimming through the article it seems to me that proper controlled study would be prohibitively expensive and that no controlled study comes close to real world conditions of multiple people developing and maintaining a larger codebase. Conditions, where supposedly (according to anecdotal evidence) static typing would make a notable difference.

Reply


@roeles 17 days

Replying to @blopeur 🎙

I am particularly surprised by the agile statements. I wonder if this flies in the face of the "state of DevOps" reports some people wave around.

Reply


@hyperhopper 18 days

Replying to @blopeur 🎙

I'll admit I didn't read these articles. However, all of these reek of:

Claim! Thing good!

Wait! Thing has downsides!

It's not thorough comparison, it's just showing that everything in life has tradeoffs, which is obvious.

Reply


@WuxiFingerHold 17 days

Replying to @blopeur 🎙

Overall a questionable list of unproven claims. E.g.:

> Hype: "Static Typing reduces bugs."

Just because the author has not found proper research proving it doesn't mean it's false.

A great type system with sum types prevents tons of bugs. I wonder how anyone can question this.

> Hype: "Identifiers should be self-documenting! Use full names, not abbreviations."

Same as above. To fix bugs you need to read and understand the code. Not having to map abbreviations to your mental model reduces overhead. I've seen code bases where u was used as an abbreviation for user and users in different methods. That was not a fun code base.

Reply


@shisisms 18 days

Replying to @blopeur 🎙

I wish someone would do one of these for life in general.

Reply


@hsn915 18 days

Replying to @blopeur 🎙

IMO a lot of truths in programming are not amenable to "scientific studies".

Static typing is objectively better than dynamic typing for the vast majority of cases, but you can't capture this in a scientific experiment or study.

The only thing you can do is find people who are similarly experienced, break them up into groups (n=1 is also ok) and ask them to complete a specific project, and see how much time it takes. But even then there are so many caveats. The experiment must be set up such that the presense of extensive library support for a particular task is not a confounding factor. There's also the open question of how do you measure these people's skills before the experiment begins?

Reply


@CapmCrackaWaka 18 days

Replying to @blopeur 🎙

> Benchmarking cutting-edge graph-processing algorithms running on 128-core clusters against a single-threaded 2014 Macbook Pro. The laptop consistently wins, sometimes by an order of magnitude.

LOL, this hits close to home. My company had a modeling specific VM set up to run our predictive modeling pipelines. Typical pipeline is about 50,000 to 5 million rows of training data. At best, using an expensive VM, we managed to get 2x training speed from lightgbm on the VM vs my personal work laptop. We tried GPU boxes, hyper threaded machines, you name it. At the end of the day, we decided to let our data scientists just run models locally.

Reply


@xwdv 18 days

Replying to @blopeur 🎙

Any cold showers for unit tests?

Reply


@mhh__ 17 days

Replying to @blopeur 🎙

Where's the cold shower for this article?

Reply


@riazrizvi 18 days

Replying to @blopeur 🎙

Luke warm showers to me - these points need good sources to back them up to be really cold.

Reply


@MarquesMa 17 days

Replying to @blopeur 🎙

> Static Typing reduces bugs.

This matches my experience. People say otherwise might need to put more effort on writing better tests.

That said static typing usually catch minor problems like typo faster. But for dynamic typing it's going to catch by tests a bit later. But usually tests run faster with dynamic languages, so it's a tradeoff.

My favorite approach is the mixed approach like TypeScript:

1. Faster feedback loops: Usually statically typed languages compiles slower thus slower feedback loops. But languages like TypeScript can skip type check and emit only to the runtime, making test watcher very fast - as soon as I hitting Cmd-S I can see the result.

2. Optional typing: Sometimes a function signature is going to be 10x larger than the body, which is really a hassle. Sometimes I just skip them, or skip typing module private functions as long as it's properly tested.

Reply


@moralestapia 18 days

Replying to @blopeur 🎙

>Hype: "Static Typing reduces bugs."

Oof, that one is a huge can of worms.

Reply


@cloogshicer 18 days

Replying to @blopeur 🎙

> Static Typing reduces bugs.

At least to me, the big advantage of static typing is not that it (allegedly) reduces bugs, but that it aids my understanding and helps in navigating the program. It's a tool for thinking and communicating.

Reply


@bilekas 18 days

Replying to @blopeur 🎙

> "Static Typing reduces bugs."

I would argue that static typing reduces bug complexity/creep. Mainly from working in environments without proper testing during the js days, TS was rough at first, but did help.

Reply


@aranchelk 18 days

Replying to @blopeur 🎙

> Hype: "Static Typing reduces bugs."

It’s only hype because it’s imprecisely stated. Static type systems make entire classes of bugs impossible at runtime. The stronger (read less permissive) the type system, the more classes of bugs cannot occur.

Reply


@laserlight 18 days

Replying to @blopeur 🎙

> Hype: "Identifiers should be self-documenting! Use full names, not abbreviations."

> Shower: Researchers had programmers fix bugs in a codebase, either with all of the identifiers were abbreviated, or where all of the identifiers were full-words. They found no difference in time taken or quality of debugging.

That's a very weird take on the statement. The downside of using abbreviations is probably dominated by the difficulty of fixing the bug. The problem I have with abbreviations is that they just become another thing that you have to spend your mental resources on. “What is this variable exactly? Oh, I see.” is just wasted effort.

Reply


@fpoling 18 days

Replying to @blopeur 🎙

For me the biggest advantage of static typing is that it allows to safely refactor code. Without it even with extensive unit test coverage refactoring often is just not an option.

Reply


@keybored 18 days

Replying to @blopeur 🎙

Hype: Cold showers are good for you (good stress)

Shower: keybored, your shower is not cold enough to induce stress and you are too lazy to modify the showering experience in any way

Caveats: Other people may be anti-lazy enough to modify the showering experience

Notes: Check yourself

Reply


@moffkalast 18 days

Replying to @blopeur 🎙

> Hype: "We should develop software using Agile."

https://www.agitma.nl/wp/wp-content/uploads/2016/07/Dilbert_...

Reply


@theIV 18 days

Replying to @blopeur 🎙



@fallingmeat 18 days

Replying to @blopeur 🎙

Formal methods has a lot of practical application but the tools and techniques are very inaccessible to the average SME. We need better tools. For example, here is a demo of how to use an SMT solver to write better system requirements: http://slra1.baselines.cloud/

Reply


@dfee 18 days

Replying to @blopeur 🎙

Was hoping to see, and would like to see, one of these on Functional Programming.

It’s been an immensely enjoyable experience getting into it, but with a non trivial startup cost.

My team has generally adopted it (at least to some degree, and in a language which half supports these patterns), but I’m sure this coding style erodes in favor of something that feels more imperative when we move on.

Reply


@ryanmarsh 18 days

Replying to @blopeur 🎙

Title should be “Cold Showers for Straw-man Arguments”.

Reply


@blindmute 17 days

Replying to @blopeur 🎙

Hype: Your friend says, "Good morning!"

Shower: Unfortunately, there is no conclusive peer-reviewed evidence that it is, in fact, a good morning. A randomized trial found that many mornings are bad.

Caveats: Only applies to mornings. No rigorous paper exists for evenings, so this remains an unknown.

Reply


About Us

site design / logo © 2022 Box Piper