Live data from Hacker News

Suicide Linux

qntm.org

131–135 of 135 posts

Re: Suicide Linux

#131
post #38

Earlier quoted context omitted.

A friend of mine aliased `git status` `git statsu`; I, being lazier, chose `git st`. Any time saved I lost by not copying his other alias, `c = commit -amSTUFF`...

I must be lazier. I use `gitst` for `git status`. That is 1/6 shorter and IMO not harder to remember.

    ~ $ abbr | grep git | sort
    abbr af 'git kit autofixup'
    abbr amend 'git commit --amend'
    abbr fixup 'git commit --fixup'
    abbr gb 'git branch'
    abbr gcan 'git commit --amend --no-edit'
    abbr gcm 'git commit -m'
    abbr gco 'git checkout'
    abbr gcop 'git checkout -p'
    abbr gfa 'git fetch --all -p'
    abbr gkdm 'git kit del_merged'
    abbr gl 'git log --oneline --color --decorate -n20 --graph'
    abbr gp 'git pull --ff-only --all -p'
    abbr gph 'git push -u origin HEAD'
    abbr gre 'git rebase'
    abbr grec 'git rebase --continue'
    abbr grem 'git rebase -i master'
    abbr greom 'git rebase -i origin/master'
    abbr greum 'git rebase -i upstream/master'
    abbr gs 'git status'
    abbr gxa 'gitx --all'
    abbr namend 'git commit --amend --no-edit'

Re: Suicide Linux

#132
post #129

Earlier quoted context omitted.

that sounds so backwards. `find_by_id` is a lookup, not a search; it seems implied to me that the ID should exist and if it doesn't that's an exception. Whereas `find` is a search and it's not atypical for search results to be empty.

Since I think rails 4 or earlier it's preferred to use `find_by(id: 4)`, but could instead be `find_by(email: "email@example.com")`, or even `find_by(first_name: "Franky', last_name: "Tomato")`. IMO returning nil instead of an exception for the above is practical for me. Much easier to work with. Having `find(4)` raising an exception is because you'll typical use it in your member actions for a controller where it's…

This begs the question of what the hell is the point of the bang convention e.g. find! in this case.

Re: Suicide Linux

#133
post #129

Earlier quoted context omitted.

Since I think rails 4 or earlier it's preferred to use `find_by(id: 4)`, but could instead be `find_by(email: "email@example.com")`, or even `find_by(first_name: "Franky', last_name: "Tomato")`. IMO returning nil instead of an exception for the above is practical for me. Much easier to work with. Having `find(4)` raising an exception is because you'll typical use it in your member actions for a controller where it's…

This begs the question of what the hell is the point of the bang convention e.g. find! in this case.

I've never seen `find!`. If that's a thing, then I have no idea why.

I've have found `find_by!` useful though. Say you want to raise an exception with `find_by!(email: "asd@asd.com")` or `find_by!(slug: "parameterized-string")` etc.

Re: Suicide Linux

#134
post #30

> The reaction from the OS is actually rather underwhelming. Somehow related, a coworker at a previous place unmounted some disks on an old AIX production box. It took him a solid minute to realise he had mistakenly unmounted / due to a typo (yes it was possible) as old processes with already opened files were happily serving stuff and only new attempts at opening files were beginning to produce errors. Also, a simil…

Waay back in the day I was using crusty old shared Sun3 workstations. The keyboard was really sticky because, well, some students are pigs. I developed the habit of SLAMMING the Enter key on each command, until one day I was deleting backup files (rm *~) and my fingers grazed the delete button before striking Enter...

> The keyboard was really sticky because, well, some students are pigs.

I work at a technological youth centre, teaching kids cool things to do with computers, programming, music and whatnot. All the hardware we get is donated from businesses, schools, etc. (because volunteers / zero-budget).

And this is just ... ahh. I usually cope by trying not to notice and focus on the screen instead. Sometimes though the ick overwhelms and I fail, curse and go on a hunt for a slightly less gross keyboard. And wash my hands after--though I kind of wonder if that even really makes a difference in this particular scenario (except for the idea of it), afaik the main benefit of washing your hands (in these situations, not if you're a surgeon or a cook etc) is some kind of herd-immunity deal isn't it? And given the keyboards stay dirty, and the kids continue to work on them hands-to-keyboard-to-nose-to-mouse-to-mouth-to-keyboard-to-everything-repeat (esp. the younger ones).

You know what would be really nice? Dishwasher-safe keyboards.

And yeah (before anyone replies with a link), I'm sure those exist already. Except that many of the places that need them don't budget for new (or specialty) keyboards but rely on donated used ones. But it would be really nice to have :) :)

Re: Suicide Linux

#135

Earlier quoted context omitted.

Waay back in the day I was using crusty old shared Sun3 workstations. The keyboard was really sticky because, well, some students are pigs. I developed the habit of SLAMMING the Enter key on each command, until one day I was deleting backup files (rm *~) and my fingers grazed the delete button before striking Enter...

> The keyboard was really sticky because, well, some students are pigs. I work at a technological youth centre, teaching kids cool things to do with computers, programming, music and whatnot. All the hardware we get is donated from businesses, schools, etc. (because volunteers / zero-budget). And this is just ... ahh. I usually cope by trying not to notice and focus on the screen instead. Sometimes though the ick ove…

The solution implemented roughly a year into my position was to liberally spread cans of wet-cleaning-wipes. It was such as obvious solution and it helped tremendously.

Alternative keyboards weren't an option in those Sun 3 days, but I've brought my own chair, keyboard, and mouse to work for decades now.

Post reply on HN