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.

bort , in call the doctor, the CS doctor

Count in binary up to 1023 on your hands you filthy casual

stebo02 ,
@stebo02@sopuli.xyz avatar

just beware when counting the number 4 in public

CanadaPlus ,

Or 256, or 260.

dukk ,

Especially 260.

tomjuggler , in It's a mass extinction event

Fun meme but corporate job listings in my town contradict the premise.

Let them C# I’m sticking to C++ and Python.

scottywh , in R U A Cyberpunk

”…a computer geek who likes Ministry"

😂

NorthWestWind , in incoming
@NorthWestWind@iusearchlinux.fyi avatar

I prefer flex

Eonandahalf , in Imagine

OMFG!! Don’t give them ideas!

mark , (edited ) in Which side are you? Javascript or Typescript
@mark@programming.dev avatar

I like TypeScript for its types and type-checking, but I also want to write JavaScript to avoid having a local build step, and having to wait for things to transpile/compile/etc when running locally. I have a pretty large project where I’ve gotten both worlds by just using JSDoc and only using TS for type-checking. VSCode still offers built-in type-checking with JSDocs and ofc the type-checking can also be run separately if needed.

TrenchcoatFullofBats , in This one goes out to the sysadmins in the crowd.

Great. Now my left eye is twitching uncontrollably and I want to punch a sales drone into next quarter.

noddy , in using gpu with linux experience

Analyzing the symptoms, I’m afraid to say, you might have nvidia.

MajorHavoc , in The legend

It’s rumored that he exited Vi with his first ever attempt.

BravoVictor , in More the merrier
@BravoVictor@programming.dev avatar

I mean… you gotta have them start the habit somehow

bear_with_a_hammer ,

I do neither, yes I do comment, but don’t apply it to easy code.

The thing is I also make easy comments about hard stuff in the code, it’s like giving a cancerous puppy a reason to live :D

Gallardo994 ,

Let’s face it, such comments usually cause more problems than do good. If someone changes the code and forgets to modify the comment, the reader might favor one or another at random. “Stop sign” example isn’t the best but you get my point.

Comments at best should explain some non-obvious logic, or some sort of reasons for implementing one way or another. For SDKs and packages overall, public APIs should also be commented. The rest imo should be readable from code.

spader312 ,

A form of “self documentation” I like to do is create variables for conditions before using it in an if statement. If you break down a funky conditional into easy to read variables it becomes a lot more clear what it’s trying to do.

Idk how to write code on sync:


<span style="color:#323232;">const isHumid = xxxx;
</span><span style="color:#323232;">const isHot = yyyy;
</span><span style="color:#323232;">const isSunny = zzzzz;
</span><span style="color:#323232;">
</span><span style="color:#323232;">If (isHot &amp;&amp; isHumid &amp;&amp; isSunny) {
</span><span style="color:#323232;">    ...
</span><span style="color:#323232;">}
</span>
coloredgrayscale ,

If someone changes the code and forgets to modify the comment, the reader might favor one or another at random.

Hence why you should comment why, not how/what.

// slow down traffic before crossing busy main road

Now you can change the stop sign to a yield without touching the comment. Or judge that the comment can be removed if it’s clear the main road does no longer exist.

_danny ,

Bad/wrong documentation is worse than no documentation.

“Practice makes perfect” is only true if you’re practicing the right stuff. Otherwise you’re just reinforcing bad habits.

mashbooq , in More the merrier

Also me when I’m forced to write documentation for a Python function


<span style="color:#323232;">def delete_first_of_list(the_list: list):
</span>
stilgar ,
@stilgar@infosec.pub avatar

This is a good way to realise that you don’t need a function for that use case.

coloredgrayscale ,

If they need it often it makes some sense, if it also perform some checks, if the list if empty or None/null.

coloredgrayscale ,

What if I pass an empty list, or NoneType?

RagingRobot ,

Does this return a new list or modify the original? I would hope it returns a new one but I would know for sure if there was documentation.

kablammy ,

I would hope it modifies the original. It’s implied in the name. A function that returns all but the first item should be named something like tail or without_first_item.

stilgar , in Would you agree?
@stilgar@infosec.pub avatar

No, you missed the homeless encampments, forest fires and car centric cities.

There’s no apt install utopia.

Llewellyn ,

Because you have forgotten sudo

cyber_kalashnikov ,
@cyber_kalashnikov@lemmygrad.ml avatar

I knew he was missing something. Thank you!

linearchaos ,
@linearchaos@lemmy.world avatar

Maybe theyre already root?

TheObserver , in Recursion
@TheObserver@lemmy.dbzer0.com avatar

Double it and I’ll do it myself

phorq ,

Yeah, who even needs a trolley?

unreachable , in How I feel every time my feature request PRs are accepted
@unreachable@lemmy.my.id avatar

each accepted PR is a confirmation of my existences

gentooer , (edited ) in I know 69 languages

I put Haskell as last language on my CV, despite it being the language I’m most comfortable with and genuinely like, just because I don’t want to be “that” guy

EDIT: I’ll never put TI-84+ calculator ASM on my CV, but damn, I’m proud I knew it in secondary school

lugal ,

I did my bachelor thesis in Haskell. Never used it again. Hopefully never will. Still on my CV.

gentooer ,

We fight on the same team. That’s what’s the most important

lugal , (edited )

Yeah, it was fun until it was a huge project. I even was tutor in a lecture about Haskell and SQL once even though I hated SQL. Now I tell people in my job interviews what a great SQL tutor I was

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