Loosely coupling with Typescript
#typescriptAdjusting 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 #tipsYou 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 #experimentI'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 #tipsIf 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 #intermediateYou can use slightly different types than you would normally use to get stricter assurances on your data.
Introduction to testing with Python
#python #testing #beginnersChecking 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 #readabilityUsing 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 #hooksI 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 #beginnersSometimes 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 #testingIn 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.