[-] ICastFist@programming.dev 4 points 1 day ago

The movie had an even worse cultural impact

[-] ICastFist@programming.dev 3 points 1 day ago

Very good read. As I'm taking some classes in the neuropsychology of learning, his first part on how knowledge changes you is spot on. Sometimes the change is tiny, sometimes the change is significant, but it is always on you that it happens.

The technopoly, as the author puts it, was a long way coming, first with patents ensuring that the patent owner got the benefits (which often wasn't the actual discoverer) and later with near eternal copyright thanks mainly to Disney. When computer companies managed to make peeking at their code a crime, society as a whole lost.

If you have two economies of equal size and productivity, one has a massive financial sector and billionaires while the other does not, the financialised economy will have less left over to invest in research, education, infrastructure, and healthcare. Over time, it will inevitably fall behind the country with a smaller financial sector because it’s the other things that drive the economy and productivity, not stock market growth.

I can imagine the shareholders going feral, explaining how they create jobs.

Another thing, regarding the USA stranglehold on tech, Brazil was in a very peculiar situation in that regard in the 80s and up to '92. It had a suffocating protectionism, which fully prohibited people from importing computers and videogames, in order to incentivize the local industry. The computer tech was roughly 5 years behind USA and Europe of the time, the first local NES clones were built around '88, if I'm not mistaken. Of course, game cartridges and software diskettes and tapes had to be imported, usually as contraband and often as pirated copies. Come 1992, the recently elected government takes down all the protectionism in a single swoop. It went from full to zero in a day, there was no gradual relief of the protections. The following influx of much, much more advanced computers crashed the local computer economy. We still pirated nearly every software, tho.

[-] ICastFist@programming.dev 12 points 1 day ago

Joe doesn’t have any more money to spend on video games
Companies have no more profit, because people don’t have income, so people can’t spend on their AI produced products

Funny thing, a Scottish fellow named Adam Smith figured that an economy where people don't have money to spend ends up stagnated and/or fucked over. Somewhat ironically, that is the piece that is most often overlooked by today's liberal economists (the kinds that are in favor or less regulation and taxes)

Most rich assholes like the idea of lording over a bunch of dirty peasants, of feeling superior to the unwashed masses, having them offer themselves into slavery out of "free will"

[-] ICastFist@programming.dev 3 points 1 day ago

10 seconds between rounds over the immortal? Easy fucking peasy to solve - let it over him once, stay in place for when you have 10 seconds to pull him out. Check-fucking-mate.

Besides, since the tram will be looping, it'll be very easy to force it to stop somehow, like derailing or putting a concrete block on the track.

Also, if our immortal friend's tissues and bones end up in the rails and the wheels, the chances of the tram failing to move increase with every trip, it might not even make it to loop 100. Also also, if, for whatever reason, one of the tram runs turns the fellow around, such that the chains end up on the track, the bump will derail the thing.

[-] ICastFist@programming.dev 2 points 1 day ago

I wonder how our immortal friend's suffering will go once the Earth has been swallowed by the Sun

[-] ICastFist@programming.dev 5 points 1 day ago

Reminds me of a Veritasium video I saw last week about molecular polymorphism. They spent a good 6 minutes talking about the different forms of crystallization of chocolate and how to solidify it back into form V - the shiny one we usually see after unwrapping it.

[-] ICastFist@programming.dev 2 points 1 day ago

No lollygagging, only ice lollying

[-] ICastFist@programming.dev 2 points 1 day ago

Well, she is some 640-760 times thiccer than the Sun

[-] ICastFist@programming.dev 11 points 2 days ago

The sociopaths want everyone isolated, that's better for control and their business

[-] ICastFist@programming.dev 12 points 2 days ago

I'll take 0,01 if it ensures that the person who dies is a billionaire

[-] ICastFist@programming.dev 65 points 3 days ago

Partially related: I remember some months ago, down here in Brazil, UberEats and iFood drivers were getting restless about the complete lack of any rights when working with the apps - no rest time, no charging stations, low pay, all while being told that you're "being your own boss, working when you want to!". They usually formed whatsapp groups to complain about that.

In an almost inexplicable twist, the majority that wanted more rights also wanted the govt to stay the fuck away and were against a law that was meant to regulate working for apps. Said law included many of the rights they wanted.

36

I know that direct p2p filesharing programs have been mostly superceded by torrents and even ddl, but sometimes I feel like "trying my luck" with stuff I didn't search for directly (behind a VM, because i'm not that adventurous)

25

This is a follow up to my previous post here - https://programming.dev/post/46041021 - For those that want a tldr: I'm making a php site for myself writing nearly everything by hand. The only external library I'm using is Parsedown.

After a good time working on my site, I'm happy to announce that I've officially shared it with my friends^[I won't share it here as the site is tied to a different online persona of mine]! The site isn't really "ready" yet, but it's very usable and readable, so that's good!

As for code quality? Well... It's kinda awful. Instead of this:

class User {
  $login = new String();
  $email = new String();
  ...
}

I'm using named arrays (hashes)^[Kinda funny how associative arrays have soe many different names in other languages: hash, dictionary, map] everywhere:

class User {
  $columns = array( 'login' => '',
  'email' => '',
  ...
}

"But WHY???", you might be asking. Well, to facilitate the creation of the database from zero! Here's an example of my trick:

abstract class Common {
 /**
  a bunch of different, generic select and update functions
*/
}
class Users extends Common{
$cols = array('uid'=> 'primary key auto_increment',
    'vc1_login'=> 'unique not null',
    'vc1_display_name'=> '',
    'vc2_password'=> 'not null',
    'dat_created_at'=> 'not null',
    'bol_enabled'=> 'default 1',
    ...
}

With this, the $key part of the hash doubles as the column name and their default/new values are always the details needed for the creation of their respective columns. I also treat the ::class as part of the table name. With a few functions, I can easily recreate the database from zero, something which I've tested a few times now and can confirm that it works great! Also, with key pairs, making generic SQL functions becomes very easy with foreach() loops of the $cols hash. Example:

abstract class Common {
public function selectColumns($columns, $table = '', $where='1', $orderby = '') {
        $conn = connectDb(); //static function outside class
        if ($table == '') {$table = $this::class;}
        $coll = '';
        foreach ($columns as $cols) {
            $coll .= $cols.', ';
        }
        $coll = substr($coll,0,-2);
        $stmt = $conn->prepare("SELECT ".$coll." FROM `T_".$table."` WHERE ".$where." ".$orderby.";");
        $stmt->execute();
        return $stmt->fetchAll(PDO::FETCH_ASSOC); 
//Fetch_Assoc is used so I'm forced to always use the $key in the returned array
    }

// This function will attempt to update all non-empty pairs of a given object
public function updateColsUid(){
        $conn = conectaBanco();
        $sql = "UPDATE `T_".$this::class."` SET ";
        $keys = array('uid' => $this->cols['uid']);
        foreach ($this->cols as $key => $value) {
            if (($value != '') and ($key != 'uid')) {
                $sql .= " `". $key. "` = :" . $key . " ,";
                $keys[$key] = $value;
            }
        }
        $sql = substr($sql,0,-1);
        $sql .= " WHERE `uid` = :uid;";
        $stmt = $conn->prepare($sql);
        $stmt->execute($keys);
        return $stmt->rowCount();
    }

The biggest problem with this is that if I ever remove, add or rename any of these $keys, it'll be a fucking chore to update code that references it. I'll look into using proper variables for each column in the future, especially as a database creation is something you usually only do once. On the plus side, this is the most portable php site I've ever did (1 out of 1, but whatever)

Anyway, current functionality includes creating an account, modifying some aspects^[I want to note that there was a bunch of validation that I initially didn't think of doing, but luckily had a couple of "Wait, what if..." moments. One of those was to properly escape a user's username and display name, otherwise, when echo'ing it, <b>Bob</b> would show as Bob. While the fields probably wouldn't be enough to fit anything malicious (fitting something malicious inside a varchar100 would be a real feat, ngl), it's better to close this potential hole.] of it (profile description, display name (which is html escaped, so no funny business here), signature), logging in, letting the admin make new posts, letting anyone logged in comment on existing posts, comment moderation.

I also keep track of every page visitors are going to, saving these to the database (user agent, IP, page visited) - this will be the table that will fill up faster than any other, but might also allow me to catch eventual bots that ignore robots.txt - supposing I can figure them out.

Initially, I was planning on having each post select from a list of existing categories (category N -> N posts), but after some thought, decided against that and came up with a working alternative. Posts now have a single column where categories are manually written in, separated by commas. I later retrieve them with select distinct, explode() the string into an array and finally remove duplicates with array_unique(), making it easy for visitors, and for me, to get all the unique and valid categories.

One thing I'm doing that I'm not sure whether it's good, neutral or bad design/architecture, is using the same site that has the form to also validate/insert data, as in: instead of having newpost.php and validate_and_insert_post.php files doing separate jobs, my newpost.php is the page has the form and also receives the form in order to validate and insert into the database.

The whole thing's currently sitting at 220kb, unzipped, counting the leftover files that I'm no longer using. The fact that I can deploy this literally anywhere with a working php 8+ server without typing any terminal commands makes me very happy.

89
62
How to ask for a raise (programming.dev)
24
"A good word" (programming.dev)
219
"A good word" (programming.dev)
28

cross-posted from: https://programming.dev/post/47341163

Remember Win Elvis-n-Space? Or Lemmings Paintball? Or even Odyssey Legend of Nemesis?

Found this little gem of a site recently. Unfortunately, it hasn't been updated in a while (last blog post is from Sep 2025)

78

Remember Win Elvis-n-Space? Or Lemmings Paintball? Or even Odyssey Legend of Nemesis?

Found this little gem of a site recently. Unfortunately, it hasn't been updated in a while (last blog post is from Sep 2025)

56

Don't invite the math nerds here, they'll count the actual time since

1

cross-posted from: https://programming.dev/post/46365352

Podcast longo, quase 2 horas, de Atila Lamarino com João Magalhães, falando sobre o "colonialismo dos dados", como as big techs estão dominando o mundo. A intro é bem longa, pra contextualizar bem o podcast pra quem tá mais por fora das notícias de tecnologia.

Uma das frases soltas que achei muito interessante, "No ano de nosso senhor 2025, eu preciso estudar a Companhia das Índias Orientais pra entender como as big techs hoje estão funcionando"

Outra coisa interessante que conversam é como Whatsapp virou, efetivamente, parte da infraestrutura de comunicação do Brasil, e por isso é praticamente impossível conseguir colocar qualquer alternativa no lugar.

1

Podcast longo, quase 2 horas, de Atila Lamarino com João Magalhães, falando sobre o "colonialismo dos dados", como as big techs estão dominando o mundo. A intro é bem longa, pra contextualizar bem o podcast pra quem tá mais por fora das notícias de tecnologia.

Uma das frases soltas que achei muito interessante, "No ano de nosso senhor 2025, eu preciso estudar a Companhia das Índias Orientais pra entender como as big techs hoje estão funcionando"

Outra coisa interessante que conversam é como Whatsapp virou, efetivamente, parte da infraestrutura de comunicação do Brasil, e por isso é praticamente impossível conseguir colocar qualquer alternativa no lugar.

309
Call center's final boss (programming.dev)
view more: ‹ prev next ›

ICastFist

joined 2 years ago