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.

po_tay_toes , in I don't believe Auto Save feature in any software
@po_tay_toes@lemmy.sambands.net avatar

Auto-saving is the insurance against manually saving failing, which is the insurance against the computer or program failing.

It’s insurances all the way down, yet I’m still let down when versioning overwrites my changes.

victorz , in I don't believe Auto Save feature in any software

I really should turn on auto save when vscode loses focus.

JoYo , (edited ) in I don't believe Auto Save feature in any software
@JoYo@lemmy.ml avatar

MFRs are saving each keystroke they have access to.

UNWILLING_PARTICIPANT ,

Hell sometimes I’ll save just after having thought about writing something

UNWILLING_PARTICIPANT , in I don't believe Auto Save feature in any software

Meanwhile I, a gentleman

nmap <CR> :w<CR>

Binding the Enter key to save the current buffer. 🧐

alphacyberranger , in I don't believe Auto Save feature in any software
@alphacyberranger@lemmy.world avatar

The same can be applied for editors as well

M500 , in I don't believe Auto Save feature in any software

I’m the same way. I think it’s just a matter of being conditioned to manually save for the majority of my computing life.

BlanK0 , in Chewing gum as a promotional gift for a RTOS

Damn, that’s a cool way to explain how that tech works in a chewing gum package

KairuByte ,
@KairuByte@lemmy.dbzer0.com avatar

I’m confused, how exactly is this explaining anything? I’m fully aware of what a hypervisor is and does, but is the insinuation that the gum is VMs?

xmunk , in 5/5 stars

A review that deserves more stars than the thing it’s reviewing.

dbilitated , in Whitespace
@dbilitated@aussie.zone avatar

I’m just a c# dev wishing to fuck we had something visual to indicate reference types so my coworkers could stop misusing them

jjagaimo ,
dbilitated ,
@dbilitated@aussie.zone avatar

oh thank you! I use jetbrains but I wonder if I can implement the same thing

vithigar ,

It’s such a short list of value types though. How can they have that much trouble? All of the various ints and floats, bool, char, structs, and enums. Everything else is reference.

GissaMittJobb , in Whitespace

Having an asterisk both be the type indicator and the dereference operator is one of the great programming language design blunders of our time, along with allowing nulls for any type in so many languages.

darkpanda ,

I also sometimes wish that the syntax in if statements was inverted, where () was optional and {} was required.

victorz ,

Based

CodexArcanum ,

Rust makes this choice and it is way better.

clay_pidgin , (edited )

Can you give me an example? I’m not sure I follow. Might be language specific?

noli ,

if(condition) statement; Is valid in typical C-style syntax.

if condition { … }

Is invalid in typical C-style syntax

clay_pidgin ,

Gotcha, thanks.

darkpanda , (edited )

The code in the image is C or C++ or similar. In those languages and languages derived from them, curly braces are optional but the parentheses are required. It should be the other way around to avoid logic errors like this:


<span style="color:#323232;">if (some expression)
</span><span style="color:#323232;">  doSomething()
</span><span style="color:#323232;">else if (some other expression)
</span><span style="color:#323232;">  printf(“some debugging code that’s only here temporarily”);
</span><span style="color:#323232;">  doSomethingElse();
</span>

Based on the indentation you’d think that doSomethingElse was only meant to run if the else if condition was true, but because of the lack of braces and the printf it actually happens regardless of either of the if conditions. This can sometimes lead to logic errors and it doesn’t hold up to a principle of durability under edit — that is, inserting some code into the if statement changes the outcome entirely because it changes the code path entirely, so the code is in a sense fragile to edits. If the curly braces were required instead of optional, this wouldn’t happen.

I have all of my linters set up to flag a lack of curly braces in these languages as an error because of this. It’s a topic that sometimes causes some debate, ‘cause some people will vociferously defend their right to not have the braces there for one liners and more compact code, but I have found that in general having them be required consistently has led to fewer issues than having arguments about their absence, but to each their own. I know many big projects that have the opposite stance or have other guidelines, but I just make ‘em required on my own projects or projects that I’m in charge of and be done with it.

clay_pidgin ,

That makes perfect sense, thank you.

Blackmist ,

Having assignments return a value is right up there as well.

GissaMittJobb ,

Because of the possibility of accidentally performing an assignment in a conditional expression?

If yes, I agree that it’s not great.

Blackmist ,

Yeah, exactly that.

gencha , in Every Family Dinner Now
  1. People vastly overestimate the abilities of AI.
  2. Developers vastly overestimate their own abilities.
  3. There are people on any level of seniority that would be perfectly replaced by a noise generator.
taanegl ,

The company had avoided certain destruction, after having fired the previous CEO and putting a new one in it’s place. The new CEO had managed to bring a newfound calm to the company and it’s ranks, and brought an air of meditative discipline to board room meetings.

Some said it was crazy, but making the LectoFan EVO the new CEO was the best decision the company board had ever made.

brbposting ,

I’ve had it with fan shills.

Glorious leader box fan is sufficient. Glorious leader box fan is perfect.

JasonDJ ,

There are people on any level of seniority that would be perfectly replaced by a noise generator.

Im fairly certain that this is what happened I my CISO.

rab ,
@rab@lemmy.ca avatar

Overestimate now, but I think that AI is going to be insane within like 5 years, given current investment trends

frezik ,

If they stick around, maybe. If it falls into a rut, then investors are going to pull out and we’ll be in another AI winter.

firelizzard ,
@firelizzard@programming.dev avatar

I find it very hard to believe that AI will ever get to the point of being able to solve novel problems without a fundamental change to the nature of “AI”. LLMs are powerful, but ultimately they (and every other kind of “AI”) are advanced pattern matching systems. Pattern matching is not capable of solving problems that haven’t been solved before.

gencha ,

Replace “AI” with “metaverse” or “Bitcoin”. Same bullshit

rab ,
@rab@lemmy.ca avatar

Not really. Crypto is a pyramid scheme.

exocrinous , in Whitespace

Int *p is unreadable, unreasonable, and bad programming.

Ferk ,
@Ferk@kbin.social avatar

But C syntax clearly hints to int *p being the expected format.

Otherwise you would only need to do int* p, q to declare two pointers... however doing that only declares p as pointer. You are actually required to type * in front of each variable name intended to hold a pointer in the declaration: int *p, *q;

exocrinous ,

That’s because C was designed by a fool.

Aatube ,
@Aatube@kbin.social avatar

The fools who created Unix

Tja ,

And C!

CanadaPlus ,

What, could you have done better in 70-whatever?

Aatube ,
@Aatube@kbin.social avatar

Why so? It’s what it actually is

victorz , in Whitespace

Wait until I tell y’all about const.

Schmeckinger , in What could go wrong trying to solve AoC in Rust?

You can’t really blame that on rust.

MaliciousKebab OP ,

Yeah ngl it’s very ugly. But hey as long as it works it’s not stupid amirite?

xlash123 ,
@xlash123@sh.itjust.works avatar

Rust borrows a lot of it’s design from functional programming languages like Haskell, which has its good and bad. You could also choose to implement this behavior iteratively like typical C programs, but that tends to be ugly in other ways.

Personally, I’ve grown fond of the functional style. You see it in other places too, like the higher order functions in JavaScript. What’s good about them in Rust is you still get amazing performance due to zero-cost abstraction. Trying to implement it yourself would likely be slower, so use them any chance you get.

SzethFriendOfNimi , in What I want to become Vs What I do

Which are used to calculate stresses for dams, fluid dynamics for planes and ships, capacity and load simulations for power, and to compile and operate servers.

Software engineers are the pinnacle of engineering.

Check out this book on Amazon (or your library) to see just how clever and useful we really are.

www.amazon.com/…/B07X66DCLM

Norgur ,

If you need a book to tell you how useful you are, chances are, it's claims might.be a bit overblown. The profession that has most of those.books written about them are managers after all. Just saying.

smashboy ,

You didn’t click it, did you?

Norgur ,

Amazon lead me to a "not available where you are" page, so... Me sowwy

variants ,
bloubz ,

This person really went and promoted Amazon. Thank you for supporting your family business

Kusimulkku ,

(click the link)

Kidplayer_666 ,

Son of a gun

sag OP ,

We are useful?? Thanks You Man I hope my parents also understand that Software Engineering is also a real Engineering

wewbull ,

Software engineering doesn’t treat failure anywhere near important enough for me to consider it proper engineering. Bugs are expected, excused and waived, which for anything critical just isn’t acceptable in my opinion.

Is software still useful? … Sure.

theneverfox ,
@theneverfox@pawb.social avatar

Bugs are inevitable. Humans can’t write more than a few dozen lines without making a mistake - it’s inevitable because we’re barely sentient apes, floundering to understand the full scope of the problem space

But through methodology, bugs can be mitigated. You can reduce their number, and fail gracefully. We have countless ways to do it, and we teach how widely

There’s a science to it all, and those of us worth our salt know it… It’s not our fault that management disregards our warnings and pushes ever tighter deadlines.

We know how to do better, our warnings just fall on deaf ears far more often then not

RubberElectrons ,
@RubberElectrons@lemmy.world avatar

Meh. There’s a saying in my field: “anyone can build a bridge, only an engineer can make one that barely doesn’t fall down”.

Humorously reductive as it is, software is what makes that “barely” thinner than human calculation would normally yield. So… Yeah. Not what I’d call a pinnacle.

SzethFriendOfNimi ,

Did you look at the book I linked?

RubberElectrons ,
@RubberElectrons@lemmy.world avatar

No cuz, the link doesn’t properly load 😂

E: try searching for just the ASIN: B07X66DCLM and note that I’m using the one you provided!

SzethFriendOfNimi ,

Ahh. It’s a boutique link that points to Amazon Digital Purchase of Rick Astleys Never Gonna Give You Up.

E.g. my post was a red herring

RubberElectrons ,
@RubberElectrons@lemmy.world avatar

Yeah it loaded after searching the ASIN hahaha

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