[-] spartanatreyu@programming.dev 1 points 12 hours ago* (last edited 12 hours ago)

The first month is inputted with a 1 and exported as a 0.

The first day is inputted with a 1 and exported as a 1.

[-] spartanatreyu@programming.dev 3 points 16 hours ago* (last edited 16 hours ago)

WTF is with some of the tests using a 6144 x 2560 resolution?

What the hell kind of display are they using?

The only one I could find at that weird-ass resolution was a 52 inch?! dell monitor.

Is anyone seriously using a 52 inch display?


I think they should probably be using normal resolutions for all the tests so they don't end up benchmarking some weird corner case optimisation issue that no one is going to run into.

[-] spartanatreyu@programming.dev 0 points 1 day ago* (last edited 1 day ago)

Respectfully disagree.

Gnome is the environment not implementing Server-side window decorations.

That makes everything harder for app developers since they have to implement client side window decorations to make apps movable just for Gnome.

When apps can't be moved around on Gnome because they don't have a window handle to drag, it doesn't really fit the "it just works" requirement.

[-] spartanatreyu@programming.dev 0 points 1 day ago* (last edited 17 hours ago)

Also: January is not always the 1st month, sometimes it is the 0th.

1/1/2026 can be both Jan 1st, and Feb 1st.


For the downvoters, try it in your browser's terminal:

let test = new Date("1-1-2026");

console.log(`Year: ${test.getFullYear()}, Month: ${test.getMonth()}, Day: ${test.getDate()}`);
// Prints -> Year: 2026, Month: 0, Day: 1

//
***
---
***
---
***
---
***
---

// test.getFullYear() returns the year, but test.getYear() only returns the number of years since 1900

// test.getMonth() returns the month, but the first month is 0-indexed

// test.getDate() returns the day, 1-indexed, but test.getDay() returns the current day right now and not the day of the date object

[-] spartanatreyu@programming.dev 3 points 3 days ago

Deno's packaging can be confusing (is this dependency installed in node_modules, the global cache or somehow both across module boundaries?)...

... But damn, its permission system is fucking amazing. Just run your code like normal and watch what permissions it asks you for.

What's that?

Oh, you'd like permission to read the env file and network access? Begone namesquatted malware!

What's that?

Oh, you want write permission to /.., fuck off slopped out pull request!


I tried porting a project back to node (v24) to see what it was like (since I heard node had a permission system now) and because some devs wanted to stick with what was familiar to them.

First thing I noticed, my watch/rebuild/serve script went from 0.2 seconds to 3-5 seconds with no code changes and using the same dependencies that were originally written for node.

Second thing, Node's permission system doesn't work because it's broken by design. Permissions cannot ever be opt in. Everything needs to be locked down and you need to explicitly get permission to access things.

In node's design, a junior dev could "opt in" to the network permission to disable network requests, but they wouldn't think to block subprocesses (which could call cURL/wget and get it to make network requests on the main processes' behalf). It's utterly broken and shifts the blame to the developer for not knowing better.

I instantly switched the project back to deno.

[-] spartanatreyu@programming.dev 37 points 2 months ago

What's with all the complaints here?

New users expect middle click to bring up an auto-scroll widget instead of pasting by default.

You can set up your computer how ever you want.

Want auto-scroll? Set it to auto-scroll.

Want paste? Set it to paste.

The first thing you do on a new system is set up the computer how you want.

No one's taking anything away from you.

[-] spartanatreyu@programming.dev 38 points 5 months ago

I don't see any actual temper lost here.

In one case he points out that someone is making commits that have messed up a file's indentation, and to stop doing that because it's messing things up (they were).

In the other case he points out that rust's default format rules are wrong (in the context of version control readability, they are) and asks someone to fix them.

[-] spartanatreyu@programming.dev 132 points 2 years ago

That's 41 degrees for everyone who doesn't measure things in bird per gun.

[-] spartanatreyu@programming.dev 32 points 2 years ago

What to know about blue supermoons:

  1. They literally mean nothing.
  2. The change is imperceptible to everyone.
  3. Expect useless clickbait slop about it until it passes.
12

Feel free to tweak the two custom properties in the css pane to explore the different mosaic patterns that are generated.

17
I made a thing (codepen.io)
submitted 2 years ago* (last edited 2 years ago) by spartanatreyu@programming.dev to c/webdev@programming.dev

Single HTML element + CSS only

  1. Inhale for 4 seconds
  2. Hold for 4 seconds
  3. Exhale for 4 seconds
  4. Hold for 4 seconds

And repeat

Inspired by: https://quietkit.com/box-breathing/

Note: The current Safari version has a bugged linear() implementation that has been fixed in the upcoming version.

[-] spartanatreyu@programming.dev 35 points 2 years ago* (last edited 2 years ago)

There's a reason Teams is/was shit.

The first teams was written in AngularJS (which is a slow to run resource hog, but fast to develop) wrapped in Electron. It was kind of a minimum viable product, just to build something quickly to get some feedback and stats on what people needed.

The plan was to build a new native version of teams and build it into the next windows while having an web fallback (built on react) for everyone else.

They stopped working on the original teams and started working on the new versions.

They got half-way through working on the native and react versions when suddenly, covid happened.

They couldn't keep working on the new versions because they wouldn't be ready for a while, so they had to go back and resume development on the old one, introducing patch after patch to quickly get more features in there (like more than 2 webcam streams per call).

Eventually covid subsided and they were able to resume development on the new teams versions.

Windows 11 launched with a native teams version (which has less features but runs super quick), and the new react based teams (which can now be downloaded in a webview2 wrapper) has been in open beta since late last year (if you've seen the "Try the new Teams" toggle, then you've seen this). The React+Webview2 teams will replace the AngularJS+Electron version as the default on July 7th.

49
9
32
Typescript 5.2 Released (devblogs.microsoft.com)
14
[-] spartanatreyu@programming.dev 46 points 2 years ago

Github has always had being a job site be it's secondary feature.

Except that it has a slightly higher bar of entry to recruiters and recruitment bots spreading toxic positivity, and anyone asking for a job is able to prove (at least some of) their value by showing off their code and how they participate publically in other repos (if at all).

10
18
Typescript 5.2 beta announcement (devblogs.microsoft.com)

Shows a great example of JS' new using keyword (similar to defer in D, Go, Swift, etc...)

[-] spartanatreyu@programming.dev 36 points 2 years ago

cURL was one of these for a while (according to my limited understanding)

It was made in the 90s and it didn't get commercial support until a few years ago.

18
submitted 2 years ago* (last edited 2 years ago) by spartanatreyu@programming.dev to c/programming@programming.dev

Comments should provide context, not repeat what the code already says. The Redis codebase has 9 distinct types of comments (Function, Design, Why, Teacher, Checklist, Guide, Trivial, Debt, Backup), each with a specific goal in mind.

2
8
48

The mistake most devs make when trying to document their project is that they only make one (maybe two) types of documentation based on a readme template and/or what their mental model of a newcomer needs.

Devs need to be actively taught that:

  1. Good documentation isn't one thing, it's four. To have good documentation, you need all four distinct types of documentation.
  2. What the four types of documentation are (this is discussed in the link)

If you don't have all four types of documentation, you have bad documentation.

view more: next ›

spartanatreyu

joined 2 years ago