Noice (thelemmy.club)
submitted 3 months ago by to c/linuxmemes@lemmy.world
 
you are viewing a single comment's thread
view the rest of the comments
[–] 33 points 3 months ago (8 children)

Always amused me that sudo !! is actually more keypresses (at least on keyboards where typing ! requires holding Shift).

  • source
  • parent
  • hideshow 8 child comments
  • [–] 62 points 3 months ago* (4 children)

    You just blew my mind. sudo [space] [shift] !! [enter] (4+1+1+1+1+1) is one keypress longer than ↑ + home + sudo + space + enter (1+1+4+1+1). In your face, universe.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 16 points 3 months ago

    If you have an actual home key. If it's ctrl+a or (IIRC, AFK) ctrl+← then we're even.

    And if we track hand movements then pressing ! twice may be faster than moving to another key.

    But yeah, it's not at all clear that sudo !! is faster like you'd expect it to be.

  • source
  • parent
  • [–] 6 points 3 months ago (2 children)

    Actually, after kinematic analysis of the required fingertip trajectories upheaves both of these arguments. If you calculate the aggregate spatial displacement across a standard 2D Euclidean plane for both input strings, the former macro sequence yields a significantly lower metric footprint than the latter.

    For the sake of empirical demonstration, we can map this across a standard ANSI 100% layout using a normalized key pitch constraint where 1 U = 19.05 mm. By establishing a Home Row Idle-State Matrix as our behavioral anchor and tracking independent multi-finger vectors using the standard Pythagorean metric tensor—calculating the straight-line distance d = sqrt( delta_x^2 + delta_y^2 ) between consecutive keystroke coordinates—we arrive at the following quantitative breakdown:

    Macro Sequence 1: sudo [shift] !! [enter]

    • Single-Handed Vector String: 40.878 U
      • Net Linear Displacement: 778.7 mm
    • Dual-Handed Touch-Typing Matrix: 8.424 U
      • Net Linear Displacement: 160.5 mm

    Macro Sequence 2: [up] [home] sudo [space] [enter]

    • Single-Handed Vector String: 40.989 U
      • Net Linear Displacement: 780.8 mm
    • Dual-Handed Touch-Typing Matrix: 21.728 U
      • Net Linear Displacement: 413.9 mm

    tl;dr

    Fewer keystrokes != less work. Even though typing !! looks like more work, it isn't because your finger travel distance is significantly shorter when executing those keys using two-handed touch typing on a standard ANSI QWERTY keyboard.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 3 months ago* (1 child)

    Edit: I will forward your thesis to the cat.

    My day started out catastrophically bad, resulting in taking a sick day.

    Then came you.

    I cried and laughed in some sequence and it gave me the energy to get out of bed. Now, I will have breakfast*.

    *Loose definition.

  • source
  • parent
  • hideshow 1 child comment