10 ms·
Carmack on not being a power editor user
- melling 6y agoI just signed up for https://repl.it/ https://repl.it/ I’d like to kick back on my couch and code for an hour using my iPad and Apple Pencil. I’m anxiously awaiting for someone to image a better mobile experience rather than attaching a hardware keyboard.
- xupybd 6y agoI use these features more when doing non programming tasks. Often I could use find/replace and some regex. However I enjoy the experience of having the editor do some of the lifting. I don't think I'm faster or better for it, just a little happier.
- nyx_ 6y agoAgree. Getting good at vim isn't something I do for my boss or my company, it's something I do for me. Using something like "ci(" to blank the parentheses under my cursor and immediately start typing a replacement saves me, like... a couple of seconds. But it gives me a little dopamine hit that I think helps with job satisfaction.
- read_if_gay_ 6y ago> However I enjoy the experience of having the editor do some of the lifting. Yeah, same. I recently realized that I use vim‘s normal mode features even in situations where I’d certainly be faster just typing things out manually, just because it feels good to “work smart”. Even if it’s not really. Another downside: using (and watching people use) editors without vim features becomes painful.
- pmoriarty 6y agoCould someone paste Carmack's twit here? I can't seem to see it without enabling javascript.
- WJW 6y agoHere you go: > I have never been a power editor user; typing just never felt like a bottleneck worth fighting over (unlike exploration). It is interesting watching my kids get excited as they discover various Sublime Text features that I never use.
- trollied 6y ago"I have never been a power editor user; typing just never felt like a bottleneck worth fighting over (unlike exploration). It is interesting watching my kids get excited as they discover various Sublime Text features that I never use." and "I am talking about generic text editing features; I definitely find language/IDE features like intellisense very valuable, and, as someone else mentioned, a good integrated debugger is among the most important things. "
- skytreader 6y agoTip: You can replace twitter.com with nitter.net and read tweets outside of Twitter's awful web UI. https://nitter.net/id_aa_carmack/status/1302651878065475584 https://nitter.net/id_aa_carmack/status/1302651878065475584 There are browser extensions to automate this too but I haven't tried any yet.
- WJW 6y agoTyping for a programmer is like brake pedal technique for an F1 driver. Yes, it is important to be able to type effectively. No, it is not sufficient for being a good programmer. It's easy to get lost in fancy editing techniques that get you a win of minutes per day (as Carmack mentions), while learning to come up with a better design will save you weeks in overall development time. Learning more editor shortcuts is much easier and more flashy, of course.
- davnicwil 6y agoI completely agree - optimising tooling is converging on a local maximum. Past a certain point the returns are rapidly diminishing and you burn a lot of time and effort on very marginal gains that would be much better invested on bigger picture, higher impact stuff - namely, the actual thing you're building. I wrote a blog post on this that you may enjoy [0]. I like your F1 analogy, I used tennis :-) [0] https://davnicwil.com/just-build-the-product/ https://davnicwil.com/just-build-the-product/
- WJW 6y agoYou're right, I totally enjoyed that blog post! I might borrow your analogy of tennis, since it is a bit better than the F1 one. :)
- saberdancer 6y agoI don't think the comparison fits. You can be a slow typist and still a great programmer but you probably can't be a good driver if you are bad at brake technique.
- fit2rule 6y agoI've been using vim/vi for decades, and am constantly referred to as the 'vim guru' in my dev sphere - but I only know like, 5 basic things - editing/navigation, search/replace, window management, cscope integration and .. Termdebug. The magic, though, is knowing how to access the command history window .. for some reason this always gets oohs and aahs. For me, Termdebug is the killer feature. There's something about being able to debug things faster than the other IDE-using folks, who are usually just waiting for the spin-up of their IDE into debug mode to stop by the time I've already stepped through the code in focus .. I think a lot of people would be in the vim camp if they could just master the 5 basic operations they'd need to use vim. Its pretty interesting to discover the whole world of stuff in help.txt that I just never, ever touch, for whatever reason ..
- akkartik 6y agoVim only got Termdebug in May 2018. What were you using in the decades before it?
- fit2rule 6y agoVimGdb/clewn .. but I don't remember having as good a time with debugging in vim until Termdebug came along, and mostly just had another terminal for gdb when needed.
- bmayor 6y agoI've never used termdebug. Here is some info: https://www.dannyadam.com/blog/2019/05/debugging-in-vim/ https://www.dannyadam.com/blog/2019/05/debugging-in-vim/ If that is accurate (it looks like it is), why is termdebug faster than keeping open a second window and using gdb there?
- fit2rule 6y agoIts a matter of switching between Vim windows rather than (in my case) Terminator windows - not that much of a difference to be honest, but the code navigation and completion within Termdebug is pretty dope - using it within vim means access to the compiledb navigation functionality ..
- nix23 6y agoI was never a Fan of Shooters...but i really love that guy. He is THE example of a decent "superstar" developer without BS.
- Const-me 6y agoNot sure I agree. I've been paying for a personal license of Visual Assist for a few years now. The power editing features I'm getting from it are really good, save me a lot of time. The "rename identifier" feature alone justifies the cost for me.
- rowanG077 6y agoDid you read his post? He is not talking about IDE-like features, just about pure text editing ones.
- dzhiurgis 6y agoThere’s some overlap - like option + up/down in intellij. Wouldn’t work without some parsing, yet basically editing text. Super powerful and personally probably most used feature.
- gentleman11 6y agoIn JavaScript, I often had to solve bugs and traced logic through 40+ source files. The reason I learned some editor power features was just to be able to navigate files quickly. For continuity of thought, I found it valuable
- ArtWomb 6y agoFlip side of this is that being a power cli user in 2020 is more powerful than ever before! Recently saw an interactive quantum circuit visualizer in 100% text mode. And its getting me personally back into old school favs like lynx, irssi ;)
- srtjstjsj 6y agoText mode is not the same as command-line. A full screen text UI is a low resolution GUI.
- Reelin 6y agoHow many GUIs are keyboard driven though? Vim isn't CLI, but it's significantly more pleasant to use than a GUI for me. Honestly if someone showed up with a keyboard driven GUI that completely lacked mouse input and had a modal paradigm I might actually use it over vim.
- robenkleene 6y agoResponding to one of Carmack's follow-up tweets (https://twitter.com/ID_AA_Carmack/status/1302652989610618882 https://twitter.com/ID_AA_Carmack/status/1302652989610618882): > Yes, it can be very impressive watching people using the power tools to maximum advantage, and sometimes is can be a dramatic win, but I usually think that it adds up to... a few minutes saved a day? I think measuring the gains of text editing features in terms of time is a distraction. Expressive editing features take something tedious and make it effortless. It makes it easy to do something that I'd normally put off. But the reason text editing features end up not being that important is that if the task is mission critical, you'll end up just soldiering through, even if it's tedious. Therefore it's an incremental benefit not a revolutionary one. I like text editing features because I personally like being organized, not because I feel like it makes me a more effective programmer. It lets me indulge myself in keeping code organized without that becoming a time sink.
- maxov 6y agoThis is very similar to how I look at it. Expressive editing features do not have a direct impact on my productivity when coding. However, for those 1-2 hour focused coding sessions, it is easer for me to enter and stay in flow when I feel a better connection to my tools. Since I do perhaps a dozen of those a week, I am able to accomplish more and do it more enjoyably, even if I only spend 20% of my work time in one of those sessions. I am not sure exactly how much the productivity increase is because I haven't tested it rigorously (honestly not sure how to even measure that), but I'd guess it's still only 5% at most. The benefits to my happiness and fulfillment when coding are definitely noticeable though, and I think it is because I am able to spend more time in flow. Edit: and for what it's worth, there are things that arguably have much greater impact on my ability to stay in flow than just the text editor: how good the debugger/REPL is, my familiarity with the language and libraries related to what I'm doing, etc.
- majkinetor 6y agoFew minutes gain is simply not true. Its IMO closer to an hour. Having ability to jump asap to any letter on the screen and any file in the project in few keypresses without browsing trough the tree and son on, is massive speed up. It doesn't just save time, it saves focus.
- deleted 6y ago[deleted]
- thanatos519 6y agoI'm probably a vim power user, but I stopped adding to my knowledge years ago because nothing seemed to be adding to my productivity. It sounds like Carmack just hit that point earlier. I feel this way about version control systems. More trouble than they are worth to me, even when working in the same tree with many others. If I make a branch, it's only because that's the only way to submit a PR. Merge conflict? I'll look at my diff and apply it manually to the other side. Merkle trees are great, but the only useful history to me is a straight line!
- redisman 6y agoI find Sublimes "power" features really useful for the tangential stuff. Getting a good look at a JSON object, preparing some mock data, preparing one-off data. Basically everything that falls before the threshold of being worth automating or writing a script for. With multi-line edit and a couple of plugins you can do some "excel" like stuff without the overhead and with the simplicity that plain text brings.
- JoelMcCracken 6y agoSo, I agree, somewhat. I am a long-time Emacs user. Occasionally, editing/macros/etc can save a LOT of time, and makes it much easier to make some changes which I might not decide to do. What I find more important however is the effective window/buffer management. Being able to manage my screen real-estate is killer; being able to do everything within one "world" is really valuable. One of the things I find most valuable is that I run my shell within Emacs. This lets me keep my flow going instead of switching context and perhaps getting distracted. I can watch the output of tests etc in one corner of my screen and edit files etc in the other ones. And because its quick to switch buffers, I can more easily reference various files for what I am doing. Basically, the literal time it takes to type is not the big benefit, but that it allows me to reduce my cognitive overhead of doing everyday, boring things like resizing windows, looking up symbols/finding definitions etc. This makes it easier to focus on my task at hand and not get distracted by all of the mundane tasks I would need to do otherwise.
- dj_mc_merlin 6y ago> What I find more important however is the effective window/buffer management. Yes! I cannot imagine how my life looked before `C-x b` (switch buffers in helm). However, I still have an actual terminal emulator open the entire time for serious stuff. Eshell is not compatible with a lot of programs, term/ansiterm are ok but not quite as good as a dedicated terminal. I get around having to context switch by using virtual desktops (KDE). I have Shift-F1 bound to the desktop with only emacs, and Shift-F3 to my terminal. Works beautifully. Rather than try to use a terminal in emacs I've found it more useful to use an solution designed for emacs, i.e git vs magit.
- smabie 6y agoEshell is a really great shell and a lot of full screen nurses apps can be replaced with an Emacs equivalent. The ability to use elisp in pipes and stuff is a game changer
- JoelMcCracken 6y agoI’ve never been able to make eshell part of my workflow. I wonder if you would share more info
- Waterluvian 6y agoThat’s always how I felt. Like 20% of my job is writing code. The rest is social and design work and documentation. But I think there are people whose job involves cranking out code all the time and I can see why it matters to them.
- srtjstjsj 6y agoTyping is 2/10 of your job? If your typing is half as efficient, then it would be 4/12 of your job. Twice as efficient makes it 1/9 of your job.
- kobe_bryant 6y agotbh the main use I have for a text editor is comparing files
- sebringj 6y agoIMO, That kind of crushes any argument about the tool you use, other than your brain.
- clircle 6y agoEmacs isn't better than Rstudio, Pycharm, TexMaker, and the other programs I would be using otherwise, but it is more comfortable and keeps me happy.
- panpanna 6y agoMy first real editor was microemacs on Amiga. Just thinking about it puts a smile on my face :) I learned C and became really good at it with that editor and didn't need to change a single setting or learn a complex keyboard shortcut. Well not until HN introduced me to dotfiles...
- FpUser 6y agoI am slow typist and really lazy at exploring all the possibilities of modern text editors/IDEs. Well except of intellisense which I consider absolutely invaluable. Still I do not feel it ever held me back when programming.
- panpanna 6y agoWhen people tell me stories about $EDITOR significantly improving their productivity, I wonder what kind of sweatshop coding they do where typing speed is a bottleneck... I used to have a pretty nice emacs setup but this year I have been coding python in gedit (notepad.exe of Linux) and I've done just fine.
- infradig 6y agoAgree. But I use geany as step up from gedit, just feels nicer to me.
- deleted 6y ago[deleted]
- isbvhodnvemrwvn 6y agoIt's probably the same people who spend a week configuring their desktop, only to have it covered up by other windows 99.9% of time. Some people simply like it.
- AndriyKunitsyn 6y agogedit doesn't even indent a new line, does it?
- RandoHolmes 6y agoediting speed != typing speed, that confusion might explain why you don't understand.
- hevelvarik 6y agoI’ve tried to force myself to pick up vim a few times but after getting a bit older I realized that I don’t want to become one with my machine as a fighter pilot might be with their plane. I like the distance the mouse move and click provides me. I do more thinking and reading than typing anyways
- ztjio 6y agoThe reason to pick up vim is ubiquity, not efficiency. And you REALLY don't need to know much. Maybe half of what's in the vimtutor tutorial is enough. Personally, I'd also suggest at least learning how to do search/search & replace with regex which is easy too (and bonus, has high affinity with sed.) That seems like the most any modern developer/*nix user should need to concern themselves with vim and wholly for the reason I mention above: it's the most likely text editor to be there on unix-like systems.
- closeparen 6y agoEditing text on servers by hand is not necessarily a practice you want to invest in. Even if you are not on the immutable infrastructure / containers / cloud bandwagon... Puppet is 15 years old now. CFEngine is 27.
- nso95 6y agoI've yet to encounter a Linux system without nano
- bitwize 6y agoIt's 2020, dude. No one sysadmins individual boxes anymore, it's all infrastructure-as-code. Which means if you have a problem with your server infrastructure, you shoot those cattle and provision new cattle with the CFT you wrote in Visual Studio Code.
- cgriswald 6y agoI picked up vim decades ago and I’m glad I did. I don’t feel “one with the machine” any more than I feel “one with the paper” when I use a nice pen. I feel like the machine is getting out of the way.
- danenania 6y agoSomething people often forget to consider when they talk about all the benefits of being an editor power user: how often they get distracted or go down rabbit holes when tweaking editor config or using advanced features. I've worked with people who seem to spend half their day on this stuff. So while it can certainly be impressive to watch someone who has mastered their editor, I always secretly kind of doubt that it's really much of a productivity win for this reason. I think there are huge wins for getting proficient with your editor (refactoring commands, debugger, etc. as John Carmack mentions), but sharply diminishing returns beyond that.
- jorams 6y ago> how often they get distracted or go down rabbit holes when tweaking editor config or using advanced features. I've worked with people who seem to spend half their day on this stuff. > So while it can certainly be impressive to watch someone who has mastered their editor I'd say anyone who spends a significant amount of time tweaking their editor while they should be working, outside of (infrequent) setup periods, has not mastered their editor (or is just slacking off). The entire point of setting this up is to make you more efficient.
- daemin 6y agoSo should you write a short script, or build a tool, or write a macro for your editor to do some repetitive thing or just do it manually for now (and therefore always in future). Same thing goes with having a pipeline of transforming data from one format to another. Do you use a simple ad-hoc method where you just use features in the tools (Text filtering + Import to Excel + Manually creating graphs), or do you write scripts to automate part or all of the process? When should you stop doing things manually and automate them instead?
- Reelin 6y ago> When should you stop doing things manually and automate them instead? When your best estimate is that spending the time to automate it will be a net benefit in the long run. (https://xkcd.com/1205/ https://xkcd.com/1205/) This is hardly unique to configuring an editor or IDE though. If someone is repeatedly and consistently spending "half their day" configuring their editor then either they don't really know how to use it, or they're slacking off, or they consistently make bad time estimates (https://xkcd.com/1319/ https://xkcd.com/1319/), or you don't actually understand what it is they're doing and why.
- GhostVII 6y agoI find being good at vim makes exploration much easier though. Being able to use Ag to populate a quick fix list is way faster for me than ctrl-f plus clicking through every option. And being able to go up and down the movement stack let's me retrace how I navigated to where I am right now, in a way that isn't possible in many editors. Tools like just searching through open buffers let me use search in large codebases without having to wait forever for results. So for me being good at an editor is more than just being able to make fast edits (although that's definitely a benefit too). And even if I only saved a few minutes a day, over several years that is a lot of time saved, without much investment. It's really easy to get started with vim, get comfortable with the basics in an hour or two, and then just get better by using it every day. Then you can slowly introduce features that save you time. Just setting up fzf and ag has probably saved me several minutes a day vs. using vscode search.
- brandonmenc 6y ago> Tools like just searching through open buffers let me use search in large codebases without having to wait forever for results. Is there an IDE that does not have this feature?
- plorkyeran 6y agoIf Xcode has an option to search only in open files I've never found it.
- TinkersW 6y agoIt sounds like you have no real experience with a good IDE, VS has way better search tools than "ctrl f"
- RandoHolmes 6y agoI'm a vim user so I mostly agree with you, but I'd like to point out that it's the entire OS that makes dealing with codebases easier. It's a point that a lot of IDE users miss. I have grep and awk at my fingertips, you don't.
- Barrin92 6y agoI think arguments about productivity miss the point and Carmack is actually right that typing speed isn't the bottleneck. I think the reason programmers love to tinker with their vim or emacs configs is because it's simply satisfying. Just like a blacksmith has their very own set of valued tools, there's something extremely rewarding about configuring your setup just the way you want it. You work your entire life with it, so you might just as well make it your own, I think that's what people get out of it, just a subjective sense of making things fit right. It's like my barber who has some cool vintage scissors he got from someone. Could he cut my hair with some high grade scissors he bought on the internet? Sure, but he likes his ones better. At the end of the day programming is more like a craft than a science and it shows when it comes to topics like this.
- srtjstjsj 6y agoPeople generally don't tinker with vim/emacs for editing. They tinker for the IDE features that Carmack says are valuable.
- Reelin 6y agoFor me at least it's more than "simply satisfying". It gets the UI out of the way. It's removing a number of mild distractions and nuisances that are otherwise there all the time. It's not about typing speed at all (for me). It's about having a clean and orderly working environment where the number of frustrations have been minimized.
- blub 6y agoOn the other hand it's typically quite easy to customize the UI of IDEs and hide menus and such to the point that it's possible to tune out whatever is left. Therefore I'm tempted to look at this problem not from a technical but rather from a social perspective: I consider this preoccupation with editors as a kind of fixation and way of exercising power in a straightforward way as a part of an increasingly complex and unfriendly environment. We can't customize the stupid Scrum processes guiding our lives, can't customize the management which often is rather clueless about what we're doing, can't avoid that most software projects are ultimately pointless even if they claim they're changing the world and empowering users. But we can certainly customize our editors. And then there's the social pressure from the typical hacker circles which would happily dictate what programming languages, tools and paradigms are good and which are bad. Of course this scaffolding all comes crashing down when one looks at the results and there's no discernible difference between the quality or success of projects where various editors or processes or languages are used. So the focus moves to personal benefits, personal preferences and programming as craft and so on. But it's all just a game programmers play, isn't it?
- jnsie 6y agoI agree, in general, with his point. But multiline editing was a real game changer for me. Things I once did manually that can be achieved with significantly less tedium.
- meheleventyone 6y agoHow do you use it? I’m terrible at using these sorts of features. I occasionally try again but often find it awkward and not much of a win over my normal method that doesn’t involve multiple cursors. I figure either I’m doing something wrong or just not coming up against the right cases.
- jnsie 6y agoDefinitely courses for horses, and all that. Whichever way works quickly and accurately for you is the best way... I've used multiple cursors for many purposes, initially as a dev it worked very well as a poor man's ETL - take a spreadsheet and perform a bunch of transformations (reverse first name and last name, trim these fields, add leading zeros to this field, concatenate these fields, delete this field, use some sublime plugins to generate incrementing IDs, etc.), wrap it in a SQL insert statement, etc. etc. I used it a ridiculous amount and at times it made me look far more efficient than I really am. I'm on the business side now but even today I found myself cleaning some data with multiple cursors, sorting alphabetically, and then using a 'count duplicates' command I found on GitHub to remove duplicates and prefix each line with the number of times it was duplicated. I could have done it in excel, but it took me literally 20 seconds to do it in Sublime.
- benreesman 6y agoCarmack is...a special case. The reason why being blindingly fast in tmux/emacs/vim/shell/etc. is a difference in kind rather than degree is because it lowers the activation energy on trying radically different things. If you can move massive amounts of code around quickly and accurately you can try a different design on a whim, and throw it all away without a second thought if it doesn’t work out. When manipulating code is time consuming there is a tendency to “make it work” with the design you’ve got. So much code looks like someone “made it work”.
- eddhead 6y agoI hope HN will shut up about Vim and Emacs now
- baby 6y agoThis distinction is important imo: https://twitter.com/danielhoffmann_/status/1302699553238528000?s=21 https://twitter.com/danielhoffmann_/status/13026995532385280... Carmack spends more time in algorithmic and less in churning code. I personally spend a lot of time reviewing code and looking for bugs, and I wouldn’t be able to live without a feature to click through function definition. When I use Xcode to review objective C I feel like have super powers due to their caller hierarchy feature (which lets you quickly go through any of the callers up the stack). When I review other code with other IDE I feel disabled. Unfortunately I spent very little time using Xcode in my career.
- dzhiurgis 6y agoIntelliJ / Webstorm, etc support quite lot of languages. I was reluctant to switch but oh boy how powerful it is. Absolute delight. Even spell checker is better than macOSs’ itself.
- baby 6y agoTo my knowledge they don't have a caller hierarchy thing, or at least not for the languages I use (go/rust). I'd be happy to be proven wrong :p (rust-analyzer is working towards one[1], but it never worked for me) [1] https://github.com/rust-analyzer/rust-analyzer/pull/2698 https://github.com/rust-analyzer/rust-analyzer/pull/2698
- TeaDude 6y agoTo be honest, learning power editors is mostly just an excuse to fiddle about at work without getting in trouble. The work's still visibly getting done and the bosses don't care if the UI keeps changing so it's a win for me. In my experience; they DO come in handy! Some programming languages or file formats get very arsey about formatting and line endings. Sometimes you need to compare files in hexadecimal. Sometimes you need to mass find/replace. Maybe not everyday but it's good to have these tools on demand with the know-how to operate them. One other BIG benefit of editors like vim and emacs or even notepad++ is that they start immediately, never lag and don't gobble all the ram. It has significantly improved my coding performance now that I can just open it on a whim without having to factor in if it'll slow my system to a crawl with the other current running programs.
- m0zg 6y agoYeah, if you amortize your coding output over a significant period of time, it'll be like a couple hundred lines a day at most. In fact, even as few as 200 lines would likely put your in the upper decile of programmers as measured in LOCs/day. I didn't believe this actually, but at Google there's a dashboard where you can look at your (and everyone else's) stats wrt lines added/deleted/changed, and it doesn't lie. The point being, you could easily type this many lines per day using Morse code. That said, I think Carmack is being overly dismissive here. Sometimes you end up in a situation where not knowing (or having) certain editor features results in a ton of tedious manual editing. I know a few tricks to avoid those situations in my work, and have a few bookmarks to help with the rest. I think this is the right balance to have - do know features which you find use for at least once a month, even if they are obscure, and know where to find the rest.
- dzhiurgis 6y agoI was able to macro Webstorm to go thru each method in JS module and remove first param in like minutes. Saved me hours of tedious work.
- GuB-42 6y agoBtw, Carmack mention the debugger as an essential tool. That's my main issue developing C/C++ on Linux. I prefer working on Linux for many reasons but if there is a negative, that's it. I found every debugger-editor integration to be terrible, at least compared to Visual Studio on Windows. gdb is very powerful, but its UI is primitive, and that includes tui. And most integration basically just assigns shortcuts to commands and show you the current line in the source file. Something as simple as stepping inside a function and watching local variables change can be a problem. Also, no "edit and continue". Someone will probably tell me that I am doing it wrong but if you do, please tell me what I can do to get a Visual Studio 6 level of experience. Of course, I can get around it, the answer fits in one word: "printf". But I don't want it to be like that, it doesn't have to be, most good IDEs do it right. Note that I use gdb, but for me, it is the big gun, when other weapons have failed. Even for crashes, I tend to go with valgrind first if I can.
- qppo 6y agoHave you tried CLion or VS Code?
- brundolf 6y agoI recommend giving VSCode a try. It's at the same level of polish as Visual Studio (it has fewer years of refinement, but also fewer years of feature-bloat) and because it's Electron, it works equally well on all three OSes. I haven't used it for C(++) but I've used its debugger integration with both Node and Rust and been pretty happy, at least with the basic debugging features that I end up using.
- joshvm 6y agoQt creator is really not bad for non Qt projects. It can be set up with cmake quite easily. It's also FOSS. Maybe I'm used to it from working with Qt a lot, but I prefer it to VS Code for debugging (GUI interface to define configs rather than fiddling with launch.json).
- chiffre 6y ago(1) Visual Studio Code - I work with it on Debian & Ubuntu versions from 16.04 to 20.04, also works well with WSL/Ubuntu on Windows; (2) + C/C++ extension for VSCode from Microsoft (installed separately); (3) + sudo apt-get install clang-format. You may want to adjust some settings e.g. set C_Cpp.default.cppStandard to C++17.
- pengaru 6y agoTyping isn't the bottleneck for coding sure. But time wasted on text editing, especially mechanical/repetitious nonsense, is valuable keyboard time stolen from any more productive computing chores of which I have a seemingly endless supply of.
- kmc059000 6y agoThis is my opinion as well. Many of the power user commands I've learned were to avoid annoying and fiddly things. It is less about saving time and more about saving effort for me. With occasional RSI, if I can use a couple hot keys to save 50-100 typed characters, it is very worth it to me, both for time and effort and to minimize the annoyance-factor of doing the same thing yet again.
- lgessler 6y agoI think the best case to be made for learning how to use a "power editor" is that editing text "manually" can sometimes be seriously disruptive to your flow. If I can do a regex replace-all with vim, I get to go back to thinking about my real problems much more quickly than I would if I had to hand-edit.
- flocial 6y agoI suspect the majority of programmers who say this have internalized the core api features they depend on (function calls, syntax, common algorithms, etc.) that make them super productive. Whereas average programmers and below need all the help they can get from their editor to tame the wild goose chase of looking up common functions, scouring StackOverflow, and even looking for random snippets on long abandoned blogs, etc. In other words his mastery greatly reduces his dependence on IDE/editor features so this makes perfect sense. Watching Carmack live coding, he types with conviction and gets things done: https://www.youtube.com/watch?v=ydyztGZnbNs https://www.youtube.com/watch?v=ydyztGZnbNs Sitting down with OpenBSD during a cabin retreat: https://www.phoronix.com/scan.php?page=news_item&px=Carmack-OpenBSD-Programming https://www.phoronix.com/scan.php?page=news_item&px=Carmack-...
- cma 6y ago>have internalized the core api features they depend on He says he still uses intellisense type features to aid discovery and memory. Just not the advanced stuff for editing.
- tambourine_man 6y agoI’m always amazed how genuinely humble Carmack sounds. One of the best programmers in his generation, yet he is always sharing what he’s learned, struggled with and is not particularly good at.
- pmoriarty 6y agoCarmack would be far more convincing if he could have said something like "I was once a power user of vim/emacs but I went back to programming in nano because I didn't need all those features." Somehow I never hear anybody say that. As a long time user of both vim and emacs, I find it intensely painful to watch some seasoned programmers tediously mouse their way through mountains of text. I often think to myself, "ok, you've just taken half an hour to do what I could have done in less than a minute." Honestly, I have better things to do with my time than edit text, and when I do edit text I want to get the maximum accomplished in the minimum amount of time so I can get on to the thousands of other things I want to do with my life. Using a crippled editor or not taking advantage of editor features that could save you massive amounts of time, errors, and headaches runs directly contrary to that intention. It's great that Carmack is satisfied with his own setup but in my case you'd have to pry my vim and emacs from my cold, dead fingers.
- mcv 6y agoWell, I was once a power user of vim, but nowadays I'm happy to use whatever editor my favourite IDE offers. It may not offer all the vi features, but it has what I need, and has more features specifically tuned for the language I'm using. (I'm a big fan of ctrl+/ to comment out selected lines.) I'm no John Carmack, though.
- OneGuy123 6y agoGive example of this "half an hour that could be done in less than a minute" thingy, because as a programmer in 12 years and NOT being a power user I agree with Carmack: typing and using basic text editor functionality of Visual Studio never was a bottleneck in programming. Slowdowns are ALWAYS programming related, never text editor related.
- em-bee 6y agoif you are doing refactoring then good editor assistance can save you a lot of effort
- 6y ago
- Skinney 6y agoI started using Emacs simply because there was no other editor or IDE which had good Clojure (my language of choice at the time) support. After a while, I started noticing how sluggish IDE’s and electron-based editors are. I’m now a vim user, but my most used features are «intellisense», go to definition, find references and ctrl-p. I guess these are the things Carmack refers to being of value? I also appriciate spending less time moving my right hand between my keyboard and trackpad for ergonomic reasons. In addition, I have a more snappy editor than most of my colleagues. What I don’t have is a good integrated debugger or refactoring support. The latter i never made much use of anyway and the former i’ve never minded being a seperate tool.
- wruza 6y agoIf by programming you make a computer do some work for you, it is strange to not program your programming tools, cause using them is work as well. For me, unautomated, repetitive editing and a lot of arrow key navigation is like walking in a swamp. I suspect it must be something with a thinking process, cause I can think without code, but cannot see much detail where the devil lives. If it is working code (or a sound data scheme, whatever) then there is something to discuss. Until that it is just an unpainted picture that is worth nothing. Also, maybe the amount of "no, you cannot do that this way here" plays a role in that. Or a fluidity of requirements. If you learned your area and requirements well, or you are the creator of these, then you know where the limits are in advance and just do the routine, no matter how hard it seems from the outside. But when you work with something new, on something unclear, the speed of a big change and the depth of concentration on it are crucial. Unimplemented idea is a tree of all possible, very similar code structures, of which most will fail, and if it is not write-only/write-once, you either have proper tools to transform it or slow down x10 or more. If you're a long time developer, then you know that feel "oh there it fails, but now it is so much keystroke to refactor this, so I will hack it here instead or just leave as is and pretend it's not a big deal". You know, and be honest, you did it many times. That said, I'm not fiddling much with my configs, it's usually just vim and a lot of snippets like try<tab> -> try { } catch (error) { }, <F3> on an identifier for log.debug("varname:", varname) on the next line, gr for grepping it with default excludes, v%<action> to comment/copy/move a block, ma mA markers to not spoil my stm with file:lines and so on and so on + basic movement and regex. Nothing fancy or christmas like in these vscode plugins these days.
- karmakaze 6y agoI learned a similar lesson about typing speed. I learned, then developed and practiced a custom keyboard layout to make my typing faster and with less strain. In the process I realized that the amount of typing I do while developing software wasn't even enough to relearn to type and I had to practice separately just for the volume. For the strain part, also learned that the way the keys are hit/pressed is for more a factor than actual key positions.
- InfiniteRand 6y agoThere’s an age factor here, or maybe a certain phase in programmers’ growth (which sometimes they can cycle back into). I am not that old, but I am old enough to remember a time when I was really into those power features. Over time you get burned by having to change platforms during career evolution, you get other things taking up your spare bandwidth, and you get slower. Now learning the power user features just doesn’t have the same appeal
- plorkyeran 6y agoHaving to move on and relearn editors isn't a given. I learned how to use vim 20 years ago, and have used vim or vim modes in IDEs ever since.
- vonwoodson 6y ago“I laugh out loud when my kids get giddy about little features of their car like turn signals and breaks.” -somebody who thinks that it’s not worth the effort to learn how to use the tools they use every day
- nouveaux 6y agoThis is such an odd perspective. Everyone here would say that the copy and paste shortcut keys are worth learning. Also alt-tab to cycle through windows. So why is it so hard to believe that other shortcut keys are useful? I have deep respect for Carmack. If he would rather spin his cycles to solve difficult problems, I respect that. To say that learning time saving shortcuts doesn't save time is shortsighted. If a woodworker chooses to work only with chisels, it doesn't make him less of an artist. However, to say using power tools doesn't make you more efficient is a tad disingenuous.
- em500 6y agoPowerlaw and diminishing returns. It's worth learning the 20% most used shortcuts to save you 80% time. It may not be worth learning another 70% to save 10% more. The actual thresholds and sets of shortcuts are different for everyone. That's why discussions like this never end.
- nouveaux 6y agoI disagree that its as subjective as you put it. No one would say that a manual hand drill is comparable to an automatic drill in speed. Going from normal text editor to vi is like going from assembly to Python. Or using `find -exec` to delete files using a pattern vs deleting files one by one. You are that much more productive when editing text in vi.
- phist_mcgee 6y agoI have used both an IDE and vim for years, and in my personal experience, editing text speed is overstated in vim purely due to the kind of text you are writing, namely a program. Just because I can replace all text inside a tag 90% faster than an IDE does not mean my next thought will be ready to go when that task is complete. I just don't see where the savings come from in terms of actual finger presses to outcomes per day.
- blub 6y agoI have the feeling that some of us are trying to claim some of the mystique of art and the tradition of the crafts for themselves by drawing a comparison that's not based on anything objective. We're staring at a monitor for 8+ hours a day folks and there's no art or craft in staring at things, thinking or drawing diagrams. Yes, there's a whole invisible universe unfolding in the depths of the machine and the mental models can be incredibly complex and maybe one can even admit that there's a certain beauty to some designs or pieces of code. But programming remains very different form any kind of art known by man or the crafts which typically result in the creation of a physical object. That being said, Carmack's making fellow developers aware that they're investing a lot of time only to get diminishing returns. That's a difficult problem, because we're incredibly obstinate about our sacred cows.
- bitwize 6y agoI've used Emacs since forever ago. I don't bling it out with Spacemacs, Doom, or any of the other things people install these days. I sound/feel like a boomer railing against kids with their Minecrafting and Roblocks and social medias. But the point is, my Emacs workflow is reflective of the fact that I don't use Emacs because it gives me some huge needed leverage over the act of writing code. That is relatively straightforward, and the plain Emacs bindings, once learned, are more than suitable to the task. Rather, I use Emacs because of a combination of pain points that it simply handles better than other editors, that add up to a significant advantage: * Emacs does electric indent "right". Other editors will attempt to indent automatically, but the tab key always means "insert tab", not "indent this line to its computed indent level". This alone makes it more pleasant to use than most "modern" code editors. * By default, Emacs will help you match paired delimiters (parens, brackets, quotes, etc.) but will not insert closing delimiters. This saves me that awkward experience of typing out a code block, parameter list, or string constant, only to find that I now have mismatched delimiters because I didn't realize I was supposed to cursor over the closing delimiter my editor oh-so-helpfully provided rather than type it myself. Except some editors just cursor over the closing delimiter if it senses that you're typing the delimiter at point. Some don't, though, and it's hard to remember which is which! * I work a lot in Lisp, and Emacs is better suited to handling Lisp code than most other editors. * Emacs is an immensely useful programming environment. There are applications like Magit and Org-mode built on top of Emacs that are just stupid useful workflow grease. On top of that, if there are pain points in my workflow, coding something up in Emacs Lisp to handle them is incredibly easy and straightforward, and I can evaluate and test my code right in my running Emacs session. Contrary to popular belief, Emacs integrates well with Unix tooling; Unix tools can be easily plumbed together with Emacs buffers, enabling you to use Emacs as a kind of "super-shell" to capture, move, examine, and massage data.
- neilv 6y agoHaving to use Xcode on MacOS recently reminded me how very much more productive my custom setup of Linux, Emacs, and Xmonad is. Just one of reasons is the ease of code navigation, such as bringing some parts of code into view while keeping other parts visible, or not visible. I have it rigged up so well in Emacs that it doesn't distract me from my thinking of the actual problem. A somewhat relevant story: One time, I was sitting on a park bench in my neighborhood, with a battered old laptop, doing some heavy semi-mechanical high-volume editing that didn't require much thinking. I was throwing a lot of rapid Emacs window management, isearch, ad hoc keyboard macros, etc. at it, and the task didn't require much second-guessing, which I suppose resulted in a lot of almost Hollywood-like "programming/hacking" rapidly changing windows of computer-y text on my screen, extend highlights flashing, syntax coloring updating, etc. At some point, some of the people who were arriving for a pickup soccer game in the park gathered round, and were just watching, and when I got to a stopping point, were kinda cheering and congratulating me (I think I didn't speak any of their languages), and one gave me a high-five. That brief moment of being nerdy-cool totally wouldn't have happened in notepad.exe, and, also, my task wouldn't have been tractable in that. (If I was using a lesser editor, I would've died of dehydration, as it took 10x to 1,000x as long, or blown out my hands from stupid mouse&keyboard RSI.) (BTW, finding certain tools much more productive isn't due to an unwillingness to try new tools. I try new tools recreationally, and am also doing a complicated startup in which I have to do All The Things. But there are some tools I end up keeping going back to, after trying other things, because they really do seem to pay off in productivity.) That said, apparently, the way Carmack personally uses editors, and what he gets from them, any old editor will work about as well as any other. And I'm not a snob about what works for me: I'd still hire Carmack, even if I saw him hunt&peck typing one-handed into notepad.exe in the interview. :) I'd guess there are other classes of tools in which he finds big wins in the details. Also, I know Carmack experiments with other tools, since he was even working with Racket/Scheme on Oculus for a while.
- notjustanymike 6y ago> I'd still hire Carmack... Ya think?
- knowyourleadcom 6y agoThe tons of time multi line editing saved me so I don’t have to look like a moron adding a chat to each line doing a lord of dance finger tap on the keyboard. The basics will certainly double your speed and I say this as I train a junior person. Quick tab switching, all the copy and paste stuff, etc. The rest in my opinion of over engineering half the time and preparing for moments that might not even happen. Certainly evaluate any movement or motion you do all day and look into optimizing. I mostly learned vim And vim keys for sublime because I wanted to be more enjoyable to be watched when I code and not have so many staggering mouse moments. I’ll probably forget everything in 3 years and go back to the the basics and a mouse.