r/ProgrammerHumor • • Nov 06 '20

Meme Totally agree

Post image
52.1k Upvotes

474 comments sorted by

View all comments

2.4k

u/[deleted] Nov 06 '20 edited Nov 06 '20

Spoken like two brogrammers in an intro to programming class

732

u/the_ashman18 Nov 06 '20

“Hello World” and other humorous things

212

u/kleineaxolotl Nov 07 '20

“Hello Bro”

141

u/grizonyourface Nov 07 '20

Wait how do you change it from saying “Hello World!” to “Hello Bro!”? Let me check stack overflow.

113

u/Bainos Nov 07 '20

"Hello World!" - "World!" + "Bro!"

48

u/[deleted] Nov 07 '20

Wait does this actually work? I have been coding in python for years and I didn’t even know you could do this.

82

u/rogerrrr Nov 07 '20 edited Nov 07 '20

Unfortunately no, string subtraction is not supported.

However in Python 3.9 they added the string method .removesuffix, which serves a similar purpose.

So "Hello World".removesuffix("World") + "Bro" should get the job done.

71

u/itchy_bitchy_spider Nov 07 '20

Alternatively use replace... Support ed since forever I think lol

"Hello World".replace("World", "Bro")
→ More replies (2)

14

u/tailwarmer Nov 07 '20

String multiplication does, however, unfortunately work. Hello * 5 = HelloHelloHelloHelloHello

How do I know? A nasty production bug :(

→ More replies (1)
→ More replies (3)

26

u/Sirvolker757 Nov 07 '20

“The tutorial said nothing about this.”

→ More replies (1)

9

u/guruscotty Nov 07 '20

10 print hello

20 t=1 to 40

30 goto 10

270

u/flaming_goldfish Nov 07 '20

That guy is def a brogrammer. If you look at his Twitter feed it's basically him replying ingratiatingly to every tweet elon musk makes.

0

u/[deleted] Nov 07 '20

[deleted]

73

u/lazerflipper Nov 07 '20

It’s people trying to gain followers/visibility through someone else. It’s probably a bunch of bots or people who get paid.

→ More replies (2)

16

u/CorruptionIMC Nov 07 '20

Agreed on the first bit, but it's a bit different with Trump from what I've seen. They usually put out one or two tweets about him that randomly get a ton of attention, and then they keep at it because those tweets got more attention than anything else they've tweeted. Probably either because of the "influencer high" or because they think it'll keep their reach high enough that they can use their Twitter for some kind of marketing purpose.

30

u/ChooseAndAct Nov 07 '20

If you have notifications on and a work from home job I totally see alt-tabbing, spending 5 seconds to come up with something witty, and positing it.

→ More replies (4)

15

u/[deleted] Nov 07 '20

him replying ingratiatingly to every tweet elon musk makes.

“Notice me Senpai!!! 😩😭”

→ More replies (5)

33

u/[deleted] Nov 07 '20

Welcome to this sub

110

u/Tr0user_Snake Nov 07 '20

Especially since the '#' doesn't indicate that some text is "not worth reading". It specifies the beginning of a specific token to the lexer that is then ignored during parsing and subsequent compilation/interpretation steps.

The comment itself is still read (i.e. loaded into memory) by the computer.

78

u/ForsakenWafer Nov 07 '20

Also it's called a hash.

Hashtag is specifically a social media thing

0

u/[deleted] Nov 07 '20

[deleted]

51

u/way2amayesing Nov 07 '20

I've always known it as a "hash" because for me a pound sign is "£"

→ More replies (3)

34

u/aboardthegravyboat Nov 07 '20

Hashtags are called hashtags because they are tags that start with a hash. Twitter was originally billed as a "microblogging" platform. If you remember from the early blog days, tags were a big thing - tagging articles instead of categorizing them. Tag clouds were all the rage. Seriously - managers ate that this up. "Our blog needs a tag cloud! Tag clouds are the shit!" So Twitter also decided to support tagging, but instead of adding a separate field, you just push a hash in front of it. Hashtags were born.

It's insane to me how many programmers call the character itself a "hashtag"

→ More replies (1)
→ More replies (6)
→ More replies (1)

9

u/shadowdsfire Nov 07 '20

Doesn’t really fit the joke though...

“In python, hastags are used to specify the beginning of a specific token to the lexer that is then ignored during parsing and subsequent compilation/interpretation steps, much like in social media.”

→ More replies (2)
→ More replies (7)