6 ms·
I don’t understand how people can remember all these custom scripting languages. I can’t even remember most git flags, I’m ecstatic when I remember how to itera
by stingraycharles 7mo ago
I don’t understand how people can remember all these custom scripting languages. I can’t even remember most git flags, I’m ecstatic when I remember how to iterate over arrays in “jq”, I can’t fathom how people remember these types of syntaxes.
- mgfist 7mo agoSame, but now with AI I don't have to remember that anymore
- awesome_dude 7mo agoFor now - the law of enshittification means that the free/cheap access to AI will be curtailed soon enough.
- mgfist 7mo agoPretty much any OS locally runnable LLM can generate this stuff.
- Cthulhu_ 7mo agoI don't, I will google things and fiddle, then put it in a git alias (with a comment on what it does and / or where I got it from) and push it to my private dotfiles repo, taking it with me between computers and projects.
- crispyambulance 7mo agoI am convinced that the vast majority of professionals simply don't bother to remember and, ESPECIALLY WITH GIT, just look stuff up every single time the workflow deviates from their daily usage. At this point perhaps a million person-years have been sacrificed to the semantically incoherent shit UX of git. I have loathed git from the beginning but there's effectively no other choice. That said, the OP's commands are useful, I am copying them (because obviously I won't ever memorize them).
- weedhopper 7mo agoI’ve recently been looking into some tools that provide quick or painless help like pop up snippets with descriptions and cheat sheets, got any recommendations?
- rusted_gear 7mo agoI've found tldr to be useful https://github.com/tldr-pages/tldr https://github.com/tldr-pages/tldr
- arcanemachiner 7mo agoNavi is good for generating personal cheatsheets: https://github.com/denisidoro/navi https://github.com/denisidoro/navi But for Git, I can't recommend lazygit enough. It's an incredible piece of software: https://github.com/jesseduffield/lazygit https://github.com/jesseduffield/lazygit
- alwillis 7mo agoCheaters: https://brettterpstra.com/projects/cheaters https://brettterpstra.com/projects/cheaters
- FergusArgyll 7mo agoJust handroll one, I wrote one in python, use an sqlite db, call out to fzf and voila you have the perfect tool. Codex can prob one shot it
- freedomben 7mo ago> I am convinced that the vast majority of professionals simply don't bother to remember and, ESPECIALLY WITH GIT, just look stuff up every single time the workflow deviates from their daily usage. I wrote a cheat sheet in my notes of common commands, until they stuck in my head and I haven't needed it now for a decade or more. I also lean heavily on aliases and "self-documenting" things in my .bashrc file. Curious how others handle it. A search every time I need to do something would be too much friction for me to stand.
- dewey 7mo agoYou research it once, use it and then remember that it has "ancestor" in the command somewhere and then use ctrl + R to dig up something from your shell history.
- robrain 7mo agoIf I look something up twice, I record it in Obsidian. If I need it more than a couple of times, I'll probably make an alias, a script or a mask [1] file. Autocomplete and autosuggest are essential to my workflow. And good history search. [1] https://github.com/jacobdeichert/mask https://github.com/jacobdeichert/mask
- TheRealPomax 7mo agoIf you don't have to codedive new projects all the time, there's zero reason to memorize these. If your job is to look at new codebases all the time, you probably learn to remember these commands pretty quickly.
- SoftTalker 7mo agoYeah especially with git. All I know is pull, add, commit, push. Everything else I have to look up.
- usrbinbash 7mo ago> I don’t understand how people can remember all these custom scripting languages. We can't. Why do you think the `man` command exists?
- yujiachen 7mo agoSame here, so I wrap the post into an agent skill. Hope I can use them next time. https://github.com/yujiachen-y/codebase-recon-skill https://github.com/yujiachen-y/codebase-recon-skill
- drob518 7mo agoNobody does. One person figures it out, then writes a blog post, and we all Google for it. Even git’s man pages are long and sometimes cryptic.
- Fokamul 7mo agoYou add them into your GIT config file as shortcuts? If you have multiple machines (/must have), just apply your user config to current machine?
- dzaima 7mo agojj's template and revset languages are very simple syntactically, so once you're comfortable with the few things you do use often it's just a question of learning about the other existing functions (even if only enough to know to look them up), which slot right in and compose well with everything else you know (unlike flags which typically have each their own system). Or, perhaps better yet, defining your own functions/helpers as you go for things you might care about, which, by virtue of having been named you, are much easier to remember (and still compose nicely).
- jiggunjer 7mo agoReally, I got stuck trying to commit all files except those containing the string abc. As for revsets it's not easy to grab a single branch?
- limaoscarjuliet 7mo agoSome things are idioms that one repeats so often they just stick, e.g. I use "grep.... | cut -c x-y | sort | uniq -c | sort -nr" to quickly grep frequency of some events from a log file. Don't feel bad - no one remembers them all, we just remember a few idioms we use...
- NoSalt 7mo agoSo, how does one iterate over an array in jq? Asking for a friend.
- wwader 7mo agoAssume input is an array you can do it several ways depending on what you want: # output each value in the array separately .[] # output each value but transform it in some way .[] | . * 2 # map each value into a new array map(. * 2) # same as above but manual iterate/collect [.[] | . * 2]
- gspr 7mo agoYou and me both. Git is just so prevalent and fundamental to so much these days that I forced myself to use only a cheat sheet lying on my desk until I could comfortably use a reasonably productive subset by memory. Little did I know that that would make my colleagues think I'm some sort of git sage. But jq I use maybe once a week, and it just won't stick. Same for any git features beyond basic wrangling of the history tree (but, on the flip side, that basic wrangling has eliminated 99% of the times I have to look things up).
- TeMPOraL 7mo agoPeople naturally remember what they use frequently. For things they use infrequently, they search on-line and/or read the friendly manual. And yes, I'm also ecstatic when I manage to iterate over anything in `jq` without giving up and reaching for online reference. For `git`, functionality I use divides neatly into "things I do at least every week or two" and "things that make me reach for the git book every single time". I mean, that was true until ~year or so. Now, I just have an LLM on speed dial. `howto do xyz in $tool`, `wtf is git --blah`, `oneliner for frobbing the widget`, etc.
- PapstJL4U 7mo agolazygit helped me to get more into different git commands - I still don't know them by heart. but at least I use more git has to offer. and when a new branch is one key stroe away from being created, I am more inclined to use it.
- michaelcampbell 7mo ago`jq` and `ffmpeg` were two of my very early uses of LLM's for daily ease.