Title photo
frugal technology, simple living and guerrilla large-appliance repair
Sun, 17 Sep 2017

Building a Twitter clone with Meteor

From The Meteor Chef:

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.

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.

Sun, 02 Jul 2017

7 Strengths of #ReactJS Every Programmer Should Know About


Sun, 18 Jun 2017

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;
        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).

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