DEV Community

Cover image for Making a Project My Own
bretzawilski
bretzawilski

Posted on

1

Making a Project My Own

I would't say that I'm trapped in tutorial hell, but I am working through a series of resources that are teaching me more of the ins and outs of web development. Today was a #Javascript30 day, and I decided to make the first proejct in the series—the drum kit—my own.

For the past four years, I've been making a podcast with a friend. We chat about movies in the Criterion Correction, and we usually have a good time. It's a small program, but we enjoy it. As I was looking at the #Javascript30 drum kit, I couldn't help but wonder: how can I make this my own? How can I extend it beyond its original functionality?

Well, first I decided to get rid of the deprecated keyCode property so I'd stop seeing strikethrough lines in my code. It was a really simple fix. Turns out the property.key works quite well and...just uses letters.

I also decided that I wanted to change up the content. Instead of a drum kit, I wanted to make a soundboard with some clips from our podcast. This was a really easy substitution—the hardest part was locating audio clips in our old files, and that was just a matter of taking the time to do it.

The second tricky (though not very) element was making the app work on mobile devices. See, the original uses keydown events to trigger the sounds and the visual transitions on the page. But on a mobile device, there isn't a keyboard to use. Instead, I needed to make a good old-fashioned click event on each of the triggers for the sounds.

The biggest takeaway I need to investigate is document.getElementsByClassName versus document.querySelectorAll. I thought they'd be equivalent, but the forEach command that works so well on querySelector...does not work on getElementsByClass. So, that will be something I plan to investigate further.

Additionally, I need to better understand the options for the css transform property. I first made changes to the size of objects individually, but seeing the use of transform: scale(1.1); was enlightening.

So, another day of coding down, and a fun project as the result.

If you're interested in boosting your own JavaScript skills, check out the entire 30 Days of JavaScript challenge.

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️