30 ms·
Ask HN: What are your favorite developer-efficiency tips?
I recently started integrating tmux and vim into my workflows. Obviously, it was a huge efficiency booster. What are some other tools (custom built or off-the-shelf), hotkeys, workflows that were game-changing for you as a dev? I'm interested in hearing about anything and everything (stuff from ctrl+l to clear the terminal to little-known git commands to larger-scale strategies like CI/CD)
- Plugawy 6y agoC-r for interactive history search
- llarsson 6y agoNot just that. Add this to you inputrc: "\e[A": history-search-backward "\e[B": history-search-forward Now up and down arrows will search your history with whatever you already have typed at the prompt. Re-running a command often? Probably just have to type its first letter and hit up arrow once or twice.
- kanyethegreat 6y agoI like fzf for command history search. Ctrl-r, then fuzzy search the command, arrow up and down. Nirvana
- mekster 6y agofzf is game changing. Having have to guess exactly with Ctrl-R is a thing of the past.
- josinalvo 6y agoThis is AMAZING. Thanks so much! (fyi, for others: you need not use ctrl-r, just type and press up and down)
- kuon 6y agofzf, ripgrep, fd, tree, fish shell with z plugin.
- astuyvenberg 6y agoLearning basic *nix commands like sed, awk, and grep has helped me so much. I still frequently google/manpage them, but I often find myself thinking "I can do this with X in just a few seconds!"
- chadlavi 6y agobeing medium-grade conversant in regular expressions is right up there, too. You might not need to do lookaheads, but if you can write a regex search in vscode that finds and replaces something across a hundred files correctly, you've just saved yourself a ton of tedious manual labor.
- imjustsaying 6y agopassword manager
- dmortin 6y agoWhich one do people here recommend?
- iliaznk 6y agoBeen using Bitwarden Premium (which is really cheap anyway) for a couple of years, can't say anything bad about it.
- JshWright 6y ago+1 for Bitwarden, it's been my recommendation for a while now.
- chadlavi 6y ago1Password
- XCSme 6y agoI have been using LastPass (free) for several years, any reason I should consider switching to 1Password?
- mythrwy 6y agoThis works really well for me. I'll never have third parties manage passwords. https://www.passwordstore.org/ https://www.passwordstore.org/
- CameronNemo 6y agoI use keepassxc. Has nice native desktop and Android apps. Also a Firefox browser extension available, though I have not tried it.
- 6y ago
- edmundsauto 6y agoTextExpander. You can take your most common code snippets, table names, etc., and have shortcuts that expand to the full length. I used shortcut expansion around 10-20 times every day, which saves me about a couple hours per month (based on their internal analytics report).
- stephenwithav 6y ago+1. yasnippets is the best for emacs.
- letientai299 6y agoRTFM (as in Read The Fine Manual). To me, the key for being productivity is understand throughly the "tools" we use: IDE, languages, libraries, framework cli, os, shell,... Read the implementation, the docs, the issue tracker, even the git history if you have time. When I started to learn vim, I tried many popular distribution without understand each of the plugins they included. And I almost gave up learning vim. It's until I start to read the vim manual, learn the key strokes one by one and then building my own distribution, that's when I really know how to use vim. Even so, I still learn many great things from books like Practical Vim by Drew Neil (on Tmux, there's Tmux 2: Productive Mouse-Free Development) I think you might already know that, but still shooting here for some quick tips. I don't have any shortcut, just that motto.
- DannyB2 6y ago> RTFM (as in Read The Fine Manual). Some developers use alternate F-words for RTFM. F-words like: Fabulous or Fantastic or Friendly
- amelius 6y agoThose developers should read the manual: https://en.wikipedia.org/wiki/RTFM https://en.wikipedia.org/wiki/RTFM
- kanyethegreat 6y agoLove this! I found that the more experienced I became as a dev, the more I gravitated toward the less-removed sources of truth (eg. man pages instead of stack overflow, source code instead of blog articles, etc). Haven't started reading issue trackers, but huge fan of traversing a git history (assuming it's clean and atomic).
- RMPR 6y ago> I still learn many great things from books like Practical Vim by Drew Neil You should also check out "Modern Vim: Craft Your Development Environment with Vim 8 and Neovim" from the same author.
- jasonpeacock 6y agoOnly work on one task at a time. Do small tasks immediately - reply to that email, merge from master, do that CR, etc. Delaying small tasks tends to abandon them. Keep your workspace clean (physical & virtual). Update docs as you use them. Say "No" often.
- ricklamers 6y agoLearning to write (simple) regular expressions will allow you to find and replace in text files fluently (capture groups are especially useful). It's a lot simpler than it looks initially.
- mrdoops 6y agoAsking lots of questions and thinking through the trade offs of more than one possible implementation before coding. Writing your implementation plan on paper especially helps find those unknown unknowns before you code. If you have trouble stating the problem and your solution in words, that indicates an unknown to investigate. I.e. do a little writing to help avoid coding the wrong thing.
- d0m 6y agoContrarian opinion, but often doing things manually rather than automated will save you time. Writing/debugging a script is fun, but more often than not it would have been faster to do things the dumb way. If a task is risky or repetitive daily, then sure, but often developers confuse "writing a script because too lazy to manually do the work" vs "get the task done as fast as possible".
- d0m 6y agoAnother contrarian opinion, but as much as configuring and tweaking conf files are fun, it's still faster in the long run to be highly efficient on a new system as fast as possible. It's also convenient to use standard tools to be effective on someone's else computer. For instance, it's much better if you can be productive by changing 2-3 keys in macOS settings instead of being forced to use a fancy keyboard layout and customize shortcuts for everything.
- scubbo 6y agoRespectfully, I've never understood this viewpoint. If the configuration options are importable from some external repository (as the vast majority of dotfiles are), "as fast as possible" simply becomes "how quickly can I install git (or my VCS of choice) and pull down my configuration options?" For keyboards and other physical hardware, sure, you can't remap on the fly. But I'd wager the the vast majority of productivity-customizations that people implement are software-level.
- detaro 6y agoAs always, it depends on what you do. On your machines, sure. On customer machines, no, quickly installing a VCS and pulling some repository is often not an option.
- kqr 6y agoI truly pity the developer that has to create software (a) on customer machines and (b) without VCS and pulling repositories.
- nikivi 6y agoI usually comment with the same thing on these tip threads. And that is learn to rebind your keyboard. Make each key programmable modifier. Open apps, run scripts/macros instantly. My Karabiner config: https://github.com/nikitavoloboev/dotfiles/blob/master/karabiner/karabiner.edn https://github.com/nikitavoloboev/dotfiles/blob/master/karab... I go as far as binding keys to instantly type `console.log()` or `fmt.Println()` or the other language equivalent with my dot modifier key. Plus typing things like `Thank you` with dot+spacebar press. https://github.com/nikitavoloboev/dotfiles/blob/master/karabiner/karabiner.edn#L694 https://github.com/nikitavoloboev/dotfiles/blob/master/karab... The other tip that paid off in time is starting a wiki. And building an interface to access contents of the wiki instantly. Wiki: https://github.com/nikitavoloboev/knowledge https://github.com/nikitavoloboev/knowledge Interface: https://github.com/nikitavoloboev/alfred-my-mind https://github.com/nikitavoloboev/alfred-my-mind
- naavis 6y agoOne thing I worry about with these extremely customized keyboard configs and such is that once you get used to them, you will have a hard time using any other computer when you suddenly need to. Maybe this isn't such a big problem with physical keyboards, but can be with e.g. text editor configs, which you can't take along if you need to SSH into many servers during a workday and work with whatever is installed there.
- nikivi 6y agoI have a bind to turn off all my binds if anyone else wants to use my computer. And I can still use other people's computers although with some pain.
- chadlavi 6y agoas a caps-to-ctrl remapper, I can't imagine how crippling it would be to have serious remaps or Dvorak or something and try to use someone else's keyboard. Doesn't seem worth it.
- 6y ago
- d0m 6y agoRather than using cmd-tab, using pre-defined shortcuts to jump to the right [workspace,window,tab]; make sure to disable any animations.
- FanaHOVA 6y agoInvest in your bash shortcuts! I have shortcuts for almost everything. To give you an example, I work in Rails + RSpec, each class has its own rspec shortcut: `rspecs alexa_api` translates to `rspec spec/services/alexa_api_service_spec.rb` `rspecm startup` translates to `rspec spec/models/startup_spec.rb` I also have a bunch of other shortcuts for repeating tasks like expiring Redis, dumping a test database for local testing, etc.
- bluquark 6y agoSave all bash history into a separate file. Even with a high limit, the default bash history functionality has bugs that will destroy your history now and then. With the following .bashrc settings I have commandline history going back a decade: export HISTTIMEFORMAT='%F-%T' PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo \ bash$SHELLNO $PWD "$(history 1)" >> ~/.bash_eternal_history'
- pxtail 6y agoAs addition to this advice one can use history autocomplete tool like for example this one: https://github.com/dvorka/hstr https://github.com/dvorka/hstr - very useful!
- michaelbuckbee 6y agoI use a 4k TV as a monitor - I can easily see full size my code editor, terminal output, a page of documentation and the web app/site I'm working on all at once. It cuts down tremendously on the back and forth switching and reloading of things that don't feel like they take up much time but do materially eat into things.
- growlist 6y agoWould you mind sharing the model? I tried using my Hisense but it wouldn't work. And I've read that TVs won't always work properly as monitors, but then obviously there's a much wider and cheaper choice of TV panels than dedicated monitors.
- spire2985 6y ago2x of these: Samsung UN40KU6290FXZA You are aiming for something that supports both 4K (3840x2160) [or greater I suppose] and a 60Hz refresh rate in that mode. On cheaper models this can be found on a HDMI2.0 input. More expensive ones might have DisplayPort as an option. Shop around during TV season and you can find a quality model for $200/ea.
- growlist 6y agoThanks! Next question is whether I need a new graphics card.
- redblacktree15 6y agoOr better, use 3 4K screens :-) My record of the number of source files being opened concurrently was 10 when I was trying to understand a particularly nasty spaghetti code base.
- mekster 6y agoIsn't it annoying to keep moving your neck around than sticking to the main app window one at a time?
- JoshuaDavid 6y agoLearning how to effectively use jq, which is kind of like awk + sed for json.
- simonw 6y agoDon't push a commit with a new feature without tests and documentation. Even for your personal projects. I started doing this a couple of years ago and it's hard to overstate the positive impact this has had on my macro productivity. I can come back to a project I haven't touched in six months and instantly start productively making improvements. Tests and documentation really are for future you.
- quicklime 6y ago+1, good tests are by far the biggest long-term productivity win, in my experience worth much more than any other tooling or process improvement. Unfortunately I've gone in the opposite direction as you. I recently moved from a company that had a good automated test culture, to one that has a culture of manually testing things, often in production. Everyone, even the senior engineers who've been around for a long time, regularly lands changes that cause prod incidents. There's actually quite a good canary/rollback system in place to deal with this, so a lot of people think everything's fine. But they don't quite realize how much more efficient things are if you can just make a change and run a test suite, and quickly have confidence that you didn't break things.
- simonw 6y agoWorking for Eventbrite really helped we with this. I was there for over five years and got to see the transition from ad-hoc testing and an often broken master to every commit passing the test suite for most teams. It got to the point where I could drop in on a project by a team in another country that I'd never encountered before, read their README, checkout their code, run the tests, make a change and submit a pull request. The big thing for me in the past couple of years has been applying the same discipline to my own personal projects and finding that even there my overall productivity improved rather than being held back by the extra work invested in testing and documentation.
- kanyethegreat 6y agoAbsolutely! I've come to the same realization. Just haven't figured out my effective documentation rules. Difficult to experiment with what works when the feedback loop is on the same magnitude of how long it takes you to forget (eg. 6 months). Best proxy I can come up with is "how can I communicate this to someone who has no context? What would they want to know?"
- amelius 6y agoAutojump - for quickly jumping between directories https://github.com/wting/autojump https://github.com/wting/autojump
- DannyB2 6y agoAutomate repetitive tasks that can be automated. A task may take ten minutes. Automating it may take hours, and thus seems too expensive. If this task is going to be done many times, then the automation WILL pay off. Running the automated task might take less time than the manual steps. And you can be doing something else. The more of these kinds of tasks that you can automate, the bigger of a lever it becomes. One of the oldest examples would be 'make'.
- arno_v 6y agoRelevant xkcd: https://xkcd.com/1205/ https://xkcd.com/1205/
- XCSme 6y agoI actually expected it to be this one: https://xkcd.com/974/ https://xkcd.com/974/
- MauranKilom 6y agoCan't forget about https://xkcd.com/1319/.. https://xkcd.com/1319/...
- XCSme 6y agoAnother advantage is that you are less likely to make errors while using the automated way.
- catacombs 6y agoEmacs
- dmortin 6y agoIt's a useful tool even if you use something else for coding. Org mode is very good. Magit too.
- dceddia 6y agoA couple others have mentioned shell tricks. One of my favorites is using Alt-. (in Bash and Zsh) to insert the last argument of the previous command. Press it multiple times and it will cycle through the last argument of all previous commands. It's great for when you want to, say, `ls thing` and then `vim thing`. Yesterday I went looking for a similar key that would insert a copy of the last argument on the current line, like for when you want to copy or rename a file to a similar name in the same directory, as in `cp some/long/path/to/foo.txt some/long/path/to/foo2.txt`. I couldn't find a command for this, so I made my own Zsh "widget" and bound it to Alt-/ so now I can type `cp some/long/path/to/foo.txt` and hit Alt-/ to prefill the second arg. I put the code for it up here: https://gist.github.com/dceddia/0a45a88dd61cbdf1be023d0a8f157150 https://gist.github.com/dceddia/0a45a88dd61cbdf1be023d0a8f15...
- cs02rm0 6y agoI think !$ will do similar, at least in bash. (I'm on a phone and normally rely on muscle memory so it might be the wrong symbols).
- arno_v 6y agoEfficiently using multi-select to edit multiple lines simultaneously (e.g. cmd-d in Atom)
- albertkoz 6y agoMildly off-topic but I find that exercising in the morning or during lunch break gives me the biggest efficiency boost ever.
- XCSme 6y agoI play the Eleven Table Tennis VR game for ~1 hour at 9PM, become sweaty, take a shower and then I feel like I can very productively work until 5AM. Quarantine weird schedule, but it works :)
- bhaprayan 6y agoThere's many tools I've picked up over the years (sometimes on as needed basis, sometimes just for fun). The latter has been way more rewarding though in retrospect :) Instead of enumerating all of them, I think this course page does a great job of collating them by topic: https://missing.csail.mit.edu/ https://missing.csail.mit.edu/
- kanyethegreat 6y agoThis is awesome. I remember stumbling upon it at some point, but totally forgot about it! Gonna definitely check it out.
- aeyes 6y agoSpeed up key repeat rate on MacOS: https://support.apple.com/guide/mac-help/set-how-quickly-a-key-repeats-mchl0311bdb4/mac https://support.apple.com/guide/mac-help/set-how-quickly-a-k...
- anjanb 6y agoThat's the first thing I do when I get a new computer. the command on windows is "control keyboard" and then increase the key repeat rate.
- cs02rm0 6y agoGet a larger, higher resolution monitor. And when you can't do that get another monitor. My main one's 5k2k and I could still use more space.
- growlist 6y agoLearn to touch-type properly. I'm not a shit hot typist or anything, but it does make hours on a keyboard more pleasant. And (hate me) I do judge other devs on it. If someone can't be bothered to invest a few tens of hours on such a key productivity enhancement then what does that say?
- 5cott0 6y agoSame. Learn to type ~100 words/minute, I was surprised by how much more productive it has made me. Using a touch type trainer for a minute or two can also be a little mental break from writing software for hours.
- xupybd 6y agoI can touch type but can't get much faster than 60-70 WPM. I've been practicing for years. Any tips for speed?
- shrimp_emoji 6y agoBeen on a compy since I was a toddler. 100 wpm when no-look-pecking, 60 wpm when no-look touch typing. Feels weird man. xD Also, I have a friend who used to be a court typist. Does zero coding. Borders on comically-computer-illiterate. Types like 170 wpm. So jealous. Such a gift, so wasted.
- angrais 6y agoWhy do you think writing so many words per minute (170) is a gift? We have autocomplete for writing code that is likely more of a speed improvement than cramming out "words". I would think it gets to a point where wpm doesn't matter since you've likely to stop and think about the logic etc. I can see how it would help for emails and more generally.
- war1025 6y agoThere is a difference I think between typing speed when you are transcribing vs writing your own text. I find that I get pretty slow speeds when doing typing tests, but most of the time it's because I need to stop every word to figure out what the heck it is wanting me to type. When typing out my own stuff, I don't have that break because I already know what I want to say.
- deleted 6y ago[deleted]
- dmortin 6y agoIf you have to look something up or solve something and it takes more than 2 minutes then write the solution down in your notes. Lots of times you'll need that again and you won't have to search for it again.
- XCSme 6y agoI am a bit conflicted about the note-taking part. If you keep writing notes, at some point you will have to search through all of them to find what you need. So you not only spend the time to write the note, you still have search for the solution and there's the risk of the solution becoming outdated (eg. maybe the problem now has a better solution due to new versions of software)
- Uhhrrr 6y agoThat's where org-mode (or some similar outlining or mind-mapping) comes in. It reduces your search from N to logN. In general I find that logN is faster than solving the problem from first principles again (N!).
- odomojuli 6y agoHave a sharpened pencil and stack of paper handy always. I can't say how many times it's saved me a lot of trouble programming some behavior because I was able to draw a picture of what I wanted it to do.
- unnouinceput 6y agoI am opposite of that. I can't stand paper and pen/pencils, so whenever I need to visualize something it's Paint time. And if I need to note something down it's Notepad time (well, Notepad++ lately).
- deleted 6y ago[deleted]
- meritt 6y agoAvoid being an early adopter of new technology despite everyone on HN raving about it. Instead focus on solving actual business needs that grow revenue or profit margins.
- no_wizard 6y agoThis might be a little underrated by the average developer just how important this is. That isn't to say, write code fast, even if its garbage. Good clean code is still a virtue. I feel like sometimes people conflate the two. So to add on, don't do that!
- mekster 6y agoActually jumping to TypeScript at v1.x made me fluent with it and I now do projects with it. With that said, I don't usually invest time on new stuff unless it looks absolutely convincing.
- zaptheimpaler 6y agoHonestly these posts seem like the equivalent of "lifehacks" for devs to me :D The only protip I have is to think through a task on paper before you start writing code. Scope it if unclear, sequence it into small chunks, do more technical design if its a complex change etc. See if you can reuse existing code/libraries to do what you need.
- chadlavi 6y agoKEEP NOTES. Write everything down. Write down what you were thinking about, how you felt about decisions, things you tried for bug fixes. you never know when this stuff will be useful to you again. I keep really basic markdown notes in a git repo, roughly one file per day with an ISO date name, but some things I give a separate file name (still with the iso date, but with some descriptive words) for things that might be good to re-access or are part of a series of similar notes (like a TIL file or a recurring meeting with the same person).
- simonw 6y ago+1 for notes. I make really detailed notes in issue threads when I'm working on things. I recently started keeping a TILs GitHub repo and it's already proved useful. https://github.com/simonw/til https://github.com/simonw/til
- southphillyman 6y agoThis. I'm having some difficulty remembering details of systems I worked on and bugs/approaches I took at places I no longer work at. Going forward I'm going to document details about everything I do, a personal post mortem of sorts.
- ra7 6y agoI want to take notes everyday, but I keep getting bogged down by how to organize those notes so I can "look back" efficiently. Essentially, I want to avoid taking so much notes that I'm reluctant to search for something because I haven't organized it well. Do you think the ISO date name method is working well for you?
- loco5niner 6y agoI seem to be more efficient when I stay off HN :-)
- XCSme 6y agoThe REST Client VSCode extension[0] let's you send HTTP request from any file open in the editor. I use it to call the Cloudflare API to purge the cache of my site after I make changes. It's also really useful to test new APIs or quickly create a bunch of file/requests for the current project. I use PHP on my landing page[1] so I can make changes and publish them immediately without any build step. This way, whenever I see something wrong with my site or have a new idea, I just open the editor, change the file, save and push all changed files through FTP to the server using the VSCode SFTP extension[2]. This means that I can instantly publish changes from VSCode without running any command, just by using shortcuts. This way I can make the changes immediately instead of having to create reminder tickets. Automate the tasks you do often. For example, I had to download invoices from Envato every quarter, which was annoying because they don't have a button to export the PDFs of all invoices. I created a puppeteer script (headless Chrome) to download the CSV with the list of invoices, go to the URL of each of those invoices, print the file as PDF and save it into the correct folder. The automation part can also be just creating a faster build process, unit tests or even subscribing to notifications/alerts for a social site for the content you are interested instead of checking everytime if there's anything you might like. [0]https://marketplace.visualstudio.com/items?itemName=humao.rest-client https://marketplace.visualstudio.com/items?itemName=humao.re... [1]https://usertrack.net/ https://usertrack.net/ [2]https://marketplace.visualstudio.com/items?itemName=liximomo.sftp https://marketplace.visualstudio.com/items?itemName=liximomo...
- CraftThatBlock 6y agoSame for IntelliJ-based editor! It's incredibly useful to store the .http files inside git repos, an have it tracked alongside with code. It's similar to Postman or Insomnia, but tracked (and synced), and built-in
- kanyethegreat 6y agoThis is awesome. I usually just have a scratch file that uses an http library (eg. requests for python) and log the response. Do you prefer this over something like postman?
- 6y ago
- nemoniac 6y ago1. Learn how to touch type so you never again look down. 2. Learn emacs. 3. Learn how to use emacs in a tight code and test loop. Now you are invincible.
- andoma 6y ago> 3. Learn how to use emacs in a tight code and test loop. Came here to say this. Having a build delay for an average incremental change (edit a single file / compilation unit) be less than 2 seconds is extremely important for my productivity. Whenever I happen to do mobile development (this goes for both Xcode and Android Studio), having to wait 5+ seconds for the app to launch makes me lose focus.
- krembo 6y agoBuy a big whiteboard and use it often.
- Skuddy 6y agoLearning keyboard shortcuts in my most used apps has proven very effective. I used to have a bunch of cheatsheets printed but now use CheatSheet for OSX - https://mediaatelier.com/CheatSheet/ https://mediaatelier.com/CheatSheet/ and CheatKeys when on windows - https://cheatkeys.com https://cheatkeys.com
- theturtletalks 6y agoIn the same vein, become a faster typer. I've been using this and I can definitely see the difference: https://www.keybr.com/ https://www.keybr.com/
- notJim 6y agoLearn your environment and learn it well (over time). Every single thing that seems like weird arcane magic invented by brilliant wizards is just code or words, and often not a lot of it. Go find that code and read it. Docs are good, but they are almost never complete enough, because truly exhaustive docs would simply be the code [1]. Similarly, with something like CSS or OAuth that have specs, blog/tutorial content often leaves out important details that will be relevant to you. If you get stuck, quit wasting your time with them, and go read the damn spec! If you're still stuck after that, go read the implementation. Wherever you work, there is probably a page with like hundreds of ugly graphs of it. Learn what the graphs mean. When you do this, a day will come where someone will say "Kanye, I've been banging my head all day on why users are sometimes seeing outdated results after updating their page". A little thing will happen in your head, and you'll say "That sounds like replication lag/a weird quirk of the CSS spec/a bug I noticed in the graphics code", and suddenly you'll discovered that you are the wizard. I'm not saying to do this instead of doing those other things, or instead of whatever you're supposed to be doing. I'm saying do it as part of your practice of making software. You're probably gonna do it for like 40 years, so might as well make the investment. [1]: https://en.wikipedia.org/wiki/Map%E2%80%93territory_relation https://en.wikipedia.org/wiki/Map%E2%80%93territory_relation (Second time referencing this on HN today)
- jjice 6y agoSomething that helps me is drawing/writing my own summary of what I just read or what a process is. For example: OAuth2 can be pretty confusing at first, but reading about the flow and drawing your own diagram helps me a lot to learn, as opposed to just reading. It also makes a nice reference for later, tailored to what I need most.
- deleted 6y ago[deleted]
- sunstone 6y agoDo the risky stuff first. Then rough out the whole thing, then refine it. Just like a sculptor.
- jokab 6y agoObs studio. I record myself while coding anything. I pretend to be a bigshot coding streaming sensation (even if its just for me). Its fun as well as very helpful in so many ways. 1. It helps me stay focus on the task at hand. One recording for each task 2. It lets me practice how to articulate stuffs. Its like blogging but ephemeral (because i wont upload this) 3. It helps me get motivated. Cant let my "thousands" of viewers down 4. It lets me review my blunders so i know how to watch out for them in the future 5. Its fun. I can let off some steam because i can curse all i want, my audience is 18+ and fine with some "sentence enhancers". I am Filipino but i record in English so i get that extra bonus practice.
- joshschreuder 6y agoI imagine by speaking out loud you also get a type of "rubber duck debugging" that makes it easier to work through problems too. Nice idea!
- balfirevic 6y agoI don't have anything to add but I feel like a simple upvote does not do this idea justice - that's so awesome, I have to try it!
- ZeroClickOk 6y agoI loved this idea. Can you share your Obs defaults/workflow for this? By example, I work 8hs per day, how much space all this audio/video recording will take? What video/resolution/etc? Thank you!
- jez 6y agoHonestly for me it was just the act of being able to see my picture and my screen moving inside OBS, not even the fact that it was recording. I tried streaming myself live coding on Twitch a couple times and it was a blast. I felt like I was thinking so much more clearly. I didn't save the recordings—just the act of it all was worthwhile.
- jokab 6y agothe idea is to make a video that you can watch yourself. 8 hours of video isn't very enticing to watch. i suggest organizing the recordings by feature or task. the only other thing I considered setting up in OBS is to make it work with Spotify to get a great bg music.
- aaronbrethorst 6y agoClose Hacker News. Close Reddit. Close Twitter. Close Facebook.
- no_wizard 6y agoWhile I suspect anyone reading this is going to detect at least a small hint of sarcasm, its true. Minimize distractions like this and unsurprisingly, productivity goes up. My biggest one, to add, is having set time for handling administrative tasks, like Email etc. If you can (and I realize all people have caveats), just set a block of time in the morning and in the afternoon to answer email, and otherwise ignore it unless its been flagged a certain way. This is what I do first 30 minutes of my day, I do email catch up before my stand up. After the stand up I take about 15 minutes to update the KanBan, and then thats it for my admin tasks at that point. I may check email again (well I almost always) about half an hour before I leave for the day. The only exception is specific flags I have set and those will always notify.
- aaronbrethorst 6y agoWhile I suspect anyone reading this is going to detect at least a small hint of sarcasm, its true. Nope, not sarcastic. The best thing I've done for my productivity in the midst of the COVID-19 pandemic has been to not read Twitter.
- sneeuwpopsneeuw 6y agoRemap the Caps lock button to escape.
- imwally 6y agoRemap the caps lock to control for emacs users :)
- taejavu 6y agoControl when held, escape when tapped. First thing I set up on a new machine.
- yoloClin 6y agoI just disable it: ``` #!/bin/sh # Disable capslock setxkbmap -option caps:none # Better repeat rates # Previously set in lxdm.conf (arg=/usr/bin/X -ardelay 175 -arinterval 20 xset r rate 150 75 ``` I've added another hack in there that I absolutely love for free (:
- kanyethegreat 6y agoYep! Love this one!
- 1f60c 6y agoAnd remap spacebar to Caps Lock. And make two finger scroll move through time instead of space. And--
- schrototo 6y agoGet enough sleep. [1] [1] https://arxiv.org/pdf/1805.02544.pdf https://arxiv.org/pdf/1805.02544.pdf
- kanyethegreat 6y agoLooks interesting. Bookmarked
- kovek 6y agoWhat first came to mind for me is running. It’s very difficult for me to sit still for long periods of time, and so I end up switching tasks often. If I do a good run, I can stay still and focused for longer. I believe longer contiguous periods of time developing are very helpful.
- daxfohl 6y agoI just recently noticed this too. I have a bit of ADHD and I've found it helps me follow meeting discussions and such. Can't quite explain it because being tired should make focusing harder (and true, I'm probably a slightly less effective coder than normal right after a run, just because of tiredness). But for whatever reason I've noticed it's much easier to follow other people's lines of thought and catch the important details after a good workout. Edit: upon further reflection, I think the big difference is it's a few-hour boost in self confidence. So it's much easier to follow conversations and ask probing questions, rather than being afraid to ask things for fear of looking foolish.
- mpd 6y agoBe absolutely relentless in searching and discovering new tools, and throwing old ones away when they aren't the best anymore. Note this can be painful to leave an old favorite behind.
- Uhhrrr 6y agoNever waste time logging in again: scp ~/.ssh/id_rsa.pub me@[IP address]:/home/me/.ssh/authorized_keys Make aliases for your most common commands. Someone in a similar thread posted a script for parsing your history to find them out. For me they were all git subcommands. Write a script the second time you have to do something. On a macro level: Don't work on doomed projects. Don't update tools in the middle of a project unless the current version is a roadblock.
- andrewtsaplin 6y agoBut instead of this: scp ~/.ssh/id_rsa.pub me@[IP address]:/home/me/.ssh/authorized_keys you can use this: ssh-copy-id me@[IP address]
- Uhhrrr 6y agoNice, thanks!
- Ahmedb 6y agoInstead of commenting your code once in a while make it default. I started always commenting and documenting my code (even the simplest parts for consistency) and it dramatically improved my productivity when I revisited if afterwards. 10x multiplier if you're working with a team.
- imwally 6y agoEmacs key bindings work system-wide on macOS. Having the same keys to navigate no matter what app you’re in is a huge productivity booster.
- kanyethegreat 6y agoThis is really interesting. What key bindings do you use consistently? I wish the vim worked the same way. I'd love to use vim nav and modes for any text in any app.
- ken 6y agoThis is one of the things I love about macOS -- when it works. I really wish they worked better. Yank works 90% the same, which is close enough to be useful but different enough to be annoying, daily. Repeat count is disabled by default. Transpose is broken in Xcode 10, and I heard Xcode 11 fixed it but one of my Macs can't run (the macOS required for) Xcode 11 so I'm hesitant to upgrade. And of course if you use Firefox, they've implemented the whole GUI from scratch, and didn't bother with half of those, despite bug reports having been filed literally decades ago. I get the feeling that Emacs keybindings on the Mac are like map/reduce in Python: it got snuck in version 1 by a fan, and the maintainers since then haven't really understood why it's there or what to do with it. I fully expect it to simply disappear one of these days.
- MauranKilom 6y ago- Your eyes are the only broadband connection into the brain, and they have millenia of pattern recognition training built into them. When solving problems like debugging, refactoring or data preparation, consider arranging information in a way that takes advantage of this. When it's in the right shape, irregularities or patterns will often just jump at you. - Relatedly, your eyes are also extremely well-adapted to detecting movement and optical flow. Do these two images/texts/logs/terminal outputs/etc. differ? Do they differ if you ignore the hue/time stamps/pwd? Alt-tab back and forth between them and you will notice. (Beware of fancy effects or menus covering it though - it has to be an instant switch from one to the other). - Become fluent in regular expressions (recommendation: https://regexcrossword.com/ https://regexcrossword.com/).
- analog31 6y agoOddly enough I can't use IDE's. They simply throw way too much information on the screen, and my brain gets overloaded. So I have to sheepishly confess that I do my programming in IDLE. There, I said it. But I think a take-home lesson is that the "right" visual environment is a function of your eyes and your brain, and might not necessarily be the most sophisticated environment.
- fish45 6y agojust wondering, why idle instead of vscode with minimal extensions, or sublime text maybe?
- analog31 6y agoExcellent question. Actually my cube mate uses vscode and is happy with it, and the latest incarnations of WinPython come with vscode built in. So maybe I owe it to myself. For now, my "IDE" is Idle on one side and Stackoverflow on the other. ;-)
- mekster 6y ago> They simply throw way too much information on the screen You can usually just hide them. I hide everything but the file explorer, the code itself and recently I turned on line numbers but no tool bar or task bar or that distracting mini map which I feel it serves no purpose than being cool for some people.
- ojciecczas 6y agoSpock testing framework. To let me do TDD.
- jmondi 6y agoWrite meaningful git commit messages, always. Even in stupid side projects that don't matter. Because then when you're at work, it will be second nature to write good messages, and your colleagues will absolutely appreciate it. I've been following the keywords here: https://github.com/joelparkerhenderson/git_commit_message https://github.com/joelparkerhenderson/git_commit_message
- city41 6y agoTo add to that, rebase and generally "clean" your commits before pushing them out. A repo that has no "oops, typo" type commits in it is just so much more pleasant to navigate.
- lloeki 6y agoIt goes into full effect when you came to witness a repo full of WIP/SAVEPOINT/fix typo commit that literally kills git blame/guy bisect.
- darekkay 6y agoThis. But I always emphasize the reasoning for doing so. I usually don't care about the git _log_, but I'm using git _blame_ very often. I want to know why exactly someone changed a piece of code, and "oh, typo" or "fix bug" don't help at all. At least include some ticket reference.
- JensRantil 6y agoNice! I totally agree with this! I've used https://www.conventionalcommits.org https://www.conventionalcommits.org (initially from Angular, I think) and it has _really_ made me a better programmer. Worth pointing out that it also simplified code review a lot to make PRs less of a frictionpoint.
- cpburns2009 6y agoComments: you'll thank yourself later.
- Groxx 6y agoSet up a "scratchpad" repo for small experiments / learning, and phrase your learning as tests. Not only does it get you practice writing code, you have evidence that what you think is actually true. And/or you can demonstrate it's not, when you learn otherwise. And if you push it somewhere, you can link people to it trivially (great for questions / teaching / bug reports). It's pretty much guaranteed to be faster to hop in / build / run than your day-to-day repository (often by a few orders of magnitude), and testing some things forces you to learn some new tricks (concurrency tests / bug demonstrations are particularly complex). And personally I also recommend setting up an auto-rerun-tests loop (I prefer `entr`), which gets you very nearly repl-level feedback in any language. You can interactively explore to learn basically anything in any language.
- kanyethegreat 6y agoLove this idea! I generally just have scratch files in whatever codebase I'm working on, but I like the idea of having a centralized place to keep these. Any chance yours is public? I'd love to see an example of how you organized the repo, what type of stuff your testing, any boilerplate setup/tooling you used to make it more effective (mocking library to stub out things like network calls or complex objects, test runners, etc)
- Groxx 6y agoNo, just one internal to work (which I share pretty heavily), though I should set a public one up. I've got a few bad ideas fleshed out enough to realize why they're bad, and a few multi-million-iteration things to test the fairness of go channels / cancellation strategies / etc just because it seemed like fun. But the repo has slowly grown to include things like demonstrating issues in books[1]. Boilerplate setup for me is typically: - a one-page Makefile for laziness. I try very hard to avoid automating what I don't fully understand, and large / complex makefiles are typically inscrutable for readers. usually I just have "build", "test", and "live tests", little else. - a small script to use `entr` to run tests in the last directory changed (the /_ arg) - ... that's about it. maybe a .editorconfig or .envrc? I avoid lang-specific runners because they're all different and tend to have complex relationships - if you can't run your test within a second or three, find a different way. break apart dependencies to benefit from build caches. leverage make. etc. If I wrote experiments that used networking libs, I might have common stubs, but none currently :) I'd be sorta tempted to write fakes tho (probably multi-process), and try to integrate them into tests, in part because that's often hard for no apparent good reason. Maybe I'd find out why, or maybe I'd end up with a demonstration that there isn't a good reason. [1]: https://www.oreilly.com/catalog/errataunconfirmed.csp?isbn=0636920046189 https://www.oreilly.com/catalog/errataunconfirmed.csp?isbn=0... I'm the sync.Cond.Broadcast one
- lukifer 6y agoI can't say enough good things about a multiple clipboard manager. Not only is it useful to copy/paste multiple items in sequence, but it's a game changer to be able to quickly retrieve a code snippet, or URL, or CLI command you used recently; and/or, to trivially stash one just in case you'll want it later. (Primary downside: using a computer without multiple clipboards feels broken. What do you mean it "forgot" the thing I copied five minutes ago?) My weapon of choice these days is LaunchBar [0]. Despite the clipboard history feature being bolted on to otherwise unrelated functionality, I love the low-friction keyboard shortcut: Cmd-\, arrow-down to the chosen item, release Cmd to automatically paste. [0] https://obdev.at/products/launchbar/index.html https://obdev.at/products/launchbar/index.html
- uryga 6y agoWindows 10's builtin clipboard history (Win+V) is one of the best things they've added tbh (it's opt-in, in case anyone's wondering...)
- mceachen 6y agoAlso try Ditto. It has features I missed with the new built-in win10 tool which made be come back to it. Open source. https://ditto-cp.sourceforge.io/ https://ditto-cp.sourceforge.io/
- kall 6y agoThe searchable clipboard history in alfred app set to three months has been a complete game changer for me. Pushing things that I may or may not need at some point into the clipboard has become subconcious. The type to search is a dream and can even be used without really looking. I have no need for any actice code snippet managment/notes since anything that matters stays in the three month buffer.
- lgunsch 6y agoDefinitely agree. I've used a clipboard manager for years now, and I can't imagine going back. I always miss it when I'm not on my machine.
- 6y ago
- smallstepforman 6y agoFor any API, truely understand the architecture and problems it tries to solve, and only then will you stop fighting the API and become productive with it. Assumption - the person who designed the API actually knew what they were doing.
- lmiller1990 6y agoThinking before I code. I developed RSI, typing hurts after a few hours. Now, before I code anything, I really think about what I want to type, so I only type the minimal amount needed.
- Quiark 6y agoHave you tried powerball?
- SahAssar 6y agoSubscribe to every slack support channel and mailing-list that your end user (or people dealing with them) report issues to. Getting not just the filtered bug reports but also the questions and not-really-a-bug reports will really help you hone into what your product is supposed to do, not just what you think it should do.
- deleted 6y ago[deleted]
- motiw 6y agoI developed my own gmail app script to accommodate my personal workflow, where all tasks and task-related information, including Gmail inbox, are organized and scheduled in the same hierarchy. Here is why I think it makes me extremely efficient 1. I can group and nest together Emails, to-do’s, files and links that are related to the same goal, my lists are now much shorter and manageable and I can focus on my goals instead switching between gmail, todo’s etc.. 2. Since my gmail Inbox is fully integrated with my to-do list, I don't need to manually and tediously maintain and synchronize them. 3. Scheduling a goal with sub-emails and tasks hide them and bring them back when I need them.This further reduces my clutter and makes sure I will not forget anything. 4. I can organize my plans and thoughts as I organize and drag inbox Emails, To-Do’s and Ideas into their related tasks. 5. Since every email has a natural place in my task hierarchy, I can quickly empty my Gmail Inbox and deal with email when dealing with their related tasks. What made it stick for me was processing my gmail inbox (which I must do), inside my todo list, which quickly created a habit. BTW I tried to market the solution and gave up, either most people think different or I am just a bad marketer.
- unexaminedlife 6y agoI have such a simple setup but it's not for everyone. It also fails miserably if I'm working in an environment where I can't do almost everything I need to do from the command-line. 1) VIM with almost no special .vimrc 2) gnu screen (10 screens initialized via .screenrc) - hotkeys Ctrl-Left (prev), Ctrl-Right (next) - I tweak my $PS1 prompt so it will display which $WINDOW I'm on. 3) Not a tool, but a tip. Maintain a TODO list. I just open a text file and put some simple separators between projects I'm working simultaneously. But I go out of my way to ensure it's got everything I'm going to "DO". If I think of something, even if I'm not sure if I'll actually want to do it, I don't rely on my memory for ANY of it. If I'm not going to do it immediately I put it on my TODO list.
- mekster 6y agovim has like the worst default setting than any other app in existence in my opinion and I cannot figure why anyone would want to stick to it. Unless you have 5+ years of muscle memory (learnt with pain), all the shortcuts are too confusing.
- RMPR 6y ago> vim has like the worst default setting than any other app in existence Laughing in urxvt > Unless you have 5+ years of muscle memory (learnt with pain), all the shortcuts are too confusing. Don't know which level of mastery of the default shortcuts you're talking about but speaking from my experience, going through vimtutor and oni[0] integrated tutorial everyday made me productive in less than one week, without modifying any .vimrc, granted I used neovim, but still... 0: https://github.com/onivim/oni https://github.com/onivim/oni
- kmstout 6y agoThe first step in programming is away from the computer.
- jpitz 6y agoI love continuous feedback. I set up automation in my development to run quick tools like code formatting, linting, and unit tests together. I'll use tmux to split my terminal into an editor window on the right, and on the left, I'll have a tool like watchman or entr watching for changes to my code, and running those tools e.g. find . -name "*py" | entr make continuous I also have some conventions about my tmux windows. Window 0 is where my music client lives in pane 0, and usually I'll run things like homebrew updates in other panes there. I have a tmux keybinding that sends the "Next song" key to window zero pane zero. No matter where else I am in that terminal session, that keybinding skips to the next song. I have another pair of tmux keys that activate/deactivate a particular openconnect vpn connection in a new pane, with a pause so i can see it complete, then it goes away. Part of my tmux status line is a single character - a C or a D, that indicates that vpn connection status as connected or disconnected.
- pkghost 6y agoI love entr! It's been part of literally every development environment I setup since I discovered it. Re tmux: I have a function in my fish config (used to be zsh) that runs when I changed directories; if there is a `.tmux` script in the new directory, the function looks for a tmux session by the name of the directory, attaching if it exists, and, if it does not, creating a new session by running `.tmux`, which creates a handful of windows with my file watchers, build runners, container managers, etc etc. So all I have to do to boot up a project environment is move into the src directory, and poof — all the scripts that build source, run containers, and restart things on various config file changes get booted up immediately.
- tanin 6y agoI just started at Stripe last year, and I found myself perform many mechanical tasks like: * Converting seconds-from-epoch to a human readable date * Select an id and pull info about it At first, I tried to perform these mechanical tasks with some crazy shortcuts. But remembering shortcuts for every little flow is heavy. Eventually, I've built a programmable tooltip on Mac OS X for these mechanical tasks. I'd love for you to try it! https://github.com/tanin47/tip https://github.com/tanin47/tip
- burnett2k 6y agoVery cool idea! I can immediately thing of like 5 things I could use this for.
- tanin 6y agoThank you! Please don't hesitate to open GitHub issues if you have suggestions to make your workflows more convenient. Just curious: what are the workflows you plan to use Tip for?
- dlhavema 6y agoSuper cool. Thanks for sharing
- tanin 6y agoThank you for your comment! Any feedback/suggestion is welcome!
- yrral 6y agoThis is really cool. I had a similar idea a couple of years ago to implement something similar to this using the three finger single tap command on the trackpad that currently brings up dictionary/siri knowledge/wikipedia etc. I see you have 4-finger tap implemented with an additional app which is really cool and probably better than the 3-finger native OS way since you can highlight/copy as well as build your own menu. Thank you for this!
- mythrwy 6y agoMake use of .bashrc (I'm sure other shells have similar). For projects I'll be working on for a while, rather than CD into a nested directory, activate a virtual envirnoment etc. I have simple bash shortcuts that perform all the steps. Also for SSHing and many other common task. On this note, (probably doesn't apply to many here) but if you aren't lighting fast with a terminal and are dragging files around etc. you are usually doing work in a sub-optimal way. Learning bash (or some shell, I don't consider I'm an expert) a little more all the time really pays off. Likewise VIM.
- mmorris 6y agoGet out of the habit of watching TV. Some downtime is important and healthy, but it is too easy to waste hours and stay up late staring at a television. Not a developer tip specifically, but not wasting time and sleeping well is the best way to improve your efficiency at everything.
- billziss 6y agoI only have only one real tip for you: learn to get in the zone. When I am in the zone I have an intense desire to create a beautiful masterpiece in my chosen art and revel in its elegance and beauty. When I am in the zone outside distractions are eliminated and my mind is fully focused on the task at hand. When I am truly in the zone matters such as health, family, children, work and (when I was younger) even hunger or the need to sleep disappear; all that remains is the task. My brain has maximum cycles to iterate again and again until I achieve greater understanding and/or arrive at a solution. I do not have very good general tips on how to get in the zone. I have some things that work for me, although not always. They include: - Real-world isolation: These days where everyone is at home, I go to a corner in my garden where my family knows not to bother me. - Virtual-world isolation: No emails. No browsing. No notifications of any kind. Phone on silent. Absolutely no Slack, Teams, etc! - Friction-free programming environment: If the build takes 20 minutes, then it will be hard to remain in the zone. If the Mac has stuck keys get them fixed or buy a laptop from a different brand. - Headphones with some favorite music: For programming I like trance, the more repetitive the better. I often use this youtube channel: https://www.youtube.com/user/MrLemilica2 https://www.youtube.com/user/MrLemilica2 - Review previous work on the subject: This acts as a brain warm up for me and usually puts me in the right mood. - Some times work better than others: When I was younger it was far easier to get in the zone at night. These days I do not have that luxury because of family. - Work on a problem that excites you: It is much easier to get in the zone when the subject matter interests you. It is harder (although still possible) when the subject is less interesting. - No context switching: Choose a task and stick to it for at least a few hours. - Get the non-enjoyable tasks out of the way: (This may not work for everyone.) I like to complete tasks that I do not enjoy (e.g. administrative or legal) first. I can then continue my work care-free instead of having this niggling thought in the back of my mind: "do not forget to respond to the lawyer".
- drmpeg 6y agoFor me, listening to music is just another distraction.
- lhorie 6y agoautojump[1] is really helpful especially if you deal with huge codebases, like monorepos [1] https://github.com/wting/autojump https://github.com/wting/autojump
- maerF0x0 6y agotry to be 1% better as frequently as possible. (James Clear says daily, but even monthly will pay off a lot over a career) For any self improvement where it's equally difficult, and it's only the changing cost, do your best to change immediately. For example it's basically identical to write, but the latter is much much more valuable code. Identical effort, more value. log.Printf("thang blew up: %v", err) // vs logrus.WithError(err).Error("thang blew up") I try my best to seek out those "equally" difficult but better things and eat the change cost asap
- afc 6y agoProbably an unpopular opinion but... Write your own text editor. I've been working on my own (https://github.com/alefore/edge https://github.com/alefore/edge) as a side project and using it exclusively for about six years. I don't expect it to be very usable by other people (it's very customized for my workflows, I suppose; e.g., it's mostly useful for writing C++ and Markdown files) but, because I know it inside out (and I've invested in making it easy to customize through its extension language), it's very easy for me to adjust it to behave exactly the way I want it, which allows me to lower the friction for any operations I care about (and it abides very exactly to my principles/expectations for how an editor should behave; e.g. never block the main thread/UI while executing some operation such as opening a file). Because I don't have to use but a small set of computers directly (mostly my laptop and my workstation), this works well enough. I don't know if overall it'll save me more time than it has taken me to implement it, but I do believe it allows me to move significantly faster than if I still used Vim or Emacs (or than most of my team mates), especially because it allows me to operate at a higher semantic level than otherwise, eliminating distractions from lower level details. ... and, I guess, it has been a lot of fun to implement it (and I've probably learned a bunch). I think it has played a role for me similar to that videogames have played for some of my friends (e.g., this weekend's challenge may be to generate visualizations for the logs I keep for every interaction I have with each file I've edited; implementing stuff like that feels similar to how in the past I felt about making progress in some videogames).
- themodelplumber 6y agoI'm so glad to see this comment. I recently got to the point where I created a text-viewer. Then I realized: This is the weak-sauce version of just admitting I need to write my own editor. My toolset is kind of weird conceptually so nobody else has created "my" editor yet. Haha :-) Thanks for sharing your experience.
- afc 6y agoThank you for your response. I think most people here would disagree, but... I'd totally encourage you to go this route. It has been very fruitful for me.
- deeg 6y agoI consider scripts to be functional documentation, so I write a lot of them, usually shell scripts but Ruby and Python, too. Any task that I might want to perform again, or tasks for someone else, gets a script if possible. All of my repos have a /scripts directory. It can take some work to write and debug but in the end when it's working you know you have correct "documentation". Text and wiki documentation may look right but you can't be sure. Just today someone on my team was trying to create a particular build on Jenkins but was using the wrong build parameters, which were copied from wiki; the previous owner of the wiki had neglected a few changes. But the script worked!
- kinix 6y agoI've found recently that Makefiles are my best friend for this kind of thing, even if it's just wrapping existing commands with the right arguments and conventions for the project. Being able to do a simple `make build`, instead of remembering all the right command syntax, repositories etc is so much nicer that having to trawl through a README in a couple of months time for how I was using this thing
- bjonnh 6y ago+1 I've been using makefiles more and more. And the nice thing is, if you don't have hidden dependencies you can just do a make -jn and get parallelism.
- flukus 6y agoI also like having a script per project that will get auto loaded when you cd in. An example from a current project: #my vimrc knows what to do with this export VIM_TAGFILES="$PWD/build/tags,$HOME/.local/var/tags/system,$HOME/.local/var/tags/glib-2.0" export CFLAGS=' -g -O0 ' function autobuild { (mkdir -p build cd build while true; do make make deploy inotifywait -qr -e close_write,delete ../cgi ../test ../Makefile.am ../migrate.sql; done) } function watch { tail -f build/app.log build/deploy/app.log } Over time they'll end up with a bunch of other random things. I've tried abstracting a lot of these to their own scripts but every project proves just different enough to make that more complicated. And most of them are personalized enough that they don't go into the project itself. Another "super power" for shell scripts is writing completion scripts (https://iridakos.com/programming/2018/03/01/bash-programmable-completion-tutorial https://iridakos.com/programming/2018/03/01/bash-programmabl...). I've had some insanely useful one's do things like look up database values to mimic a large complicated third party product, going through it's UI inputting repetitive info, copying files around, etc was reduced to fake-tool<tab><tab><tab><tab>.
- H8crilA 6y agoFrom my experience - multiple desktops, especially when having multiple monitors (and yes, you should probably get a second monitor). If you don't use desktop switching: the basic idea is to have one desktop per task/bug/project. Lets you context-switch in a very organized manner. If you're using them, good, but you may be surprised how many people don't!
- gilbetron 6y agoI've been developing for 30+ years and I honestly don't see much of a productivity benefit using multiple monitors. I work differently when I have them, but not necessarily more efficiently. I find the head moving required to use multiple monitors more annoying than just alt-tabbing between windows. The only major exception is if I'm doing intense UI or visualization work and I want to see my code and the output at the same time. But even then, most of the time I can just resize my windows on a single screen. Different strokes for different folks and all that, but, anecdotally, having been tech lead for various sized groups as well, I never saw a performance boost when people got the multiple monitors they always wanted, either. I think part of it is that I find building a mental space of what I'm working on is the most important thing, and having tons of screen real estate acts as a replacement for that and thus goes against it, ultimately causing me to perform worse.
- mekster 6y agoAgree with the multiple display not really being helpful. It may look professional but your neck won't feel so. Also on a single monitor I do this to keep my neck and eyeballs easy. https://news.ycombinator.com/item?id=23125617 https://news.ycombinator.com/item?id=23125617 The display size is usually good with about 24 inches. Bigger and you can't put everything within your sight which requires head movement.
- superasn 6y agoBuild a snippet library. You know those tiny useful functions to "parse any date into mysql friendly format", "check if string is a email or url", etc. I have now hundreds of such functions in two huge files for the languages I work in most and it saves me a ton of time not having to reinvent the wheel or searching stackoverflow everytime.
- beamatronic 6y agoFind when you get into the zone. I get into the zone at almost exactly 5pm every day.
- mekster 6y agoI hate it because I like times after midnight but I still have to sometimes respond to people at normal time, so can't find the good spot.
- ies7 6y agoUsing pomodoro timer. That also means no Reddit, Hackernews, or Lobste.rs in that 25 minutes
- j45 6y agoBlock all 3 in the hosts file and only read them from a mobile device.
- sumnole 6y agouse AutoHotkey+SharpKeys to map macros, especially to keys on the home row. vim macros for recording on the fly. in general prefer keyboard shortcuts and command line tools. regex is game-changing and regex101 is a great tool for it. take notes and save snippets so you can refer back to them. most underrated stack for productivity is proper diet + exercise + sleep.
- lostintangent 6y agoWhenever I onboard to a new codebase, or try to learn more about an open-source project, I typically create personal notes that outline the structure and high-level “markers” that I want to remember and easily reference later. Unfortunately those notes are disconnected from the codebase itself, and therefore, not as immersive/rich as I wanted them to be. So I created a tool that allows me to annotate codebases with my own walkthroughs/breadcrumbs/ToCs and then play them back at any time, directly within my editor. This workflow has provided a pretty nice productivity boost for me thus far, and has the benefit of enabling me to share these walkthroughs with others as well: https://github.com/vsls-contrib/codetour https://github.com/vsls-contrib/codetour.
- 1f60c 6y agoI was about to ask how you got your own aka.ms link, then I saw you are a product manager at Microsoft, so that shouldn't have been too difficult :-)
- lee 6y agoLearn how to touch type. I've worked with many programmers who don't know how to touch type. Anyone who uses a keyboard for more than an hour a day should learn to. It only takes about 2 weeks to learn all the keys, but it's a skill that'll save you thousands of hours throughout your entire career. It completely baffles me that some developers haven't learned this basic skill. I've heard the argument that thinking is more important than typing. I counter that by saying if you learn to touch type, then it's easier to get into "flow" and your resistance to writing code drops pretty quickly.
- ashwanidausodia 6y agoIn my experience, people who do not like vi or any other keyboard driven tools/workflow are the ones who do not touch type. > I've heard the argument that thinking is more important than typing People who do not touch type are putting some of their mental energy in typing.
- tonymet 6y agostep through debugger
- lallysingh 6y agoPut every nugget of operational knowledge into small shell scripts and version control them. Never remember anything. Just run custom commands.
- nunez 6y agoYour IDE + a linter + a test suite = level up into any language super quickly
- city41 6y agoThe biggest boost in productivity I've had in recent years is switching back to a statically typed language. TypeScript in my case. You can absolutely refactor and change course _so_ much quicker and with virtually no regressions at all. Just the other day we realized a feature I was building didn't handle an important case, and I had to really change the approach. Doing it in a JavaScript would have been dramatically harder. The investment you have to make to really grok static typing is quite large. It took about 2 years for me to be really comfortable in TS. But you'll have to claw it out of my cold dead hands now. Before switching to web dev, I used to work in Java, C#, C++, etc. But I've been away from static typing for about a decade now. I completely forgot how beneficial it is.
- kortex 6y agoUsed to love Python. Now, unless it has type hints, not so much. Used to hate static types, or at least I thought I did. Really, I just hated C++ and Java. Go is Bae, trying to learn some rust. Computers are rigid. The more rigid the lang you talk to them, the less you get bitten. Untyped python, bash, javascript, just not worth it imho.
- redis_mlc 6y agoFYI: Perl has moderately strong typing, as well as forward references, an excellent debugger and probably the most powerful web framework, mojolicious. If you're unhappy with how loose python and js are, you might find happiness with Perl. To enable the checking: use strict; use diagnostics;
- Parazitull 6y agoTL,DR: Try F# or other "impure" ML languages if you want the security of types but you don't like actually typing the types. I also used to love js / php because because I thought types make the code unnecessarily verbose. After some pet projects with a strongly typed lang (c#) I realized the peace of mind that using types gives. But I still maintain my opinion that types make the code too verbose. But then I saw the "light" that is F# and I'm here to preach: F# has types BUT you don't need to type them (most of the time) because it has type inference. F# can be used in the .net ecosystem and most of the time it can replace C#. F# can be compiled to js (although the interop is a bit messy). F# is a better typed javascript than typescript. F# is predominantly functional but you can also write code in the non-functional(ha!) style of your choice. F# discourages you from coding mutable spaghetti F# has decent tooling: VSCode + Ionide + dotnet + paket F# has pipes |> The bad parts: F# is not a hard-core functional language like Haskell, but for me this is a positive F# is a functional language which requires a change about how you think about a program. F# doesn't have a huge community F# doesn't give you a lot of job prospects F# doesn't have a lot of 3rd party libraries (but you can use c# libraries in .net or js libraries with fable. You can also mostly port libraries from other functional languages) F# requires you to think about the order of your declaration. Cyclic dependencies are harder to accomplish although this might be a good thing.
- kortex 6y agoErgonomics. You. Yes, you. Sit up straight. I know you aren't. Take a deep breath, belly breath. Try to let some of the tension out. There, much better :) Also, TabNine, with a strong IDE and a good type system. The code practically writes itself. You can focus on higher level things. Testing. Driven. Development. Once you define your goals, it's so much easier to hit them, both cybernetically and psychologically. tabnine.com/faq
- closeparen 6y agoBuild admin and debug endpoints/pages into your services. Software is allowed to facilitate its own operation and troubleshooting, and it's almost always easier when it does.
- divbzero 6y agoWork only on things that really matter.
- ttty 6y agoNode.js: you can share code between client and server side. Typescript: you don't need to remember the arguments of a function or return types. Easy to refactor. Just no brainier. I also use it for all my config like webpack config with ts-node or ts-node-dev for auto reload. Auto format all your code with 1 command. Prettier or lint fix. But that's basic. Don't ever write global css. Use emotionjs or styled components. Scoped css it's a delight. If you notice all my tips helps you to reuse the code you write. Therefore write less code, more efficient. Plan all your stories ahead. Then do one at the time. Then mark it done. Prioritize.
- yakshaving_jgt 6y ago> If you notice all my tips helps you to reuse the code you write. > Don't ever write global css. Global CSS is a form of code reuse.
- sys_64738 6y agoUse Emacs for everything.
- rebolyte 6y agoSCM Breeze[1] is one of the first things I install whenever I set up a new dev machine. Setting up bash aliases for git commands like `ga=git add` is nice, but SCM Breeze takes it one step further and automatically numbers each file in the git output. Then you can do `ga 1 2 5`. [1]: https://github.com/scmbreeze/scm_breeze https://github.com/scmbreeze/scm_breeze
- vharish 6y agoZsh has this built in
- imron 6y agoAvoid HN, Reddit, Facebook, twitter and other distractions during working hours.
- zerealshadowban 6y agoLearn Unix power tools, study their options (`man` is your friend) -- and use pipes to combine their powers.
- RMPR 6y agohttps://missing.csail.mit.edu/ https://missing.csail.mit.edu/
- zerealshadowban 6y agoLooks good. Thanks!
- sriram_malhar 6y agoI keep two diaries, both MS Word documents. In one, I write summaries of what I read about -- papers, blog posts, books, and articles that interest me, along with the google search term, authors, URL, quotable quotes etc. In the other, I put together a free-form running log of projects I am working on, along with feature ideas, benchmark results (and the parameters used to get it),etc. Why MS Word, you ask? I am ordinarily an avowed plaintext person, and I have tried everything from various wiki formats, org-mode, markdown of every shape and stripe (even bought a few markdown editors), but they haven't worked for me. The reason is lack of WYSIWIG WYSIWIG is a huge efficiency booster. Inline images, doodles of my own, colors, fonts, tables, inline math, greek and other symbols, all of it is right there in the original (not in a separate render), and is searchable. Having all of it in one file is not really a problem performance-wise; I have had one file for the last 8 years. It is easy to back up and the chronology is clear, and it is easy to generate a table of contents. Finally, having it on a google drive means that it is available/convertible to google doc if I need to access it from elsewhere. I do not rely on google docs to be the primary copy, because i don't want to rely on a working internet connection all the time. Offline works better for me.
- kanyethegreat 6y agoHave you tried notion? Supports a lot of what you like about MS Word.
- sriram_malhar 6y agoI have not. The feature set looks impressive. However, I prefer my approach because everything is searchable text in temporal order. I don't wish to impose any further order on it, not just because it takes time, but also because it forces a particular hierarchy ahead of time. I often have mutual references to other articles, for example, or overlapping clusters of references.
- mekster 6y agoTypora is mark down based but is WYSIWYG.
- jimbob45 6y agoEasy, quick containers for Windows - Windows Sandbox. I've been putting Zoom in there to avoid installing it on my machine. https://techcommunity.microsoft.com/t5/windows-kernel-internals/windows-sandbox/ba-p/301849 https://techcommunity.microsoft.com/t5/windows-kernel-intern...
- lostmsu 6y agoOr you can just run it from browser.
- RMPR 6y agoThe web application is crippled, among others, you can't have the grid view. Using Zoom from Firefox.
- ViPrLa 6y agoWhat else do you like about it?
- jimbob45 6y agoIt just works. You don’t have to use an image like Hyper-V. It’s up and running in less than three seconds. You can configure permissions on a per-container basis (with a lot of work). Only bad thing is that MS doesn’t seem to realize what an incredibly useful tool they’ve built and don’t seem to be actively developing for it.
- fnord77 6y agospeech-to-text for writing (reports, designs) anything more than a paragraph or two. much faster than I Can type.
- lostmsu 6y agoThere is one single developer efficiency tip I can recommend: always dive deep. While sometimes it makes sense to ask around for help on something, you should always spend 20 minutes checking the source of your favorite framework/company's library, and try to debug it yourself.
- unnouinceput 6y agoTotal commander. For any OS. Is among the 1st 3rd party programs I install regardless if it's a Win or Android or Lin installation I do.
- themodelplumber 6y agoI have used Double Commander a little bit, and I like it so far. Any chance you've used both? What do you like about TC?
- unnouinceput 6y agoI guess it's the fact that I first started with Norton Commander on DOS over 25 years ago and when Windows came around Total Commander was the closest I stumbled upon and I simply got used to it. Also Ghisler is still actively supporting it, which makes it very desirable for me. Otherwise I would've invent it myself. [Edit] - reading a bit about Double Commander I guess it's what I am actually using on Linux. Both are written in Pascal and they look the same (well, as much as they can due to inherent OS differences). Didn't paid attention when I "apt"-it to its actual name :).
- war1025 6y agoLearn how to use git's partial commit functionality `git add -p`, `git checkout -p`, `git reset -p`, etc. Also get comfortable with rebasing. The most foolproof formula I've found is git rebase -i <commit hash immediately before what you want to move> [--onto <branch you want to be the new base>] Using the two of those together, you can clarify your commits and have code that is actually reviewable rather than stream of consciousness spaghetti commits. Makes reviews more pleasant and looking back through history more useful. Also learn to use `git log -p` to look through the change history of files. Immensely more useful than `git blame`.
- djeikyb 6y agoi personally love partial staging/commits but haaate ’git add -p’. i use tig and a few other partial staging user interfaces. learning how to stage part of a line, in a favourite code tool, is a skill i appreciate for myself
- prashnts 6y agoI'd really like to know how you use tig for that. I am overwhelmed with the options and keystrokes that I can't remember.
- temporallobe 6y ago1. Learn a good plain text editor really well. Learn the shortcuts. Learn how to navigate text (skipping words, end/home, etc.) 2. Start using REPLs - saves a huge amount of time when trying to figure out small quips of logic. REPLs are extremely useful whether you’re an artist expert or a beginner. 3. Learn how to setup and use debugging tools. These are often a PIA to get properly working, but you’ll thank yourself later. For example I do a lot of Ruby/Rails and rspec work. Enabling byebug and leaning how to run rspec feature tests with the browser in non-headless mode can solve some really tough bugs. 4. Learn regexes (POSIX). They’re used everywhere and have pretty much identical implementations and syntax between languages; they can help you do anything from performing complex searches to parsing logs to writing your own search engines. 5. macOS: Cmd+` (backtick) lets you cycle between windows of the same application, e.g., all of your Chrome windows. This was a game changer for me. I still see a ton of people not even using alt-tab or using that awful expose crap. 6. Keeping your system “up”: Caffeine for Windows, Insomniax for macOS. One of my biggest annoyances is systems that automatically lock, sleep, or time out, wasting my time and mental energy on logging back in or waking my computer. 7. Taking more breaks and procrastinating. Yes! Procrastinating does wonders for me. Not sure why, but some of my best work is done after goofing off for hours. It’s probably counterintuitive to most of you, but surprisingly I can get more done by spending less time forcing myself to do it.
- Aachen 6y agoThe four line documentation might help format long posts: https://news.ycombinator.com/formatdoc https://news.ycombinator.com/formatdoc
- grayclhn 6y agoDocumentation > email > meeting.
- vatotemking 6y agoUse procrastination against itself. So basically, when procrastinating, we tend to justify our inactions: just 1 more minute on Twitter, just one last scroll on my newfeed, lemme just check this subreddit really quick. With reverse procrastination, you trick your brain into doing your intended task: Ok lemme just open Visual Studio Code and edit this one file then im good, I'll just change this one line of code, I'll just do 5 pushups then i'll stop. Then when you're on your 5th pushup, you say "surprise mr lazy pants, im actually doing 10!" Once you get to do that one task, try to trick again your brain into doing another simple, easy task and before you know it youre in "the zone". Maybe it depends on the person, but for me personally, it works pretty good. Perhaps OP is asking for tools, but no amount of dev tools can help if you dont have the motivation to begin.
- statictype 6y agoYeah, I tried that. Didn't work for me. I'm too clever for my own tricks.
- elbear 6y agoOne thing you can try: actually stop after those 5 push-ups. Actually stop after editing that line of the code. The idea is that I need to build tolerance for that task. If you keep at it, those 5 push-ups will become so easy that you will feel compelled to do more. If it's not working, then there's another reason behind the resistance. Maybe what you're trying to do feels pointless. Try to notice your feelings and internal dialogue when you're trying to do that particular thing.
- cheerlessbog 6y agoOr just make the task smaller and smaller. Can’t finish 5? Do 1! Too much? Just get on the floor and hold the position. This strategy can’t fail, as you can always reduce your goal (and next time have to reduce it less)
- elbear 6y ago
- jgable 6y agoTest driven development for my embedded systems work. I’ll never go back.
- medecau 6y agoI got some code going on using pytest and pyserial exactly for this. Tell us more!
- jgable 6y agoHmm, sounds like you might be automating tests on the target, scripted from the PC. There's a place for this, but I'd call that automated integration/system testing, not unit testing. Unit testing was traditionally considered impractical for embedded systems, because the code is so closely tied to the hardware. However, with proper architecture and unit test frameworks that simplify your life, it's quite feasible, and indeed enjoyable. You write unit tests that exercise your embedded code, compiled for the PC, not the target. This ensures your code is portable. I use the Unity/CMock/Ceedling framework when I'm writing in C, and CppUTest when I'm writing in C++. I HIGHLY recommend the video courses taught by the guys at ThrowTheSwitch.org (the authors of Unity/CMock/Ceedling). See https://www.throwtheswitch.org/dr-surlys-school https://www.throwtheswitch.org/dr-surlys-school I read and enjoyed James Grenning's book, Test Driven Development for Embedded C, but it didn't really click for me until I took the video courses mentioned above. In the second course, you code an entire simple but realistic embedded project in TDD fashion.
- wilgertvelinga 6y agoShorten your feedback loop by using a continuous unit test or code runner. For JavaScript and it's variants I use WallabyJS (unit tests) and QuokkaJS (code). For C# there's nCrunch. For Python there's PyCrunch. And for Java and it's variants you can find InfinitTest Here's a video by myself showing the JavaScript tools: https://youtu.be/MpFImvZrbDY https://youtu.be/MpFImvZrbDY
- decentralised 6y agoWatching you video now, really cool to learn about Quokka, thanks!
- un_montagnard 6y agoKnow your IDE inside out. Not only the features, but also the keyboard shortcuts.
- kevindeasis 6y agoThere are a lot of advice out there and looking for advice that you dont need and mental models that you dont need can be a huge waste of time. Know the problem you have at hand, and find out what people are doing to solve it, dont look for answers for problems you don't have. Reading non-fictional books can be a waste of time. IE: I've read over 40 non-fiction books in 365 because I enjoy them. This approach is not time effective because you can usually put the wisdom and knowledge of one book in 1 paragraph Know your context and know if those advice apply to you
- georgewsinger 6y agoProgramming in VR Desktop: https://github.com/SimulaVR/Simula https://github.com/SimulaVR/Simula (see the README for a link to a video of it in action). This allows you to (i) distribute your work tasks intuitively across space; (ii) completely zap out all distractions within a VR headset; (iii) completely eliminate the mouse and work 100% on a keyboard (VR Desktop allows you to click and browse with eye gaze). It takes a bit of practice to learn the keyboard shorcuts (spawning terminals, moving windows, etc with keyboard shortcuts), but once you learn it, it can feel very immersive/productive.
- siljon 6y agoThis is the reason why I want a VR headset! Currently I'm a student and can't afford, however I will be doing it soon! Question: Have you removed your screens completely and use VR 100%, or do you still have a screens? (My idea is to replace the screens completely)
- mslate 6y agoWhat VR hardware do you use this with?
- Mizza 6y agoI have to admit.. I love this. Can you really _use_ it though? For long periods of work, day after day? Or is it just a gimmick?
- blackrock 6y agoI was imagining something like this for fully immersive computer work. Especially for development and research. It can give you infinite screens. One better idea, would be to tie in VR with some front cameras, and then overlay your windows and documents at specific spots in your room. Like have your calendar on the wall. It becomes literally, a wall calendar. Then a todo list on your desk. Some encyclopedias on your bookshelf. Etc. This way, your working documents becomes grounded in your actual physical reality. And this gives you memory, of where that document was. It’s like how my desk may be messy, but to me it’s perfectly organized. I know exactly where that receipt was placed, in that pile of papers in the far corner of the table. Being able to recognize hand movements is also a plus, as this will make it easier to interact and manipulate your virtual objects.
- polm23 6y agoDon't use single-letter variable names like i, j, k. At least double them, like ii, jj, kk. If you do that then they're easy to grep for.
- deleted 6y ago[deleted]
- ribadeodev 6y ago..or just do not use variable names smaller than 3 characters if they do not mean anything, period. There is no difference in coding time and no good reason whatsoever.
- polm23 6y agoI generally agree, but I think ii, jj, kk are fine for those iterator ints in loops, or the throwaway var in a list comprehension in Python. The only other situation single-letter variable names make any sense is if you have a short function that implements a mathematical formula, like distance or something.
- stuffystuff 6y agoUsing virtual desktops regardless of OS. Also assign hotkeys to them. I always find other developers wasting so much time with their mouse to focus a window when they could have placed a group of related windows on a designated virtual desktop which they can navigate to quickly with keyboard shortcuts. Virtuawin is what I use on Windows, but for Macs or Linux, you can configure the native virtual desktop equivalent well enough to make usable with hotkey. It cuts down visual clutter and gives you focus on a specific task way better.
- jimnotgym 6y agoThe space you work in is important. Open plan offices are one of the most destructive forces to productivity
- TuringNYC 6y agoIf you are working on the terminal a lot -- create handy aliases for common activities. For example, I have one to look at recently launched k8s pods. I have a "dracarys" alias which cleans out my environment and sets up a fresh test environment, etc.
- mentos 6y agoI use 2 PCs at my desk with Multiplicity as a KVM it has made me more productive as a game dev.
- w1nter 6y agoI switch between commonly used apps with a single shortcut (e.g. ⌥E opens VSCode, ⌥D opens Chrome). Details http://frantic.im/macos-app-shortcuts http://frantic.im/macos-app-shortcuts I use a simple TODO file for side projects https://blog.frantic.im/all/todo-file-for-personal-projects/ https://blog.frantic.im/all/todo-file-for-personal-projects/
- malkosta 6y agoI love shortcuts to switch applications. I made my touchbar useful with that: https://photos.google.com/share/AF1QipNJWNH0Fjf4dUVWqYV3093TOMFswnJOjlAt6nz8LWJOPHJGzgoTYjc7Twnzc2k9cA?key=bFpkLTZXVDIxR2pTdDBEbVp0OUttQXVGVHlxd1RR https://photos.google.com/share/AF1QipNJWNH0Fjf4dUVWqYV3093T...
- jokab 6y agoon Windows I use Win+1 (windows terminal or conemu), Win+2 VS 2019, Win+3 VSCode, etc
- swah 6y agoDoesn't help with multiple windows of the same app, I'd guess? That is/was a big problem with MacOS for me - I tried using alternative application switchers that displayed an icon for each window instead... Then kinda settled in just using spaces and putting VsCode, Chrome and Iterm on the same places every time.
- malkosta 6y agoI stopped using mouse with https://i3wm.org https://i3wm.org It was the fasted way to use a computer I've ever experienced
- kqr 6y agoLearning statistical process control. I now make control charts for virtually anything, both professionally and personally. It's an insane productivity booster in that it tells me what the meaningful things to focus on are.
- starpilot 6y agoThis vid changed my life: https://www.youtube.com/watch?v=_o7qjN3KF8U https://www.youtube.com/watch?v=_o7qjN3KF8U Please watch it. You can choose to be part of the wheat or the chaff, and if you're not hustling, what's the point?
- fxtentacle 6y agoPurchase a good IDE. It'll provide similar benefits as writing your own text editor (which was suggested here). It can also provide type hints and type checks for dynamically typed languages, thereby making them more like statically typed languages (also suggested in here). Plus a good IDE will speed up searching as well as index the source code to make things click-able, thereby making large code bases or dependencies easier to navigate (also suggested in here). So basically you can get a large chunk of the improvements that others have suggested in this thread simply by purchasing a good IDE :)
- Joeri 6y agoFor a number of years I used the jetbrains IDE's (at alternating times I used phpstorm, webstorm and intellij), commonly perceived as best in class. Then I switched employers to a place that had standardized on VS code, so I moved over as well. I have to say that while it was hard to get used to in the beginning, it is surprising how good VS code is. I get 80% of the featureset of jetbrains' products, for free. Specifically, all of the features you mentioned VS code does just as well when doing web dev. The only thing I'm missing is the framework-specific automation helping you easily set up projects, builds, unit tests, and so on. VS code can automate those things, but there is more googling involved.
- jonnypotty 6y agoI think I've tried most java ides and they all suffer from the same issue which is that they're slow, unwieldy, and the benifit they bring (apart from debugging) are mostly not benifit at all. Learning how to write correct code without and IDE auto fixing everything you get wrong with a right click has been very valuable to me. Learning my build tool outside of crappy IDE integration has been an education too. Basically getting rid of my IDE has made me a MUCH better developer although I admit they do powerful and useful things.
- louiskottmann 6y agoThe single biggest productivity boost is when I realized over 90% of my time is spent in Firefox+Terminal+Emacs. Alt-tab drove me nuts so I bind F2/F3/F4 to a script that will cycle through instances of these 3 programs. F2 is terminal, F2 again is next terminal, etc.
- AnyTimeTraveler 6y agoThat's what I've adopted a tiling window manager (i3wm) for. I always use the same workspaces for the same things and have them open automatically on those workspaces, so most of the time, I just need one button-press to get to the terminal-instance I want.
- abridgett 6y agoShare more. Whilst it might seem appealing to be "the one person" who can do something, it stops you moving on to new things. I've seen so many people go from "the guru" to "the bottleneck" because they've never done this. Sometimes due to "holding onto power" sometimes lack of time or motivations. Docs and explanations help the author to move onto new projects and new developers to pickup the old projects - a win/win.
- TheSpiceIsLife 6y agoEleven hours in and no mention of AutoHotKey? Shame on you HN!
- vharish 6y agoKinda presumptive. From what I read, this is for windows. The OP clearly is using a *nix system.
- TheSpiceIsLife 6y agoAh, fair enough.
- noisy_boy 6y agoStarted my personal wiki using dokuwiki. I sync it between my Ubuntu laptop and Android phone using Syncthing (on the phone I use Nginx on Termux to serve the pages). Very satisfying to have my notes available everywhere without having to share them with cloud etc (I already backup everything locally and on Backblaze so they are safe anyway).
- hombre_fatal 6y agoGet other hobbies.
- malkosta 6y agoCtrl + space (browser) Alt + space (terminal) On Firefox: Spacebar (pagedown) | Shift + spacebar (pageup) | Ctrl + tab (cycle between last recent opened tabs) | Cmd + number (go to tab of number) | Cmd + K (go to search box) | Cmd + L (go to address bar) Use Vim and forget the mouse
- vharish 6y agoWhy not try vimum or similar for Firefox?
- tkainrad 6y agoGreat thread, thank you. Already seen a few things that I will look into. For me, the transition from Bash to Zsh has been a huge efficiency boost. Mainly because of some great plugins for Zsh, such as z, zsh-peco-history (better history search), zsh-autosuggestions, and zsh-syntax-highlighting. My blog post about setting up a Linux workstation describes this in detail: https://tkainrad.dev/posts/setting-up-linux-workstation/#switching-from-bash-to-zsh https://tkainrad.dev/posts/setting-up-linux-workstation/#swi... The best thing is, there is no initial productivity hit. You don't miss out on any shell features that you are accustomed to. If you work a lot with ssh, it is also worth the effort to create a proper .ssh/config that contains the most used hosts.
- ropeladder 6y agoLots of good Zsh tips, thanks for this writeup!
- DmitryOlshansky 6y agoMy biggest boosters were: - learning more then a few basic hot keys for zsh (things like ctrl-k, ctrl-r and beyond) - mastering tiling window manager, today I can switch, compose, mix and match windows in a blink of any eye - it used to take seconds - switch to minimal OS setup, tile WM, your basic terminal tool suit, browser + the few apps you actually need (saves you trouble configuring all of that extra crap + updating it daily) - find time to read MAN on every program you use daily, you will find lots of hidden gems in there
- xenihn 6y agoWhich tiling window manager do you use?
- DmitryOlshansky 6y agoStarted with sway on FreeBSD recently and I love that combo so far.
- bbarn 6y agoThis is a bit of a departure from the question you asked, but I'm always amazed how much people tend to hyper-tune their dev environments, when in reality, most of my time is spent thinking how not to write code. I get just as much work done on a completely vanilla macbook with VS code installed on it as my editor-obsessed peers with obsessively optimized setups can. How much actual code are you writing? I'd be really concerned with myself if I am putting out so much code that I need to be concerned with my text input speed.
- SimonPStevens 6y agoI spent quite as few years as a contractor and I quickly discovered the best way to be effective was to learn how to be effective with everything in the default settings. At every new place I went I could just jump right in. No need for any time spent fiddling with settings or tweaking and installing pluggins. Although a slight counterpoint is that I also used to have my git settings file stored in a github gist so I could just grab my latest one and every new environment would have the same set of aliases I was used to.
- jmchuster 6y agoYour tooling isn't just about writing code, it's also about reading, analysis, debugging, research. You think about the code, have an idea, need to look up how something works, think some more, have this constant back and forth. Optimizing your environment minimizes the friction, and allows you to immediately get answers as soon as you have a thought about something, so you don't lose your train of thought. You also want to be able to run quick experiments, same idea, get the answer to a question you're thinking about as fast as you think of it. And then once you actually know what you want to do, don't you want to have as smooth an experience executing your fait accompli? The primary focus is minimizing friction, and speed is just the observable side effect. And then of course you can't ignore the natural human enjoyment that comes from customizing things to exactly how you like them.
- ExpiredLink 6y agoIIRC, the average developer output is 10 lines of code per day.
- 6y ago
- iveqy 6y agoNot a tool as you asked for but... My tip is to change the requirements. Requirements are often poorly written and often contain a suggested implementation. Try to find the real problem, talk to your stakeholders and alter the requirements to find the easiest implementation. I've saved months of work several times by doing this.
- myle 6y agoTeminator. I see many people suggest tmux, but I have not seen suggestions for my favorite terminal emulator. Ctrl+Shift+E for vErtical split Ctrl+Shift+O for horizontal This is a killer feature. It is also much better than tmux because scrolling up is naturally supported. I always keep an instance of Teminator running full screen on one monitor and whenever I need another terminal, I just split the screen, or go to the relevant already open post of the screen. Having a visual overview of all instances of very helpful and much better than using tabs. The other killer feature in bash is Ctrl+r.
- Pawamoy 6y agoMy favorite as well. I think Terminator gave me a real boost on productivity. The split feature is great. And it has a lot more good things, like increase/decrease/reset text size, resize/rotate/expand or even drag-and-drop splits, grouping (to write in multiple splits at once), and the scrolling is done very well: scroll up a bit to stop following the output, scroll to bottom to follow again.
- RMPR 6y agoThe main point of Tmux is that you can use it over ssh as well.
- thrower123 6y agoActually learn how your tools work. Don't treat things as black boxes, tear the cover off and learn what is actually happening.
- idkwhoiam 6y agoknow your keyboard shortcuts
- Irishsteve 6y agoWorking with a very small sampled dataset when doing anythin g'big data' or 'AI' related.
- black_13 6y agoIf you have to be that efficient at a particular job then you need to find another job.
- Joeri 6y agoThe things I've benefited from most are not tools but practices. - Question the work Always be questioning whether the thing you're doing really needs to be done. Is there a way to not do it? Is there a way to do something better instead? - Park downhill Before putting a project or incomplete task away, make notes of what the next thing was that you were going to work on. This lets you bypass that 10 minute orientation getting back into the project the next time you pick it up. - Keep a single todo list outside of your head You can only have one master, so keep a single todo list in order of priority. Whenever something pops up on your radar, put it on the list in the right spot and immediately forget about it. Check the todo list a few times a day to make sure you're working on the right thing, and whether you need to communicate that something low on the list won't get done in time. Aggressively try to weed out the list and remove as many items as possible, preferably by not having to do them (by reassigning, by replacing or by reprioritizing). Benefits: (1) not forgetting to do any work, (2) free up your mind to focus on work instead of meta-work, (3) clear priorities, (4) detect early when work is going to get delayed. To combine this with park downhill I either keep the per-task notes on what to do next right in the list (in a details field of the todo item), or I keep it somewhere else and have just a single top-level item "finish X" in the master list.
- hamandcheese 6y agoRe: questioning the work... I’ve found that there’s a certain threshold (that is surprisingly high, sometimes) where it’s easier and faster to just do something low value than it is to convince everyone else involved and reach alignment that it isn’t a valuable thing to do.
- jikciraz 6y agoRegarding the todo list, I find that having a text-format todo list for the current day can provide structure and sense of accomplishment (especially at the end of the day). After completing a task I would put a checkmark emoji in front of it. Such a list can also bring me back on track after a lunch or a mentally-demanding task. If I know that I won't be able to do a certain task today, I put it in advance for the next day's todo list. Not completed tasks will roll to the next day. Plan for May 11: - Contact Person 1 regarding Thing 1 - [checkmark] Review Pull Request 1 made by Person 2 - Implement Thing 1 from Feature 1 - Read Email 1 from Person 3 Plan for May 12: - Implement Thing 2 from Feature 1 - Investigate Thing 3
- ab_io 6y agoDecent git aliases: https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases
- tomaszs 6y ago1. I use Visual Code with carefully chosen extensions that alert me all the time about error. 2. I have enabled linter autofix on safe. It fixes a lots of stuff very good fast. 3. I wrote several own extensions. One for example shows error in the code when i do some mistakes i normally do. It also boosts my speed because i dont go through the whole process of finding these errors. 4. Since i code using TypeScript and Angular i use a lots of OOP and composition to reuse easily and modify code fast. And have less errors. OOP gives great propert and method suggestions in VSC so there is less space for errors. 5. I have a lots of generators and snippets custom for my projects. So writing similar things is blazing fast. 6. I dont overcomplicate stuff. Write everything as simple as possible so it is easy to refactor and modify and understand. 7. I use bash with a menu to have complicated operations like git operations to be done easily. Without clicking with mouse. It is a boost. 8. I have written also some software in C# that operates on the TS code base. I use it to generate some more complicated stuff that includes multiple files at once. I use code comments to put for example snippet examples into Angular code. Than a C# app looks for these in whole project and generates snippets for VSC automatically. 9. An extension for VSC executes tests one by one. I can choose test to start. It is faster than start all each time. 10. CI/CD, unit testing, linting, end to end tests give a boost if done right. 11. I side from solutions that are hype but cause loads of code to be written. For example some silly state management libraries. Overkill. 12. My PC is packed with best hardware, updated regularly to be fastest as possible. Since every second you wait ia a second you waste. PC ia better because you can upgrade it cheaper than laptop. Remote access is the key if you want use laptop. 13. Good sleep and diet, sports is essential for good performance. And music. 14. I never go into the zone if i am not 100% sure what and how to do stuff. In the zone you arw blazing fast, but be careful to not write useless code because of bad approach. 15. Notes notes notes. For everything. Refactored often. JIRA as a single source of tasks. Notepad as a detail task list. 16. I adjust tasks to the time of day and my mental focus. Some easy task for first half hour, and than the big ones for the rest of the morning. 17. I have wrote a lots on keyboard to have very high speed. It saves me time writing (actually you need to use keyboard when you are a dev anyways) and less wasted time for typos. 18. All notifications off. All spam sms, emails, calls off. No distractors. 19. I never code when i am not 100% sure what and how to do it. No guessing, always asking. A lots of wasted time saved. Never being ashamed to ask even the most stupid question. 20. I always remember that things take time and not stress too much about it. Stress harms performance if too high. But also some stress can let you go into the zone. And this is magical place to be in. I enjoy coding. Always had. For 20 years.
- OJFord 6y agofzf. Anywhere you want to find something, but particularly find something and do something with or to it, aliases or small scripts or plugins using fzf are great. No specifics because I think it's a great Unix-spirited 'one thing well' and it's better to implement what works for you around it yourself, but I use it in: vim (filenames, file by contents, buffer names), password management, several git aliases for running commands with either a fuzzy found SHA or file, and more. I was going to leave it at fzf, but as a bonus - bat. Use it in fzf previews, to see, with syntax highlighting, what you're selecting before you select it.
- deleted 6y ago[deleted]
- sushimako 6y agoOver the past ~half year I gradually established a workflow consisting of a simple directory structure, a handful of bash-aliases and chromium profiles. It looks like this: Each project gets its own directory somewhere in my $home with some subdirs. There might be various others specific to the project-domain, but these are the most common: • notes/ contains plaintext files of everything i write down. File-name structure is <date-str>:<note-type>, e.g. 2020-05-09:call (:call are the most typical ones). As others have also suggested, I take a lot of notes for record keeping & plannning purposes. • workspace/ contains all source code repositories, or other files necessary to work. Pretty much anything I might touch while coding. • auth/ for things like ssh public keys used on the project • downloads/ Project-specific downloads. Then I create new entries in my ~/.bash_aliases that "get me" right into the coding-env of a project. Say I work on a python project, I might have an alias that looks sth like: alias fb='cd ~/fooproject/workspace/foobot && echo "loading virtualenv..." && source .venv/bin/activate'; On of my current side-projects is a full-stack clojure(-script) app with these aliases: alias foh='cd ~/opendecks/workspace/foh'; alias fohj='cd ~/opendecks/workspace/foh/src/clj/opendecks/foh'; alias fohs='cd ~/opendecks/workspace/foh/src/cljs/opendecks/foh'; First one gets me into the the source-root of the project, the other two into respective sub-paths for back- and front-end. These aliases allow me to immedeiatly "jump into a project" from any open terminal. Lastly, I started employing chrome/chromium's user-profiles to seperate browsing for each project. This isolates work-related browsing from my personal activity (cookies, logins, passwords etc), and provides a nice cognitive barrier against procrastination. I'm not logged into any social networks on those work-profiles and switching to my private profile to browse facebook is a more concious act than opening a new tab in the current window. Each browser profile is set-up to save all downloads to the project-specific `./downloads` directory, again not to mingle (potentially confidential) resources. I haven't automated any of the above steps, because it's so simple and takes me at most 10-15 mins to create a new instance. This has worked really well for me so far, because it clearly seperates almost all resources associated to a project, while being friction-less in tooling/switching between workspaces (versus e.g. waiting for a VM or docker instance to start). Another nice side-effect is that I can easily archive or clean-up past projects.
- abhishektwr 6y agoUse Makefile, Readme and .env files more effectively (mainly to avoid WTF moments when you don’t remember why you did something when you did it). I am not good at remembering commands particularly when you have to deal 10 different technologies (Kubernetes, Docker, Framework specific stuff) so create some standard wrapper functions as make shortcuts and document them in Readme.
- ahartmetz 6y agoI walk away from the computer when I need to think. Computers are so distracting! Depending on time of year / weather I will either lie on a couch, pace in circles inside, or go for a walk, preferably with plants nearby, outside.
- Scarblac 6y agoOften you want to fix something quickly but run into a stupid problem -- you don't have the right data locally, or the wrong version of something, or an unrelated thing is broken, or something is undocumented and the person who knows isn't immediately available. Thus you feel deflated, the energy is gone, and finally you move to something else. Instead, fix that stupid thing, once and for all. Get to the bottom of it, automate all the future times it would happen again, don't just hit it but hit it out of the park. Not always, because you won't do anything else, but often.
- vharish 6y agoIf you are using vim, you should definitely try using cvim or similar for chrome. You’ll most probably stop using mouse when in browser. If it’s about tools, I would suggest trying out i3 and emacs. I’ve used vim+tmux for a couple of years. Slowly I’ve migrated to Emacs. Somehow, I like it a little more than vim. I still heavily use tmux. For tmux, having a startup script with pre configured windows and panes can be helpful as well. Having a dual monitor setup can also be very productive. I personally try to avoid using mouse. Most of my hacks are targeted to achieve this.
- RMPR 6y ago> If you are using vim, you should definitely try using cvim or similar for chrome. You’ll most probably stop using mouse when in browser. Using vimium on Chromium and vim-vixen on Firefox I always found those extensions quite limited and buggy. As I already posted here https://news.ycombinator.com/item?id=22642386 https://news.ycombinator.com/item?id=22642386 > There are a couple of annoying things with vimium which, I think, are general limitations for Firefox extensions, or browser addons in general: - it loads after the page, so if you mistakenly open a link, you have to wait until the page is fully loaded to close it with the extension, but you can always use the browser's integrated shortcut Ctrl+W. So far so good - Letters positions are not as accurate as let's say, qutebrowser, and sometimes when you open a link it's not the right one, even if the letter was indicating it. For a clear illustration of what I'm trying to say, try to browse stackoverflow and use the reviews queue. - When the page is saturated, letters start overlapping, you find yourself with one link hovered by 'A' and another 'AA' maybe a couple of links labelled: 'AB', 'AC', ... and in this situation it's impossible to select the link 'A', you have to do it with the mouse. You'll be better off using qutebrowser instead.
- gandutraveler 6y agoDon't over-optimize. I work for a large tech company and I see many developers make the mistake to over design/architect solutions prematurely, setup meetings with colleagues to discuss how the solution could be leveraged by others etc.. But 80% of the work that we do is pretty straightforward and simple Google search will give you the answers. So just timebox few hours and come up with a hacky solution(proof of concept) that works. More often than not this solution is pretty close to what you want and you've not wasted companies time.
- ProZsolt 6y agoUsing a modified international English keyboard[1] for programming. My native language is Hungarian. We have 9 extra letters on the keyboard. Occupying the keys on the right side on the keyboard that used for brackets, semicolons, etc. on the US keyboard. These characters are moved to weird positions[1]. I use the English keyboard most of the time but modified it, so when I hit Caps Lock I can type Hungarian letters. [1]: https://www.apple.com/uk/shop/product/MLA22Z/A/magic-keyboard-international-english https://www.apple.com/uk/shop/product/MLA22Z/A/magic-keyboar... [2]: https://en.wikipedia.org/wiki/QWERTZ#Hungary https://en.wikipedia.org/wiki/QWERTZ#Hungary
- mekster 6y agoAlign your windows near the middle ok your display. Displays are always in wide shape and if you maximize windows size of any app, you'll be looking to the left quite a lot. What I do is I just narrow every window, so the left edge starts from a little bit left of the center of the display, so if I'm reading a page on a web, my neck would mostly be moving around the center of my natural facing position. You can put other small window to the blank space at the left or put some desktop files there to be always accessible.
- looshch 6y agoI used to think that I’m the only on this planet who do care about the exact same stuff, agree completely
- thewebcount 6y agoI've started using a debug diary, and it's been quite helpful. When I hit a problem, I often realize, "Wait, I've solved something like this before." I look through my debug diary and find entries related to what I'm working on now. It's saved me a bunch of time! Much better to read the solution I already came up with than to reinvent the same wheel for the 6th time.
- greenyouse 6y agoThis is a cool ask HN. Here are some things I do for frontend programming. Things I like to use: - org-mode for structured note taking (debug sessions, wip tasks, architecture, rubber ducking, other team details, scratch buffer is like a giant clipboard manager, used to use notes for tracking time on tasks and starting + ending the day too but now only do if there's a crunch) - isolated testing envs where I can test apps - automated e2e tests via Sauce Labs + WebDriver with emails for catching regressions - adding APM tools like email alerts when prod goes funky - quokka + wallaby.js + personal development setup for interactive programming (yes proprietary but super helpful) - personal scripts for automating work (little stuff like: run triage steps while debugging, control tools that have bad UIs, add git hooks so I don't do as much dumb stuff, etc.) - using code formatting like prettier, stylelint, eslint (other teams contribute code to us so breaking their work locally saves us time in the PR later) - pay attention to where you get stuck, optimize - pay attention to what you burn large amounts of time on, optimize - lots of little debugging things like look for adjacent problems after finding a new issue (9 debugging rules book is a good starter) - thinking about Rich Hickey talks (lol) - get unstructured time everyday to just hang out with other developers on your team and talk about issues or new tools to try out (favorite part of my work). Other people are really smart and come up with good ideas! Things I want to get: - source maps for all frontend scripts pulled in only for my browser, works for all envs at work - full source code search across the company at work (large group, thousands of projects) - automated a11y and performance tests to catch regressions early - automating small code changes across hundreds of projects - somehow get rid of webpack's complexity (pipe dream, yeah right) Edit: list formatting whitespace
- doomjunky 6y agoJIT compiling Just in time compiling means, you can modifiy your programm at runtime. I had wasted so much time in the implement-compile-run-debug-repeat cicle. Just the naviagtion to the part i want to debug had me cost a lot of time. With JIT you can implement and debug at the same time. Debugging every single change and seeing the effects helped me to avoid a lot of bugs.
- ooyimusic 6y agohttps://youtu.be/rXBaRwX5BPY https://youtu.be/rXBaRwX5BPY
- flniu 6y agoThe Pragmatic Programmer, which was recently published its 20th Anniversary Edition, talk about these tips in whole book, from The Basic Tools to Pragmatic Starter Kit.
- flniu 6y agoI used to use AutoHotKey several years ago. It provides remapping hotkeys, text expansion (snippets), macro on operating system level, etc. But it only runs on Windows. :( It's the very few tools on Windows I miss. Now I use Spotlight/Alfred/Dash/aText instead.
- ant0n10 6y agoIntroducing tiling manager to my workflow: [0]i3 Like tmux in terminal, i3 for every GUI app. On a dedicated screen / workspace I run apps like browser, slack etc - and having them split the space automatically is super convenient. [0] - https://i3wm.org/screenshots/ https://i3wm.org/screenshots/
- veed99 6y agoBetterSnapTool for snapping windows on your computer, been using it for years. I'm assuming every dev takes advantage of screen real estate, but if you aren't, you should.
- iloveitaly 6y agoLoved reading all of the comments here. The biggest efficiency tip I've found it blocking all distracting websites via /etc/hosts when my computer wakes. Website blockers never worked perfectly for me because of edge cases. Ex: YouTube is distracting, but sometimes I want to watch a YT video, so I would disable the blocker and then forget to enable it again. The /etc/hosts based approach with a wake script to re-add all distracting websites has worked amazingly well: http://mikebian.co/how-to-block-distracting-websites-on-your-laptop/ http://mikebian.co/how-to-block-distracting-websites-on-your...
- vcsilva 6y agoThere's this extension called Intention which, I think, handles these edges cases pretty well. It doesn't really block websites, it just pops up in the middle of the screen warning you about how much time you've spent on that particular distracting page today. But you can mark a checkbox telling it that you will be using the site productively (watching a lecture at YouTube, for instance) and assign a period of time for it. I've tried a lot of websites blockers that didn't stick but I'm really digging the approach of this one.
- caviv 6y agoHere is a real nice trick I have learn. How to give Error Code uniqueness numbers to Errors. That helps to find it later (find all) inside the code repository, know who code it and when. I use this method: https://breakpo.blogspot.com/2020/05/simple-system-to-track-errors-in-code.html https://breakpo.blogspot.com/2020/05/simple-system-to-track-... YYYYMMDD.XXXHHII This give a full uniqueness for the Error Code number among the team. XXX is a unique number each one of the developers in the team have. So an error code could be: 20190412.1001643 For programmer number 100, on the 12th of April 2019 at 4:43PM This allows me to know how old is the code, and who to blame in no time :-)
- kfogel 6y agoUse Emacs. (Really, use any fully extensible editor and take the time to learn it well. I'm told Vim fits the bill too; my personal experience just happens to be with Emacs.)
- erickthered 6y agoFor me, having OhMyZsh installed with a couple of plugins such as: git, docker, vscode has greatly improved my efficiency as the amount of typing has reduced considerably.
- JensRantil 6y agoUsing https://github.com/github/hub https://github.com/github/hub has allowed me to fire off small pull requests at a high rate. It _almost_ makes pull request creation as lightweight as commits. This leads to smaller pull requests that are easier to review and likely easier to get a quick review on for because of that. Additionally, the reviewer is IMO likelier to approve the PR, leading to me being a much more productive engineer shipping things at a higher rate.
- JensRantil 6y agoI recently learned iTerm2 (on MacOSX) allows me to select and copy text from previous command, using keyboard only. https://kevinjalbert.com/iterm2-mouseless-copy/ https://kevinjalbert.com/iterm2-mouseless-copy/ I've always been annoyed having to reach for a mouse for this.
- JensRantil 6y agoI sometimes like to leave my source code in a dirty (uncommitted) format where I've left a comment with what I intend to do next. I quickly jot this down at the end of a workday, or if I need to run to a meeting or have a short conversation with a colleague. This reduces friction for me to get started coding next time I'm back by the computer.