HN user

ai_

20 karma
Posts0
Comments15
View on HN
No posts found.

Ever since I started riding a motorcycle I've started to believe this to be the case too. I get so many bug splats on my helmet, jacket, and motorcycle that I'd never have if I was driving a car. By the end of most rides out in the country on the highway I'm covered in splats.

if let makes a lot more sense when you learn that a normal let expression also takes a pattern[1].

  let Coordinates(x, y) = get_coords();
But this is intended for "exhaustive patterns". If you can't express an exhaustive pattern, like with an Option, then you can use let ... else
  let Some((x, y)) = get_coords() else { return };
if let is just an extension of this "let pattern" system.

Once you internalize how patterns work (and they really work everywhere) it all starts to really make sense and feels a lot cleaner.

[1] https://doc.rust-lang.org/reference/patterns.html

No? Not everyone's dream is being a manager. I like writing code, it's fun! Telling someone else to go write code for me so that I can read it later? Not fun, avoid it if possible (sometimes it's unavoidable, we don't have unlimited time).

I'm not sure if it's actually any easier to read. When lots of things are changing it honestly becomes harder to read and figure out what's important and what's superfluous.

With the old progress system, everything was on one line. This honestly isn't horrible to me since I can easily glance text from left to right to figure out what the gist of the text is. When it's changing between the same two steps it still isn't too much of an issue since the information is all still in the same place and it's not actually changing too much between each stage. I can identify each step, figure out what's changing between them, and look for that information specifically.

The new progress system dumps a lot more information at the user, most of it detailing what file is being analyzed and compiled, each one taking maybe 2-4 frames of screen time, on an excessive number of lines, just a complete barrage of pointless information. None of this is really important to me since the only time it would be important is if a file or step took more than 3 seconds to be processed. With items constantly appearing and disappearing, the things that are taking time on the more macro scale like build-lib and build-exe steps that are more important to me will constantly move around the terminal. It's much much harder to read something if it's jumping up and down randomly every 2 frames vs if it's being swapped to share a single line. If the line literally leaves my field of view, it becomes frustrating to follow.

I much prefer the Bazel approach to this problem. When running a series of actions concurrently, the 6 actions taking the most amount of time will be visible in the action list showing how long they're taking, but all other actions will be minimized to a "and X other actions..." line.

This looks cool on the surface, but in practice is not that good at giving you progress information. Which is what progress indicators should do! At best this is a better indicator of how much work is being done, not how much progress is being made. Like a bunch of bleeps, bloops, and random LEDs toggling when a computer does work in a sci-fi TV show.

I think this would be better if individual files being processed got removed unless they start taking too long. Keep the build-exe and build-lib steps around but make them a little sticky. When they complete, have it say "Done" and then remove things in groups or on a set interval. Don't change the number of lines too often and don't reorganize lines either. Generally, it should be easy to parse what's going on and frequent changes to the number of lines and how much information is on each makes that hard.