Title photo
frugal technology, simple living and guerrilla large-appliance repair
Sat, 05 Aug 2017

I use these razor blade - I buy them by the 100-count box

I have been doing what some people call "wet shaving" -- with a double-sided safety razor instead of the usual cartridge-based razors -- for well over a year. Believe it or not, I was inspired to start wet-shaving by The Dick Turpin Road Show, an ostensibly Linux-focused (and now regrettably silent) podcast that was mostly two British guys sitting around talking. Even when presenter Pete was wet-shaving his head and bleeding like crazy as a result, I still wanted to do it.

I use these Personna double-edged razor blades in the Target-sold Van der Hagen safety razor my girls got me for Father's Day probably two years ago. Amazon sells them in a box of 100. They are currently going for $12.30 a box. That is very cheap, and if I wanted to use each blade only once, it would be a bargain. I rarely go more than three shaves on a blade -- why do that when they're so cheap.

When the blades are done, I drop them in this Feather Blade Disposal Case:

These are the guitar strings I'm using right now

These are the guitar strings I'm using right now.

On the Gibson ES-175 electric archtop, I'm moving away from flatwounds for the first time. At least three players I admire, Pat Metheny, Joshua Breakstone and Bruce Forman (all links go to their string choices), are using roundwounds on their archtop guitars.

You do get some finger squeaks, but the sound of the lower four wound strings is much clearer. I guess you can say it's more defined -- less "smoky" maybe. Whatever you call it. The guitar is sounding better. (in case you were wondering, my flatwounds of choice were D'Addario Chromes -- the .013 set, and I usually replaced the higher two strings -- the .013 and .017 -- with an .014 and .018).

I'm using the .013 set of Ernie Ball Nickel Wound strings -- the pack with the eagle on it. I'm also sticking with the .013 and .017 in the set instead of opting for the slightly heavier replacement strings:

On my Fender guitar, a 1979 Lead I (though for some reason the serial number says it's a 1981), I actually used D'Addario Chromes flatwounds -- the .012 set -- for a long time. Way back in the past, I used .010 and .011 roundwound sets: Ernie Ball Slinkys, GHS Nickel Rockers (before I knew there was a difference between pure nickel and nickel-plated steel).

The .012 flatwounds were definitely too big for the nut on the lower couple of strings, though the extra tension didn't affect the neck at all. That 1970s Fender neck is a single piece of maple with no added fretboard and a skunk stripe behind it to cover the truss rod, and it's super strong. I have never needed to adjust the truss rod.

I wanted something slightly lighter. Strings that would fit in the nut slots without any filing, and a clearer, less-boomy, more defined low end.

I picked up a set of Ernie Ball Power Slinky strings, which start with a .011 high E and tend to run slightly lighter in the lower strings than the usual .011 set.

The strings have been great. Returning to roundwounds on both my Gibson and Fender is like I'm playing two new guitars. You can change your sound so much just by changing strings and picks -- two of the cheapest things in the guitar world.

Slinkys are nickel-plated steel, and I do have a set of this same gauge made with pure nickel windings called Slinky Classics. Pure nickel is supposed to be more subtle than nickel-plated steel. Maybe they'll sound better. But I like this current Ernie Ball Slinky set so much, I don't want to make the change.

I don't need a .052 or .054 for the low E (like Ernie Ball's Skinny Top Heavy Bottom and Beefy Slinkys), and this set is balanced very well for what I want.

Here's what the Ernie Ball set looks like:

My Yamaha flattop guitar -- it's probably 5 years old at this point -- has a solid top and is a "solid" guitar all around. It's put together very well and is pretty tough.

The guitar shipped with Yamaha's own custom-gauged set of .012s -- roughly equivalent to light-gauge strings. I think the strings were phosphor bronze, which tend to have a longer life.

I probably should have stuck with .012s when I changed the strings, but I decided to go up to a medium-gauge set that begins with a .013. I went for Ernie Ball Earthwood 80/20 bronze strings.

They sound amazing, and they're cheap enough that I don't mind changing them sooner.

This was my first time changing flattop strings. I've changed strings on electric and classical guitars hundreds of times -- I even do the thing where you tie the nylon strings to the bridge.

But bridge pins? I was a bridge pin virgin. I had the bridge-pin puller on the end of my string winder. One of the pins popped out with such force that it hit the ceiling. After that I made sure to block the path with my hand. I did have one of the pins edge out a bit after I tightened the string up. But I got it done.

I'm not a fan of bridge pins. It's just the tension of the pin and the angle of the string tension holding everything together. I'd prefer an archtop tailpiece. That I can deal with.

I also had to crank the truss rod quite a few turns after I replaced the .012s with .013s. I started with quarter turns, but I had to keep cranking and cranking, loosening the strings in between adjustments. I thing I have it right now. I got tired of cranking after awhile. It plays well and sounds great.

Here is my Ernie Ball Earthwood set:

So, what did I play today? I have been working on "How High the Moon," but today I worked on the chords for "Waltz for Debby." I'm very, very slow. That's what I'll say about it.S

I just tried Dunlop Ultraglide 65 String Cleaner and Conditioner

I got a bottle of Dunlop Ultraglide 65 String Cleaner and Conditioner and tried it today on my flattop strings, which happen to be an 80/20 bronze set from the Ernie Ball Earthwood line. The strings are not the most resistant to dirt and corrosion, and they are nowhere near so far gone that they need changing but weren't exactly out-of-the-package new.

The Dunlop 65 appears to be a very lemony oil, and it easily went on the strings with the spongy applicator, after which I wiped off the excess

The strings were cleaner, and a lot smoother. I definitely recommend this stuff. Clean strings aren't the worst thing, and this stuff makes it easy.

Back in the day I used to use rubbing alcohol to clean my strings. That can be drying, to say the least, if you get any on the wood of the neck, and it certainly doesn't make the strings feel smooth. This stuff from Dunlop is a lot better.

A bottle costs somewhere between $5 and $7 -- about the price of a set of strings. It's worth it.

Fri, 04 Aug 2017

It's one of the last Blockbuster Video stores, and its Twitter feed is hilarious

It's one of the last Blockbuster Video stores, and its Twitter feed is hilarious https://twitter.com/loneblockbuster

Thu, 03 Aug 2017

The Mystery of L.A. Billboard Diva Angelyne's Real Identity Is Finally Solved

The Mystery of L.A. Billboard Diva Angelyne's Real Identity Is Finally Solved http://www.hollywoodreporter.com/features/angelyne-la-billboard-diva-30-years-1025678

Wed, 02 Aug 2017

Had a meeting on Google Meet

We had a meeting on Google Meet yesterday -- was surprisingly good, even with crappy WiFi connection https://meet.google.com

The Twitter web site looks different today

The Twitter web site looks different today https://twitter.com

The nit-picking glory of the New Yorker's Comma Queen

The nit-picking glory of the New Yorker's Comma Queen https://www.ted.com/talks/mary_norris_the_nit_picking_glory_of_the_new_yorker_s_comma_queen

The crippling problem restaurant-goers haven't noticed but chefs are freaking out about

The crippling problem restaurant-goers haven't noticed but chefs are freaking out about https://www.washingtonpost.com/news/wonk/wp/2015/08/12/the-crippling-problem-people-who-eat-at-restaurants-havent-noticed-but-chefs-are-freaking-out-about

Tue, 01 Aug 2017

Grateful Dead, Jerry Garcia and the Jews

Grateful Dead, Jerry Garcia and the Jews http://www.tabletmag.com/jewish-arts-and-culture/music/242079/happy-birthday-jerry-garcia

My Windows Subsystem for Linux blog workflow

My Windows Subsystem for Linux blog workflow: Vim, Unison, wget, curl (and I can probably eliminate one of the last two)

I'm still running Windows 10 and doing my blog workflow in the Windows Subsystem for Linux

I'm still running Windows 10 and doing my blog workflow in the Windows Subsystem for Linux

Reddit raised $200 million, is going on a hiring spree and redesigning web site

Reddit raised $200 million, is going on a hiring spree and redesigning web site https://www.recode.net/2017/7/31/16037126/reddit-funding-200-million-valuation-steve-huffman-alexis-ohanianv

IFTTT with no link shortening

I just turned off link shortening in https://ifttt.com/settings. Hope this works for Twitter.

Upgrade to PHP 7.1 on CentOS

I manage a CentOS 6 server, and I have a request to replace PHP 5 with PHP 7.

Here is a solid and mercifully brief tutorial on how to do it.

Is there a place to recycle household batteries in the San Fernando Valley?

My workplace used to have a box for recycled household batteries, and that was a very useful perk. It's not up there with free air-conditioning and coffee but useful nonetheless.

Now that box is gone forever, and my dead-battery stash, consisting of a bunch of plastic bags in my car, is starting to build.

And it's surprisingly hard to find a place that will take them.

Right now all I know about are the LA City SAFE Centers, which are only open on weekends.

I thought Best Buy would be a place, but they only recycle rechargeable batteries.

AutoZone recycles automotive batteries and no other kind (nor would I expect them to).

According to some web sites, IKEA Burbank accepts batteries for recycling, but I see no mention of it on their web site.

I'd just like to find a place that's local to the San Fernando Valley where I can drop off the stuff with no hahassles.

EVERYBODY uses batteries. And you're not supposed to throw them out in the regular trash, so this seems like a huge problem.

Mon, 31 Jul 2017

I am feeling good about my IFTTT applets

At the present moment, I am feeling good about my IFTTT applets.

How does IFTTT make money?

I was wondering how IFTTT makes money. They are certainly not shoving a subscription model down anybody's throat.

Quora user Aaron Disibio says that aside from all the investor money they have been getting, they have a paid Partner Platform.

This is a test of IFTTT blog entry posting.

This is a test of IFTTT blog entry posting.

I created two IFTTT applets for social and 'other' posts

I now have two IFTTT applets, one to post on Twitter ONLY from my blog's dedicated "social" directory (posting the post body instead of title and URL) and another to post to Twitter from everywhere BUT my "social" directory (posting the traditional title and URL).

The social posting applet was easy to create -- and I probably did this very thing when I was looking at IFTTT a couple of years ago when I started creating social posts in the /updates directory of my blog. It was the other applet -- the one that excluded a single subdirectory (or WordPress tag or category, both of which are represented as a subdirectory in RSS).

Dlvr.it made this easy. There is a field for it.

For IFTTT, I hacked together some quick TypeScript to filter out what I didn't want.

Is it working? I'm still testing the applets, and I'll have to add a bit more code and explanation before I make them public. I'm already thinking (in my brain) about how to boil them both into a single IFTTT applet, which is a lot more elegant than having two.

Now I remember: One of the reasons I chose dlvr.it over IFTTT when I first implemented these automatic social poposts in 2015 was that in-text links from dlvr.it displayed with their text, while the same links over IFTTT displaed with shortcode text, which can make the post unintelligible because the text that carries the link can be kind of important.

Update: My TypeScript/JavaScript isn't working.

Now I have IFTTT applets for social and 'normal' posts

I now have IFTTT applets for social and 'normal' posts, and I am testing them.

My IFTTT social-post applet works

I created an applet on IFTTT that takes a subdirectory of my blog feed (using RSS out of the blog) and generates a social post on Twitter.

By "social post," I mean something different from the usual automatic post to Twitter, Facebook, Google Plus or any other social-networking service.

The usual post features a title and a link back to the original item.

But a "social post" is just text. It's the "body" of the entry and neither includes nor needs a title or a link back to the original blog post. It can include links if they are part of the post body.

When I started doing this -- dedicating a subdirectory of my blog to social posts, I experimented with both IFTTT and dlvr.it, going with the latter (if I remember correctly) because while I was able to create my social post out of a dedicated subdirectory in both services, only in dlvr.it was I able to simultaneously post the rest of my non-social blog entries to Twitter without worrying about double-posting the social entries. In other words, I set up the "main" dlvr.it action to exclude my "social" directory (I use /updates).

Note: In WordPress, you can set this up using a dedicated category or tag, each of which can be fed to any of these services with RSS.

Now I look in dlvr.it, and I can't see what I did to "exclude" the social feed from my "main" feed. Maybe that code got purged and dlvr.it knows not to double post.

I'm still looking in on it.

Anyhow, my reason for moving away from dlvr.it is the service's new limit of 10 posts per social account per day. Especially when doing quick social-style updates, it's easy to go over 10 posts per day. And while I can't criticize dlvr.it for trying to monetize their service with a monthly fee that removes the 10 post limit and adds many other useful things, it's just too much money for a non-revenue-generating web site like mine.

IFTTT (aka If This Then That) can probably do what I'm "asking" it. I just have to figure it out.

This is a test of social posting via IFTTT

Now that dlvr.it is limiting posts per day per social account to 10, I am revisiting IFTTT for my automatic social posts.

dlvr.it limits free users to 10 posts per day

I don't log into my dlvr.it account very often, though I use it continuously to send the output of three blogs to (mostly) Twitter and (a little bit of) Facebook.

I needed to tweak one of my "routes" on dlvr.it, and I logged in this morning. I found out that as of June 1, 2017, dlvr.it is imposing a 10-post per day limit per social profile.

Dlvr.it users can avoid the limit and unlock the rest of the social-posting service's goodies by subscribing at the rate of .99 a month.

I like getting dlvr.it for free, though I understand that the service needs to make money. And for "commercial" users, .95 a month is nothing. Even the "Agency" rate of .99 a month is nothing if you're managing dozens of feeds and social accounts.

But for the casual amateur user like myself? Just like with the Washington Post, which coincidentally also charges .95 a month, I see tremendous value in the service but would be much more comfortable paying a month. What I'm saying is that my price point is , not , so these two services are currently not getting from me. They are getting ode.cgi.

We live in a world awash with /month pricing models, and if you're using 10 of these services, it really adds up. Maybe I'm super-stingy, but my price point is what it is, and I have the feeling I'm not alone. But also, I'm not running a business. But I get the feeling that a lot of these services could make it up in bulk by lowering the resistance to subscribing along with their price What I'm saying is that my price point is , not , so these two services are currently not getting from me. They are getting ode.cgi.

We live in a world awash with /month pricing models, and if you're using 10 of these services, it really adds up. Maybe I'm super-stingy, but my price point is what it is, and I have the feeling I'm not alone. But also, I'm not running a business. But I get the feeling that a lot of these services could make it up in bulk by lowering the resistance to subscribing along with their price.

Wed, 26 Jul 2017

Free book: The JavaScript Way

I just heard about "The JavaScript Way," a book by http://www.bpesquet.com/ that is https://github.com/bpesquet/thejsway/ and a minimum of https://leanpub.com/thejsway.

It bills itself as beginner-friendly yet written to ES2015 standards. I took a quick look, and so far I like it.

Tue, 18 Jul 2017

At least on Windows 10 in 2017, OpenShot is (mostly) useless

I knew that OpenShot was never the absolute "best" video editing application out there, but it was free, it mostly wworked and, more importantly, I knew how to use it.

I ran OpenShot in Fedora Linux for a few years and made dozens of servicable videos on it.

Going from Version 1 to Version 2 was supposed to open (pun not intended) a new era for OpenShot, but instead it made the program unusable. Once OpenShot crossed into 2.x territory, I had plenty of problems with dependencies in Linux, and now that I'm on Windows 10 and there is a version for that platform, it does install but can't seem to do anything complex or even export a simple video without crashing.

So I'm casting (pun not intended) for new video-editing solutions. On the table are KDEnlive for Linux and anything proprietary on Windows that my company will buy me.

Not on the table unless I get super desperate is Blender. It just looks too damn complicated to do just about anything with that application.

So what do you think I should go for? At this point, I'm looking at remaining on Windows, but I do have a Linux laptop that I can dedicate to video editing if it comes to that.

Update: I was able to output a video on my new laptop with OpenShot 2.3.1. I have 2.3.4 on my Windows 7 desktop. I hope updating on the laptop won't break the program.

Further update: The .mp4 produced by OpenShot wouldn't upload successfully to YouTube.

Sat, 15 Jul 2017

Meteor Forums: Why I fell in love with Meteor

This post from the Meteor Forums is drawing some attention. (Thanks to HashBang Weekly for the link.)

Sat, 08 Jul 2017

'Learn Ruby on Rails' by Daniel Kehoe updated for Rails 5.1

'Learn Ruby on Rails' by Daniel Kehoe has been updated for Rails 5.1.

Tue, 04 Jul 2017

Mozilla convinced me to try Firefox Focus for Android

I'm on Mozilla's mailing list, and they sent me an e-mail about the Firefox Focus browser being available for Android and how it enhances privacy and speeds up browsing by blocking ads.

I'm not one to add browsers to my phone. All of my previous Android phones were storage-challenged, and I could barely keep them running with a bare minimum of apps, so adding browsers just wasn't something I would even consider. And I did add Firefox once, and it took up a LOT of space.

But part of the come-on for Firefox Focus was that it was small and would take up no more than 4 MB of space on the phone.

I have the space for bigger apps on my 16 GB phone. And I know that 32 GB is considered small these days, but I try to pay or less for a phone, and that means 16 GB of internal storage. Maybe a 32 GB phone will cross into my price range during this year's Black Friday. (We try to get a Black Friday phone deal in the sub- every year for the whole family, and I aim to double the phone's internal storage, or I won't do it. We went from 512 MB to 4 GB to 8 to 16 over the past four or five years. The fact that my phones are always storage-challenged has made me reluctant to install apps in general and redundant apps in particular, though with the 16 GB I am loosening up.)

The short version of all this is that I installed Firefox Focus, which has been available for iOS longer and is a recent addition to Android.

It is fast. It is also minimal. No tabs, no bookmarks. It puts up a notification as soon as you use it to forget its history. This all factors into the privacy and the speed. If it keeps me from being tracked in some way, so much the better.

I'm not ready to make it my default browser in Android, but I will continue to use it and follow its development.

Ethical dilemma: My livelihood is supported by websites that sell advertising, and I am somewhat unsettled by major applications that block ads by default. On the other hand, I'm disturbed by the amount of information that is collected, the extent of tracking and the unknowing intrusions into privacy that are all rampant in the service of targeting ads. I'm very, very close to supporting my favored news sources with subscriptions and taking advertising (or at least any guilt over blocking it) out of that portion of my personal media consumption. Plus I'm not blocking ads on any other platforms (principally Google Chrome on Android, Windows and Linux).

But: Am I feeling sorry -- in any way, shape or form -- for Google and Facebook and any revenue they may lose? No. They are doing more than fine as they leverage the hard work of others in order to make billions they don't share, giving "users," be they individuals or companies nothing beyond their "free" service.

Sign of the times: The fact that major applications tout ad-blocking as a key feature says a lot about where the Internet is today, i.e. not in a good place. I fear that the display-ad economy is a false one that will leave many disappointed, crushing labor-intensive news organizations under its fickle, giant-favoring boot.

Sun, 02 Jul 2017

How Facebook Ate the News

http://www.tabletmag.com/jewish-news-and-politics/238195/zuckerberg-public-enemy-no-1

7 Strengths of #ReactJS Every Programmer Should Know About

https://blog.reactiveconf.com/7-strengths-of-reactjs-every-programmer-should-know-about-6a5f3a69a861

Sun, 18 Jun 2017

Debian 9.0 Stretch is the new Stable

I don't keep up with Debian, though my sentimental feelings for the pioneering Linux distribution remain strong. My days with Debian were late Etch into Lenny, Squeeze and early Wheezy. For the release of Squeeze, I used SVG files from the desktop's awesome artwork and made a custom T-shirt that I still wear.

Not to bury the lede too far, the news of the day is that Debian 9.0 Stretch has been released as Stable. For more on Stretch, read the installation manual and release notes.

I still have an old IBM Thinkpad R32 that runs Debian -- I can't remember if it is still on Wheezy, though it probably is.

For my laptops, I started running Fedora when I got a new laptop in 2010 -- a Lenovo G555 with an AMD processor. Since I was using the proprietary Catalyst video driver, I eventually broke the installation and moved to Debian, which I ran on the laptop until it died in 2013. I began again with Fedora on my next laptop, an HP Pavilion g6, and it is still running that version of Linux (and I'm using it right now to write this post). I now have a new HP laptop, an Envy, that is still running the Windows 10 it came with, and I added the Windows Subsystem for Linux/Bash so I can have a fairly functional Linux command line.

So I'm not a current Debian user. Especially on the desktop, I want newer versions of just about everything, and I find it easier to get that in the twice-yearly releases of Fedora instead of Debian Testing or Unstable. Debian Stable, which I've used and loved, is just too "stable."

But if you think about it, I could easily run Debian Stable and add newer versions of Node, Java, Ruby and NetBeans. When a laptop is new, I find Fedora to be the easiest, quickest and best way to get the most hardware working, but after a couple of years, Debian is a very attractive option.

With newer hardware, there's always the Liquorix kernels, which I used to run so I'd always have the latest on my Debian installations.

For my programming needs, Node is certainly part of Debian Stretch, but this part of the release notes is a little worrying:

5.2.2. Lack of security support for the ecosystem around libv8 and Node.js

The Node.js platform is built on top of libv8-3.14, which experiences a high volume of security issues, but there are currently no volunteers within the project or the security team sufficiently interested and willing to spend the large amount of time required to stem those incoming issues.

Unfortunately, this means that libv8-3.14, nodejs, and the associated node-* package ecosystem should not currently be used with untrusted content, such as unsanitized data from the Internet.

In addition, these packages will not receive any security updates during the lifetime of the stretch release.

I checked the v8 package in Fedora, and it appears to be updated about every month, though not at all for the past three months. I'm not sure what to take away from this. I'd have to look at the upstream v8 before making any judgments on how well Fedora is doing with the package, plus I'd need to see how Ubuntu handles it.

Back to Debian. The Debian Project is the code that goes into it and the volunteers that make it happen. Debian is not owned by any corporation, individual or group. It'll pretty much always be there and be free.

Does Debian benefit from work done by corporations like Red Hat? Yes, it does. Free software in general and Linux in particular are coded by individuals all over the world, some of whom are paid by companies to make their contributions.

However it finally goes together, Debian is a special project.

The short version: If you can make Debian Stable work for you, it's a terrific operating system that really is stable and will last you a couple of years without a major upgrade. If you're interested, it's worth a test on your hardware before committing to a Linux distribution. On my computers, the "contenders" are Debian, Ubuntu (mainly the Xubuntu version with Xfce) and Fedora.

Eloquent Javascript, Chapter 3 (Functions) -- what the hell?

I read Chapter 3 of Eloquent Javascript some time ago, and it's a difficult one. It introduces the concept of functions. Quickly introduced are: Parameters and Scopes, Nested Scopes, Closure and Recursion.

It is too much, too fast with too few examples. I was able to do the first exercise, Minimum, but got lost in the second, Recursion.

Here is my solution for Minimum:

#!/usr/bin/env node
/* Eloquent Javascript, Chapter 3, Page 56, Exercises 
Create a function to find the minimum of two arguments

By Steven Rosenberg, 6/17/2017 */

function smallest(first_number, second_number) {
    if (first_number < second_number)
        return first_number;
    else if (second_number < first_number)
        return second_number;
    else
        console.log("They are equal")
}

// Output will be the smallest of these two numbers
console.log(smallest(100, 2));

Expressing this as a function doesn't really do much. The program could just as easily have been written in a straight "procedural" format. But it's a function, and it works.

The second problem on recursion stumped me. I'm pretty sure I can figure it out, but I need more time to think (and look up more on recursion).

Tue, 13 Jun 2017

Sitepoint: How I Designed & Built a Fullstack JavaScript Trello Clone

Sitepoint: How I Designed & Built a Fullstack JavaScript Trello Clone by Moustapha Diouf.

This article and accompanying repo show how Moustapha Diouf built this React app with Express and Mongo.

Sat, 10 Jun 2017

Java and the Windows command prompt

Java and the Windows command prompt might explain why you're having issues with the java and javac commands.

Things I did in Windows 10: Add Java and Groovy, fix Geany for HD display

As much as I know I should be focusing on JavaScript, I keep feeling the pull of Java, so I got my environment together on Windows 10 for Java and Groovy, and I "fixed" the Geany text editor/mini-IDE so it's no longer blurry on my HD screen.

While the java command and the Groovy console both worked, the javac (used to compile a Java program) and groovy programs did not work until I set their paths in Windows settings (more detail later).

Why Groovy? I have a programming book by Adam L. Davis I bought on LeanPub called Modern Programming Made Easy, now published by Apress, that encourages the use of Groovy as a way for beginners to learn without all of the rules and the need for compilation of "real" Java. Groovy takes Java and presents it as a scripting-style language with much simpler syntax. I took to it right away. (More on the book and its author when I clear up the status of both.)

I like to use Geany as my text editor for Java because I can compile and run a program without leaving the editor. That's why it's called a mini-IDE. Plus I'm lazy that way. Geany will also compile and run your C++ code and run your programs in Perl, Python and Ruby. I've never gotten it to run Node. Instead, I use Visual Studio Code for Node.

I did the C++ homework for my Intro to CS class in Geany when the programs were short, moving to NetBeans when I had too many sets of brackets and wanted to take advantage of the automatic formatting, which is your very good friend when writing programs with level upon level of brackets.

Back to my Windows problems:

After a medium-strength Googling, an OpenOffice forum page gave me the trick to fixing the blurriness of this GTK app.

More details on all later ... (but if you go to the page linked above, you can probably figure it out).

Mon, 05 Jun 2017

Writing on phones and tablets sucks

If you want to write things like words and sentences, doing it on mobile phones or tablets sucks. Bluetooth keyboards and mice and their intermittent connections to phones and tablets also suck.

The same holds true for programming. Writing code on phones and tablets suck. What sucks even more is that Android's primary programming language is Java, yet it's harder to develop and run Java code in Android than it is to write Perl, Python, JavaScript and Ruby.

I even wrote C++ on an Android tablet. It was a pain in the ass, but I did it. Those languages that aren't Java are "easier," but the experience remains poor.

Even though I use a few Google Chrome "apps" for programming-like tasks (Secure Shell, which is pretty good; and Text, which is super-rudimentary), even a Chromebook is better than a tablet or phone.

Right now my laptop is so nice, I hate using my desktop computer at the office. Now it's screen seems blurry (because it is), and I hate the standard-issue Lenovo keyboard. That's a backwards way of saying that I like a nice laptop keyboard. It has to "click" a bit, meaning it can't be too mushy.

I can certainly see (and am seeing) laptops that incorporate tablet/phone hardware and software. I would absolutely welcome the "intents" present in Android apps that allow you to easily share content from one app to another. Windows now has an app store, though most of what's in it is shit. (I do like the Fitbit app for Windows, though.)

Tangents be dammed. To make things with words, you need a proper keyboard.

Tue, 30 May 2017

To run Node in Debian and Ubuntu, install nodejs and nodejs-legacy

Installing node.js in Fedora is no problem. You just run sudo dnf install node, and you're off to the JavaScript-in-the-console races. But it's slightly more complicated in Debian and Ubuntu.

Since there's an old amateur radio package called node for communicating on packet radio nodes, Debian and Ubuntu use the package name (and shell command) nodejs. So you would run nodejs when you would normally run node.

But you don't have to do this. And you don't have to resort to any Linux/Unix tomfoolery either.

Both Debian and Ubuntu have a package called nodejs-legacy that makes the symlink for you. Then you can run node by typing node in the console.

Since it looks like there is no node for amateur radio in Debian Sid or Experimental, I'm thinking that the node-vs-node.js problem will go away at some point in the near future -- when Debian declares its next release stable, and in turn when Ubuntu bases its future releases on versions of Debian that have "re-resolved" the issue. (Since I'm running Ubuntu 16.04 in the Windows Subsystem for Linux, this hasn't happened yet.)

Until then:

$ sudo apt install nodejs nodejs-legacy
Sun, 21 May 2017

Software-defined radio kits available

I just installed the Java Development (aka the JDK) and was trying to test Java in the browser by going to the WebSDR page to listen to software-defined radios over the Internet.

The last time I listened to WebSDR, you needed Java in the browser to make it happen.

I had no idea that Java in the browser is no longer a thing.

I confirmed my JDK was working via the Windows command line, and I also learned that WebSDR now uses HTML5 in place of Java.

I also learned from the KFS WebSDR site's About page that the inexpensive Softrock radios that are behind most SDR sites are available for purchase both pre-built and in kit form from Five Dash Inc..

I've also seen SDR radios in the range on eBay.

I'm tempted ...

Learn more about SDR in these two subreddits:

But the big thing I learned: no more Java in the browser.

Sat, 20 May 2017

New laptop, new OS

The women in my life gifted me with a sweet HP Envy 15-as133cl 15t laptop. I guess they saw the keys pop off of my old HP laptop a few too many times.

The new laptop has an HD screen (1920 x 1080), a lot of memory (16GB), an Intel i7 CPU (not sure of the exact model) and a 1 TB hard drive.

Right now I’m running the Windows 10 that came with it. I “auditioned” Fedora 25 with GNOME and Xubuntu 17.04, and while either one may indeed work with this hardware (the biggest problem being the HD screen and the Linux desktop environments’ inability to handle them without a lot of little tweaks), for now I’m sticking with Windows.

The main reason that I can stick with the stock OS is the Windows Subsystem for Linux (aka the WSL), which gives me a full Ubuntu-powered Bash shell that runs pretty much every Linux console program available. I’m using it to run/update my Ode blog (I still can’t get Unison in Windows to work across networks because I can’t get SSH working and am a little wary of Windows software that seems frozen in time).

As I allude to in the sentence above, adding software in Windows has it’s good and bad points. Good: You can easily run things like MS Office and the Adobe suite, though I don’t use those at all (instead opting for LibreOffice and Google Docs, and GIMP/IrfanView/Inkscape). Bad: Some things are old and unmaintained, like the ClipX clipboard manager that I rely on heavily. Plus after years of drawing on huge Linux software repositories offered by projects like Debian, Ubuntu and Fedora, having to go all over the Internet to find applications is not something I’m excited about.

That said, I have most of what I need. I’m playing with JavaScript, especially in Node, quite a bit, and I have Node installed both in the Ubuntu shell and on the Windows side.

I don’t have Ruby in the WSL or Windows since I haven’t used it in awhile, but I will probably do that in the WSL.

If/when I start dabbling in Java again, I can do that on both sides (WSL and Windows), too.

For Java and Ruby especially, I like coding with them in the Geany editor, which is like a “baby” IDE (it can execute your code, though I’ve never gotten it to work like that with JavaScript/Node). Unfortunately Geany is one of those old GTK apps that looks like hell on this laptop’s HD screen. Principally it’s blurry. So I’ve been using Notepad++ instead, which is a great text editor, though I haven’t figured out if it is capable of executing code in the languages I use (Ruby, JavaScript, Java, Bash).

I am also experimenting with Visual Studio Code, Microsoft’s “not-quite Visual Studio” editor. The “not-quite” part is OK by me, because most IDEs I’ve tried are so massive and cryptic that I’m happy to have something that’s I can understand more easily.

I already had Visual Studio Code on my old HP’s Fedora system, and now I have it in Windows 10 proper. I’ve used it for a little JavaScript. I like the syntax highlighting, and I was able to execute my code via the debugger. (If you actually know what you are talking about, I encourage you to laugh at or with me — your choice.)

In the WSL, I’m relying on Vim as my text editor, and I’m using the limitations of the WSL (most of which can be summed up as “no GUI,” though you can definitely hack one in) as an excuse to sharpen my Vim skills. I also have Vim and gVim on the Windows side. (Vim is everywhere.)

You might notice that a lot of the programs I’m using are things you’d find in Linux. I’m surprised that so many traditional Linux/Unix applications are available in Windows. Some of them are even regularly maintained.

I’ll detail all the software I’m using in Windows 10 at some future point, probably on another site, but quickly:

Audacity (audio editor) Dropbox (file sync) FileZilla (FTP) GIMP (image editor) Inkscape (vector graphics editor) IrfanView (image editor) LibreOffice (office suite) Node.js (JavaScript in the console) Notepad++ (text editor) OpenShot (video editor) PuTTY (terminal for SSH connections to servers) qBittorrent (torrent client) QuiteRSS (RSS reader) Vim and gVim (text editor) Visual Studio Code (text editor, mini IDE) VLC (video editor) Windows Subsystem for Linux (aka WSL aka Ubuntu for Windows aka Bash on Windows … do you think they have a branding issue?) Things I’m relying on in the WSL:

Bash (which is obvious, but I use all the common Unix tools and rely on a number of scripts to automate various tasks) SSH (for encrypted connections) Unison (file sychronization) Things I haven’t yet installed:

Geany (GTK text editor that looks a little rough in Windows 10 on this laptop) Hugo (static site/blog engine) JVM (the Java Virtual Machine) Netbeans (IDE written in Java) Ruby (programming language)

Wed, 17 May 2017

Fedora, SUSE and easier installation coming to Windows Subsystem for Linux

Microsoft is ticking all of the right boxes with the Windows Subsystem for Linux, announcing that it will be bringing Fedora and OpenSUSE to the WSL as well as offering installation via the Windows Store.

There will also be the option of installing the Ubuntu, Fedora and SUSE version of the WSL at the same time, though it is unclear if they will have separate filesystems, and/or the option of sharing a single Linux filesystem.

I'm not a SUSE user but am a longtime Fedora user, and having the option of Fedora is a very attractive one because it's that much easier to get newer versions of things like Node, Ruby, Java, etc., in this developer-centric distribution that is a lot more stable than you'd think.

As far as installation goes, the current way you get the Ubuntu-powered WSL on your Windows 10 system is more than a little bit hacky, and the use of the Windows Store will make it easier and more inviting for new developers as well as "new" Windows "power users" coming over from years of desktop Linux (like me).

There isn't much in the way of announcements on adding graphical capabilities to the Windows Subsystem for Linux, though Microsoft isn't discouraging those who are already adding an X server to their WSL, but I figure official support for Linux GUI software in the WSL is somewhere on the roadmap.

For now I'm happy to be using a Ubuntu-based system for the first time in a long time (after the aforementioned years of Fedora). As I've written previously, the move from 14.04 to 16.04 was pretty crucial because I was able to get away from the super-old Node.js in 14.04, though the newer Unison required me to pin the old Unison from 14.04 to maintain compatibility with the Unison on my server.

While I've been happy to learn that you can pretty much download a Ubuntu package from the archive and install it with dpkg, I haven't yet experimented with PPAs in the WSL. Might be time for that.

Changing the directory: Since the WSL is rapidly going from a Ubuntu-only offering to one that will offer Fedora and SUSE, I'm changing this directory's name from ubuntu_on_windows to linux_on_windows.

Thu, 11 May 2017

This post didn't have a title for a brief time, and here's why

What happens when you leave the subject line blank in an Ode post and start it on line 3?

Answer: It works, but it also messes up my archive page because there is no title to put in the listing that serves as text for the link.

The lack of a title doesn't stop the site from working, and the permalink at the bottom of the post still works.

I see other bloggers doing this with the "micro blog" posts they write in their traditional blogs, and a few systems/themes provide support for title-less posts.

But in the interest of not breaking my archive page, I'm going to stick with titles for my Ode-generated social media posts.

Wed, 10 May 2017

Microsoft Edge vs. Google Chrome vs. Firefox

I decided to give the new Microsoft Edge browser a try in Windows 10. When I open it, I get this page that says Google Chrome is 5 percent slower than Edge, and Mozilla Firefox is 9 percent slower.

Four things:

  • From my use, I would figure that Chrome is at least 25 percent faster than Firefox.
  • The scores are based on Google Octane, which is being mothballed because everybody is cheating with it.
  • I'm supposed to get excited about a 5 percent speed improvement? Sharing bookmarks and passwords across Google Chrome instances on Windows 10, Windows 7, Linux and Android is more important than a small speed improvement that may not even be real.
  • The more I look at this, saying Chrome is 5 percent slower than Edge doesn't mean that Edge is 5 percent faster than Chrome. Am I right, math and statistics experts? According to my calculations, if Chrome is 5 percent slower than Edge, that means Edge is 19 percent faster than Chrome. Why doesn't Microsoft tout that statistic, which sounds a whole lot better?

Nonetheless, I'm giving the browser a tryout while I'm still using Windows 10.

Tue, 09 May 2017

Javascript digital clock

Since this blog's time is displayed in UTC, I wanted to put a digital clock on the site that told the current Universal Time so a casual reader (like me) could have some idea of how long ago (or what time of "day") a given post was published.

I started with some JavaScript code from Cory/uniqname on CodePen and simplified it greatly and because I wanted more output rather than less, counterintuitively as well.

It uses the Date() object and the toUTCString() method to create the text for display of the time/day/date/year and setInterval to "update" the text every second:

function clock() {
  var local_time = new Date(),
  utc_time = local_time.toUTCString();

document.querySelectorAll('.clock')[0].innerHTML = utc_time;

}
  setInterval(clock, 1000);

I stashed this bit of code in a file called clock.js, and called it into the site with script tags and a div:

<script type="text/javascript" src="/path/to/clock.js">
</script>
<div class="clock"></div>

(Note that /path/to/clock.js means the actual path on the server to where you happen to have created the JavaScript file.)

The toUTCString() method outputs the time in 24-hour format. If I want it it in 12-hour format (with AM/PM), the script would have to get a lot more complicated. I'm not saying I won't do that, but for now the easy wins over the perfect.

Fri, 05 May 2017

Should I sell my ham radio gear?

Should I sell my ham radio gear? Maybe. If I had the time, I'd do more homebrew (as in making my own equipment from parts, not anything to do with intoxicating beverages).

VE7SL leads me to amateurradio.com

VE7SL leads me to http://www.amateurradio.com, which has a killer URL and is a pretty good site.

The VE7SL Amateur Radio Blog

There's a lot of good reading at http://ve7sl.blogspot.ca, the VE7SL Amateur Radio Blog. Love the homebrew and old gear articles!

Sun, 30 Apr 2017

Is this blog for you or me?

I'm not trying to make money with this blog, and it hasn't happened despite my lack of interest in same. I don't have Google Analytics (or Piwik) counting the traffic. Every once in a while I look at the AWstats data from my web host, but not too often.

I write about the things I'm doing. It's mostly about technology, though for the longest time I've meant to write about other things.

If you want to read this site, it's for you. Otherwise, it's just for me.

Tue, 18 Apr 2017

How to 'hold' a package in Ubuntu and prevent it from being updated

I am using the unison in Ubuntu 14.04 (Unison 2.40) in my Windows Subsystem for Linux-supplied Ubuntu 16.04 (which updated the package to Unison 2.48) because my server is running Unison 2.40, and I forgot that an apt upgrade will replace the .deb I downloaded from the 14.04 repository with whatever is in 16.04.

When I tried to do a unison sync, I got an error.

How do you put a package "on hold" in Ubuntu? It's easy.

First I removed the "new" unison:

$ sudo apt remove unison

Then I installed my "old" one (which I had previously downloaded from the Ubuntu archive):

$ sudo dpkg -i unison_2.40.102-2ubuntu1_amd64.deb

Now I put the package "on hold":

$ sudo apt-mark hold unison

That's it.

Here is the output now for sudo apt update:

$ sudo apt upgrade
[sudo] password for steven:
Reading package lists... Done
[sudo] password for steven:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  unison
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Mon, 17 Apr 2017

I reinstalled the Windows Subsystem for Linux, got a new Ubuntu LTS and now have my scripts back

After a Windows 10 update hosed my laptop and took the Ubuntu/Bash command line (aka the Windows Subsystem for Linux) and all of my scripts along with it, I restored Windows 10 from the laptop's backup partition, and activated the Windows Subsystem for Linux (aka WSL).

This time around I got Ubuntu 16.04 rather than 14.04, which is overall better because there are some really, really old packages in 14.04, including a super-old nodejs. Unfortunately, the old unison in 14.04 matched what is on my server (and unison versions across computers must match, or they don't work).

Luckily I was able to download a 14.04 package from the Ubuntu archive and install it in the 16.04-powered WSL. I restored my scripts, including one I made that is very WSL-specific: It takes all of the files in a Windows directory (usually images, sometimes text documents, but it could be anything), copies them into a working directory in the WSL and uses chmod to change their permissions to 644. That way I can download images while in the web browsers of the Windows world, create text files, working on all of them with Windows tools, and then transfer those files into the Linux side, where I can sync them to the server's filesystem with unison.

Aside: It's not impossible to get a Unix-style ssh program that works from the Windows command line, but it's not at all easy, either. That makes the Windows version of Unison less than useful for working with remote servers.

Now I have scripts in the WSL to:

  • Transfer and apply proper permissions to image and text files from Windows to the WSL
  • Update this Ode blog using unison to sync files and then reindex the blog via Ode's Indexette
  • Create [a static blog archive[(http://stevenrosenberg.net/documents/archive.html) by using a custom Ode theme and a query to return all posts, using curl to bring the html down to the laptop, then copying it into the local Ode filesystem, and then syncing with the server via unison.

I have a feeling I've written about most of these scripts before, and if/when I find those entries, I will link them here. If not (or if there have been updates), I will write them up in the near future.

Why Unison? Unison is a file-synchronization tool. While files can be synced from one system to another with rsync, which I use for backups, the situation with this Ode blog is different. Anthor way to synchronize two filesystem is to use git, the version-control tool.

What unison enables me to do is make changes locally, or on the server, and then reconcile those changes across both systems. So if I write or edit a post on my local filesystem, or make any kind of change on the server, running unison ensures that I have the latest files (and versions of files) on both filesystems. If I used rsync, making changes on the server but running rsync on the client wouldn't work. Git would be great, except that it only reconciles changes in the filesystem that have been checked in. Changes on the server are generally not checked in, and even if I scripted that on the server, Ode (through its Indexette and EditEdit addins) itself makes changes to the filesystem and doesn't check them in. So git wouldn't work.

I came up with unison because it's the easiest. Another alternative csync2 looks a lot harder to figure out. But I do recommend csync2 if you're doing something heavy-duty with more than 2 servers.

When I started looking for this kind of tool, I knew what I needed was a kind of Dropbox for servers. I'm sure there are people who have hacked Dropbox to work on a non-GUI server. Actually that would be a pretty good solution.

The difference with unison is that you have to "consciously" run it to sync the two filesystems. You could run it as a cron job, or somehow set it up as a daemon (which might be how Dropbox works), but for the purposes of this particular blog, syncing when needed works fine.

Using the WSL has provided me the opportunity for the first time in quite a while, to set up unison. It's a great thing to run unison -batch and have the entire blog filesystem copied to an empty directory on my laptop in about a minute. (And then any changes I make on either laptop or server can be synced with another unison -batch, or just unison for a more interactive session. Plus, never underestimate software you can install yourself, on your own computers, and use as you wish. I pay for my shared-hosting service, but otherwise I run whatever software I wish without paying any monthly fees for any of it.

Are there other ways to keep two or more filesystems in sync? I'd sure like to know if there were.

Sun, 16 Apr 2017

Sharpening my Vim skills in the Windows Subsystem for Linux

I've always been able to get around in Vim, and before that vi. But it hasn't been my primary editor (except in college, where it was my only editor).

In my Linux systems over the last many years, I've gravitated toward Geany and Gedit, mostly using Geany, and using the terrific Notepad++ on Windows.

Now that I am using the Windows Subsystem for Linux (aka Bash command line supplied by Ubuntu), I have the full range of editors available in the Linux console. For whatever reason or reasons, I'm not an emacs person, and I'm not afraid of modal editing, so Vim it is.

This gives me the opportunity to really learn Vim. Already I'm figuring out things in Vim's command mode, like w taking you from word to word and stopping on the first letter of each word, with e doing the same except stopping on the last letter.

Typing gg in command mode gets you to the top of a file, and G (and also L) gets you to the top of the final line. G$ gets you to the end of the final line.

x deletes a single character, dw deletes a word, dd deletes an entire line and d$ deletes from the cursor to the end of the line.

It's nothing like a "standard" GUI editor, but a lot of it falls right under the fingers. While I have used an adm3a terminal, it's been long enough that I didn't know the reason for using the esc key to change from insert to command mode was the placement of the esc key on the adm3a -- where the "modern" tab would be.

To make it easier to change modes, I don't want to remap tab as esc but could try remapping caps lock as esc, or using ctrl-[, ctrl-c or alt-space as esc alternatives. Thus far it doesn't look like remapping caps-lock in the WSL is all that easy.

Tim Berners-Lee, Inventor of the Web, Plots a Radical Overhaul of His Creation

Tim Berners-Lee, Inventor of the Web, Plots a Radical Overhaul of His Creation https://www.wired.com/2017/04/tim-berners-lee-inventor-web-plots-radical-overhaul-creation

Fri, 14 Apr 2017

Windows 10 update hoses my laptop

I ran Fedora from F18 through 25 and never had a problem getting my laptop to boot and run. But in my first month as a Windows 10 user, an upgrade has already hosed my laptop, causing me to restore it to its original state and reinstall my applications.

I'm not sure what the update was supposed to do, only that it was big and would require a lot of time and a number of reboots.

After a bunch of those reboots and a lot of time, I was left with a black screen and a cursor. That's it.

I could ctrl-alt-del and get a prompt to shut down, but I couldn't do anything else. I think the updates "broke" the video driver.

So since I only had a month "invested" in the OS, I could have wiped the entire thing and put Fedora on the laptop. But I decided to give Windows 10 another chance. I liked having the Ubuntu command line, even though it was the ancient 14.04 instead of 16.04. And I had my blog set up to deploy from that Bash command line.

I opted to reinstall the system and keep my user files, which is one of the options available on this HP Envy laptop. I assume it's the same (or nearly so) on most PCs. There is a "restore" partition that contains a copy of the original OS files, and that is what is used to reinstall the system software.

That operation took a long time, but at the end of it I had a working Windows 10 laptop once again. All of my user files were intact. But as promised, my applications were all gone. I did get a handy HTML list of them, mostly with links to the project web sites. However, I did have the install files for all of them in my Downloads file, and all I had to do was reinstall.

I did lose lots of configuration files.

I still have Vim and Gvim WITH configuration files because I elected to use the binaries from my Downloads file and not "install" them the usual Windows way. So when my laptop came back, the only application icons on my desktop were vim and gvim.

In a more grim note, the Windows Subsystem for Linux, aka the Ubuntu command line, aka the Bash command line, is NOT in any user account, nor are the files I created in Bash. That means when I did the reinstall I lost the WSL and everything in it. Pro tip: Back up your WSL files!!

I can re-create what I did in the WSL, though I won't be happy about it. And I have no idea if the laptop now has the update that broke it yesterday, or if it's coming down the pike in the days or weeks ahead. I'm certainly not going to go to the Windows Update screen and click anything that reads "update now," or whatever it says.

I have heard about this black screen issue here and there, but it doesn't seem to be widespread enough to cause any kind of massive panic. And while I'm sure there is some slick way to fix what was broken, I couldn't figure that out, and doing the restore (while keeping my user files) was the quickest, easiest way to get going.

And to elaborate on what I say at the top, if you "keep your nose clean" in Linux, meaning not try to use proprietary video drivers or do anything stupid with dodgy packages, it's pretty hard to unknowingly kill a working Linux installation. I thought the same was true for Windows, but now I know otherwise.

Update: I reinstalled the Windows Subsystem for Linux, and this time I got Ubuntu 16.04 and along with it a much newer node.js (good because 14.04's hella old) and a newer Unison (not so good because now I have to find this same version for the CentOS server I use to host this site). The Unix gods, they giveth, they taketh.

Caveat Emptor: Windows 10 is not a beta, but the Windows Subsystem for Linux is. Back up everything. All the time.

Windows Subsystem for Linux and Unison update: My "old" WSL was Ubuntu 14.04, which has Unison 2.40.102 in its repository. I have Unison 2.40.102 on my CentOS server, so that worked out. Unison requires the same version on both "sides" (i.e both servers/computers) to work. My "new" WSL is Ubuntu 16.04, and that offers Unison 2.48.3.

My choices were to a) get Unison 2.48.3 for CentOS 6, or attempt to compile it on the server (or a CentOS 6 desktop, which I don't have) or b) find Unison 2.40.102 for Ubuntu 14.04.

I thought that it would be easier to compile on the server. I got the source of Unison 2.48.3, but I ran into problems pretty quickly because I needed a newer ocaml. I was already getting in the weeds.

So I switched gears. Could I download a .deb package from the Ubuntu repository into the WSL and install it?

I got the Unison 2.40.102 from the Ubuntu 14.04 repository. Then I used apt to remove the Ubuntu 16.04 version of Unison.

Then I used dpkg -i to install the .deb. I ran unison -version. It was working, and provided the output I wanted: Unison 2.40.102.

$ wget http://mirrors.kernel.org/ubuntu/pool/universe/u/unison/unison_2.40.102-2ubuntu1_amd64.deb
$ sudo apt remove unison
$ sudo dpkg -i unison_2.40.102-2ubuntu1_amd64.deb
$ sudo apt-mark hold unison
$ unison -version

I had already restored my .prf file in the .unison directory (I call it ode.prf to sync this blog), and I ran the command I use for the first sync when all the files are on the server and none on my laptop:

$ unison ode -batch

The -batch switch lets unison sync all of the files without asking you to OK every single one.

I love that I can get a new computer, or start a new directory and use Unison to mirror what's on the server. More on Unison in my next post.

Wed, 12 Apr 2017

The Node in the Windows Subsystem for Linux is so old, I installed Node for Windows

I want to run Node, so I figured that I would install the package from the Ubuntu LTS in the Windows Subsystem for Linux and just use it from the Ubuntu commmand line in Windows 10.

But I soon learned that the nodejs in the WSL is v0.10.25. That is hella old. Early 2014 old. No ES6 old.

I don't want to mess with the WSL environment too much, and I have no idea what kinds of binaries from outside the WSL will even work (if any of them will). But I wanted a newer -- a much newer -- Node.

So I installed the Windows version of Node -- the Current version -- which is v7.9.0.

That is a lot newer.

I'm not building major web applications with Node. I'm mostly using it to learn Javascript and even do some traditional scripting that I might otherwise do in Ruby or Bash.

Now I'll be doing that in the Windows command line and not the Windows Subsystem for Linux (until I can no longer hold out without a full, "modern" Linux distribution like Fedora on this laptop).

Update: Node v.0.10.25 in the Ubuntu Trusty LTS is super, super old. For comparison's sake:

Ubuntu Trusty: Node v0.10.25
Ubuntu Xenial (newer LTS): Node v4.2.6
Ubuntu Zesty: Node v.4.7.2
Debian Jessie: Node v0.10.29
Debian Stretch: Node v4.7.2
Debian Sid: Node v4.8.2
Fedora 25 and 26: Node v6.10.2

Even Debian Jessie has a slightly newer nodejs than the Ubuntu LTS in the Windows 10 WSL. There is a way to update the Ubuntu in the WSL from 14.04 to 16.04. Might be worth a look for me.

Update: After a Windows 10 upgrade hosed the laptop, I restored Windows and reinstalled the Windows Subsystem for Linux after that. My user files were preserved, but I lost all of the files I created in the WSL.

Moral of this story: Back up your Linux files. You can back them up in your Windows user files. I would recommend making a habit of using the WSL/Ubuntu command line not in the WSL's traditional /home directory but in your Windows user area. However, things that are complicated (and particularly which involve setting Unix-style permissions) cannot be done successfully on the Windows side. Among these "complicated" things are the use of Unison to sync two filesystems on different computers. The Ubuntu/WSL version of Unison works great in the WSL but throws errors aplenty when used on the Windows side. (One solution is to use the Windows version of Unison, but I'm a whole lot of hacking away from getting ssh working on the Windows command line in a way that Windows Unison finds acceptable; It's not as easy as subbing PuTTY's plink command-line tool.)

My new WSL turned out to be 16.04, not 14.04: This "solved" my Node problem, as I got 4.2.6 instead of 0.10.25, but I also got a newer version of Unison (and had to download, install and "hold" the 14.04 version).

The newer Node in Windows: So I could make better use of Node in Windows, I installed the Windows version of Vim, making sure the console version was included and .bat files were created so I could use Vim to edit files for Node from the Windows command line, which is somewhat of a mystery to me as I've barely used it (and many years ago at that).

Mon, 10 Apr 2017

Rediscovering PuTTY in Windows

Been a long time since I used PuTTY in Windows to ssh into a server. Using it again and looking into plink.

Fri, 07 Apr 2017

This is what happens when you create a file in the Windows Subsystem for Linux and try to edit it with a Windows application

As I experiment with the Windows Subsystem for Linux (aka the Bash shell provided by Ubuntu for Windows 10), I am trying to figure exactly what I can and can't do.

To that end, I created a file with Vim in the WSL. Then I tried to open it with a text editor in Windows. I get this popup that says I can't do it:

In case you're not seeing the image above (and because Google), the Error dialog reads:

Error saving file. Error renaming temporary file: Permission denied

The file on disk may not be truncated!

I also tried to use the Windows file manager to drop the above image, created in Windows, into the WSL portion of the disk. That file "shows" in the Windows file manager, but it doesn't appear at all in the Bash shell. I had to use Bash to copy it from the Windows side to the WSL/Linux side: That's what works, in case you were wondering.

I really need an easy drag/drop between Windows and the WSL ...

Update: This issue is addressed in a very interesting bug report with a lot of links I need to explore.

Also, in the image file I copied from Windows into Bash on Windows (as Microsoft seems to like to call it), the .jpg file was too wide open on permissions. It was 777, and I wanted 644. I made the change in Bash and am syncing with the server.

Wed, 05 Apr 2017

Managing Ode with Unison via the Windows Subsystem for Linux

Update: While it seems fairly easy and routine to create and edit files on the Windows side of the filesystem using both Windows and WSL/Linux applications, when I tried to use the WSL-based Unison to sync files onto the Windows filesystem, I got a ton of permission errors and a failed sync. So the "dream" of maintaining a Windows system with WSL utilities probably won't happen. The two solutions for this particular problem are a) use Windows utilities on the Windows side and b) use Linux utilities on the WSL side.

The original entry begins here:

Now that I have my new HP Envy 15-as133cl laptop running Windows 10 and have added the Windows Subsystem for Linux, I'm exploring just how many of my regular Linux tasks I can do in this Ubuntu-supplied Bash shell, what I can do with similar programs compiled for Windows, and what really needs a dedicated Linux partition (or full computer).

Chief among these tasks is updating/syncing/backing up my Ode-generated blog (the one you're reading right now).

The first thing I learned about the Windows Subsystem for Linux (WSL for short) is that you can access the files you create in the WSL via the Windows file manager, but any modifications you make on the Windows side will not, I repeat WILL NOT be reflected in what you can see on the Linux side.

Read the rest of this post

Tue, 04 Apr 2017

Make a website with Ember - great introduction to a framework

I really like the idea behind Less than *ambitious* websites with Ember.js, in which author sheriffderek goes through the steps required to create a simple web site with the Ember JavaScript framework.

Easing into a framework -- that's the way I want to do it.

Thu, 30 Mar 2017

React-Redux links by Mark Erikson

React-Redux links by Mark Erikson https://github.com/markerikson/react-redux-links -- an excellent list that also covers learning JavaScript

Learning to code when you’re busy

Learning to code when you’re busy https://medium.com/the-odin-project/learning-to-code-when-youre-really-dang-busy-e223a7f84758

Wed, 29 Mar 2017

Using highlight.js for code syntax highlighting on your web site

I first learned about highlight.js while trying out the Go-based Hugo blogging system, where it is a popular choice for adding syntax highlighting to blocks of code displayed on web pages.

Another solution is Pygments, but I didn't want to wade into Python, and a pure JavaScript solution like highlight.js seemed easier all around.

I had already used highlight.js successfully in a couple of Hugo themes, one in which I did the installation myself and another that had it built-in.

So it was only a small leap to do the same on this Ode site.

The instructions are clear (and easy), and the highlight.js developers allow you to create a custom download via check-boxes to include only the languages and markup you want to use on your site. That same page has info on using two separate CDNs (content delivery networks) to deploy highlight.js on your web site, but I opted to create my custom bundle and host it on this site as part of my main Ode theme.

Once you have the Javascript and CSS on your site and are calling it into your web pages, everything between <pre><code> and </code></pre> will benefit from highlight.js' syntax highlighting.

And as you can see, it works.

The only time this kind of syntax highlighting gets problematic is when displaying HTML, where you need to replace < with &lt;, > with &gt; and so on.

Here's a small bit of Ruby so you can see what the syntax highlighting looks like without leaving this post:

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

Eloquent JavaScript - Chapter 2 exercises - Fizz Buzz

I'm not saying I will make it through all 22 chapters of "Eloquent JavaScript," by Marijn Haverbeke, but enough people I respect have recommended the book that I'm doing my best to absorb what I can from it.

To that end, I am doing the exercises in the back of each chapter, and I plan on presenting my solutions here.

This entry also serves as a test of the Highlight.js JavaScript library, which I just added to this Ode site for syntax highlighting of code. I'm using the zenburn CSS.

Back to "Eloquent JavaScript." If you don't want any hints, don't go past the blog index. I will only start showing my code after the "read more" portion of each entry.

Before maybe a year ago, I'd never heard of Fizz Buzz, where you write a program that outputs the words Fizz, Buzz or Fizz Buzz depending on whether a number is divisible by 3, by 5 (and not 3) or by 5 and 3.

Fizz Buzz is supposedly used as a programming test in hiring. I was surprised when it was given as the second exercise in Chapter 2

Read the rest of this post

Thu, 23 Mar 2017

Coming over to the dark side

I recently received a too-expensive birthday present: a new laptop.

For the women in my life, seeing all those keys pop off was too much I guess.

The HP Pavilion g6-2210us is still kicking as it nears the 4-year mark. That's a modern record for me. My previous laptop, the Lenovo G555, died just after its second year of service. I still have a second replacement keyboard still on the way from China for the HP Pavilion.

Once I get this new laptop fully set up, at some point I'll pop a new hard drive into the old HP. The current drive has a lot of bad sectors. A lot. Then I'll run it as a full Linux system with no Windows partition.

So what about the new laptop?

It's an HP Envy 15-as133cl 15t with Intel Core i7, 1080p resolution, 16GB of RAM and a 1TB spinning hard drive.

The case is all metal, which is quite an upgrade from my previous all-plastic laptops.

It has Windows 10. The first thing I did was install the Windows Subsystem for Linux so I could have Bash in the terminal and access to thousands of console-based applications from the Ubuntu archive.

Read the rest of this post

Sun, 12 Mar 2017

Read all of Manton.org

Read all of http://manton.org. Deep thoughts on the social and personal web.

Mon, 06 Mar 2017

I install a Netgear AC750 WiFi Range Extender

I install a Netgear AC750 WiFi Range Extender http://stevenrosenberg.net/hugo/post/2017_0304_wifi_range_extender

Wed, 01 Mar 2017

Whiteboard interviews ensure biased hiring in tech, and programmers are calling them out

Whiteboard interviews ensure biased hiring in tech, and programmers are calling them out https://theoutline.com/post/1166/programmers-are-confessing-their-coding-sins-to-protest-a-broken-job-interview-process

Tue, 28 Feb 2017

WordPress WordAds revenue expectations are depressing

I've been going through the excellent WP Tavern blog on WordPress news today, and I stumbled across this post on how much bloggers can expect to earn from the Jetpack-powered WordAds platform.

tl;dr: Not very much. But the numbers are all over the map. One thing WordPress tells you: better content, more money.

Linked from the article above, a blog that makes about a month from WordAds on 2,600 to 16K page views.

WP-CLI is so very, very cool

At the moment, I only have two WordPress sites for which I have shell access, so WP-CLI shouldn't be a big deal for me. But it is.

The whole idea of managing WordPress.org sites in the console (and being able to avoid the WP Dashboard) is such genius, I wonder why nobody thought of it before now.

The possibilities, especially when WP-CLI is combined with traditional shell scripting, are many. From updating the software, installing and managing plugins, this drags WordPress into a realm where sysadmins can really get things done and save a lot of time doing it.

I still have blogs littered all over the place

I wrote into two blogs that I rarely think about:

Gathering up all of my blog entries from everywhere and putting them under one site has always been in the back of my mind. I have taken steps to do this, especially grabbing entries from WordPress sites en masse, but I have yet to write and deploy the scripts that fixes the metadata and image links to really make it happen.

My "old" WordPress blog is pretty deep in terms of content. It was active from 2005 through 2009ish. Combine that with my Daily News-hosted tech blog, active from 2006 through 2011 (with a smattering since then) and my other Daily News-hosted personal blog, active from 2006 to maybe 2009 with a trickle since then, you have a lot of blog posts.

Even though I wrote three WordPress posts today, I'm still a lot more interested in writing for the blogs that use "flat" files like this Ode system or my new, experimental Hugo site.

If and when I do get the ability to take the output from WordPress data dumps and turn it into text and image files that can work in flat-file blogging systems, then I'll have a huge archive of everything, however dubious it may be.

Mon, 27 Feb 2017

I finally replaced my HP Pavilion g6 keyboard

I had a new keyboard, and my "n" key on the old one broke again (the replacement was never as good as the original key), so I decided to pull the laptop apart and install the new keyboard.

While putting it all together, I did get one little screw wedged in a plastic hole (I'll extract that one later and replace it), but an old laptop can get along with many fewer case screws than it ships with. If you've ever had a used or otherwise repaired laptop, you know what I'm talking about.

The keyboard replacement wasn't too hard. I probably took out a lot more screws than needed to make it happen. I could have just removed the back panel, unscrewed the keyboard-retaining screw (that's the wedged-in-plastic one) and popped the keyboard out from behind/below by aggressively pushing on the proper spot with an eraser-tipped pencil.

I tried that, and it wasn't happening. I knew the keyboard was held in "tight" due to the last time I tried to replace it when I had the wrong part.

So I took out a bunch more screws and then tried again. The extra screws probably didn't need to be removed, but at that point I was more confident in the amount of pressure I was putting on that eraser-tipped pencil to push the keyboard out through the top of the laptop's plastic case.

I got the keyboard out and pulled the ribbon cable.

Inserting the new keyboard's ribbon cable wasn't instant. It took me a couple of minutes to figure out how it snapped in. But I got it done, snapped the keyboard itself into the case and closed everything up.

It all works, and now I have a new keyboard on this laptop that will be 4 years old in a couple of months.

This keyboard isn't a "springy" as the other replacement keyboard I bought a few months back that didn't quite fit, but it'll do the job and give this laptop some more useful life.

My last laptop, a low-priced Lenovo G555, only lasted 2 years before it went to sleep and never woke up. This also-cheap HP Pavilion g6-2210us is still running at nearly 4 years old, but not without effort.

It just underscores my contention that you can't really get 5 years of service out of a laptop. If they don't fail mechanically or electronically, they'll be ancient in some other way. I'm no longer saying "don't pay more than $500 for a laptop," because I see real differences between the $500 and $700-900 laptops being offered these days. But I will say that no matter how much you pay, if you're beating the hell out of it like I do, don't expect more than two trouble-free years.

* Pictured above is the new keyboard before I put it in. After removing the hatch at the bottom of the laptop and removing a retaining screw, there is a little hole on which you can push at the keyboard from below with an eraser-tipped pencil and loosen its plastic grip with the case enough to start unsnapping it the rest of the way around for replacement.

Fri, 24 Feb 2017

'Big Bang Theory's' Stuart wears Ubuntu T-shirt

Am I the only person to notice that comic book shop-owning Stuart (Kevin Sussman) on the "The Big Bang Theory" is wearing an Ubuntu T-shirt on the episode airing Thursday, Feb. 23, 2017? (It's Season 10, Episode 17, if that information helps you.)

The T-shirt appearance isn't as overt as Sheldon's mention of the Ubuntu Linux operating system way back in Season 3 (Episode 22, according to one YouTube video title), but it's an unusual return for Ubuntu to the world of "Big Bang."

What does it mean that the show's most loserly character is a Ubuntu fan?

Tue, 21 Feb 2017

Tim Buchwaldt: Rails is f*cking boring! I love it

Tim Buchwaldt: Rails is f*cking boring! I love it. https://medium.com/@timbuchwaldt/rails-is-boring-thats-great-f896e9ab2cb#.djk89skub

Mon, 20 Feb 2017

Fixing Fedora 25 upgrade issue with iptables

Are you having the same problem I've been having with Fedora 25 updates and something having to do with iptables?

I found the answer in the Fedora Forums:

You need to get rid of this old package first, then do the software upgrade:

$ sudo dnf remove system-config-firewall-base

Then do your usual upgrade, either in your favorite GUI (Whatever GNOME is using or yumex-dnf) or dnf in the terminal:

$ sudo dnf upgrade

This is very likely only an issue if you've been upgrading the same system since Fedora 21 (and I have).

.@netlify positions itself as a beast on static-site delivery

.@netlify positions itself as a beast on static-site delivery https://www.netlify.com/features/

Choosing a Hugo theme, Part 1

Choosing a Hugo theme, Part 1 http://stevenrosenberg.net/hugo/post/2017_0219_choosing_a_hugo_theme_part_1/ @golang #Hugo @gohugoio http://gohugo.io

Hugo community: Alternatives to Disqus needed more than ever

Hugo community: Alternatives to Disqus needed more than ever https://discuss.gohugo.io/t/alternative-to-disqus-needed-more-than-ever/5516

Fri, 17 Feb 2017

Aaron Patterson: I am a 'puts' debugger

Aaron Patterson: I am a 'puts' debugger https://tenderlovemaking.com/2016/02/05/i-am-a-puts-debuggerer.html

The @washingtonpost is becoming my go-to. Packed with news and intrigue, costs less than @nytimes

The @washingtonpost is becoming my go-to. Packed with news and intrigue, costs less than @nytimes.

I got 7-Eleven coffee today, it wasn't bad

I got 7-Eleven coffee today, it wasn't bad

Sat, 11 Feb 2017

Is this guitar worth $131,000?

Is this guitar worth $131,000? https://reverb.com/item/4209723-gibson-goldtop-1957-100-original

Sun, 05 Feb 2017

Free Code Camp computer science and web development pathways

Free Code Camp computer science and web development pathways https://forum.freecodecamp.com/t/computer-guide-web-development-with-computer-science-foundations-comprehensive-path/64516 https://forum.freecodecamp.com/t/computer-guide-computer-science-and-web-development-comprehensive-path/64470

How focused do you have to be to become a software developer?

How focused do you have to be to become a software developer? https://firstdevjob.com/stories/taylor-milliman/

Fri, 03 Feb 2017

At jury duty, and boy are my arms tired

It's been years since my last call for jury duty, and I find myself once again in the Stanley Mosk Courthouse in downtown Los Angeles.

Except last time they sprung me by noon. And today I'm still here at 3:30 p.m. I didn't get called for any panels, and I suspect there won't be any more need for jurors today. Yet I am still here.

I took the Metro Orange Line to the Red Line to get here, and I was surprised (though I shouldn't have been) to see the refurbished Pacific Electric Train Depot at the end of the Orange Line open and serving Groundwork Coffee. Love that coffee. I smell a bike ride down the Orange Line in my future.

This was also my first time taking the fancy new underground pathway (you can call it a tunnel) on Lankershim Boulevard from the Orange Line terminus straight into the North Hollywood Red Line Station. That is slick, and I'll thank all the politicos who helped make it happen, including Rep. Brad Sherman, City Councilman Paul Krekorian and anybody else I missed. This is the kind of thing the San Fernando Valley needs, and I'm glad it now has it.

During the long lunch break they give us chickens jurors, I walked around a bit. I haven't cracked the code for this part of downtown (Music Center and Civic Center). Grand Park is nice but smaller than you think it is. Other than all the Music Center and Civic Center buildings, there's nothing here. I passed by the Colburn School and saw a sole classical-music student making her way into the building.

If you're looking for something other than huge buildings, I guess you have to truck it to Little Tokyo in one direction or Chinatown in the other.

Gadget-wise, I didn't bring my laptop, just the tablet and wireless keyboard and mouse. I can't use all three at once because there are few table- or desk-like surfaces here. Just my actual lap and a book I brought that is serving as a small table for the keyboard while I balance the tablet with its built-in magnetic stand on my knees. Weak as shit. Whatever.

I got through a few hundred Disqus comments from my day job, deleted a couple of months' worth of personal e-mail clutter and checked in with the news via Google and Twitter (Trump, Trump travel ban, Uber guy says no to Trump, Snap as in Chat gets ready to IPO, Facebook's Zuck is either clueless or crafty, Trump, Trump), and then got the keyboard out to write a bit.

A few months ago, I did a whole setup on this tablet to use my day job's CMS -- the awful Saxo Mediaware Center via Citrix -- but I soured on it like I've rarely soured before when I realized that putting Citrix in the background, as one does with everything in Android all the time, results in my losing the connect to the app's Citrix-connected server. Call it a nonstarter. I'm slated to say goodbye to Saxo and Citrix in a few months, and it couldn't be too soon.

Meanwhile, Jury Duty Lady, let us go home!!!

Update: 3:40 p.m. It's over. I'm done with jury duty for 2017.

A couple of observations: All buses and trains I was on were crowded, so Metro seems to be doing more than fine ridership-wise. And I don't recall seeing any law enforcement presence at all on either line, whereas in the past the Metro system could be thick with deputies. Might be a byproduct of Metro's wish to either scale back or end its contract with the sheriff's department. Or not ...

Wed, 01 Feb 2017

After all these years and two companies, Java still pushing crapware on Windows users

Just did a Java update on my workplace Windows desktop. From Sun to Oracle and decades in, the Java updater is still pushing crapware, this time an Amazon app.

Fri, 27 Jan 2017

George Orwell's '1984' is the No. 1 seller on Amazon

George Orwell's '1984' is the No. 1 seller on Amazon https://www.amazon.com/1984-Signet-Classics-George-Orwell/dp/0451524934 It's also sold out.

Why you might not be getting 5G data service anytime soon

Why you might not be getting 5G data service anytime soon https://www.wirelessweek.com/article/2017/01/why-carriers-are-secretly-anxious-about-leap-5g

Thu, 26 Jan 2017

Free Meteor.js hosting is back with meteor-now

Free Meteor.js hosting is back with meteor-now https://forums.meteor.com/t/super-simple-and-free-meteor-deployments-using-zeit-now/33214

Photos: Cruising Van Nuys Boulevard in the '70s

Photos: Cruising Van Nuys Boulevard in the '70s http://www.cnn.com/2017/01/25/autos/gallery/tbt-cruising-van-nuys-los-angeles

PulseAudio 10.0 now in Fedora 25

PulseAudio 10.0 now available for Fedora 25 https://fedoramagazine.org/pulseaudio-10-0-fedora-25 (And I can report that it is working)

Mon, 16 Jan 2017

There is an rsync for Windows, and it works

I've been meaning to look into backup solutions for Windows, and while there should eventually be a full Ubuntu Linux shell coming to Windows 10, it's not there yet unless you tweak things that I can't ask other users to do.

So I figured that when the Linux shell comes to Windows, I'll use rsync, the Unix/Linux backup utility I've been using for years.

I just found out that there's already an rsync port to Windows called cwRsync that you can pay for, with a free command-line-only edition available for download.

Since I use rsync on the command line in Linux, why do I need the GUI in Windows? I don't.

So I downloaded it, unzipped it all, put my rsync command into the cwrsync Windows Command Script file, and it worked right out of the box.

So far my tests have been small ones that haven't involved ssh into remote servers (I do backups to USB hard drives anyway), but I am very confident that cwRsync will work well for full Windows user-file backups. Plus it's free and nobody's going to bug you about buying anything ever.

Sun, 15 Jan 2017

Check out the Categories feature in the right column

I originally coded the categories listing as part of the overall Counter addin to Ode early last year, and Ode project leader Rob Reed lent his expertise to the addin, optimizing the code and squashing a few bugs in the process.

I had the categories listing in my right-hand column for a while, but since this Ode site has a LOT of directories/folders in it, that display made the right side of the page super long.

So I wanted the ability for readers to show/hide that listing. I didn't want to use jQuery, but I was very open to using vanilla JavaScript to make it happen.

And so I did. I looked at a lot of tutorials on how to hide the content of HTML divs (i.e. the stuff between a <div> and a </div>), and this one struck me as both simple and effective (meaning it's short and it works).

So now you can click Show / hide categories on the right to see the entire structure of the documents directory and drill down into topics that may be of interest.

Rob did a lot of work on my code, and I looked back at our e-mail thread from March 2016 and realized that I'm not even running the most recent version of the Counter addin on this site. Once I get that up and running, I will work on expanding the documentation on how to use the addin and then make it available to all.

Thanks go to Will Master for the JavaScript and Rob Reed for the Perl.

Once I figured out the concept of an addin (or, at any rate, my addin), I was off to the races. It was basically, "figure out what you want to display, figure out how to pull the information using Perl and the Ode addin structure, then drop tags into my Ode template to display the information."

Of course you can also say, "Here are things I can do in Perl, maybe it will be cool to put that on the web site." I guess I did a little of that, too.

However you slice it up, writing code and seeing results on a live web site is fun. In the Ode world, you can do that with HTML and CSS just like with any web site, and you can also write Perl addins. With this most recent hack (the show/hide), it was a matter of "appropriating" some vanilla JavaScript to add a feature I've been wanting for some time.

Wed, 11 Jan 2017

Preloaded Linux laptops are probably not encrypted

Even though preloaded Linux laptops like Dell's new Precision 3520 are a great thing -- and can save you $100 in this case, I'd probably have to reinstall because a factory image of the operating system most likely doesn't take into account one thing I want in any desktop Linux system: full disk encryption.

From the days when I ran Debian, through today's Fedora 24, I opt for full disk encryption in the installer. It's the right thing to do. If your laptop falls into the "wrong" hands, your data is encrypted and away from the prying eyes of whoever gets your gear.

Windows users can take advantage of disk encryption ... in some cases. While the Home edition of Windows 10 doesn't offer it, the Pro/Enterprise edition does have an option to encrypt your data.

It's nice that the installers of many major Linux distributions, including Debian, Fedora, CentOS/RHEL and Ubuntu (and its many flavors) offer full disk encryption (not just user files, though Ubuntu does offer a user-files encryption option) -- and any user can take advantage of that protection for the low price of $0.

Dell’s new professional-grade laptop is $100 cheaper if you buy it with Ubuntu

Dell’s new professional-grade laptop is $100 cheaper if you buy it with Ubuntu http://www.omgubuntu.co.uk/2017/01/dell-precision-3520-ubuntu-laptop

Thu, 05 Jan 2017

Ross Mayfield: The coming tech backlash

Ross Mayfield: The coming tech backlash https://www.linkedin.com/pulse/coming-tech-backlash-ross-mayfield

Tue, 03 Jan 2017

Adding memory to a laptop when they don't want you to add memory

When we bought my daughter a cheap Asus laptop a couple of years ago, I knew it had only 2 GB of RAM. But I also knew, or thought anyway, that I would add memory at some point in the near future. After all, upgrading memory is easy, right?

The answer is yes, I suppose, if you have the kind of Windows laptop where you can get the battery out by switching a lever. The hard drive and memory are a plastic door and a couple of screws away.

That's how it is on my 2013-purchased HP Pavilion.

But on my daughter's 2014-made Asus Aspire E15 laptop? Nope (battery access), nope (hard drive access) and nope (memory access).

To do anything -- change the hard drive, memory or even the battery, you have to remove 18 screws from the bottom of the case, crack it open with a case-cracking tool (I use a little plastic spatula from a long-dead and -gone mini food processor), and then start taking off parts.

To get to the RAM module on this Acer, you have to remove the hard drive, pull about a dozen cables of various types and then remove the entire motherboard from the case BECAUSE THE RAM IS ON THE BOTTOM.

If I hadn't pretty much torn down and rebuilt more than a couple of laptops, I wouldn't have even attempted it.

It's frustrating. Laptops traditionally allow the user to swap in new RAM and hard drives. You might want to do an upgrade, or a drive can go bad. And batteries? Mine last about a year and a half, and then I need to replace them.

So now that tablets are ubiquitous and are basically glued together, laptops, especially cheap ones, are not serviceable or upgradable?

If the hard drive dies or I need more memory, it's just tough tacos?

No. I do not accept that.

Read the rest of this post

Sun, 01 Jan 2017

JavaScript books for 2017

"Eloquent JavaScript: A Modern Introduction to Programming" by Marijn Haverbeke

"Learning JavaScript: JavaScript Essentials for Modern Application Development" by Ethan Brown

"Speaking JavaScript: An In-Depth Guide for Programmers" by Dr. Axel Rauschmayer

"Learning JavaScript Data Structures and Algorithms" by Loiane Groner

"You Don't Know JS" (series) by Kyle Simpson

"Programming JavaScript Applications: Robust Web Architecure With Node, HTML5 and Modern JS Libraries" by Eric Elliott

Sat, 31 Dec 2016

The guitar is wood and strings and fingers

I found this picture of my 1976 Gibson ES-175 in my 2016 photo folder. I now remember taking it to show my new guitar-playing friend Dave Green what the guitar's pickguard looks like so he could compare it to his Japanese-made ES-175 copy.

Here you see much of the guitar's body. What pegs it as a 1970s Gibson archtop electric? It has chrome pickup covers and a chrome tailpiece (as opposed to nickel, which tends to age, albeit gracefully) and "witch hat" volume and tone knobs. The nickel covers -- made famous on the rare and pricey PAF (Patent Applied For) humbuckers -- tend to age, albeit gracefully. I believe Gibson introduced the "witch hat" knobs in the late 1960s. Earlier Gibson electrics came with "top hat" or speed knobs.

You can't see it here, but the neck is made of three pieces of maple (as opposed to a single piece of mahogany on earlier models) and includes the thickened "volute" near the nut, meant to strengthen the neck at the point where many Gibson's suffer from catastrophic breaks.

All three of those things contribute to neck strength: maple instead of mahogany, laminated instead of one piece, volute instead of no volute. The volute was unpopular and eventually discontinued. It doesn't bother me. I kind of like the "feel" of knowing I'm at the end of the neck.

The bridge on this guitar, for this year of production (1976) is a bit of an anomaly. It's a compensated rosewood bridge, the kind that Gibson had been using for decades on its archtop guitars, both acoustic and electric. I call it an anomaly because one of the changes Gibson made on the 1976 ES-175 is switching from the traditional wooden bridge to a metal Tune-O-Matic like you would find on a Les Paul or ES-335.

Read the rest of this post

Cut down a #4 coffee filter into a #2

So you have the bigger Melita-style No. 4 paper coffee filters for 8- to 12-cup coffee makers and you need a smaller No. 2 filter for your single-cup pour-over cone filter (or 2-cup coffee maker)?

It happens more often than you think. I'm always running out of No. 2's and always have plenty of No. 4's. Mostly because Costco sells a huge pack of the larger filters.

You can just stuff the bigger paper filter into the smaller pour-over cone filter (I have both plastic and ceramic versions).

Or you can trim about an inch off of the larger filter. Use a scissors and follow the curve. It'll save you a trip to wherever coffee filters are sold and help you plow through your endless supply of No. 4's.

Wed, 28 Dec 2016

Eric Elliott on JavaScript

I am linking to these Eric Elliott articles on JavaScript programming because I don't want to forget about them.

Eric Elliott: 12 Books Every JavaScript Developer Should Read

Eric Elliott: The Software Developer’s Library: A Treasure Trove of Books for People Who Love Code

Eric Elliott: Learn to Code: 13 Tips that Could Save You Years of Effort

Eric Elliott: Native Apps are Doomed

Eric Elliott: Why Native Apps Really are Doomed: Native Apps are Doomed pt 2

Mon, 26 Dec 2016

A Chicago song I actually like

I've never been a big fan of Chicago, the band. I've heard this song before and had no idea it was by them. But I really like "Does Anybody Really Know What Time It Is?"

Lithub.com: The last bookbinder on the Lower East Side

The last bookbinder on the Lower East Side http://lithub.com/the-last-bookbinder-on-the-lower-east-side

Sat, 17 Dec 2016

My holy grail on self-hosted blogs? Local comments

My holy grail on self-hosted blogs like this Ode system? Self-hosted comments. Disqus is far from ideal.

Fri, 16 Dec 2016

Ode is a strong performer

Ode runs Perl via CGI on the server. That doesn't mean it is slow.

Turns out it is very, very fast.

I can render an index page with previews of every post (all 900+) in about 20 seconds.

Wed, 07 Dec 2016

Text processing in node (i.e. in JavaScript)

My last text processing project started in Bash, which which I'm more familiar, and then took a turn toward Ruby before returning to Bash when deadlines got tight.

Now I'm thinking about the next election-results script, which won't be using XML from the state of California but instead the space-delimited ASCII from Los Angeles County. Another developer handled that task in November, but I want to take a crack at it for March 2017.

My goal is a "universal" script that can work on any results file that the county provides without requiring a lot of hacking for individual races in any given election.

In other words, I want to write once, run many times.

I could do it in Bash. Or Ruby. But I might want to try JavaScript and run it with Node on the server (or, if the election is "small" enough, client-side in the browser).

LA County data is not standard. It's not XML or JSON (though the county DOES use JSON in its own results, it does not share that data with the media).

Instead, the county uses what appears to be a home-grown data format that is arcane yet well-documented.

Each line begins with an alphanumeric code, and data fields are placed on those lines at predetermined character lengths and predetermined positions.

So a script would have to create substrings of the data from each line. I'm thinking that I'll use the script to either create XML that I would then convert, or to skip that step and create JSON directly from the county's data.

Doing it in JavaScript would be an opportunity to learn more about the language (just like it would be for Ruby if I used that language; and the jury is most definitely out).

What muddies the water considerably is the fact that my company is also following elections in San Bernardino, Riverside and Orange counties. I know that San Bernardino doesn't really provide data at all. I generally scrape their web page on Election Night. I don't know what Riverside and Orange do.

So I'm going to focus on LA County for now. Another developer wrote the front-end code for the election-results display, and all I have to do is provide the JSON. I wouldn't be opposed to writing the whole app, but for now a "smaller" bite is a more realistic one.

XML to JSON in Javascript with enkidootech's xml2json

I'm exploring my options for coverting XML to JSON, even though I don't have any new XML coming my way.

I previously used a Ruby library and considered a different JavaScript library to do the conversion.

I just tested a different JavaScript library, enkidootech's xml2json, and that worked very well right out of the box.

Well, almost.

I tried to install it globally via npm, but my resulting JavaScript file didn't seem to be able to find it.

Then I used npm to install the package locally, and that worked. I have a node_modules directory in the same directory as my script, and it outputs JSON as expected.

I just took what enidootech offers as an example and put that in my file (which I named xml_to_json.js). I ran it with node and it worked:

// From https://github.com/enkidootech/xml2json

var parser = require('xml2json-light');
var xml = '<person><name>John Doe</name></person>';
var json = parser.xml2json(xml); 

console.log(json);

You get this:

$ node xml_to_json.js 
{ person: { name: 'John Doe' } }

Nice!

If my next script won't involve XML, what will it do? That's a question for the next entry.

Tue, 06 Dec 2016

CodePen: JavaScript Basics 2: Arrays and Loops

CodePen: JavaScript Basics 2: Arrays and Loops http://codepen.io/jakealbaugh/post/js-basics-2-arrays-and-loops

CodePen: JavaScript Basics 1: Functions and Variables

CodePen: JavaScript Basics 1: Functions and Variables http://codepen.io/jakealbaugh/post/js-basics-1-functions-and-variables

Thu, 01 Dec 2016

I tried to tweak my Fedora settings in KDE Plasma, and it screwed up everything in GNOME and Xfce

The morale of this story is that the KDE Plasma settings can screw up your Xfce and GNOME settings. So if you're using multiple desktop environments on a single system -- like my Fedora 25 laptop, or any other Linux system -- you could be in for some pain.

What I was trying to do is configure a dark theme for KDE Plasma (easy) and also use dark themes when running GTK3 and GTK2 apps on the Plasma desktop.

It looked pretty good in KDE Plasma, but things went pear-shaped in GNOME 3 and Xfce. My fonts were screwed up, Menus were gray type on a gray background, and icons were messed up -- with KDE icons bleeding into Xfce.

And then I had trouble logging in with Plasma at all. Blame the Fedora 25 upgrade (and KDE Plasma in general) for that one.

I first tried using the many Xfce configuration utilities to make it right. That didn't do much. I finally was able to log into Plasma (only after a reboot) and attempt to undo the damage. I was partially successful.

In GNOME 3, I had a lot of success with the GNOME Tweak Tool (which should be preinstalled on every GNOME system). I was able to use the Xfce Adiwata Dark theme to make even my GTK2/GTK+ apps look better in GNOME. The whole dark-themed GNOME experience is pretty much better than ever. So that's a win.

And I finally got Xfce looking right. I'm still having display font issues, but everything is more than good enough, and figuring out how to make dark-themed GNOME look better than ever is a bonus.

Wed, 30 Nov 2016

My new favorite TV show is @BetterthingsFX

My new favorite TV show is @BetterthingsFX http://www.fxnetworks.com/shows/better-things/about

AdamW on Linux and more: I don’t like computers

AdamW on Linux and more: I don’t like computers https://www.happyassassin.net/2016/11/04/i-dont-like-computers