Run, Developer, Run!

Hello, my name is Dmitry, I'm software developer and this is my blog. My passions are minimalism and continuous improvement1. Most interesting things I've done are rugged Raspberry Pi laptop (and other gadgets), collection of useful scripts for Linux users and Fish shell config.

I write about awesome or useful technical stuff I encounter. Also I'll share lots of useful tips. Picked name 'Developer Run' since I'll write notes on the run. I also enjoy running and always pick bad names in general. For updates, subscribe to RSS, Twitter or Pinterest.

This is static blog generated by bunch of Regexes hosted on Cloudflare pages for free, because I have strong belief that thats how blogs should function.

Militarish Pi: Status update 1

I'm building Raspberry Pi Laptop called Militarish Pi, remember? You are probably not interested in the many reasons1 that stopped me from working on the project, but you might be interested in the status update.

So here are photos from the current prototype. As build is in progress it looks ugly. Still publishing an update as soon as I could because I'm aware of multiple people doing their own great builds based on that. Hope you might find something useful:

Full wiring Thumbnail

Full wiring

Full wiring

Read More →

A couple of Laptop Tips

(It is a recent model, I'm just a fan of Windows 95 aesthetic) Thumbnail

(It is a recent model, I'm just a fan of Windows 95 aesthetic)

(It is a recent model, I'm just a fan of Windows 95 aesthetic)
Comfortable travel work kit Thumbnail

Comfortable travel work kit

Comfortable travel work kit
Kit packed Thumbnail

Kit packed

Kit packed

1. If you travel a lot tip

If you work on a laptop a lot, this ingenious vertical stand will save you from the Royal Pain in The Neck™! Because it is much more portable to travel with a light stand and keyboard, than an additional monitor, you know. Answering your potential concern - yes the whole thing is very stable, because of the low center of mass. alexdoit (author) made multiple sizes for different laptops.

Speaking about portable keyboards I can't feel more hackery than with B.O.W Folding Keyboard. There are tons of foldable keyboards, but that is the only one that in addition to Bluetooth is recognized as a regular USB keyboard1! Of course not as convenient as a full keyboard, but the best in cases when portability is preferable. The mouse is generic "Arc Foldable Mouse" btw.

Also, did you know that GaN revolution happened, and you can charge your laptop with tiny (compared with stock power brick) charger (for example Anker 735), simultaniosly with 2 other gadgets?

2. If you do not travel a lot tip

When a laptop is connected to power all the time, you might notice that battery health still degrades over time. This is a pity, especially if you don't use the battery at all. This happens because when the laptop is plugged in, the battery charge cycles all the time to get 100% charge if decide to unplug it2. The irony is chasing that 100%, overall battery capacity might degrade much worse than 100%. For some models, this could be solved by installing tlp and changing /etc/tlp.conf:

START_CHARGE_THRESH_BAT0="60"
STOP_CHARGE_THRESH_BAT0="80"
RESTORE_THRESHOLDS_ON_BAT="1"

This configuration will not touch the battery until it discharges over 80%, therefore prolonging battery life.

How to label microSD cards?

Labeling Micro SD Cards Thumbnail

Labeling Micro SD Cards

Labeling Micro SD Cards

Let me give y'all another simple everyday advice! I've almost stopped using USB Drives because microSD cards are much more portable and convenient, especially if you have the right holder and right card reader. The only inconvenience is to distinguish them once you have many.

Recently I've discovered a perfect way to label microSD cards:

  1. Using white permanent marker paint one side
    • Best results are if you let it dry for 30 seconds then repeat 2-3 times
  2. Using extra fine (0.5mm) black permanent marker label them
  3. If you ever need to change the label either:
    • Repaint the new layer with a white marker (step 1)
    • Remove all paint using alcohol pads

This approach was proven much better than correction liquid because it holds and does not crumble over time.

Some lesser known items good to have in your travel/emergency bag

Gadgets & Repair Thumbnail

Gadgets & Repair

Gadgets & Repair
Health & Hygiene Thumbnail

Health & Hygiene

Health & Hygiene
Two layer travel organizer Thumbnail

Two layer travel organizer

Two layer travel organizer

I travel a lot. Like a lot lot. I’ve prepared an achievement list to define “a lot”:

  • ✔ Visit more than 10 countries (I’m currently at 15)
  • ✔ Spend at least 1/3 time abroad (in a years perspective)
  • ✔ Fly without ticket back (round trip is for rookies)
  • ✔ Buy plane tickets in the morning, fly in the afternoon
  • ✔ Get weeks planned trip extended to a month
  • ✔ Compelled to stay overnight because of a missed flight

Because of that, I need to have my travel-survival bag always ready and with me. As unfortunate recent events taught more people to be more prepared for unforeseen travel, let me share some lesser known items that are good to always have in your bag.

What I'm trying to say, is items I about to recommend are carefully picked, tested and proven to be useful in a different life sutuations.

Read More →

Simple way to get rid of code snippet spam (StackOverflow clones) in Google

StackOverflow clones Thumbnail

StackOverflow clones

StackOverflow clones

As if internet is not already full of bad advice about software development, there are always people who will find a way to make situation worse.

Solving programming problems, might be very time consuming, and to waste your time even more, there are many spam websites, that just rehash Stack Overflow/GitHub issues.

Seems that Google can't (or won't) do anything about it. Situation got so bad, that for some queries you get only spam results, Google is unable to find original.

You can easily found a dozen spam sites by searching any StackOverflow question in qoutes.

To save your time, you can use one of browser extensions that block certain sites from search results. But as I've mentioned previously, extensions are probably bad for you. Plus you need to configure and maintain the list.

As the simplest alternative, I suggest a block list (filter list). You probably already have a uBlock installed (or any other blocker compatible with AdBlock format). Or Vivaldi has built-in AdBlocker (Settings→Privacy→Tracker and ad blocking→Manage Sources->➕).

So, to get rid of search spam, subscribe to this list.

UPD exactly at the same time I wrote this post, another filter list was featured on Hacker News. So I'm not the only one who is bothered by this problem. Since it gained more attention, please use it.

UPD2 Neither Google or filter list are able to keep up with the problem. New spam sites keep popping up too quickly. Seems the only way to get rid of it is to use DuckDuckGo.


Tip: make JavaScript errors more apparent, then fix them

JavaScript Error Notifier Thumbnail

JavaScript Error Notifier

JavaScript Error Notifier

A long time ago, if a JavaScript error happened in the browser, a half-screen popup was shown to the user, asking if he wants to continue scripts execution on such a low-quality page. And user had the right to view the page without JavaScript at all, as most websites were functional without it. Tell this to modern frontend developers with their ubiquitous ‘undefined’ Is Not an Object.

Since then, JavaScript errors were hidden far away into developers console, because almost all modern websites are piling with it. The last time errors were visible somewhere in the interface was on FireBug button.

Of course, you are a better developer and can make things better in your own product. Technically you can always test your website with developers console open. But tiny icon in top-left corner is easy to miss.

A more convinient solution would be to install an extension that shows errors and notifications in a clearly apparent place. JavaScript Errors Notifier does exactly that.

If you are like me, and can not install extensions because of security reasons I can suggest a tiny, stripped-down alternative. The codebase is bare minimum and the extension runs only on localhost, to satisfy strict security requirements. The extension is intended to be installed from local disk.

Extension handles both handled and unhandled errors - so will work both with your regular pages and React.

Source on Github


Browser extensions are probably bad for you

Extensions in Firefox were awesome... Thumbnail

Extensions in Firefox were awesome...

Extensions in Firefox were awesome...

Want to share my controversial opinion about browser extensions, and how it changed over the years.

Just found my post written in old blog 2010 mentioning 22 extensions I was using daily in Firefox. Oh good old times, when extensions were so powerful!

When I've started this blog in 2016, I've recommended being careful about extensions, and review code before installing it.

Today I am strongly against installing extensions at all, because of the following reasons:

  1. It is too easy for an extension to get access to all your digital life, banking, and stuff. And then do bad stuff with it.
  2. Even if you trust the extension author, there is a chance that code will have a nasty vulnerability.
  3. Even if the extension author is good at programming, there is a chance that their account will be forgotten, abandoned, stolen, or hacked, and baddies will publish vulnerable code as an update.

Such stories happen too often, even with popular extensions.

Read More →

USB Volume Control using Adafruit Rotary Trinkey

USB Volume Control Thumbnail

USB Volume Control

USB Volume Control
Adafruit Rotary Trinkey Thumbnail

Adafruit Rotary Trinkey

Adafruit Rotary Trinkey

Adafruit Rotary Trinkey is a cool, 30-minute DIY build project. And having a nice tactile USB volume control knob on your table is very convenient.

Also, I dig Circuit Python development approach: the device is recognized as a USB drive. To program it, you just edit code.py file using any OS/editor. Changes applied immediately on save. Outputs on serial console. No development environment setup is needed! Nice, easy, and very refreshing.

  • Just enough circuitry for volume control
  • Computer sees device as HID. Simulates pressing keyboard media keys so compatible with any OS
    • Also can simulate mouse, for example for a scroll wheel
  • Play/pause on click
  • Extra touch button (for example for next track)
  • Fits in Airport Tick Tac box
  • Multi color RGB LED which you can use for current volume indicator or system notifications
  • Put in laptops USB port, USB hub, or using an extension cable to get gadget in convinient location
  • Source Code using (Circuit) Python is short
  • Requires tiny bit of soldering

Overall I had a lot of fun with this little gadget. Totally recommend!

Cable management tip: make them coiled

coiled cable diy Thumbnail

coiled cable diy

coiled cable diy

Every wired device comes with a 1-2m cable. Like why do I need a 2m cable for the mouse? It is not like pc located on a different floor. Laptop's USB port is 10cm from the mouse, and all modern displays have USB hubs1. And cable hanks are ugly. Usually, people address ugliness by replacing cables with Bluetooth/RF/Wi-Fi, but meh. Coil whine, interference with other devices, random disconnects, dead battery in the moment you need it the most... So much unnecessary problems. I'm old, and I like my computer peripherals to have wires2 of reasonable length. Previously I've even resoldered some USB cables to make them shorter.

Recently I found an ultimate solution from The Mechanical Keyboards community - DIY coiling cables. It is not necessary for detachable cable aesthetics, the method works on all peripherals, even with a cable attached. Each coil shortens the wire section π times! And by leaving part of the cable uncoiled you can get the exact length you need. And it looks neat. Requirements: a hairdryer, stick, and 10 minutes. Genius! Check the tutorial on YouTube.

Comments are on HACKADAY


CyberBadge activated!

Sometimes I look at the ordinary things and just see Raspberry Pi inside. Of course, in real life, there is no Pi inside, so I need to build it in there myself. Recently I found a minimalist wallet (or badge) and transformed it into an eInk CyberBadge!

With eInk display Thumbnail

With eInk display

With eInk display
Original wallet/badge Thumbnail

Original wallet/badge

Original wallet/badge

To me, the wallet looked like a perfect sci-fi themed frame for an eInk display. Resulting in some kind of smart badge.

Read More →
1 2 3 4 5 6 7 Next→

Contact

Follow

Me on Twitter and Github

We have RSS!

© 20xx

Hosted on Cloudflare Pages, which is awesome!