There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

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

Malix , in Gamedev is Easy
@Malix@sopuli.xyz avatar

c’mon man, you forgot to call .EnableUltraWideSupport()

Daxtron2 ,

The tech just isn’t there yet to support an extra line 😔

mcforest ,

Naah, gamedevs hate us more than they love money :(

SubArcticTundra ,
@SubArcticTundra@lemmy.ml avatar

I’m pretty sure the Aspect Ratio of the Year is 4:3

Scoopta ,
@Scoopta@programming.dev avatar

Where’s the .EnableUltraUltraWideSupport(). Gotta have my 48:9 aspect ratio

Scoopta ,
@Scoopta@programming.dev avatar

Where’s the .EnableUltraUltraWideSupport(). Gotta have my 48:9 aspect ratio

Ephera , in Sometimes I want to call malloc, just as a treat

Nevermind using such frivolous things as a file system.

bus_factor ,

Using a file system is much less bad than dynamically allocating memory, at least as long as you keep a predefined set of files.

troyunrau ,
@troyunrau@lemmy.ca avatar

I hate to alarm you but… What is a file system except dynamically allocated memory. ;)

Redkey ,

It’s a persistent dynamic memory allocation that’s accessed by multiple processes! :)

bort , (edited )
noli ,

FreeRTOS tasks are basically processes, IIRC other rtoses have similar mechanics too

owenfromcanada ,
@owenfromcanada@lemmy.world avatar

If you want to get really freaky, try accessing the same flash or RAM from multiple instances of FreeRTOS running on a hypervisor.

noli ,

Is that just like the shared memory model of parallel computing or are there any added complications? Have you done this before? Please do share your experiences if so cause now I’m interested :p

owenfromcanada ,
@owenfromcanada@lemmy.world avatar

It’s similar, but the general idea of a hypervisor is to separate resources and avoid this exact situation (it’s nuanced and there are some exceptions, but that’s the general use case).

The added complication would be that when you compile a binary for one virtual machine, the compiler may optimize things, blissfully unaware that there are other players possibly affecting memory. In a typical multithreaded environment, the compiler has a better picture of how shared resources are being used across threads, but that has to be declared manually for a hypervisor. So if you configure your hypervisor to share resources, you have to be even more vigilant in configuring the individual compilers to play nice.

I don’t have a ton of experience with embedded hypervisors, though. And it’s worth noting that there are lots of “hypervisors” out there, and some work very differently from others.

frezik ,

Lots of microcontrollers have multiple cores now.

sunbeam60 ,

And indeed, with memory mapped files the distinction almost disappears completely.

kevincox ,
@kevincox@lemmy.ml avatar

a predefined set of files

…with predefined sizes located in predefined regions of storage.

bus_factor ,

Yeah, that’s what I was implying, just didn’t want to write a whole novel about it.

agissilver , in Why pay for an OpenAI subscription?

Yellow background + white text = why?!

PanArab ,

Branding

idunnololz , in The temptation is always there
@idunnololz@lemmy.world avatar

Just create a global object and stuff your variable in there. Now you have a global singleton and that’s not a purely bad practice :D

HurgletOfficial ,

I do this all the time in Python by creating a class like


<span style="font-weight:bold;color:#a71d5d;">class </span><span style="color:#0086b3;">Core</span><span style="color:#323232;">:
</span><span style="color:#323232;">    foo </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#183691;">"bar"
</span>
ryannathans ,

That’s not immutable nor a singleton

xmunk ,

That makes it inherently multithread compatible!

magic_lobster_party ,

Not necessarily a bad practice if the singleton is immutable, and it’s provided via dependency injection for example.

wreckedcarzz ,
@wreckedcarzz@lemmy.world avatar

As a hobby coder: “mmmhm, mmmm, mmhm… I know some of these words!”

SkyNTP ,

Software dev is full of obscure keywords that describe otherwise pretty simple or basic concepts you stumble upon in practice naturally and that you probably already understand.

  • singleton: a class/object that is designed to be single use, i.e. only ever instantiated with a single instance. Typically used when you use class/objects more for flow control or to represent the state of the program itself, rather than using it to represent data
  • immutable: read-only, i.e. unchangeable
  • dependency injection: basically when you pass a function or object into another function object, thereby extending their effective functionality, typically for modular code and to separate concerns.

Here’s one more of my favourite examples of such a keyword: memoization

Solemarc ,

Ahh yes memoization, the complicated way to say “remember this, I might need it again”

Anonymousllama ,

Important to contain all your mess to one side of the room, makes it easier to manage

shotgun_crab ,

Yeah yeah let’s put all the eggs in one basket

xmunk ,

Real enterprise programmers know that everything should be on the stack… so they declare a List《void*》 in main.

idunnololz ,
@idunnololz@lemmy.world avatar

But we might need to add more features in the future so it might not just be a list in a few years. Better encapsulate it in a few layers of abstractions just to be safe.

manapropos ,

Real enterprise programmers know you can get another job in the next year or two so fuck best practice

z3rOR0ne ,

Ah yes. Global Objects, AKA the thinnest of condoms, lol.

Techmaster ,

Just call it “state management” and nobody will even care.

mdk_ ,

So you saying, just the tip?

Granixo , (edited ) in ಠ_ಠ
@Granixo@feddit.cl avatar

Did you actually watch Terminator 2?

John Connor (from the future) re-programmed the T-800 to protect his past self.

And his past self befriended the T-800.

The problem isn’t the AI.

If AI does go rouge, it is because it was either poorly designed, or we have failed as a species.

FaceDeer ,
@FaceDeer@kbin.social avatar

Also, the Sarah Connor Chronicles seemed to be moving in the direction of preventing Judgement Day by befriending Skynet when it gained consciousness rather than trying to destroy it. Alas, the series got cancelled before its time.

CanadaPlus ,

Wow, that’s so creative.

So obviously they had to cancel it. /s

computertoucher5000 ,

Fox Television Studios not cancelling a show right as it starts to get good challenge.

CanadaPlus ,

Impossible!

JoMiran , (edited )
@JoMiran@lemmy.ml avatar

There are A LOT of people training AI with faulty models that are learning from heavily biased data sets. Never underestimate humans’ ability to fuck shit up. For every genius that makes a technical breakthrough, there are thousands of morons ready to misuse it or break it.

Granixo , (edited )
@Granixo@feddit.cl avatar

“For every person who dreams up the lightbulb, there’s the one who dreams the atom bomb”

https://feddit.cl/pictrs/image/6db272d9-ecbb-49d3-adff-8af417b9052c.png

  • Mr. Electric, 2005.
Hyperreality ,

If AI does go rouge, is because it was either poorly designed, or we have failed as a species.

I don't think AI is at risk of going communist any time soon.

It may go rogue though.

JoeBigelow ,
@JoeBigelow@lemmy.ca avatar

My favorite film, Moulin Rogue, is often misunderstood.

WhiskyTangoFoxtrot ,

The Windmills have gone rogue! Don Quixote was right all along!

Syrc ,

I don’t think AI is at risk of going communist any time soon.

Well, it has no concept of capital, “takes” stuff without paying and makes free stuff for everyone without discrimination.

The companies making them might be capitalistic, but AI in a vacuum seems pretty communist to me.

Khalic ,

Oh my favorite typo ever, you can never go wrong with a little rouge

gullible ,
girl ,

you are now a mod at blahaj

scottywh ,

Is it still a “typo” if the person just doesn’t know how to spell the word?

z500 ,
@z500@lemmy.world avatar

I’m loosing my mind here.

oatscoop ,

Irregardless, it’s the same difference even if its spelled wrongly. I for one could care less, so it’s a mute point per say.

countflacula ,

oh you almost got me! all those word crimes.

scottywh ,

🤮🤢

tsonfeir ,
@tsonfeir@lemm.ee avatar

Ladies pinch, whores use rouge.

magic_lobster_party ,

In Terminator Genisys he even made a skynet app to control the world, but that movie didn’t happen

rbhfd ,

If AI does go rouge

Dall-e generated image of Arnold Schwarzenegger getting make-up put on

(Non-ironically created by Dall-e)

Granixo ,
@Granixo@feddit.cl avatar

I said Rouge not Vouge 😆💅

KoboldCoterie , in Apple donation
@KoboldCoterie@pawb.social avatar

Bold of you to assume it was $24 and not $5.

nukul4r , in They did not reply.

Take me down to PropertyCity

proctonaut , (edited )

Where the grass is green and the rates are shitty?

Oh won’t you please sell my home?

cupcakezealot ,
@cupcakezealot@lemmy.blahaj.zone avatar

hedgetrimmers and roses

proctonaut ,

Led by none other than Axl Rosebush

ripcord ,
@ripcord@lemmy.world avatar

Yeah yeah

MystikIncarnate , in What it's like to be a developer in 2024

It makes me sad because Google used to be great. The main feature that made Google great was the click rejection. Basically the search would know when you clicked on a link and didn’t come back to the search results. This action would add weight to that result as “this probably has the information that was being searched for” so it would be nearer to the top later when others made similar queries.

This was their killer feature, it basically crowd sourced the correct information. After a small amount of time, the correct results would kind of float to the top so subsequent searches would put those results near the top to help satisfy queries faster.

Now? They seem to want to give you results that satisfy their partners, and keep you tied to the results page as long as possible. The focus seems to have shifted from being a good search engine with accurate results, to a meme of how to make money.

Never before has this shift been more clear to me than right now, directly in the wake of I/O 2024; an event my friends have taken to calling AI/O. Pretty much every single presentation was about Gemini and AI generated garbage, but this isn’t what made Google’s new direction clear to me. In the last 20-30 minutes of the event it was made perfectly clear what they were doing with I/O. And to drive the point home, every I/O has showcased stuff you can’t use yet, stuff they’re working on, and other cool shit. Some of it cost money, but there was usually some stuff that was just done because it could be done and it would be made available at some point, a nontrivial amount of it was free. At AI/O, the entire focus was on AI, with little to no non-AI stuff in there, at all, then at the end, they kicked everyone in the shorts. Here’s our prices to access this shit. Buy it. As far as I’m concerned AI/O was a gigantic marketing circle jerk to sell their AI.

It seems that Google has entered the final phases of enshittification.

boonhet ,

Saw an article that said that some execs demanded for search to have better user retention. I.e make the user search multiple times to find what they’re looking for, so they can be shown more ads.

Asafum ,

I can’t wait for this to spread to unrelated areas!

Supermarkets maximizing profit: put ads everywhere and hide the most commonly bought foods!

Gas stations maximizing profits: unskippable ads on all pumps, plus the pump stops halfway to make you watch another ad.

Dating apps: oh… They already killed themselves. Swipe swipe swipe swipe. Hide messages. Hide likes. Reduse exposure to profile unless paid member.

I hate this future.

brisk , (edited )

Just in case you’re not just satirically listing things that are already awful;

Supermarkets increase their “retention” by limiting signage to keep you wandering and avoid “just get that thing and go” shopping. I don’t know how common this is, but when I was a kid the major supermarkets had long lists of what items were in each aisle, plus highly visible signs in the aisle to show exactly where each category was. Now days at the major chains those in aisle signs are completely gone, and the categories have been whittled down to a few major categories; most products aren’t represented on the sign at all e.g. you have to assume “cake mix/decorating” are in the same aisle as “flour”.

Unskippable ads on all pumps are absolutely a thing that are getting more popular. Mobil is particularly bad for it in my experience.

godzilla_lives ,

The square button second from the bottom mutes the audio. I’ve taken to carrying a marker in my car and writing “<— MUTE” next to them. Alternatively, a small screwdriver between the speaker grating.

brisk ,

The ones near me don’t have buttons of any kind

dan ,
@dan@upvote.au avatar

Unskippable ads on all pumps are absolutely a thing that are getting more popular

I never see these in my area… Maybe only some places have them?

jjjalljs ,

It’s frustrating because it’s all done by people. Like if a volcano erupts you can’t really get mad at it. It’s just physics stuff. But all of this? People are making these choices. People made of meat and bone. Like, you could find the decision makers at Google who decided to shit up their product and kick them in the junk.

nephs ,

What if peoples relationships create a superstructure no single human can control, and we need active collective effort to supercede it?

If a single human refuses from a moral standpoint, a humongous amount of money to do something crap as CEO controller of whichever crap company, boards will replace them, and some other human will, because material condition dictate it has to be done. No one is really in control. The boards are all just optimising for profit, because if they’re not, someone else will.

How to break the capitalist cycle of control over peoples will?

jjjalljs ,

In real life? I’m not sure. Years of struggle to change government to enforce regulations, break up consolidation of power, blah blah blah.

In a like ttrpg or movie? Murder. Murder the board and other management and anyone they replace until the greed stops.

Miaou ,

Supermarkets already optimise many things, products with lower margins are at the bottom in aisles, and all the junk food or cheap liquor is next to the cashier.

Also, ever been to IKEA? That thing’s a labyrinth

Sigh_Bafanada ,
hglman ,

It’s a path but, also its always been like that. Also there is a supermarket with the same idea, HEB center market.

dan ,
@dan@upvote.au avatar

Supermarkets maximizing profit: put ads everywhere and hide the most commonly bought foods!

Many supermarkets already do things like putting the milk and bread at opposite sides of the store, so you have to walk through the whole store to get both. You’d often be walking past the end caps while doing so, which are essentially ads (companies pay to have their products displayed at the end caps)

Couldbealeotard ,
@Couldbealeotard@lemmy.world avatar

To be fair, milk at the back of the store is better to keep the milk cold from getting out of the truck and into the fridge.

MystikIncarnate ,

Would this be the inverse of SEO?

rowrowrowyourboat ,
Hammerheart ,

“alright, we need to make our service worse to satisfy our real customers”

grandma ,

This is possibly something you could implement in a meta search engine like SearXNG, though there are some privacy concerns.

Maybe it could locally store which domains you personally tend to click (and stay) on. Then automatically raise those domains when it sees them somewhere in the output of the underlying engines. This isn’t perfect because you wouldn’t get data from other users. But I think it could do a lot to improve search results.

I might actually clone the repo and see if I can get somewhere soon

MystikIncarnate ,

I’d be interested if you can get anywhere.

The thing with Google was that the data about click through vs click back was supposed to be anonymised. Whether it was or not, inside of the black box that is Google’s algorithm, who knows?

Either way, I’d be interested if you get any progress here. I’ve never tried to self host a search engine, but I might consider it.

Ultraviolet ,

I remember how people used to joke about the second page of Google results being a desolate wasteland where no one ever looks, now I just instinctively scroll down a bit because I know the first page of results is going to be trash.

nucleative ,

Because after taking a quick look at that first or second page, I don’t even go back. I just head to another search engine 😅

xmunk , in Some of my iterations are delightfully recursive

Hell yeah, brother. Functional programmers rise up.

BatrickPateman ,

As long as you do it without side effects…

wewbull ,

<span style="color:#323232;">    total_armageddon </span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> launch_nuclear_missile </span><span style="font-weight:bold;color:#a71d5d;"><$></span><span style="color:#323232;"> [</span><span style="color:#0086b3;">1</span><span style="font-weight:bold;color:#a71d5d;">...</span><span style="color:#323232;">]
</span>
FooBarrington ,

Return a list of cloned functional programmers with their positions translated towards positive y!

xmunk ,

Thankfully our immutability makes us immune to fall damage.

devfuuu ,

Writer monads am I right? 😅

Patches , (edited )

Deleted by creator

TheBananaKing ,

I must once again post The Night Watch [PDF]

UnRelatedBurner ,

I said fuck it, should be a good time passer. 20ish minutes later I want to be a systems programmer. Sounds fun, what can I say.

marcos ,

Well, then I must point that Haskell is one of the best languages out there for system hacking…

Johanno ,

StackOverflow!

How do I fix this?

devfuuu ,

Haven’t used a loop in almost a decade! It’s a nice life 😎

drislands ,

Hell yeah! Groovy programmer here, mapping closures over lists of objects.

aaaa , in Has this ever happened to you?

Not quite this, but I did have a validation team that didn’t know when to quit.

The project was a Windows service, and they would be constantly opening bugs saying “program crashes when we deleted xxxxx.dll”

Like… Yeah. If you delete necessary libraries from the installation directory, the program won’t run correctly.

zarkanian ,
@zarkanian@sh.itjust.works avatar

That should be elementary computer literacy: if you don’t know what the file does, then don’t delete it.

Xatolos ,
@Xatolos@reddthat.com avatar

“I didn’t know what it was, how was I supposed to know not to delete it?”

leftzero ,

But that’s how you learn!

umbraroze , in Life Hack

One day someone will use the SQL injection to execute code on the remote server to add message to the web site that tells the workers to unionise and demand actually fair wages and put an end to the whole tipping nonsense

melpomenesclevage ,

Please write this code and I’ll do it tomorrow when stuff opens today.

ChojinDSL , in How IT People See Each Other
@ChojinDSL@discuss.tchncs.de avatar

As a seasoned sysadmin, I approve.

samus12345 ,
@samus12345@lemmy.world avatar
lugal , in Tough break, kid...

That’s why I’m proud to be also programming in HTML

bignate31 ,

it’s only real programming if you also use CSS

lugal ,

It’s only real gatekeeping if you have a physical gate

makuus , in Fitbit Clock Face

That’s something I think I’d like to use, but I don’t know if could get over the fact that neither the date nor the time are in ISO 8601 format.

dep ,
@dep@lemmy.world avatar

Lol I came here to say this

spader312 ,

The date format isn’t even human readable (at least in American). It should be Sun, Jan 14th

TheGrandNagus , (edited )

Considering it uses day then month, 24hr clock, and distance in km, I’m guessing the reason why it’s not “human readable in American” is because it’s intended to be “human readable for pretty much everybody else”

The date format isn’t incorrect at all

neutron ,

I still think YYYY-MM-DD should be more apt for an international release.

MystikIncarnate ,

IMO, that format is best for all releases.

You want to talk about sorting releases, ISO 8601 works with sorting and it’s still human readable.

My homies all start their date time stamped files with ISO 8601.

spader312 ,

I always start my files with iso8601, except on s3 it doesn’t like the colon. Gotta replace the colons lol

tgxn ,
@tgxn@lemmy.tgxn.net avatar

They should put it as Unix epoch instead!

dejected_warp_core ,

I once worked in a software shop where all release packages had the Unix epoch timestamp in the filename. Yes, these sorted brilliantly making it trivial to find the last one. But good luck finding a build from a specific date/time.

datelmd5sum ,

just wildcard for n digits

phorq , in Implemented as requested

That’ll really come in handy when they need to do renovations and lost the original blueprints.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines