King of New York vs King of Toyko

Paco received a new copy of King of New York for Christmas and we had a family gaming session this afternoon.  I enjoy the game a lot more than King of Tokyo as there are a lot more choices to make in the game.  Just to give you a quick, basic rundown of King of Tokyo, each player plays a monster sent to terrorize Tokyo.  Whichever monster can accumulate the most fame (20 stars) wins the game.  You can also attack other monsters in the game, so if you are the last monster standing, you also win.  You do this with a Yahtzee style gameplay, where you roll 6 dice and can reroll them up to 3 times.  Each side of the die gives you different options of what you can do in the game.  

One of the changes that I really like in KoNY is the ability to not just attack other monsters, but instead attack buildings around New York. When you attack a building, you get a small bonus, but you also bring a military unit to your borough to help defend the city against your razing.  Another change in this game is that you can be attacked not only by other players, but also the military units defending the city.  It is a small change that increases the strategy of the game without changing the heart of it.  The game is still a last-monster-standing game or who can become the most famous monster in New York. 

The art and theme of the game are also great.  I found the theme to be even stronger in this game as opposed to its predecessor.  I love that the New York Marathon card doesn’t allow monsters to move unless they “pay”.  Much like in real life, you aren’t getting around the city easily if The Marathon is happening.  

King of Tokyo is a great game to play with kids but feels a bit lucky and mindless.  There are definitely decisions to be made, but there is a lot of luck involved.  I don’t see myself pulling this one out when I’m with a bunch of friends.  While King of New York still feels a bit sillier than my normal games, I think I’d enjoy having fun with some of my friends with this one.  There are plenty of ways to accrue points or knock other players out in KoNY that make it a much better option out of the two.  Adding in the King of New York: Power Up! expansion would make this game even that much better.  That expansion adds special powers and abilities for each character so that it makes each character play a little bit differently.

Our game today ended up with an early exit by Casey (not realizing her health was so low) followed by Paco getting knocked out (waiting a little too long to exit Manhattan).  I secured the win by gaining enough fame to be the SuperStar of New York and beating the last monster, Ladybug.  I see a rematch happening in the near future.

Ruby on Rails – deploying to Heroku

To deploy to Heroku, follow these steps:

  1. Open the Gemfile in your app.  Heroku doesn’t support sqlite3 (they support postgresql) so we have to change that.  Remove gem 'sqlite3' and put it near the bottom under group :development do
  2. At the very bottom of Gemfile, type
    group :production do
    gem 'pg'
This lets us use postgresql while developing but sqlite3 when we actually produce.

To get this to actually take effect, we need to commit to our repository.  We do this by typing this in shell: bundle install --without production.  Then log in to and find instructions for installing heroku toolbelt on local machine.  The course wasn’t clear about how to install locally, but I think this code should do it. curl | sh. I think the piece we are trying to install is called CLI (used to be called Toolbelt?). Type heroku -v to make sure heroku was installed correctly.

Now log in to heroku using heroku login. You’ll be redirected to a browser to login. We need to create an application in heroku for our application. To do that, use heroku create. If you then use git status you’ll see what hasn’t been committed and what has. Remember to use git add -a and git commit -m "whatever you want the message to be" to add the changed files to your commit.

Lastly, we need to add our ssh key to heroku.  If I don’t, it will continually ask me for my username and password.  Just use the codeheroku keys:add.   Once this is done, you should be able to push your application to heroku. When I tried to push the application to heroku, I ran into an issue because bundler had been upgraded to bundler 2.  I first had to run this command:  heroku buildpacks:set but then after that, I was able to git push heroku master to send the app to heroku.

That is completed and here is the site. To rename the site, use the code: heroku rename new-name-of-site (whatever you want it to be).

Ruby on Rails – Git & Github

I’m just using this to document what I’m doing to help solidify the work in my head. I’m also likely to come back here to reference different steps…

To be able to back up and save your program, I’m going to use The first thing you have to do is set up your ssh (which stands for secure shell). You can use the command cat ~/.ssh/ in the terminal. You then have to copy the code that is printed. Got to github, click to add a new SSH, and paste the code into the field. Once that is done, you should make a repository for each of the programs you will work on.

To create a new repository, you need to click on the “+” sign in the top right corner of and choose “New repository”.  Name the repository something that makes sense (probably the name of your program).  You’ll then want to follow the instructions to “push an existing repository from the command line”.

Before you can actually “push” your changes to a repository with git, you have to “commit” the changes. git status can always show you what files have been modified. Use git add -A to add a file to your local repository (local repo). Then use git commit -m "note to remind you what this is for" to commit that local repo. This just “saves” your changes, but it hasn’t uploaded it to github. To “upload” it to github, use git push to push the files to github.

Right now, I’m able to fire up a rails server and see what I’ve created in my own browser, but that is all local, nothing to show others or see online.  If I want to be able to show it to others, I need to deploy to production.  I’ll be using Heroku (which is a very common site to use) for this.

Notes for Rails – creating a new page

Just for those following along, I’m learning how to create a new app: How to create a new Rails application: rails new test_app (where “test_app” is the name of the program) and add an html to that page.

I first have to make a new route in the config folder in my new app.  I do that by loading my app in Atom (or a similar editor) and drilling down in the file tree to the config folder.  Open routes.rb and create a new path by typing get 'pages/home', to: 'pages#home'. This creates the route, but now I’ll need a controller and a view. To create a controller, find the controllers folder which is nested inside the app folder. Inside that folder, I’ll need to make a new file called pages_controller.rb. Once that file is created, I’ll need to put the following code in to inherit the stuff from the ApplicationController:
class PagesController < ApplicationController

Then inside the pages_controller.rb file and inside the class PagesController, I’ll need to define the action(method): home.
class PagesController < ApplicationController
  def home

The last thing I need to create is the template for the page. Navigate to the views folder and create a new folder titled pages. Inside that folder create a new file titled home.html.erb. That page is the actual webpage, so put “This is the home page”(or whatever you want).

One additional note: to add a ruby code to a .erb file, you have to put the code between <% and %> brackets.  If you want the code to actually show something on the screen of a web browser, the open bracket should be <%= and closing should be %>.  A link would be: <%= link_to 'Home Page', pages_home_path %> where 'Home Page' (is the text that will be the link) and pages_home_path is the path to the controller (pages) and the action or method (home) - which will get you to the actual Home Page.  Don't forget the comma between the two (I wasted 15 minutes forgetting that earlier)...

Also... instead of having to type to see the rails server, and then having to type to get to the home page, you can make be the home page.  You just have to go to the routes.rb (in the config folder and change the code from this:
get 'pages/home', to: 'pages#home' 
to this:
root 'pages#home'.
Once that is changed, make sure to update the path to <%= link_to 'Home Page', root_path %>

Ruby on Rails – progress #1

Image result for ruby on rails image

I’ve been enjoying the Udemy course so far, learning about methods, arrays, branching, iterators, and hashes.  So far things have made sense, and there have been a few small projects to work through that have made sense.  My brother gave me another suggestion today for another course.  This one is from FlatIron School and is called Coding Bootcamp Prep.  There also looks to be an Intro to Ruby but I’m guessing that what I’m learning with the Udemy course would cover all the basics.  I’m looking forward to having enough knowledge under my belt to start making my own program.  The course also gave another recommendation of a site to hone your basic skills: GitHub TryRuby.  Seems pretty doable.

Ruby on Rails – installation

I decided to take the plunge and shell out the $10 for a $200 Udemy class.  It has a lot of good ratings and I think it will be a good way to get to learn more about Ruby on Rails.  There are over 40 hours of video instructions and I’ve been able to follow along quite easily with them so far.  I’ve found that I’ve been watching a lot of TV recently and decided that I should probably cut back a bit or at least multitask and learn something with the extra time.  So Rails it is.  

My main goal is write a web app that will allow me to keep track of my Singles Tennis Ladder in a cleaner nicer way.  I think that should be pretty doable.  Another project I could work on is an attendance program for school (which we surprisingly don’t currently have).

The first thing I had to do was update my version of Ruby and Rails (and Homebrew) but after some googling, I was able to do it pretty easily.  I did have a slight hiccup with Homebrew. I kept getting an error that I didn’t have permission to write to /usr/local/, but after uninstalling and reinstalling, that took care of the issue.  I finally got it installed on my local machine and I’m ready to start learning some Rails!

Rainbow is her favorite color

If you know anything about my girl, she loves unicorns, slime, and rainbows.  She has declared rainbow her favorite color  .  Her brother, being the loving brother that he is, got her a rainbow craft for Christmas.  He was determined to get her a box of crayons and a canvas so that they could make a piece of art together.  We all finished it together last night and it came out great!  Good job, Paco! 

It was really fun to see how excited both the kids were to find gifts for others and how much joy it brought them to give those presents to others.  I felt like this was truly the first year they both got the importance of thinking of others not always being interested in receiving, but instead giving!

Ruby on Rails

I’ve always been interested in coding and try to teach myself different languages at different times.  I’ve dabbled in Ruby a while ago, but don’t remember a ton.  But I want to get better and would like to write a web app for our Tennis Singles Ladder (which is currently running using a Google Sheet).  It works for what we need it for, but I thought it would be nice to convert it to something a little bit shinier (and a project for me to build while learning a language).  But to start, I need a short refresher course.  So I googled the best ways to learn Ruby.  I’m going to keep some sites referenced here but also will try to write down some of what I’m learning.

Ruby Warrior is a cool little game that has increasingly difficult levels that require you to write code to have your knight work his way through a dungeon.  If you’ve never learned any coding or Ruby, this probably isn’t the place to start as there really isn’t any teaching.  I’ve been able to fumble my way through the first six levels so far with just a bit of youtube help.  If anything it is learning through watching other people succeed and copying what they are doing.  Not sure if it will be super helpful with my end goal, but it is a fun way to remember certain aspects of Ruby.

Other sites to eventually check out:
Udemy – offering $200 courses for $10 this week
The Odin Project
Thoughtbot – Upcase – recommended by my brother

Gaming Profile

As you probably know, I enjoy board games.  I own an unhealthy amount of games (more than I can play), but whenever someone wants to play a board game, I’m interested.  So when I came across this survey, my brain’s synapses fired.   Board games plus data?  Yes, please.  I didn’t necessarily find out a lot about myself that I didn’t know, but it was interesting to see it graphed.

My Gaming Profile

My game profile told me that I like low conflict, grounded, and independent games.  I didn’t think I prefer as much social manipulation as the chart showed, but I’m usually a non-confrontational sort of person so the low conflict made sense to me.  The really interesting thing was after answering the questionnaire and then entering the last 3 games I enjoyed playing, it recommended 10 games for me to play.  Out of the 10 chosen, I own 6 (and enjoy them), my brother owns 1 (and it is one of my favorites), I’ve played and enjoyed another one but don’t normally have enough people to play with, and the last 2 I’ve been interested in getting.   Not bad, game recommendation machine!  🙂

Clear Glue? Easy!

bottle of glue with glue dot

When I was a kid, I used to put a drop of Elmer’s glue on my desk and let it slowly spread into a perfect circle to dry.  The translucent rubbery circle was fun to pull and stretch until it wore out, which didn’t take too long.  I’d then put out a bunch more drops, some bigger, some smaller, guessing how long the different sizes would take before they’d be ready for play.

Nowadays, Translucent Glue Dots aren’t the rage they used to be.   We now live in the Slime Era.  Rainbow slime.  Water slime.  Butter slime.  Sparkle slime.  There are more kinds of slimes then colors of crayons.  The key to slime is good ‘ole Elmer’s glue.  Now if you want to make clear slime, you can’t use regular Elmer’s glue.  You have to get clear Elmer’s glue.  Hold on, what?!?!  I had no idea there was such a thing as clear Elmer’s glue!

Since my wife is such a good mom, she happened to buy a gallon of the clear stuff for Bug for Christmas.  To keep Bug from randomly finding it in the house, she kept it in the trunk of our brand new car.   And being the good aunt that she is, she also happened to find a balance bike for her niece and nephew who are learning to ride.  This too was stored in the trunk as we are planning on seeing them soon.  Let’s just skip ahead to the inevitable phone call.

Me: Hello?

Wife: Hi.  So… I bought Bug some glue.  And I bought a balance bike.  And I kept them both in the trunk.  Long story short, I was driving around and when I went to put groceries in the trunk, the glue had somehow popped open and it is all over the trunk.  Good news, it is the clear kind.  Bad news, over half of it poured out.

Me: Wow.

Wife: Any ideas of how to get it out of the trunk?

Me: Nope.

Wife: Alright.  Well, I’m going to be working on that until you get home.

Me: Okay, see you soon!

We spent a lot of time getting the glue out of the trunk that afternoon/night, but by the end it looked brand new.  Just in case you ever run into the same situation yourself, the secret is to scrape up the glue using a credit card and then to wash the trunk out with soapy water.  If you were curious, scraping 3/4 of a gallon of glue, one credit card at a time, takes a while…