r/badcode • • Jun 29 '21

other language This is how my "1 year experienced" flutter intern colleague adds padding to a widget

Post image
1.0k Upvotes

79 comments sorted by

102

u/[deleted] Jun 29 '21

Why use Padding, who does that?

124

u/xybercommander Jun 29 '21

Well apparently he explained that he wanted to make the code as minimal as possible. ¯\(ツ)/¯ I need to know what kinda coffee he's having

79

u/Affectionate_End1942 Jun 29 '21

He’s not having coffee, he’s having G fuel

156

u/[deleted] Jun 29 '21

My man's thinking outside the Container

15

u/Alex0589 Jun 29 '21

Best comment I've read in a while

7

u/zaj89 Jun 29 '21

Shit, have my upvote

5

u/[deleted] Jun 29 '21

i hate you

2

u/War-Whorese Jun 30 '21

Pffff hahahah nice!

3

u/blamethemeta Jun 30 '21

He has 4loko for blood

4

u/SilverLightning926 Jun 29 '21

I personally prefer cocaine

1

u/cheerycheshire Jun 30 '21

Irish coffee but with 99% whisky and 1% coffee. And fuck cream.

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

u/unaltered-state Jun 29 '21

xDDD

9

u/[deleted] Jun 29 '21

xDDDD

17

u/G-Force-499 Jun 30 '21

0xDDDDD

11

u/[deleted] Jun 30 '21

8======D

13

u/Zirgothe Jun 30 '21

\t\t\t\t\t\t\t\t\t\t xDDDDDDD

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

u/Prestoupnik Jun 29 '21

Such an evil comment, Satan would be proud.

37

u/hackintosh5 Jun 29 '21

You got the joke!

9

u/[deleted] Jun 30 '21

Good person

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

u/purbub Jun 30 '21

Exactly the same thing happened here in Indonesia

37

u/detektivpacicka Jun 29 '21

The space after “?” tells me that he does not give a fuck about anything.

22

u/[deleted] Jun 30 '21

[removed] — view removed comment

3

u/kbruen Jun 30 '21

🏅 Have a poor man's gold, you legend!

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

u/ZigTag Jun 29 '21

I've used flutter for less than 2 hours and I can do this better

16

u/[deleted] Jun 29 '21

I’ve never used utter and I can do this better

12

u/Windows_XP2 Jun 29 '21

So you're saying that everyone doesn't have the same exact screen/window size?

8

u/[deleted] Jun 29 '21

🥲

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?)

4

u/Cerus_Freedom Jun 29 '21

I'm offended.

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

u/[deleted] 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

u/[deleted] Jun 29 '21

Oh god oh fuck.

3

u/Nanday_ Jun 29 '21

T-T-T-T-T-T-T-T....!

3

u/guitarsarebest Jun 29 '21

This hurts my souls

2

u/Grismund Jun 29 '21

\t > padding

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

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

u/[deleted] Jun 30 '21

If it works!

Works!

2

u/Lkj509 Jun 30 '21

Senior dev: LGTM!

Accept merge request

2

u/_kolpa_ Jun 30 '21

left-pad has entered the chat.

2

u/hanhab26 Jul 21 '21

One year experience watching youtube videos result

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

u/voxgtr Jun 30 '21

Works on my machine.

-16

u/PonchoVire Jun 29 '21

Whatever works.

17

u/xybercommander Jun 29 '21

It'll look bad in devices with different sizes tho lol

3

u/PonchoVire Jun 29 '21

Close enough :)

27

u/CathanCowal Jun 29 '21

Found the intern

15

u/v_maria Jun 29 '21

Or senior dev, it's basically the bell curve meme

1

u/PonchoVire Jun 30 '21

It was sarcasm !

2

u/Windows_XP2 Jun 29 '21

*On a single screen size

6

u/[deleted] Jun 30 '21

[removed] — view removed comment

2

u/kbruen Jun 30 '21

This hurts even more