Lurker News
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)

Comments (522) 158 threads

Earlier comments
chadlavi14 replies#
KEEP 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#
+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
southphillyman#
This. 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.
ra72 replies#
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?
chadlavi#
It's mostly for sorting and context. I just do a straight up search (in my case in vscode) across all notes when I want to find notes about something particular.

Really the most important thing to do is just start taking notes. You can reorganize later if you need to.

stevekemp#
I just have a simple header for each day:

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

chrsstrm3 replies#
The first thing I do for every project is set up a development blog. Hugo + a nice free theme + Gitlab Pages + Netlify CMS. Everything is contained in Gitlab and I can keep the Pages site private and only accessible by members of the repo. It is less of a daily log and more exploring "issues" - basically anything I took time to research and figure out. I'm very adamant about recording details like dates, version numbers, context, code snippets, commands, and URLs of resources used. It all comes down to asking myself, if I see this issue again in the future, what information do I need to easily solve it without opening 40 browser tabs? At first it takes some effort to circle back and write the post after you solved the issue, but after a while I found myself writing the post concurrent with writing my code. The Netlify CMS isn't the most beautiful UI but being able to just write markdown in a browser window eliminates having to keep a git repo locally. Organizing with categories and tags makes referencing published posts easy and if you want to get fancy you can integrate Algolia for search. Honestly, having a project dev blog has saved me so much time since I don't need to keep every detail in my head anymore. Being able to go back and read about why certain decisions were made or how I overcame complicated problems is absolutely invaluable. And of course having this rich documentation while on-boarding new team members or passing the project off to someone else makes everything easier. Setting up a dev blog is 100% worth the minimal effort it takes.
kanyethegreat1 reply#
I love this. I have a grouping of pages in Notion for tech notes. But I really like the idea of scoping it to a project. I like that you don't need a local repo. I'll have to experiment with this. Have you automated anything for it? And do you have any patterns you use (eg. organizing the information, etc). Thanks!
chrsstrm#
There's really not much to automate. The Gitlab CI/CD config file to build Hugo and publish to Pages is always the same so I just re-use it as boilerplate. Likewise the Netlify config is usually the same as well, so once you've learned that syntax and structure it's not much work to put in place. I always like to peruse the latest Hugo free themes before I start and I usually end up using a new theme for each site anyway. The only real patterns in terms of organization is making sure I categorize and tag each post in a detailed manner. Most issues are related to a certain piece of the project or tech used, so when you know for example that your issue is related to the database then you can look at all posts categorized or tagged in a similar way to see if you already addressed the issue. I do find the most helpful step I took was making sure the post had a nice meaningful title with the proper keywords - that helps keep you from reading multiple posts until you find the one you need. Hugo and Gitlab's CI/CD are really great but the open source Netlify CMS is the key to making this setup so easy and remote only.
rhlsthrm#
I tried to do this for my last project but ended up spending too much time making the blog and didn't get around to properly starting the project! Maybe instead of rolling my own site from scratch I'll use Hugo.
shakezula#
I've been doing this for years, and even though basically no one reads my blog, it's nice to have a place where I put "polished" thoughts about my projects.
PascLeRasc#
I do this too, and I use Sublime to generate HTML from Markdown, so at work I have hosted guides like commonly-used SQL queries for one of our projects or documentation on how I updated our OpenSUSE and built a specific version of mariaDB we needed. It's been pretty great.
whoisjuan2 replies#
A similar idea I practice. After I solve a complex problem I usually leave a big comment at the top of the main file, explaining how I arrived at that solution, the caveats, how it works, and how it interacts with other files and dependencies.

If I need to, I also use Monodraw to produce ASCII character graphs and add them to the comment to explain concepts.
It helps to cement the solution in your brain and it's a system of record on how it was accomplished in case you forget.
I do this only for personal projects though. I don't think co-workers would appreciate an essay with exhibits at the top of a file, lol.

mvanbaak#
Instead of putting it as comment in the file, put it all (including graphs etc) as commit message when you commit the feature/fix
owl57#
> I don't think co-workers would appreciate an essay with exhibits at the top of a file, lol.

Why? I don't really have an experience of being a co-worker, but I have always appreciated such essays in free software.

afc3 replies#
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...

koolba1 reply#
That’s amazing!

So the linkages for the visualizations are derived from the notes themselves?

afc#
Aww, thank you!

Yeah, that entire article is generated from the set of notes. There's one note for each subsection (down to the finest level of granularity) and it just extracts the article directly based on the links. I described this in a set of notes that end up here: https://github.com/alefore/weblog/blob/master/zettelkasten.m...
The images (e.g., distribution of back links per file, semilattice view, etc.) are also just generated programmatically from the repository of notes.
The code that extract it is here: https://github.com/alefore/edge/blob/master/rc/editor_comman... (function zke, which receives the output path, the path to the initial note, and a string listing space separated paths of notes to ignore).
Here's another example of an article generated from my notes (this is way longer and is very incomplete, and probably contains a bunch of mistakes, but you may find it interesting as an example): https://github.com/alefore/weblog/blob/master/software-corre...

masklinn#
Seems very similar to the structure of Notational Velocity, though I don’t remember whether NV provides easy cross linking between notes.
elliotec#
I love this. I've been wanting something just like this. Thank you!
kanyethegreat#
I use a combination of WorkFlowy and Notion for note-taking. WorkFlowy serves as my daily quick jotting medium. Notion I spend more time crafting and organizing, so that knowledge is more discoverable. Do you ever find yourself going through these ISO-dated notes? I would image re-finding something is difficult?
nunez#
Yes. I wish I did this years ago. I’ve been doing it since January but there are so many things on my resume (and elsewhere!) that I’ve since forgotten and it’s annoying.
motor_wolf#
I use org-mode in emacs for this! I usually keep notes on whatever task I am working on, and more general programming notes which I file into tagged headlines for easy reference later.
lloeki#
Seconded. I finally skipped endlessly looking for the perfect note system and just created this stupid 10ish snippet of shell:

https://github.com/lloeki/dotfiles/blob/master/shell/notes

   note foo # creates a note in vim
   note # lists notes in vim’s netrw
Since note file names are time stamped, they’re sorted and I don’t have to care about dupe names. It defaults to creating as .md but renaming the file afterwards doesn’t matter.

It’s so dead simple that I use it all the time instead of fantasising about the perfect note system.

Continue this thread — 2 more replies

city417 replies#
The 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.

kortex4 replies#
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.

redis_mlc#
FYI: 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;

Parazitull1 reply#
TL,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.

mjul#
For the good parts, I would add the effortless type declarations to overcome “Primitive Obsession”, the immensely useful pattern matching to ensure you cover all edge cases and what I really found to be the killer feature: Type Providers to enable typed data wrangling in just a few lines.
mekster2 replies#
It seems type hinting is coming to Ruby 3, which im looking forward to.
ProZsolt#
I like Ruby for prototyping and quick throwaway scrips. I can write code really fast in it. Still my favorite language. But reading unfamiliar code or cooperating with others is hard. This is a good step forward in that direction.
ric2b2 replies#
Not in the source code itself, it will be in separate files according to Matt. If you want it in the source code you can use Sorbet today.

Continue this thread — 2 replies

vulcan011 reply#
It's not exactly what you're looking for, but have you checked out mypy[1]? It is basically static typing for python.

[1] https://pypi.org/project/mypy/

kortex#
That's what I meant with "unless it has type hints" but thanks for the link :)

Blue ocean python I pretty much start with hints and interface definitions, the logic follows. Helps me through writing the logic when I have autocompletion of methods.

olalonde2 replies#
Same realization here, but from JavaScript to Rust. I'm still a bit more productive in JavaScript but I now regard it as technical debt to be rewritten in TypeScript/Rust as soon as possible.
bgorman#
If you like rust you may love ReasonML
syldor#
What kind of systems are you developping with rust? Especially if you also do javascript? Genuinely curious as I also want to start working with some lower level languages.

Continue this thread — 5 more replies

tanin8 replies#
I 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

Continue this thread — 8 replies

afc13 replies#
Probably 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 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).

Continue this thread — 13 replies

Load more comments