wordsandbuttons
Phoenix
wordsandbuttons | Phoenix | |
---|---|---|
12 | 111 | |
482 | 20,600 | |
- | 0.4% | |
8.4 | 9.3 | |
7 days ago | 6 days ago | |
HTML | Elixir | |
The Unlicense | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
wordsandbuttons
-
JavaScript Bloat in 2024
Meanwhile, all the pages on https://wordsandbuttons.online/ with all the animation and interactivity are still below 64 KB.
This one, for example, https://wordsandbuttons.online/trippy_polynomials_in_arctang... is 51 KB.
And the code is not at all economical. It's 80% copy-paste with little deviations. There is no attempt to save by being clever either, it's all just good old vanilla JS. And no zipping, no space reduction. The code is perfectly readable when opened with the "View page source" button.
The trick is - zero dependency policy. No third party, no internal. All the code you need, you get along with the HTML file. Paradoxically, in the long run, copy-paste is a bloat preventor, not a bloat cause.
-
Writing HTML by Hand
I do all the https://wordsandbuttons.online/ by hand, and this is my top 10:
2527 p
- Homebrew Website Club
- Words and Buttons
-
Rule of Three
Cloning things makes maintenance harder linearly. Generalizing things makes maintenance harder exponentially. Counterintuitively, generalization only makes sense on small numbers or reiterations, not the vice-versa.
I started https://wordsandbuttons.online as an experiment in zero-dependencies architecture. No third-party, no self-reference. Every page is completely independent. I was told, that as it grew, it would inevitably become impossible to maintain.
Five years passed, including a two-year pause for writing a book. I did more than half a hundred interactive tutorials and quizzes, and continue to add them when I have time. The thing simply refuses to go "too complex to maintain". All the maintenance problems I ever faced with this design were handled within minutes. If there is too much typing, I write a Python script. If not, I do the change manually, replicate it in a few pages, and go on.
As a free bonus, since all my pages are essentially hand-written, no dependencies = no uncontrolled growth, they are all fewer than 64 KB each. Ultra-fast to load, and I never get a "Reddit effect" since even 1000 requests a second is only 64 MB of data. It's green then tea too. I usually have a few hundred thousand visitors a year, and they barely consume enough electricity to boil a kettle of water.
I think this rule of three, like many others is just an attempt to escape well-known complexity issues by putting them under a carpet of less known complexity issues. I'm very happy to have ignored it when considering design for my site.
- Visualization of Common Algorithms
-
If you can't write assembly like a poet, you can read disassembly like a hunter
Done! All the expandables have background colors now. https://github.com/akalenuk/wordsandbuttons/commit/22ef6295c... Thanks for the idea!
- Words and Buttons Online
-
Ask HN: How to you monetize a tech blog?
Very indirectly. My https://wordsandbuttons.online/ helped me cement a publishing deal with Manning, and the book I wrote for them (https://www.manning.com/books/geometry-for-programmers) works as a hourly rate magnifier in contract work negotiations.
-
Ask HN: What has your personal website/blog done for you?
I do https://wordsandbuttons.online/ as a personal-ish website. I don't append my face to every page but a visitor is usually a few clicks away from my other works so the site is de-facto more or less personal.
First of all, it's a nice hobby. No bullshit programming, no frameworks, no dependencies, no annoying editors. I just write my code and text and enjoy doing so.
Second, it gives powerful motivation to study. I'm now writing a new page on rational interpolation and just yesterday I accidentally found a very simple way to avoid the Runge effect. I was just playing with interactives and it came out of the blue. There is no way I would have learned it otherwise.
Third, it helped me cement a publishing deal with Manning. They came to me and proposed to propose them a book on geometry. And so I did. The book is called Geometry for Programmers and it's coming this summer.
Fourth, I do public lectures (or at least I used to before the war), and the audience loves interactive illustrations. So I usually turn my site pages into presentation-like pages and do lectures with them.
So for me, having a website pays off in multiple ways.
Phoenix
-
Idempotent seeds in Elixir
A standard Phoenix app contains a priv/repo/seeds.exs script file, which populates a database when it is run, so that developers can work with a conveniently prepared environment.
-
Ask HN: Did you encounter any Leap Year bugs today? How bad was it?
There was one in the Phoenix Framework (Elixir) about issuing certificates with an invalid end date: https://github.com/phoenixframework/phoenix/issues/5737
Interestingly, Azure had this bug some years ago too leading to an outage. https://azure.microsoft.com/en-us/blog/summary-of-windows-az...
-
Aplicando MVVM en Phoenix LiveView
Official website: https://www.phoenixframework.org/
-
Things I like about Gleam's Syntax
Since you mention Rails, have you seen https://www.phoenixframework.org/
-
Building Apps with Tauri and Elixir
Thus, we set out to build a desktop application using a LiveView from the Phoenix Framework in Elixir. For the uninitiated, a LiveView is a process that receives events, updates its state, and renders updates to a page as diffs. The LiveView programming model is declarative: instead of saying “once event X happens, change Y on the page”, events in LiveView are regular messages which may cause changes to its state.
-
Has anybody compared Phoenix Framwork vs. Blazor?
It seems though like Phoenix is similar like Blazor Server (using web socket), but Phoenix is: SEO friendly (first render is plain html) Light weight, scales well and concurrency is first class Easy to develop (runs a local server so you see live updates) Compiled With auth out of the box https://www.phoenixframework.org/
-
Ask HN: Why isn't Phoenix/Elixir more mainstream?
Sorry to hear this. Phoenix v1.7 changed how it structures files in disk and that broke quite some of the getting started material. However, the guides are always kept up to date, so you can give it a try: https://hexdocs.pm/phoenix/overview.html
You can also see the resources on this page listed by year: https://github.com/phoenixframework/phoenix/blob/main/guides... - the recent launched ones are most likely up to date.
-
Emoji Generator with AI
Yes! I love Elixir :) [Phoenix LiveView](https://www.phoenixframework.org/) is really amazing. I feel so fast working in it. I got hooked after watching Chris McCord's ['Build a real-time Twitter clone in 15 minutes'](https://www.youtube.com/watch?v=MZvmYaFkNJI&embeds_referring...), and things have improved a lot since then.
-
Ask HN: What's the best modern back end?
I still work on a lot of Java projects. As of JDK 17 Java has most of "ML the good parts" and has the same scalable, reliable and high-performance threading Java is famous for. JAX-RS provides a Sinatra style framework that makes it easy to write JSON API back ends. JDK 21 is just about to come out as a long term supported version and it will be even better.
I do my side projects in Python with aiohttp and think it is a lot of fun even though people tell me it is suicide (I guess if you block the thread you are in trouble)
I think "Next.js" really wants a node.js backend which has the big advantage that you can share code with the front end and back end. It's basically single-threaded but I know people who are happy with it.
The system I'd most like to try is
https://www.phoenixframework.org/
which is just great if you want to do stuff with websockets that is more interactive than what most people are doing.
- Ask HN: Leetcode for Back End and Server Development
What are some alternatives?
hiccup - Fast library for rendering HTML in Clojure
Django - The Web framework for perfectionists with deadlines.
org-clive
sugar - Modular web framework for Elixir
rednafi.com - Musings & rants on software
hotwire-rails - Use Hotwire in your Ruby on Rails app
vscode-didact - Framework and tools for providing interactive tutorials with active links that call VS Code commands
kitto - Kitto is a framework for interactive dashboards written in Elixir
handbook - The Jitsi Handbook
trot - An Elixir web micro-framework.
love - LÖVE is an awesome 2D game framework for Lua.
RIG - Create low-latency, interactive user experiences for stateless microservices.