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