rootfs

@rootfs@calckey.world

He/him. #BlackLivesMatter Social Justice, Technology, PKU. Software Developer (Java/Javascript). British Pakistani, but mostly a πŸ₯₯. All views are my own.

Migrated from @rootfsextg2gz.

Mastodon: @rootfs
Pixelfed: @rootfs

This profile is from a federated server and may be incomplete. Browse more on the original instance.

rootfs, to random

Huh, forgot this account existed...

rootfs, (edited ) to random

Recently a developer spottted a regex in our code base to detect if a string is a date, but noticed it was wrong. It was something like:

^20[0-9][0-9]-[0-9]+-[0-9]+$

which means dates like "2000-0000000-0000000" would be accepted, which is useless. I also mention how our unit tests that run against the function with this regex follows the happy path, but never really checks for the bad paths (including this one).

He then went to fix the regex, but then started to take into account things like days ending in 30/31, February ending in day 28, etc. TBH, it was very much overkill for what was needed (this was to effectively check if the string matched the "shape" of a date) but I was like "sure, why not".

He then turns around and says he has factored in leap years. At this point, I'm getting a little bit worried as he seems to be getting side-tracked. But whatever, it is done, he has got a little webpage that shows how the regex works, I say if you can export that as an image and annotate it, that would be great for future devs.

So I think that is pretty much the end of it, right? No more.

He then comes back later in the day and tells me he wants the regex to consider ROMAN FUCKING NUMERALS.

I-

SERIOUSLY.

WHO PUTS DATES INTO COMPUTERS IN THE FUCKING ROMAN NUMERAL FORMAT?!?!?!?

I try my best to kindly state that you can do that for fun and personal reasons, but I doubt our system will accept or even present dates in roman numerals.

He seems incredibly sad about this.

I then ask him has he updated the unit tests to test for all these cases.

"What unit tests?"

rootfs,

@fishidwardrobe It's fine, I've recovered from the developers self-imposed scope creep.

rootfs,

@fishidwardrobe Oh no no no. I think the code is still in development so it hasn't even been rolled out.

rootfs,

@zeolith I honestly have no idea. This was legacy code written a few years ago. I think if one of us stared at the code hard enough, we would all go "wtf".

Even writing it out loud I was like "... why not use something like a LocalDateTime/Instant/Date object to try and parse it, and if it throws an exception, just throw it out?" but I'm also sure the base system has some weird oddities with dates.

rootfs,

@zeolith I just found out through a code review - it's because the validator part of the system seems to mainly accepts Regex as validation.

I'm sure there is a way to beat it into submission but that's a problem for future me πŸ˜ƒ

rootfs,

@zeolith 🀣 It's fine

So I see your point, and after a bit of looking I can see there is a Validator interface which one of my team can look into overriding and ensuring that dates can be verified using something like LocalDate.parse and then catch the exception on failure and return bool.

However, our team have a massive JIRA backlog of much more pressing issues to deal with (especially me). Quite frankly, I find it baffling someone decide to spend about a day on this, but that's not up to me to pass judgement.

And this Regex issue deals with quite a small part of our system that - given the original code was 3 years ago and nobody has found faults with it (compared to other aspects of our system that is much more trouble-prone and needs attention, but the complexity is quite baffling), I think future me wouldn't be mad at past me for not focussing on fixing the Regex.

rootfs,

@zeolith No worries - I did give a very small window into my world, and there wasn't an awful lot of context to be obtained from it. You do raise some very good points, and if it wasn't for you, I never would've taken a look and digged deeper into the validation class, so thank you for that!

rootfs, to random

Testing something...

rootfs,

Boo, this instance doesn't support editing posts πŸ˜”

rootfs, to random

Just noticed my server here has updated, but still doesn't have all the MFM.

Oh well πŸ˜”

rootfs, to random

Cannot believe how wrong Gruber is on almost every level:

  • If hanging around with TERFs and celebs is fun, then you do you. I'm not one to kink-shame.
  • Threads is basically Twitter with Mastodon like controls and Meta's marketing push. Not exactly interesting.
  • I'll give you this - Threads is a new product of this year (at least according to current date)

And probably the most egregious point I'll fight TO THE DEATH:

  • Libraries are fun, you absolute comical magpie of a human being

https://mastodon.social/@gruber/110667962169426329

MariaTheMartian, to random

What you need to understand about me is that my hair is now long enough past my shoulders to wrap around and get snagged in my armpits which sounds really funny but is actually really annoying and that's how I know I really need a haircut. #LongHairProblemz

rootfs,

@MariaTheMartian man, and here's me that gets irritated if my hairs tickle the back of my ears

rootfs, to random

Just realised I use my laptop waaaaay more than any tablet because the screen holds itself.

Also, multitasking and apps on laptop > tablet.

rootfs, to random

Just realised I use my laptop waaaaay more than any tablet because the screen holds itself.

rootfs, to random

Just quickly played GTA San Andreas on my Samsung Galaxy Tablet S6 Lite.

Of course it's shite, but at the same time I respect the devs for getting the ancient engine of a game made for a completely different system ported to a mobile device with an entirely different processor and battery & space constraints as well as different controls.

It also makes me wince to think what the devs go through with that, but in the same way I wince when someone connects a gamepad to iOS or Android and go "yeah, this is fine, why don't more devs port their game to iOS/Android? Money on the table and all that" and I just... oof

Compare an actual game console and a game console company vs Apple and Google.

Game console companies will try their best to offer old catalogues of games. Not only is this an easy way to make a crap-ton of money from previously made games, but it also allows your customers to chip away at games they like while they wait for the big, shiny, AAA game the industry are making.

Game console makers will, in some cases, go out of their way to support old hardware so they can sell old, popular titles. As in - they will do their best to emulate old functionality, hardware, and OS to make sure you get the exact same experience.

Compare this to iOS and Android who will - at random - change and break APIs to suit their needs, and never game company needs.

Android isn't so bad, but it isn't exactly amazing either. It's an ever-growing list of devices, all with their own different hardware. It's the PC market all over again.

Apple's hardware is "consolised" as in they are predictable, but their OS is entirely unpredictable. Apple demands you use their Metal API for graphics card support for their devices. Nobody will invest the time and money to learn that shit. Even now Apple admitted defeat, copied Proton, and showed that off at WWDC.

Even the Switch and Steam Deck is better as their OS will not wildly change in foolish ways. Nintendo and Valve do not benefit from having proprietary graphics API.

Arguably, Microsoft have proprietary API for their games, but tbf their API covers a lot more than games, and from what I understand, it genuinely is one of the better ones (now it has matured) and it was to solve the issue of making games across Windows devices (like Android).

rootfs, to iPad

Just got myself an Android tablet. It is a Samsung Galaxy S6 Lite. I had an iPad for quote some time (the one I currently own is from 2018, the last time I checked).

Some things I've noticed:

● Android as an OS has drastically improved, even if Google haven't done much in the tablet space.
● Folks can shit on Samsung all they like, but they do seem to have those extra touches most manufacturers don't even consider
● While I've had the tablet for a few hours, the only app that's causes me any real grief was, ironically, Google Chrome. I'm writing this on the device in landscape, but it insisted on being portrait for the Calckey PWA. No, I don't get it either, I'm on Firefox now.
● It's so nice to have browsers that aren't just skins of the main OS browser. For example, I have ublock add on in Firefox on Android. That's absolutely nuts.
● So much of my iPad (and Apple devices) experience was just me dancing to Apples tune, which often meant shelling out for their other products for that complete interoperability. My Android tablet connected to my NAS and used my Yubikey in seconds without much additional work. I could probably run SyncThing effortlessly on here, removing the need for a cloud!
● My device comes with a pen. A magnetic pen, that clips ro the side of the device. The iPad has no such luxuries.

#ipad #Android #tablet

rootfs,

Ooooh, found a weird downside - I tried replacing the launcher (as you do) and the navigation buttons were spaced out, but in a really horrible way as to frustrate me.

So I went back to OneUI and the buttons reverted back.

Samsung must have something that detects when the home launcher is changed, and they add horrible padding to nav buttons. Cheeky bastards!

rootfs,

Nope, 'twas a bug all along!

rootfs, to random

I have both Apple Airpods Max and Sony WH-1000XM4 headphones for quite some time.

The Airpods Max headphones does an absolutely stellar job at cancelling out noise, and is super comfy as hell (despite the added weight), but I just do not like it compared to my Sony XM4's.

The biggest reason being battery life. The battery life on the Airpods Max is beyond dire. It will run out in about 2 days of use, whereas my Sony XM4s generally last about 3-5 days of usage (of about 4-8hrs).

The reason why Airpods Max drains battery is because it is comically overengineered (like all of Apple devices, tbh). The headphones essentially stay on until they are put in the case (this is something I reguarly forget to do because what other manufacturer would demand that you put your headphones back in the case???) where the Airpod Max's swtich off.

The Airpods Max's stay on for a feature called "continuity". Essentially, while the headphone is awake, your Apple devices will automatically (supposedly) connect to it behind the scenes, and when you play something on one device, it is smart enough to figure out the priority and pause the other devices and let the prioritised device take priority.

Except this feature isn't smart:

  • My Macbook will fail to auto-connect to the Max
  • No matter what is playing, it will default to the iPhone. This means if you have Spotify on your iPhone and it was open and you play something on your Macbook, your iPhone's Spotify will sync up (good) and then the headphones go "oh, he must be listening on the phone despite being flat on the table and the screen turned off" (bad)

It is single-handedly the most useless feature I've seen in a headphone.

The XM4 has something like this, but if you pause what you are playing on your current device and then switch over to a new device, it is smart enough to switch over (assuming you have both devices connected). The downside is that the XM4 can be hung up to one device, but the app makes it easy to disconnect from the other device's bluetooth, leaving your main device the only device.

It's a horrible hack, but it's a dumb solution to a dumb problem. And the XM4s are much, much cheaper than the Airpods Max, and have better battery life.

Oh, and the XM4s have a headphone jack. tap head meme

rootfs, to trustandsafety

Let me get this straight:

FIRST: A mastodon instance (mastodon.art) defederated from another mastodon instance (universeodon.com) because of the following reasons:

  • Implementing full text search, which they felt made their users unsafe, and didn't provide enough warnings
  • Caring more about growth than carefully curated moderation
  • Meeting Meta behind the scenes (you can see in the linked response that people in the Fediverse was not happy with the server owner)
  • Being concerned about removing the ability to report users

They also made a blog post publicly stating this: https://dotart.blog/dotart-blog/defederating-from-universeodon so it's not like I'm pulling this out of my arse.

SECOND: msdn.social, a big instance, decide to defederate because they didn't like the idea of someone defederating from an instance just because they spoke to Meta.

THIRD: The instance admin from msdn.social has said that they would not block first, but check out this new instance and then act if they misbehave.

FOURTH: lots of poop being flung.


This was such a badly mishandled set of events. Here are my thoughts:

  • Universeodon can do what they want. It's their instance. If they want growth at the sake of everything else, go for it. I'm just less likely to want to go there.
  • Mastoodn.art can do what they want. It's their instance. It's clear that they prioritise careful curation, and it seems they are very sensitive to that. They also host a lot of LGBT content too, so that's maybe where the sensitivities lie. Also, they are anti-capitalists. If people don't like that, they can move (although they seem to be doign v. well)
  • Msdn.social can do whatever they like. HOWEVER - their response feels incredibly knee-jerky and seems at complete odds to what they say. Defederating from an instance for the crime of... defederating against another instance and then saying defederation is not the way unless the instance is misbehaving (Defedding isn't something I would consider misbehaving - it may not be in the spirit, but it's within their power).

It would've been better if the admin of mstn.social just publicly critiicised mastodon.art instead for their administative techniques instead of doing the thing they seemed to be so against, and in favour of a corporation (especially with the Fediverse - community full of and mostly ran by average people who are sick of corporations)

#moderation #fediverse #drama #mastodonart #msdnsocial #universeodon #meta #federating #moderation #federation #moderating #admin

rootfs,

@kjr msdn.social defederated from mastodon.art

rootfs, to reddit

I don't know if anyone has seen this blog post on Reddit:

https://www.redditinc.com/blog/investing-in-what-makes-reddit-unique-introducing-contextual-keyword-targeting-and-product-ads

It seems to me that Reddit is trying to heavily pivot to being an advertising platform, like Facebook and Google. It sort of makes sense, even though it seems to be the worst time for such a move (GDPR cookie law, Apple and Google and their "privacy labels", etc)

If this is the reason why they are killing off third party apps (now that they've stopped pretending they are), then it makes sense. They want to kill off third party apps to get people using their app so they can harvest data from them and then advertise heavily.

It also makes sense why their mobile website, despite visually being far better optimised for mobile viewing (unlike old.reddit.com), is so artificially broken and constantly asking users to download their app (if I had to guess, the app is easier to collect data as the native app has more "signals" than the browser version).

It also explains why they are implementing this change so quickly and not allowing third party apps to catch up (Reddit has their own app, they know the rules when it comes to IAP, and they know how difficult they are making these changes to third party app developers).

The big question is why all the drama??

  • Why not just shut off APIs for third party apps, full stop??
    Why constantly make it about the Apollo app when it affects all* third party apps like Reddit is Fun, Sync for Reddit, narwhal for iOS etc??
  • Steve Huffman said before that these apps were using significant API resources and they were "inefficient" (implying lots of users use the app). Now he says that 95% of users use the Reddit app. Which is it????
  • Steve Huffman promised better moderation tools in his AMA. Why not deliver the tools now??
  • Why hasn't the official Reddit app improved its accessibility if Reddit wanted to capture a large audience in the first place (for ads and such - Facebook and Google hammer accessibility down devs skulls)??
  • Why all the lies?? Why change the story all the time???

This whole thing has been a comical shitstorm and could've been avoided had Steve Huffman been honest about the whole situation.

#reddit #stevehuffmann #spez #apollo #redditisfun #syncforreddit #redditblackout

rootfs, to random

hello

rootfs, to reddit

If you are planning on leaving (because lol the AMA was terrible), here are a few alternatives:

One thing to watch out for, the lemmy.ml and lemmygrad.ml admins are weird leftist tankies, so I would hard avoid them if possible.

The two federate with each other, so a server's posts and communities will federate along with other servers. This also means that technically, these communities are more resilient than reddit as if one goes down, you can go to another to get your fix of the internet!

If you are thinking these federated communities aren't special, just know that reddit is shadow-banning posts mentioning them and actively banning forums promoting lemmy or kin - so you know you are onto a winner!!!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • β€’
  • megavids
  • mdbf
  • ngwrru68w68
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • tacticalgear
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • ethstaker
  • GTA5RPClips
  • modclub
  • tester
  • anitta
  • osvaldo12
  • cisconetworking
  • everett
  • cubers
  • Leos
  • provamag3
  • normalnudes
  • lostlight
  • All magazines