No, Seniors write code that juniors can understand
M
marΓadelcarmenuribe8011Β year, 5Β months ago
I guess real senior write it like the junior version!
H
hakanhenk7471Β year, 3Β months ago
"Clean code" thrown out the window
G
gabriela.miranda1Β year, 1Β month ago
Seniors write code that is readable and maintainable. It is not the goal to cramp as much code as possible into one line.
M
michelle.ortega1Β year, 2Β months ago
Senior developer makes readable abd maintanable code for everyone not cripted code π
G
gaelhenriquedapaz4059Β months, 1Β week ago
readable is better than shorter.
charansarna1171Β year, 4Β months ago
PRO: print('Odd' if num&1 else "Even")
E
eloisa.cardenas1Β year, 3Β months ago
both are junior
monica.proctor9Β months ago
print("Even") 4 is always gonna be an even number LOL
R
robert_richardson1Β year, 2Β months ago
Regardless of how you code, if you really mastered the logic, you're master
K
kimberlyechoing261Β year, 6Β months ago
heres a cool number guessing game i mad (junior coding way) import time import random print("hello, welcome to the number guessing game!") time.sleep(2) print("you will have to guess number from 1, 10") time.sleep(2) print("if you get it right you get a point on your streak!") name = input("hello, what will be your username for this play? ") print("hello, " + name) print("steak so far is 0") time.sleep(3) print("computer is now guessing the number...") time.sleep(2) number = (random.randint(1, 10)) print("number has been chosen") time.sleep(1.5) player_guess = input("what do you think the number is? ") if player_guess == number: print("yay you got 1 on the streak") if player_guess != number: print("oh, sorry you got it wrong. ") time.sleep(1) print("GAME") time.sleep(.5) print("OVER!") hope this was cool, copy it pls
R
rebecca.jordan10Β months, 1Β week ago
Le me: print("hello world")
L
liabeier2611Β year, 1Β month ago
If this purpose is reducing lines as much as possible like a programming contest this senior way is better. But if this purpose is writing main-tenable and readable source code junior way is superior to senior way. And most of the case our purpose is writing good source code in order to implement business logic. So basically junior source code is better.
M
megan_miller1Β year, 2Β months ago
HACKER: print(num & 1 and 'Odd' or 'even')
N
normamcconnell2291Β year, 3Β months ago
Seniority doesn't come for lines go code instead it's from codes readability on the go, if I am not mistaken
M
melissa_haynes1Β year, 2Β months ago
Always remember KIS principle and to much optimisation itβs kill readability.
anel.valdez1Β year, 1Β month ago
Remember, legibility over conciseness.
R
robert_richardson1Β year, 4Β months ago
Senior... could be considered dated. We used to code like this to crunch for space and coders could be that single person doing it all. "Junior" is weening old heads out of the habit because not only that we have more space than we do in the past but we're not working on the same project anymore.
dagmarcascade311Β year, 1Β month ago
Actually, write just 1 instruction per line is a good practice. In critical projects, it could be mandatory
T
thomastempest621Β year, 1Β month ago
Now I know how to shorten my coding lines in python.
No, Seniors write code that juniors can understand
I guess real senior write it like the junior version!
"Clean code" thrown out the window
Seniors write code that is readable and maintainable. It is not the goal to cramp as much code as possible into one line.
Senior developer makes readable abd maintanable code for everyone not cripted code π
readable is better than shorter.
PRO: print('Odd' if num&1 else "Even")
both are junior
print("Even") 4 is always gonna be an even number LOL
Regardless of how you code, if you really mastered the logic, you're master
heres a cool number guessing game i mad (junior coding way) import time import random print("hello, welcome to the number guessing game!") time.sleep(2) print("you will have to guess number from 1, 10") time.sleep(2) print("if you get it right you get a point on your streak!") name = input("hello, what will be your username for this play? ") print("hello, " + name) print("steak so far is 0") time.sleep(3) print("computer is now guessing the number...") time.sleep(2) number = (random.randint(1, 10)) print("number has been chosen") time.sleep(1.5) player_guess = input("what do you think the number is? ") if player_guess == number: print("yay you got 1 on the streak") if player_guess != number: print("oh, sorry you got it wrong. ") time.sleep(1) print("GAME") time.sleep(.5) print("OVER!") hope this was cool, copy it pls
Le me: print("hello world")
If this purpose is reducing lines as much as possible like a programming contest this senior way is better. But if this purpose is writing main-tenable and readable source code junior way is superior to senior way. And most of the case our purpose is writing good source code in order to implement business logic. So basically junior source code is better.
HACKER: print(num & 1 and 'Odd' or 'even')
Seniority doesn't come for lines go code instead it's from codes readability on the go, if I am not mistaken
Always remember KIS principle and to much optimisation itβs kill readability.
Remember, legibility over conciseness.
Senior... could be considered dated. We used to code like this to crunch for space and coders could be that single person doing it all. "Junior" is weening old heads out of the habit because not only that we have more space than we do in the past but we're not working on the same project anymore.
Actually, write just 1 instruction per line is a good practice. In critical projects, it could be mandatory
Now I know how to shorten my coding lines in python.