Calvin Goodale, Developer - Blog
c g o o d a a l e . . c o m

My current goals

Setting goals helps you stick to your plan, and it is especially helpful when making big changes in your life such as completely changing careers. I've had some great interviews recently and have more coming up, so I want to make sure I'm as prepared as possible and can speak clearly and knowledgeably when asked questions or tasked with a specific challenge. These are the things I'm focusing on right now:

  • Practicing HackerRank and LeetCode problems to improve my problem solving and algorithmic knowledge.
  • Getting better at Django - I'd like to get to the point where I can create a full Django app without having to rely on Google so much.
  • Learning more about higher-level topics such as system design and architecture.
  • Learning React.
  • Improving my JavaScript.

I appreciate everyone who has been helping me during my software and development journey and I hope to some day have enough experience to pay it forward.


0 Comments

New project: Poker Range Generator / Study Tool

This past week I started working on a pet project of mine that I've been thinking about creating for at least a year now, an app/website for generating and studying preflop poker hand ranges for Texas Hold 'em. The default ranges will be based on Johnathan Little's pre-flop ranges on pokercoaching.com:

PokerCoaching.com Preflop Ranges

I originally had some help putting together a version of this tool in React from my friend Ian, but when I came back to it this year I decided to build it in vanilla JavaScript so I can solidify my JavaScript knowledge (and so I can more easily implement the functionalities I need).

The tool will allow you to study, edit, and save preflop ranges for each position and situation you'll be facing at a 9-handed poker table:

  • Raise First In (which hands to raise/fold/limp with no action before you)
  • Facing Raise First In (which hands to 3-bet, call, or fold with when facing an open raise)
  • RFI vs. 3-Bet (which hands and actions to take after your open raise is 3-bet)

So far I've made good progress with the UI and basic functionality. Next I need to add all of the default ranges, add Local Storage so you can save them, and maybe add a file and/or text-based import function.


0 Comments

Avoidle Word Game is up!

I was able to finish a working version of the word game I've been working on for the past week or so, and I'm pretty happy with it. Technically it's still in the testing phase, but it is up and playable:

https://gooddev.io/avoidle

I really enjoyed making it, and my JavaScript / Jquery has improved immensely during the project. Some of the more challenging and interesting pieces were:

  • Learning how to learn localStorage in order to save player stats. It can be a little finicky changing back and forth from strings using JSON.stringify and json objects using JSON.parse.
  • Figuring out how to choose the same random 6 consonants for each player based on the current EST date. I mentioned this in my last blog post, but I ended up getting a suggestion from a fellow dev and was able to turn the date string into an md5 hash and then use that to generate the random consonants.

Let me know if you see any bugs or have any suggestions, as I'd love to hear them. I still have a few more things to complete such as adding settings (dark mode, hard mode etc.), but I hope to finish those soon.


0 Comments

Creating a Wordle-Inspired Word Game

Over the weekend, I was inspired by the sudden popularity (and enjoyment level) of Wordle, and decided to try to duplicate much of the functionality in HTML/CSS/JavaScript. I came up with a slightly different game where you are given 6 consonants (in red) and you have to try to come up with 4 five-letter words using as few of the red letters as possible, with a maximum of 20 points. I'm still working out some bugs, but it is playable in its current state. Feel free to check it out here:

https://codepen.io/Cal_Pal/full/GROEVGR

The most interesting and challenging part was figuring out how to select the random 6 letters based on the current day, and make them the same for each visitor. With some advice from a friend, I was able to implement the following method for this:

  1. Take the date string (i.e. 02142022) and generate an MD5 hash string from it.
  2. Split the hash into separate strings of 3 characters each
  3. Convert each 3 character string from hex to decimal and calculate modulo 21 (the number of consonants), then add these new numbers to an array
  4. Use the first 6 unique numbers from this array to get a consonant at that index

I'm honestly not sure if there will ever be a case where there are not enough unique numbers in this final array to get 6 "random" consonants, but I guess we will find out. If so, I'll need to use a longer hash somehow.

To do:

  • Fix a bug where entering a word using the on-screen letter buttons and then pressing "Enter" will both submit the word and insert the focused letter intot the next available cell.
  • Display instructions when the website is first visited, similar to Wordle
  • Probably change the name of the game as well as the design
  • Move the game from Codepen to my own website


0 Comments

JavaScript Calendar

I now have a basic timeslot calendar up locally on the lesson scheduling app I'm working on. I still need to figure out exactly how I want it to look and function, but happy with what I have so far. Working on this part has helped me refresh some of my JavaScript/JQuery knowledge and I'm really enjoying it.

javascript_calendar


0 Comments