My Next Project – Scope Change

Table Of Contents

Introduction

This is the second post of the series. I want to write a post every week, documenting every change, no matter how small. Given I still have some spare time now, I have gotten a lot done. I finished reading three books about Elixir, and it’s given me some great ideas. I know, books aren’t the greatest way to learn a programming language because no one book will remain up to date for more than a year or two at the most. However, it does teach you some interesting things that other means won’t. Also it’s way more friendly (usually, depending on the book), so why not splurge? Plus, I had an Amazon gift card burning a hole in my pocket.

If you’ve been paying attention, I changed this from about my upcoming Book #3. I will make a project, but it will be something else with some other stack because Elixir/Phoenix is capable of some amazing things and I don’t want to use it on some one-and-done thing. I had a vision of creating a platform for learning.

The Stack

I will be unfortunately cutting Vue out entirely. I will be doing things 100% with Elixir’s Phoenix and its fascinating LiveView. I really like Vue, and I will use it for whatever project I actually do for book #3, but this gives me the opportunity to wait for Nuxt 3 to come out, which I’m looking forward to. There are several more reasons for this choice.

The first is that I’ve never used this technology before, and I love learning things. LiveView is different and lets you avoid using JavaScript entirely. That might be kinda strange, to effectively use sockets to avoid JavaScript, but I should try it at least once, right?

The second reason is that it allows for stateful communication between the backend and frontend, which is what Phoenix is all about. I might as well embrace this thing wholeheartedly.

The third reason is that otherwise I need to worry about things like CSRF tokens and authentication. Nothing is too complicated, but it’s just more work. The programmer’s credo is to embrace laziness. Or, rather, that there’s a humongous amount of things to do, and you should try to build off of everything that’s come before you rather than reinvent the wheel every time you do anything.

To sum it up, the frontend will be Phoenix LiveView, the backend will be Elixir Phoenix, and the database will be Postgres. I will be using Elixir’s Ecto as an ORM.

The Endpoint

The internet is the greatest tool for learning and enlightenment that has ever been created by humankind, and we need to realize that. There have been some wonderful ways in which that has been done, such as Wikipedia, but it’s been sadly lacking in the last decade. I want to be able to say “I want to learn programming” and just go to a webpage that will at least help me get started, and, once I have enough down, point me in the direction of better resources.

Phoenix’s big selling point is two things: 1. it allows stateful (continuous) communication between client and server and 2. it can handle many simultaneous connections. In the last book I was learning from, they created a system for users to create videos (just links to YouTube) and store it in a database, have users write messages on it live and have a query API look up information at the same time for every comment. I could easily do that with any Framework with a backend, but the quickness and ease was astounding. It opened my eyes.

Oh yeah, the simultaneous connections thing. That’s something I couldn’t do on my own, but I’m not exactly worried about it for now because no one’s visiting my websites. But if I were to create something that people wanted to visit, Phoenix will be my go-to choice.

Back to the subject at hand. What is the endpoint for all of this? I recently had the experience where an old friend from graduate school wanted to get into programming. So what did I do? I pointed him towards the same resources that I used to learn Python. I had to explain a bunch of stuff, like setting up an IDE, how to access the correct version of Python, how to use the REPL and how to use the terminal. A lot of this stuff isn’t really available to you, and you just need someone to sit down and explain it to you.

But a big problem with that is that a lot of resources are out of date. These will be things that are several years out of date, and since then things have changed. Or it won’t work according to your setup or whatever. There are Facebook groups out there too, and they can be a great place. But I had another idea. A free, centralized platform just dedicated to learning where you can browse lessons, ask a question at any time and anyone can answer it. If you want to upload/link to something, you can too. And any question you answer on something you created would display that you did that.

To be honest, libraries and Wikipedia do the same thing and for free. I think they are fantastic resources, but there’s a few problems: libraries are getting destroyed in the modern era by publishing companies and people having a strange distaste for one of the greatest things ever created and always reducing their budgets, and you can’t have an active conversation on Wikipedia unless you’re modifying the article. Or maybe you can, but it’s not easily available or live. Also, Wikipedia’s tech stack is a bit old. It will stand the test of time, and it will remain where my website will get outdated more quickly. But for now, I want to create something modern and perhaps more malleable to the future.

The emphasis of the platform would be on the conversation and staying up to date. And I will never monetize it. I believe that people learning is everyone’s interests. It enlightens the individual, it helps them find a purpose, it makes them happier, and as for more cynical reasons, it makes you more productive and able to accomplish greater things.

The Details

The website will be pretty simple, to be honest. I am foreseeing it roughly on the same level of complexity as A Week’s Worth.

Currently, my plans are:

Here are things that I’m discussing:

Fundamentally, I want the platform to be easy to use and a good place just to look something up and learn. I think I have a good start with that. But what will the title of the project be? Maybe “too online”. I like self-parody/deprecation. Maybe it’s something wrong with me.

Bad Stuff

I’ve learned is that one of the first things that must always be considered are bad actors and edge cases. Here are the first ones that I can think of:

These are just the ones that come off the top of my head.