viernes, 18 de octubre de 2019

Updated interview questions

My new questions for interviews:

  • Tell me about 3 (tech?) talks you think are worth mentioning (you like them very much or you dislike them)
  • 3 books (technical or not)
  • Show me something in your Github, or github log (timeline matters)
  • Would you recommend me to read any code from a library? 
  • do you have any comments on the following code? Imagine it comes in a PR you are reviewing.

miércoles, 25 de septiembre de 2019

Dark firefox even in "text" urls

I've been using dark reader for some time and I'm quite happy with it. Not a huge memory hog (just sometimes) and works pretty decently everywhere.

But I just discovered, where it tells how to darken also new tabs and urls with text mimetype

You just have to open about:config and set both browser.display.background_color and browser.display.foreground_color  to something that makes sense.

lunes, 9 de septiembre de 2019

set -e in bash subshell

Did you ever realize that even when you use `set -e` in a bash script, anything that happens inside a  $(subshell like that) won't be executed under the `set -e` umbrella?

Here are the 2 solutions we found. None feels very solid... but hey, it's bash, what did you expect?

- . Apparently traps work in this dynamic scope and they get access to the nesting level of the bash shell the code is called from. Kind of not unwinding the stack?

- .  running the subshell as a background task and immediately waiting for it, like a 1process forkjoin.  Nuts.

lunes, 2 de septiembre de 2019

Migrating from vim (proficent) to emacs

In HN's thread about 26.3 being released (Congrats!), there's this guy  explaining that being already quite confortable with vim, it's too much of a commitment to move to emacs.

I remember the frustration when coming to emacs from an advanced vimmer POV: no "yyp"? no ":%s/foo/bar"? imap? But here's what I answered him:

As this is not an overnight conversion and you are quite proficent with vim already, my advice is to:
- Get used to type "emacs file.txt" instead of "vim file.txt" in your console.
- Have a function in emacs that opens the current file in vim for those moments where you just want your trusted environment. Writing it by yourself is a good focused learning experience.
This way you'll decide (and balance) how much you want to learn every day, and little by little you'll find yourself using that function less and less.

And I think this goes very well with my other "bootstrap your emacs lisp learning".

It's the same approach to most of my development (and life) efforts.  It's a function of how bad do you need it, how fast do you want it, the compound interest of starting early, and how much it slows you down (or blocks you for doing other things).

miércoles, 21 de agosto de 2019

Taming zoom with ratpoison

If you use a manual tiling window manager (ratpoison), chances are zoom is misbehaving when you want to minimize it.

The minimized window steals the focus and you can't do anything while the window is minimized.

If the window is maximized you have to manually corner it somewhere (at least wasting 25% of your screen).

But! I found a way to use zoom while letting you work while you don't see the screen.

It's a tiny shellscript that pinpoints the Zoom full window, and then relegates it to a 1 pixel window on the top of the screen.  Very simple, but it works wonders for me.

miércoles, 7 de agosto de 2019

the simplest bookmark manager ever

So this is not even a bookmark manager with proper tags or anything.

It's just a stupid combination of shell tricks that compose into a quick memo browser.

I guess I'll keep reinventing program launchers and fuzzy finders till I die (first ratfinder version being from 2006)

jueves, 4 de julio de 2019

postgres indexes

I'm progressively more convinced PostgreSQL is my next "emacs", as in "a tool I'm addicted to and I'm determined to find out everything about it".

I'm starting with some of the internals, and some deep descriptions about its various types of indexes.  Those pages provided me a bunch of hours of reading and knowledge on postgres internals.

Also, this week I read somewhere that postgres was first written in Lisp! I guess it shows when you run EXPLAIN on a query. I just confirmed it for a fact. :)