Programming

227 readers
1 users here now

Welcome to the Lemmygrad programming community! This is a space where programmers of all levels can discuss programming, ask for help with problems, and share their personal programming projects with others.


Rules

  1. Respect all users, regardless of their level of knowledge in programming. We're here to learn and help each other improve.
  2. Keep posts relevant to programming and related topics.
  3. Respect people's personal preferences. If you disagree with someone's choice of programming language, method of formatting code, or anything else, don't attack the poster. Genuine criticism is fine, but personal attacks are not.
  4. In order to promote breaks from typing, all code snippets must be photos of code written on paper.
    Just kidding :), please use proper markdown code blocks.

founded 2 years ago
MODERATORS
1
 
 

I'm really amazed at what people are able to do with the extending the Doom engine.

2
3
4
5
6
7
8
 
 

Randomly stumbled into this article and found it very interesting. At a glance, his other articles here also seem promising.

9
 
 

💀💀💀💀💀

10
11
 
 
12
 
 

For anyone who doesn't know, advent of code is a series of coding challenges that happens every year. It's made to be like an advent calendar, with one programming challenge released per day until Christmas. Something interesting about this is that since the challenges only need the output of the program, you can do it in any language you want. I thought it might be interesting to compare and discuss solutions (ideally spoilered in case anyone hasn't completed the challenge yet).

Thoughts?

13
 
 
14
15
 
 

Skill issue

16
 
 

Any ideas what modern resources are useful for back end devs to learn modern front end development? I'm decently familiar with the basics of html, css, js, but don't really have experience with frameworks beyond basic bootstrap v3/v5, a smidge of react, some angular 1, etc. Kind of a smattering of tools but without real confidence to wield them in anger, you know? Hopefully this post can be helpful for other design challenged programmers.

Edit: extra resources on accessibility and security would also be much appreciated!

17
18
 
 

I’ve been really into serverless recently. Specifically, I’ve been running the T3 stack on Vercel. There are several reasons:

  1. I can bootstrap and deploy an app with full stack type safety, db, and auth in under 30 minutes.
  2. I have a tendency to rent a server, abandon the project, and forget to cancel. Meanwhile, most serverless providers have generous free tiers.
  3. I think it encourages a more decoupled architecture, which is just more maintainable in the long run.

That said, I’m tired of the patterns React encourages. I’m tired of the fact that it requires so much glue code to get things to work inside its model. I’m tired of prop drilling. I’m tired of the hype beast cycle. I’m tired of build steps and weird edge cases with server side rendering and shitty code maps. Now everyone’s talking about server functions and I’m just looking to get off the hype train. I’m tired of running projects from last year and being inundated with security warnings and having upgrades always cascade giant failures for inscrutable reasons.

Now, having used HTMX a bit and seen that their own repo is literally a 3k line vanilla JavaScript file with zero dependencies, it’s making me remember how much less tooling was required to throw together a simple website when I first started. You put a file in a directory. People would request the file. They would get the file, byte-per-byte.

I’m not saying I’m wanting to return to monke and just run LAMP on bare metal. I remember all the bullshit that came with that, too. But I really feel like there’s a middle ground to be had where all this modern deploy tooling can be used without 20 layers of abstraction. And without sacrificing type safety. It really feels more achievable than it’s been in a while, to build projects that don’t turn to mud after a couple years, but also don’t big you down and get in your way while you’re trying to iterate on ideas.

19
 
 

My gut answer is "yes!!!" or "revolution" but I want to hear what y'all think. For those unware, some creative professions such as film writers get paid a small portion of all revenue generated by their work after it's been produced, which is called a "residual," and it's part of their current fight with hollywood not properly paying those residuals due to the streaming loophole.

Since most programs that are profitable are based on the work of long gone developers (basically capital that gets worked on by machine labour), I think this might be a great demand for an eventual software development union.

What do y'all think?

20
29
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
 

I just realized that I made my last post 3 weeks ago. In any case, I staggered my learning with building a simple starter app and just finished my last bit of logic this am. Figured I would share in hopes of some sort dopamine activity via validation.

The App:

  • Has 2 sets of strings that are common phrases that people might use while navigating eating out at restaurants where language barriers might be an issue.
  • First set in bold are translated in the app via the Language tab
  • Second smaller set are translated based on the phone's locale settings.

The idea is that the phone owner should be able to read the text as well, so I wanted 2 sets for when one party speaks one language and the other party speaks another. I mostly wanted to have the challenge of handling translations from within and outside the app and figured why not.

The phrases can be toggled with the green buttons on the bottom. This is to fine tune the dietary preferences. Vegan will toggle everything but gluten as "cannot consume" or will set it for relative vegetarian(so no meat or fish but yes dairy and eggs)

I put gluten in there for anyone who has Celiac. I have found a frightening number of waitstaff that just assume that both veganism and gluten allergy is just "fad diets" so I wanted to include both for the little bit of crossover between the 2 lifestyle diets.

Screenshot with French for phone language and Spanish for in app language:

github: https://github.com/AndroidHell/ImVeganBTW

Notes:

  • The app title translate based on phone language but it should be based on in-app language since it's meant more for the person taking a food order to know "I'm Vegan. I might have it change based on vegan or vegetarian for the in-app language but I suppose that is handled by the first card. 🤔
  • The nav buttons are not translated and localizing those would be good
  • if text in the cards is too long, it gets cut off with ... at the end. This is a similar issue to the Jerboa app nav buttons for some languages. I might make the strings shorter(lazy route) or try to write some sort of scroll/ticker or make each card expand with full text.
  • The source code is a fucking mess. I already know. I started working on viewModel stuff before actually learning about it or app architecture.
  • Translations were done by Google Translate so if they are wrong maybe let me know and I can fix them. I only speak English so had to rely on Google on this.
  • I tried to pick main languages that I could come across in the States. I think they should work in other parts of the world but I used Mexican Spanish and Simplified Chinese so I donno how that might work out elsewhere.
21
 
 

Is Gitee, GitHub, or some other software forge preferred in China and the Global South?

I'm trying to decide whether I should mirror my open-source repos onto Gitee or another forge, as Github's dominance in the space and ownership by Microsoft is rather disconcerting for anyone in non-U.S.-aligned countries.

22
23
 
 

Or does anyone wanna buddy up and learn it with me?

I lost my job as a Java dev after a little less than 2 years and figured is play around with Kotlin for Android development.

Working on setting up unemployment and startinf the whole job hunt thing again for the umpteenth time in my life but will have a lot of free time in the interim so I wanna start working on an app idea for calculating dice weight for ttrpgs. I've been looking at Kotlin over the last few months and decided sure why not.

The plan is to get the fundamentals down and make 1 or 2 small projects and see where I am at. After that I'm considering chekcing out Rust as well. But that won't probably be until next year.

Kotlin doesn't have nearly as much of a community as Rust so this is probably a shit in the dark. But I guess but me up if you are interested. I've never done a buddy system with a language but with my attention issues it might help?

24
 
 

Copyright is a tool of suppression by the bourgeoisie etc etc but as long as we have to deal with this tomfoolery, what licenses do you use or recommend, and why? I'm also open to the idea of custom or silly licenses if you can justify that they won't cause more trouble than they're worth.

I've heard the tale of a Rust DS emulator whose github repo was deleted, but because either there was no license or the license was something dumb, no one was able (or brave enough) to revive it, so i feel like it's important to take this more seriously than i have been. For the few things i have made i just put "copyright is fake" or "this isnt my code, it is OUR code, comrade!" in LICENSE.txt.

25
 
 

Great explanation about how CPUs actually work. Worth reading!

view more: next ›