Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 2642 2643 [2644] 2645 2646 ... 3345

Author Topic: Things that made you RRRRRRAAAAGGGGEEEE today: Trust-o-nomics Edition  (Read 3748597 times)

LordSlowpoke

  • Bay Watcher
    • View Profile

do you not understand the concept of commenting your code or is that for some godawful reason impossible in your circumstance
Logged

hops

  • Bay Watcher
  • Secretary of Antifa
    • View Profile

Commenting on code? Are you kidding me LSP?

Next you'll tell people to work in orderly and efficient manner. :P
Logged
she/her. (Pronouns vary over time.) The artist formerly known as Objective/Cinder.

One True Polycule with flame99 <3

Avatar by makowka

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G

do you not understand the concept of commenting your code or is that for some godawful reason impossible in your circumstance
I think he means the output is unreadable.

I never comment my code, actually. It leads to fun and interesting surprises, especially in large projects.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

EnigmaticHat

  • Bay Watcher
  • I vibrate, I die, I vibrate again
    • View Profile

do you not understand the concept of commenting your code or is that for some godawful reason impossible in your circumstance

While I am a programming n00b, my understanding is that comments are mainly for coming back to code after its done, or understanding code written by someone else.  They're not much help when you're just setting out to write something, because at that point you can probably keep in your head what you want to happen (or write it down in pseudocode if its really long).
Logged
"T-take this non-euclidean geometry, h-humanity-baka. I m-made it, but not because I l-li-l-like you or anything! I just felt s-sorry for you, b-baka."
You misspelled seance.  Are possessing Draignean?  Are you actually a ghost in the shell? You have to tell us if you are, that's the rule

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio

Quote
// Implements Rodrigue's rotation formula.
function rotateVector(rotated, rotation) {
    var angle = rotation.getLength();
    var k = new Vector3(rotation.xyz).normalize(); // get the unit vector that represents the axis to be rotated around.
    var temp1 = rotated.multiply(Math.cos(angle));
    var temp2 = k.cross(rotated).multiplyBy(Math.sin(angle));
    var temp3 = k.multiply(k.dot(rotated) * (1 - Math.cos(angle)));
    temp1.addBy(temp2).addBy(temp3);
    return new Vector3(temp1.xyz);
}

Those are my comments. I might write a line about what a part of the code does. Without the comments. it's pretty hard to tell what the heck k.cross(rotated).multiplyBy(Math.sin(angle)) is supposed to be, but with the context you can tell it just implements Rodrigue's rotation formula.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

BFEL

  • Bay Watcher
  • Tail of a stinging scorpion scourge
    • View Profile

Commenting is the concept of including "comments" in your code that have...usually I think hashtags are used(??) but anyway you do that so that the computer doesn't actually read it like a command, but you can look at it to see what something does or somesuch.
Logged
7/10 Has much more memorable sigs but casts them to the realm of sigtexts.

Indeed, I do this.

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile

Commenting code doesn't automatically make it expandable.

I generally just add jokes here and there though.

Things like
Code: [Select]
   //Hot simple_animal baby making vars
   var/childtype = null
   var/scan_ready = 1
   var/species //Sorry, no spider+corgi buttbabies.

Python uses hashtags, but I *think* most languages use // to indicate a comment (and /* with */ to indicate multi-line and inline comments). In python // is used for truncated division or whatever you're supposed to call it.
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio

You can kinda use triple quotes for multi-line comments!
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G

Python uses hashtags, but I *think* most languages use // to indicate a comment (and /* with */ to indicate multi-line and inline comments). In python // is used for truncated division or whatever you're supposed to call it.
Floor division.

You can kinda use triple quotes for multi-line comments!
Kinda! It seems to work fine, though!
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

Darvi

  • Bay Watcher
  • <Cript> Darvi is my wifi.
    • View Profile

I never comment whenever it's not required. When the only things you code is for assignments, you generally don't get to write stuff that isn't immediately evident in what it's doing.
Logged

scriver

  • Bay Watcher
  • City streets ain't got much pity
    • View Profile

And when you don't code for assignments, it's important to remember to not leave too many comments as to not inadvertently causing it to make sense to whatever poor fool happens upon it.
Logged
Love, scriver~

Lightningfalcon

  • Bay Watcher
  • Target locked. Firing main cannon.
    • View Profile

Normally I don't comment.  When I do comment, however, it is after coming back to a project several months later, and I'm commenting just to try to figure out what is going on in my code.
Logged
Interdum feror cupidine partium magnarum circo vincendarum
W-we just... wanted our...
Actually most of the people here explicitly wanted chaos and tragedy. So. Uh.

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile

The code for /tg/station has so many layered comments that look a bit like this:
Code: [Select]
O:mind:name //Get the name //WHY WOULD YOU DO THIS //wtf //TODO: remove this //lol oldcode //It is the 41st millenium. For more than a hundred centuries this has gone unfixed.
etc etc.
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

Shakerag

  • Bay Watcher
  • Just here for the schadenfreude.
    • View Profile

I want to smack the lot of you around for talking about not commenting code  >_<

Of course, way back in my day, when I was in college and learning assembler, the program we were using wouldn't even compile your code unless something like at least 95% of your lines had a comment on them. 

Makes you get into the habit. 

Akura

  • Bay Watcher
    • View Profile

Nearly broke my multitool trying to tighten the screws for my basket mount, or whatever the hell it's called. Then, halfway to the library, I discovered that my stepdad hasn't been keeping up with cleaning the yard up after his dogs. And when I got to the library, I manage to dislodge one of the zip ties keeping the basket(actually a milk crate) on the mount, as said zip ties do not stay put.
Logged
Quote
They asked me how well I understood theoretical physics. I told them I had a theoretical degree in physics. They said welcome aboard.
... Yes, the hugs are for everyone.  No stabbing, though.  Just hugs.
Pages: 1 ... 2642 2643 [2644] 2645 2646 ... 3345