Programming
- Programming.dev instance: Sponsors needed
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.
- Recommend me a Python book for absolute beginners
My SO is interested in learning Python because she hopes it becomes useful in her work. She works with ArcGIS and/or QGIS and apparently it supports Python scripting so she's thinking about giving it a go.
She has no programming background so I was hoping you friends could suggest something for absolute beginners that would teach her both the Python and programming basics. It doesn't have to be very comprehensive, just something to get her started.
She has managed to get some scripts working through copy/pasting and minor adjustments but she lacks the foundations to really build a script of her own.
Thanks a lot!!
- Announcing .NET 9 - .NET Blogdevblogs.microsoft.com Announcing .NET 9 - .NET Blog
Announcing the release of .NET 9, the most productive, modern, secure, intelligent, and performant release of .NET yet. With updates across ASP.NET Core, C#, .NET MAUI, .NET Aspire, and so much more.
- US Senate To Revive Software Patents With PERA Bill Vote On Thursdaynews.intellectia.ai US Senate To Revive Software Patents With PERA Bill Vote On Thursday - Intellectia News
zoobab writes: The US Senate to set to revive Software Patents with the PERA Bill, with a vote on Thursday, November 14, 2024. A crucial Senate Committee is on the cusp of voting on two bills that would resurrect some of the most egregious software patents and embolden patent trolls. The Patent Elig...
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
- The US government wants devs to stop using C and C++www.theregister.com The US government wants devs to stop using C and C++
Does anyone want to tell Linus Torvalds? No? I didn't think so
- To kill memory safety bugs in C code, try the TrapC forkgo.theregister.com To kill memory safety bugs in C code, try the TrapC fork
Memory-safe variant is planned for next year
cross-posted from: https://rss.ponder.cat/post/57035
- Git Commit Creationdrewdeponte.com Git Commit Creation
My attempt at producing the ultimate guide to creating Git commits that I wish I had when I was a less experienced developer.
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
- MVCTipCalc: Simple MVC example fyne project that doubles as a tip calculator.github.com GitHub - ssebs/MVCTipCalc: Simple MVC example fyne project that doubles as a tip calculator.
Simple MVC example fyne project that doubles as a tip calculator. - GitHub - ssebs/MVCTipCalc: Simple MVC example fyne project that doubles as a tip calculator.
cross-posted from: https://lemmy.world/post/22022652
- How Good at Math Does a Programmer Need to Be?
I'm working my way to a CS degree and am currently slogging my way through an 8-week Trig course. I barely passed College Algebra and have another Algebra and two Calculus classes ahead of me.
How much of this will I need in a programming job? And, more importantly, if I suck at Math, should I just find another career path?
- Traversalsblog.ploeh.dk Traversals
How to convert a list of tasks into an asynchronous list, and similar problems.
- Lemmy post blocking (by key word) extension for Firefox
I'm wondering how hard it would be to write a firefox extension that blocked individual Lemmy posts based on the presence of words in a block list.
I'm pretty famiiar with Python, but have only done a little bit of hacking of JS, so was hoping the brains trust could provide some insight.
- Debian in WSL not Ubuntutalepunk.com Debian in WSL not Ubuntu | TalePunk
If you are using WSL for programming in Windows, you should use Debian.
- Sign ups for the Games for Blind Gamers 4 Game Jam is open! Help make this the best accessibility game jam ever!
The fourth iteration of a game jam all about accessibility is now open for registration, a month long jam about creating blind accessible games that starts in February!
Sign up here!
https://itch.io/jam/games-for-blind-gamers-4
Over the last 3 iterations we as a community have created over 70 blind accessible video games, and we would love if you all signed up and helped make this the most successful jam yet!
https://itch.io/jam/games-for-blind-gamers-3/entries https://itch.io/jam/games-for-blind-gamers-2/entries https://itch.io/jam/games-for-blind-gamers/entries
Also I will say programming accessibility for a game is an interesting challenge for anyone thinking about it. I had to learn a lot about API and screen readers to make my games usable for my entries!
- Is Python's tooling incredibly difficult, or am I just stupid?
So I'm no expert, but I have been a hobbyist C and Rust dev for a while now, and I've installed tons of programs from GitHub and whatnot that required manual compilation or other hoops to jump through, but I am constantly befuddled installing python apps. They seem to always need a very specific (often outdated) version of python, require a bunch of venv nonsense, googling gives tons of outdated info that no longer works, and generally seem incredibly not portable. As someone who doesn't work in python, it seems more obtuse than any other language's ecosystem. Why is it like this?
- javascript encrypted persistance
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.
- How do I store my websites users' user script's logs?
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.
- A solution to facilitate the writing and execution of E2E tests understandable by any humangithub.com GitHub - e2e-test-quest/uuv: Solution to facilitate the writing and execution of E2E tests understandable by any human
Solution to facilitate the writing and execution of E2E tests understandable by any human - e2e-test-quest/uuv
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]
- The president's doctor: Why your projects take foreverthoughtbot.com The president's doctor: Why your projects take forever
Spoiler: Things wait. A lot. A tale of efficiency, but for whom?
- Breaking down the McMaster Carr website and the techniques they use to make it so dang fast.
YouTube Video
Click to view this content.
- Hundreds of code libraries posted to NPM try to install malware on dev machinesarstechnica.com Hundreds of code libraries posted to NPM try to install malware on dev machines
These are not the the developer tools you think they are.
- 25 Reasons Why Financial Enterprise Companies Use Javadigma.ai 25 Reasons Why Financial Enterprise Companies Use Java - Digma
I’ve been a Java developer for almost two decades, and one thing has stood out...
- A lot of times, I have to do things in some non-convenient ways, so I'm thinking about starting a blog where I write about these problems and how I solved them!
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)
- Feds: Critical Software Must Drop C/C++ by 2026 or Face Riskthenewstack.io Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk
This is the government's strongest stance yet on software security, which puts manufacturers on notice: fix dangerous coding practices or risk being labeled as negligent.
- Why are no images, in any format, being displayed in my Android Studio app?
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.
- Write code that is easy to delete, not easy to extendprogrammingisterrible.com Write code that is easy to delete, not easy to extend.
“Every line of code is written without reason, maintained out of weakness, and deleted by chance” Jean-Paul Sartre’s Programming in ANSI C. Every line of code written comes at a price: maintenance. To...
- Scheduling Model in LLVMmyhsu.xyz Scheduling Model in LLVM - Part I
Instruction scheduling is essential to modern compilers. It tries to hide latencies and increases the throughput of a straight line code by reordering the enclosing instructions. In order to do that, compilers have to know a whole bunch of information, ranging from individal instruction’s latency to...
- NextCloudTalkAutomationBot: A powerful and flexible bot for sending system notifications through messages via Nextcloud Talk.github.com GitHub - sv1sjp/NextCloudTalkAutomationBot: A powerful and flexible bot for sending system notifications through messages via Nextcloud Talk.
A powerful and flexible bot for sending system notifications through messages via Nextcloud Talk. - sv1sjp/NextCloudTalkAutomationBot
🚀 NextCloudTalkAutomationBot: The power of a SIEM… without the SIEM! 😆 - A powerful and flexible bot for sending system notifications and Event Logs through messages via Nextcloud Talk. 💬 ✨ Key features: run Bash scripts/commands, using #Nextcloud Talk as your output screen 📺; receive real-time CPU, storage, #Docker #Container status, and Nextcloud/Wireguard authentication logs 🔐 #ServerMonitoring #SelfHosting #RaspberryPi#EventLogging
- AI auto apply jobsgithub.com GitHub - feder-cr/Auto_Jobs_Applier_AIHawk: Auto_Jobs_Applier_AIHawk is a tool that automates the jobs application process. Utilizing artificial intelligence, it enables users to apply for multiple job offers in an automated and personalized way.
Auto_Jobs_Applier_AIHawk is a tool that automates the jobs application process. Utilizing artificial intelligence, it enables users to apply for multiple job offers in an automated and personalize...
Its come full circle, AI job applicants sending resumes to bots.
- did this just for fun btwgithub.com GitHub - x64x2/boom: coom toolbox
coom toolbox . Contribute to x64x2/boom development by creating an account on GitHub.
wrote a program for y'all gooners here
Don't bother thanking me 😁
- did user engagement drop significantly in programming forums?
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?
- Can I run a bookmarklet/js on a mobile browser?
A bookmarklet is a bookmark whose URL is JavaScript code instead of a site. It might be, for example,
```javascript 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?
- I made a library similar to Testcontainers, but works differently.github.com GitHub - akashrawal/disposables: Run your test dependencies in disposable containers.
Run your test dependencies in disposable containers. - akashrawal/disposables
Testcontainers is a library that starts your test dependencies in a container and stop them after you are done using them. Testcontainers needs Docker socket access for mounting within its reaper, so I made a (for now minimal) different library that does not need Docker socket access. It also works with daemonless Podman.
- What is symbol resolution (home work help)
So I'm a database engineer taking some computer science courses and got an assignment to write about symbol resolution. The only reference to it I could find was this https://binarydodo.wordpress.com/2016/07/01/symbol-resolution-during-link-editing/ then a stack over flow of someone asking a similar question to this. I took that to mean "Linking names of any variable, object, etc. in a program to the object in memory" and rolled with that. Hoping someone can clarify if my understanding is correct! Would ask teacher, but weekend and wanting to get this done today.
Here is what I wrote so far.
Symbol resolution is the task of taking something that was referenced by name in a program, and connecting it to the specific item in memory. In a program you can call functions in the program, functions in other programs, objects already created, variables, or even variables created by other objects. All those items are going to exist in memory, on the hard drive, or might be moved to the registrar of the CPU. Symbol resolution is the converting of the names of the items in the program to pointers the computer can use to modify it whenever that name is referenced. When you update a variable, it will need to know where in RAM it is stored, and converting the name of the variable to that address everywhere it is referenced is the process of finding it. Effectively binding an address in memory to that reference.
By doing this, software can work with the exact same variables multiple times, as it it looking in the same place. If a variable is updated, it will know as it’s looking in the proper place in RAM. When working with Object Oriented Programming, it is what defines the differently named objects of the same class as separate parts of memory. Object A of Class Object1 will be bound to a different bit of memory than Object B of Class Object2.
When it goes through resolving symbols, it has to do it in the same order every time, otherwise the programs would run inconsistently. In python for example, it follows the LEGB rule (Scope Resolution in Python | LEGB Rule, 2018). So when trying to find if a variable is the same as another variable, it goes in order of Local, Enclosed, Global, Built In. So it tries to match the reference to anything local, anything in the function, anything global, then tries to match any reference to built in keywords or functions.
As an example: ```
Global variable
greeting = "Hello"
Function that uses global variable
def say_hello(name): return greeting + ' ' + name
Another function that has its own local variable with the same name
def say_hello2(name): # Local variable 'greeting' shadows the global variable greeting = "Good day" # Here, 'greeting' resolves to the local variable instead of the global one return greeting + ' ' + name
Main block
if name == "main": print(say_hello("Alice")) # Resolves 'greeting' as global print(say_hello2("Bob")) # Resolves 'greeting' as local within greet_formally ```
We can see we have two variables both called “greeting”, but they hold different values. In this case using symbol resolution it is able to resolve the “greeting” inside of say_hello2 as having the value “Good Day”. Then it resolves “Greeting” inside of “say_hello” as “Hello”, because when looking for where to link it followed the LEGB rule. In say_hello2, we had a local “greeting”, so it connected to that one and stopped looking for a connection, never making it to the Global “greeting”. If we had an external file we connected with “import” it would then check inside the imported file to try to resolve the names of any variables, functions, or objects. By doing it in this order it will always get the same result and have consistent outcomes, which is essential for programs.
Scope Resolution in Python | LEGB Rule. (2018, November 27). GeeksforGeeks. https://www.geeksforgeeks.org/scope-resolution-in-python-legb-rule/
I know it's a longer post, but thank you for your time!
- Working from multiple computers - thoughts on auto-push branch to git repository?
Hi programmers,
I work from two computers: a desktop and laptop. I often interrupt my work on one computer and continue on the other, where I don't have access to uncommitted progress on the first computer. Frustrating!
Potential solution: using git to auto save progress.
I'm posting this to get feedback. Maybe I'm missing something and this is over complicated?
Here is how it could work:
Creating and managing the separate branch
Alias git commands (such as git checkout), such that I am always on a branch called "[branch]-autosave" where [branch] is the branch I intend to be on, and the autosave branch always branches from it. If the branch doesn't exist, it is always created.
handling commits
Whenever I commit, the auto save branch would be squashed and merged with the underlying branch.
autosave functionality
I use neovim as my editor, but this could work for other editors.
I will write an editor hook that will always pull the latest from the autosave branch before opening a file.
Another hook will always commit and push to origin upon the file being saved from the editor.
This way, when I get on any of my devices, it will sync the changes pushed from the other device automatically.
Please share your thoughts.
- Rider and Webstorm from JetBrains are now free for non-commercial useblog.jetbrains.com WebStorm and Rider Are Now Free for Non-Commercial Use | The JetBrains Blog
WebStorm and Rider, JetBrains IDEs, are now free for non-commercial use! Learn more in the blog post.
- Is there a way to hide dependabot commits in the history of a repo?
I'm trying to see how active a project is, but dependabot spam makes it annoying to find actual commits and to know if those commits are relevant.
There's no need for me to know chai was updated from
5.1.1
to5.1.2
, I want to see what were the most recent actual features implemented. - NimConf 2024 - October 26th at 11am UTCconf.nim-lang.org NimConf 2024
NimConf 2024 will take place on October 26th at 10am UTC. Streamed live and for free from YouTube.