Browsing all posts tagged useful-tool

ripgrep

Apr 17, 2024

For years now, I've been using ack to search for stuff via the command line (it's so much better than grep!). One of its drawbacks, however, is its reliance on having an installed Perl interpreter. In fact, ack is the only reason I have Perl installed these days. Also, like seemingly so many other projects in recent times, ack development appears to have stopped altogether. Several months ago, I stumbled upon ripgrep, a Rust-powered tool that is orders of magnitude faster than ack and friends.

I haven't been using it for long, but it looks like a worthy replacement for my previous tool of choice. For posterity, here's how I have my global configuration set up; the default colors leave a bit to be desired, especially when using a dark terminal theme, and sorting is disabled by default:

# Change the default colors
--colors=path:fg:cyan
--colors=path:style:bold
--colors=line:fg:green
--colors=line:style:bold
--colors=match:none
--colors=match:fg:0x00,0x00,0x00
--colors=match:style:bold
--colors=match:bg:yellow

# Sort by default (slows things down a bit, but awfully handy)
--sort=path

I placed the file (named .ripgreprc) in my home directory, and then referenced it by setting up an environment variable (RIPGREP_CONFIG_PATH). Lots of stuff appears to be moving to Rust for performance, and I'm thoroughly impressed with how fast this searching tool is. Be sure to check it out.

Linting With Ruff

Sep 8, 2023

I enjoy using linting frameworks for the code I write, primarily employing flake8 for my Python code, which is about 90% of what I write these days. Recently, however, I saw news on Ruff, a new linting framework written in Rust that is orders of magnitude faster. It's so fast that the entire CPython repository, which contains over 1200 files, can be linted from scratch in only 0.29 seconds. Several testimonial quotes in Ruff's README attest to this blazing speed:

Ruff is so fast that sometimes I add an intentional bug in the code just to confirm it's actually running and checking the code. - Sebastián Ramírez, creator of FastAPI

Just switched my first project to Ruff. Only one downside so far: it's so fast I couldn't believe it was working till I intentionally introduced some errors. - Timothy Crosley, creator of isort

Another benefit on top of its speed is the near-parity it brings with Flake8, which is nice. There are still a number of formatting rules from the pycodestyle package that haven't been implemented, which is an annoyance, but there's an active issue tracking the progress on that front.

To top it all off, Ruff includes rules from dozens of Flake8 plugins, most of which I've never run. Enabling all of them in my projects has been humbling, to say the least, but I'm learning a ton of improved practices from doing so. I don't always agree with some of the rules, and have disabled a number of rule sets that annoy me, but it's been an interesting learning process.

In the coming days I'll be writing about a few of the sloppy practices that this framework has pointed out in my code, so stay tuned.

Magnet Sweeper

Apr 11, 2023

We recently had our roof replaced, which resulted in a ton of debris in the yard. One of our primary concerns with this was the number of loose nails and screws, which pose a hazard to both our car tires and our feet. Scanning through Home Depot's website, I found this magnet sweeper, which only set me back $12.

The second photo above shows just how many nails, screws, and other debris I was able to pick up with this thing. Wow! There are a few drawbacks to this tool. First, the handle is a little short for my taste. Second, the magnets could stand to be stronger, but they did a decent job. And third, a wider magnet head would have been nice. But for only $12, I'm willing to sacrifice some of the niceties of other, pricier tools. If you ever find yourself in need of something like this, I recommend this model, despite its shortcomings. I can see this tool being useful in other situations (i.e. when I drop a screw or nut in the garage and it rolls out of reach).

Sudoku Solver

Aug 4, 2022

I've really gotten into sudoku recently. I'm not sure what prompted this, but I've been playing through the New York Times' puzzles, which offer an easy, medium, and hard variation daily. My favorite feature of sudoku is that you don't have to guess randomly to make progress. As a logic puzzle, all of the information you need to solve it is there on the board in front of you. This makes parsing through that logic a fun challenge.

With practice, I've improved my chances of solving these puzzles. I can now solve both the easy and medium puzzles without any assistance or hints. The hard puzzles, however, have been a higher hurdle to clear. I get stuck on the hard puzzles pretty often, getting to a point where I run out of strategies to employ.

While reading up on various advanced strategies, I happened upon the Sudoku Solver by Andrew Stuart. This web application allows you to set up the game board, along with what you know so far, and then allow it to walk through the solution step by step. It's this latter feature that is so amazing to me. You can watch, step by step, which strategies get employed to break through whatever wall you're currently facing. I've used it a few times now to help me learn new strategies (naked pairs and hidden pairs being the newest ones I've learned). I'm still no expert, but this helpful little tool is helping me learn the ins and outs of how these games are typically solved.

Merlin Bird ID

Jan 24, 2021

One of the tools I've been using in my backyard wildlife identification efforts is the Merlin Bird ID app (I'm using the Android version). This app is aptly named, because the ID capabilities are like some sort of dark magic!

There are a fair number of useful features in this app, none more so than the photograph identification tool. You simply upload a photo of the bird you want to identify, select the date and location where you spotted the bird, and the app gives you a list of possible birds. Each entry has information on the bird itself, and a number of excellent photos to compare your candidate against. In most of the trial cases I've given the app, only two or three candidates are usually returned, a testament to just how smart the "brains" of this thing are (all of its recommendations for my photos have been spot on so far).

Another feature that I haven't used much yet is the bird-call feature. While examining details on a bird, you can listen to a number of its calls, which makes identification by ear a lot easier. I cannot recommend this app highly enough!

NewsBlur

Jan 9, 2019

I consume nearly all of my news and web reading through RSS feeds, and have done so for many years. Back before July 2013, I used Google Reader, before Google shut it down for good (the bums). Shortly after Google Reader was closed, I switched to NewsBlur, which closely resembles the Google Reader of yore. I cannot imagine surfing the web without it.

The service can be used for free (up to a maximum of 64 feeds, and only 5 stories at a time in the "river of news" mode), but I pay a yearly fee ($36) to have an unlimited number of feeds and stories.

One of the best features of NewsBlur is being able to "train" the reader to know what you like and don't like from various sites. I've trained several of my gaming feeds to exclude anything about Fortnite, because that's a game I have no interest in. As a result, stories on that topic are never shown to me; I'm in control of what I read! Similarly, I've also trained a few feeds to flag articles from authors I like. Those articles are highlighted, and I can view just those highlighted ones if I so choose with the "Focus" mode.

There are lots of other features to recommend about NewsBlur: searching for stories across all of my feeds, sharing stories with friends on the service, a pretty nice Android app, and lots more. If you haven't given NewsBlur a try, be sure to.

I have always liked a good flashlight. As a kid, I even asked for a 5-cell D Maglite for Christmas (which Santa brought!). This past December, I picked up the ThruNite Archer 2A flashlight from Amazon, based on a review from The Wirecutter. At $30 it's not cheap, but boy is this thing great.

It uses two AA batteries and puts out an incredible amount of light. There are four brightness settings, ranging from dim (great for when your eyes are adjusted to the dark) to blindingly bright. I also like the fact that it's compact; you could easily store this in a bag, car console, or junk drawer without taking up much space.

Since I bought it, I've put it to use in a number of ways (looking for dropped items in the car, using it on walks at night, and hunting under furniture for lost cat toys). I highly recommend this spectacular flashlight.

Brown Sugar Saver

Mar 25, 2015
Brown Sugar Saver

I've been meaning to post about this for a while now, because this product is as close to black magic as I've ever seen, even though I know the theory of how it works. My wife and I picked up a Brown Sugar Saver from Sur La Table while at our local mall a few weeks ago. We had a container of brown sugar that was literally as hard as a rock. Various metal implements were unable to pry the concrete-like material from its container, so we decided we'd give this a try.

The Brown Sugar Saver is simply a piece of terracotta pottery; nothing more. You soak the small medallion in a dish of water for 15 minutes, remove it, blot it dry with a towel, and place it directly in the container with your brown sugar. We did this, and in the morning found that our brown sugar was just as soft and pliable as it would be had you just opened a fresh bag of the stuff! Needless to say, we were really surprised. It only cost $4, and has solved an annoying problem that I've lived with for far too long. I highly recommend this thing (you can buy similar ones in a number of places).

Useful Tool: ImgBurn

Jul 20, 2010

I needed a quick and easy way to burn an ISO image here at work, so I took a look around and found ImgBurn. A Windows-only app, it's small, easy to set up, and took no time at all to get working. The only annoyance was that the installer included an option to install an "Ask" toolbar in IE (along with a few other advertising options). Thankfully, you can disable them all at setup time.

I cannot recommend Process Explorer highly enough. This application from SysInternals is essentially a replacement for the built-in Windows task manager. One small feature that turns out to be pretty useful is that each process is shown in the list with its associated icon. This makes tracking down a specific application really easy (especially those troublesome processes that don't terminate cleanly; Java, I'm looking at you). The other tremendously useful feature I enjoy is having a description and company name along with each process. Many processes have cryptic, 8-character names, and having the associated information to help identify them is a real time saver.

Ever been bitten by the blue screen of death on a Windows box? Who hasn't? It's often hard to see just what caused the blue screen to occur, and the machine usually reboots before you can properly note down the information being provided. Thankfully, BlueScreenView is a helpful little utility that will provide information on your past crashes. It scans the mini-dumps that are generated when your system blue screens, and reports the problem. I've used this a time or two to track down troublesome drivers (usually the cause of these nefarious crashes). Be sure to add this helpful, free tool to your collection.

Useful Tool: Autoruns

Oct 19, 2009

This month's useful tool is another from the good folks at Sysinternals. Autoruns is a tool for Windows that shows you all the processes and services that are scheduled to start when the system boots up. It's amazing how many auto-start lists reside in the Windows registry! My laptop has hundreds of entries, ranging from system level entries to third party drivers and software updaters.

What makes this tool outstanding, however, is the ability to easily disable certain processes from the startup sequence. Next to each entry is a checkbox; when it's checked, the item will be started as usual. Uncheck the box and the process will be omitted from startup. I've found it incredible handy to disable some of the more annoying programs that start up (iTunes helpers and Adobe Acrobat, I'm looking at you).

Useful Tool: KeePass

Sep 18, 2009

For this month's useful tool recommendation, I'll be focusing on KeePass, an open-source password manager. Hopefully, everyone has already heard of this application and uses it on a daily basis. KeePass makes it easy for you to manage all of your various passwords in one location, and provides a host of security features for keeping those passwords safe. I personally use the older 1.x line of this tool, but a newer 2.x line has recently been released (and is no longer in beta, so it should be stable and safe to use).

KeePass has a number of features that make it instantly attractive. First, and foremost, it's an incredibly secure application. Your passwords are stored using either the AES or Twofish encryption standards, both of which are rock solid. The 2.x line of KeePass also features some in-memory protection of the various fields, helping to thwart keyloggers and the like.

Another great feature is the password generator, which is incredibly useful for creating very strong passwords. I've used this generator in a number of ways: to create WPA keys for routers, for TrueCrypt file containers, FTP accounts, etc. The password generator offers a host of options on how to format the password you desire, so you can easily fit into any password rule set.

Perhaps the most useful all-around feature is portability. KeePass can be run from a USB key, making it easy to carry all of your passwords around with you. This has gotten me out of some sticky situations at work where I quickly needed a password, and didn't know it off the top of my head.

If you've got a ton of passwords to remember (and who doesn't?), I heartily recommend KeePass. It's a tool no one should be without.

I'm going to start a new occasional series of articles covering helpful software tools that I find. To start out this series, I'm going to focus today on FileMon from Sysinternals (now owned by Microsoft). Several of the tools I'll be profiling in the coming weeks are from SysInternals, so I recommend checking them out if you're unfamiliar with them.

FileMon allows you to see file system activity on your computer in real time. It helped me to track down the slow startup bug in Firefox, and it has also helped me track down other issues (particularly during various application startup periods). Wondering why your disk is randomly thrashing about for no apparent reason? FileMon will tell you why! After firing up this tool for the first time, I was simply amazed at how often the file system got touched in one way or another.

It should be noted that FileMon is now a legacy tool. A newer tool, by the name of Process Monitor has replaced FileMon. Although I haven't yet used it, Process Monitor looks very promising. Not only does it allow you to view file system activity, but you can also see Windows registry activity, as well as process, thread, and DLL activity, all in real time. These are very handy tools that every software developer or power computer user should know about. I'll highlight more like this in the coming weeks.

When I moved into my house last year, I bought an LG front-load washing machine. Having never owned or operated a front-load washer, I didn't quite know what to expect. For those who don't already know, front-load washing machines typically spin clothes at a very high rate of speed (mine tops out at 1050 RPM), removing a large amount of excess water in the process. This high speed spin process usually results in substantial vibration. The problem is compounded when the washer is located in an upstairs room (as mine is), and not on a solid, ground level floor (I've read that concrete floors are ideal).

Not knowing about this at the time, I was really surprised to see that my entire house vibrated when I washed a load of laundry. The shaking and noise got bad enough that I decided to look into solutions to the problem. I read some about vibration reducing pads online, and picked up a set at a local home improvement store (for about $30, if I remember correctly). After installing the pads with the help of my dad, I noted an improvement in the amount of vibration in the floor. However, the vibration was still bad enough to cause some sympathetic vibrations in my dryer (a major source of noise, oddly enough). Also, these pads were flat on top, so the washer tended to 'walk' off of them when a load was particularly unbalanced. Like before, the problem became bad enough to look for another solution.

I found another pair of pads online that had good reviews, and picked up a set (here's a link: Good Vibrations Washing Machine Pads). These pads are round, not square like the others I had bought, and have a recessed area for the foot of the washing machine.

Wow! Not only does the washer no longer walk off of the pads (thanks to that recessed area), but the vibration in the floor has been reduced by what seems like an order of magnitude! My dryer no longer suffers from "sympathetic-vibration-syndrome," and the entire wash cycle is noticeably quieter. A set of four pads are $36.95 as of this writing (plus shipping). The sellers accept PayPal, so if you've got some money stored up (like I did, thanks to a recent donation to Born Geek), you can pick up a set pretty easily.

If you've got a front-load washer and have issues with large vibrations, I recommend the "Good Vibrations" pads. They work remarkably well.