Ask HN: I just want to have fun programming again
I just want to have some fun writing something without headaches, and that is seemingly less and less easy to achieve today. I'm not a fan of the complexity of either JavaScript or C++, and while I very much like Swift and working in the UIKit world, it's not so portable to platforms that many use.
I feel like there aren't really any good options in software development any more. It's always one big compromise with lots of possible decision fatigue. Every direction has drawbacks.
If I could write an app in a good static-compiled language that did not require extraneous expertise in CSS but that shipped on a web page and looked good using tools only in that language, with good interop with an HTML Canvas, that would be one possibility, but it is again a compromise -- no easy multithreading, dealing with all the front-end baggage to bundle or deploy such an app, etc.
Any recommendations? I'm not afraid of learning an entirely new language too.
218 comments
[ 2.8 ms ] story [ 254 ms ] threadhttps://www.qt.io/
[1] https://screen-play.app/
[2] https://www.qt.io/product/qt6/qml-book
[0] https://news.ycombinator.com/item?id=34707057
Your title says you just want to have fun programming but your post is full of other requirements. You need to decide if having fun really is what you’re after—in which case it seems you’ve found your answer—or if it’s secondary to some other metric such as customer reach.
There is always a compromise. No solution is all good things at once, including easy, performant, and cross-platform. If that existed we’d all be on it. You’re clamouring for a past which I’m doubtful truly existed.
They just focus on making it exist, without premature generality.
Or Racket? https://racket-lang.org/
---
I only have a little experience with the suggestions above; I personally like SvelteKit, but it doesn't fit your requirements.
And while the prospect of cross-platform is appealing, it has 0 accessibility support and no way of embedding or being embedded into native widgets.
It's just a little bit better than passable for game UIs (non-interactive HUDs and one-screenful-at-a-time interactive menus), but once you start needing to implement things like drag&drop, virtualized scrolling, or non-trivial layouts, it get exponentially harder when compared to a "proper" application UI library.
Believe me I use it for a living :)
> no fancy interface, no visual helpers, no gui tools or editors... just coding in pure spartan-programmers way. Are you ready to enjoy coding?
As for "fun" for UI, I found doing UI in Dear ImGui strangely liberating. It sounds like a web front end is part of your requirements, maybe, but if not, try one of the "immediate mode" UI toolkits like that. They have their limitations, for sure, but they come with a lot less "normative lifestyle assumptions" and it's strangely enjoyable to toss a UI together in them.
Also I started having a lot more "fun" once I start doing my hobby projects in Rust rather than C++... once I got past the initial learning curve... I say this not so much for the language side of things -- which can be a little straightjackety -- but for the fact that I was no longer fighting all the sharp corners in the C++ ecosystem (CMake, different 3rd party lib packaging styles, dubious 3rd party library programming styles/standards, etc.). Rust+Cargo simplifies a lot. And the third party crates are generally of pretty good quality and consistency.
Or learn another language, like Zig. That looks fun, too.
It's absolutely possible to build JavaScript apps in a single page with no external dependencies. All you need is a single .html file and a simple development server (I use python http.server).
Writing in typescript is a easy as a single dev dependency to compile the code. There's no multithreading but first class async support.
Additionally, JS / TS are very flexible. You can implement almost any programming paradigm you want to learn. I love doing FP in typescript personally.
And centering a div can still be very hard depending on the circumstances.
Are the circumstances that you are banned from using flex or grid?
You can center anything by making the container display:grid; align-content:center; justify-content:center; I don't know of any situations where that wouldn't work. Flex is a bit finnickier to understand with its major/cross axis concept and wrapping, but you can write Grid layouts with your eyes closed.
> centering a div can still be very hard depending on the circumstances.
Only thing i could think is targeting ancient browsers. I'm curious, do other UI languages not have quirks or edge cases to learn?
I’m sorry learning rust tho. Like it a lot.
I personally find that a much more fun way to program.
For me, the language itself has no bearing on fun. Having something that "just works" in most areas without having to antagonize over 3rd party dependencies allows me to have fun.
I'm sure if I was as familiar with Java or something I'd probably use it for my fun projects instead.
If you want the language itself to be an amusement, then I don't think C# is for you. It is about as boring and straightforward as it gets. I use it because it lets me work on fun problems without getting in the way very much.
I suggested C# mainly it lets me focus on what I'm building. Node I feel like I'm thinking "is there a package for that" "how to use the package" "this doesn't work the way you would think it does"...
If that makes sense...
F# I'm finding to be a language I can have some fun with because some of the syntax just speaks to me (being able to use pipe operators aka |> to chain work so that what you work on is at the front and then it flows into each step without explicitly writing out intermediate variables or writing code inside out feels GOOD to me). It certainly isn't for everyone though.
At some point I want to play with Avalonia because I need to get back to doing non-web UI but I never have the right idea other than some of my game stuff and that's getting done in Godot or Unity.
That's personal experience, of course, but the most "fun" I have in almost any task/topic/field is when it's not 'forced' on me by $WORK
Depending on your project, you might consider working on the backend and API to drive this app and contract/partner with somebody who can do a killer job on a great frontend.
https://elmlang.slack.com
Static FP lang targeting the web as a runtime environment. Wonderful people. The nicest compiler in the game. Tight dev loop. Good tooling.
No JavaScript knowledge required. Join us.
Elm brought back joy and longevity for side projects to front-end for me (that had been ground down by the JS ecosystem sadly)
And the Elm Slack is the most helpful Slack I've ever seen.
Check out the talks by Rich Hickey to see if you have the same sentiment or perhaps this paper: https://download.clojure.org/papers/clojure-hopl-iv-final.pd...
The community of the language largely follows this philosophy, the ecosystem is very stable and there is little churn. The most common implementation is on the JVM making the language very portable.
The headaches historically were with getting your environment setup, but there are amazing tutorials and good tooling or VSCode, IDEA, Emacs and vim.
This is absolutely not a criticism of Clojure or your recommendation. I'm a huge fan of Clojure, but I don't know where OP is coming from/if they've done a LISP before.
I don't know why but whenever I get depressed of bureaucracy at work I turn to functional programming in my spare time.
I have noticed the same thing about myself.
I think for me, I am drawn to remember how simple programming can be.
It has run some ~40% of global telephone communications for a few decades now, on top of the usual suspects (WhatsApp, Discord, (old) Facebook Messenger, Motorola, Blizzard chats, a number of banks...) and predates the JVM by a couple of years.
I'd go out on a limb and say that it's one of the most battle tested VM's there is.
I don't know that learning clojure was a good investment from a practical standpoint, but I took a deep dive into lisp-like languages and don't regret it.
This has, literally always, been the case. You need to pick where you want to compromise, because there is no "one-fits-all" solution.
- Use Electron/Typescript/React/Tailwind or some similar stack if you want to pull together something quickly that works across multiple platforms
- Use Flutter if you want to do that but don't mind it's kinda poor re-implementation of platform-native widgets
- Use Qt if you don't mind the C++ dialect and complexity
- Keep it simple and use Dear Imgui
- Use something like Blazor to build a web app in C#
There are loads of options with different tradeoffs.
I find fun in programming by writing code solving small challenges. Something people really hate, e.g. LeetCode, is actually the fun place for me: I really enjoy writing some small size program to solve a made-up problem with my scattered time. I don't need to worry about language, library, framework, platform, UI, etc. The only thing matters is coding, and that's the thing makes me happy.
In terms of CSS; you'll need some form of styling in whatever language, there are plenty of abstractions on top of CSS if you want [something not css].
I would suggest having a look at Next.js if a web app would work, React Native (use Expo) if you want mobile, or Tauri if you want to focus on desktop (Electron, but in Rust, more performant, smaller size, more secure).
Another thing worth checking out is Flutter. I'm personally not a huge fan for irrelevant reasons but it is cross platform, and it's compiled not-JS (Dart).
I also want to say FE has come a long way, the web platform is much more stable, there are great frameworks and libraries, the tooling is amazing, and above all it's really fun and productive. Give it a shot, you might enjoy it. (Do use TS, or Rescript, or something, JS is better with types).
It's not my jam, but it's def cross platform and used quite a bit afaik.
Someone else mentioned .NET. There's also Delphi and Lazarus. Both are cross-platform and have full-fledged UI systems, without any of the web ecosystem nonsense. It's a totally different experience than web development.
Pick something that sounds refreshing and fun to you. A few recommendations for you: make a game for a fantasy console like pico8, walk through an adafruit embedded project, or get interested in the front end / design part of web development (look through dribbble for inspiration). You don't necessarily need much CSS and it's not hard to learn anyway.
>> I feel like there aren't really any good options in software development any more. It's always one big compromise with lots of possible decision fatigue. Every direction has drawbacks.
It seems most of your dissatisfaction comes from whining about the tech stack. Either focus less on the technology stack and more about the end product, or stop attaching emotion to decisions that are best made logically. It's okay if you choose options that have drawbacks if every option has drawbacks. There's no such thing as a silver bullet. Choosing the wrong option is rarely going to kill your project and you can always change directions later so breathe easy.
Due to the constrained nature of the undead platform there is no real possibility of decision fatigue, since the ways of solving a problem are few.
I really like constraints. I also believe that's what made the early Internet so special.