0

code

posted in Off Topic
Comments:
Threaded Linear
#1
natalie

function flip(n) {
if (n == 1) {
return 2;
}
return 1;
}

greatest function ever written, it will save humanity and stop the AI takeover

#2
SENfns
1
Frags
+

game = yes
hacks = no

ts coding shit is easy

#12
sorcus
0
Frags
+

local game = true
local hack = false

#3
W1ngFly
0
Frags
+

You might be ON something

#4
mondely
0
Frags
+

this is so useless, it hurts my eyes

#5
natalie
0
Frags
+

i actually needed it though :sob:

#7
mondely
0
Frags
+

ok :( it was useful ig for quickly flipping if u rlly need to use it over and over again for some reason for alot of other functions

#28
Dumbfoon
0
Frags
+

for what?!?!?

#6
Foxym
0
Frags
+

coding is easy until you make a program with 100+ variables and no comments (how i coded my VCT data program)

#9
mondely
0
Frags
+

100+ variables isn’t that bad. no comments is cancer though, u atleast put small reminders so u don’t have to figure everything out again after being away from it for awhile

#11
Foxym
0
Frags
+

i dont really think so
for me atleast, the variables and functions are self explanitory enough though
https://pastebin.com/qM7kyC92

#13
natalie
0
Frags
+

KIWOOM DRX aka "KRX"... absolute terror of a rename

REALLLLLLLL THIS SHIT IS SO ASS

#14
mondely
0
Frags
+

variables are not self explanatory. the whole point of comments is not just to understand what a variable does but how it all comes together to work with the other parts of a function/object/class/file

#18
Foxym
0
Frags
+

thats why i said for me

#19
mondely
0
Frags
+

t try to add a few comments bro. trust, it will be helpful

#20
Foxym
0
Frags
+

doing rn
https://i.ibb.co/LzSQdQrp/image-1776952581353.png

#21
mondely
0
Frags
+

W goodluck broski

#25
Targu1n
0
Frags
+

just to clarify: do you mean comments or documentation?

#26
mondely
0
Frags
+

comments. it isn't documentation because it is more brief and alot less organized

#29
Targu1n
0
Frags
+

then I have to disagree with your above comment

comments (as in "notes" that are to be read alongside the code) should never be necessary (they ofc are from time to time, however they should be used with purpose)

proper naming + documentation should be used to achieve the goal you described above
(the most practical reason being that your ide shows you documentation, but doesnt show you comments when accessing a function/variable from another location)

So e.g. (from https://realpython.com/documenting-python-code/#commenting-vs-documenting-code)
def say_hello(name):
"""A simple function that says hello... Richie style"""
print(f"Hello {name}, is it me you're looking for?")

vs

def hello_world():
# A simple comment preceding a simple print statement
print("Hello World")

#30
mondely
0
Frags
+

I never said u HAVE to use comments but that it is good to have comments

#31
Targu1n
0
Frags
+

fair
however what you described initially is something you HAVE to have (just in documentation form)

#32
mondely
0
Frags
+

u can put anything u want in comments. if it helps u, u can put it. it isn't always strictly to only describe a simple variable or line

#10
SPR1NG
0
Frags
+

Bruh who need comments anyways, code hygiene is only something told in books to programers once they grow up, a fairytale

#15
mondely
0
Frags
+

i dont do that many comments, but have some atleast bro

#16
SPR1NG
0
Frags
+

I have projects with like over 30000 lines of code without comments but yea it fucking painfull af finding stuff in there. Luckely I've improved a bunch on doing comments

#17
mondely
0
Frags
+

wth 30k lines?

do u not have seperate files

#22
SPR1NG
0
Frags
+

In this instance no, it was a fucking stupid project however so thats the reason

#23
mondely
0
Frags
+

make sense. atleast u can say u did a project with +30k lines

#34
SPR1NG
0
Frags
+

Yea my portfolio has some golden points. Unluckely im young

#8
aiminverylabs
0
Frags
+

yes

#24
Pikachu_Gay
0
Frags
+

ammo = 0
if ammo == 0:
print("Reloading... ")
else:
print("Fighting ")
print("Reloads mid-fight 🤡")

#27
zappp
0
Frags
+

who's more gay greninja or pikachu

#36
Pikachu_Gay
0
Frags
+

pikachu, you see he never goes to his pokeBall

  • Preview
  • Edit
› check that that your post follows the forum rules and guidelines or get formatting help
Sign up or log in to post a comment