232
50
3.5k
u/NonCombat Mar 17 '23
Ehh, "Sorry babu" isn't gonna work. She wanted "Sorry Babu".
1.4k
u/JonathisV Mar 17 '23
Pretty sure what she wanted was "it".
271
28
Mar 17 '23
She asked to say it, not print it, maybe a voice message saying it 1000times. Lol
→ More replies (2)31
→ More replies (8)8
154
→ More replies (9)27
u/Derpyzza Mar 17 '23
most likely not a she, I've never seen anyone refer to a woman as babu
39
u/null_check_failed Mar 17 '23
It’s in Hindi and that is cringe meme of couples shenanigans
“Sorry baby” “mela sona” Etc etc.
→ More replies (9)→ More replies (5)7
711
Mar 17 '23 edited Mar 17 '23
First thing someone messages you is “sorry babu”? Must be a very popular person
196
u/Valalcar Mar 17 '23
I have a close friend that constantly deletes all her conversations. Every conversation she has looks like this.
Once we were returning on the same car, and she drunkenly sent an audio message to a common friend making plans, deleted, and next day was asking me what she said because she had no idea what they were talking about
38
7
95
u/mookanana Mar 17 '23
maybe he lost her phone, and when she got a new phone, he tries to say sorry baby
but apparently also failing at that
0
2.1k
u/rull3211 Mar 17 '23
Who da fuq defines a loopvariable outside of the loop
839
u/rmflow Mar 17 '23
ex C programmers
179
297
→ More replies (9)14
u/Alexander_The_Wolf Mar 17 '23
? I always declare my loop variables in the start of the for. Who is teaching otherwise?
→ More replies (5)62
29
14
18
u/JonathisV Mar 17 '23
It is sometimes.. Rarely useful. If you have a break condition and want to use the last index for something. Honestly I use this a lot for leetcode type algorithms.
→ More replies (1)8
→ More replies (27)8
1.6k
u/LonesomeHeideltraut Mar 17 '23
Please declare x within the for loop. I cannot merge this code smell into production. Sorry.
146
u/Brief-Preference-712 Mar 17 '23
And indent line 5. Not a code smell but I still can’t merge it
→ More replies (5)342
u/MarkWantsToQuit Mar 17 '23
Literally the first thing I noticed and immediately agitated me. I think I may have issues 😂
→ More replies (3)44
71
21
u/SameRandomUsername Mar 17 '23
Clearly you never suffered the "Closing over the loop variable" issue in C# before 5.0
→ More replies (22)24
Mar 17 '23
Even better, call it i and not x, since x is not descriptive. i is short for iterator though.
59
641
u/PM_ME_BAD_ALGORITHMS Mar 17 '23
This will print it 1001 times since the iterator starts at 0 and the condition is lower OR EQUAL
If the only purpose of x is to be used as an iterator, you should declare it within the loop
No wonder she left you.
/s
→ More replies (15)78
u/grateful-smile Mar 17 '23
She didn’t say exactly 1000 times though, so the solution should still be valid. Only problem is that
“Sorry Babu”.equals(“Sorry babu”);
returns false.
→ More replies (3)30
95
u/butchbadger Mar 17 '23
It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It It
45
u/Kanomus_37 Mar 17 '23
I counted it, it's exactly 1000 "it"s. You get the well deserved upvote
→ More replies (2)
207
u/BigNutBoi2137 Mar 17 '23
print("\n".join(["Sorry Babu"]*1000))
Take care of your fingers, lads. Type less.
110
u/androt14_ Mar 17 '23
Typ evn lss
print(("Sorry Babu\n"*1000)[:-1])66
u/BigNutBoi2137 Mar 17 '23
Good catch. I hate dangling new lines, so good job with
[:-1]→ More replies (1)→ More replies (7)8
32
20
6
8
→ More replies (6)6
67
u/TazGiraffe Mar 17 '23
why in the hell did you use x as the iterable instead of i
→ More replies (3)31
31
u/D34TH_5MURF__ Mar 17 '23
IntStream.range(0, 999).forEach(System.out::println(...)
SMH
That's break up material...
→ More replies (2)24
u/j0akime Mar 17 '23
or just use String.repeat(int).
System.out.println("Sorry Babu\n".repeat(1000));8
u/fuckEAinthecloaca Mar 17 '23
What in sweet jesus. I don't remember that in java 6
→ More replies (2)
55
u/Sunscratch Mar 17 '23
Well, this code already has a bug, given the requirement above
→ More replies (1)6
25
19
u/Sad_Daikon938 Mar 17 '23 edited Mar 18 '23
It's a shame your Babu didn't write this.
javac Sorry.java
java Sorry
94
u/Kinkelin Mar 17 '23
Pro move would be writing a python script that types it into your Whatsapp Web window and produces 1000 actual messages
→ More replies (7)
72
u/androt14_ Mar 17 '23
Virgin Java:
class Sorry{
public static void main(String[] args){
int x;
for(x=0; x<=1000; x++){
System.out.println("Sorry babu");
}
}
}Chad Kotlin:
for(i in 1..1000)
println("Sorry babu")55
10
u/el_colibri Mar 17 '23
Chad Kotlin:
for(i in 1..1000) println("Sorry babu")I have never used Kotlin before.. That seems like such a breath of fresh air!
→ More replies (6)11
u/Brief-Preference-712 Mar 17 '23
Chad C#
foreach (var _ in Enumerable.Range(1000)) Console.Write("Sorry Babu");9
4
u/dpash Mar 17 '23
In the near future you can probably write this is Java:
void main() { for(int x = 0; x < 1000; x++){ println("Sorry babu"); } }→ More replies (1)4
u/_xiphiaz Mar 17 '23
fun main() = repeat(1000) { println(“Sorry Babu”) }Pretty sure this is valid kotlin too
→ More replies (5)4
u/blosweed Mar 17 '23
Java has ranges too :)
IntStream.range(0, 1000).forEach(() -> System.out.println(“Sorry babu”));
15
12
11
u/momokosa Mar 17 '23
Just for safety you should make an infinite for loop. You can fix it later
→ More replies (1)
10
u/JustSpaceExperiment Mar 17 '23
Who the fook declares variable outside for cycle scope when it is used only as counter for for cycle.
→ More replies (1)8
8
u/StarIU Mar 17 '23
You see, engineers don’t build product. A civil engineer doesn’t build buildings. They produce blueprints for construction workers.
Similarly, software engineers don’t build softwares, we write code. Code is like the blueprints for compilers and interpreters.
from the book Clean Code, paraphrased.
They should’ve run the code and sent the output instead of sending the code itself.
Also, the i goes from [0, 1000], that’s 1001 times. They missed the spec.
7
6
6
6
u/CarlStanley88 Mar 17 '23
Why choose a compiled language? Also you haven't invoked anything, just declared it...
11
u/Aminowana Mar 17 '23
print "Sorry babu " x 1000
done, a camel can help us with that
→ More replies (1)
5
5
u/Outrageous-Machine-5 Mar 17 '23
He's clearly doing java, why declare x outside of the for? It's only needed in the block scope/could be declared as part of the for statement
15
u/mkwiiallpro Mar 17 '23
Apology not accepted
Java 🤮
Looping one too many times
Declaring x outside the for loop. You’re in Java, not in C, remember? You don’t need to do this anymore.
4
4
4
4
4
u/edireven Mar 17 '23 edited Dec 19 '25
sparkle wipe dinner live include yoke direction label middle act
This post was mass deleted and anonymized with Redact
4
4
u/RealSchweddy Mar 17 '23
That will print it 1001 times and no need to declare the int x outside the for loop. I’m not approving this pull request
4
4
u/2Lazy2BeOriginal Mar 17 '23
Technically you said sorry 1002 times. One from the e message and 1 from the fact that it’s a <=
4
1
u/Assembly_x86 Mar 17 '23
include <stdio.h>
void main() { for(int i = 0; i <= 1000;i++) { printf("Sorry"); } }
→ More replies (2)1
1
1
1
3
3
3
u/Tanjirou_and_kirito Mar 17 '23
"No one outside of this chat, not even WhatsApp, can read or listen to them"
well.....
3
3
3
3
3
3
3
3
3
u/Lambejor Mar 17 '23
This will be 1001 times. You are starting at 0. Should be < 1000 exclusive. Classic off by one error XD
3
3
3
3
3
u/HokieNerd Mar 17 '23
How am I reading this chat, if no one outside this chat can read it? 🤔
→ More replies (1)
3
3
3
3
9
u/Filin_Fill Mar 17 '23 edited Mar 17 '23
if you want to do it in python:
for i in range(1000):
print('Sorry Babu')→ More replies (2)
4
2
u/stillbarefoot Mar 17 '23
Not reusable. At least put “Sorry Babu” in a variable so he can apologise to other girls too without much effort.
2
2
2
2
Mar 17 '23
I got u bro
public class Bubu {
`public static void main(String[] args) {`
`int x = 1;`
`while (x<=1000) {`
`System.out.println("Sorry, bubu");`
`x++;`
`}`
`}` }
2
2
u/PhantomOTOpera Mar 17 '23
That will print 1001 times, and there's no need do declare x outside the for loop. 0/10 code
2
Mar 17 '23
This is the junior dev solution, the senior dev solution is :"It one thousand times". Way fewer keystrokes.
2
2
2
2
2
2
2
2
2
2
2
u/ChiaraStellata Mar 17 '23
Why would you not write this in one line of Python? Or one line of C# using top-level statements? Or BASIC or Perl if you want to go old school? So weird to choose the most verbose solution.
→ More replies (2)
2
u/Every_Masterpiece_15 Mar 17 '23 edited Mar 17 '23
There are more efficient ways to tell sorry, actually think you can do the trick faster using Perl!
!/usr/bin/perl
use feature ':5.10'; use warnings; use strict;
$a = 1; while ($a < 1000){ say "Sorry"; $a++; }
2
2
2
2
2
2
2
2
2
2
u/SirFireball Mar 17 '23
If you’re gonna make this joke, why write it in a lang with this much boilerplate?
2
2
2
2
2
2
2
2
2
2
u/International-Top746 Mar 18 '23
The code will say 1001 times. Which doesn't match the requirements
2
2
2
u/Ducking_eh Mar 18 '23
If he wanted to make sure the message wasn’t miss-interpreted; he should of done it in Assembly
2
2
u/Horror_Peak_9435 Mar 18 '23
Actually it prints 1001 times so you should use x=1 instead of x=0 Also you can use Excel instead of Java you can get the result in half a millisecond and you can copy that and also you do not require ide to run the program
2
2
2
u/Schievel1 Mar 18 '23
Don’t be too harsh on him. He’s programming Java. I think even this economy should have a place for the mentally challenged.
2
2
2

8.9k
u/fliguana Mar 17 '23
Off by one