Title photo
frugal technology, simple living and guerrilla large-appliance repair
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.

Sun, 24 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).

Sun, 10 Jul 2016

Older versions of Citrix Receiver are available

Older versions of Citrix Receiver, aka ICAClient, are available. I'm thinking my particular apps like 13.0 better than 13.3.

Thu, 07 Jul 2016

Fix for Ubuntu 16.04 with Qualcomm Atheros AR9485 WiFi adapter and Time Warner modem

Update: This issue went away in a normal install. I presume that the added firmware during installation took care of the WiFi issues.

Original entry begins here:

I was just saying how compatible my now-3-year-old HP Pavilion g6-2210us laptop is with Linux at its advanced age. Everything in Fedora works with no tweaking, no modifications.

So I wanted to try Ubuntu 16.04 (with Unity even). First I used Unetbootin to put the ISO on a USB key. That didn't seem to work, though I had enough trouble getting the display to work that the problem could very well lie elsewhere.

So I used dd to put the ISO on the USB:

sudo dd if=/path/to/ISO of=/dev/sdb bs=8M

That worked. I booted into Ubuntu 16.04. Then I still had a blank screen. I tried to switch to a virtual terminal with ctrl-alt-F2, and eventually hit all the ctrl-alt-number combinations, after which ctrl-alt-F7 got me the graphical desktop.

That very well could have worked with my Unetbootin-created bootable USB stick.

Meanwhile, once I had Ubuntu running, I could connect to my older Netgear router running WEP but not to my newer Time Warner modem/router (I can't remember the brand or model) with WPA.

My laptop uses the Qualcomm Atheros AR9485 WiFi module, and that was where I looked first for ideas.

I found something pretty quickly.

In a terminal, enter this line:

 echo "options asus_nb_wmi wapf=1" | sudo tee /etc/modprobe.d/asus.conf

After that, I was able to connect to my WPA-enabled router, and all was well.

I didn't think I needed to resort to this kind of filthy hack in 2016 and on a laptop that has been in the wild for three full years.

But I did.

I'm not sure what I think of Ubuntu 16.04 just yet. I'll need to do a Citrix test. Running the big Citrix-enabled application that I use for my day job is pretty good in Xfce but horrible in GNOME Shell in Fedora. If it is in any way better in Unity, that will carry a lot of weight.

Thu, 16 Jun 2016

OMG, the @railstutorial by @mhartl

OMG, the @railstutorial by @mhartl https://www.railstutorial.org/book

The /now page movement

The /now page movement -- it's what you're doing now http://sivers.org/nowff and http://nownownow.com

The Bastards Book of Ruby

While it calls itself out as old and out of date, I really like The Bastards Book of Ruby.

I recognize that Ruby is no longer the new hotness, but it's still so useful and, dare I say, user-friendly. For those reasons, I'd love to see updated versions of just about every book out there.

I'm using the old (as the hills) "Learning Ruby" by Michael Fitzgerald (2007, O'Reilly), The Pickaxe book ("Programming Ruby") from Ruby version 1.9.2 (2010/11, Pragmatic Programmers, though do I realize there is a 2013 edition).

The beginners books seem to be the oldest. At my level, everything seems to be working, so I will maybe complain a little less.

I do have a Rails book, "Rails Crash Course," by Anthony Lewis, that's much newer, but I'm not there quite yet. And there's always Michael Hartl's "The Ruby on Rails Tutorial", of which the more I see, the more I like.

Using Ruby to delete blocks of text across multiple lines

I tend to learn things in programming when I have a problem to solve. This is just such a case.

I was working with a huge XML file, and I needed to trim elements out of it that begin with <generic tag> and end with </generic tag>, and include a random amount of text and other tags, across multiple lines, in between.

At first I tried using the Nokogiri gem, but it just wasn't happening. I was working on my Election Results script, and ... the election -- they hold it on a certain date, you know.

I would have to brute-force it. Like I always do.

My whole idea this cycle was to dump my giant sed hack from elections past and use mostly (if not all) Ruby to parse the XML I get from the state of California and provide the JSON output my fellow dev needed for the front end. (I also have a ton of fixed-width ASCII from Los Angeles County to deal with, as well as scraped HTML from San Bernardino County, but those are other tales for other times.)

With the state data, I had the XML-to-JSON conversion covered with Ruby's Crack gem. But I just couldn't pare down the XML to make the JSON a manageable size.

Read the rest of this post