No Stupid Questions (Developer Edition)

!no_stupid_questions

@programming.dev
Create post
Instagram equivalent to Nitter or Invidious (tool to browse it)?

Instagram equivalent to Nitter or Invidious (tool to browse it)?

What are some alternatives to browsing instagram "outside" of the proper app?

I put nitter.net and invidious as examples, as they allow you to browse Twitter and Youtube "outside" the official site/app and without being tracked. Instagram hates me trying to look at anything from the computer.

Looking for TypingMind alternative. Prefer free and open-source solution.

Looking for TypingMind alternative. Prefer free and open-source solution.

I need an open-source AI front-end (use with openai api key) with following option:

  • Do web search
  • Chat with document as context
  • More Plugin

Please suggest me some open-source project that work.

How to start on freelancer while also keeping a full-time job ?

How to start on freelancer while also keeping a full-time job ?

I have 5 years experience as full time job.

However I never do freelancer job before.

How do I start on finding freelancer job ?

So what is actually the issue with (npm) dependency management?

So what is actually the issue with (npm) dependency management?

It is a common sentiment that managing dependencies is always a big issue in software development and the reason why so many apps come pre-bundled with all the requirements so it reliably works on every machine.

However, I don't actually understand why is that an issue and why people generally bash npm and the way it's done there. Isn't it the simplest and most practical solution to a problem - you have a file which defines which other libraries you need, which version, and then with one command you can install them and run the program?

Furthermore, those libraries and their specific versions can be stored elsewhere and shared across all apps on a system so you can easily reuse them instead of having to redownload for each program individually.

I must be missing something since if it were that easy, people would have solved it years ago and agreed on a standardized best way, so I'm wondering what is the actual issue and a cause of so many headaches.

CSS question: I don't understand image sizes! Maybe not as stupid a question as it initially appears?

CSS question: I don't understand image sizes! Maybe not as stupid a question as it initially appears?

In CSS, let's talk about srcset or image-set. In that context, you can define which image the browser loads using 1x, 2x, 3x, etc. These refer to pixel density. (In the case of srcset, you can use pixel dimensions too, which sidesteps the issue I'm going to talk about, but it still occurs in image-set, and also is still weird to me in srcset, even if you can side step it.)

So, assuming, say, a 20" monitor with 1080p resolution is 1x, then a 10" screen with 1080p would be, technically, 2x - though, in the real world, it's more like a 6" screen has a 1000x2500 resolution - so, I don't care about math, that's somewhere between 2x and 3x.

Let's imagine a set of images presented like this:

srcset(image_1000x666.webp 1x,
image_1500x1000.webp 2x,
image_3000x2000.webp 3x)

then an iphone 14 max (a 6"-ish screen with a 1000x2500-ish resolution, for a 2-3x pixel density), would load the 3000x2000 image, but my 27", 1440p monitor would load the 1000x666px image.

It seems intuitively backwards - but I've confirmed it - according to MDN, 1x = smaller image, 3x = larger image.

But as I understand it, an iphone 14 acts as if its a 300x800 screen - using the concept of "points" instead of pixels - which, in the context of "1x" image size makes a lot of sense - but the browser isn't reading that, all it seems to care about is how many pixels are in an inch.

I made a little page to demonstrate the issue, tho I acknowledge it's not hugely helpful, since, other than using your actual eyeballs, it's hard to tell which image is loaded in the scrset example, but take a look if you want.

https://germyparker.github.io/image-srcset-example/

PyQt vs Kivy, which one has better syntax for someone learning a framework from 0?

PyQt vs Kivy, which one has better syntax for someone learning a framework from 0?

After some time of practicing PyQt I found out about Kivy, as a beginner which one can be considered with an "easier" syntax to learn? After several days of practicing PyQt I feel I would be throwing away my learning for Kivy.

PyQt is not that complex really but what I hate with all my heart is using Qt Designer and then exporting that to a .py file, I really don't like the way it formats the text, but that's just a personal detail. I know I can perfectly do it manually but all the tutorials and I mean ALL of them always do it in that way.

I want to clarify that I'm interested in Android application development, that's really a strong point for me of Kivy.

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

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!

In autohotkey, can you daisy chain together hotstrings from different scripts?

In autohotkey, can you daisy chain together hotstrings from different scripts?

Note that I'm using autohotkey v2, not v1.

I want to run two different autohotkey scripts. I want to trigger a hotstring in the first script, the output of which ends up being part of the hotstring trigger for the second script. Is this possible?

Here's a simplified version of my intended workflow.

Script 1:

#Hotstring EndChars \
#Hotstring o
#Hotstring ?
::iv::ǐ
::av::ǎ

Script 2:

#Hotstring EndChars \
#Hotstring o
#Hotstring ?
::nǐ::你
::hǎo::好

So the idea is that I can type niv\ and the first script will convert it to nǐ - then I can immediately type \ and the second script will convert it to 你. So I type niv\\ and my text goes from niv to nǐ to 你. I can then type hav\o\ and have my text go: h, ha, hav, hǎ, hǎo, 好. So I can do niv\ hav\o and get nǐ hǎo, or I can do niv\\ hav\o\ and get 你 好. Both writing systems in a reasonably simple format.

There are reasons I want to set it up like this. The first script has dozens of functions beyond writing in pinyin/chinese, and I share it with another person - so I don't want to add potentially hundreds of random Chinese hotstrings to it, just the special pinyin characters. That's why I'm using two scripts.

But I also realize I could just make "niv" and "havo" their own hotstrings which go directly to 你 and 好 without the intermediate nǐ and hǎo. I don't want to do this mostly because I think the system I have in mind is prettier - type it correctly in pinyin first, then have it correctly convert to Chinese.

All of that aside: I've gathered that this is probably possible using some combination of SendLevel and #InputLevel - but I've tried a bunch of different combinations and ideas with it, and haven't successfully had one script trigger another yet. Even in simplified toy scripts, which is a little discouraging. Ideally I'd be able to do this with as few changes to the main script I share with another person as possible - the script that handles the Chinese can be as complicated as it needs to be though. Anyone know how to make this work?

Anyone know a good guide on how to read Malwarebytes logs or... something?

Anyone know a good guide on how to read Malwarebytes logs or... something?

Know this isn't technically Dev, sorry in advance.

I keep getting outbound malware alerts when I browse global. Today it's lemmy.today, last week it was another instance etc.

I'm interested in learning more about sec, and while I've looked at the JSON logs and tried googling "What does threat id -1 mean" etc., I can't seem to find anything.

I'm kind of just curious about what, specifically, the threat was and what it was trying to do - but the logs seem pretty blank. As mentioned above, the id is -1 and the name is blank.

Anyone know a good guide, or something, to read up or... better questions to ask?

Thank you for your time and hav a wonderful day. :)

What should I do in this situation? git best practices.

What should I do in this situation? git best practices.

drawing showing git history made in gimp

So I have a bug fix (green) and owner also made a bug fix (red) but I would like to rework both of them due to discussion we had. I have opened a PR and there is merge conflict that can't be resolved. Should I open a new branch in my fork and close PR or should I google some rebase magic to apply commits to my bug-fix branch.