Learn 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 [--onto ] 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 h…
Ask HN: What are your favorite developer-efficiency tips?
301–310 of 532 posts
Re: Ask HN: What are your favorite developer-efficiency tips?
#302Use 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…
Yeah, I tried that. Didn't work for me. I'm too clever for my own tricks.
You can start by doing something you actually LIKE doing - no tricks.
Re: Ask HN: What are your favorite developer-efficiency tips?
#303Probably an unpopular opinion but... Write your own text editor. I've been working on my own ( 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…
This should be more generalized to "write your own tools that suit your workflow and use them, iterating on them as usual."
I had a small collection of useful utilities become somewhat popular on github, even though I mostly published them so I had somewhere central to install from.
These days I've been reworking them into a single binary so that I can deploy them even more easily:
That, coupled with my dotfiles (mostly a literate emacs config written in markdown), makes me pretty productive when moving to new systems.
Re: Ask HN: What are your favorite developer-efficiency tips?
#304https://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?
Re: Ask HN: What are your favorite developer-efficiency tips?
#305Learn 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…
> 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.
Re: Ask HN: What are your favorite developer-efficiency tips?
#306I switch between commonly used apps with a single shortcut (e.g. ⌥E opens VSCode, ⌥D opens Chrome). Details 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/
Re: Ask HN: What are your favorite developer-efficiency tips?
#307KEEP 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…
I do the same, using the Zettelkasten method. I've found it very useful. I write many small notes as markdown files and link them together, storing them in a git repository. I wrote a bit about Zettelkästen (and the practices I follow), in case others find it useful: https://github.com/alefore/weblog/blob/master/zettelkasten.m...
Re: Ask HN: What are your favorite developer-efficiency tips?
#308The 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 dramaticall…
Used 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.
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.
Re: Ask HN: What are your favorite developer-efficiency tips?
#309Re: Ask HN: What are your favorite developer-efficiency tips?
#310KEEP 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…
I 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?
# 09/05/2020
Today I mostly ate cake
## Discoveries
## Meetings
## Projects
- Worked on project 1
- Fixed issue
- TODO: Bugfix #1234
## Misc
So a fixed set of headers for each day "Projects", "Meetings", "Discoveries", "Misc", and free-form text. Sometimes I copy/paste commands and output.Searching is pretty much just grep.
More detail here https://blog.steve.fi/keeping_a_simple_markdown_work_log__vi...