Posts

Showing posts from March, 2022

Revisiting "Classic Queen"

Image
I have an older cousin who, when I was a teenager, gifted me her old turntable (which was outdated at the time, but has somehow made a comeback), complete with built-in 8-track player (a technology I am sure  is never coming back). Along with it were a handful of 8-track tapes, most of which I had no interest in, but one of them was Queen's The Game , which included a song I'd at least heard  of, "Another One Bites the Dust". So I listened to that one. It was my first exposure to Queen, and I remember really liking some of that album over the summer I listened to it. In particular, the songs "Need Your Loving Tonight" and "Crazy Little Thing Called Love" were favorites of mine. One of the songs got chopped off halfway through due to the 8-track format, ending on one track and resuming on the next. Very awkward. Despite liking some of this album, I didn't really become a fan of Queen until I saw Wayne's World . I'd heard "Bohemian R...

Configuring Your Angular Application to Use an External Configuration File

Image
Normally, developers use the environment.ts  and environment.prod.ts  files (and maybe even other permutations) to configure their Angular applications for different environments. With a deployment system such as Octopus , symbols can be placed in these files to replace values with environment-specific ones. But what if you want to build an Angular application for use by someone outside of such an environment? I ran into this problem recently when working on an application I have up on GitHub. I wanted to be able to provide a release that someone could easily configure without having to do a find/replace inside a JavaScript file. As long as the application is not offline, you can add a configuration file which gets distributed with your application and have the app read from it during initialization. First, create a new configuration file. In my case, I added config.json  under my src  folder: In this file, I currently just have a single configuration option: th...

The Most Destructive Keystrokes In Software Development Are The Ones Used For Copy/Paste

Image
Okay, so maybe the title of this post is a little over-dramatic. But the fact remains: copy/paste "coding" leads to problems, and is probably my least favorite bad coding practice (or the bane of my development experience! ). I think we've all been there: we don't know how to code something, so we do a quick search, either via search engine or in our existing codebase, to find an example, and then we copy and paste that example into the code we're currently working with. And sometimes, that's where it ends -- we've found our solution, and we move on with the rest of our coding. But often, just pasting that code in and moving along can have some unintended repercussions. Here's what can happen. A Lack of Understanding Sure, you've got code that works -- but do you know how  it works? Developers spend more time maintaining  code than initially developing it, and if you don't know how or why something works, it can make maintaining the code -- or ...