Programming
- Why is predictive text so hard to disable?
Does anyone know, or can anyone guess, the business case for predictive text? On phone apps, it is often incredibly difficult to turn off. Why is that, do you think? (The examples I have recent experience with are Facebook and Outlook mobile apps.)
I would have thought that, for AI training purposes, they would want humans typing things and not just regurgitating canned responses. But apparently not?
- How to conduct a software audit?
cross-posted from: https://lemmy.pe1uca.dev/post/1137911
> I need to help auditing a project from another team. > I got the pointers on what's expected to be checked, but I don't have like templates for documents for what's expected from an audit report which also means I'm not sure what's the usual process to conduct an internal audit. > I mean I might as well read the whole repo, but maybe that's too much? > > Any help or pointers on what I need to investigate to get started would be great!
- Keep the logs for retrospective analysisvitonsky.net Keep the logs for retrospective analysis
Development logs are an important part of any project because they allow us to track progress, detect problems, and investigate incidents. Remember the value and advantages of development logs, and preserve as many logs as possible.
- A map app for mobile phones with fog of war
Hello everyone, I have an idea to make a map with fog of war, when you walk you explore new areas and points of interest but you can't see unexplored areas. I'm not sure if it's a good idea, what is your opinion?
- Flow state: Why fragmented thinking is worse than any interruptionblog.stackblitz.com Flow state: Why fragmented thinking is worse than any interruption
What I learned after reading 14 studies about flow state
One thing that pretty consistently drops me out of the flow state is having to dig through documentation for whatever I'm trying to use, or even worse having to dig through its source code because the documentation is either nonexistent or eg. plain wrong
- OpenOrb - a curated RSS and Atom feed search engine - Raphael Kaboraphael.computer OpenOrb - a curated RSS and Atom feed search engine - Raphael Kabo
Raphael Kabo's personal website and writing on programming, poetry, and academia.
> Raphael Kabo's personal website and writing on programming, poetry, and academia.
- Qt 6.7 releasedwww.qt.io Qt 6.7 Released!
With Qt 6.7, developers can use C++20, use SVG beyond 1.2 Tiny, visualise data with 2D graphs, and lots more!
Qt 6.7 is out with lots of large and small improvements for all of us who like to have fun when building modern applications and user experiences. Several additions are released as technology previews, and we are looking forward to your feedback so that we can get everything ready for the next LTS release!
- Powershell: How do I update my code to use a different file type?
I have a script that duplicates a Word doc template and renames each using a csv file with a list of names. What would be the equivalent code if instead of a csv file I use a text file?
Import-csv ‘.\individuals2.csv’ | foreach-object { $newname = ‘2 ‘ + $_.name + '.docx’ Copy-item '.\template.docx' $newname }
- Decision logsvitonsky.net Decision logs
Let's say you need to choose some technology for your project, or you already have problems with some technologies, so you want to replace them with others. If you do not maintain a decision log, you have a high risk of making bad decisions that are biased, based on authority, and take too long.
- I Made a English Dictionary Front-End for Terminals
cross-posted from: https://feddit.nl/post/12252747
> This project was interesting. Recently, I've been digging into the functional programming paradigm. This is one of my first tries at it. I've been doing OOP until recently, but this project really was impressive to me. The whole implementation took about nine hours. Functional programming is much less convoluted. I spent more time programming than deciding on a good name for a certain identifier. > > Not only is functional programming more efficient, but I can also see that it's much less tedious to write automated tests for. I only have to take care of the local scope of the function I am writing a test for; there is no need to deal with the parent's inherited mess or even any parent's mere state. I just have to write the test for the function. > > I have scraped the Cambridge Dictionary to collect the data. > > The project is licensed under MIT at: > > https://github.com/eeriemyxi/novi > > https://git.envs.net/myxi/novi
- Velato: A programming language where source code must be a valid MIDI music file
cross-posted from: https://sopuli.xyz/post/10010650
> Ran into this on HN and had to share it. I love esolangs with "surprising" source representations
- A fun exercise in re the design quality of the Linux kernel: How many lines of code do you think was the diff to add "-o nosymfollow" (ignore symlinks) as a mount option?
Think of a similar scope of change to a large codebase you're familiar with, for frame of reference.
- I'm looking for a way to create webpages without HTML, any tips?
Hello! I'll try to explain what I'm looking for: I sometimes have to write simple web pages (not just text, also buttons and video players and so on), but I really really hate writing html code. What I'm used to is QML, which I like a lot, because of the ease of placing objects exactly where I need using the anchors and the Layout objects. What I'm looking for is a language or something with a similar syntax, that can then be "built" to plain HTML/CSS/JS. Is there something like this? I know I can compile Qt/QML for webassembly, but I'm having huge amounts of problems, and also I'd like to have the possibility to have a plain HTML result, not necessary bind to the server side.
thanks in advance!!
- Error in GStreamer under PyGTK
cross-posted from: https://lemmy.ca/post/15730457
> I've written a basic media player using Python, PyGTK, and GStreamer. However, I've found a bug that I'm having trouble finding a fix to. > > In this program, opening a video launches a second window, in which the video is played back. If I close said window, however, the control window freezes and I get the following error: > >
plain > gst-resource-error-quark: Output window was closed (3) ../sys/xvimage/xvimagesink.c(586): gst_xv_image_sink_handle_xevents (): /GstPlayBin:player/GstPlaySink:playsink/GstBin:vbin/GstXvImageSink:xvimagesink0 >
> > The source code can be found here. > > Does anybody have any idea how to fix this? Or is this perhaps a bug in one of the libraries? - Do Users Write More Insecure Code with AI Assistants? (arxiv paper)
Subverting Betteridge's law of headlines. Yes.
- Reverse Engineering TikTok's VM Obfuscation | Ibiyemi Abiodun
Not mine.
"Part 1" is this, it's also linked to in the body.
I really wonder what happened:
> Update (21 August 2023): I did continue my investigation, but I have decided not to publish the results. Please do not continue to email me about this.
- Finding projects that need user testing?
I'm digging into the world of #FOSS #opensource and would like to help with existing projects. My programming chops are not sharp yet, but I'm a detail-oriented communicator who knows a bit about user testing.
How do I find projects on GitHub, GitLab, or other sites that need this kind of help? The machines I would be testing on are a potato desktop running Pop_OS Linux and an Android phone. Thanks in advance!
- Untangling Non-Linearity: How the Linked List Changed Everythingschmud.de Untangling Non-Linearity
How the simple link became the foundation for artificial intelligence and all dynamic media.
- scriptscrub (`script` output pruner / watcher)
Edit 2024-01-26: I ended up feature creeping it a bit. It can now be used as a
less
input filter, and asciinema-esque recording playback.Original post:
A less bad name TBD.
This is a little program I made to convert
script
captures into properly laid out text. A lot of the behaviour still isn't quite right, but I'm pretty happy with it as a proof-of-concept. - So yesterday a very weird thing happened to me.
So. I was working with this code:
``` public function front(?string $sortBy, ?string $time, ?string $type, ?string $filter, string $federation, Request $request): Response { $user = $this->getUser();
if (!$user) { $filter = 'all'; }
$criteria = new EntryPageView($this->getPageNb($request)); $criteria->showSortOption($criteria->resolveSort($sortBy)) ```
... and so on; the function continues. VSCode told me there was a syntax error on the close brace on the if statement. I stared at it for a while, then pasted the code into GPT (not Copilot). Here's the conversation we had about it:
---
Me
What's the syntax error here?
(and I pasted the code)
GPT
The syntax error in your PHP function public function front seems to be due to the incorrect placement of the closing curly brace for the if statement. It appears that the if statement is not properly closed before the $criteria initialization begins. The corrected code should look like this:
``` public function front(?string $sortBy, ?string $time, ?string $type, ?string $filter, string $federation, Request $request): Response { $user = $this->getUser();
if (!$user) { $filter = 'all'; } // Closing brace for the if statement
$criteria = new EntryPageView($this->getPageNb($request)); $criteria->showSortOption($criteria->resolveSort($sortBy)); // ... rest of your function code ... } ```
Ensure that each statement and block is properly closed and followed correctly by the next statement. This corrected structure should resolve the syntax error you are encountering.
Me
I don't get it. I put a closing curly brace right after the statement in mine... what am I missing?
GPT
I apologize for the confusion. Upon re-examining your code, it seems the placement of the curly brace is correct. If you're still encountering a syntax error, it may not be related to the if statement structure.
Let's look at other possible issues:
---
... and so on. Pasting GPT's recommended if-statement block, including the curly brace that was already there, fixed the error. I have since re-pasted the same thing I initially gave to GPT to VSCode, and it all works now, and asking the exact same question of GPT again now leads to random guesses which have nothing to do with the cursed curly brace that was previously causing problems for both VSCode and GPT.
I have given up and moved on at this point, content to say vaguely that maybe the unusual brace style, or pasting the incomplete function without semicolon or final close brace, managed to coincidentally confuse GPT on exactly the same line where VSCode had gotten confused for unexplained reasons. But the whole thing still has this Twilight-Zone oddness to me.
- I thought I would teach myself Rust, apparently can't get Python out of me
Text description (for those with screenreaders):
A portion of a prime number checker written in the Rust programming language, where the first few lines are written correctly including the first if statement in the program. However, the following if statements are written using Python syntax instead of Rust, as the author slipped back into his native tongue.
- Can I email or text myself through Python or bash?
EDIT: Thanks y'all! I got this working by installing mutt and configuring it with my Gmail info. Please note the warning from u/jherazob below--if this were something mission critical I would not want to rely on this solution.
================
Noob question incoming, thanks in advance for any help with this!
I have a specific use case in which I want to send an automated email or text to myself once a day (the message is different each time--otherwise I would just set an alarm, lol!). I'm running Pop_OS on an old desktop computer. Where I'm stuck is getting an email to successfully send from the command line. I'm looking for easy-to-follow instructions that would help me do that, and none of the articles or videos I've come across thus far have helped.
I'm aware of Twilio and other services that send SMS messages, but I'm looking for something free. Especially since I only need to text one person (myself), and infrequently at that.
Below is my attempt to send an email with the telnet command. Nothing ever came through...
XXXXXXXX@pop-os:~$ telnet localhost smtp Trying ::1... Connected to localhost. Escape character is '^]'. 220 pop-os ESMTP Exim 4.95 Ubuntu Sun, 07 Jan 2024 15:12:28 -0500 HELO gmail.com 250 pop-os Hello localhost [::1] mail from: XXXXXXXX@gmail.com 250 OK rcpt to: XXXXXXXX@gmail.com 250 Accepted data 354 Enter message, ending with "." on a line by itself Subject: Test Body: Is this working? . 250 OK id=1rMZW4-0002dj-Uy quit
- Do Users Write More Insecure Code with AI Assistants?chaos.social ~n (@nblr@chaos.social)
This is fine... "We observed that participants who had access to the AI assistant were more likely to introduce security vulnerabilities for the majority of programming tasks, yet were also more likely to rate their insecure answers as secure compared to those in our control group." https://arxiv.o...
cross-posted from: https://programming.dev/post/8121843
> ~n (@nblr@chaos.social) writes: > > >This is fine... > >>"We observed that participants who had access to the AI assistant were more likely to introduce security vulnerabilities for the majority of programming tasks, yet were also more likely to rate their insecure answers as secure compared to those in our control group." > > > >[Do Users Write More Insecure Code with AI Assistants?](https://arxiv.org/abs/2211.03622? > >
- Gokrazy – Golang programs as a Raspberry PI Appliance
Deploy Golang applications to a Raspberry PI
- AoC Input fetch tool (Rust)
cross-posted from: https://lemmy.world/post/9117180
> If you're writing Advent of Code solutions in Rust, then I've written a crate that can fetch the user input data directly from the main website. > > Long story short, you provide it a login token copied from your browser cookies, and it can fetch the input data by year and day. Inputs are cached locally, so it'll only download it once for a given problem. This was heavily inspired by the PyPi advent-of-code-data package. > > Unlike other AoC-centric Rust crates, that's all it does. The other crates I've seen all want the code structured in a specific way to add timing benchmarks, unit testing, and other features. I wanted something lightweight where you just call a function to get the input; no more and no less. > > To use the crate: > * Follow the AoCD instructions to set the AOC_SESSION environment variable.\ > This key is used for authentication and should not be shared with anyone. > * Add the
aocfetch
crate to your Cargo.toml[dependencies]
section:\ >aocfetch = { git = "https://github.com/ooterness/AdventOfCode.git" }
> * Import the crate and callaocfetch::get_data(year, day)
to fetch your input data. > > An example: >> use aocfetch; > > fn main() { > let input = aocfetch::get_data(2023, 1).unwrap(); > println!("My input data: {}", input); > println!("Part 1 solution: 42"); // TODO > println!("Part 2 solution: 42"); // TODO > } >
> > If this goes well I will submit it to crates.io, but I wanted to open this up for beta-testing first. - Big O notation is about what matters when the numbers get big.
cross-posted from: https://programming.dev/post/6660679
> It's about asking, "how does this algorithm behave when the number of elements is significantly large compared to when the number of elements is orders of magnitude larger?" > > Big O notation is useless for smaller sets of data. Sometimes it's worse than useless, it's misguiding. This is because Big O is only an estimate of asymptotic behavior. An algorithm that is O(n^2) can be faster than one that's O(n log n) for smaller sets of data (which contradicts the table below) if the O(n log n) algorithm has significant computational overhead and doesn't start behaving as estimated by its Big O classification until after that overhead is consumed. > > #computerscience > > Image Alt Text: > > "A graph of Big O notation time complexity functions with Number of Elements on the x-axis and Operations(Time) on the y-axis. > > Lines on the graph represent Big O functions which are are overplayed onto color coded regions where colors represent quality from Excellent to Horrible > > Functions on the graph: > O(1): constant - Excellent/Best - Green > O(log n): logarithmic - Good/Excellent - Green > O(n): linear time - Fair - Yellow > O(n * log n): log linear - Bad - Orange > O(n^2): quadratic - Horrible - Red > O(n^3): cubic - Horrible (Not shown) > O(2^n): exponential - Horrible - Red > O(n!): factorial - Horrible/Worst - Red" > > Source
- I was contacted by a recruiter, but I can't find anything on the company.
Preamble: I'm sure there's a better community to ask this question, comment below if you're aware of it.
Okay, for background I'm a bootcamp student, I'm still learning, but I'm almost done. I've been tweaking my LinkedIn as I go, trying to be more attractive for recruiters in the future. Well, last week I was contacted by a recruiter, and asked if I was interested in job opportunities. I did some brief research, and it looks like an actual company on Glassdoor. Anyway, I sent over my resume, and was on a call for maybe 5 minutes. We talk for a bit, and she asked me how I am in interviews and my experience. I tell her that I've been "technically" freelance, but I haven't done anything because of starting cost, but she seemed to ignore that concern. Towards the end of the call I asked her if this would be with her company, and she said yes, and then I said bye.
Now, the problem is that this company is specifically for interview prep, and helping students get hired at other companies. While she said I'd be with her company, I'm concerned that I'm trying to be sold something here. The company is called GigaMe, and there is barely anything online about them.
So, my overall question would be, "what would you do?" Or, what should I expect? I don't think i should get my hopes up, but any advice would help.
- "Bot resistant" voting systems?
A friend of mine is interested in the "sovereign artist" model, which basically means that you self publish and self release your own work on your own website, as opposed to using a publishing house or art gallery.
It's powerful because it gives everyone a platform to share "niche" art, but as a consumer, it can be difficult to find and "curate" high quality, interesting works of art. Is there a rating/voting system that exists that is resitant to internet vote tampering?
I'm talking about how 10 years ago, Amazon reviews were pretty helpful. But now they've been swarmed with paid and bot written reviews. Same with Slickdeals and many others.
I'd want a voting system that incorporates some ideas:
- it would prevent one person from making multiple fake accounts
- reviews wouldn't be suppressed or promoted by paid algorithims
- the algorithm WOULD help connect people to items they are interested in. But maybe the workings of it would be open source, so it can be audited for bad acting.
Does a project like this exist somewhere? Rather than host that project in one place, it could be powerful to defederate and prevent the temptation to manipulate algorithms.
- D&D Item Card Template v1.1- A Simple, Effective LaTeX Template for Generating Item Cardswww.overleaf.com D&D Item Card Template
An online LaTeX editor that’s easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more.
Hey there everyone, I am back with v1.1 of my Latex Template for making D&D Item Cards. I received one major point of feedback from multiple people in the fediverse: make an option for fixing the card dimensions for easier printing and distribution/storage at the table. So that is exactly what I did!
Now you can choose the (admitedly more user-friendly) option of letting the card length vary for digital distribution, or you can fix the card aspect ratio. The item art background and text backgrounds can also now be changed, and a number of options have been included for item art backgrounds, but you can use whatever images you want.
The fixed-size cards are 5:7 by default, the same as playing cards. They include a front and back side for longer item descriptions, but you will have to edit the text more carefully and decide where to split between front/back content.
For the printable card item art, I highly recommend using a PNG with a transparent background and modifying
tcolorbox
interior style
to set your background. Ensure your backgound art is close to 7:5 for best results. You can also load your image as the background art if you'd like instead, again, making sure it is in 7:5. - Learn Python from interactively @ futurecoder.iofuturecoder.io futurecoder: Learn to code from scratch
100% free and interactive Python course for beginners
cross-posted from: https://programming.dev/post/6470590
> This looks like a great starting point for people with little to no experience with programming to learn to program using Python. > > Everything taught by futurecoder.io can be used locally on your own computer. But futurecoder.io doesn't show you how to install Python on your machine but you can fill in that gap with the information provided @ https://wiki.python.org/moin/BeginnersGuide/Download > > Other resources are provided on the python.org Beginners Guide > if needed. > >
- Fully open source version of Intellij IDEA?
Hi. Is there some fully FOSS version of Intellij IDEA CE? Because the official download includes some proprietary bits.
- Just realized I can just use "..." to go back two directories! Is this a zsh feature?
I accidentally discovered that both "cd ..." and "..." work, and moreover, I can add more dots to go back further! I'm using zsh on iTerm2 on macOS. I'm pretty sure this isn't a cd feature. Is this specific to zsh or iTerm2? Are there other cool features I just never knew existed??
I'm so excited about an extra dot right now.
- [Blog] Can Rust prevent logic errors?
Cross-posting this here as I saw some misconceptions about Rust language
I think that blog describes well the pros of using a strongly-typed language like Rust is. You may fight the compiler and get slower build times but you get less bugs because of the restrictions the language imposes you.
The biggest con of Rust is that it requires learning to be used, even for someone who has already programmed before. It's not like Python or Ruby where you can just dive in a code base and learn on the go. You really need to read the Rust book (or skim through it) to get through the notions. So it has a higher entry level, with all the misunderstandings that come with it.
- CSS is fun againpdx.su CSS is fun again
CSS has been undergoing a quiet renaissance lately. Lots of big features which previously required an external tool to use, are now native parts of the language, and its growing more and more all the time. If you haven't used CSS in a long time, for whatever reason, now is the time to take a look ag...