Sunday, November 24, 2019

USTA - The Harm of Appealing

Open Letter to the USTA


For years now, I've been a member of the USTA. I love what it is, and I love being a part of it. However, there is one seriously disturbing flaw in how things are done: the appeal process.

From what I've been told, when a player gets rated up a level, like from 3.5 to 4.0, the player can hit the appeal button on the USTA site and go back to being a 3.5. What that means is that we have a legitimate 4.0 player being allowed to play 3.5. That reduces the fun of the league.

I'm an above average 3.5 player that can sometimes beat lower-level 4.0s. So when I get hammered 6-2, 6-0, or worse, something isn't right. When I find out they've appealed, it's just frustrating knowing I played someone that the USTA ranked at a higher level and shouldn't be in my league.

Teams have used 4.0 players, that have appealed to 3.5, as their singles players for an entire season. Unless someone files a complaint (and I think pays), they get away with it. And when a complaint is filed, the offending team has to forfeit their matches. Why even let it happen at all?

I just traveled hundreds of miles, and paid hundreds of dollars, to compete in a  tournament this weekend. I get home and find out that our final loss (5-7, 6-1, 1-0) was to someone that was a 4.0 and appealed. It's so frustrating. All it does is make me want to appeal when I become a 4.0. There's no reason for me to do so, other than everyone else does it.

USTA: Please stop letting people appeal their rankings.

Thank you.

Monday, July 15, 2019

JavaScript Closure Summary

Excellent article explaining closures: JS Closure Article
The fiddle: https://jsfiddle.net/h59k1v8z/

The important point:
The closure is the function AND a collection of all the variables in scope at the time of creation of the function.

In this example, the closure is in bold.

function createCounter() {
  let counter = 0 // the counter variable is included in the closure, but the initialization to 0 is not
  const myFunction = function() {
   counter = counter + 1
   return counter
  }
  return myFunction
}

const increment = createCounter()

// For each of these, resetting the counter to 0 (first line in createCounter()) doesn't get hit,
// BUT since counter was in scope at the time myFunction was created, it's included in the
// closure. So counter is available, and the output, below, is indeed "example increment 1 2 3".
const c1 = increment()
const c2 = increment()
const c3 = increment()

console.log('example increment', c1, c2, c3)

Wednesday, December 12, 2018

My One Issue with Git

I've been using Git for a year and a half now. I like it. I'm not going to stop using it. But there is one issue that bothers me. I like to save my work remotely, multiple times per day, just in case my hard drive dies. With Git, I don't see a good way to do so.

TFS has the shelveset option. I loved that. I could shelve my code every 20 minutes if I wanted to.

One option, with Git, is to push often. Although not ideal, I was doing that, and I was content. However, when I create a PR, there are sometimes 10+ commits in it. I'm also fine with that, BUT, my current team likes to have just one commit for an entire story of work. This allows us to revert that one commit if it's interfering with a release.

Another option is to push often, then squash my changes into one, so the PR has just one commit. There are two issues with this: 1) it's tedious, manual work to do so (not a big deal), and 2) sometimes there will be merges from develop mixed in with my commits. Apparently squashing over merges can't be done, or it's difficult. That is a big deal in that I can't hit my goal of one commit per PR.

I started looking into options like mirroring a repo, or creating another branch for my backups. And I kept coming back to thinking: "Really? It's this hard to save a remote copy of my work?"

The only other thing I can think of at the moment is to throw a USB drive in my laptop and do a manual copy/paste backup. I think that's unfortunate.

If someone has a better approach, please let me know. Otherwise, TFS (with shelvesets) has at least one advantage over Git.

Thursday, January 11, 2018

A Simple Blockchain in JavaScript

// To run this, do this at a bash shell:
// node main.js

// Source: https://www.youtube.com/watch?v=zVqczFZr124

// Ran this to use SHA56: npm install --save crypto-js

const SHA256 = require('crypto-js/sha256');

class Block {
  constructor(index, timestamp, data, previousHash = '') {
    this.index = index;
    this.timestamp = timestamp;
    this.data = data;
    this.previousHash = previousHash;
    this.hash = this.calculateHash();
  }

  calculateHash() {
    return SHA256(this.index + this.previousHash + this.timestamp +
      JSON.stringify(this.data)).toString();
  }
}

class Blockchain {
  constructor() {
    this.chain = [this.createGenesisBlock()];
  }

  createGenesisBlock() {
    return new Block(0, '1/1/2018', 'Genesis block', '0');
  }

  getLatestBlock() {
    return this.chain[this.chain.length - 1];
  }

  addBlock(newBlock) {
    newBlock.previousHash = this.getLatestBlock().hash;
    newBlock.hash = newBlock.calculateHash();
    this.chain.push(newBlock);
  }

  isChainValid() {
    // Don't need to check the genesis block
    for(let i = 1; i < this.chain.length; i++) {
      const currentBlock = this.chain[i];
      const previousBlock = this.chain[i - 1];

      // Verify the hashes are correct
      if (currentBlock.hash !== currentBlock.calculateHash()) {
        return false;
      }

      // Verify the current block points to the correct previous block
      if (currentBlock.previousHash !== previousBlock.hash) {
        return false;
      }
    }
    return true;
  }
}

let blockchain = new Blockchain();
blockchain.addBlock(new Block(1, '1/2/2018', { amount: 4 }));
blockchain.addBlock(new Block(2, '1/3/2018', { amount: 10 }));

console.log(JSON.stringify(blockchain, null, 4));

console.log('Valid chain: ' + blockchain.isChainValid());

// Tamper with the blockchain by changing an amount
blockchain.chain[1].data = { amount: 100 };

console.log('Valid after tampering: ' + blockchain.isChainValid());

Thursday, December 28, 2017

Tips for Keeping Better Time on Drums

This would be better conveyed via a video, but I've been too lazy to do that yet.

Overview

I'm a drummer, and I've struggled with timing. I don't mean the kind of timing where I'm slightly off beat when returning from a fill. I mean when I transition from one groove to another, and I'm way off. Or I'm playing the same groove for a minute. How do I not speed-up or slow-down? How do I know that I'm keeping the same time after a transition? I would have no idea. A mistake I made was to try and remember how fast my hand was going on the hi-hat, and try to replicate that speed on the ride (if that's what the song did). That just doesn't work. First, what feels fast one day, may not feel fast the next. Fast is subjective. Second, I may be playing eighth notes on the hi-hat, but then I switch to quarters on the ride. That simply doesn't work while trying to maintain the same speed. So what did I do?

Tip #1

Use the other instruments as a metronome, including vocals. We can all play along to a metronome, right? Well, your other band members are providing a metronome for you, and you may not realize it. Some songs are more obvious than others. 

Examples

Should I Stay or Should I Go - The Clash
The guitar starts the song, and gives you: "and two and three and four and one." The guitar literally gives you that count. Play to it. Sing the guitar in your head, while you play, as: "and two and three and four and one."

Lonely Is The Night - Billy Squier
The vocals give you: "somebody’s watching you, baby," use, "1 and 2 and 3e and 4 and." The "3e" lines up with "watching you." As the singer is singing that part, sing "1 and 2 and 3e and 4 and." Like, literally sing that to yourself, or mildly out loud, while you play.

The Joker - Steve Miller Band
The bass gives you: "one and two and-uh-three and four, one and two and-uh-three-e-and-uh-four-e-and-uh." That happens over and over again. That's your metronome. LISTEN to it and play along to it. Let it guide you. Try to make the drums match the bass.

Take It Easy - The Eagles
"Well I'm a runnin' down the road..." lines-up perfectly: "Well I'm a one and two and three and four and..." Sing the lyrics as, "one and two and..." right over the real lyrics.

You'll realize more and more opportunities for this approach once you start applying it.

Tip #2

Sing the melody as counting, like: "one and two and three and four and."

Examples

867-5309/Jenny - Tommy Tutone
This could also fall in the category above. While you play, try singing 8675309 as "one and two and three and four and three oooo ni-ine." At any point in the song, you can sing like this, even when that's not what is being sung at the time.

What I like About You - The Romantics
The guitar/melody gives you: "1, 2, 3, 4." Listen to it and feel it. Play along while singing the melody. You can sing: "1, 2, 3, 4" while the guitar is playing it.

Tip #3

Use the 210 approach on the metronome.

There are some songs that aren't helpful as far as other instruments. Perhaps the drums are on their own for a bit. Or perhaps the guitar is just riding out a power chord for a while.

Set your metronome to play three bars. For the first bar, let the click happen on one and two. There should be silence on three and four. For the second bar, only the one should click. For the third bar, there should be no clicks. Let those three bars repeat. Play along to it. Get used to having to keep time on your own, and coming back in on time. Don't be robotic though. Try to keep some kind of melody in your head to guide you.

If your metronome doesn't do this. Get one that does. I use Metronomics HD.

Examples

Shakin' - Eddie Money
This song starts out on the drums. It's a tom groove that's pretty cool. Then there is the transition to a normal, easy beat. Keeping that time wasn't easy for me. I used to play 8th notes on the hi-hat only because I was also doing it on the floor tom. But I wanted to play quarters on the hi-hat, after the tom groove. There are no other instruments to guide me here. So I set my metronome to 113 BPM (to match the song) and I did the tom groove to it, over and over again. Then I did the simple beat for a while. Then, and this is the important part, I played the transition between the two, over and over again, for like 20 minutes straight. It's rough at first. And 5 minutes is a long time for this, let alone 20. But after 20 minutes, the tempo ends up burning into your memory, and you can do it.

This approach is also useful for double time. For example, Lonely Is the Night, and Should I Stay or Should I Go, each have double-time pieces. That is, where the snare was on 2 and 4 earlier, it's now on  1, 2, 3, and 4. Just like Shakin', turn on the metronome and practice the transition for long periods of time. It will sink in. You can also sing the melody during these parts.

The 210 approach also helped me with Born to Be Wild, by Steppenwolf. During the chorus, 16th notes are played on the toms, with crashes in there. 20-30 minutes of 210 helps get this right.

Hopefully this helps. If you have any extra tips, feel free to comment.

Thursday, September 21, 2017

Back Issue History - Condensed Summary

Nov 2015 : Constant pain started after driving home from Alabama (to Ohio)

Nov 2015 and later : Four different chiropractors

Mar 2016 : Physical Therapy

Apr 2016 : MRI at Wood County Hospital

5-May-2016: Steroid Shot at Wood County Pain Management - could stand without pain for the first time in months

Feb/Mar 2017 : Steroid shots (three times) - pain gone for two weeks

May-2017 : Totaled car; hit deer

Jun/Jul 2017 : In pain, but could still play tennis

17-Jul-2017 : Last tennis match - can no longer play after this

25-Aug-2017 : Can no longer stand or sit

26-Aug-2017 : Went to ER - nothing done there; decided to increase Hydrocodone

26-Aug-2017 : Trigger point injection at APM (Trivedi) - Didn't help

Aug 2017 : MRI at Wildwood - Dr. Biyanni recommends RFA

1-Sep-2017 : Lumbar Medial Branch Block at APM (Trivedi) - Still can't stand for more than a minute

14-Sep-2017 : Selective nerve root block at APM (Trivedi) - Can stand for 30 minutes

20-Sep-2017 : Dr. Elgafy (UT Medical Center) recommends another nerve root block

27-Sep-2017 : Consultation with new pain management place (UT Medical Center) before doing another nerve root block. Doctor Atallah said two of my three previous procedures were the wrong thing. And the other one was probably in the wrong spot.

3-Oct-2017 : Had two steroid shots: L5/S1 Transforaminal Epidural. Doctor said it will take 24-72 hours to start helping. After 3 days I was much better; like 80%. Could stand for hours with some pain.

17-Oct-2017 : Had two steroid shots: L5/S1 Transforaminal Epidural.

14-Nov-2017 : Follow-up with Dr. Atallah. He recommended aqua therapy. He said he's seen the steroids last anywhere from 3 months to 3 years.

15-Nov-2017 : Got another opinion from Dr. Andreshak. He recommended physical therapy. He also gave me a sitting/stretching exercise to help.

Dec 2017 : Physical therapy sessions for core exercises.

18-Feb-2018 : Steroid shots lasted for four months. It's like they entirely wore off, suddenly, on 18-Feb. Was fine on 17-Feb. Can't play tennis or drum. Have appointment with Dr. Atallah on 21-Feb.

22-Feb-2018 : Transforaminal epidural with Dr. Attalah. Done at L4, and L5. Missed (forgot?) S1.

1-Mar-2018 : Transforaminal epidural with Dr. Attalah. Done at L4, L5, and S1.

12-Mar-2018 : MRI at Toledo Clinic on Holland-Sylvania Rd.

13-Mar-2018 : Met with Dr. Spetka. Recommends microdiscectomy if next shot doesn't work.

15-Mar-2018 : Transforaminal epidural with Dr. Attalah. Done at L5 and S1.

16-Mar-2018 : Met with Dr. Healy. He said I need a microdiscectomy.

22-Mar-2018 : Had surgery. Dr. Healy did a microdiscectomy at the Toledo Hospital. He said the problem was that there was a disc fragment that pressed up against the nerve. It broke away from the disc and was loose. Couldn't see that on an MRI. He removed the fragment. Don't know yet if he also shaved the disc. Will ask at next appointment. Feeling great now.

20-Apr-2018 : Follow-up visit with Dr. Healy. He said there were multiple loose disc fragments. He didn't shave the disc, but he looked for more fragments that were ready to come out, and there were none. He said I had already done all the work to get the nucleus material out of the disc. I'll go back in a month, and we'll talk about resuming tennis then. For now, I need to let it heal. He said I should be able to play all-out, and not worry about this issue anymore. I also told him I'm drumming for an hour at a time now, and he said that's good.

Tuesday, September 5, 2017

Bob's Back Issue - Part 4

5-Sep-2017 16:30

So frustrated and angry right now. I just don't get it. I can't stand or sit. And getting help from doctors is like pulling teeth.

Advanced Pain Management (APM) was supposed to call me today to tell me what the next step should be. I had a procedure on Friday to see how much it would help. Well, they didn't call, so I called at 16:30. They were gone, even though they're open until 17:00, so I got their answering service.

Here's how the call went with the answering service guy:

Me: "I'm calling because I was supposed to get a call today and didn't."

[silence]

Me: "Hello?"

Guy: "I'm here."

[silence]

Me: "Can I get some help?"

Then he starts to take my info. After he takes my info, this happens:

Me: "Can I ask you something? Is it me, or does it seem like this doctor's staff doesn't care about their patients?"

Guy: "Why? Because they left early today? I don't see how that means they don't care."

Me: "No, the fact that they left early and didn't call like they said they would."

Guy: "Do you want me to patch you through to the doctor, because it's urgent, or not?"

Me: "Yes."

Conversation with doctor (paraphrasing):

Me: "I need to know what the next step is. Someone was supposed to call me today."

Dr: "Did we do the procedure today?"

Me: "No, it was Friday."

Dr: "I need to know the percentage improvement."

Me: "50% Still can't stand or sit for more than a minute."

Dr: "Jenny will call you to schedule the next appointment. It will take some time since you have Aetna."

Me: "I have Blue Cross."

Dr: "Ok. Jenny will call you, most probably today."

Me: "What would the next step be?"

Dr: "Do another branch block, with stronger medication."

Me: "Ok."

It's 16:58. What are the odds that Jenny calls?

Is it me, or is this terrible?

Oh, and I contacted another doctor on Friday by sending him a fax, explaining my situation and asking for help. And I called that office again this morning and left a message. So far no reply. What the heck? I'm at a loss...