Random Music Generators is now hosted on render.com
Random Music Generators is now hosted on render.com. Please update your bookmarks! https://random-music-generators.onrender.com
Random Music Generators is now hosted on render.com. Please update your bookmarks! https://random-music-generators.onrender.com
Overview Did you know that you can use TypeScript features in JavaScript projects? When I discovered this and tried it out, I really enjoyed the results. Let’s go a bit into how it works. With a few simple ingredients: VSCode JavaScript Willingness to add types in JSDoc (and optionally importing TypeScript types) You can: statically check the types of .js files run compiler on .js files write…
As professional programmers, the bulk of what we do is solving problems. A lot of the time, I’m motivated by problem-solving challenges. But sometimes I hit a wall. A given challenge can become a problem that I’m frustratingly unable to solve. Often, this frustration would spiral into a worse mental state. I’d imagine the problem as a scary, overwhelming, difficult to defeat monster - more…
I’ve long been intrigued by design patterns, but when I started learning them, I realized quickly that I didn’t have a clear learning path. I didn’t know how I should learn design patterns or if it’s the right time for me to learn them. So, I sought out to answer some questions: What are the prerequisites for learning design patterns? What material should I use and how do I avoid being scattered…
As developers, we’re constantly learning - and there’s a lot to learn in general because the tech industry is broad and fast-paced. We want to have all the main bases covered so that we can be ready for any situation. We often hear about design patterns and how they can enable us to write well-architected software using object-oriented programming. If you’re like me, you might file that away as a…
New in 1.3.1 This month, I released a big new feature that’s been requested often. You can now specify a custom note collection to create random melodies. Check it out! Note: This feature is available to use if you create an account. Part of the impetus to provide this feature was to aid in neuroscience research. Having the ability to create melodies with specific pitches will allow researchers…
Updated March 21, 2021 Did you just graduate from a coding bootcamp, obtain a CS degree, or built an involved side project? How do you know when you’re ready to write software professionally? This post has two parts: questions I ask my mentees to help clarify their job search a collection of resources I’ve found or made that helped my on my job search Questions to clarify the job search There are…
After having used immutable js for a while, discovering ImmerJS was a breath of fresh air. Where immutable js forces you to learn its gigantic API, ImmerJS takes advantage of ES6 Proxies. These allow you to modify a “draft” version of an object as if you’re mutating it, but the draft is actually a copy so you’re not mutating the original! The return of immer’s function always returns a perfect…
In February 2020, I returned to my bootcamp to give a tech talk on what I’d do to improve my Capstone project. (I also answer career and other questions from the audience at the end.) Download the slides here (PDF) I’m excited to share what I’ve learned so far from working on enterprise software for almost 2 years. The talk is a deep dive into the codebase that myself and three others worked on…
I recently created a node command line app called question-prompter. It prompts you at your terminal to answer questions that you come up with. After you answer them, it saves them to a or file in a directory of your choosing. Background I find a lot of benefit from regularly checking in with myself. While many authors have written about this kind of reflection, Tim Ferriss comes to mind first…
I’ve been writing down small music (and other) ideas for over 20 years. I’ve generally struggled to store, organize, and retrieve them effectively. As I was going through my archives recently, it dawned on me that there are two fundamental types of ideas: one is “concrete” and the other is “meta.” A concrete idea is specific and actionable. It may be a chord progression like: A minor for two and a…
This post is a pointer to an article I completed recently - a comprehensive comparison of the AVA, Jest, Mocha, and JavaScript test runners. 👉 https://github.com/scraggo/comparing-javascript-test-runners/ 👈 Why is it on GitHub, not this blog? Not only does the repo contain the comparison article, I created a node application to generate the speed metrics in the article. The process looks like…
This post is a recount of my recent experience contributing to is, a JavaScript open source type checking library. https://github.com/sindresorhus/is https://www.npmjs.com/package/@sindresorhus/is I’ll outline the process from beginning to end: the initial filing of the feature request, implementing the feature, collaborating on the pull request, and getting the feature released. Some of the open…
Problems with unexpected assertion failures can arise while testing immutablejs with sinon. This post is a brief guide on how to create a custom matcher that will correctly calculate the equivalence between a mock/stub/spy call with an immutable parameter. The way I’ll be making the assertion is with calledWith from sinon-chai (a plugin for chai that helps with making should or expect assertions for sinon mocks). This github issue on sinonjs outlines the problem...
New in 1.1.0 Yesterday, I released a feature that’s been in the works for over 6 months. You can now create melody presets. Check it out! If you have a go-to set of form parameters that make sounds that you really enjoy, you can save them and recall them later. As a necessity of saving presets, I added the ability to create an account. This will set the stage for being able to save presets for…
Happy 2020! One of my new year’s resolutions is to redo my website with a lot of new things in mind. Here I’ll outline the changes I’m in the process of making. An important step in the whole makeover was getting an official domain name - I’m now live at scraggo.com! I’m using namecheap as the provider. The site has been hosted with github pages since its inception and I’ll…
I really enjoy reflecting on the past year during the holidays. If I get a chance to do this, I come up with New Years resolutions afterwards. Some years I go through a somewhat involved process of going through my journal entries and coming up with the best realizations. This year, my girlfriend wanted to try Marie Forleo’s recommendation of reviewing the past decade. We went through the…
Updated Sep 3, 2020 This article outlines how to use the “squash” feature of an interactive . What does “squashing” do? It allows you to take changes that are spread amongst multiple commits and consolidate them into one. Why should one consider squashing commits? A clean history makes tracking changes to a large codebase across time much easier. Many commits are small and unimportant in the grand…
In 2016, I decided to start my own brand of music education. I took the role of music coach, agent, and collaborator. The student and I would write and record music together to integrate learning and creativity in a holistic way. While I’ve suspended these services for the foreseeable future, I’m posting are the core concepts and aims of Songmind Studios. I’ll eventually make all my teaching…
Your resume and cover letter surely made a positive impact, but the most important evaluation has yet to come. If you’re searching for your first software development job, the process can be daunting. You may have heard that after sending your resume to a company, there’s an initial screen. This is usually done over the phone, but sometimes it happens in-person. Your resume and cover letter (the…
When you need to make sequential API calls, promise chains are a reliable way to go. It gets a little tricky when you need to throw and handle errors differently at different points in the chain. This post will go into: throwing specific types of errors using creating an object literal dictionary to handle logic gracefully handling the errors differently at the end of the chain This article is…
The problem Given our array data structure, we only want to include items that have an ‘age’ property and the age is greater than 17. If the person is under age, we won’t allow any of their friends to be included (even if they are old enough to be.) (Contrived scenario, I know, but I recently needed to do something like this for a different type of authorization.) Run this code on repl.it We can…
When writing commit messages, it’s ideal to make them easy for another developer to read and understand exactly what’s in the commit. Oftentimes, though, we write commit messages quickly just to push a branch at the end of a workday, for instance (I know I’m guilty of this). One team member brought the Conventional Commits format to our attention. I’ve enjoyed using it and seeing the results when…
Some errors are kind of mysterious. The first time I got “‘myFunction’ is not a function” type errors, I was at a loss for a few hours. Logging out the functions from my require statements came back as or . What I learned, TL;DR - don’t import file ‘a’ into file ‘b’ AND file ‘b’ into file ‘a’. That’s an example of a “circular dependency.” Brief example of creating a circular dependency: myUtils…
Javascript is infamous for being “loose” and misleading with its typing. gives you , gives you , etc. So instead of writing conditionals using , doing specific checks, etc, I decided to make my own wrapper for which I called : I unknowingly put a bug in my app. Can you spot it? … It’s in the 3rd statement. Basically, the function took anything that wasn’t an ‘array’ or ‘null’ and decided it…
We all have opinions on what what coding best practices are and how code should be formatted. Recently, one of the teams I’ve been working on decided to add another member. I discovered that our coding styles were radically different. I decided to write some guidelines for our team to get us on the same page. I quickly realized that writing a style guide from scratch is a tall order. I’d already…
This is the first of a handful of posts about the 3-month search for my first full-time developer job. I graduated from a coding bootcamp in April. I’m a junior developer, though, I have some freelance projects on my resume that gave me about 2 years of experience. This, combined with a decently written Linkedin profile, contributed to my getting contacted by multiple recruiters daily. I wound up…
Tracking down bugs in the software you’re working on can be tricky. Debugging is a massive topic and there are so many places bugs can show up. One thing’s for sure, whether you’re careful or not… Bugs will show up. I’m not saying this to be pessimistic. Creating and squashing bugs is not just a part of the process of writing software, it is the process! We’re solving problems and ironing out the…
I was ready for a career change. It was October of 2017. The more time I spent coding and learning computer science fundamentals, the more I realized that a programming career would fit my personality* better than performing and teaching music. After spending a fair amount of time teaching myself to code and making websites, I began researching coding bootcamps. There were optimistic statistics of…
Algorithms and data structures can be intimidating. The goal of this post is to explain some approaches to solving hash table algorithm problems providing clear examples with detailed solution explanations. I’m hoping this will help anyone uninitiated alleviate fears and make bigger strides in conquering these challenging problems. Why Hash Tables? While attending Fullstack Academy, I participated…
Why I’m attending Fullstack Academy Since discovering a love for guitar and composition in my teens, I decided to pursue a career as a freelance music teacher, composer, recording engineer, and performing guitarist. After a decade of this, I realized that the rockstar dream didn’t suit me and I was tired of chasing it. I’d be happier with a more stable career that challenged me intellectually. I…
The goal of this blog-series is to explain what frameworks do, why they’re used, and demonstrate with examples across many different frameworks. The series is aimed at those familiar with JavaScript syntax, accessing the DOM, functions, and classes (object-oriented programming). Further reading can be found at the bottom of this post. What is a JavaScript Framework? A framework is an imported…
This post contains an overview of what sorts of programming jobs are available. It's aimed at developers who want to try something new or are still deciding what to focus on in their efforts to become more marketable.
Object-oriented design is a powerful programming paradigm that can be intimidating to anyone trying to learn how to use it. I worked through a number of excellent tutorials and books on the subject, but struggled to apply the concepts to my own code. I decided to convert a working program that didn’t use OOP and wrap it in a single class. The program I chose was Guess the Number written by Al…
From time to time, we can find ourselves stagnating when studying music (or any other topic). To help become immune to this, it’s useful to fully recognize our strengths and acknowledge our weaknesses. Every strength is an opportunity to improve further and if we can acknowledge where we are struggling then we can begin to grow much faster and reach excellence. Ask yourself the following questions…
It’s common for songwriters to feel overwhelmed when finishing their songs and getting them ready for their audience. There can be tremendous blocks going from inspiration to song completion. Listed below are the top issues I’ve encountered while interviewing songwriters and students of music who write music. 1. Not knowing “where to go next” with your song. This is a major problem for many…
The Five Dysfunctions of a Team (by Patrick Lencioni) is a highly recommended book for anyone that works with other people. (So - almost everyone!) The five dysfunctions are set up in a hierarchy. The bottom of the pyramid below shows that trust is the foundation and all else moves up from there. five-dysfunctions-pyramid The book opens with a story that brings the main five principles…
A long time student of mine recently began learning classical guitar. He had been studying jazz and blues for a number of years. He has a love for latin fingerstyle rhythms. The more lessons we had, the more he realized that he wanted to deepen his technical foundation. I recently told him: “The number of times you’ll reach a plateau is inversely proportional to how deeply you practice.” In other…
We songwriters put a lot of work into our songs. Putting together interesting chord voicings, refining our lyrics to perfection, and getting the form ‘just right’ can take a lot of effort, but be very gratifying. When your song is finally finished, you might want to make the investment of bringing it to a studio with a band to lay down all of the parts. When it comes to recording in the studio…
It’s difficult to keep track of everything that needs to be done with your musical ideas. If you write with any frequency, these ideas can amass until there are so many that you can’t keep track of them. Your ideas might range from little snippets to near complete works. Here are some things that commonly go wrong for me: I don’t take enough time to think about where an idea needs to go to be…
Have lots of unfinished ideas? Learn how to take a short instrumental idea and finish writing your song in one day. Over the years, I’ve written tons and tons of short musical ideas. I had been putting off turning them into real pieces until now. Inspired by my research on speed composing, I decided to make a challenge out of my problem. The Snippet Challenge & Simple Instrumental Song Forms In a…
Why start a composition with a blank slate? Jam on a cover tune then take it in a different direction. Sometimes, the less experience you have figuring out songs, the better. When I was first learning guitar and had much less skill, I tried to figure out songs that I heard. I was usually unsuccessful at transcribing them accurately, but there were many occasions that I enjoyed what I was playing…
How to begin writing a song by choosing a lyrical theme and a musical mood. The Keys to Simplicity Selecting a mood / topic for the song The central theme of your song can come from anywhere - your mood, the news, or a conversation you heard while at a coffee shop. After choosing something, stay in that mindset until you find the need for a well-placed and meaningful contrast. It’s important to…