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.

Phoenix3875 , in CSS

Nah, in real CSS, the window would overflow and bring down the whole house.

platypode , in Google cosplay is not business-critical
@platypode@sh.itjust.works avatar

I’ve been migrating one of my company’s apps from microservices back to monolithic Java. It’s wonderful. I haven’t touched a line of yaml in weeks.

clif ,

Currently migrating a massive monolithic Java application to microservices… The circle of life continues.

Want to just swap jobs in ~5 years to keep the cycle going? You can migrate this project back to a Java monolith and I’ll migrate your monolith back to micros :D

SmoothLiquidation ,

Honestly this just sounds like periodically refactoring everything to remove cruft can be a good thing. Also, it helps you understand how the existing code works if you change it and not break everything.

5714 , in C++ oop in a nutshell

Did I misunderstand something or is that an InCel-joke?

Harbinger01173430 ,

…it’s a c++ joke.

5714 ,

Did I misunderstand something or is that an c++InCel-joke?

Harbinger01173430 ,

That would be incel++ instead

sabreW4K3 , in Google cosplay is not business-critical
@sabreW4K3@lazysoci.al avatar

No lies were told

supercritical , in Google cosplay is not business-critical
@supercritical@lemmy.world avatar

There’s someone at my work who really needs to see this…

lowleveldata , in C++ oop in a nutshell

What’s the point of having friends when the whole point of private fields is to ensure that you don’t break other parts when changing those?

NightAuthor ,

It’s just another option, don’t gotta use it. Maybe you find yourself needing something like this, and the only other choice is making it public. At least with friend classes, you know which classes are friends so you can go look for any dependencies

lowleveldata ,

It’s just another option, don’t gotta use it

It’s not a choice of mine when I’m trying to read through / modify some legacy code base

owen ,

Meh, that already comes with infinite problems, so what’s one more?

CodexArcanum ,

There’s infinite ways to organize code. In C# or Rust where this isn’t an option, you might use nested classes or traits hidden behind a module/namespace.

Good use cases are data structures with associated helper classes. For example, a collection/tree and an iterator/tree-walker for working with elements of the collection. Or for something like a smart memory allocator (an arena or slab allocator), you might use a friend-class to wrap elements returned from the allocator, representing their connection back to it (for freeing up when done or to manage the allocation structure in ie a heap or sorted tree).

seliaste , in Ohh shit....
@seliaste@lemmy.blahaj.zone avatar

I drink redbull…

devilish666 OP ,

Same thing but more advanced addiction

Aasikki ,

Addicted to caffeine and sugar at the same time.

ZILtoid1991 , in Songs about Vim

Nano >>> vim

Kolanaki , in AI generated music is getting good
@Kolanaki@yiffit.net avatar

The first verse could easily just be seen as being about drug addiction, so I wonder if the AI was a bit confused by the definition of dependency in this context lol

embed_me ,
@embed_me@programming.dev avatar

At what point it will stop being considered confusion and start being considered intended metaphor

Kolanaki ,
@Kolanaki@yiffit.net avatar

Perhaps when the AI itself is more intelligent that the answer to that question is self evident? Although, even a human can accidentally create a metaphor just slapping sentences together that rhyme with no other real intent.

Lmaydev ,

Interpretation is completely up to the listener, regardless of what the author intended. That’s just how art works.

Meatstick OP ,

That’s true haha I would love to see a breakdown on how it decides the lyrics.

gofsckyourself , in CSS

It’s really not, though. This is only true if you’re bad at CSS, which basically can be said about anything.

BombOmOm ,
@BombOmOm@lemmy.world avatar

As someone who is bad at CSS, I can confirm at least half of your statement. ;p

nullPointer OP ,

unless you inherit a large base written by someone who is bad at it where their approach seemed to be to write new bad rules in attempt to cover up previous bad rules and so on. we all know how supportive employers are at addressing technical debt. (site redesign cant come soon enough)

marcos ,

Yes, it’s that way if you include bad CSS. What isn’t the same as you being bad with it.

underisk ,
@underisk@lemmy.ml avatar

Not sure about your particular situation but there’s also the possibility that the bad CSS was good CSS when it was written and over time that got superseded by advancements in both technology and practice.

agressivelyPassive ,

Or simply different styles and/or skill levels were mixed. I’m currently sifting through a code base that I know for a fact started out goodish, but through multiple team reorgs and lax standards/tight deadlines it devolved into a hot mess. A major contributor being that most of the devs were inexperienced in the framework and just did what they thought was right.

Aceticon ,

Even supposedly senior devs often have a “I know best” mentality and when they get their hands on a code base do it their way, with the result that after something went through a couple of hands you have a mess of different coding styles and even different software design choices in the same code base, or in other words, and unmaintainable mess.

MajorHavoc ,

“it’s not that hard” just announces to the world that you haven’t tried to do anything hard with it.

gofsckyourself ,

I work with WordPress. It doesn’t get much harder than that.

underisk ,
@underisk@lemmy.ml avatar

What do you consider difficult to do with CSS that wouldn’t also be difficult without it?

BassTurd ,

As someone that has gone through some of the available online tutorials like freecodecamp, and has no real world experience, especially in a team setting, I think I agree with you. I wouldn’t say it’s hard, but I do feel it’s unnecessarily complicated in some areas. Some naming conventions are unintuitive, the cascading inheritance can get confusing especially with multiple hands working on something, and from my experiences, there’s minimal if any effort put into best practices, so everyone does things a little different.

griD ,

Pff, just define your own cascade with @layers :)

Best advice I can give: Don’t use CSS directly, use a pre-processor like SASS/SCSS. It really helps keeping things sane and somewhat organized.

Ziglin , in STOP USING GITHUB

I agree with GitHub being bad, but the meme’s content is worse and I’m afraid that there are people who agree with it. I don’t like GitHub or Microsoft but since I get their stuff for free I do use but I’d love to use something that’s open and supports git properly.

DannyBoy , in C++ Moment

It’s been a minute since I used C/Cpp but if you compile with debugging symbols and using gdb give you info like in Java? At least the location of the crash.

Miaou ,

And then you realise the program doesn’t crash when compiling with debug symbols 😢

Buddahriffic ,

Then it’s time to have a closer look at how your concurrent threads are behaving and where you missed a sync point or mutex.

mrkite ,
@mrkite@programming.dev avatar

That’s when you break out valgrind because you certainly are using uninitialized memory.

Ziglin ,

And much more, it tells you each operation it goes through, where it is in the code, what’s in the registers and more.

Tja , in C++ Moment

Someone needs to be introduced to gdb…

DontRedditMyLemmy ,

This is the Way

parens ,

have fun without those debug symbols

Tja ,

Why wouldn’t I have debug symbols in the software I’m developing?

parens ,

And what happens when you release it?

Tja ,

If you want the same traces as Java and python in the meme, you leave them, if you don’t you strip them. Or you ship them separately. You decide, like a big boy.

Ziglin ,

Have the user compile it without debug symbols to save space. If the user has a problem they can just recompile it with debug symbols and see what went wrong with gdb.

gandalf_der_12te , in I need this....

<span style="color:#323232;">function is_equal (x, y) {
</span><span style="color:#323232;">  if (x == y)
</span><span style="color:#323232;">      print("x is equal to y")
</span><span style="color:#323232;">      return true;
</span><span style="color:#323232;">  return false;
</span><span style="color:#323232;">}
</span>
MTK , (edited )

`function is_equal (x, y) {

if (is_equal(x,y))


<span style="color:#323232;">  print("x is equal to y")
</span><span style="color:#323232;">
</span><span style="color:#323232;">  return true;
</span>

return false;

}`

Fixed it for you

Ironfacebuster ,

<span style="color:#323232;">function is_equal (x ,y) {
</span><span style="color:#323232;">    if (Math.Random() > 0.38) {
</span><span style="color:#323232;">        console.log(x + " is equal to " + y)
</span><span style="color:#323232;">        return true
</span><span style="color:#323232;">    }
</span><span style="color:#323232;">    
</span><span style="color:#323232;">    return false
</span><span style="color:#323232;">}
</span>
KairuByte ,
@KairuByte@lemmy.dbzer0.com avatar

Wouldn’t this fail to compile due to the missing semicolon, and if that is corrected only ever return true?

Ziglin ,

Compile? This is JavaScript! Semicolons are optional, didn’t you know?

KairuByte ,
@KairuByte@lemmy.dbzer0.com avatar

Mmm I don’t think this could be JavaScript. Unless we are always returning true.

Ziglin , in C++ Moment

The code editor I had to use for Java once didn’t give me anything like that.

Meanwhile for C you can just use gdb, it’s great!

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