Thursday, February 20, 2014

Yet Another Conway's Game of Life in Plain JavaScript

I know it's overdone


Really, really overdone... but it sure is fun to play with.  I was doing some "katas" (I actually hate that term for coding, but whatever), putting together a BinaryTree in JavaScript, and I thought... "Hey! I should do that Game of Life thing like everyone else does!"  But I decided to do it with plain ol' JavaScript.  JQuery is overkill for something this small, I think.

Anyhow, without further ado... Here's yet another Game of Life in JavaScript... All in JSFiddle so the code can be played with. And now I should go to bed and consider doing something more productive with my time tomorrow night.

Sunday, February 9, 2014

Ubuntu Beginner Pain: Installing Java 7

Motivation


I found I had to do this because I was having difficulty installing JetBrains' WebStorm on Ubuntu. In fairness I'm an Ubuntu neophyte. My exposure to Linux is generally small tasks done in a terminal on servers.


Mistake: Just Installing Oracle Java


The first thing I tried to do was just install Oracle Java. This would complete, but I would still have the wrong version of Java when I typed java -version in Terminal. This confused me for hours. I googled, and googled, and found about 20 different solutions that didn't work.  Finally ran into one answer that gave me a clue (I need to dig up the link, sorry). OpenJRE was gunking things up.


OpenJRE on Ubuntu


Ubuntu comes with OpenJRE stuff installed on it by default. I'm not at all sure what "OpenJRE" is or why it exists. It seems to be some sort of licensing issue deal were Oracle had a disagreement with Ubuntu and some weird new Java baby was born.

Either way, I want "real" Java, not whatever this is.... so let's get rid of it.


Answer: First remove OpenJRE, then install Oracle Java!


Here are the commands I ran to fix up Java on my machine. Annotated: