RSSAmplifier

Blog

Krister's coding adventures

Snippets and tips that the internet is lacking from a coder still learning.

code.krister.eeRSS feed ↗15 posts

Latest posts

New Project Commands for new Elixir Phoenix LiveView project in 2023

These are my most common cli commands to start a new project with Elixir using Phoenix LiveView (and of course Ecto). Phoenix 1.7 is still a Release Candidate while being used here so things may change. Will keep this updated. TLDR mix local.hex mix archive.install hex phx_

AB Testing in Elixir, Phoenix

Here's how you can split traffic into multiple variants, while keeping that user on the same page on revisits. Nothing fancy. How to get stats to analytics isn't covered. Direct all routes to a single function Optional. I like my static page traffic handled by a single function. lib/platform_

Errors not logging in Phoenix

My user got an 'Internal Server Error' at a specific URL. I check the server logs - nothing. This is not the first time this has happened. So I spend a whole day looking for a solution and chatting about it. I try out my usual tricks like turning on

A code editor for schools.

Today I get to experience success. My students passed the final test with super high scores. They rated the programming course very highly. There were problems of course - a lot of them. But the core concept held up. My original teaching method seems to hold water. Lectures are super

Phoenix 500 with no errors (Elixir)

I'm deploying LiveView for the first time and what a strange sight. Browser says Internal server error , yet server log has no error. I deploy again with :debug logger level ( config :logger, level: :debug ). Started Koodikool Platform. [info] Running PlatformWeb.Endpoint with cowboy 2.8.0 at :::4010 (http) [info]

2020 and Onward

The lockdowns didn't really affect me all that much. I was just happy there was a reason for companies (and us) to try out remote working and pollute less. The main product I made was Bashboard. It currently has 1 user and he doesn't reply by email. I've thought about

How to drop database between tests in Elixir and Ecto?

Note: Make sure you help out the next dev by commenting if you get stuck . You want each test to run in a clean database so they don't interfere with each other. So how do you clear the database? Best is to keep your tests in a sandbox. A sandbox

Nueheara IQ Buds Max 2 Review

Factory issues The first pair I got the right earbud was dead. Wouldn't even turn on. Support has been good though and 4 months later I got a new pair. This time the touch controls only register single taps. Much worse however is that they keep disconnecting every 10 minutes.

Hiring: Culture and results

We just hired our first non-technical person. Her responsibility is sales. Her skill is business analysis. I've known her for a while and did wish there was a way for us to work together. Yet she is a classy and well kept young lady. We're a bunch of dudes making

My First Newsletter (remember me?)

Hey. You subscribed to my blog either a few months ago or perhaps many years ago. I haven't sent out a newsletter ever. So hello again! I write irregularly. Some months there's many posts every week. Some months not a single one. That's not going to change. No promises. But

A team is worth more than the sum of people

Me and my partners agree that me going off and doing some startup team is not a recipe for success. One person just can't think of everything and one just needs to bounce off ideas and think of more options than the one brain can handle. A less apparent surprise

Google Analytics lies.

We all know that people use ad blockers and thus you probably have more visitors than the numbers show (solution: custom fetch request or server side analytics). Well today I found out Google Analytics with all it's amazing power isn't doing much to mitigate bots. Check this out. On the

Bashboard flunked the PH launch

Which is not a suprise. I was however pleasently surprised how many people voted for me when posting to my social groups. I mean 15 isn't much, but it's a lot more than what I was expecting :) So anyway what are the stats ? So on PH launch day there were

Server Sent Events with Elixir

SSE is old, but not a lot of Elixir materials out there. Took me 3 days to get this working, so congrats for finding this :) This is not a tutorial, but a code example from my project (it's open source so you can see the actual code ). This post will

onMount doesn't fire Sapper/Svelte

I only have two pages A links to B. Both have a preload of data. So I load A, everything is nice. Click on the link to B and voila - the new layout and everything, but the onMount from A renders components into page B. WTF? What happened? Turns