I managed to get Hypatia, an Elm and PureScript like typed Functional Programming language that compiles to Lua, running in Roblox. Roblox is a 3D game engine that has a ton of already built games and editor where games are built in Lua. My kids spend way too much time and our money in it. I couldn’t get Amulet, another similar language, too compile, but Hypatia “spoke to me” more. Advent of Code 2020 this year taught me dealing with no types and race conditions is painful. I really wanted to explore what other language options there are that compile to Lua.
(more…)Author: JesterXL
-
Five Levels of Error Handling in Both Python and JavaScript
Introduction
I spoke at OpenSlava 2020 a few weeks back, specifically around the levels of error handling you should apply to coding. However, I wanted a written article to refer to for those who don’t want to watch the video.
The below covers the 5 levels of error handling. I call them “levels” because the idea is to start with the lowest level, learn how it works, and then level up to the next. The ideal is that you utilize level 5 error handling, pattern matching, in all types of coding you do regardless of language. If you’re operating at that level, you’ll have more predictable code. There are other types of error handling, these are just the most common I’ve seen.
The error handling skill tree is as follows:
🏎 lvl 1: ignore ’em, dynamic languages have fast iteration
(more…)
⚾️ lvl 2: try/catch/throw
🏭 lvl 3: Go/Lua style, function return values, pass back up
⛓ lvl 4: pipeline style, like JavaScript Promise
🌯 lvl 5: pattern match on returned types -
Domain Driven Design Translated to Functional Programming
Attempting again to learn Domain Driven Design, and it’s clear if you’re an Object Oriented Programmer trying to learn Functional Programming, no wonder you’re confused. Here’s a paragraph summary of the 500 page book I’ve translated each sentence into typed FP.
(more…) -
OpenSlava 2020: Using Serverless & Functional Programming for Ingestion Asteroid Price Data
I spoke at OpenSlava 2020 last Thursday. Specifically, I go over the 5 levels of error handling you can use to have more predictable code for Lambda’s and Step Functions.
My preso starts at 2:44:25 Slides – Google Preso | PDF