Posts

Convert a HTML Dropdown To an Object

I had a rather interesting use-case recently where I needed to take the contents of an HTML dropdown on a website which had timezones and then convert it into an object. But, I’ve been there before. How many times have you wanted a country dropdown or age dropdown and just wanted to copy one from an existing website? I just opted for a simple for..loop in this case. // Query the dom for all option elements inside of the select dropdown called timezone const options = document.querySelectorAll('#timezone option'); const obj = {}; for (const option of options) { obj.label = option.textContent.trim(); obj.value = option.value; } I then use textContent to get the label from the option, and then I call trim to ensure that any whitespace doesn’t get copied over to my object. I call option.value to get the value. But, here is the thing… If you’re taking this data with the intention of iterating over it later on, you probably want it to be an iterable type such as an array or even a map.

Fixing Distorted/Pixelated Buggy Sound In Windows 10

This is a really strange issue I encounter sporadically in Windows 10. Even freshly installing Windows and the issue will still occur. I use a Presonus Audiobox for my audio needs, so it is possible that the device itself might be the culprit or the drivers I am using. The sound I hear is this distorted/pixelated sound which sounds like what Minecraft would sound like if it were in audio form. This fix I’ve discovered I can’t vouch it fixes it permanently, but it does work without having to restart your PC.

Create a Trello Kanban Layout Using CSS Grid

Arguably, one of the best additions to CSS in a very long time is CSS Grid. If you have been a developer longer than a minute, there is a good chance you remember what the web was like before CSS Grid and even before Flexbox. The most popular implementation of a kanban style layout is Trello. A lot of companies have replicated the easy, Kanban layout of Trello (including GitHub Projects).

Firebase Is Great for Lazy Developers Like Myself Who Hate Setting up Backends

I have been solely a front-end developer for six years now and while I can still find my way around on the backend (with Node and PHP) my interest in the backend has all but faded. This is where platforms like Firebase are a real asset for developers like me. It is no secret the front-end has become complicated, if you’re not fighting a framework or library for control, you’re debugging confusing TypeScript error messages or trying to get Webpack configured. While the backend is a little more straightforward from a lack of new things to learn every five minutes like the front-end, it’s just another thing to worry about.

Moment.js Officially Becomes A Legacy Project In Maintenance Mode

Well, here is an announcement that probably won’t surprise anyone who has used Moment in the last few years, especially trying to get the size of it down in your Webpack configuration. The Moment.js team has announced it is now a legacy project in maintenance mode. It is not dead, but it is indeed done. The Moment team poetically declares, “We now generally consider Moment to be a legacy project in maintenance mode. It is not dead, but it is indeed done.” Which means, we’ll fix any serious issues (security concerns, etc) but new features or changes are off the table.

Microsoft Flight Simulator 2020 Is The New Crysis

The old Internet meme which was rooted in reality, “But, can it run Crysis?” believe it or not, Crysis was released in 2007 and since then, obviously other more hardware pushing titles have been released since then. Crysis funnily enough still held the title for years, it took years before hardware caught up and could run Crysis on max settings. If you told someone back in 2007 that one day the new king of hardware pushing game would be a flight simulator, you would have been laughed at.

Elon Musk Is a Fancy Marketing Man Who Wants to Put an Implant Into Your Brain and Make You Boop

It’s hard to deny that Elon Musk’s brand of futuristic dreamer type thinking is not contagious. I, for one, am excited about the future of electrical vehicles and the innovation brought about by Tesla is undeniable. But, I want to talk about one of Elon’s most bizarre product ideas: Neuralink. Brain implants, dude. Allegedly, it’ll cure everything from neurological disorders to autism. And what futuristic brain-computer would be complete without the ability to use it to listen to music as well?

No time for gaming.

I made a realisation the other day, I own a lot of games. Not just on PC, but on my Nintendo Switch as well. Of all of the games I own, I’ve played maybe a few hours of a couple in 2020, but for the most part, haven’t really spent much time gaming whatsoever. And it isn’t for lack of trying. I recently bought the Tony Hawk’s Pro Skater 1 & 2 remastered version and I was instantly taken back to my youth, the days where I could game all day and then all night, get up and go to school the next day and somehow function.

Firebase vs Supabase

For such a long time, Firebase has been in a league of its own. Not only does Firebase offer hosting, cloud functions (AWS Lambda serverless style functions), but it also offers authentication, two different types of database and a plethora of other features. Honestly, nothing else has ever really come close to Firebase… Until now. Supabase is a promising open-source alternative that eventually aims to be a close replacement for Firebase. And if you’re thinking Supabase is some scrappy upstart, they were in the Y Combinator Summer 2020 batch and received $125,000 USD in seed funding from Y Combinator.

Are Phone Makers Just Trying to Outweird One Another Now? The Alleged LG Wing Is Strange

Footage of an alleged device from LG called the LG Wing have leaked out onto YouTube ahead of a planned September 14 event. https://youtu.be/FYRZOREZR0k It appears as though the smartphone race has taken a drastic turn. It started out with phone makers battling each other for the best camera, the biggest battery, the highest resolution screens. Now that all major phone makers are on an almost equal playing field, companies like Samsung and LG are taking it to the extreme.