That is why i rooted my phone as a tech noobie, and it gives me security warning everytime i restart it. As if their shitty apps are not security breach, lol.
Fortunately you can use magisk to hide the rooted status from most apps. At least in Finland, I have had no problems with Nordea or Danske Bank. I remember that some app was troublesome, but I think I figured that one out also eventually.
Magisk (latest release) + Universel SafetyNet Fix v2.4.0-MOD_1.2 (kdrag0n github) + add the apps to the zygist deny list + rename magisk manager. → does the job for me.
A rooted phone is definitely a bigger security risk if you don’t know what you’re doing, as anything with root access is unbounded by the usual android permission system, and can completely demolish your OS. Additionally it can serve as a big warning if someone else has tampered with your device.
Indeed, though I have yet to meet somebody that “doesn’t know what he’s doing” in matters of rooting. Basically, the phones that are still the easiest to bootload unlock are usually only appealing to tech geeks, while the most mainstream phones have a much more complex and hacky (if at all possible) process to unlock. So that in itself filters a lot of tech non-savvy users from getting into the subject…
I’m not sure I agree though with "as anything with root access is unbounded by the usual android permission system, and can completely demolish your OS”. Android’s permission system is imho garbage. It may on paper tick the “provides user with permission management” but since apps that are ill-intended will usually 1) drown the layperson in a multitude of permission requests to do anything, it will usually translate to the user blanket accepting everything defying fine permission management as a whole 2) finer ID / privacy related data acces permissions don’t even get prompted for access, and only rely on the completely broken dev declarative scheme on the play store. IMHO, the finer permission management solutions that the Android community came up with ages ago (well before Android/Apple even thought fo implementing any permission management) did a much better job.
Rooting comes with a root manager (magisk, superUser…) that modal-prompts the user for either permanent or one-time allow / deny access when an app requests root that can be secured by fingerprint/password. I’d argue Root managers are more user-stupidity-proof thant Android’s own permission manager.
As for malicious apps requesting rooting, well, in the end, if the user is 1) stupid enough to download such apps (I’m guessing shady warez / cheat enabled games for the masses) 2) even stupider to accept a root access request from such an app… let natural selection do its job.
A lot of people definitely don’t realize what rooting actually means. If a user blindly accepts all permissions, there’s no way it can be framed as an OS problem, that’s definitely a user problem. If an app requests permission I think it shouldn’t have, I deny it. If the app doesn’t work afterwards, I don’t need the app.
Totally true, yet this thread app access requestments are more scary to me. I would like to limit those kind of apps. I root to install some ROMs and have fun, by “noobie” i meant that i can’t follow the steps without a guide. I didn’t mean that i run havok with root accesses left and right.
Thanks for the warnings, yet i still think a literal gambling app is much more risky. I don’t use my mobile phone on sensitive password saving apps or banking apps as i think those are risky on rooted phone too. I am just having fun as a careful newbie.
I get hating on PHP is a meme, and the language certainly has faults, but I feel like it’s no more arbitrary than how JavaScript behaves. And just like JavaScript, if you follow modern standards and use a modern version, it’s a much better experience. The language is only as good as the programmer.
I didn’t mean it as a flex. It was a commentary on how the most commonly used programming language in current days is just as flawed as the most commonly used programming language in the past (in web development). Bad programmers are going to write bad code, regardless of the language.
I’d like to think Typescript does a lot of heavy lifting where JS fails when it comes to web development. On the otherhand there is no fixing fundamental flaws in PHP.
Sure bad programmers write bad code, but if a language tolerates something so obviously janky via implicit unseen magic, it’s just encouraging bad practices. PHP makes this worse by tweaking core behaviours in weird and wacky ways that can easily lead to security vulnerabilities.
A high level language should make coding easier. If it doesn’t why not just code in assembly, or even build an ASIC? And no, allowing you to fuck yourself by accident isn’t making your life easier even if it seems simpler at the time you write the code.
Why not just use a good language though? Most of them are decent. It sounds like typescript is getting used a lot, at least - although it then gets turned into JavaScript for the browser.
Yes, there’s a lot of lock-in with JavaScript. The first step would be designing a Python-based browser or whatever and getting people to use it. I know less about PHP.
That was more of a “why if you had the option”. I’ve use JavaScript too for exactly this reason.
In the given example I’d probably use a switch / match expression, but ternaries are usually more flexible than switches and I don’t think it’s an issue to write a nested ternary instead of if else statements.
Which is bad for readability because the reader need to manually compute it to see whether it’s doing simple switching or not. Also it adds the question of “Why did the author use a nested ternary instead of a switch? Was it meant to do more but get left out unintentionally?”
Well, if you assume ternary operations work the same in PHP as in c and attempted to write the code demoed by this meme. You would end up with unexpected behavior. Maybe I should have said unexpected behavior instead of unsafe behavior.
PHP is the only language in existence with a left associative ternary operator. Ignoring PHP, the operator has worked exactly the same way for decades. And even PHP has now fixed the operator.
I don’t think it’s reasonable to avoid a very commonly supported pattern just because a single badly designed language implemented it wrong.
Okay, even if I give you the unexpected behavior point. The readability problem remains. Switch statements or tables will work just fine and are easier to read.
To be clear, I am fine with single ternary operations. I think nested ternary operations are harder to read and follow.
I agree you should use a switch where applicable, but ternaries are the expression equivalent of if-else statements. If I have two conditions and a default, and each branch simply evaluates to a value of the same type, I’ll probably just use a ternary.
Ever wondered about the array_fill function? It can be baffling. Try filling an array with a negative index:
array_fill(-5, 4, ‘test’);
Many languages would throw an error, but PHP? It’s perfectly fine with this and you get an array starting at index -5. It’s like PHP is the Wild West of array indexing!
Absolutely, many languages do allow negative indices. The intriguing part about PHP, though, is that its ‘arrays’ are actually ordered maps (or hash tables) under the hood. This structure allows for a broader range of keys, like our negative integers or even strings. It’s a unique design choice that sets PHP apart and allows for some really interesting usage patterns. Not your everyday array, right?
I’ve been working with PHP for two years now (not by choice) but I still sometimes forget the weird behaviours these not-arrays cause. Recently I was pushing/popping entries in a queue and it fucked the indexing. I had programmed it like I would any other sane language and it wasn’t until I was stepping through the bug I realised I had forgotten about this.
I hate PHP for so many more reasons. It baffles me why anyone would think it was a good idea to design it this way. Thankfully my current job involves actively burning it down and preparing for its replacement.
Yeah I have a Samsung phone and have never had this problem so I’m guessing it’s carrier stuff and op is unkowongly placing blame on the wrong company here
I wish manufacturers didn’t allow carriers to install junk on their phone.
On the other hand, this is how carriers can give you a good deal on a phone… They have to subsidise it by making deals with the companies that make apps like these.
If they have to trick you by installing unwanted apps on your phone, where you don’t even know it’s them doing it, then it sounds more like a scam than a great deal.
I agree. That’s unfortunately how it is today though - either you pay full price for an unlocked phone (which some people can’t afford), or you get junk apps on it. You can usually disable the junk apps at least.
Is $a equal to 1? If so, we’re “set” to the value on the left, which is “one”, if not then we’re set to the value on the right, which is $a == 2. $a is not equal to 1, so we’re set to the right value, $a == 2.
This replaces the relevant part, $a == 1 ? “one” : $a == 2, with $a == 2. So we’re left with:
$a == 2 ? “two” : $a == 3 ? “three” : “other”
Next, is $a equal to 2? If so, we’re set to “two”, if not we’re set to $a == 3. The comparison is true, so we’re set to the value on the left, “two”. The relevant part here is $a == 2 ? “two” : $a == 3 only, so it replaces it with “two” cause again, PHP is only associating with its immediate pair. So now we’re left with:
“two” ? “three” : “other”
Finally, is “two” truthy? If so, we’re set to “three”, if not we’re set to “other”. Since “two” is truthy we’re then left with “three”.
Hey; if you’re interested in this, I recommend Nevermind. It’s a game that gets harder when you get scared. It uses a heart rate monitor or your webcam. It’s supposed to teach you to make yourself calm down.
lemmy.world
Hot