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.

dylanTheDeveloper , in Stop doing Computer Science
@dylanTheDeveloper@lemmy.world avatar

I bet ATMs would have a while true print money function

coloredgrayscale ,

Almost:


<span style="color:#323232;">While (hasMoney())
</span><span style="color:#323232;">Print(money)
</span><span style="color:#323232;">
</span>
odium ,

More like while hasMoney(){dispenseMoney()}

CosmicCleric , in Stop doing Computer Science
@CosmicCleric@lemmy.world avatar

Isn’t that supposed to be “Write it on a paper”?

communistcapy ,
@communistcapy@lemmy.sdf.org avatar

Nobody thought in doing

nyan ,

Well, they could be talking about a computer science paper. Otherwise, it should be “Write it on paper” (no a).

manapropos , in Stop doing Computer Science

This but unironically

Narrrz ,

SAND WAS NOT DESIGNED FOR THINKING
THIS IS NOT A NATURAL USE FOR ROCK DUST

dudinax ,

Pretty broad statement from a charcoal-brain.

HiddenLayer5 , in Stop doing Computer Science

Cat is a fluffy animal, not for reading shit

coloredgrayscale ,

Cat is a fluffy animal, and for shreading shit

feral_hedgehog ,
@feral_hedgehog@pawb.social avatar
the_lemming ,

Writing ‘echo’ cannot do anything. Everyone knows echo works with sound only.

1024_Kibibytes , in Stop doing Computer Science

Increasing the CPU optimization by 0.02% does seem crazy to me. If you’re going to spend time working on something, make it worthwhile. Also, isn’t while(true) {print(money)} Microsoft, Apple and Amazon:s business model?

dylanTheDeveloper ,
@dylanTheDeveloper@lemmy.world avatar

I mean if the CPU that’s running these instructions is super low power then 0.02 might be worth it

Gork ,

Or if you’re scaling a large cluster of CPUs for parallel computations where a 0.02% increase can make a tangible difference in runtimes.

daniyyel , in Easy peasy

Arstechnica runs on WordPress on AWS, and they have a really nice series of articles about it. Sure, you could use just one EC2 instance for everything, but on a high traffic website you would need a bit more.

agressivelyPassive ,

But how many sites really are high traffic?

That’s the thing with almost all of the cloud stuff: reasonable at scale, but overcomplicated garbage for 95% of the users.

gornius ,

95%? More like 99.999%, considering how many Wordpress sites are there.

And in many of these 0.001% cases, simple horizontal scaling would do the trick.

And if you need more than that, just use something that can work on the edge.

thejodie ,

There’s a big chunk of sites that have WP running but are mostly just static content, confusingly. If you update the content once a month and disable all comments, maybe another tool could fit better there. ¯*(ツ)*/¯

henfredemars ,

I thought the same thing and tried to do a static site generator for a while, but I just liked the WordPress UI too much for composing and editing vs manually placing my images in an assets folder and remembering the file names to add them in my markdown.

Besides, with a good caching solution, isn’t WordPress effectively a static site with extra steps for many use cases?

thejodie ,

I’ve definitely used WP in that manner as well. At that time there were plugins that would render the pages out to static HTML in object storage. I’m sure there still are, but possibly not the same ones I used.

I just prefer not to use or manage WP whenever possible.

lucoso , in lolcalhost

i misspeel localhost far more than i should not as much now (not working with node) but still

railsdev ,

locahost for me

nautilus , in Too close to home

Replace that with golang and now we’re talking

BravoVictor ,
@BravoVictor@programming.dev avatar

Yeah, popped in the comments to say the same.

I dont know what my damage is with pointers…

nautilus ,

honestly with Go in general I’m in a perpetual cycle of being annoyed with it and then immediately being amazed when I find some little trick for efficiency - with stringer interfaces and the like

nothacking , in Too close to home

Same for C, & yields a pointer to a value, and * allows you to access the data. (For rust people, a pointer is like a reference with looser type checking)

aloso ,

We have pointers in Rust, too :) see documentation

nothacking ,

I doubt many people have ever use that or any of the other low level memory API. The main appeal of rust is not having to do that.

mvee , in Too close to home

I’m gonna have to borrow this book

HeavyRust ,
@HeavyRust@lemm.ee avatar

Me too. I also want to make some changes to it at the same time.

mvee ,

Better apply for a mutable library card now before someone else does

danwardvs , in Too close to home

This was me in courses that used C. Keep adding and removing * and & until the IDE was happy and it usually worked.

philm ,

Ah the good old times with C, when things were much more simple (but unsafe…)

rikudou ,

(void*) flashbacks intensify.

philm ,

The “best” way to program dynamically typed…

pulaskiwasright , in Too close to home

I thought it was randomly adding Send and Sync traits to function signatures until rustc is happy.

theory OP ,
@theory@feddit.uk avatar

That too

charolastra ,

Randomly wrapping things in Arc::new()

phorq , in Zero to Hero in 1 hour

I count 13 steps, so it just means you’re gonna trip up on 3 of them…

db2 ,

15 steps. You’re not counting the top, and the bottom is step 0 and we all know counting starts there.

jerome ,
@jerome@kbin.social avatar

Both of you are nerds.

GuybrushThreepwo0d ,

We are on a programming sub of a federated and open source reddit clone. We are all nerds.

ripcord ,
@ripcord@kbin.social avatar

I assume it was meant as a compliment.

jerome ,
@jerome@kbin.social avatar

(i said it with love)

UnRelatedBurner ,

sometimes i start my iterator with = -1. As I only +=1 it with a condition and I know that it will return true on the first cycle. I’ll chuck array[iterator] and need it to be 0 to start with ofc.

I just have no idea how to not do this, but it looks so bad, i need a i8 instead of a u8 at least because of this

Kache ,

What? My intuition is there’s always gotta be some equivalent nicer refactor that could do away with such an awkward construct.

In what kind of situation would that be totally unavoidable?

UnRelatedBurner ,

I could tell you my recent cenario, but it wouldn’t get us anywhere. because I know that it’s avoidable, but it’d take for me to run a different logic for only first element of my array. which is doable, but it’d make the code like 5 extra lines longer, harder to read/follow. But I just simply choose to put -1 and boom it’s fixed, just works.

another solution would be (without context) is to add one more variable and one more check to my foreach, but that takes more memory and cpu, I usually choose the i = -1, it’s ugly but not as ugly as other solutions would be

KIM_JONG ,

I hope I never have to see this code.

UnRelatedBurner ,

sending it asap (when I get home)

UnRelatedBurner ,

lucky, I forgot it

darcy ,
@darcy@sh.itjust.works avatar

thats great unless you want i to be an unsigned integer

edit: oops u already mentioned that

pec ,

That’s accurate. There’s always a few steps not included in the tutorial

nhriven , in Stop doing Computer Science

Great idea mate

Rowsdower , in Monitor Alignment Alignment Chart
igorlogius ,
@igorlogius@lemmy.world avatar

Righteous Enlightend

Amilo159 ,
@Amilo159@lemmy.world avatar

More like righteous, irradiated.

rmuk ,

Imagine having to manually adjust your tint setting. NTSC, man. Literally shaking in my SMH.

This message brought to you by PAL gang and team SECAM.

Morphit ,
@Morphit@feddit.uk avatar

The SCART squad of the PAL posse.

Sniper ,

enjoying your inferior refresh rates?

This message brought to you by ntsc

Honytawk ,

Does it have Ray Tracing?

mindbleach ,

Yeah, and a shadow mask.

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