I like solving puzzles, and I have a knack for programming specifically
- 0 Posts
- 58 Comments
Lightfire228@pawb.socialto
Selfhosted@lemmy.world•700+ self-hosted Git instances battered in 0-day attacks with no fix imminentEnglish
2·26 days agoBut it doesn’t have any built-in concept of users, write permissions, or authentication (except for commit signing)
Hosting an unauthenticated git repo would be the equivalent to an open ssh port with no password required
Not to mention collaborative things like issue tracking, PRs, forums, etc
Lightfire228@pawb.socialto
Selfhosted@lemmy.world•700+ self-hosted Git instances battered in 0-day attacks with no fix imminentEnglish
8·27 days agoI wonder if it’d be feasible to make a fediverse github
Lightfire228@pawb.socialto
Mildly Infuriating@lemmy.world•Apparently, all YouTube Rewinds have been unlisted as of today.English
22·28 days ago“Unlisted” means you can’t find any of them via search or on the creator’s page. But if you still have the URL, you can view them directly
Which includes public playlists other people have created
Lightfire228@pawb.socialto
Android@lemdro.id•Fairphone open sources software for Fairphone 5, 6, and the Moments switchEnglish
51·1 month agoDo it
I have the FP6, it’s amazing
Lightfire228@pawb.socialto
Programmer Humor@programming.dev•S&Box went open-source and the comments are very calm
5·1 month agoOnce i have a solid implementation, I wanna morph it into a custom scripting language for generating diagrams (a la graphviz or mermaid js)
Lightfire228@pawb.socialto
Programmer Humor@programming.dev•S&Box went open-source and the comments are very calm
282·1 month agoI literally just wrote this a few hours ago (line 55)

Lightfire228@pawb.socialto
Technology@lemmy.world•Breaking: Google is easing up on Android's new sideloading restrictions!English
21·2 months agoWaydroid doesn’t intend on supporting it. It’s a piece of code that checks for evidence of “tampering” (such as an unlocked bootloader, or root access), and sends those bits of data off to Google’s servers for verification
It’s antithetical to Waydroid and device freedom, and is used by banking apps for “security” reasons, as well as media apps for piracy reasons
And is a massive pain for anyone who root’s their devices
Lightfire228@pawb.socialto
Programmer Humor@programming.dev•The Six Stages of Code Grief
2·2 months agoNever make things more “impressive”
Make them more comprehensible
Reduce the cognitive load required to understand and reason about a piece of code. Honestly, the more you can express complicated ideas simply, the more impressive you are
Lightfire228@pawb.socialto
Programmer Humor@programming.dev•The Six Stages of Code Grief
6·2 months agoI did this once
I was generating a large fake dataset that had to make sense in certain ways. I created a neat thing in C# where you could index a hashmap by the type of model it stored, and it would give you the collection storing that data.
This made obtaining resources for generation trivial
However, it made figuring out the order i needed to generate things an effing nightmare
Of note, a lot of these resource “Pools” depended on other resource Pools, and often times, adding a new Pool dependency to a generator meant more time fiddling with the Pool standup code
Lightfire228@pawb.socialto
Programmer Humor@programming.dev•The Six Stages of Code Grief
17·2 months ago- if something feels too “heavy”, like it’s doing xml formatting, file manips, a db insert, and making coffee, all in a single class or function
Separate out those “concerns”, into their own object/interface, and pass them into the class / function at invocation (Dependency Injection)
- use “if guards” and early returns to bail from a function, instead of wrapping the func body with an if
public Value? Func(String arg) { if (arg.IsEmpty()) { return null; } if (this.Bar == null) { return null; } // ... return new Value(); /// instead of if (!arg.IsEmpty) { if (this.Bar != null) { // ... return new Value(); } } return null; }
Lightfire228@pawb.socialto
Programmer Humor@programming.dev•The Six Stages of Code Grief
34·2 months ago-
if it’s not in git / SVC, add it as is. Create a “refactor” branch, and liberally use commits
-
Treat it like a decompilation
Figure out what something does, and rename it (with a stupidly verbose name, if you have to). Use the IDE refactor tools to rename all instances of that identifier
-
Take a function, figure out what it does, and refactor it in a way that makes sense to you
-
Use the editor’s diff mode to compare duplicate code, extract out anything different into a variable or callback, and combine the code into a function call. Vscode’s “select for compare” and “compare with selected” are useful for this
-
Track what you’re doing / keep notes in something like Obsidian. You can use
[[Wikilinks]]syntax to link between notes, which lets you build a graph structure using your notes as nodes -
be cognizant of “Side Effects”
For example, a function or property, or class might be invoked using Reflection, via a string literal (or even worse, a constructed string). And renaming it can cause a reflective invocation somewhere else random to fail
Or function or operator overloading/overiding doing something bizarre
Or two tightly coupled objects that mutate each other, and expect certain unstated invariants to be held (like,
foo()can only be called once, orthingyA.len()must equalthingyB.len()- write tests if you can, either using a testing framework or custom Python scripts
You can use these to more thoroughly compare behavior between the original and a refactor
-
Lightfire228@pawb.socialto
Technology@lemmy.world•Breaking: Google is easing up on Android's new sideloading restrictions!English
21·2 months agoWhat about Play Integrity / Safetynet?
Lightfire228@pawb.socialto
People Twitter@sh.itjust.works•I can undress, shower, dry and dress in less than 10. WHAT ARE YOU DOING
19·2 months agoBasking in the hot water
Lightfire228@pawb.socialto
Technology@lemmy.world•Breakthrough gel can regenerate tooth enamel within weeksEnglish
8·2 months agoAccording to the article, they used human teeth from cadavers
Lightfire228@pawb.socialto
Android@lemdro.id•Lock Screen Ads Are Coming to Some SmartphonesEnglish
8·2 months agoFair phone 6 running /e/OS is honestly amazing
Completely degoogled ROM, using MicroG to emulate google play services
I use Hoppscotch
I did it once to pull out data from a spreadsheet into a database. Specifically, I needed
"${DataType}${Month}"for each month for 3 different datatypesIirc, i used an sql pivot (or unpivot) in that query too
Usually, it’s situations like this where you’re parsing data from strings, and you need some glue code to interface between the input data, and the date library you’re using to actually resolve the datetime


You know, you could just ask what that means
s/org/limeans replaceorgwithli