• 0 Posts
  • 561 Comments
Joined 1 year ago
cake
Cake day: April 3rd, 2024

help-circle
  • Honestly, I’m still very much in the “classes define what a tag represents, CSS defines how it looks” camp. While the old semantic web was never truly feasible, assigning semantic meaning to a page’s structure very much is. A well-designed layout won’t create too much trouble and allows for fairly easy consistency without constant repetition.

    Inline styles are essentially tag soup. They work like a print designer thinks: This element has a margin on the right. Why does it have that margin? Who cares, I just want a margin here. That’s acceptable if all you build are one-off pages but requires manual bookkeeping for sitewide consistency. It also bloats pages and while I’m aware that modern web design assumes unmetered connections with infinite bandwidth and mobile devices with infinitely big batteries, I’m oldschool enough to consider it rude to waste the user’s resources like that. I also consider it hard to maintain so I’d only use it for throwaway pages that never need to be maintained.

    CSS frameworks are like inline styles but with the styles moved to classes and with some default styling provided. They’re not comically bad like inline styles but still not great. A class like gap-2 still carries no structural meaning, still doesn’t create a reusable component, and barely saves any bandwidth over inline CSS since it’s usually accompanied by several other classes. At least some frameworks can strip out unused framework code to help with the latter.

    I don’t use SCSS much (most of its best functionality being covered by vanilla CSS these days) but it might actually be useful to bridge the gap between semantically useful CSS classes and prefabricated framework styles: Just fill your semantic classes entirely with @include statements. And even SCSS won’t be needed once native mixins are finished and reach mainstream adoption.

    Note: All of this assumes static pages. JS-driven animations will usually need inline styles, of course.





  • It’s the basic idea behind ordoliberalism – companies get free reign until their actions start harming the common good, at which point the government imposes fair rules to even the playing field. It’s… reasonably functional as far as political theories go. Still wildly suboptimal, though, and not long-term stable against the influence of hyper-wealthy entities.







  • “Legally required”, so they’re seeing it in the local laws. Some countries require websites to disclose who operates them.

    For example, in Germany, websites are subject to the DDG (Digitale-Dienste-Gesetz, “digital services law”). Under this law they are subject to the same disclosure requirements as print media. At a minimum, this includes the full name, address, and email address. Websites updated operated by companies or for certain purposes can need much more stuff in there.

    Your website must have a complete imprint that can easily and obviously be reached from any part of the website and is explicitly called “imprint”.

    These rules are meaningless to someone hosting a website in Kenya, Australia, or Canada. But if you run a website in Germany you’d better familiarize yourself with them.




  • I work for a publicly traded company.

    We couldn’t switch away from Microsoft if we wanted to because integrating everything with Azure and O365 is the cheapest solution in the short term, ergo has the best quarterly ROI.

    I don’t think the shareholders give a rat’s ass about data sovereignty if it means a lower profit forecast. It’d take legislative action for us to move away from an all-Azure stack.

    And yes, that sucks big time. If Microsoft stops playing nice with the EU we’re going to have to pivot most of our tech stack on a moment’s notice.


  • It’s not terribly exciting but I find myself using this a lot:

    #!/bin/sh
    
    echo "$*" | sed -e "s/x/*/g" | bc -l
    

    Just a little shorthand for bc that allows me to write “x” instead of “*” to avoid shell expansion nonsense. I put it in ~/.local/bin/= so I can e.g. just write = 17+4x5. Combined with a Quake-style terminal this is much faster than launching a calculator app. It’s a script instead of an alias so it works regardless of the shell I’m currently using.

    The call to bc -l could be replaced with one to qalc -t if you know qalc to be present on the system .





  • Jesus_666@lemmy.worldtoCyanide & Happiness@discuss.online2017-12-11
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    10 days ago

    My brother decided that Bitcoin was likely to steadily increase in value (in the long term) and spent about a thousand bucks to buy three of 'em. Then he got hit with some surprise money trouble and had to liquidate, losing about a third of his investment.

    He was not amused when BTC became an investment hype.