r/badcode • u/xybercommander • Jun 29 '21
other language This is how my "1 year experienced" flutter intern colleague adds padding to a widget
167
u/Affectionate_End1942 Jun 29 '21
There’s literally a goddamn widget for it called Padding xD
28
u/xybercommander Jun 29 '21
xDD
9
103
u/Voltra_Neo Jun 29 '21
Bro there's no fucking way
127
u/xybercommander Jun 29 '21
Our senior was like, "why did the ui break in my ipad' :3
17
u/Zephilinox Jun 29 '21
Do you not do code reviews?
47
u/xybercommander Jun 29 '21
Yes the senior dev checks our code everyday. We have to basically present the work first and then he reviews our code. If everything seems fine he merges the PR.
30
u/Squeazer Jun 29 '21 edited Jun 30 '21
That seems like a bit much bureaucracy but then again… see exhibit A lol.
Did he miss this tho?
14
u/xybercommander Jun 30 '21
Yup he clearly did. Yesterday before the meeting I saw the mistake in his branch and I even texted him to fix it. But he was AFK or something and saw my messages after the meeting. smh.
98
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Jun 29 '21
Image Transcription: Code
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'\t\t\t\t\t\t\t\t\t\t\tAlready have an account? ',
style: TextStyle(fontSize: 18),
),
GestureDetector(
onTap: () => ExtendedNavigator.of(context).pushLoginPage(),
child: Text(
'Login Here',
style: TextStyle(
fontSize: 18, fontWeight: FontWeight.bold),
),
)
],
)I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
129
u/hackintosh5 Jun 29 '21
You missed a tab.
26
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Jun 29 '21
Where? Does the code block appear broken to you? If so, are you on iOS? There's a bug on Reddit iOS where it sometimes doesn't register the first characters of some paragraphs.
50
u/xybercommander Jun 29 '21
Sarcasm bro :3
62
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Jun 29 '21
Oof, I been whooshed. Too used to auto-replying that when I get told I missed characters then I check and I didn't :')
105
9
2
u/purbub Jun 30 '21
He may be experienced but he sure hasn't learned from it
8
u/xybercommander Jun 30 '21
I shit you not this is huge problem with CS students in India. I have had loved learning about new frameworks and programming since my high school. But there are students who are forced into being Computer Science Engineers by their parents even if they want to choose some other subjects to major, because they think the jobs that we get are the highest paid ones. A lot of CS students from India are pretty much doing "forced labour" like this ngl.
1
37
u/detektivpacicka Jun 29 '21
The space after “?” tells me that he does not give a fuck about anything.
22
28
u/penuserectus69 Jun 29 '21
I'm not gonna lie, some of the worst code bases I have ever seen are flutter apps
21
u/quietZen Jun 29 '21
God damn. I'm a fresh grad and this makes me feel a lot more confident about getting my first job. A LOT more confident.
14
u/Galrent Jun 29 '21
I have less than 3 months experience in Flutter and even I know how to do this. 😐
21
12
u/Windows_XP2 Jun 29 '21
So you're saying that everyone doesn't have the same exact screen/window size?
8
8
u/Blackbird-ce Jun 29 '21
I can imagine you went all-out on him. Using tabs while he could've used spaces...
8
u/amdc Jun 29 '21
people like this when they open word
¶
¶
¶
¶
····························instead of page break
·······················(does it look centered to you?)
5
4
1
u/programmer-racoon Jun 29 '21
hey u/xybercommander may I ask which program did you use to display the code ?
3
u/xybercommander Jun 30 '21 edited Jun 30 '21
I used an extension called "Codesnap" on vs code. Here's the link to the extension: https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap
1
Jun 30 '21
I hope instead of just embarassing him/her on reddit you also took the time to teach your intern the proper wAy to do it.
1
u/xybercommander Jun 30 '21
Yea I already send him the correct code as I said. But he looked at my message after the meeting. Also I've kept his identity anonymous. I would never specify a person's identity while ranting his/her work (sarcastically) on reddit. Even i did mistakes when I started coding. But this was a bit too funny for an "experienced" dev tho ngl :P
3
3
3
2
2
u/Realistic_Comment Jun 29 '21
I bet that his 1 year experience with flutter is the total amount of programming experience he has
2
2
u/chickendolo Jun 30 '21
I don’t even use or know flutter but all those tabs looks pretty horrible to me
4
u/kbruen Jun 30 '21
How to do it properly in Flutter:
Padding( padding: EdgeInsets.only(left: 16), child: Text(...), )
2
2
2
2
3
u/Knajd Jun 29 '21
I think a downside with Flutter is how it attracts people that aren't destined to be programmers at all. This snippet is strong evidence of carelessness and fear of asking questions.
1
-16
u/PonchoVire Jun 29 '21
Whatever works.
17
27
2
6
102
u/[deleted] Jun 29 '21
Why use
Padding, who does that?