Live data from Hacker News

Ask HN: What are your favorite developer-efficiency tips?

news.ycombinator.com

511–520 of 532 posts

Re: Ask HN: What are your favorite developer-efficiency tips?

#511
post #210
post #63

Earlier quoted context omitted.

Another advantage is that you are less likely to make errors while using the automated way.

It also creates documentation/repeatable processes. Also, learning, though that can be hard to justify.

The automation might, in some cases BECOME the documentation.

Re: Ask HN: What are your favorite developer-efficiency tips?

#512
post #63

Earlier quoted context omitted.

Another advantage is that you are less likely to make errors while using the automated way.

I disagree. If your automation isn't well thought out, edge cases might just screw every target and you might have hard time rolling it back.

In my experience, that is the unusual case, not the ordinary case.

Further, when that would happen, it is typically obvious that some bigger change has occurred which required the automated procedure to be updated and tested.

Re: Ask HN: What are your favorite developer-efficiency tips?

#513

Earlier quoted context omitted.

One thing that helped me was screen recording my editor session and then re-watching it on the highest playback speed. You start to get a feel for the arc of laying out the code, what refactoring operations look like. Most code is selection, map, map, filter, reduce, re-join, etc. Watching your actions get played back, allows you to re-think those thoughts but in the third person. Mirrors help, video helps, we are no…

> Mirrors help, video helps, we are not ourselves, once you realize that, optimization becomes much easier. It's funny, in two of the areas I've worked in (tailoring and illustration) I was taught techniques that are analogues to this. With illustration, if you draw from a reference, one of the ways to improve accuracy is to turn the reference image upside down, which basically stops your brain seeing it as the thing…

How did you come across these techniques? Do you know of any body of research that covers this?

With my kid, we practice drawing and eating with the non-dominant hand or try and draw something from a different orientation.

Re: Ask HN: What are your favorite developer-efficiency tips?

#514
post #59

The 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 use this too, it's great! My usecase is that I often have queries for debugging purposes for API's that I need to send, so in my repos I keep a requests.http file for quick-access. I also put them in repos for projects I publish (like boilerplate/demo API's) along with a screenshot and a note + link to the extension in the README because you have a working spec for API requests, and so do if/when I ever revisit it.…

(hi, in reference to an old thread I think you got nbomb'd on your trip)

Re: Ask HN: What are your favorite developer-efficiency tips?

#515
post #332

Earlier quoted context omitted.

I also considered this in the past but sometimes, I slip into procrastination mode unintentionally and might check my bank account (or pornhub) once in a while. So thinking my video is uploaded to somebody else's computer gives me the shivers.

It seems the point of doing this is it stops you procrastinating, because you're pretending to be a hot shot twitch streamer. If it were a live stream, you wouldn't start watching porn, you'd stay focused. Basically the productivity tip is to pretend you're already productive.

Fair point. But sometimes the pretending part fades away when I get to the "flow". When that happens, I usually forget OBS was even running way after the task was done. If it were Twitch stream, I imagine somebody from the chat window would remind me to put my d* away

Re: Ask HN: What are your favorite developer-efficiency tips?

#516

Earlier quoted context omitted.

> Mirrors help, video helps, we are not ourselves, once you realize that, optimization becomes much easier. It's funny, in two of the areas I've worked in (tailoring and illustration) I was taught techniques that are analogues to this. With illustration, if you draw from a reference, one of the ways to improve accuracy is to turn the reference image upside down, which basically stops your brain seeing it as the thing…

How did you come across these techniques? Do you know of any body of research that covers this? With my kid, we practice drawing and eating with the non-dominant hand or try and draw something from a different orientation.

I was trained (and worked, for a short time) in tailoring/fashion, and was also trained and worked (for a longer time) as a designer and illustrator. I was just taught to do this as a matter of course (by tutors and by technicians). It's just finding ways to trick your brain into actually thinking about things instead of relying on (habitually ingrained) automatic movements which tend to cause you to miss obvious errors.

Re illustration, this is quite common when explaining how to draw from a reference picture. Not at any detailed length as far as I can ever remember, literally just "turn the photograph upside down when you're drawing from it" (doesn't really need much explanation, that just how it works). As far as introductory books go I can remember "Drawing on the Right Side of the Brain" goes through this.

Re tailoring, the issue is that you tend to fuck up the balance of things in 3D when you're sitting staring at specific bits of it, even when you step back you only tend to see what you want if you've been at it for a while. You need to be able to see it from a. different angles at the same time, and b. not just directly through your eyes

The non-dominant hand will work for what you're doing, it's a good thing to do I think (in a way I wish I'd been taught to practise using my right more when I was a child). The reference image technique is specifically to increase accuracy though, so slightly different aim

Re: Ask HN: What are your favorite developer-efficiency tips?

#517
post #33

Earlier quoted context omitted.

I 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.

as 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.

I actually got used to it pretty quickly. Adapting was not hard.

It's a little like how learning more instruments doesn't make you worse at the ones you know.

Re: Ask HN: What are your favorite developer-efficiency tips?

#518
post #456
post #330

Earlier quoted context omitted.

I 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.…

You may find prm useful for this purpose, it lets you create projects with start/stop scripts that get executed when you do `prm start project` or `prm stop project`. I use it to quickly switch to the right directories, open editors, services, etc. needed by a project. 1. https://github.com/EivindArvesen/prm

`direnv` will automatically activate and deactivate a project-specific shell env for you when you change directories.

I like to put scripts for the project in a `bin/` directory then use direnv to put the project's `bin/` on PATH.

I've leaned more and more towards mirroring the *nix directory structure in my projects. `etc/` and `bin/` are two top-level folders in a lot of my projects at work.

Re: Ask HN: What are your favorite developer-efficiency tips?

#519
Loved 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...

Re: Ask HN: What are your favorite developer-efficiency tips?

#520
Here 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-...

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 :-)

Post reply on HN