Bay 12 Games Forum

Please login or register.

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

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

kaenneth

  • Bay Watcher
  • Catching fish
    • View Profile
    • Terrible Web Site

I don't know much about coding, despite wanting to learn it (procrastination is AWESOME! [/sarcasm]). I assume commenting is saying things like 'This part of the code does X' and such?

'Why' comments are 100x more useful than 'what' comments.

Anyone can look at the code and see what you did, but if they want to make changes, they need to know what will break if they do.
Logged
Quote from: Karnewarrior
Jeeze. Any time I want to be sigged I may as well just post in this thread.
Quote from: Darvi
That is an application of trigonometry that never occurred to me.
Quote from: PTTG??
I'm getting cake.
Don't tell anyone that you can see their shadows. If they hear you telling anyone, if you let them know that you know of them, they will get you.

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile

I don't know much about coding, despite wanting to learn it (procrastination is AWESOME! [/sarcasm]). I assume commenting is saying things like 'This part of the code does X' and such?

'Why' comments are 100x more useful than 'what' comments.

Anyone can look at the code and see what you did, but if they want to make changes, they need to know what will break if they do.
Then they'll change it anyway, because you did it the "wrong" way. ("If(condition);" is wrong, I don't care if it works or not.)
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

ArchAIngel

  • Bay Watcher
  • Infested Pony
    • View Profile

My little sister broke my headphones. Stupid bitch, why the hell did you do that! 80 dollars wasted because you forgot that if you pull on a wire, it fucking breaks!

nenjin

  • Bay Watcher
  • Inscrubtable Exhortations of the Soul
    • View Profile

Went to the doctor because of some nasal problems. My two options given were: a month-long steroid treatment or surgery.

So I call both my parents because that's how my family rolls. Everyone is telling me to do the surgery instead of a steroid treatment. I talk to my mom first, then call my dad. Then my mom calls back and UNLOADS on me. "Oh, well, I've been reading on the internet and....."

My mom and dad both have science backgrounds, but not medicine especially. But they both consider themselves very well informed, and my mom tends to think she actually knows something about medicine. So she's sitting there contradicting the doctor, rattling off her Google search discoveries and finally, I just lost it.

Dear Mom. You're not a fucking doctor. Google does not make you a doctor. You didn't see what he saw. All that you're really going off of is your (well-meaning) but totally smothering mothering instinct. Yes, I know steriods suppress your immune system. Yes, I know some people get addicted to the way it makes them feel. Yes, I know it can lead to an increase in acne. Yes, I know you're more liable to get an infection while you're on them.

But godammnit, you are not a doctor. So quit fucking shouting at me and talking a million miles a minute. All you're doing is making me feel shitty about my choice of medical treatment. FFS, if the steroid treatment drives me insane or makes me feel like shit, I'll quit it and go get the surgery. But FFS, when a doctor says "If I were you I would...." I take that as a pretty reasonable assessment of what the best treatment option at this time is.
Logged
Cautivo del Milagro seamos, Penitente.
Quote from: Viktor Frankl
When we are no longer able to change a situation, we are challenged to change ourselves.
Quote from: Sindain
Its kinda silly to complain that a friendly NPC isn't a well designed boss fight.
Quote from: Eric Blank
How will I cheese now assholes?
Quote from: MrRoboto75
Always spaghetti, never forghetti

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile

I don't know much about coding, despite wanting to learn it (procrastination is AWESOME! [/sarcasm]). I assume commenting is saying things like 'This part of the code does X' and such?

'Why' comments are 100x more useful than 'what' comments.

Anyone can look at the code and see what you did, but if they want to make changes, they need to know what will break if they do.

Why, just yesterday I had to comment my code to explain what I was doing. It was a function called "magic_math". It used an entirely arbitrary piece of math to get a number, because that's the only way it would work. I explained in detail how I basically pulled these numbers out my ass and trying to find significance in them is futile.

I fixed it by the end of the day, thankfully.

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!

'Why' comments are 100x more useful than 'what' comments.

Anyone can look at the code and see what you did, but if they want to make changes, they need to know what will break if they do.

This could just be a (bad?) habit of mine, but I frequently end up with a single line of code that's a close-to incomprehensible mass of maths, which becomes much more understandable given the simple comment "//Calculate gravity" or whatever. I probably use why-type comments more, but I personally wouldn't say they're necessarily more useful. Of course, I'm not a professional.
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

itisnotlogical

  • Bay Watcher
  • might be dat boi
    • View Profile

I do comment my code; I've gotten better about it since I quit a project for a few weeks and came back only to not understand a single line.

The problem with my thing is that I'm creating a ton of new objects, creating references to them by adding them to an array, and depending on the array-reference to the previously loaded room to generate the connection. Like this, sort of:

Code: [Select]
// up here somewhere is the main for-loop which looks at all the XML files and loads them if they aren't already

Function load_connected(currentRoom)
{
var theRoom = currentRoom
// currentRoom is a reference to the latest addition to the very topmost array of rooms
var connectedRoom

for each (var x, theRoom.connected_filename_string.*)
{
XML = loadxml(x)

// insert event listener buggery

connectedRoom.parse(XML)

theRoom.connectsinwhateverdirection = connectedRoom;
masterArrayOfRooms.push(connectedRoom)
}

}

But then I'll need to keep a reference to a room in case it connects to multiple rooms, and make sure that every XML is ready to be read by the time the function reaches them, and make sure that references aren't accidentally overwritten before I'm done with them (because the references are dependant on the counter of a for-loop, and there are multiple functions that modify the array). It seems like by the time I work out all the kinks and it runs smoothly, I could have done something simpler with much less work overall.
Logged
This game is Curtain Fire Shooting Game.
Girls do their best now and are preparing. Please watch warmly until it is ready.

Shakerag

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

I don't know much about coding, despite wanting to learn it (procrastination is AWESOME! [/sarcasm]). I assume commenting is saying things like 'This part of the code does X' and such?

'Why' comments are 100x more useful than 'what' comments.

Anyone can look at the code and see what you did, but if they want to make changes, they need to know what will break if they do.
And I would completely agree with this.  I'm (now) the primary caretaker of a program that's got 800-ish modules with, on average, about a thousand lines of code in each.  Much of the code was written by people before I was even out of college (over 10 years ago) and they aren't still around to explain things. 

While I'd say on the whole we have pretty good doc standards, I've still had a couple of instances where I'll spend the better part of a week just tracking down what all touches one variable in particular and how fucked will I be if I mess with it. 

So I try to make sure that if I'm performing any manner of coding black magic that I drop a big ol' doc box before it to explain the following witchery. 

miauw62

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

I don't know much about coding, despite wanting to learn it (procrastination is AWESOME! [/sarcasm]). I assume commenting is saying things like 'This part of the code does X' and such?

'Why' comments are 100x more useful than 'what' comments.

Anyone can look at the code and see what you did, but if they want to make changes, they need to know what will break if they do.
The answer to "what will break?" is invariably "everything", though.

I have written code that I don't know how it works and that still has bugs because it connected about three parts that were written in the days of yore and that I didn't understand etc. Some other guy yelled at me for it lately. That block of code had a "Deep magic. Do not touch" tag.
« Last Edit: July 15, 2014, 03:13:41 pm by miauw62 »
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.

Neonivek

  • Bay Watcher
    • View Profile

Nevermind apparently "I" got my order wrong...
« Last Edit: July 15, 2014, 03:41:05 pm by Neonivek »
Logged

Molly Renata

  • Bay Watcher
  • Just an obnoxious fangirl.
    • View Profile

I may have already mentioned this, I can't be assed to check, and it really applies more for yesterday than today but I'm still pissed about it.

Was it REALLY NECESSARY to put Lucina in Smash Bros.?
Logged
Molly Renata, also known as gyppygirl2021.
Fangirl. Beware random references to old and obscure games.
I'm a dumb hipster who plays older Dorf Fort versions. Mostly DF2010 and 40d. I also make and play a lot of silly mods, and find my own ways to have Fun.

Graknorke

  • Bay Watcher
  • A bomb's a bad choice for close-range combat.
    • View Profile

I may have already mentioned this, I can't be assed to check, and it really applies more for yesterday than today but I'm still pissed about it.

Was it REALLY NECESSARY to put Lucina in Smash Bros.?
Well they have to put something new in, even if it's just characters.
See: FIFA games, presumably other sports games, fighting games that aren't Smash Bros
Logged
Cultural status:
Depleted          ☐
Enriched          ☑

ChairmanPoo

  • Bay Watcher
  • Send in the clowns
    • View Profile

Went to the doctor because of some nasal problems. My two options given were: a month-long steroid treatment or surgery.

So I call both my parents because that's how my family rolls. Everyone is telling me to do the surgery instead of a steroid treatment. I talk to my mom first, then call my dad. Then my mom calls back and UNLOADS on me. "Oh, well, I've been reading on the internet and....."

My mom and dad both have science backgrounds, but not medicine especially. But they both consider themselves very well informed, and my mom tends to think she actually knows something about medicine. So she's sitting there contradicting the doctor, rattling off her Google search discoveries and finally, I just lost it.

Dear Mom. You're not a fucking doctor. Google does not make you a doctor. You didn't see what he saw. All that you're really going off of is your (well-meaning) but totally smothering mothering instinct. Yes, I know steriods suppress your immune system. Yes, I know some people get addicted to the way it makes them feel. Yes, I know it can lead to an increase in acne. Yes, I know you're more liable to get an infection while you're on them.

But godammnit, you are not a doctor. So quit fucking shouting at me and talking a million miles a minute. All you're doing is making me feel shitty about my choice of medical treatment. FFS, if the steroid treatment drives me insane or makes me feel like shit, I'll quit it and go get the surgery. But FFS, when a doctor says "If I were you I would...." I take that as a pretty reasonable assessment of what the best treatment option at this time is.

Nasal polyps?
Logged
Everyone sucks at everything. Until they don't. Not sucking is a product of time invested.

Molly Renata

  • Bay Watcher
  • Just an obnoxious fangirl.
    • View Profile

Well they have to put something new in, even if it's just characters.
See: FIFA games, presumably other sports games, fighting games that aren't Smash Bros

It just makes no sense to put Lucina in when Marth is already there, since she's literally just a Marth genderswap in every way. Except maybe backstory, but that's irrelevant to Smash.

I would have liked to see a rep from one of the previous FEs, maybe one of the GBA games. Ephraim, anyone?
Logged
Molly Renata, also known as gyppygirl2021.
Fangirl. Beware random references to old and obscure games.
I'm a dumb hipster who plays older Dorf Fort versions. Mostly DF2010 and 40d. I also make and play a lot of silly mods, and find my own ways to have Fun.

nenjin

  • Bay Watcher
  • Inscrubtable Exhortations of the Soul
    • View Profile

Went to the doctor because of some nasal problems. My two options given were: a month-long steroid treatment or surgery.

So I call both my parents because that's how my family rolls. Everyone is telling me to do the surgery instead of a steroid treatment. I talk to my mom first, then call my dad. Then my mom calls back and UNLOADS on me. "Oh, well, I've been reading on the internet and....."

My mom and dad both have science backgrounds, but not medicine especially. But they both consider themselves very well informed, and my mom tends to think she actually knows something about medicine. So she's sitting there contradicting the doctor, rattling off her Google search discoveries and finally, I just lost it.

Dear Mom. You're not a fucking doctor. Google does not make you a doctor. You didn't see what he saw. All that you're really going off of is your (well-meaning) but totally smothering mothering instinct. Yes, I know steroids suppress your immune system. Yes, I know some people get addicted to the way it makes them feel. Yes, I know it can lead to an increase in acne. Yes, I know you're more liable to get an infection while you're on them.

But godammnit, you are not a doctor. So quit fucking shouting at me and talking a million miles a minute. All you're doing is making me feel shitty about my choice of medical treatment. FFS, if the steroid treatment drives me insane or makes me feel like shit, I'll quit it and go get the surgery. But FFS, when a doctor says "If I were you I would...." I take that as a pretty reasonable assessment of what the best treatment option at this time is.

Nasal polyps?

Ding ding ding. Normally I wouldn't have geeked out about something like this....but when you manage to remove one of your own polyps by hand because they've become so pronounced...yeah.

PS: The steroids make me feel kinda drunk and nauseous, a little like I'm high. This is not what I was led to believe I would feel by the doctor. Because "super man!" this ain't.
« Last Edit: July 15, 2014, 04:59:32 pm by nenjin »
Logged
Cautivo del Milagro seamos, Penitente.
Quote from: Viktor Frankl
When we are no longer able to change a situation, we are challenged to change ourselves.
Quote from: Sindain
Its kinda silly to complain that a friendly NPC isn't a well designed boss fight.
Quote from: Eric Blank
How will I cheese now assholes?
Quote from: MrRoboto75
Always spaghetti, never forghetti
Pages: 1 ... 2643 2644 [2645] 2646 2647 ... 3345