r/learnprogramming • u/MeekHat • 18h ago
What programming language should I focus on as an occasional hobbyist?
As in, I sit down to code for a few hours once a month, give or take.
I've been chugging along on a text-based game in TypeScript with Vue. I'm constantly running into quirks and hidden nuances of the languages. Spending my precious hours figuring out the difference between interfaces and types, only to learn that it's pretty much personal preference, makes me feel like I'm wasting time due to the language choice.
Also the fact that I have to juggle several languages with their idiosyncracies: HTML, CSS, TypeScript, JavaScript (when it offers its own quirk), Vue, JSON. Forgetting one language then having to get back into it.
Can I have a more straightforward language? Maybe I should go to just bare JavaScript? I've used several languages in the past, including Java, C#, Python, Lua.
5
u/DannyDeKnito 18h ago
If you're struggling with concepts such as interfaces, might be time to take a step back and learn some theory/terminology
No programming language is without its own idiosyncracies, but where they show up is a matter of how you use them.
When it comes to "gaming" usecases i'd still stick with something strongly typed like typescript or even golang since you're (apparently? Might be wrong, but im seeing a lot of web stuff there) making it web-based
4
u/DragonfruitGrand5683 17h ago
Build something you enjoy building.
3
u/phatbili 16h ago
Just use Python and save your sanity.
1
u/xpusostomos 18h ago
One way to approach it, as a learner, is to start reading the book SICP, which is designed for learners, and you learn the language Scheme which is very simple at its heart, and a favorite of many. Because Scheme has code as data and data as code, it can replace every language you can think of, including json, etc, and there are even frameworks for building web apps in it. As a bonus, you'll be proficient in programming Emacs once you learn it. But at the end of the day, it's whatever floats your boat.
1
u/ookkroam 18h ago
honestly for once a month hobby coding i'd stay with typescript, but drop vue for a while and just use plain ts with the dom. most of the pain you describe comes from juggling the framework on top of everything, and a text game doesn't really need one. i did something similar and my hours stopped getting eaten by tooling quirks once i cut the stack down.
1
u/Comakip 18h ago
Maybe look into GameMaker.
1
u/W31337 14h ago
JavaScript is ass try c# or python or something more structured
1
u/jacksonanna373 12h ago
For a text game, TypeScript's `interface` and `type` overlap for object shapes; pick one and move on. Use a type alias when you need a union.
1
u/UhLittleLessDum 12h ago
Python is like the do-everything, but do-nothing-perfectly language...
If you're into UI, like you want to see something pretty, than probably Typescript is where you want to be (or maybe Kotlin for Android or Swift for Apple, but probably TS).
The types will help you, I promise. I use TS for everything... even little scripts over javascript because it makes the dev experience so much better.
1
u/DanKegel 9h ago
Golang has very few surprises, give it a shot.
1
u/betarage 6h ago
I think that using type script is not really worth it. I would just use JavaScript and html to make web pages and browser exentions. and maybe learn another language like lua or python for offline desktop programs
1
u/Relevant-Reward4302 18h ago
Lua was practically born for lightweight games and scripts. You already know it, so lean into it.
-2
u/Ill_Nebula_2419 18h ago
Claude code language 😂