[-] spartanatreyu 1 points 3 days ago

At least it was better than the developer survey that was only about AI. That one still makes me facepalm just thinking about it.

15
I made a thing (codepen.io)
submitted 2 weeks ago* (last edited 2 weeks ago) by spartanatreyu to c/webdev

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 22 points 1 month ago

As an outsider looking in, it looks like it's a bit of a wipe the slate clean governance and moderation wise as voted on by the community.

So, now over the coming days the community will in essence vote on whether they will allow sponsorships from the military industrial complex.

[-] spartanatreyu 15 points 1 month ago

Luckily for you, there's not a vaccine for stupidity.

[-] spartanatreyu 36 points 1 month ago* (last edited 1 month 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.

[-] spartanatreyu 22 points 7 months ago

That's not pro, that's just reckless gambling.

49
submitted 7 months ago by spartanatreyu to c/[email protected]
[-] spartanatreyu 16 points 8 months ago

"the means" in this case would be authoritarian repression.

"The means" always has to be something bad for the "ends" to try and justify reaching for "the means".

8
submitted 8 months ago by spartanatreyu to c/webdev
32
Typescript 5.2 Released (devblogs.microsoft.com)
submitted 9 months ago by spartanatreyu to c/webdev
[-] spartanatreyu 14 points 9 months ago

It depends what you need your configuration file to be:

Need a well defined easy to understand concrete configuration file?

  • Use .toml. It was made to be both human and computer friendly while taking special attention to avoid the pitfalls commonly found in other configuration files by explicitly stating expected types around commonly confused areas.

Need a simple to implement configuration file?

  • Use .json. It's famous for being so simple it's ~~creator~~ "discoverer" could define it on a business card.

Need an abstract configuration file for more complicated setups?

  • Use .ncl. Nickle allows you to define functions so that you can generate/compute the correct configuration by changing a few variables/flags.
14
submitted 10 months ago by spartanatreyu to c/webdev
[-] spartanatreyu 47 points 10 months 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
submitted 10 months ago by spartanatreyu to c/webdev
20
Typescript 5.2 beta announcement (devblogs.microsoft.com)
submitted 11 months ago by spartanatreyu to c/webdev

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

1
submitted 11 months ago by spartanatreyu to c/[email protected]
[-] spartanatreyu 20 points 11 months ago

And yet people will blindly trust AI ~~hallucinated~~ generated results...

[-] spartanatreyu 27 points 11 months ago

It's not rebase vs merge, it's rebase AND merge.

Commit your changes into logical commits as you go.

Then just before submitting a pull request, review your own code. That includes reviewing your own commits too, not just the code diff.

Use rebase to:

  • Swap commits so that related changes are together
  • Edit your commit messages if you find a mistake or now have a better idea of what to put in your messages
  • Drop any useless commits that you just end up reverting later
  • Squash any two commits together where the first was the meat of desired change and the second was the one thing that you forgot to add to that commit so you immediately followed it up with another commit for that one missing thing.

Then, and only then, after you have reviewed your own code and used rebase to make the git history easier to read (and thus make it easier to review), then you can submit a pull request.

[-] spartanatreyu 21 points 11 months ago

The CommunityFactory is coming next week, and the CommunityFactoryFactory the following week :p

[-] spartanatreyu 50 points 11 months 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.

36
submitted 11 months ago* (last edited 11 months ago) by spartanatreyu to c/programming

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.

18
submitted 11 months ago by spartanatreyu to c/bad_ui_battles
6
submitted 11 months ago by spartanatreyu to c/webdev
3
submitted 11 months ago by spartanatreyu to c/javascript

Answer: create a new object with the properties of the two original objects using the spread operator.

The order you insert the objects into the new merged object determines which object's properties take priority over the other.

Linked example:

const obj1 = { foo: "bar", x: 42 };
const obj2 = { foo: "baz", y: 13 };

const clonedObj = { ...obj1 };
// { foo: "bar", x: 42 }

const mergedObj = { ...obj1, ...obj2 };
// { foo: "baz", x: 42, y: 13 }

You can find more discussion here: https://stackoverflow.com/questions/171251/how-can-i-merge-properties-of-two-javascript-objects-dynamically

view more: next ›

spartanatreyu

joined 11 months ago