No Stupid Questions (Developer Edition)

1133 readers
5 users here now

This is a place where you can ask any programming / topic related to the instance questions you want!

For a more general version of this concept check out !nostupidquestions@lemmy.world

Icon base by Lorc under CC BY 3.0 with modifications to add a gradient

founded 3 years ago
MODERATORS
1
 
 

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?

2
3
 
 

Hey, so I built this little tool the other day and thought I’d share it with you.

It’s a free AI YouTube script outline generator. Basically, you just drop in your youtube video topic (or even your whole channel idea), choose how detailed you want it like 3, 5, 10, or 20 points and it gives you a clean outline you can actually work from.

Would love to know what you think, or and if there’s any room for improvement!

4
 
 

As a developer, I created a web tool that pulls YouTube's top trending videos from 110 countries. You can filter by date ranges like day, week, or month, plus views, streaks, video length, and upload dates.

What it does

  • Country selection across 110 regions and time periods.
  • Filters for min/max length, date ranges, sorting options.
  • Per-video details: views, likes, comments, engagement, rankings.

It's open at Lenos YouTube Top Trending Videos page.

Any Thoughts or suggestions?

5
 
 

Hey!!!

I’ve been working on a small utility for YouTube creators and would love some feedback from fellow devs.

I built a YouTube Watch Time Calculator, designed to help creators quickly understand how many views they need to hit monetization.

How it works:

  1. Watch Hours Needed: You enter your target (default is 4,000 hours – the monetization requirement).
  2. Average Watch Time: Add your average view duration (minutes + seconds).
  3. Hit Calculate: It shows the exact number of views you need.

From a dev perspective, I focused on:

  • Keeping the UX minimal so it works well on mobile and desktop.
  • Making the calculations transparent and predictable
  • Keeping the page lightweight so it loads fast for creators who are often multitasking with multiple tabs open

I’d really appreciate:

  • UX feedback (what’s confusing, what’s missing).
  • Edge cases you’d expect it to handle.
  • Ideas for related tools that would make sense to add for YouTube creators

If you have a moment to leave your thoughts, I’d be grateful. Also happy to answer any implementation questions, if anyone is inquisitive about how it’s put together.

6
 
 

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?

7
 
 

cross-posted from: https://lemmy.ml/post/44422946

Just curious if any people make steady income from a side devblog? I know there are dedicated youtubers, but I'm not into that..

I've been blogging over 4 years but the reach is still poor, just wanna rethink my strategy..

Thanks!

8
 
 

A friend of mine has cracked premiere pro, and i wanna do the same but he only gave me these files. How I am supposed to crack it with those ? Thx y'all

9
 
 

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!

10
 
 

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.

11
 
 

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?

12
 
 

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)

13
 
 

Seeking Direction: Sharing AI-Aided Knowledge Beyond Corporate Platforms

As a Reddit (and RIF) refugee, I'm searching for a space to share various useful information where it can be easily found later. The challenge is that the definition of "useful" varies among individuals, and I suspect that Reddit and other "for -profit" moderators are overly influenced by corporate interests.

In the past, I spent considerable time figuring out how to accomplish tasks unrelated to my primary goals—tasks I usually only needed to do once. Now, I tend to ask AI tools like ChatGPT, Perplexity, Deepseek, or other available models to assist with the task at hand. I've learned that by doing so, I can condense days or even weeks of effort into just a few hours, if not less.

However, a significant issue is that these AIs don't currently learn from my questions, and the knowledge they provide isn't propagated beyond the AI itself, unlike traditional sources. The AI models offering this information are essentially static, and the context of the current session is typically lost quickly.

The solution I envision is to take the results of successful chat sessions and post them somewhere on the internet where both humans and AIs can access and incorporate the information into their knowledge and training. The problem is that this approach doesn't align with the posting models of conventional for-profit services like Reddit or Facebook. I tested Reddit again this morning and immediately had a post rejected for "low effort," even though it would have taken me a long time to develop the content myself.

I'm looking for direction on:

Where to share this AI-generated knowledge so it's accessible and beneficial to others.

How to structure these posts to fit within the guidelines of non-commercial platforms like Lemmy.

What communities or instances would be receptive to such content.

Any suggestions or guidance would be greatly appreciated!

14
 
 

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".

15
 
 

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.

16
 
 

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?

17
18
 
 

The idea is making deployment so simple even a 13 year old could republish the website in cloudflare or github pages.

Any other tactics are welcome

19
 
 

To my understanding:

Many terminals are capable of displaying multiple fonts at the same time, say latin unicode characters in font foo and japanese unicode characters in font baz. In urxvt at least, it is also possible to have one font in a certain size and the next font in another size. However, no font can have a size bigger than the base size, the size of a terminal cell.

Why is it not possible to have multiple terminal cell sizes? For exampleso one line has terminal size 8 and the next line has terminal size 12.

20
 
 

The wikipedia articles are terribly written (for math loves or people who just need to refresh their knowledge).

What is a "sum" of types? What is a product of types? Is it possible to Cat x Dog or Cat + Dog? What does that even mean?

21
 
 

So I want to build blender fork but it fails to build on Visual Studio 2022. There is already a patch and a open PR that fixes the issue.

I have already git cloned the repository and I would want to only get the patch into my local repository. So I can build from that.

22
 
 

Limitation of using drag and drop Images in readme.md?

One I am aware of is the size limit that no image size should be >10 MB. Are there any other limitations when using this (for example: retention period, storage capacity, etc)? I want to link those images outside Github.

I am aware of uploading images to the repository and linking by

[image](./path/to/image/image.png)
23
 
 

You see this with some apps (I think ReVanced is a popular example?) and games occasionally, and I've never been clear on how they do it.

24
 
 

Hello. I have Windows - Ubuntu dual boot and I'm trying to move space from Windows to Ubuntu. I've already freed space from the Windows side

I'm pretty sure that I've read online that it can be dangerous to move the unallocated partition, because next boot to windows can corrupt my Ubuntu system. Is it true? Also, when I'm trying to move the unallocated partition, there's no option to "move/resize", so I swap them with the next following partition one by one. Is it the right way to do it?

25
 
 

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!

view more: next ›