Many of my traditional blog post live on this site, but a great majority of my social-style posts can be found on my much-busier microbloging site at updates.passthejoe.net. It's busier because my BlogPoster "microblogging" script generates short, Twitter-style posts from the Linux or Windows (or anywhere you can run Ruby with too many Gems) command line, uploads them to the web server and send them out on my Twitter and Mastodon feeds.
I used to post to this blog via scripts and Unix/Linux utilities (curl and Unison) that helped me mirror the files locally and on the server. Since this site recently moved hosts, none of that is set up. I'm just using SFTP and SSH to write posts and manage the site.
Disqus comments are not live just yet because I'm not sure about what I'm going to do for the domain on this site. I'll probably restore the old domain at first just to have some continuity, but for now I like using the "free" domain from this site's new host, NearlyFreeSpeech.net.
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.
React-Redux links by Mark Erikson https://github.com/markerikson/react-redux-links -- an excellent list that also covers learning JavaScript
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 <, > with > 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
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