Showing posts with label kludge. Show all posts
Showing posts with label kludge. Show all posts

Tuesday, June 16, 2026

Add Chopsticks to Your Toolbox

Have you ever tried to retrieve a small part from deep within a chassis? You might've wished you had a long slender pair of tongs, pliers or tweezers to reach down and grab it with. You do. That tool is a pair of chopsticks.

It helps if you know how to use chopsticks, but don't worry if don't. It's easy to fashion them into a pair of "tweezer-sticks" as shown in Figure 1, below. All you need is an elastic band (aka rubberband) and a make-shift fulcrum, such as the wrapper the chopsticks came in (rolled up into a compact wad).

Tweezers made from chopsticks, a rubberband and a wad of paper

I've used this tool to...

  • get a pebble from out of a garbage disposal
  • pick spent blossoms, a Maple tree seed or a hungry beetle from potted plants when the growth is too dense to get my fingers through
  • remove part of a Pop-Tart from a toaster (Figure 2)

Half of a mangled poptart plus a sign that requests help to rescue the other half from the toaster both in front of a toaster

I have, in fact, used a pair of twigs for a crude application of this idea, such as when I picked up a dead mouse that was in a flower bed.

But if you need to remove a wedding ring from the glowing coals of a charcoal grill, be sure to soak them in water beforehand.

Friday, November 28, 2025

Edit Online Forms With Emacs

If you'd rather use your own text editor to enter content into a web form, you could use and configure a browser extension to establish a link between the form field and the editor. One such extension that Google search suggests is Browser's External Editor.1

But if you use Emacs, you're probably better off with Chrome Emacs.2

Chrome Emacs is added to a Chromium browser, but you still need to add something to Emacs. That something is the mode called atomic-chrome.

atomic-chrome can be found on Melpa; you can use the Emacs package manager to add it. My personal experience is that it's necessary to start its server manually with atomic-chrome-start-server, or add (atomic-chrome-start-server) to your init file.

I find it invaluable when commenting on a LinkedIn post, which can disappear whenever your feed is updated.

I also like it as a replacement for the Blogspot post entry field, which is easily cleared with an accidental press of Ctrl-a followed by any key press. Blogspot performs an automatic backup whenever you pause typing during new post mode. But that's a worthless feature because it will backup every mistake, including one in which you replaced all content with a key press. And it offers no way to access previous backups. I'm less likely to select all text in Emacs3, but it's not impossible. As well, I could still somehow still manage to do the Ctrl-a thing in Blogspot. Nevertheless this is a nice workaround.

But in fact I've been composing new posts outside of Blogspot for years; usually I use LibreOffice Writer because... Well, come to think of it, I don't know why I use Writer when I can use Emacs. Maybe it's because with Writer, I can insert pictures and such. (And I haven't figured out how to do that in Emacs.


1 https://chromewebstore.google.com/search/Browser's%20External%20Editor
2 https://chromewebstore.google.com/detail/chrome-emacs
3 Pressing C-x h will select all characters in an Emacs buffer.

Sunday, April 13, 2025

How to Stop a Running Urinal

Have you ever flushed a toilet or urinal and noticed that the valve refused to shut? I have.

The last time it happened the bathroom below the one I was in flooded.

When the maintenance guy came to the rescue, all he did was pop the cap off the flow control screw (indicated by the red arrow in the picture below) and use a screwdriver to turn it clockwise.

The urinal languished for weeks with an “OUT OF ORDER” sign on it. But one day I really had to pee and the other bathroom was closed for cleaning, so I used the out-of-order urinal knowing exactly why it was out of order. After peeing, I turned the screw counter-clockwise to allow a brief flow of water like a five-second flush, and then I turned it back to its clockwise state to stop the water.

Sometimes the hero is the guy with a screwdriver who knows what to screw.

 



Friday, December 02, 2022

Add Command Prompt Here to Explorer Without Mucking About With the Registry

Windows 10 computers are missing the “Open Command Prompt Here” on the shortcut menu.

You can find a registry change online that will bring it back. But that “fix” involves changing the Permissions / Ownership of that part of the registry, so I declined to try it.

Instead I came up with a solution that uses the SendTo feature to call a batch file that calls CMD with the /K switch. To use it, create a batch file in your SendTo directory called OpenCMD.cmd. Add the content below, between the “BEGIN--------” and “END--------” tokens, and save it. Then Right-Click any file, choose SendTo OpenCMD.cmd, and a command prompt will be opened in the directory in which that file resides (if the path is on a local hard drive or mapped drive).

The SendTo directory can be found under your user profile; the <UN> in the path below is your user name:

C:\Users\<UN>\AppData\Roaming\Microsoft\Windows\SendTo

You can also enter the following in the explorer address bar to navigate to SendTo: shell:SendTo

Here’s the batch file source code. Please note that most of the lines are either comments (which start with REM) or debugging statements (which start with Echo). In fact the only lines that are necessary are the ones between the labels :OpenCMD and :END.  And please don't include the “BEGIN--------” and “END--------” tokens

Begin--------

REM OpenCMD.cmd (c) 2022 Luddite Geek

REM Opens the command prompt in the directory of the given path

REM

REM 2022-11-04 LG Created.

GOTO OpenCMD

GOTO BEGIN

cmd /?

:BEGIN

@echo off

Echo %0 %1

Echo DRIVE: %~d0

Echo PATH: %~p0

Echo NAME: %~n0

Echo EXT: %~x0

Echo.

Echo Drive and Path of parameter 1: %~dp1

pause


:OpenCMD

%~d1

cd %~dp1

CMD /D /K CLS

:END

End--------

Saturday, June 15, 2019

Plunging Into Celsius

“What is that in Celsius?” asked my European coworker on the other end of an international conference call.  We had started the call by saying how cold it was in the Northeast, -21°F exactly, so I was already asking Google to convert it for me.

“About -30°C,” I replied, not missing a beat.

That’s when I asked myself, “Why do I still use the Fahrenheit temperature scale?”  I decided to switch the units on my favorite weather app and take the plunge to Celsius.

“Isn’t switching to Celsius hard for an old person like you?” you might ask.  Well, I know that water freezes at about 0°C and boils at about 100°C.  Also, I was already accustomed to using Celsius at work, so I knew that room temperature is about 25°C, at least for a warm room.  (I allow my house to stay much cooler in Winter.)

Given these three F-C equivalents, it’s easy to deduce temperatures that lie between 32°F (0°C) and 77°F (25°C) by using ratios.  For example, 12°C, a temperature that is halfway between 0°C and 25°C, is also halfway between 32°F and 77°F, and that’s 55°F.  Likewise, the “quarter points” are 6°C (44°F) and 18°C (66°F), a typical room temperature in Winter.

Below 0°C, I rely on the fact that for every one degree change in Celsius, there is a 1.8° change in Fahrenheit.  As well, for every 2°C change, we experience a 3.6°F change.  So -4°C would be about 7°F below 32°F, or 25°F.

On the upper end of the weather temperature scale, you might get a 35°C forecast, which is 10°C higher than room temperature, or 18°F above 77°F, or 95°F, which (unfortunately) my European coworkers experienced recently.

Have you guessed that I dislike warm weather?

I’m not sure I’ll bother using Celsius in cooking or baking.  First, if I change the units on the oven, my wife will be very upset.  But then I’d also have to convert all the recipes we’ve accumulated.  I don’t see any point in that.

So will you also switch the units in your weather app from Fahrenheit to Celsius?

Saturday, June 08, 2019

Pandora Music Streaming Tweak -- Change the Station Image

I've been a Pandora subscriber since 2006, and I have a couple of well-tweaked stations.  But one of my favorite stations was stuck with the ugly album art of the song that was used as the station seed.  I couldn't find a way to replace the image, and Pandora help had nothing to offer.  So here's how I changed the image:

  1. Log in to Pandora.
  2. Select the station from your collection.
  3. Click the icon to edit the station. (At this time, it looks like a pencil.)
  4. From here you can change the station Name, Description, and Thumb History, but most importantly, the "Seed" that the station evolved from, which is in the section called "Station Created From."
  5. (If there are multiple "seeds" in this section you can skip this step.)  Click "+ Add Variety" to add a new "seed" and choose a favorite song whose album cover you prefer.
  6. Delete the top-most "seed" to set the album cover from the next "seed" as the station image.
  7. You can continue this process until the "seed" that has your favorite album art occupies the top spot.
  8. At this point, you can add back the deleted "seeds" as described in step 5.  But for a mature station, you probably don't need to do this, especially if you've been diligent with the thumbs up button.

Thursday, August 09, 2018

Show Column in Outlook With Email Purge Date

If you're running Outlook in an Exchange environment, and the administrator has defined a Retention Policy, you can use the following kludge to configure Outlook to display a column of dates that the emails will be deleted on.  It's a kludge because the configuration doesn't actually retrieve the Retention Policy from Exchange -- it's up to you to find out what it is and then add it to the configuration.

Select your Inbox and then right click on the message list header and select Field Chooser.


Click the down arrow next to Frequently-used fields and scroll down to User-defined fields in folder.

Click New... and then enter PurgeOn in the Name box, and scroll down the Type box and select Formula.

Enter in the Formula box the DateAdd function that will return a date that's X number of days or months after the message Received date.  For example, if the Retention Policy is 18 months, enter this into the box: DateAdd("m",18,[Received]).  (The first parameter "m" specifies "Month" as the interval.  The number in the second parameter defines the number of intervals, or months in this case.  The third parameter represents the each message's received date.) Then click OK.



Drag the new PurgeOn field that you just created to the header in the position that you'd like the column to appear.


Close Field Chooser and resize the columns so that the dates in the new PurgeOn field display properly.


Note that the dates in the PURGEON column are 18 months later than the dates in the received column.

Unfortunately it seems that each folder (Inbox, Sent Items, etc.) requires its own User Defined Field. The [Received] field is appropriate for use in the Inbox. You might use DateAdd("m",18,[Sent]) in the Sent Items folder.

Again, this is a kludge. If an administrator changes the Retention Policy on the Exchange Server, your new field will ignore the change and blithely continue to show dates based on the old policy.  It may be possible to write a VBA procedure that would run on startup, retrieve the Retention Policy from Exchange and define the PurgeOn field programmatically.  Let me know if you get that working!


A subset of this solution appeared on Microsoft TechNet on 2018-08-09.

Thursday, August 25, 2016

Fitting Data in Excel and OpenOffice Calc

I've stopped installing Microsoft Office onto my home computers. Instead, I installed OpenOffice on my latest two computers. It does everything I need it to do. Or so I thought.

One day I decided I wanted OpenOffice Calc to perform a polynomial fit to some measurements I'd been taking. So I did what I always do in Excel: create a Scatterplot of the data, add a Trendline, choose Polynomial and its order, and then click the checkboxes to display both the equation and the R2 value on the chart. Except there was no polynomial Trendline!

According to the OO help forums, there really is no built-in polynomial trendline in Calc. But there is an extension called CorelPolyGUI that does the trick.

Unfortunately, I wasn't too thrilled with this extension. My measurements were accumulating every week. With Excel, I'd be able to add new data and watch the scatterplot update the polynomial. But CorelPolyGUI doesn't work that way. The result from CorelPolyGUI essentially is a snapshot that's disconnected from the input data. To get it to update, I found that I had to delete the result and then re-invoke the extension with new data ranges. And that was a big problem – I wasn't sure over what extent of my data I wanted to fit. Perhaps I could get a better fit if I omitted some measurements. So I needed to alter the input range a few times and compare the results.

There is another method, that if you're clever, you can program yourself. It's based on the following set of equations (for a second-degree poly fit):



To get the values of A, B and C, you simply matrix multiply the vector on the left side of the last equation with the inverted 3 x 3 matrix on the right hand side. Once you program this into your spreadsheet, you can alter the data and instantly get the polynomial function to update.

But it turns out there's an even easier way. I found it accidentally in the results from my search for how to fit a polynomial in OpenOffice. It involves using LINEST to operate on array data. The web page^3 describes using LINEST in Excel to perform non-linear curve fitting. It turns out that the OpenOffice Calc LINEST function works the same way, albeit with slightly different syntax. And the syntax is different because of how you define an array in Calc, separating the elements with semi-colons instead of commas.

In retrospect, I see now the same solution in the OO help forums. The user Villeroy attached a spreadsheet with an example that uses LINEST. But instead of raising the range of independent values to {1;2}, he added the X2 column and referenced it in LINEST. Same thing, really, but perhaps a bit less elegant.

Sunday, July 06, 2014

Creative Door Repair

The back door of our home never quite opened and closed smoothly. It was necessary to lift the doorknob while closing it in order to prevent the bottom from scraping the threshold.

Very recently the upper hinge pulled completely away from the door frame.  My wife and daughter couldn't finesse the door closed any more.  I re-tightened the screws, but the holes for the screws had widened, so the screw threads no longer had enough wood to bite into.  The hinge wouldn't stay secure for long.

My first impulse was to replace the screws with longer ones of the same diameter.  But not finding any in my collection, I realized I would have to visit the hardware store.

I really enjoy going to the hardware store.  Not the big, nation-wide chain stores like Home Depot or Lowes, though.  I prefer the small, neighborhood shops that seem to carry the odd-ball bits of fixture parts that were used in our neighborhood over fifty years ago when our homes were built.  Our stores are usually staffed by a retired handyman or engineer.  Or maybe the guy just likes hanging out there, giving out free advice without even getting paid for it.

Alas I was too busy to make the trip.  So I busied my mind, thinking of alternative repair options while carrying out the many tedious chores I had to deal with.

My next idea was to plug the screw holes with wooden dowels.  In fact I had many ¼ inch dowel pins left over from an old wood-working project.  I could use those.  But because they were much larger than the screws and the holes, I'd have to drill out the holes first before inserting the pins.  And then I'd have to drill pilot holes into the dowels themselves so that I could get the screws into the pins.  And I'd probably have to use carpenter's glue to hold the dowel pin in place before drilling.

If I had much smaller dowels, I could simply stick them into the holes and jam the screws in.  This would certainly be enough to keep the screws fastened tightly.  But because I didn't have the smaller dowels, I'd have to go to the hardware anyway.

Finally the solution came to me.  I had all the dowels I needed right outside my door!  All I had to do was stroll through the wooded area of our yard to find the right size twig.  Which I did.  It took about 30 seconds.

One oak twig about four inches long was enough to fill all four screw holes.  I broke the twig into four pieces and inserted them into the holes and tightened the screws.

And now the door opens and closes easily, without needing to be lifted, and without scraping the bottom.

This to me is what makes home repair an art form.

Saturday, February 01, 2014

Disable Outlook's Junk Email Filters

After upgrading to Outlook 2010 over a year ago, it became apparent that its junk email filter continued to work even after we disabled it.

It took so long for me to notice because I use Popfile to categorize the email I download from my ISP's POP3 server.  Popfile would catch the most obvious spam before the Outlook junk email would process it.

But occasionally a message that Popfile marked as valid would end up in the Deleted Items folder.  Outlook's occasional false positive would make me wonder what was going on, but it happened so rarely that it was easier just to check for these false positives than to research the issue.  Besides, the corporate bulk mail filter running on the Exchange serve would stash things into the Junk Email folder, and I needed to check for false positives from that filter.

But then there was an incident that triggered an intra-departmental1 outcry about the issue.  It was the day that several messages from our Content Management System got flagged by Junk Email and then deleted, causing folks not to notice updates on a few project files.

We all dutifully set Outlook's Junk Email filter to Disabled.  But I continued to see valid messages from my ISP placed into Deleted Items.  Recently I obtained a few spare moments2 and quickly found a solution to the issue.  It was my favorite Outlook/Exchange website that I landed on.  Here's the link:

http://www.slipstick.com/outlook/how-to-disable-outlooks-junk-email-filter/

The text says to change the value in a registry key, but in my case, the key didn't exist, so I created it, first.

Only time will tell whether this works.  I will know for sure only if it doesn't.  I suppose I can find an old message that triggered a false positive and send it to myself, but the header of that message would be different from the original header.


1 The emphasis is on the part of the word that contains "mental".

2 A good way to obtain spare moments is to schedule a meeting right after another meeting, so that if the other meeting runs late, the participants will be milling around outside the meeting room.  After a while, you get a sense of which meetings will run the longest based on the topic and especially on whether certain coworkers will be in them.  Some meetings can run so late that the folks who mill around will disperse and take an additional five minutes to reassemble, assuming they haven't gone off to lunch or embarked on an early vacation or retirement.

Saturday, March 23, 2013

Android Tablet -- a GPS Device Poser

I concede that I was exaggerating a bit when I referred to my new tablet as "a GPS device, RF scanner, MP3 player, eReader, camera, digital voice recorder, hand held gaming device, clock, portable translator...." It's the "GPS device" boast that's questionable.

Well it depends on how you define GPS Device. If it's a merely a device that displays a map and shows you where you are on that map using the Global Positioning System network of satellites, then, yes, the tablet is such a device.

But if you expect the device to allow you to enter a destination and provide real-time instruction on how to get there, along with an reasonably accurate estimate of when you can expect to reach your destination, then the tablet is merely a GPS Device Poser.

On my Nexus 7, directions are provided by Google Maps, which does a very good job of routing. But something called Navigator assumes the role of proving the actual turn-by-turn directions and arrival time.

Navigator works fine as long as you follow the initial route and as long as traffic conditions do not change during the trip. For example, if you start out at home while the tablet has an Internet connection, Google Maps will check the traffic conditions and provide both a route and an estimate of arrival time that's fairly accurate. You have the option of downloading a rectangular map that encompasses the route, too, so you can use Navigator offline.

But during the trip when the Internet connection is missing, Navigator cannot adapt to a traffic problem. Well, that's to be expected, and it's no reason to find fault in the app. The real problem is that Navigator does not recalculate the trip when you deviate from the route.

On my 20-minute commute to work, I can take one of four different major routes, two of which are on state highways, both of which are littered by red traffic lights. So I like to take the back roads, which are scenic and have fewer stops, albeit longer. It's reasonable for Navigator to prefer the state highways. But when I ignore the chosen route, Navigator refuses to recalculate. Instead it provides directions to return me to the point where I went off course. So the closer I get to work via the back road, the longer the trip time. I've seen the 20-minute commute spike up to 1 hour and 45 minutes. And when I finally do come to an intersection with the highway, it will actually direct me in the opposite direction, presumably to reach a way point on it's own route.

Well there are other GPS apps, even free ones, that can provide turn-by-turn directions. Right now I'm evaluating Navfree USA: Free. It does a better job of dealing with my willful disregard of the planned route. But it's a little rough. For example, it fails to give you the first instruction at the beginning of the trip. Also you need to have an Internet connection in order to get directions to an address because it queries Google maps.  (That's not an issue if you've saved your destination as a Favorite.) I'm assuming that the same is true for Points of Interest.  The biggest problem with it, though, is that it will crash after 30 to 40 minutes and need to be restarted.

So alas, I'm not about to give up my Garmin Nuvi just yet.  It would provide real time traffic updates in some areas and serve as a backup to the tablet in the event that I needed to follow a detour.


Edited on 2013-04-13 to add two sentences to the Navfree paragraph.

Tuesday, July 17, 2012

Putting Water Adhesion and Cohesion to Work

I lost the grommet that allows me to attach a drain hose to my air conditioner.  So I decided to see whether water's properties of adhesion and cohesion would come to my rescue.

I suspended the drain hose below the air condition drain opening.  Then I placed one end of a wet, rolled up paper towel in the air conditioner, touching the drain pan.  I placed the other end into the hose.  The set up is shown below.

Normally, you'd just let the water drip out onto the ground.  But this A/C is installed between a kitchen and a carpeted enclosed porch, and we wanted to keep the carpet dry.

The rig works like a charm.  No spillage.  All the condensate ends up in the bottle, which I then empty into the washing machine or the garden.  In fact it works better than if I'd used a grommet to connect the hose.  With the grommet, the water level had to rise high enough to breach the rim of the grommet.  In fact, I used to put a piece of cotton string in the grommet to help lift the water up over the grommet ledge and into the hose.  Otherwise, the water would leak out all four corners of the pan.

There is some rust forming around the edge of that unfinished knockout.  I'll need to paint that at the end of the season if I don't want the rust to spread.