Outils pour utilisateurs

Outils du site


issue149:c_c

Ceci est une ancienne révision du document !


I’ve always been a firm believer in efficiency in whatever it is you do. It doesn’t matter to me if I’ll only do the task two or three times, if putting a bit more effort in the first time will save me time and energy later, I’ll do it. Efficiency can also mean knowing whether or not optimization is useful (sometimes optimizing a task takes longer than doing the task normally a hundred times in a row). As such, I wanted to take this month to talk about a few time-saving tips I find useful. Hopefully you will too!

Note Taking I often take notes on things I’ve done (bugs I fixed, an idea I had, or just a log of some task). This started back in high school, and I have carried it forward through everything since then. Due to the fact that my handwritten notes are always of questionable utility (even I have trouble reading my handwriting when I write quickly), the notes are typically electronic. For a time, I’d write it in software like LibreOffice, or Word, and eventually Google Docs. While that software is intended for writing documents, I don’t believe it’s an optimal method of writing fast notes. My notes are almost always focused on the content, and not the formatting. Whenever I write these kinds of things in Google Docs, I find myself taking time to try to format things as I write to make the content clearer. I’ve gotten pretty good at using the shortcuts to format as I go, but it’s still effort that is essentially taken away from my main goal. Naturally, I’ve also considered going back and doing the formatting after the fact. While this is a noble goal, I find it was a task I also never actually went back to do.

In university I started using LaTeX for a lot of things (including writing a nearly word-for-word transcript in Linear Algebra). Here I would actually go back and reformat things. I even shared the project on GitHub amongst my classmates so we could crowdsource corrections and additions. My problem? I was fast enough to keep up with my professor, but the actual syntax was sometimes awkward to type and I’d have to spend time fixing typos in the syntax before I could actually view the PDF. Once I started dealing with static site generators, and web development in general, I discovered things like Markdown and reStructuredText that I could use to generate PDFs or HTML quickly and easily. These soon became my go-to formatting languages for writing notes or documentation. I’ve even included some tips for quickly generating PDF from markdown in C&C in the past. Very recently, however, I’ve also heard a lot about Eleventy (a static site generator), and I’ve now started to mix the two (Markdown and Eleventy) to create an automatically refreshing HTML documentation I can style before or after (using HTML and CSS).

Setting it up was pretty easy - I created an empty node project, installed @11ty/eleventy, and wrote some markdown. If you don’t care about formatting, you’re done. If you do want to format things, I then installed Tailwind and set up a basic CSS file (with some styles for the generated HTML from the markdown files, where I couldn’t directly add classes). Sure, it’s not a full-fledged site - I didn’t add a menu. However, it’s certainly a good jumping off point, especially if you integrate links into the body text as you go. I can easily place images, link to other sites or media, and adjust/tweak the appearance of the site completely separately from the content. If you need to then generate PDFs from the site, you could theoretically set up a print stylesheet and a single page template to generate the PDF via the print dialog of your browser.

The best part is the basic structure of an eleventy site is simply - the markdown files (and perhaps some configuration/css), and an _includes folder that contains your template. Next time you need to start taking notes? Just copy the folder (or set up some sort of automated generator). If you’re interested in a full-on tutorial on the topic, let me know via the email address at the end of this article and I will cover it next.

Updates & Quick Access to PC I’m sure everyone has had this before - you’re sitting somewhere away from your main computer and you realize you need to check something (notes, PDF receipt, available updates, etc). This happens to me quite often, and so I’ve always set up some sort of SSH access to my boxes (using keyfiles instead of passwords). On Linux machines, I then always set up tmux and ranger. Tmux allows me to create a terminal session that won’t close when the connection is closed (useful for when updates are taking a while or the connection is spotty). Ranger, on the other hand, is a file manager. It runs in the console and allows me to easily browse my files. It also offers a (again, console-based) preview system where it will render a file without you having to open it. If you’re looking for a text file, you can read it right there, and it even does a good job of rendering PDFs as text in the preview. Naturally, this doesn’t work for every possible file, but it has been useful in about 80% of the cases where I would otherwise have to interrupt everything and return physically to my computer. It also doesn’t work completely remotely without more configuration (port forwarding, dynamic DNS, etc), and is also a question of security.

Easy Hosting Tying in to my note-taking point above - I have a lot of notes on things for our internal network (such as notes on common phone issues, or configuration settings for the NAS backup). I could run them off a Raspberry Pi or my NUC all the time, sure, but not everyone has access to a computer that’s on 24/7. What everyone should do is backup their data frequently - and a NAS makes that quite simple. So if you already have a NAS lying about for backing up data, most NAS software will offer you the ability to throw up a basic HTTP server. Combine that with something like Eleventy and Git, and you can have an always available home wiki that you can access from any device in the house. This sort of documentation has saved me a lot of looking and repeat googling for some common issues around the house.

Lastly, your keyboard… Now, I’m not going to be a mechanical keyboard snob and say everyone should get themselves an ergonomic mechanical keyboard. I will, however, say that everyone should have a keyboard they find comfortable. It doesn’t matter if it’s a cheap no frills membrane keyboard, or some fancy gaming keyboard with RGB everywhere. If it’s a keyboard that’s uncomfortable for you in your setup (perhaps it’s too small, or sits at an awkward angle from your mouse, etc), then you’re doing yourself a disservice. It will slow down your typing, frustrate you, and may even cause health issues down the line. It’s well worth it to take some time to check out a few different keyboards or give some thought on what it is you need from your keyboard before purchasing.

Do you need a numpad? If not, you can probably reduce elbow movement towards your mouse by having a keyboard without one so it sits closer to the mouse. Do you use the function keys a lot? Try to find a keyboard with a smaller gap between the number row and the function keys (or a keyboard with an fn button that turns the number keys into function buttons). Perhaps you tend to move your keyboard around a lot as you shift at your desk - instead of fighting with a cable, you may want to find a bluetooth keyboard. You can do something similar with your mouse too - if you don’t like to move the mouse all the time, you can learn keyboard shortcuts or buy a trackball to reduce the movement. Perhaps you have only a touchpad on your laptop - investing in even a cheap mouse might help make you more comfortable.

Conclusion I find efficiency to be a cumulative state - if you’re optimizing the last 10% of a task (i.e. customizing your app) but the other 90% is as inefficient as you can imagine, you won’t notice much of an improvement. On the other hand, if you can optimize the first few percent (such as your keyboard and mouse), you’ll notice an improvement everywhere. Have you got some time saving tips to share? Email them to me at lswest34+fcm@gmail.com and I’ll collect the best ones together. They do not need to be Linux (or even computer-based). As always, I hope this article was useful for some people. If you have a request for a specific article, please let me know at the email address above.

issue149/c_c.1570343946.txt.gz · Dernière modification : 2019/10/06 08:39 de d52fr