No relation to the sports channel.

  • 0 Posts
  • 43 Comments
Joined 2 years ago
cake
Cake day: June 9th, 2023

help-circle

  • Rust does memory-safety in the most manual way possible, by requiring the programmer prove to the compiler that the code is memory-safe. This allows memory-safety with no runtime overhead, but makes the language comparatively difficult to learn and use.

    Garbage-collected compiled languages — including Java, Go, Kotlin, Haskell, or Common Lisp — can provide memory-safety while putting the extra work on the runtime rather than on the programmer. This can impose a small performance penalty but typically makes for a language that’s much easier on the programmer.

    And, of course, in many cases the raw performance of a native-code compiled language is not necessary, and a bytecode interpreter like Python is just fine.


  • Some other ways:

    Cultivate bitterness.

    Find the pessimists in your organization, and disappoint them.

    Make mean cynicism a part of your workplace culture. Do this by example: Promote mean cynics and put them in charge of things. But do it also by conversion: Behave in a way that makes mean cynics’ view of the world correct.

    Reward bad personal habits to create internal conflicts between work and health.

    If someone skips sleep to finish a project, give them a bonus. This gives them an internal conflict between approval and health, and teaches them that they can sacrifice their health to receive a reward.

    Encourage a hard-drinking culture in teams that have stressful roles that demand team cohesion, like SRE or Ops teams with on-call requirements. This gives them an internal conflict between their support network and health.

    If someone is sick, injured, bereaved, or otherwise suffering: Make it clear how much their condition is inconvenient to their coworkers, and how much their projects are impacted by their absence. Assure them that all will be well once they can conclude their personal problems and commit to the team. Do not, however, offer them any specific help; if they express specific needs for accommodation, disregard them as idle and unrealistic wishes.



  • Difficult concepts are made of simple parts. Find the parts. Find ways to play with them.

    Example: TCP/IP performance is complicated, but you can look at specific parts of it like packet latency, retransmission behavior, and the various timeouts. Eventually you understand the “gears” of the system well enough that it’s obvious that if the minimum retransmission timeout is 100msec, that a single packet loss means your whole transaction cannot possibly have <100msec latency.




  • One alternative to both raw SQL and and ORM is a query builder, a procedural library for constructing database queries. Query builders typically don’t have the object/relational “impedance mismatch” of ORMs; they don’t encourage you to pretend that records in the database are the same as objects in your code. But they give you a syntax that looks more like your programming language, and automatically handles escaping (and thus, resistance to injection attacks).

    However, query builders often don’t expose all the power of your database. If you’re using PostgreSQL, you’ve got one hell of a powerful set of tools in there. It’s often worth spending the time to master them just so you don’t end up reinventing the stone-age wheel on top of a warp-speed hovercraft.







  • What worries me is that neither version handles any errors whatsoever.

    What happens if the oven never gets hot, because the gas interface has been brought down for maintenance? Now we’ve allocated a raw pizza that will never be baked. Since we never time out or check errors here, eventually the customer will time out waiting for a pizza and switch to our competitor.

    Are we really allocating a new oven for each pizza? Probably not; oven may be a singleton. In one case, it’s possible for the oven to fill up with pizzas and oven.Insert to fail; in the other case, it’s possible for the kitchen to fill up with ovens, and oven.New to fail. Lacking error checking, we’re eventually going to get one or another kind of oven overflow.

    What happens if order.kind is “fuck you”? We don’t put any toppings on the pizza; but (in code not shown) the value of order.kind probably still gets printed on the receipt. So some poor schmuck gets delivered a none pizza with fuck you. Like so many other Internet services, our pizza service can be exploited for harassment.



  • Well yeah, but you don’t solve that by layering more complexity on top of it. If you can’t yet release your code onto five servers without breaking the world for all users, you’re not yet into a place where you need fifteen microservices. Google didn’t have Kubernetes or Borg when they started out either; they had servers held together with Lego blocks because that’s what they happened to have.


  • Microservices are great if you have enough traffic that you can get an efficiency gain by independently scaling all those services. But if you aren’t deploying onto thousands of servers just to handle traffic volume, you probably don’t need 'em.

    Your startup that has no users yet does not need the kind of architecture that Google uses, because your startup doesn’t have the scaling problems that Google has.




  • fubo@lemmy.worldtoProgramming@programming.dev*Permanently Deleted*
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    1 year ago

    You seemed to be offering a complicated explanation of why “NSFW” is just fine and my objections to it are dopey.

    But it’s not just fine. It doesn’t even do what it supposedly promises to do, namely mark things that someone would get in trouble with their employer for having up on their screen at work.

    Because “NSFW” is used to mean “porn, and maybe gore” it doesn’t even succeed at marking other things that are not, y’know, safe for work.

    And it’s still not a great idea to use “some generic (but probably American) employer’s standards” as part of the core rules for social interaction online.