Programming

423 readers
4 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
1
 
 

Hi all, I'm relatively new to this instance but reading through the instance docs I found:

Donations are currently made using snowe’s github sponsors page. If you get another place to donate that is not this it is fake and should be reported to us.

Going to the sponsor page we see the following goal:

@snowe2010's goal is to earn $200 per month

pay for our 📫 SendGrid Account: $20 a month 💻 Vultr VPS for prod and beta sites: Prod is $115-130 a month, beta is $6-10 a month 👩🏼 Paying our admins and devops any amount ◀️ Upgrade tailscale membership: $6-? dollars a month (depends on number of users) Add in better server infrastructure including paid account for Pulsetic and Graphana. Add in better server backups, and be able to expand the team so that it's not so small.

Currently only 30% of the goal to break-even is being met. Please consider setting up a sponsorship, even if it just $1. Decentralized platforms are great but they still have real costs behind the scenes.

Note: I'm not affiliated with the admin team, just sharing something I noticed.

2
11
Announcing .NET 9 - .NET Blog (devblogs.microsoft.com)
submitted 2 days ago* (last edited 1 day ago) by Kissaki@programming.dev to c/programming@programming.dev
3
 
 

Git Commit Creation

This is an article in which I explore the details and thinking that goes into how you should create git commits, and why. I like to think of it as the article I wish existed when I was just starting out over 20 years ago.

I wanted to cover all the things that you should think about at a high level. That way it at least could work as an entry point to deeper exploration of the particular areas if the reader isn’t completely sold or they want to just gain a deeper understanding. While at the same time trying to provide enough details to show why and how these choices are valuable. This is always a tricky balance.

Anyways, I would love any feedback on thoughts on how this could be improved.

Thanks

4
 
 

The EFF is urging people to contact their legislators now, before the vote.

https://act.eff.org/action/tell-congress-we-can-t-afford-more-bad-patents

5
6
7
 
 
8
9
5
submitted 1 week ago* (last edited 1 week ago) by xoron@programming.dev to c/programming@programming.dev
 
 

im working on a javascript UI framework for personal projects and im trying to create something like a React-hook that handles "encrypted at rest".

the react-hook is described in more detail here. id like to extend its functionality to have encrypted persistant data. my approach is the following and it would be great if you could follow along and let me know if im doing something wrong. all advice is apprciated.

im using indexedDB to store the data. i created some basic functionality to automatically persist and rehydrate data. im now investigating password-encrypting the data with javascript using the browser cryptography api.

i have a PR here you can test out on codespaces or clone, but tldr: i encrypt before saving and decrypt when loading. this seems to be working as expected. i will also encrypt/decrypt the event listeners im using and this should keep it safe from anything like browser extensions from listening to events.

the password is something the user will have to put in themselves at part of some init() process. i havent created an input for this yet, so its hardcoded. this is then used to encrypt/decrypt the data.

i would persist the unencrypted salt to indexedDB because this is then used to generate the key.

i think i am almost done with this functionality, but id like advice on anything ive overlooked or things too keep-in-mind. id like to make the storage as secure as possible.

10
 
 

Hello, I am building a dashboard where users can add their own user scripts. I at least want to keep the last 100 log lines stored somewhere so that the user can check them later.

I thought of using the backend's sqlite database but that would slow down the performance of other querys that are much more high priority.

11
 
 

Discovering your application by usecase validation. Make test writing fast, understandable by any human understanding English or French. Open source under MIT license.

[Cross-posted from https://programming.dev/post/21401242]

12
13
14
15
16
 
 

The point of this post is to find out if people are interested in reading such stuff or it's not worth the trouble.

So I'm a software engineering graduate who grew up and still in Syria, and we can say we have pretty special conditions we live in, power is out most of the time, and the internet connection isn't that good, plus the shit ton of sites that are blocked by US sanctions (even GitHub acts like a removed here), not to mention I have pretty old hardware that I love to use the most of it.

So most of the times I come up with weird workarounds and manual interventions to get stuff working, so I'm thinking about sharing such workarounds and so, both in English and Arabic if people want that too.

I've been using GNU/Linux for quite some time some time so most of my adventures happen on these systems.

So, I would appreciate it if you guys let me know what you think of this, and if you find it worth reading, I don't actually have any idea of where to post my tiny adventures (it's mostly gonna be your usual text and images)

17
18
19
20
 
 

cross-posted from: https://lemm.ee/post/46066494

I followed the recommended processes for adding images to my app, and it is being displayed correctly on the layout preview, but not at all on the app. I have vector assets, webp, png images, but none are being displayed.

The project is too big to put here in its entirety, but please ask for any snippets that could help you solve the issue. I've tried searching the web and asking LLMs and neither could help, so please help me, fellow humans.

21
22
23
 
 

wrote a program for y'all gooners here

Don't bother thanking me 😁

24
 
 

There was a lot of engagement in the communities I participate up until a couple of years ago. People were interested and actively discussing a lot of topics. There were a lot of newbies asking questions and people proposing different ways for tasks.

Is it just me or did it reduce a lot? LLMs? Company forums? Other forums I did not move to (e.g. discord)? Reduced interest? Or is it just subjective?

25
 
 

A bookmarklet is a bookmark whose URL is JavaScript code instead of a site. It might be, for example,

javascript:document.querySelector('video').playbackRate = Number(prompt("speed")) || 1; void(0)

// formatted version:
javascript:
document
  .querySelector('video')
  .playbackRate = 
  Number(prompt("speed")) || 1; 
void(0)

so that if you click the bookmark, it sets the speed of the video to whatever you want (e.g. 3.7).

You could also run this directly in the URL bar (in some cases -- I think desktop Chrome does that), or you can simply type alert() into the dev console (desktop Firefox prefers this for security reasons).

Is running my own arbitrary JS like this a thing on mobile? I'm on Android but I'm not sure if Brave disabled it -- I vaguely remember it working once, but it doesn't anymore. No luck on Firefox either. Maybe there's a workaround?

view more: next ›