programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

cupcakezealot, in every damn time ...
@cupcakezealot@lemmy.blahaj.zone avatar

that’s specifically why i don’t trust them

rimjob_rainer, (edited ) in The Perfect Solution

yes of no

Not even valid json but compiler doesn’t complain

GBU_28,

What json

pennomi,

Not sure what you mean, there’s no json in this code, it’s all valid (if a little ugly) Python.

rimjob_rainer,

So what does the f do?

jalda,

It is a f-string

rimjob_rainer,

Python is crazy

NikkiDimes,

Looks pretty much the same as a template string in Javascript, an arguably crazier language.

M500, in Every goddamn time

Maybe we took it out of context, maybe they mean that they are logged into their own computer 😂

THE_ANON, (edited )

No didnt you see the black and green text and a big acess granted display they hacked everyone even people without computers.

funkless_eck,

I’m the guy who designs those. They pay me the big bucks to make sure a hacker feels at home when violating our Gibson, after all. We’re one big family here.

rimu, in Revisiting code I wrote last year
@rimu@piefed.social avatar

Writing really good comments is an under-appreciated skill.

lurch,

Even though comments are very helpful, often it’s even enough to name variables and methods/functions really good. At least do that. You don’t want i, j and value. Believe me. You want rowCount, colCount and deliveryOption instead. You just may not know it now, but you will, when it has to be changed in a few months.

aksdb,

Where comments are useful most is in explaining why the implementation is as it is. Otherwise smart ass (your future self) will come along, rewrite it just to realize there was indeed a reason for the former implementation.

loutr,
@loutr@sh.itjust.works avatar

Comments are good when you’re doing something weird to handle an edge case or something. But yeah most of the time clear variable names, and extracting complicated code to a dedicated and clearly named function, are enough.

There are only two hard things in Computer Science: cache invalidation and naming things.

Phil Karlton

Akrenion, in It's that time of the year again!

Can anyone recommend a cheap receipt printer that takes pictures from a pc or phone? I want to print mtg tokens on the fly.

meliaesc,

Pencil

halcyondays,

deleted_by_author

  • Loading...
  • jasondj,

    Weird that we never consider that for retail workers though…

    jasondj,

    Gameboy Pocket. Gameboy Camera. Gameboy Printer.

    Both the perfect balance of “nostalgia” and “ridiculous”.

    r00ty, in Need a rust version too.
    @r00ty@kbin.life avatar

    C# is about right. LINQ was meant to make things easier, or at least the code easier to read. Instead, you gain this addiction to seeing how much functional logic you can fit into one line of code (or a single multi-line query) while still remaining readable.

    Curdie,

    I feel personally attacked.

    frobeniusnorm, in Not mocking cobol devs but yall are severely underpaid for keeping fintech alive

    I swear to god, companies are nowadays just picking the solution with the most buzzwords. Any compiler engineering student knows how to write a transpiler from one language to another, while getting this right is a cumbersome task, it still completly automated afterwards. Just hire a few compiler engineering phds and the job is done in at least half a year.

    Look what i found after a quick google search:

    yggdar,

    You want to translate COBOL to another language? That exists as a commercial product! The complexity is not the syntax though, it is the environment and subsystems surrounding the code. A lot of COBOL is designed for mainframe systems, and emulating a mainframe is complex.

    You also end up with code that is still written as if it were COBOL. The syntax for COBOL is the easy part and that is all you can easily replace. Afterwards you’re still stuck with the way of working and mindset, both of which are quite peculiar.

    The company I work for recently looked at all of this, and we decided not to translate our code.

    BestBouclettes,

    Also, isn’t COBOL extremely fast ? Which is not necessarily true for newer languages

    ignotum,

    Rust: am i a joke to you?

    Hawk,

    I think that’s mostly because of the systems COBOL usually runs on, not so much because of the language

    CanadaPlus,

    You’re probably thinking of Fortran, which is still used for hardcore number crunching in areas like physics.

    jaybone, (edited )

    Just make the devs learn the language if they don’t know it already. What kind of shitty mid to senior dev can’t learn a new language in a reasonable amount of time.

    abraxas, (edited )

    I think it’s a matter of expertise. I am stuck dealing with people who write Javascript/Typescript like it’s C# because they’re C# senior devs. It’s not world-ending until issues of speed, scale, or other “why we use best practices” raise their ugly heads. Then it is world-ending. I can only help with so many design standards when you still see everything show up in a classes-and-subclasses mindset with hard-to-catch concurrency bugs. I actually caught a developer trying to spin up a child process to wait on a socket response.

    So in FinTech, I can imagine it becomes a bigger deal faster.

    driving_crooner, in Programmer tries to explain binary search to the police
    @driving_crooner@lemmy.eco.br avatar

    I used to do this when having problems while rendering video in my past life.

    calabast, in I'll just be a quick 3h

    Somebody tell this dude about views.

    hddsx,

    So my work is archaic and doesn’t even use SQL. What are views?

    Restaldt, (edited )

    Predefined queries that you can interact with like another table more or less

    calabast, (edited )

    A view is a saved query that pretends it’s a table. It doesn’t actually store any data. So if you need to query 10 different tables, joining them together and filtering the results specific ways, a view would just be that saved query, so instead of “SELECT * FROM (a big mess of tables)” you can do “SELECT * FROM HandyView”

    doctordevice, (edited )

    Basically scripts you can run on the fly to pull calculated data. You can (mostly) treat them like tables themselves if you create them on the server.

    So if you have repeat requests, you can save the view with maybe some broader parameters and then just SELECT * FROM [View_Schema].[My_View] WHERE [Year] = 2023 or whatever.

    It can really slow things down if your views start calling other views in since they’re not actually tables. If you’ve got a view that you find you want to be calling in a lot of other views, you can try to extract as much of it as you can that isn’t updated live into a calculated table that’s updated by a stored procedure. Then set the stored procedure to run at a frequency that best captures the changes (usually daily). It can make a huge difference in runtime at the cost of storage space.

    dan, (edited )
    @dan@upvote.au avatar

    It can really slow things down if your views start calling other views in since they’re not actually tables

    They can be in some cases! There’s a type of view called an “indexed” or “materialized” view where the view data is stored on disk like a regular table. It’s automatically recomputed whenever the source tables change. Doesn’t work well for tables that are very frequently updated, though.

    Having said that, if you’re doing a lot of data aggregation (especially if it’s a sproc that runs daily), you’d probably want to set up a separate OLAP database so that large analytical queries don’t slow down transactional queries. With open-source technologies, this is usually using Hive and Presto or Spark combined with Apache Airflow.

    Also, if you have data that’s usually aggregated by column, then a column-based database like Clickhouse is usually way faster than a regular row-based database. These store data per-column rather than per-row, so aggregating one column across millions or even billions of rows (eg average page load time for all hits ever recorded) is fast.

    Gallardo994,

    If they existed for tons of random usecases. When was the last time you created views for “just in case someone asks” situations?

    JackGreenEarth, in Why pay for an OpenAI subscription?

    What is the Watsonville chat team?

    Spiralvortexisalie,

    A Chevy dealership in Watsonville, California placed an Ai chat bot on their website. A few people began to play with its responses, including making a sales offer of a dollar on a new vehicle source: …slashdot.org/…/car-buyer-hilariously-tricks-chev…

    Liz,

    It is my opinion that a company with uses a generative or analytical AI must be held legally responsible for its output.

    Pika, (edited )

    I think this vastly depends on if there’s malicious intent involved with it, and I mean this on both sides. in the case of what was posted they manipulated the program outside of its normal operating parameters to list a quote for the vehicle. Even if they had stated this AI platform was able to do quotes which for my understanding the explicitly stated it’s not allowed to do, the seller could argue that there is a unilateral mistake involved that the other side of the party knew about and which was not given to the seller or there is very clear fraudulent activity on the buyers side both of which would give the seller the ability to void the contract.

    In the case of no buy side manipulation it gets more difficult, but it could be argued that if the price was clearly wrong, the buyer should have known that fact and was being malicious in intent so the seller can withdraw

    Of course this is all with the understanding that the program somehow meets the capacity to enter a legally binding agreement of course

    also fun fact, Walmart had this happen with their analytical program five or so years ago, and they listed the Roku streaming stick for ~50 less so instead of it being $60 it was listed as 12, all the stores got flooded with online orders for Roku devices because that’s a damn good deal however they got a disclaimer not soon after that any that came in at that price point were to be Auto canceled, which is allowed by the sites TOS

    Liz,

    In my opinion, we shouldn’t waste time in the courts arguing over whether a claim or offer made by an algorithm is considered reasonable or not. If you want to blindly rely on the technology, you have to be responsible for its output. Keep it simple and let the corporations (and the people making agreements with a chatbot) shoulder the risk and responsibility.

    cm0002,

    company

    must be held legally responsible

    “Lol” said the US legal system, “LMAO”

    db2,

    Dollar store Skynet.

    gaifux,

    It appears to be a team of software engineers moonlighting as a tech support team for a Chevy dealership. Checks out to me

    flameguy21, (edited ) in Programming: The Horror Game

    This should be considered a war crime

    AnActOfCreation, (edited ) in Fitbit Clock Face
    @AnActOfCreation@programming.dev avatar
    Cwilliams, in Fitbit Clock Face

    If only fitness apis were actually that easy

    kemsat, in You can have anything you wan...

    I woulda said Dr Manhattan powers.

    edryd,

    I think you might need to reread watchmen then

    kemsat,

    I only watched the movie & the show.

    hakunawazo,

    A blue penis?

    kemsat,

    Among other things.

    GiantRobotTRex,

    Blue testicles?

    kemsat,

    More.

    MaggiWuerze,

    Don’t forget total apathy for all human concerns

    kemsat,

    I mean, that’s definitely a goal, and if we keep progressing technologically, it’ll happen anyway. Might as well be a god for it.

    hakunawazo,

    He might be a good politician then.

    rockSlayer, in Rust project startup kit

    It’s just the natural progression of things

    unrelatedkeg,

    I mean you’re not wrong, but it kind of skips a lot of in-between steps.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programmer_humor@programming.dev
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #