Skip Navigation

User banner
No Stupid Questions (Developer Edition)

Members
0
Posts
43
Created
3 yr. ago

How do programmers work 9-to-5 (or longer) sitting behind a computer without getting health issues?

cross-posted from: https://quokk.au/c/cs_career_questions/p/1337560/how-do-programmers-work-9-to-5-or-longer-sitting-behind-a-computer-without-getting-health-is

My career started as a programmer after I studied software engineering but I quickly realized that spending the entire day in front of a computer made me feel headaches and shoulder and neck pain continuously. A lot of my hobbies were also computer related though, like gaming and programming things for myself. So I'm wondering how other people deal with this? It got to the point where I just had to quit my job because I just couldn't concentrate anymore on doing my job.

Is this a BE dev role now or am I delusional?

I apologize if this is a stupid question. I'm a statistician by education, and in an analyst role at a private company. For the past 9 months I've spent 95% of my time building things in Python. First it was a big automation task that, strictly speaking, was outside the scope of my role, think "we need to start doing this new thing that would take two new full time roles if done manually, with lots of options and settings that we can change if we need it later. Btw we need it by yesterday.".

I agreed to take on the project on the terms that I get to solve it in any way I saw fit, which was automating it in Python rather than turning it into an Excel monster.

Then, since that went well I guess, that somehow turned into a part of this HUGE project to create something that will give us Power BI-like functionality but without some of the drawbacks of Power BI. Several data sources, hundreds of values, 20 different types of dynamic time windows, 20 different grouping levels for groups that get assigned differently depending on the type of time window.. All getting fed into 100 different reports in different formats that will each need to look pretty with dynamic formatting etc, and will need to be available on our internal systems as well as sent to 50 different people or combinations of those people somewhere between once a month and every day. I'm starting to realize that we need to set up proper databases for all this data, which I will also have to figure out how to do in the most optimal way and implement.

And before you say "that sounds easy enough", I hadn't touched Python in the past 10 years before this, and even then only used it for one course during my Master's. I don't have a senior to ask when I run into trouble - I'm the only person in my department so I guess I'm the senior. My manager has zero technical knowledge and zero time for me, we have maybe two meetings a year. These tasks come directly from the CEO at our international HQ, who I can't exactly call up to ask programming questions.

I'm not saying this to complain, apart from the stress and pressure this has been so much fun. But it doesn't feel like any analyst role I've had in the past, so what would be an appropriate title for someone doing this sort of work?

The Joy (and Pain) of Debugging Microservices in a Fediverse World

Hey, so… you won’t believe this, but I just spent hours chasing one of those bugs that makes you question your life choices

Everything looked fine at first. You know that feeling, right? Pods running, services up, nothing obviously broken. But then… random failures. Logs screaming “connection refused,” traces looking like total nonsense.

So I’m sitting there like, “Okay… what is even happening?”

Well, after digging way too deep, I finally found it. Turns out it was a race condition. Yeah, one of those. It was happening between federation hooks and Redis cache invalidation. Basically, things were happening slightly out of order… just enough to break stuff randomly.

And the worst part? It didn’t fail every time. Only sometimes. Can you imagine that?

So yeah, I kept going back and forth, thinking I fixed it… then boom, same issue again.

Here’s what I ended up doing. Nothing fancy at all. Just added exponential backoff to the retry logic:

async fn retry_federation(activity: Activity, max_retries: u32) -> Result<()> { let mut delay = Duration::from_millis(100); for attempt in 0..max_retries { match send_to_relays(&activity).await { Ok(_) => return Ok(()), Err(e) if attempt < max_retries - 1 => { tokio::time::sleep(delay).await; delay *= 2; } Err(e) => return Err(e), } } Err(anyhow!("Federation failed after {} retries", max_retries)) }

And yeah… that actually fixed it.

Not some big architectural change. Just… “wait a bit and try again” 😄

So yeah, lesson learned, timing issues in distributed systems are sneaky. Especially with federation stuff. Cold starts, retries, cache timing… all of it can mess with you.

Anyway, that was my day. What do you think? Ever had a bug like this where everything looked fine but totally wasn’t?

Prototyping of frontends (sort of)

Hello everyone,

I'm having a hard time formulating the question and it can be a bit confuse to me too at times, but here it is. For the context, so that you can have an idea of the shenanigans I'm used to program, I'm a PhD in compilation and did stuff related to security and performance. I have essentially worked in projects that are relatively low-level and system-oriented (compared to webdev, desktop application dev etc).

I usually code CLI tools, usually system-oriented libraries, and stuff like that. And sometimes I would like to hack simple yet cool frontends, typically a webapp to either visualize my processes/data or to manipulate the inputs or whatever. I'm not looking for a big solid webapp. What I would like to do is to write frontends that would be the equivalent of quick ugly glue Perl scripts for interprocess communication.

Typically, I could have a program I wrote doing stuff, I may add a little HTTP server feature to it as an entrypoint to its internal and then have a cute webapp to connect to it to visualize what is going on, idk.

As I said, I'm not trying to transform my applications into actual servers or microservices in order to build an entire web application on top. It is more like using a proper user interface (typically web) as a better pretty-printing/logging system/whatever.

I guess there must be frameworks, tools, architectures or whatever to suite my needs, but since I have never really done frontend projects, I'm in the dark right now.

If someone has any recommandation, it would be very nice. Thank you so much in advance!

How do I start a project?

Sorry, I know this isn't exactly a dev question, but how do I make a project without a tutorial? I know how to make functional code that does simple things, or to solve a problem/question. But nw I want to try to make some projects to add to my portfolio. I've found websites with different ideas, and I can find some tutorials, but what if I don't have a tutorial? Like, what do I do if I want to make something from scratch myself?

Is it okay to leave tests in your code?

Like if I'm using print statements to test my code. Is it okay to leave stuff like that in there when "publishing" the app/program?

Edit: So I meant logging. Not "tests". Using console.log to see if the code is flowing properly. I'll study up on debugging. Also, based on what I managed to grasp from your very helpful comments, it is not okay to do, but the severity of how much of an issue it is depends on the context? Either that or it's completely avoidable in the first place if I just use "automated testing" or "loggers".

Music and SFX tools?

When it comes to game development, the two areas that I see discussed the most extensively are coding and/or engines, and artwork (pixel art etc.). But I don't think I've ever come across a conversation in the wild about the audio side of things.

So I'm wondering, are there any recommended tools or software for use in game development specifically? Or is this something that is more or less up to the creator? I'm sure recording real instruments is more or less the same as recording anything else in the music industry, so I'm talking specifically about software for creating electronic music. Think retro style games. Which I'm guessing would be MIDI?

Which brings me to another question. I believe that MIDI makes use of something called 'soundfonts', which is basically the sound and personality of all of the instruments. How does this work out as far as licensing and shit goes? Do indie devs frequently make use of free soundfonts or is creating your own soundfont commonplace? Or am I getting ahead of myself here?

Basically, or TL;DR, are there any tutorials or guides floating around that suggest recommended software and perhaps offer more information in general on this side of game dev? Music theory is another story altogether, so that's not what I'm asking here. I'm asking specifically about creating music in relation to game dev.

Shaders
Godot

Is there a simple way to get an unshaded-but-lit look?

This is for models that use vertex colors. I want all faces with the max brightness of the object. So in daytime lighting it should look unshaded, but in a dark environment it should darken (like the thumbnail). What I've tried: • using vertex_lighting* and then setting the normal directly (eg NORMAL = vec3(0.0, 1.0, 0.0);) • this works, but only if the lighting is perfectly overhead... a slightly wrong angle or even too far into the middle of an omnilight will create a shadow • attempting to save the original color value, change the normal, and then bring it the old brightness back via max() if the new value is dimmer • lots of moving parts/assumptions on my part here • other math stuff with NORMAL/VERTEX, abs() and normalize() etc • on top of the direction failure, there's also failure to keep consistent brightness (with a spinning animation), and darkening across a TextMesh I also know I could do this with unshaded and just multiply/mix it in the shader, but I don't really like the idea of making a custom lighting/detection system (rather than using actual lights, that is). I am not totally against diffuse shading, something like a vertex toon shader (2-3 brightness bands) could be interesting aesthetically. If that's even possible, it seems like the vertex light calculation is hardcoded (though it's also possible I just don't understand it). * this is a relatively re-added feature (4.4)

is there anything like an app/script for .tar files that automates configure-make-makeinstall into a single step for the end user? (after onetime manual config)

In my understanding, the options need to be customized for each machine, as well as the fact that making packages for tons of distros can be a lot of work for solo or small team devs, and that's why some software is provided as .tar only.

but it seems like the install process on the user side could be automated to a single command or drag-drop, as long as the script would throw informative alerts for any errors and the user is prepared to take over manually.

does something like this exist in a standalone form that's not bundled like snaps or flatpaks?

if not, is there a broadly-applicable reason (security, damaging OS, etc) that makes it a terrible idea? or simply that no one has gotten to it?

Graphene OS Devs or users, Play Integrity updates -> Aurora DOA? or just need a few more workarounds/alternatives?

To what extent will these changes, and potential future changes along the same trajectory, affect the use of un-substitutable apps on Graphene OS? Play Integrity API - 2024 Dec

The transition to the new verdicts will reduce the device signals that need to be collected and evaluated on Google servers by ~90% and our testing indicates verdict latency can improve by up to ~80%.

the huge ratio of reduction suggests to me that the attestation is being offloaded from Google servers to on-device AI, but maybe i assume wrong. my instinct tells me Google would always make this impossible for 3rd party OS to implement anyway. Hypothetically, If implementing that AI in Graphene could allow most attestation-requiring apps to install and run normally, is that something the Graphene devs would do? i know it would have to be secure and private, so assuming there was a way... I'm not pro AI, not the surveillance big data capitalism kind at least. just wondering about the scenarios and what prep or extra work i would have to do.

How do you secure your home network/pc?

So I'm a baby dev, still in Uni and they don't allow internships in 4th year due to some issues with it so not even that exp wise. I don't know enough, and I'm trying to learn but there's so much! My Uni degree doesn't cover security at all. Which is shit, bc I think I want to work in that? Mostly I'm just spooked and want to understand everything I can 'cause I love the internet and want to feel safer wandering about it. I'm scared of clicking on links. Even ones here, like there was a post about a book list earlier and I was just there like "Cmoon.... someone please have posted the lissssst." Would anyone be willing to share what they do for their own security? Especially if it's ridiculously over the top. Included reasonings and details would be adored! Also, if anyone has any books or references that might be good for learning sec from a programmatic view rather than a IT view I'd really love that! Anything at all. Regardless, hope anyone reading this has an absolutely wonderful day and best of luck with everything you're up to!

Why do I feel that no matter how much I practice programming I will never be a programmer?

I've been learning Python by myself for about 3 years now and I can say that I know quite a lot but I don't really feel confident in my own programming skills and always after a while of practicing or reviewing I end up quitting because I feel exactly this.

I don't know how to explain it, but I really feel like I'm in a cycle repeating the same noob exercises over and over again.

For example, lately I have been practicing a lot PyQt but I really feel that I am wasting time when I don't learn a new concept or I don't memorize something and I need to look at my notes to remember how to do it, and also that practicing with online courses, especially with Youtube is often a challenge because the authors do things differently and I get confused by that. And when I want to learn something new the amount of information overwhelms me and I feel tired because of that.

As a Linux user I know that what I just said is stupid, because for example it is impossible to learn all the commands in the world, you just really learn the ones you use most regularly but in programming I feel that for example asking ChatGPT (or any ChatBot) counts as cheating for some reason, I don't know how to explain it.

I really consider this probably a mentality problem more than a skill problem because honestly even though I know I can I don't feel sure how to program, many times I even doubt the name of my variables or my functions.

Thanks for reading my silly post!

How feasible is a browser that uses something like Lua, Python or Ruby as its scripting language instead of JS? Also, how stupid is this idea (ignoring any "incompatibility with JS pages" situations)?

Or, put it another way, a html renderer that can open most web pages, but has a different programming/scripting language that it can interpret during runtime or on page loads, instead of the javascript engine.

I suppose that java applets, flash and activeX were attempts in these directions, but they were things you had to install on top of the browsers, so not quite the same thing? I'm imagining something like web pages using Lua, since it's lightweight, to make them dynamic.