Open-Source evangelist. Boycotts large corpos. Free speech absolutist (very unpopular around here, I know).

  • 0 Posts
  • 38 Comments
Joined 10 months ago
cake
Cake day: July 7th, 2024

help-circle
  • Intermingling PHP and HTML is one of PHP strengths

    Eeeh, no. It’s a bad practice in 2025. That was a good thing a decade ago.

    Trying to modify this blocked CSS is going to be wayyyyyyyyyyyyyyyyyyyy easier than trying to modify a bunch of printed HTML strings broken up by multiple nested conditionals. Plus it’s just straight-up easier to read and straight-forward to understand what the function does right away.

    True. But I was just looking at the source code of wordpress for 30 seconds. I could probably find worse.

    To harp on this even more, one of the benefits of blocking HTML in this way is IDE highlighting.

    Which isn’t a problem if you use a template engine - as you should in modern applications.

    I can’t think of a single system that doesn’t “stop PHP executing” at some point to output HTML in some way.

    Not a single modern system does that. It’s terrible practice and won’t even pass automated code reviews with sane settings.



  • but oh man in a much better, cleaner, and more sparingly way

    I don’t think we’re looking at the same source code. The first thing I see in wp-activate.php:

    function wpmu_activate_stylesheet() {
    	?>
    	<style type="text/css">
    		.wp-activate-container { width: 90%; margin: 0 auto; }
    		.wp-activate-container form { margin-top: 2em; }
    		#submit, #key { width: 100%; font-size: 24px; box-sizing: border-box; }
    		#language { margin-top: 0.5em; }
    		.wp-activate-container .error { background: #f66; color: #333; }
    		span.h3 { padding: 0 8px; font-size: 1.3em; font-weight: 600; }
    	</style>
    	<?php
    }
    

    This isn’t better nor cleaner. This is a disaster. A function that stops PHP execution halfway-through, outputs some text and then restarts PHP execution? Hell, I’ve been in the PHP ecosystem for over a decade now and I didn’t even know this was possible and I wish that knowledge was still hidden from me.

    Maybe I was wrong by saying that the 4chan source code is better than wordpress, fair. Maybe I should just say both are abominations, I will not judge which one is better and both should be discarded and forgotten.













  • You say that until Google realises that there is no other viable alternative and so they can do the same thing since it’s not like there is another option.

    Not entirely. I’m fairly sure that, if google decides to lock down pixel devices, the graphene team would evaluate other devices that are more open. The reason they recommend pixels is because they are open, not because they are big google fans. Graphene DOES run on other devices aswell, it’s just not officially tested or supported. And there are other devices with unlockable bootloaders, most noteably older oneplus devices and fairphones.

    You answer is basically a big “go fuck yourself” to everyone who bought an iphone before they knew about the things Apple did to keep users looked in

    No, my answer is a big “go fuck yourself” to everyone who voluntarily decides to stick with apple devices despite knowing of their practices. Let’s be honest for just one second: Barely any consumer is so tied into an operating system that it would prevent them from switching. What do most people do with their phones? Listen to music, have a messenger, maybe check emails, browsing - that’s it. And you can do that on any other phone. The amount of people that are apple power users that use applications that only exist in the apple ecosystem is abysmal and largely irrelevant in this discussion.

    Same goes for the acquiring root access on an android phone. People are not born with knowledge.

    True. Neither was I. But in 2025, we have the internet and you can read up on almost anything imagineable. If I wanted to learn about astrophysics, I could find plenty of videos or resources about it. If I want to learn about japanese history during the sengoku period, there are a lot of resources about that. And if I want to learn how to unlock the bootloader of a phone and install a custom rom, not surprisingly, there are resources for that.

    This “People are not born with knowledge” argument is so stupid - nobody is born with it, the problem is just that most people are too lazy to learn about their possibilites to break free from oppressing corporate conglomerates. And THAT’S something I have an issue with.


  • In reality, companies aren’t afraid of making anti-consumer products

    Because people will still eat the shit thrown in front of them. Why bother with good products when the doofus buys it anyways?

    What do they do when Google makes some restrictive bullshit change again, for example to the android API? Fork it and become incompatible with apps meant for stock android?

    Well, yes, that would most likely be the result. Even now, some apps aren’t working - the commerzbank banking app, for example, didn’t work on graphene (because of play protect tho, not incompatibility). I was emailing them, asking if they planned to change it, they said “nah fam sorry no time” so I was switching to revolut. Recently, revolut made some steps into that aswell and I’m more than ready to switch again, but it seems like they didn’t pull through with their plans.

    Again - rejecting somethign for moral reasons is never easy or comfortable.

    When the non-hostile options are gone, or reduced to a few crappy ones, the educated consumer is fucked.

    Yes, but that never happens. If there is no good option left, there will be another company filling the gap. Just look at what happened with lego - nobody was bothering creating a competition for them, they were the defacto standard if you wanted … well, lego. However, they because more expensive and worse and suddenly we have blue bricks and cobi, both much cheaper at a higher quality.

    I know people on lemmy don’t want to hear it, but the free market works. It actually works extremely well. The only time when it does NOT work if there’s too much government interference so building a competition is too hard or when there is no choice on the side of the consumer, which is only really the case for crucial things like housing, food, healthcare etc.

    I already wrote it somewhere, but people can’t choose to “not eat”. They can damn well choose to not buy a device from a company that is known to be anti-consumer.



  • Anti-consumer?

    Inventing your own “standard” and forcing everyone to use it (lightning and webkit) and preventing consumers from having their device repaired from anyone else than a “certified technician” at 4x the markup is definitely anti-consumer.

    But in many respects Apple performs better on the consumer front than, say, their primary competitor Google.

    Google pixels are not OEM-locked and I can easiely install graphene or any other operating system on them. In the smartphone category, google is the only good vendor, ironically. I bought a used pixel 6 2 years ago, flashed it with graphene and it’s the best phone I ever had.

    Regulatory actions are an important tool

    Yes, but they’re the last resort. And it should be treated as such. If apple had like 90% of the market share, okay, we can talk about regulations, but right now, apple only has 1/3 of the market, so people can still easiely choose any android device.

    It’s not like the EU is saying “we can ignore starvation and homelessness because at least we cracked down on Apple.”

    I never said that. I said that these are cases where I would support drastic regulatory actions because this is no longer within the rules of supply and demand - people can’t choose to “not eat”. People can damn well choose to not buy an apple device.