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.

CodexArcanum , in What came first, the programmer or the code?

All code already exists in Plato’s world of perfect abstractions. Programmers merely view this ideal world darkly and scribble what imperfect algorithms they can vaguely remember.

name_NULL111653 ,

Stackoverflow is platonism for the masses, a means by which to copy perfect code from “programmers.”

The “other programmers” are dead. There is no perfect algorithm. And so we must become programmers unto ourselves…

azurefirefly , in What came first, the programmer or the code?

It’s called importing not plageriusm

NegativeLookBehind , in My Journey
@NegativeLookBehind@kbin.social avatar

Somebody told me a story once about how they went to a doctor in Sweden. They told him their symptoms and the dude started googling them.

emptyother ,
@emptyother@programming.dev avatar

My doc is also googling stuff very often.

Probably not bad. If I could have memorized the entire dotnet framework documentation, I would. Until then I will keep googling, and I will usually recognize if the solution is sound. Probably the same with doctors and health.

NegativeLookBehind ,
@NegativeLookBehind@kbin.social avatar

Agreed, I’m simply pointing out that the comic makes it seem like programming is something you can always just Google the answers for, instead of a skill that requires honing and a basal foundation, similar to medical science or law.

oldfart ,

I would love to have a doc who googles instead of just trying to sound smart based on their limited knowledge

dylanTheDeveloper ,
@dylanTheDeveloper@lemmy.world avatar

You try memorising every known disease and alment in history.

NegativeLookBehind ,
@NegativeLookBehind@kbin.social avatar

And you try memorizing every Python library

riskable ,
@riskable@programming.dev avatar

It takes a while to get through the entire standard library but PyMOTW makes it fun and keeps things interesting 👍

(Yes, I’ve read every single one and if I can do it you can too)

pymotw.com/3/

Masimatutu ,
Darthjaffacake ,

Happened to me once so I guess it’s not as weird as I thought.

sebi , in Console Logs : Hello from the other side
@sebi@lemmy.world avatar

This is a professional debug techique, what are you talking about? But I rather use ‘Hii’ with various (but not ascending) amounts of i’s.

andrew ,
@andrew@lemmy.stuart.fun avatar

Sometimes I use various swears. Depends on how long I’ve had to debug. Also depends on whose work I’m debugging and whether they’re in earshot. Usually it’s just my own sketchy code though.

alphacyberranger OP ,
@alphacyberranger@lemmy.world avatar

Been there, done that

dbilitated ,
@dbilitated@aussie.zone avatar

I’ve used a regex to add a console log to the top of every method with the method name before.

the things you do when you’re desperate.

fosforus , in OC: Me since Bun 1.0.0

This will generate lots of fun moments when developers use Bun and the runtime environment is stuck at Node for some reason. For instance, because of AWS Lambda.

rikudou ,

I’m pretty sure someone will make a custom layer.

BlackEco ,
@BlackEco@lemmy.blackeco.com avatar

Can’t you deploy Docker images to Lambda now? Granted, startup times will probably be slower than native Node.

NateSwift , in Which side are you? Javascript or Typescript

I’m not on Twitter, what’s happening?

Einlander ,
PipedLinkBot ,

Here is an alternative Piped link(s): piped.video/5ChkQKUzDCs

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I’m open-source, check me out at GitHub.

Rozauhtuno , in I'll just sort it myself
@Rozauhtuno@lemmy.blahaj.zone avatar

JavaScript was made in 2 days through a drunken stupor, and it shows.

csolisr ,

It’s sad to have the rushed ramblings of a bigot become the fundamental block of the modern world wide web. Why couldn’t it be at least made by a more competent bigot like Carmack?

r1veRRR , in Zero to Hero in 1 hour

Kubernetes is so easy! Unless you’re insane enough to have any state at all in your app. But who does that?

rentar42 , in I finally created the perfect JavaScript runtime: No-JS

I really like it and it clearly passed the code review without any issues. But I find the diagnostic messages a bit lacking, it can be hard to debug.

aksdb OP ,

But I find the diagnostic messages a bit lacking

That’s weird. Every line of business logic has an infinite amount of logging. Ticket closed; works for me.

rentar42 ,

Oh, but at the same time every single line of business logic logs nothing of value at all!

aksdb OP ,

Well, it’s best practice to only log errors. So …

lockhart ,

No need to de-bug if there is no bugs taps head

stark , in Hallelujah

Thank Microsoft for PowerShell

roon , in Not Mine; Enjoy
@roon@lemmy.ml avatar

This meme took up a lot of vertical space on my feed, like this cat

https://lemmy.ml/pictrs/image/20e73eaf-d92b-454d-8732-ecfcb73794b2.webp

WorldieBoi , in Error 502:

programmer_dad_jokes

turbodrooler ,

Seriously! Another one for the repertoire

ArcaneSlime , in More the merrier

Lmao me commenting my 14 line bash script, comments almost as long as the script itself.

I have a habit of forgetting “why’d I put this there” and at least with my scripts I can leave myself a note for future me.

nuez_jr ,

The highest comment-to-code ratio I ever wrote was a CMD script that had to combine three different escaping conventions.

It was a good day when I got to throw that one away.

coloredgrayscale ,

Adding the fourth, ultimate escape to it.

coloredgrayscale ,

Sounds like a good use of comments. Explain why, not how. (that should be readable from the code for the most part. Unless you’re having function calls like xmmmuldp (simd) )

h_a_r_u_k_i ,
@h_a_r_u_k_i@programming.dev avatar

Well, bash scripts are infamous for being arcane so commenting abundantly is better than nothing.

nothacking ,

This actually makes a lot of sense. A computer executing the code and a human maintaining it need to know different things. A human needs to knon what the code does on a high level (what the programmer intended), how it handles (or does not handle) edge cases, etc. A computer only needs to know how to run the code at a super low level. Without comments, it is impossible to know if code is doing the right thing, or what is expected from the caller.

Coreidan , in Pick a side Javascript

If you have that much difficulty with JavaScript then it’s likely you’ll suffer with any language.

MakeAvoy ,

Except strict equality, that’s a JavaScript only problem. Imagine thinking “0” should be falsy in comparison due to string literal evaluation, but truthy with logical not applied based on non-empty string. Thus !“0”==“0” is true. They couldn’t just throw away == and start over nooooo let’s add === . Utter madness

soloner ,

Browser compatibility. Design flaws can’t easily be fixed like how other languages can just switch to a new major version and introduce breaking changes. ES must keep backwards compatibility so has had to do more additive changes than replacing behavior altogether so that older web pages pages don’t break.

MyNameIsIgglePiggle ,

Meanwhile google is about to break the internet with html drm

JonEFive ,

Strict vs loose equality has gotten me so many times, but I can sort of see why they did it. The problem you mention with integers 0 & 1 is a major annoyance though. Like it is fairly common to check whether a variable is populated by using if (variable) {} - if the variable happens to be an integer, and that integer happens to be 0, loose quality will reflect that as false.

But on the other side, there have been plenty of occasions where I’m expecting a boolean to come from somewhere and instead the data is passed as a text string. “true” == true but “true” !== true

MakeAvoy ,

Lua does intrinsic evaluation of strings that i’d argue is not nearly as crazy. I get the value of it since half of interpreted languages it just churning through strings. But I also don’t recommend any large codebase ever use JS’s == or string coercion because it can go against expectations. This graph argues in JS’s favor but comparison is a little more crazy algassert.com/…/Better-JS-Equality-Table.html

Haus , in Linux Best Practices
@Haus@kbin.social avatar

Damit, lolled at a restaurant like a maniac.

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