12 ms·
- GNU/Linux + i3wm; complete control over my programming environment. - bash + GNU coreutils; seriously, take the time to be able to write helpful bash scripts
by Jeaye 6y ago
- GNU/Linux + i3wm; complete control over my programming environment.
- bash + GNU coreutils; seriously, take the time to be able to write helpful bash scripts which can run basically anywhere.
- git; use it even when you're not pushing to a remote. Add helpful aliases for everyday commands. Build a good mental model of commits and branches to help you through tough merges. ( my ~/.gitconfig: https://gist.github.com/jeaye/950300ff8120950814879a46b796b3c7 https://gist.github.com/jeaye/950300ff8120950814879a46b796b3... )
- Regex; combined with bash and your GNU tools, a lot can be done.
- Vim; modal editing and vi-like navigation can blow open your mind. Explore the existing plugins to accomplish everything you want to be able to do. It's all there. ( my ~/.vimrc: https://github.com/jeaye/vimrc https://github.com/jeaye/vimrc )
- Functional programming; if you're new to this, start with Clojure, not one of the less-practical languages. This has made such a huge impact on the way I think about code, write code, and design code that it's possibly the biggest one here for me.
- nivethan 6y agoFor a very long time I didn't use anything besides just plain vim, 2 biggest things to add to your vim use is undodir and YouCompleteMe. Crazy that I didn't have either of these for so long, undodir I wish was part of the default.
- Teichopsia 6y agoNew(ISH) vim user here. I couldn't figure out how to install YouCompleteMe the other day, but I had not trouble with coc.
- necrotic_comp 6y agoTo add to this, vim quickfix-reflector ( https://github.com/stefandtw/quickfix-reflector.vim https://github.com/stefandtw/quickfix-reflector.vim) was life-changing for me. It lets you modify and save code from the quickfix buffer, so when you search for something and it shows up in the qf, you can do a find replace / edit / etc. This is especially great for mass refactoring / renaming.
- Jeaye 6y agoWoah, that's awesome. I use ^f for ack.vim, so combining that with quickfix-reflector sounds superb. Thank you!
- jerzyt 6y agoI've been using vim for 20+ years and have never been into extensive customizations. That was part of the attraction, because I had to deal with a lot of remote servers, often off-shore. With out-of-the box vi/vim I could get the most done with the least number of keystrokes. Someone made a comment above about IDE editors with vim emulation. Wish every IDE would do that. RStudio for example is not exactly vim, but I find it close enough. If only Spyder and Jupyter would that.
- dwagnerkc 6y agoI've used these plugins to get vim bindings in Juypter Notebook / Lab. Jupyter Notebook: https://github.com/lambdalisue/jupyter-vim-binding https://github.com/lambdalisue/jupyter-vim-binding Jupyter Lab: https://github.com/jwkvam/jupyterlab-vim https://github.com/jwkvam/jupyterlab-vim
- jerzyt 6y agoThank you sooo much!!!
- comfydragon 6y agoBy "undodir" are you referring to the "vim-undodir-tree" plugin? Because the "persistent_undo" feature that is built into Vim/Neovim (normally) is what I think of when I hear "undodir".
- tdfx 6y agoI switched from vim (with YouCompleteMe) to VSCode about 4 years ago and I've recently discovered the intellisense engine for VSCode is now available as a vim plugin: https://github.com/neoclide/coc.nvim https://github.com/neoclide/coc.nvim.
- mythrwy 6y agoThis makes me realize I really need to update my .vimrc and some plugins. I've been toting around the same .vimrc for like 6 or 7 years and there are so many better plugins now. Vim has been probably the most profitable tool I've ever picked up. Or maybe git. But I think Vim.
- jordanlewis 6y agoI made persistent_undo as part of Google Summer of Code in 2011. Very grateful I got to do that (and for the mentorship of Bram Moolenaar), and I'm so glad that this became part of your essential workflow. I also can't live without it at this point.
- braindongle 6y agoAn excellent list. Regarding functional programming, I recommend starting with a gentle approach that doesn't require picking up a new language: 1. Stop creating counters/loops and become facile with map, reduce, and the like. This will shift your thinking away from blocks and toward functions. 2. Take the time to really understand what side effects are, and start avoiding them everywhere they are not necessary. Keep scopes as local as is practical. 3. When you start toying with functional programming per se, make sure you really have your head around recursion. That's where much of the magic concision comes from.
- 0xEFF 6y agoA gentle way to get into the "functional" mindset is to write small a script and then use it to process some collection with xargs. xargs is analogous to map() in this situation, and the script needs to have limited side effects to work well with concurrency. xargs -P4 for example.
- vmchale 6y ago> I recommend starting with a gentle approach that doesn't require picking up a new language: But then you don't get any of the newer stuff.
- biomodel 6y agoFunctional programming has been a game changer for me as well and has enabled me to write larger and more complex programs that are easy to maintain and reason around. I highly recommend cytoolz for python
- amelius 6y ago> An excellent list. Regarding functional programming, I recommend starting with a gentle approach that doesn't require picking up a new language: But at least make sure that your language supports closures.
- MaxBarraclough 6y ago> I recommend starting with a gentle approach that doesn't require picking up a new language Disagree. This is likely to 'dilute' the lessons of functional programming, as it were. If you learn to program in idiomatic Clojure/OCaml/Haskell/Scheme, you can be relatively sure you really have picked up the principles of functional programming. If you merely attempt to apply new principles in an environment you're already comfortable in, things aren't going to 'click' in the same way. Beside that, plenty of languages simply lack the facilities needed to effectively use the concepts of FP, as vmchale says.
- tych0 6y agoMy life was also improved with some additional aliases in my git config: [alias] dfif = diff idff = diff grpe = grep
- seqizz 6y agoI handle this case with auto-correction for all one off errors via <tab>.
- smichel17 6y agobashrc snippet (with extra newlines, for folks on mobile apps like materialistic that don't understand code formatting): # I do this an embarrassing amount alias fgf='fg' alias fgfg='fg' alias gf='fg' alias gfg='fg'
- twright0 6y agoThis resonates... from mine: alias emcas='emacs' alias emac='emacs' alias emasc='emacs' alias enacs='emacs' alias emas='emacs' alias emascs='emacs' alias eamcs='emacs' alias eemacs='emacs'
- Jtsummers 6y agoI have aliased `emacs --daemon` to `emacsd` and `emacsclient -t` to `e` because I use it so much.
- inetsee 6y agoYears ago Interlisp (does anybody here remember Interlisp?) had a function called DWIM (AKA Do What I Mean). It was an (optionally enabled) part of the REPL. If you typed something that made no sense, DWIM would try to figure out what you really meant to type, and offered to run the corrected command. I have often wondered why that functionality disappeared, and why no one has tried to resurrect it. Search engines offer corrections all the time; why doesn't bash?
- 6y ago
- vmchale 6y ago> start with Clojure, not one of the less-practical languages. doesn't expose you to typed functional programming (the ML school) though.
- caseymarquis 6y agoI upvoted the parent and want to emphasize vim key bindings. This is not necessarily vim the editor, it's your editor of choice in vim mode. Learning to use vim is like learning to touch type: it's initially a pain, but it's hard to ever go back once you've mastered the basics. If you haven't learned to touch type (it happens, I didn't learn until I was 22), then first learn that, then learn vim. FYI: Remap your capslock key to escape to use Vim more effectively.
- mxschumacher 6y agoI recently had a revelation: When typing longer shell commands it can be time-consuming to go back and make changes, turns out you can use Vim style cursor movements within the Fish: https://stackoverflow.com/questions/28444740/how-to-use-vi-mode-in-fish-shell https://stackoverflow.com/questions/28444740/how-to-use-vi-m...
- slim 6y agoyou can do that in bash too, and any cli that uses readline library
- chrisweekly 6y agoalso zsh (tho it doesn't use readline per se)
- kadonoishi 6y agoset -o vi Starts you in insert mode. To go back to the usual command-line editing, set -o emacs
- HouseOfStairs 6y agoThis was a revelation for me as well. I also didn't realize that if you haven't configured vi keybindings, the default is Emacs (in bash or anything using readline). Even though Vim's my main editor, I found modal editing a bit too heavyweight on the commandline, so I prefer the default Emacs (most useful by far: C-b to go back one word and C-k to delete everything right of cursor).
- wing-_-nuts 6y agoRe: i3wm I installed it a couple years ago, went whole hog, down the rabbit hole, but realized a couple of things. 1. I rarely ever use anything more than a simple L/R split. 2. When I do use something more complex, it's almost always in the terminal, in which case why not use tmux? These days I'm back to using gnome because ubuntu switched to it over unity (which had a weird multitouch bug that drove me crazy). What do you get out of i3 beyond a simple L/R split supported by simpler wms and how often do you use it?
- deleted 6y ago[deleted]
- siddboots 6y agoI depart from that L/R split pretty regularly, especially when coding. I frequently have a single large window taking up half of my screen, and several smaller windows stacked vertically on the other half. The big window is usually the editor, but sometimes the browser if doing web development, or possibly a pdf or something like that. The little windows might be the editor, or a browser, or general command line work, or the stdout of a server or other daemon that I'm working with. I sometimes do move to more of a tmux split workflow, especially if I'm working on remote machines, but it's just much nicer to have the same keyboard commands for all of my windows.
- 3131s 6y agoI always have at least 4 windows open in a project workspace, those being a text editor, a file browser, a terminal, and a web browser. Currently I use i3 with packages pulled in from XFCE to handle sessions and power management, plus xfce4-appfinder and xfce4-panel (started and killed with MOD keys of course) because I wanted something beyond d-menu / b-menu. It all works very well and was easy to configure.
- Fellshard 6y agoI've got a portrait monitor connected to a laptop, so I end up splitting the monitor's pane vertically. I treat each workspace as dedicated for a specific purpose - Dev, Browsing, Chat, etc. That gives me quick mnemonics to hop to each space: MOD+1, MOD+2, MOD+3, ... Within my Dev workspace, I use a tabbed pane for top-level organization: browsers (stacked), IDE, terminal, Emacs (magit + org), etc. This keeps my focus on that space when doing dev, and away from the laptop monitor, which is only occasionally useful as a reference. I'll occasionally stack a terminal beneath my IDE if the current task requires it, e.g. to test a deployment or a project task.
- mxschumacher 6y agofor those wanting to brush up on their regex skills, here's a nice tutorial: https://regexone.com/ https://regexone.com/
- dutchrapley 6y agoTHIS. Especially Clojure. If you want to become a better JavaScript programmer, definitely dabble in Clojure.
- alasdair_ 6y ago> Vim; modal editing and vi-like navigation can blow open your mind. Explore the existing plugins to accomplish everything you want to be able to do. It's all there. The reason I end up ditching Vim after a few weeks every time I try it (4 serious attempts now) and go back to IntelliJ (which I’ve used for two decades) is that I never found a solution to the following trivial issue: Imagine you have a large Java codebase and you want to refactor all occurrences of a method called “doFoo()” to give it a better name - how do you do this in Vim? This is a single keypress in IntelliJ and I use this function very frequently but I never found a way to do it in Vim. Note: I only want to change THIS doFoo() method, not the hundred other doFoo() methods in the codebase. Also note: yea, this includes all implementations of the interface, all abstract classes, all classes that extend a a class that implements the interface and all other funky polymorphic things, and NO unrelated code. And do it all in one keypress, don’t have me manually go through line by line. Any ideas if this is possible now?
- positr0n 6y agoI am about as hardcore a vim user as they get and I would never edit Java without an IDE. That being said the first thing I do after installing IntelliJ is open the plugin settings and install IdeaVim.
- srazzaque 6y agoIm the same, s/vim/emacs/, though I'm also very comfortable in Vim. I use Emacs for a tonne of stuff, and basically any other language I use. But for Java, with its deeply hierarchical codebases and general verbosity, there's just no sane way to manage that complexity smoothly without a good IDE. (One could argue that if a language necessitates an IDE to work with it, then that's a failure of the language's DX. But thats an entirely separate discussion.)
- mxschumacher 6y agoYou don't need to choose between Intellj and Vim, because you can use Vim keybindings within Intellj. So you get all the powerful IDE commands and the high speed of Vim commands at the same time. It's easy to set up !