2018 Books of the Year

  • Data Visualization with Python and Javascript: Scrape, Clean, Explore & Transform Your Data by Kyran Dale
  • Web Scraping with Python: Collecting More Data from the Modern Web 2nd Edition by Ryan E. Mitchell
    2nd edition bigger and even better than the first and the first one was really freaking awesome!
  • LPIC-1 Linux Professional Institute Certification Study Guide: Exam 101-400 and Exam 102-400 by Christine Bresnahan
    How I wish I’d read this book before many other Linux books!
  • Interactive Data Visualization for the Web: An Introduction to Designing with D3
    2nd Edition by Scott Murray
    The more good D3 resources I find, the more mixed my feelings are about this book but it is so packed with awesome stuff I feel morally obligated to keep it on the list.
  • Data Driven Documents: D3.JS Tips and Tricks v4.x by Malcolm Maclean
    Perhaps the best part about this book is he wrote it as he learned so he is sure to keep the learning-person/student in mind as he explains things and offers insights (such as potential mistakes and confusing concepts).
  • Building Progressive Web Apps: Bringing the Power of Native to the Browser by Tal Ater
    I grabbed it at the library because the library is free so there would be no consequences if my low expectations were met. I recommend this book by itself and as a pre-requisite to Archibald’s course below. 
  • Data Journalism Handbook 2 (just released!) from the European Journalism Centre and Google News Initiative

Not Books But Amazing Resources I Was Elbow Deep In Throughout the Year

  • Any video, course, or documentation by Jake Archibald including but not limited to:
  • Udacity — not only did I earn a Mobile Web Specialist nanodegree I actually learned a ton! I won’t link to it, however, because they have autoplay media on the page and I can’t condone or support that.
  • FreeCodeCamp — resumed my coursework there after finishing the above nanodegree and it is better than ever! In particular …
    • Their Data Visualization content rocks my world — I’m not taking anything away from Murray‘s book but FCC certainly explains the foundations much more clearly and concisely so I recommend going through it first even if you don’t move on the projects phase.
Advertisements

[solved] Mac OS X Won’t Erase USB

The usually painless process of creating a bootable linux usb was rather sucking today.

First, I’d get the “disk you inserted was not readable by this computer” error (below) but I wasn’t worried.

01.png

Then, when trying to erase it using Disk Utility, I’d get the “Erasing process has failed”.

03.png

Once, I think, it actually started to erase one of the USBs I tried before failing.

It was only after a couple tries that I clicked “Show Details” but that didn’t help Google help me find any answers. Not the answers I needed anyway.

I saw more than one post online about Sierra (I have High Sierra) failing to erase USB flash drives. The solution was using Disk Utilities > First Aid but that didn’t work for me.

As it turns out, the problem was the USB sticks in question were formatted as FAT-32 which, apparently, Mac can format to but not read from. So I did this (step-by-step instructions below screenshot):

04.png

In the terminal, type:

diskutil list

Carefully and accurately determine which disk is actually the one you actually want to actually erase — the 8GB size was the clue I wanted /dev/disk3. Using that information to erase the USB — not my hard drive — I typed:

diskutil unmountDisk force /dev/disk3

I’m not sure how much that step mattered for me as I don’t think my USBs were even mounting.

Lastly, type:

diskutil erasedisk MS-DOS UNNAMED /dev/disk3

Your formatting type may differ as might your disk identifier.

I went back to Disk Utility and, right away, it looked different.

02.png
BEFORE fixing it in the terminal. Note the 2.5 MB capacity with Zero KB available.
06.png
AFTER fixing it in the terminal. Note the 7.81 GB capacity with 7.79 GB available.

Finally, I went through my usual process to Create a bootable USB stick on macOS.

First, because I’m a stickler for following directions (follow the link for simple and easy instructions), I erased it in Disk Utility which, this time, gave me a happy, green checkmark.

05.png

I then used Etcher to, most triumphantly, create my bootable USB.

07.png

This is all an example of why MacOS rules and Windows drools. In the rare occasions something goes wrong, you can fix it easily. For the time being. Apple is, slowly but surely, f***ing that up on both counts and that is an example of why I increasingly use Linux instead.

Further Speeding Up My Laptop

Recently, I switched to Lubuntu and, for the most part, I couldn’t be happier. Before that, I tried speeding up the aging Dell Vostro 1000 by adding more RAM — some people online insisted it was possible — but DV1k was having none of that. Yes, I expect and accept an overall slowness from an older machine but in the last few months, Ubuntu updates would either frequently lock me out of the login screen (note to self: write post with solution) or break my wi-fi.

So far, my only real issue with Lubuntu is if I close the laptop, put it in my bag and go somewhere, when I take it out the fan is cranking even louder than usual and the laptop is hot to the touch. It runs too warm to actually have it on your lap on a good day — and I always keep it on something elevated with airflow underneath … this is way worse.

Also, it hangs when trying to put it to sleep, reboot, shut down, etc. so I always have to manually press the power button.

So my new “excited and nervous” task is switching from lxde to LXQt in an effort to further speed things up, if possible. If I’m correct, it only comes by default in 18.10+ and I’m using 16.04 because DV1k is old. Somewhere, I saw instructions for installing it on 16 and they wouldn’t provide instructions unless it was totally safe, right? 😉

So let’s go … as I do these steps …

    1. sudo apt-get update
    2. sudo apt-get install lxqt
      Terminal asked if I wanted to install the ten billion things I said y.
      Wow, this is taking a while …
    3. My notes say to sudo apt-get install lxqt-common but Terminal tells me lxqt-common is an invalid operation. I’ll look that up later.
    4. I need to log out then log back in choosing “LXQt desktop”.
      There was no menu on the login screen …
    5. Based on a different source, tried sudo apt install lxqt-common and that is working.
      Done. Now trying to logout/login … woo-hoo! We have a menu!

WOW, does it look different! I’ll let you know how it works out.

And I need to look into temperature management and stuff …

Other issues:

  • Chrome is still a RAM-devouring beast that slows everything down and often freezes but, to my knowledge, there’s nothing I can do about that if I want/need to use Chrome.
  • Lubuntu does often make me log in twice. Someday, I might look into that.

SAD UPDATE: 24 hours later, I’ve switched back to the regular Lubuntu DE.

  • There are long-standing bugs with adding apps to the widgets/panel at the bottom which drove me crazy. I hated having to use the menu for everything.
  • At first, the WiFi appeared in one of the widget-things but, after I tried customizing it (and everything suddenly flashed and all the panels and widgets were empty) and everything disappeared. I added some things back but two things wouldn’t reappear
    • Battery status
    • Network Manager

As it turns out, that wonkiness is also a long-standing issue. While researching this and trying various solutions, I logged out and noticed there was another choice besides LXQt for the desktop environment — “openbox” — so I chose that … and got ANOTHER longstanding LXQt/openbox issue … a black screen.

After trying various solutions, I finally rid myself of LXQt which makes me sad.

Odd Update = two of the apps I tried adding to the panel in LXQt now appear in the panel in regular Lubuntu.

Cool Update: While going through several sites filled with tips on speeding up Ubuntu, Lubuntu, and basically googling “why does Chrome suck so bad in Linux?” I found some dandy tips on speeding up both Chrome and Firefox.

Nervous and Excited About Switching

My little linux-powered laptop is chock full o’ stuff I’ve installed and worked on since I I installed Ubuntu on it a couple years ago. I want to switch from Ubuntu/Unity to Lubuntu/LXDE because UU is way, way too slow and I’ve heard LL is way, way fast.

I was using Ubuntu/Cinnamon for a long time but, lately, the udpates have been locking me out of my machine and it takes a few steps in the command line to set things straight. I could just stop updating but … no.

I’m nervous. What will break? Will I lose anything? I’ve already started to back stuff up. Mostly, if not completely, done I think.

When I try Lubuntu via USB drive, I don’t get WiFi. I have a Broadcomm problem. As soon as I figure that out — should be simple now that I’ve found my ethernet cable — I’ll take the leap.

I’m excited because, while learning, I’ve installed bunches of stuff I haven’t used or no longer need — including multiple versions of, you know, Python, Node, PHP, and all that jazz … tons o’ stuff. It’ll be nice to have a light, lean machine.

But, ugh, gotta rebuild the web server, all my private keys, and so on. Fun, though — it’s practice. Relearning it to redo it is good.

[Solved] Ubuntu Update Broke My WiFi

Preface

I have Ubuntu 14.04 with linux kernel 4.4.0-113-generic on a Dell Vostro 1000. This laptop’s maxed out processor and RAM are just enough for Trusty Tahr, so upgrading to 16.04 isn’t an option.

The Problem

I update whenever it asks. After the latest update, WiFi wouldn’t work. This happens fairly often. She’s a good dog, but she’s old. Restarting usually gives me bars. This time, however, I noticed there was no option for Wireless in the bottom panel’s network menu. Nor was it in Network Settings. Googling brought some old results but the situations and apparent cause were similar — an update broke the card/driver.

This post assumes your router works, your machine has any network connectivity at all, and there is, in fact, a signal to receive. If apes and/or zombies recently conquered your region, your laptop might be functioning as expected.

Quick Solution To Try But Didn’t Work for Me

Press Fn + F2.
I’d never noticed the little wireless symbol on that key before. Apparently, it toggles your WiFi. This didn’t work because, as we’ll see below, the laptop didn’t know it has a wireless card to turn on and off.

Hard Key on Outside of Laptop
Ye Olde Delle Vostro doesn’t have any such switch or slider and neither did some posting this problem (many people suggested trying it).

Kill Process That Is Blocking WiFi
This target process may or may not exist.

sudo /usr/sbin/rfkill unblock wifi

Solutions That Worked for Others I Didn’t Need to Try

This solution is especially handy if you have no network connection on that machine at all.

Solution That Worked for Me

Courtesy of overclock.net forums c. 2014

Run ifconfig to see your networking shizzle.

While broken, mine showed only eth0 and lo.

  • Eth0 = ethernet card
  • wlan0 = wireless card
  • lo = “loopback device … used for stuff to communicate on your system”
  • docker0 = I don’t know what that is

The overclock forum post included instructions for those with no network connectivity as well but I didn’t need them and am not including them here.

Type the following to see what driver is loaded and see what card you have.

lspci -v | grep -i network -A 6

My results showed my broadcom driver and, if memory serves, that something was denied (like the post at overclock). I have a card but it wasn’t recognized so the solution was to remove whatever the update added and/or reinstall whatever the update removed.

sudo apt-get purge bcmwl-kernel-source broadcom-sta-common broadcom-sta-source && sudo apt-get install b43-fwcutter firmware-b43-installer

That first part took a long time. Along the way, it asked me to confirm and when it was finished, I had to confirm it could do the second task.

Restart.

Everything is, obviously, working fine now.

My First Cron Job(s)

Learning from this great “Automated Tasks” page at CentOS.org

Normally, I prefer stuff like this in a well-written tutorial (see below awesomeness from DigitalOcean) but the above is … wow.

Tangent Sidebar: You know what’s kind of irritating? How I use DigitalOcean documentation all the time — not just because it’s higher in the Google results but it is so much better than the documentation of my actual host. Far more subjects, ridiculously specific, much better written, and far more accurate.

Two cases in point:

The latter is especially useful today because I keep getting emails from Let’s Encrypt reminding me to renew my shizzle.

But, as it turns out, none of those told me exactly what I needed but this did:

How to run PHP scripts from cron jobs

That’s my host. I’m very proud of them. And if their customer support is ever consistently good or consistently “not bad,” I’ll totally apologize. Interestingly, that tute gave me the final piece I needed but if I hadn’t read the other tutes first I’d still have no idea what to do because it only gave the final step, not the first several. That’s my host.

The first three (the good) tutorials taught me how to write a line in the crontab using the columns:

  • minute
  • hour
  • day
  • month
  • dayofweek
  • command

“How to Use Cron …” even gave me the “shortcut” of using @weekly instead of 00**0.

But Newbie: Intro to Cron which I think — sincerely and seriously — is a beautifully designed page, gave me the best tip in telling me to look for the following folders in my /etc directory:

  • cron.daily
  • cron.hourly
  • cron.monthly
  • cron.weekly

Dude. Just drop a script in one of those and viola!

And … and … earlier, one of those tutorials stated, “Cron is a daemon …” and I wondered, “What is a daemon?” That Newbie tute said,

Cron is a daemon, which means that it only needs to be started once, and will lay dormant until it is required. A Web server is a daemon, it stays dormant until it gets asked for a web page. The cron daemon, or crond, stays dormant until a time specified in one of the config files, or crontabs.

I wish cogNiTioN wrote every tutorial on all of the sites and I wish all of the sites were designed like that one.

Okay, so I write a line in my crontab telling it to change directories to where I keep a certain php file, then use php to run that file. Like so …

00 16 * * * user-name cd /my/directory/path; php -q myfile.php

It’s almost 3:30pm now so in a little over half an hour, I’ll check to see if it worked. I’d love that. I’m rather sick of trying to remember to do this particular task.

I had it change directories first because from what I understand, the relative paths in the file would get all confused and fail if the little crontab tried to run the commands from /etc.

If you’re still reading and you care, it’s a script that will go grab popularity scores from Spotify for a bunch of artists I’m tracking.

Another nifty thing I think is interesting is … I did a magical “save as” on the php file I’ve been using for this task and realized, wow, the crontab doesn’t need all of the html, css, jquery, etc. because that’s for me to see so I know the script worked. Not only do I know it worked but the crontab couldn’t care less so I stripped it all out of a new, dedicated file. I also rewrote (or, rather, wrote a new script based on) the script I’ve been using because part of the original added rows to a table that the crontab wouldn’t look at even if it existed. Because the crontab doesn’t have eyes. And doesn’t care.

CentOS Does Things Differently

BTW, FYI, all of these new posts are living documents as I learn. Do not assume they are complete or comprehensive.

Thing #1

CWP (or, CentOS Web Panel) is a free alternative to, for example, cPanel. It looks very nice. I’m waiting to install and try it because I want to learn all the command line methods for doing all of this. My new host telling me that I must do everything via command line and do it myself when neither is true most significantly when something absolutely had to be done using the SolusVM and/or they say they won’t do something/anything and they do crap without telling me that overrides something I’ve already done means I have to be able to find do and fix things with no other tools or assistance. Also, it means I can follow and understand all those MySQL tutes that do everything via command line.

My wife says I should pay someone to take care of all this frustrating and confusing stuff that is slowing me down but, I tell her, then I’m not learning and I’m learning and doing all of this so that, someday, I can get a real job and paying someone else doesn’t meet that need.

Thing #2

CentOS uses yum not apt-get. And those two, so far, seem to work very differently.

Thing #3

Matt S, the world’s greatest (well, if not the world’s, definitely A2Hosting‘s greatest) tech support angel says Ubuntu is easier to use. I, however, must use it because the little library/script thing that is crucial to my web app needs CentOS.