Programming
-
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!!
- devblogs.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.
- What's new in .NET 9
- What's new in ASP.NET Core 9.0
- What's New in EF Core 9
- What's new in Windows Forms for .NET 9
- What's new in WPF for .NET 9
- What's new in .NET MAUI for .NET 9
- Latest stable channel release notes for the Windows App SDK
- What's new in C# 13
- What's new in F# 9
- Visual Studio 2022 version 17.12 announcement, release notes
-
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
- drewdeponte.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
-
US Senate To Revive Software Patents With PERA Bill Vote On Thursday
news.intellectia.ai US Senate To Revive Software Patents With PERA Bill Vote On Thursday - Intellectia Newszoobab 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
- go.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
- 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
- blog.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.
-
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?
-
Debian in WSL not Ubuntu
talepunk.com Debian in WSL not Ubuntu | TalePunkIf 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 human
github.com GitHub - e2e-test-quest/uuv: Solution to facilitate the writing and execution of E2E tests understandable by any humanSolution 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]
- thoughtbot.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.
- arstechnica.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.
-
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)
-
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 extend
programmingisterrible.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 LLVM
myhsu.xyz Scheduling Model in LLVM - Part IInstruction 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 jobs
github.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 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.
-
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 UTC
conf.nim-lang.org NimConf 2024NimConf 2024 will take place on October 26th at 10am UTC. Streamed live and for free from YouTube.
- ibraheem.ca Designing A Fast Concurrent Hash Table
I recently released papaya, a fast and feature-complete concurrent hash table for Rust. In this post I want to dive into the design and research that went into creating it, as well as why you might consider using it over existing solutions.
-
Rant: "Knuth, The art of computer programming" is overhyped
The title. I have read many technical books (mostly compilation, programming languages & automata) , blogs and whatnot, and recently borrowed the above mentioned book Volume4 (combinatorial problems) from a local library. Just to give a try since Knuth is such a respected person in computer science.
It is by far the most frustrating and maddening book i ever laid my eyes upon. The author doesn't make the slightest effort to explain why something is useful, changes examples before explaining why previous example is interesting or how it shows why X is useful. On page 8, he says that "Graeco Latin squares allowed to François Cretté de Palluel to do with 16 sheeps, what otherwise would require 64 sheeps". How & why ?? No fucking clue. I know i am not the smartest person on earth, but i would love a little hand holding here, you know to explain a concept he introduced 2 pages previously, and gave 3 random anecdotes about.
The writing style is a complete opposite of what I (and I believe, what are most people ) am expecting. If you know something, it won't be useful, and you don't know something : don't count on the book for explanation. I had the physical urge to slap Knuth. It's absolutely maddening.
He then goes on his little hobby to gather 5 letter-English-words, and gives some fancy looking graphs with fancy names (3 cubes, Petterson graph, Chvatal graph). For all what i know, it could be graphs called 42 and graph Blabla. Again no clue how it's useful, nor why it's interesting. He introduces some definitions and theorems.
I am on page 26 (thr book is thicker than a bible) i think i am done. This book will not make you a better programmer, i have no idea who and for what reason could possibly find it useful?
If you think i am overreacting and should continue reading, please tell me so, but i don't expect it to get better
- www.davidreis.me What happens when you make a move in lichess.org?
Dive deep into the open-source architecture of Lichess.org to understand the technical processes behind making a move in a game.