My new record player: Denon DP-300F

So Doist offered me a welcome gift when I joined, and I bought something I’ve always wanted—a record player. It’s been on my wishlist for ages, but I never really bought it because 1) it’s expensive, and 2) it’s hard to justify in this age of electronic, streaming music. I initially thought of a Fluance RT-82 but it was out-of-stock, and so I picked a Denon DP-300F. It’s a bit more muted-looking than the Fluance, but honestly it works better: fully automatic, and it’s much easier to setup.

The last time I felt this way after getting something was when I bought a bike[1], and I’ve since realised I like nice, tangible, lovely things. It’s part of the reason why I really like Apple products or a Leica camera, or a Royal Enfield. It’s the sense that when you use them, you are holding something thoughtfully, intentionally designed for a purpose.

This is how it looks & sounds:

I played Beatles first—of course.

I bought some records too, and have been listening to em non-stop since I got this 😀

Each record is just wonderful—both to listen to, and then experience its covers and how it feels inside. Here’s the Beatles one:

This is music from a different age.

So why records? I got into this knowing it’s an extremely temperamental medium: I had to adjust the tonearm quite a bit to even get the record to play. It’s from an era ago: and there’s cracks and pops in the music at times. Sometimes the stylus skids over the tracks, causing echoes or distortion. The records get dusty, just like books and have to be cleaned, and they have to be stored strictly vertically, otherwise they may warp or bend. It’s… difficult, and I’m sure many a record owner would have breathed a sigh of relief when cassettes came around, and then CDs, and finally the end of physical music.

Why records? Because:

  1. It is physical music. There is a sense of certain tangibility in owning real things that you’ll never get from a virtual medium. The texture of the cover as you take out a record, the act of cleaning a record with your brush. Placing it carefully on the mat. Picking up the stylus and placing it down for the music to come alive. This is part of the reason why beautiful hardware from Apple still sells.
  2. It slows you down. There’s only a handful of tracks on a side before you have to manually flip the record around. You have a limited music collection, and you tend to re-listen, and find nuances in music instead of searching for the next fix. It’s much like the archaic focusing tech on a Leica M: so much slower than auto-focus, but that is the whole point. You slow down and sometimes you take better photos.
  3. There’s a bunch of bad things in old tech, but there’s a lot of good too: records are physical, it won’t ever disappear from my library because of artists rights issues, and my copy will wear with me the more I listen, it’ll be my own unique sound. If you have a favourite concert pressed direct to a record, it’ll be the closest you’ll come to actually being there—there’s no remixes or editing possible here.
  4. And then there are memories: of a record you’ve always wanted to own, but somebody gifted them to you. Of the first time you listened to a record with friends. It’s a piece of a dream come true.

That’s enough about records. As you probably can guess, I love this gift. 🙂


[1]: It’s a tale of woe for the bike unfortunately. I had to move away to Bangalore, and then my back pain really acted up, and the bike remained unused for so long that it started to rust. I sold it off. Some day, I’ll buy another.

The Origins of He-man & She-ra

So I watched and loved the new She-ra on Netflix, and that made me interested in how all of this came about. He-man is a bit strange in that unlike most superheroes, the toy came first and then came all the mythology & the storyline around it. But the story definitely appealed to kids: it still has one of those phrases I’ll never forget from when I was a kid: “By the power of Grayskull! I have the power!”

Power of Grayskull on Netflix

So it’s interesting to learn how the character was crafted and built, and what was good, and what went wrong in He-man history. Watch: Power of Grayskull on Netflix.

Advanced Typescript: Inference

So in part 1 of this series, we looked at how the typeof operator can be used to infer the Typescript type of an object. There’s a bunch more ways to infer types, and it makes working with Typescript pretty interesting as you can make the type inference do the work for you. Here’s a few of them:

Infer the ReturnType of a function

Works like you’d expect:

> function isEmpty(s: string | null | undefined) { return s === "" || s === null || s === undefined }

> let a: ReturnType<typeof isEmpty>

> a = "hello"
[eval].ts:3:1 - error TS2322: Type '"hello"' is not assignable to type 'boolean'.

3 a = "hello"
  ~

undef

Note the slightly weird construction: ReturnType <typeof isEmpty>. That’s because ReturnType (just like all Typescript types) expects a type as a parameter, and not a value.

Infer the type of an instance from the Class Name

Just like ReturnType, there’s also InstanceType:

> class Trigger { x = 0; y = 0 }

> let g: InstanceType<typeof Trigger> = "hello"
[eval].ts:14:5 - error TS2322: Type '"hello"' is not assignable to type 'Trigger'.

Infer the type of Props of a React Component

Here’s a code fragment from Reactist test suite that illustrates this:

    const getAvatar = (
        props?: Omit<React.ComponentProps<typeof Avatar>, 'user'> & {
            user?: { name?: string; email: string }
        }
    ) => (
        <Avatar
            user={{ name: 'Henning Mus', email: 'henning@doist.com' }}
            size="xl"
            {...props}
        />
    )

As you can see React.ComponentProps works pretty much like ReturnType, so you don’t really need to export Props from a component ever. (h/t Janusz)

Typescript has far more complex inference (the infer keyword comes to mind), but this is good enough to start and really simplifies a lot of use-cases, and avoids unneeded type exports from a library.

Recommending: Grab Chai

I’ve been having a virtual cup of chai and good conversation with interesting folks through Grab Chai for a month or so now.

The tagline pretty much speaks for itself.

It’s been great. Like-minded people who I would’ve otherwise never connected to and random folks who do interesting stuff, both. Here’s a couple of photos I clicked:

Do check it out!

gifify: easy video to GIF maker

Update: I’ve switched to using Gifski instead, as that provides a progress bar & a UI!

I’ve been using videos to illustrate points for quite some time now in pull requests and code issues. Since I switched to Github, I couldn’t really directly upload videos to an issue or a comment without uploading them somewhere, and that was kinda frustrating.

Enter: gifify

It’s a command-line tool that does the job well, and is a simple brew install gifify away. It does install a ton of dependencies though, but combined with the new Shift-⌘-5 shortcut, it’s super-easy to quickly record something to show folks on your Mac.