Title photo
frugal technology, simple living and guerrilla large-appliance repair

Regular blog here, 'microblog' there

Many of my traditional blog post live on this site, but a great majority of my social-style posts can be found on my much-busier microbloging site at updates.passthejoe.net. It's busier because my BlogPoster "microblogging" script generates short, Twitter-style posts from the Linux or Windows (or anywhere you can run Ruby with too many Gems) command line, uploads them to the web server and send them out on my Twitter and Mastodon feeds.

I used to post to this blog via scripts and Unix/Linux utilities (curl and Unison) that helped me mirror the files locally and on the server. Since this site recently moved hosts, none of that is set up. I'm just using SFTP and SSH to write posts and manage the site.

Disqus comments are not live just yet because I'm not sure about what I'm going to do for the domain on this site. I'll probably restore the old domain at first just to have some continuity, but for now I like using the "free" domain from this site's new host, NearlyFreeSpeech.net.

Mon, 12 Sep 2016

Using Dir.glob to delete files with a pattern in Ruby

I have a bunch of files in a directory, and I want to delete all that begin their filename with the letters X16 (e.g. X16data.xml)

I used Dir.glob to select the files and iterated over what comes up in the pattern, using File.delete to get rid of what I don't want (Thanks, Stack Overflow):

Dir.glob("X16*") do |file|
 File.delete(file)
end

You can put any kind of regex in here, and it'll probably work. That's the theory anyway.

Fri, 09 Sep 2016

The rubyzip gem for creating and opening archives

On my current project, I am trying to use using rubyzip to unzip an archive.

So far it's not working, and I'll probably shell out to Bash and Linux/Unix's unzip to get it done.

I figured it out. Now I have to manage the unzipped files (deleting the unused, renaming the good, then deleting the good at the beginning of the run) and account for NOT running the program if there is no file on the other end.

Thu, 25 Aug 2016

Do I really need your app? Do I want it? Do I have space for it?

Can you call a business a "web site" if they try to force you to use an app to access their content on a mobile device?

I guess everything these days is a "social network," "e-commerce platform," "content provider," or some other phrase or three that escape me at this particular moment.

There are two social networks -- one is an employment-based network, the other a dining-reviews network -- that won't let me see content at various times without downloading their mobile application.

Bet you can guess who I'm talking about.

The first is LinkedIn. I don't remember having much trouble accessing LinkedIn on my phone or tablet, but I get these emails from them that say, "So and So has an update." I click for the update, and it sends me to a come-on for the LinkedIn app.

I'm not getting that app. So I don't get the content.

The other one -- the dining-review app -- is worse.

That's Yelp, in case you didn't figure it out.

Every time you go to their site on a phone or tablet, the top of the page is a massive plea to download and run their app.

And then the web site wastes no time in telling you that you'll only get a few dining reviews from real people in the browser. If you want more, you'll have to get the app.

I don't want the app. So I lose out on your content -- and any ad impressions you might be offering to monetize my experience.

Why don't I want these two apps?

1) Not everybody has a 128GB iPhone. My el-cheapo Android phone is limping along with 8GB of storage, and that is double my previous phone's 4GB. Even though I have a 32GB SD card on board, there's only so much that can go on it in terms of apps (thanks for that, Android). Some apps won't go on the SD card, and most store data on the phone's memory regardless of where they are installed. So I have to be very selective in what I do have on the phone.

2) I don't need an app for a site or service I use infrequently. It's just clutter, and I'd rather use the browser. Even if I had a 64GB phone, I don't want a dozen pages of apps to swipe through.

3) Your app is not that good. Most apps don't do more than mimic a browser-delivered web experience. Maybe some users feel "safer" using an app rather than a web site. Those days are gone. Web apps (really just fancy web sites with lots of Javascript) do so much client-side that they really are apps that users don't have to download and keep on their phones.

The craziest one these days is Amazon.

Amazon will pay you $5 just to use their app.

Why?

Because, for Android anyway, their app is not in the Google Play store, and you have to download it and allow your phone to run non-Play Store apps.

Most users find this daunting and don't want to do it. But maybe $5 will change their minds.

I just discovered that the Amazon is preloaded on my Android phone, so maybe if I launch it I'll get the $5? Probably not.

But do I even need this app? It will alert me if crap I want to buy is available, on sale, or who knows what.

I use Amazon enough that maybe the app is worth it.

But most of the apps out there for things that can be taken care of with a web site? No, I don't want your app. I don't have room on the phone for it.

I sort of understand that you feel you need an app. That it's part of your business plan. But at least give me a choice. If you push to hard on making me download and run your app just to sample your service, chances are I never will. And you lose a potential customer. Or hundreds (or thousands) of them.

Sun, 21 Aug 2016

Keep Fedora's dnf from upgrading certain packages

Since the OpenShot video editor is pretty much broken in version 2.0.x, and I'm using a Fedora 22 package of version 1.4.3 so I can keep editing video while I contemplate learning KDEnlive.

I installed the OpenShot 1.4.3 package, and in my next run of the yumex-dnf package manager, it cheerfully offered to upgrade to 2.0.7.

No.

So how do you keep yumex-dnf and regular ol' dnf from bugging you about this every time?

Read the rest of this post

ReplacementLaptopKeys.com comes through again

Just like on the laptop before this one, if you bang on it and take it enough places, you end up with a busted key.

Where do you get a new one?

HP won't sell you one key.

Enter third-party individual-key sellers like ReplacementLaptopKeys.com, which attempt -- usually very well -- to send you any individual key to replace a broken one.

Read the rest of this post

Thu, 18 Aug 2016

Do broken apps in Fedora mean I should turn to Ubuntu?

I hadn't edited a video in a long time, and when I opened the OpenShot video editor in Fedora 24 yesterday, I found a completely updated user interface in version 2.0.7 that made the app harder to use. I could barely see the tracks at the bottom, and there appeared to be no way to make that window big enough to remedy the problem.

I could no longer change the "properties" of an item and modify the time it occupied on the video.

It wasn't recognizing linefeeds on my Inkscape-generated titles.

And then it crashed all the time.

In short, a decent, workhorse app has become totally useless.

I then tried to edit some audio. Again, I haven't done it in awhile. Audacity is very stable, so how could there be a problem?

There was. The play/pause buttons kept disappearing, as did the icons for switching modes. I was able to do a quick audio edit, but it was neither easy nor pleasant.

I think the OpenShot issues are systematic to the project and its one-man-band development situation. (I know -- I really should figure out KDEnlive and be done with it.)

Audacity's problem lies elsewhere in the system, as this Fedora bug report details.

I have a test Ubuntu 16.04 system on another drive. I loaded it up and installed Audacity (same version, 2.1.2). It worked perfectly.

I installed OpenShot, which RPM Fusion distributes for Fedora users in version 2.0.7). Ubuntu provides version 1.4.3. Which is old. But it works.

So I'm wondering if I should just make the leap and dump Fedora 24 for Ubuntu 16.04. It would do wonders for my video- and audio-editing productivity, for one thing.

And I thought that Ubuntu's HUD (heads-up display) was roughly equal to what GNOME 3 offers in its "hot corner" search. Nope. In GNOME, you can search for applications but not files. Ubuntu's HUD allows you to find applications and files. This is no deal-breaker because you can search for files in the Nautilus/Files file manager in both Ubuntu's Unity and any system running GNOME. Still, the HUD (love or hate what it CAN search for) is better than anything else out there for Linux.

So will I do it? I hate replacing systems and moving my files over. But I'm thinking.

Wed, 27 Jul 2016

Free textbook on mathematics for computer science (before you study algorithms)

Cormen's "Introduction to Algorithms" (aka CLRS) looks hard. People who understand the material say the math involved is trivial, but I'm not anywhere near there.

So how do you get comfortable with the math before tackling CLRS itself?

A writer on Quora suggests reading a free textbook from an MIT open course called "Mathematics for Computer Science."

Others suggest that the appendix in CLRS serves as a guide to the mathematics needed to understand the rest of the book.

Another Quora writer recommends algorithm books by Sedgewick and Dasgupta (the latter available for free) as alternatives to CLRS.

Sat, 23 Jul 2016

One-man Colorado newspaper still uses hot type

The Saguache Crescent is the last newspaper in America to use "hot" metal type produced with a Linotype machine. Take a look at the pictures from the Baltimore Sun web site. Amazing.

Fri, 22 Jul 2016

I'm doing the Fedora 23 to 24 upgrade

I'm finally getting to the Fedora 23-to-24 upgrade on my laptop, which has been running Fedora on the same installation since the F18 release. (That means the upgrade has never failed.)

The upgrade process is getting smoother and smoother. This time the upgrade uses dnf instead of fedup.

I think that there will be a graphical upgrade for Fedora Workstation (i.e. GNOME) systems in this current release. But since I'm in Xfce right now, it's still a command-line process.

I used this guide from the Fedora Magazine site, and all is going great so far. Dnf has 4,033 items to download and 7,870 tasks to perform in the course of the upgrade, so it'll take a while to finish.

Update: As expected, the upgrade is taking a long time. That's normal. I managed to start early, and I have a whole day ahead of me. Plus I have use of another computer, so I'm able to continue working while the laptop is unavailable.

No 'n': When I finally resolve the issue, I'll recount my tale of the broken 'n' key on the HP Pavilion g6-2210us. With a barely working 'n' key, it's a great time to do an upgrade since typing words with the letter 'n' is not my favorite activity (though at home I have an external keyboard to get around the problem).

After the upgrade: I don't use GNOME very often, but I can confirm that the default Catarell font does display better (as promised). A better-looking display definitely makes me want to use GNOME more.

GNOME Shell itself seems more responsive. But again, I don't use it enough to know for sure.

I just found out that I'll soon be able to leave Citrix Receiver behind, and that will mean that I can use just about any desktop environment. For the past year and then some, only Xfce has played well with the Citrix apps that I use, which stretch across multiple screens and pose problems when it comes to switching from one screen to another.

Mon, 11 Jul 2016

Get a free programming/tech book every weekday from Packt Publishing

How could I have missed this until now? Technology book publisher Packt Publishing offers a different free e-book every weekday.

I found out through Reddit, where Packt has its own subreddit in which it announces a new title every Monday through Friday.

The catch? You have to register with Packt to claim the e-books. It's just like registering for O'Reilly, except Packt gives out a ton of free books.

And each book is only available for a day. So you have to check the subreddit or Packt's Free Learning page every day.

And they're not the "sponsored" books that other publishers often hand out.

Instead, these Packt books are "real" tech books. They recently offered "Learning JavaScript Data Structures and Algorithms - Second Edition," by Loiane Groner, which I was happy to pay for a few days prior. (At least it was on sale).

But I've gotten a few books that really interest me over the past week. And you can manage them through your online account, downloading the formats you need.

Just like with O'Reilly (and with the Pragmatic bookshelf, Manning Publications and Leanpub), ordering through their websites instead of Amazon gets you a lot more flexibility (PDFs, epub, mobi) and often a better price. For me, it's worth it to get both the PDF and the Kindle version of the books, even if the indie publisher is charging a few bucks more than Amazon.

Some publishers, including PragProg and Manning, only sell their print books through Amazon. To get the ebooks, you have to go through them (and I am happy to do so).