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

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

help-circle

  • Realitätsverlust@lemmy.ziptolinuxmemes@lemmy.worldLinux For Life
    link
    fedilink
    English
    arrow-up
    90
    arrow-down
    2
    ·
    7 days ago

    Linux does give every application time to shut down correctly, but unlike windows, it won’t wait for ages until every process is down. Linux WILL shut down in a certain timeframe, whereas windows waits for years if necessary. In my old job, we all had to use windows and I had times where I clicked shut down, turned off my monitor, grabbed my stuff, left and in the next morning, the PC was still on because Notepad refused to just close lmao.


  • 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.



  • Realitätsverlust@lemmy.ziptoTechnology@lemmy.world*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    9 days ago

    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.












  • Not sure where you’re from, but in germany and austria, christians are definitely doing good. Churches here have a lot of support networks for everyone, especially elderly and people in need. In germany, we also have the “diakonie”, a service of the … protestant church? (idk how to translate that properly into english, the opposites of catholics here lmao), which is a major part of elderly care. And in many villages or smaller cities, the churches are open during the night for the homeless to take shelter, if they want to.

    While I’m really not a big fan of religions in general, I feel like it’s unfair to claim that christians don’t do anything for society at large. At least from my european perspective.





  • It is the best one for people that don’t know a lot about linux. Many people are at a loss when they read basic errors like fatal error: <header>.h: No such file or directory or ld: cannot find -l<library>. Flatpak solves a lot of that by specifically including all of it in the installation.

    So ye, for non-power users, flatpak is the best package manager. It also has only one downside, which is the increased storage requirement for apps as they have to bring all of their dependencies themselves, which is okay these days as storage isn’t that expensive anymore.

    And everything is better than fucking snap if we’re honest for a second.