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.

mrmanager , in B-bug? What bug?
@mrmanager@lemmy.today avatar

I try to always rewrite complicated code. As an example, another dev who left the team had written a program in Elixir that nobody knew or understood. I rewrote it in python (with his help, since I still had contact with him over chat). After that, everyone in the team could understand the code and we could make changes very easily to it and document it.

Another program he wrote in python was kind of complicated and we would have bugs in it that we didn’t know how to fix. So I rewrote it with a completely different architecture with focus on simplicity. And again, now everyone could just read the code and understand it.

I think many devs are writing code that is not simple to understand for others. Then rewriting it can be worth it to avoid the pain of trying to fix bugs in complicated code.

Phoenix ,
@Phoenix@programming.dev avatar

That’s only the first stage. Once you get tired enough you start writing code that not even you can understand the next morning, but which you’re loathe to change because “it just works”.

mrmanager ,
@mrmanager@lemmy.today avatar

Yeah I’ve had that experience too. But sometimes I write a lot of hackish code to get it to work, and then after spend time rewriting it so it’s easy to understand. But it depends on mood. Sometimes I don’t change it because it’s complicated and it would be too much thinking required to make it better. :)

Programmers are often lazy by nature…

Phoenix ,
@Phoenix@programming.dev avatar

Lazy is right. Spending fifty hours to automate a task that doesn’t take even five minutes is commonplace.

It takes laziness to new, artful heights.

AlexWIWA , in Single?

Just wait for them to buy programming socks

a_statistician ,
@a_statistician@programming.dev avatar

What’s wrong with programming socks?

AlexWIWA ,

Nothing, he’ll just finally have women to date in his CS classes.

Eufalconimorph , in ways to close vim

cat /dev/zero > “/proc/$(pidof vim)/mem” is my favorite dumb way. Clear its memory, wait for the segfault.

savvywolf , in How it feels to learn JS in ~~2016~~ 2023
@savvywolf@pawb.social avatar

I stepped out of webdev like 5 years ago. Now every time I try to get back into things to work on an open source project or whatever I just give up because I do not understand things.

Everything seems to be based on React which is some kind of magic templating library that does everything? And also dynamically updates thing in response to changes and talks to the server?

I much prefer the days of just using vanilla js to manipulate a DOM and talk to a well defined API.

gornius ,

The thing is, they look like too much for a simple app with near none interactive elements.

But once app starts growing, concepts like reusable components, reactivity and state management become such an important tool.

Imagine tracking shopping cart’s total value. With these frameworks it’s just one store containing total value, exposing the value as reactive state. Once the value changes, all components using directly or indirectly that value update immediately. In vanilla you would have to keep track of every instance where that value is used manually.

Additionally, if you decide keeping total value of cart in frontend is stupid (because it is), you just modify your store to provide only readonly value, and create setters that require you to pass item or item id. Then that setter would hit up backend keeping your cart’s total value, add an item, and backend would return new total, which would now be set as that store’s new total value.

These frameworks are kind of SOLID principles applied to chaotic world of user interfaces.

yacgta OP , in Experienced engineer examines comments in a legacy codebase

I have a few of these but I forget where they came from, curious if anyone here knows

Walop ,
cd_slash_rmrf , in How it feels to learn JS in ~~2016~~ 2023

Great article. there was a even a response a year later medium.com/…/how-it-feels-to-learn-javascript-in-…

snowe ,
@snowe@programming.dev avatar

That second article is hilarious. It’s trying to point out that the first article is over complicating things then doing the same thing except the author thinks it’s not complicated what they’re saying when it’s actually insane.

SubArcticTundra , in Too close to home
@SubArcticTundra@lemmy.ml avatar

Hahaha yes tfw Rust forces you to put your shit in a Rc<Cell<Option<>>>

nothacking ,

New your program deadlocks instead of crashing, peak safety.

tatterdemalion ,
@tatterdemalion@programming.dev avatar

EVERYBODY STOP. Nobody make a move or the memory dies. We have a Mexican Memory Standoff.

mygnu , in Where did the name Bison come from anyway?

What? and I am a programmer 😅

lemmyng ,
@lemmyng@lemmy.ca avatar

Compiler compiler (cc) -> yet another compiler compiler (yacc) -> bison (because yacc sounds like “yak”)

cupcakezealot , in Only 14.99$
@cupcakezealot@lemmy.blahaj.zone avatar

I’ll wait for Linux Millennium Edition to come out first

snor10 ,

I heard it is buggy, I think I’ll wait for Linux Vista to be released.

smashboy , in Cold dark place filled with sadness and despair

Hm, when I google this, I get Edgar Allen Poe’s the Raven.

ReCursing ,
@ReCursing@kbin.social avatar

Third of only five results for me

dinodroid , in Title

I wonder what would be the scenario for below languages.

  • Julia
  • Rust
  • Go
  • Brainfuck
  • Lisp
  • Cobra
  • Smalltalk
  • Ruby
TheWinged7 ,

Julia

Your program is telling me to get a girlfriend

malloc , in Le torture

Older scrum masters during the daily standup and trying to do live updates to the JIRA board

Turned 15 minute meeting into 30 minutes at times lol.

psud ,

I let my stand-in scrummy drive the TFS board this morning. In adding a PBI to the sprint he typed the iteration manually (a pretty long path name), rather than clicking the context menu and selecting “current iteration”

DiamondDemon , in Testing good

HOW

Hazzia ,

Happened to me once.

It was a 5 line bash script tool added onto existing software.

Yeah, I’m a pretty big deal 'round here…

shohamc1 , in Still can't decide

Any Jetbrains users here?

sjpwarren ,

Yes, it seems to have everything I need for Go and Python

S3verin , in Le torture

thats literally my job (web development teacher)

coloredgrayscale ,

You poor soul.

clicks scrollbar with mouse and drags it, instead of using the scroll wheel

S3verin ,

right click -> copy; right click -> paste

snakesnakewhale ,

Fool—the scroll wheel is a scalpel; the scrollbar is a broadsword. Use the right tool for the job.

ICastFist ,
@ICastFist@programming.dev avatar

Please tell me your students aren’t making pages that load >5MB of uncompressed javascript and css

S3verin ,

of course not, its >5mb of compressed javascript and css

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