April 4, 2023

What I’ve been working on

A lot has happened in the last couple of weeks. I think I’m now a permanent member of the “web development is fun” club. It’s like a slightly more frustrating LEGO with an endless amount of ever changing parts. What’s not to love? That being said, here’s what I’ve been working on in the last couple of weeks.

My new portfolio: marcel.fyi

This one took me a while but I’m very happy with the result. It was harder than my other projects because “Ah fuck it, I’ll just leave it like that” is easier to achieve when it’s not about presenting you and your work but only about learning something new. I powered through and I’m quite happy with the result.

👉 https://marcel.fyi

(I don’t understand why the domain was still available. Sorry other Marcels, it’s mine now.)

Next.js and React are still something I’m actively trying to wrap my head around but since it’s a known problem and I need ever changing challenges to keep me motivated, I wanted to spice it up a little.

Spline is a fantastic tool to add 3D elements to websites. I’m cheap, though, and paying $7/month seems crazy to me just to add a silly 3D avatar to the upper left corner of some random website. A couple of years ago, in one of my previous “let’s learn programming” bursts, I bought Three.js Journey, a fantastic course that I just wasn’t equipped to understand yet. Fast forward a couple of months of intense learning of basic programming skills later: No problem. I fired up Blender, built a 3D character of myself, found out how to hook everything up to Three.js and React Three Fiber and voilĂ . Not only am I saving $7 a month, I also learned valuable skills in the process.

Drawmatic

Drawmatic is a little app that gives you a new drawing prompt each day. The rudimentary drawing tools and time limit are there to give you a little kick of non-perfectionistic creativity to start your day. Your allotted drawing time is only counted when you’re actually making lines.

Finished drawings are being saved to local storage. I even added a “Create an image from this HTML element and copy it to your clipboard or save it to your computer” feature! All of this is unfortunately slightly broken on mobile but what can you do.

Gone Fishing

I needed something to teach myself user auth and databases so I grabbed myself a copy of Supabase and build a… I guess… game…? There’s no gameplay loop and it doesn’t make sense and isn’t fun but it works. A user can sign up via magic link. When they come back to the site and haven’t added a username yet there’s a prompt for that and after that they can… fish. For those three items that I was willing to add to the database.

I implemented a working rarity system. A way to sell items. A lot of unnecessary Framer Motion fine tuning for the bucket button and, here’s the kicker: I won’t release it to the public because it’s obviously a piece of shit that has no right to exist except as a playground for me.

That’s it for now. Thanks for reading.

Byeeee!

March 10, 2023

Adventures with Route Handlers & request methods

It took me something like eight hours to understand how to bring Next.js 13 Beta to let a user put text into an input field and use that text in a function. Here’s why:

  • The component has to be client-side for a state driven input field to work.
  • The function had to be invoked server-side because it uses an (OpenAI) API key that would have otherwise been exposed.

I tried for hours to somehow manage to take the string from the input field and throw it into the server rendered component. That doesn’t even make any sense and was always going to fail. It would be a paradox.

It took me only a couple of hours to come to that conclusion. That’s when I figured that Route Handlers, formerly known as API Routes might be the solution. There was only one problem: I didn’t really understand what they are, what they’re doing and what exactly they’re meant to be used for. After playing around with them for a while, I somehow lost my mind and went back to my initial approach: Trying to convince a server side component to dynamically render something based on data from a client side component.

Continue reading “Adventures with Route Handlers & request methods”
March 6, 2023

I built a whole book blog system

You might remember my ramblings about how I’m starting to get the hang of web development and actually having fun with it, right?

Well, what can I say. I did what I set out to do when I cancelled my Webflow powered book blog because of their insane pricing: I learned how to program and built my own. It’s a lot faster, has more features and doesn’t cost me anything.

You can play around with it here: buch.fyi
I haven’t written any opinions for books read in 2022/23 but everything else should be there.

  • After talking to friends about how I don’t understand how a React application can securely use API keys and secret data like that, they pointed me in the general direction of Next.js and explained server side rendering to me. I worked through the documentation and built buch.fyi on top of it. Since I love life on the cutting edge, I’m using Next.js 13 with the new /app folder structure.
  • While doing so I discovered that I don’t need any API keys or databases at all. It’s all markdown files, baby!
  • It’s all TypeScript! Look at me, writing typed code. All type saved up in here.
  • I’m still using TailwindCSS for everything CSS related. It’s just fun to use, I’ll refresh my classic CSS knowledge when the time comes.
  • Some transitions are using Framer Motion, which is as complex as it’s amazing.
  • The book covers show up thanks to Open Library’s Covers API. That’s me, casually using an API to mix and match data!
  • It’s all hosted on Vercel. I don’t understand why it’s free and how they manage to make everything as sleek as it is but I’m a fan. It’s incredible.
  • I even learned how to create a RSS feed! Look at https://buch.fyi/feed and tell me this isn’t the best feed you’ve ever seen me create.

This may sound weird but I can’t wait to see what I’m doing next. So many possibilities! So much stuff to play around with!

February 14, 2023

Web development is a pain in the ass

I bought the limited early access to The Joy of React the other day and worked through the whole course since then. Switching to web development while still being at the very beginning of my journey of becoming a Swift developer might not be the smartest choice but I never claimed to follow a thought-through master plan in regards to my learning, so whatever.

Before we get started: These are my current thoughts on getting into web development as somebody who has only a basic understanding of HTML and CSS. These thoughts will be different in a year from now. Cool your jets and consider this as something like a user test for the question of “How accessible is becoming a web developer?”.


Web development is a pain in the ass. You need to understand what a terminal is, what it’s used for and how to use it to even get to the point of asking yourself “What the fuck is NPM?”. Then NPM needs to be installed which feels like hacking the Matrix, since it does something somewhere but you won’t see anything but lines of text in your little terminal window into the soul of your computer that you’re afraid to touch because what if you sudo your SSD or something.

Continue reading “Web development is a pain in the ass”
January 8, 2023

Work in progress: Goblin Mode

A lot has happened since I shared these two posts about the project I’m currently working on. I figured it’s time to let you know what has happened in the meantime. Here’s the short version: I learned a lot. Like A LOT. This is my third app ever and it’s the one where a lot of previously vague concepts finally clicked. I’m injecting dependencies, juggle with types and create view models like there’s no tomorrow. It’s so much fun!

What was supposed to be a placeholder icon has grown on me over time

A couple of weeks ago I invited some friends to try out the app and see if the overall idea works. This was a huge moment for me. People signed up for something I programmed. They created literal user accounts saved to a database I connected to an app I coded. Crazy. It got even cooler after that: They started using the app. And somehow they didn’t stop. I’m not sure if they’re only using the App because they want to be nice but it feels like they enjoy sharing one-off status updates with a closed and private group of friends. No endless timeline, no fame, only letting people know what you’re up to.

Let me give you an overview of how the app looks like at the moment.

This is the main view. You see your own current status and how old it is. Below that you’ll see all current status of your friends.

I wrote the code for all of this like three separate times. The first two iterations didn’t care about the amount of database requests at all. They worked but they weren’t scalable. I’m now using Firestore realtime updates and it’s amazing. If a friend updates their status while you’re in the app, the status automatically gets loaded from the server and displayed on top of the stack.

But what happens when a friend hasn’t updated their status since midnight?

SPIDERS!

They become stale. I like the idea of having a predefined tabula rasa moment. Each day starts with a clean slate. If you post something one minute before midnight that status will only be fresh for one minute. Slightly weird, but I kind of like it.

Speaking of likes: I implemented a system to like status. It works well and is fun. I’ll probably replace it with a system to react with a tag, though. Liking feels wrong when a friend posts a status about them being tired, feeling empty or being sad. I want to be able to react to these with “🤡 Clown”.

There are more than 130 tags now. I built an admin area and support for admin accounts into the app and can CRUD tags and tag categories in seconds. New tags and categories show up on user’s devices without the need for an app update. It’s all in the cloud, baby!

I also build a system for tags and tag categories that are behind the paywall. My current idea for monetizing the app would be to put most of the cool tags behind a subscription of some kind. Those server bills need to be paid!

With the ever increasing amount of tags my friends asked for a tag search feature. That has been implemented as well. For those moments when you need to share your shower thought quickly.

And last but not least: I revamped the whole follow/unfollow system I talked about here. It became clear that asynchronous following isn’t the right concept for an app that’s meant for you to share semi-private status updates. Now there’s a whole screen dedicated to see who requests being friends with you. If you accept a request you become friends with the other person and you can both see the status of each other. If you cancel a friendship both ex-friends stop being able to see the respective status. Fair and easy.

I’m toying with the idea of limiting the maximum number of friends each person can have. Just to drive the point of the app home. That didn’t work out very well for Path back in the day but maybe times have changed. Who knows.


That’s it for now. I still don’t know if I’m going to release this to the public at any point. I’m still a novice coder and my implementation of everything related to Firebase has a big potential to suck. I’m generally cool with my code not being the best but in this case it could result in me racking up an enormous Firebase bill. That would not be fun at all.

As I said: Who knows. I might find a way to limit the app features enough to let people try it out without me becoming poor while allowing people to pay to cover the database costs. It sure would be an interesting problem to have.


Do you feel like there’s a Goblin Mode shaped hole in the lives of you and your friends?

December 18, 2022

Added follow/unfollow and eyecandy

I’m guessing wildly how a performant and thought-through data structure is supposed to look like but this one is mine and it works and I’m proud of it. I had another breakthrough in understanding why MVVM makes sense while working on a feature related to this, by the way. What seemed like a lot of files and complicated connections between things that could just live in one file now makes sense.

Oh and I think I found the name for this project but I have to live with it for a couple of days first before I’ll announce it to the world. It was called “Shmood” for the first couple of days but I decided that that name doesn’t feel right.

And while we’re at it, here’s a bit of eye candy, featuring POW.