Show more

Just set up a Homebrew 2.0 installation on my Windows 10 development box (using Ubuntu in WSL, of course). Works like a charm. Go and install your fancy packages already. 🔥

Why is there a maximum limit for the library on a music streaming service in 2019 Surely you folks have a plenty of disk space to store all the data, right?

I'm confident O'Reilly just has a random animal generator for their book covers. Or can someone mansplain to me what this dog has to do with bots?

Tried deploying a dummy TypeScript application to by using their `ncc` script compiler. It worked straight away by pointing the endpoint to the compiled `index.js` file under `dist` folder.

Sick magick! ✨

Nazis on our streets 

: Narcissistic Numbers

Write a method which returns whether or not i is a Narcissistic Number.

My JS solution below.

: Simple Events

"Your goal is to write an Event constructor function, which can be used to make event objects."

This time I felt so omnipotent I completed this exercise in three different languages (Javascript, Ruby, and Python)!

Love how the concept of sets works in all of them.

: Find The Parity Outlier

You are given an array (which will have a length of at least 3, but could be very large) containing integers. The array is either entirely comprised of odd integers or entirely comprised of even integers except for a single integer N.

Write a method that takes the array as an argument and returns this "outlier" N.

My Javascript solution:

: Potion Class 101

This is your first potion class in Hogwarts and professor gave you a homework to figure out what color potion will turn into if he'll mix it with some other potion. All potions have some color that written down as RGB color from [0, 0, 0] to [255, 255, 255].

To make task more complicated teacher will do few mixing and after will ask you for final color. Besides color you also need to figure out what volume will have potion after final mix.

: Replace With Alphabet Position

In this kata you are required to, given a string, replace every letter with its position in the alphabet.

If anything in the text isn't a letter, ignore it and don't return it.

My Javascript solution:

: Playing with Sets

Create 2 functions:

* `isSubsetOf()` getting 2 sets as arguments and returning true if 2nd set contains all elements of 1st one.

* `isSupersetOf()` getting 2 sets as arguments and returning true if 1st set contains all elements of 2nd one.

My Javascript solution below.

What I love in Codewars is you can solve katas TDD-like thanks to tests. Here's my refactored solution.

: Pig Latin

Move the first letter of each word to the end of it, then add "ay" to the end of the word. Leave punctuation marks untouched.

My Python solution below.

: Bit Counting

Write a function that takes an (unsigned) integer as input, and returns the number of bits that are equal to one in the binary representation of that number.

Example: The binary representation of 1234 is 10011010010, so the function should return 5 in this case

My Python solution below.

If you're like me and write your blog entries with VS Code install this extension for more inclusive language.

There's no need to get intimidated by generators with strange yield keywords. Just loop 'em through!

Downside is their syntax is pretty tricky, remember to include the asterisk…

For those interested, here's the complete Docker Compose configuration for development usage.

Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either! We adhere to an adapted version of the TootCat Code of Conduct and have documented a list of blocked instances. Ash is the admin and is supported by Fuzzface, Brian!, and Daniel Glus as moderators. Hosting costs are largely covered by our generous supporters on Patreon – thanks for all the help!