Live data from Hacker News

You can't do that because I hate you

bvisness.me

121–130 of 216 posts

Re: You can't do that because I hate you

#121

All this time after writing this article, I’m now realizing a better way to sum up the issue: It’s like when you ask “can I go to the bathroom” and the teacher says “I dunno, CAN you?”

Your rant is very valid by the way. I didn’t have these particular problems but you captured the essence of similar experiences I’ve had with other tools. Just the thougt of tinkering with something im not familiar gives me the goosebumps, maybe a little nausea, shortness of breath. Maybe it’s some form of PTSD gradually accumulated over the years. In the end it’s no big deal if you don’t expect things to work logica…

I think it's a totally valid rant too. We get so used to our tools laughing at us saying "Ha ha ha! You didn't say the magic word!" And then a few searches or manual lookups later, you learn the magic word and use it, the tools say "Ha ha ha! We've deprecated that function!" And slowly through our careers, we just start accepting it as an inevitable fact of programming.

Re: You can't do that because I hate you

#122
I agree with the authors conclusion that we make this stuff hard on ourselves.

No one hates software developers more than other software developers, and no one understands usability less than a software developer.

This is one of those things I thought would get better over 30 years but has just continually gotten worse.

Re: You can't do that because I hate you

#123
post #52

Earlier quoted context omitted.

How about def __repr__(self): import warnings warnings.warn("Use exit() or Ctrl-Z plus Return to exit") return super().repr()

What if you aren't in the REPL? Using __repr__ at all seems like an abstraction violation. It should be the REPL's job to layer on special casing for exit.

The actual behavior is indeed a bit ridiculous:

    >>> print('%r' % str)
    
    >>> def whatisit(x):
    ...     print('It is %r' % x)
    ... 
    >>> whatisit(min)
    It is 
    >>> whatisit(exit)
    It is Use exit() or Ctrl-D (i.e. EOF) to exit
Excuse me?

IMO if the REPL wanted a friendly feature like this, it should be a generic REPL feature, not a hack applied to the function exit.

Re: You can't do that because I hate you

#124
post #101

I have a similar pet peeve in software, what I refer to as ‘Don’t Suck’ Buttons. A ‘Don’t Suck’ Button is a setting, turned off by default and usually hidden in a corner of the UI or configuration file, which fixes a common issue that new users experience, and/or turns on the behavior that everyone wants from the product in the first place. The best examples of ‘Don’t Suck’ Buttons involve settings with no obvious di…

These things are turned off because product owners and project managers are almost never power users of the software they are tasked with steering. They seem to believe that all users are of their own skill level at maximum, because who could possibly know more? “They aren’t the product owner! I am! Everyone who doesn’t use this like I do is using it wrong!”

And this kind of thing is how “new” outlook gets written, which is an absolute shitshow compared to the legacy outlook client.

Re: You can't do that because I hate you

#125

I feel the same way about Rust unstable features. Either you can only use features that are "stabilized"—guaranteed to never change—or you can throw all guarantees out the window, and use the unstable, experimental version of the toolchain. This would be fine if "unstable" features were actually experimental messes, but all sorts of completely-benign utility functions are "unstable". You have to throw out all guarant…

> but is still unstable due to being "newly added". Where did you get this from? The tracking issue says nothing of the sort: https://github.com/rust-lang/rust/issues/61695

> Where did you get this from?

The source code?

    #[unstable(feature = "unwrap_infallible", reason = "newly added", issue = "61695")]
And that issue you linked is from 2019 and full of people asking when it will be stabilized. Last activity was in late 2021.

Re: You can't do that because I hate you

#126

Earlier quoted context omitted.

> but is still unstable due to being "newly added". Where did you get this from? The tracking issue says nothing of the sort: https://github.com/rust-lang/rust/issues/61695

Right, it's nothing to do with it being "newly added". That issue had been filed by its OP as a feature request. It then got repurposed into a tracking issue for the feature, but it's not following the standard tracking issue template that lists any blockers, stabilization steps, etc. (Compare to https://github.com/rust-lang/rust/issues/119364 that happens to be the newest "Tracking issue" atm.) Also since the OP did…

> Right, it's nothing to do with it being "newly added".

It absolutely was, but now it seems to be mostly that the stabilization process is tedious enough that nobody has done it yet for this tiny utility function. There are tens of other tiny utility functions in the same situation that have been sitting for years, I run into them all the time.

The whole situation surrounding "unstable features" is just super disappointing for me. This stuff doesn't deserve to be unstable, and I shouldn't have to switch to an experimental toolchain that breaks all the time just to use these tiny utility functions!

Re: You can't do that because I hate you

#127
post #28

Earlier quoted context omitted.

Except in the case of the 'exit' clearly this is accepting and parsing imprecise input in order to guide the user. If the code wasn't looking for 'exit' in order to correct the user (to use 'exit()'), it would just spit out some other error for 'I don't know what you're talking about'. Instead, they actually detect the intent by specifically coding for it... and then ignore it anyway. That's bloody minded.

Except they didn't -- the result of a statement is turned into a string, and the string is printed. There are standard ways of turning objects into strings, and the `__repr__` function on the `exit` object returns that string. If you call that object then it raises an exception that triggers a REPL to cleanly quit. The code is here: https://github.com/python/cpython/blob/3.12/Lib/_sitebuiltin...

How about making `exit.__repr__` raise a CleanExit exception that gets caught in the outer REPL and then exits?

Re: You can't do that because I hate you

#128

Earlier quoted context omitted.

Emacs is full of these. In its defense, Emacs predates most modern UI paradigms (including, y'know, Ctl-C/V for copy-paste, or calling things "windows" vs "frames"), and is very conservative about updating defaults due to inertia.

Emacs is unbelievably full of them, but at the very least if it's missing a switch you can program it yourself easily (and fix any bugs yourself too). Not sure if that's a pro or a con, but the option is there.

> you can program it yourself easily

I consider myself a seasoned programmer, but after a decade I continue to fail to do any significant customization (other than a tidy .emacs leveraging use-package (since before it was cool^H^H integrated by default)).

Lisp's syntax is easy, but Emacs' API surface and concepts are bewildering, especially due to its aforementioned mismatch with modern terms.

Re: You can't do that because I hate you

#129

Earlier quoted context omitted.

Emacs is unbelievably full of them, but at the very least if it's missing a switch you can program it yourself easily (and fix any bugs yourself too). Not sure if that's a pro or a con, but the option is there.

> you can program it yourself easily I consider myself a seasoned programmer, but after a decade I continue to fail to do any significant customization (other than a tidy .emacs leveraging use-package (since before it was cool^H^H integrated by default)). Lisp's syntax is easy, but Emacs' API surface and concepts are bewildering, especially due to its aforementioned mismatch with modern terms.

I found it somewhat hilarious that you wrote a prose sentence with nested parentheses then began the next sentence with "Lisp's syntax is easy"

Re: You can't do that because I hate you

#130

Earlier quoted context omitted.

Emacs is full of these. In its defense, Emacs predates most modern UI paradigms (including, y'know, Ctl-C/V for copy-paste, or calling things "windows" vs "frames"), and is very conservative about updating defaults due to inertia.

Do you have a list of favorites?

On Mac, assign traditional keybinds to Command/⌘ shortcuts (⌘-C/V for copy-paste, -S for save, etc).

Display the current column number in the modeline with (setq column-number-mode t)

Delete the selected area when overwriting by enabling (setq delete-selection-mode t)

Save sessions (all open buffers/files) automatically on quit with (setq desktop-save-mode t)

Display line numbers in the left gutter with (setq global-linum-mode t)

Wrap lines (with a convenient icon in the gutter to indicate line continuation) with (setq global-visual-line-mode t). Bonus: linum-mode compatible!

Skip that startup screen with (setq inhibit-startup-screen t)

Remove the limited and redundant icon toolbar with (setq tool-bar-mode nil)

Make emacs automatically refresh buffers whose underlying file has changed (and has no local unsaved modifications) with (setq global-auto-revert-mode t)

All of the above variables can also be customized through Emacs' excellent Customize, which is better than individually doing each (setq ...) I wrote above.

And these are just from a quick skim of my .emacs file... Decades ago, when a college friend espoused the merits of Emacs, I didn't get it because my first experience with a vanilla setup was so... limited. This is also why people will laud more "batteries-included" distributions like Spacemacs or Doom Emacs.

Post reply on HN