Loosely coupling with Typescript

#typescript

Adjusting slightly how you use types, you can get code that's easier to maintain, test and reason about.

Use a custom data folder on Flatpak apps

#linux #flatpak #tips

You can run Flatpak apps on a separate data folder to allow separate instances of the same app, better isolation of personal/work data, and more. Here's how...

Handle Javascript errors like in Go

#javascript #intermediate #experiment

I've experimented with error handling for Javascript async code. You'll see the usual, the not very common, and something unconventional. Hopefully this may be of use to someone.

Running unverified apps on Mac

#mac #gatekeeper #workaround #tips

If you're trying to run a binary/app on your Mac and you don't seem to be able to because of a missing verification, this tip may help you.

Safer types on TypeScript

#typescript #types #intermediate

You can use slightly different types than you would normally use to get stricter assurances on your data.

Introduction to testing with Python

#python #testing #beginners

Checking that your program works is essential, in this post I'll show you how you can make sure that your app behaves as expected writing tests that will run in a blink instead of having to manually test the app trying every use case.

Unraveling callbacks with async functions

#javascript #tips #webdev #readability

Using async functions we can make our code easier to read and maintain, on this article I'll show you how I refactored real world code.

Custom useQuery hook for Apollo

#javascript #graphql #apollo #hooks

I need/want to query our GraphQL data using hooks but official Apollo support is not ready yet, so I wrote a custom hook to unblock our work until the official hooks are ready.

Simplify nested object property use

#javascript #tips #webdev #beginners

Sometimes we deal with deeply nested objects and we need to add extra checks to prevent our app from breaking while trying to access undefined parts of that object. Here's a not so usual way of doing so.

Redux and single purpose functions

#javascript #redux #webdev #testing

In this post I'll share a couple of lessons learned while working on SpiderOak Semaphor, where we use: Javascript and React to build our UI components, Jest to write our tests. and Redux to serve as single source of truth for our data.