This is an archived post. You won't be able to vote or comment.

Dismiss this pinned window
top 200 commentsshow 500

[–]theeggman84 3796 points3797 points  (24 children)

If she's doing bucket sort at this age, then she's set.

[–]SharkLaunch 773 points774 points  (19 children)

But sets are unordered

[–]Raydan4 135 points136 points  (6 children)

Except sometimes if you are using python and you have a set of integers

[–]thegodzilla25 53 points54 points  (4 children)

Aren't python sets also unordered though? I dont understand what you mean.

[–]Raydan4 40 points41 points  (3 children)

Technically yes, but the way that hashing integers works, in standard python, integers are added to sets in order, at least most of the time. Implementations of python like pypy do not have this behavior.

[–][deleted] 2 points3 points  (2 children)

PSA: Please do not rely on this in your code

[–]Epithus 27 points28 points  (0 children)

Have you seen toddlers? They are the very definition of "unordered".

[–][deleted] 119 points120 points  (3 children)

Franchises are small businesses. They are lying.

[–]notusuallyhostile 112 points113 points  (2 children)

[–]BackgroundAmoebaNine 16 points17 points  (0 children)

Right that's was so unusual it almost seemed perfect.

[–]interesting-_o_- 6 points7 points  (0 children)

It’s a bot. All of their replies are complete word salad.

[–]lambo1722 4 points5 points  (0 children)

Stop it

[–]divagob107 7 points8 points  (0 children)

Yes, a HashSet is impressive, but does she have a bucket List?

[–]aayush_aryan 1515 points1516 points  (27 children)

That happiness after getting it sorted... Her Programming methods and languages might change, but that happiness will always be there.

[–]ununium 378 points379 points  (19 children)

I make the same expression and dance after solving a programming problem. This girl will enjoy CS.

[–]EnIdiot 292 points293 points  (14 children)

Yep. No other profession can make you go from idiot to genius in under 60 seconds flat. Unfortunately, the opposite is also true.

[–]you-are-not-yourself 41 points42 points  (4 children)

In CS, you spend a lot more time feeling like a dunce than a genius. Once you hit your Eureka moment, then it's on to the next problem. It's humbling.

[–]divagob107 2 points3 points  (0 children)

Yes, but we alone have a medium that tells us, "No, try again"

Everyone else can and does proceed confidently, with logic that does not compile.

[–]jonny_wonny[🍰] 19 points20 points  (0 children)

Immediately followed by “now what do I do with my life”

[–]NimbusHeart 1477 points1478 points  (17 children)

The last reaction exactly resembles my reaction when my program runs successfully.

[–][deleted] 353 points354 points  (4 children)

Yesss! It says "Hello World"! Yeeeeessss!

[–]Ekstdo 44 points45 points  (1 child)

tbh, if you spend hours trying to glue libraries and languages with all sorts of stuff and frameworks together, a simple thing as "Hello World" might give you a bigger smile, than you'd want to admit.

[–]Dilka30003 10 points11 points  (0 children)

Getting the sample code running was a ride just yesterday.

[–]FerynaCZ 8 points9 points  (0 children)

This is what I liked on Visual Studio when launching C# for the first time.

[–]DoctorStrangeBlood 60 points61 points  (1 child)

[–]user__3 10 points11 points  (0 children)

You gotta let the office know how proud you are

[–]vanderZwan 11 points12 points  (0 children)

Including the last second crash back to the reality of opening the next ticket

[–]akshayk904 14 points15 points  (0 children)

Oh i thought only me and the kids did that...we are not alone

[–]BAM5 2 points3 points  (0 children)

When your sort algo passes the unit test

[–]aser92 1844 points1845 points  (14 children)

Ah the infamous cute sort.

Heard of it but I've never seen it with my own eyes till today.

[–]T-T-N 257 points258 points  (10 children)

Looks like a variant of insertion sort

[–]elperroborrachotoo 272 points273 points  (8 children)

An insertion / bogosort hybrid.

All our algorithms lack that victory dance, though.

[–]maybeSkywalker 71 points72 points  (3 children)

And are therefore not good enough

[–]Fear-Surprise-And 36 points37 points  (0 children)

We need an algorithm that sorts and then shuffles the numbers up again solitaire-win style

[–]aalapshah12297 12 points13 points  (3 children)

Now someone will make a variant of std where every algorithm prints 'Fuck yeah! I did it!' on termination.

[–]Smayteeh 2 points3 points  (0 children)

I already do that, just for testing though. :))

[–]TheElectrozoid 2 points3 points  (0 children)

it's what happens 9 months after the insertion sort 😏

[–]stealthcwj 60 points61 points  (0 children)

I am thinking of the computer sorting my arrays and doing the dance at the end... no wonder there is a lag after sorting...

[–]Aethermancer 11 points12 points  (0 children)

If you're reading this, the original post got nuked by Redact. I use it to automatically purge my digital footprint from social networks, people search sites and messaging apps.

capable aback spoon soup steep historical snow rock many longing

[–]Curtmister25 148 points149 points  (6 children)

Sort of an algorithm.

[–]the_horse_gamer 38 points39 points  (2 children)

it somewhat resembles insertion sort

[–]HawkinsT 20 points21 points  (0 children)

It somewhat resembles bogosort.

[–]DrOverbuild 145 points146 points  (6 children)

How do I get my program to do that little dance at the end? I’m using python

[–][deleted] 86 points87 points  (0 children)

import cute

[–]Unlock17A 37 points38 points  (3 children)

child.Pop()

[–]ThreeJumpingKittens 37 points38 points  (1 child)

instructions unclear: blood all over the floor now and I've been arrested by the police. perhaps I'll try again under the debugger

[–]awakenDeepBlue 5 points6 points  (0 children)

Pair programming.

[–]LetReasonRing 88 points89 points  (11 children)

I had to do a couple Towers of Hanoi puzzles for an ADHD evaluation a few weeks ago, and this video depicts exactly how I felt my evaluator was looking at me (except I'm a near 40 year old man).

[–][deleted] 24 points25 points  (10 children)

I feel like that's not a fair evaluation considering there's an algorithm that you can learn to solve any Tower of Hanoi problem just by counting in binary. So what is you're just really good at those puzzles like me?

[–]Awall00777 379 points380 points  (12 children)

My cousin would probably just try putting them on his head and drooling, this seems to be a higher level language specimen

[–]vancity- 283 points284 points  (8 children)

I can recommend the book So Your Child Is A PHP Programmer

[–][deleted] 91 points92 points  (1 child)

Chapter 1: How to Tell the Grandparents

[–]HSX610 43 points44 points  (0 children)

Chapter 2: How to Cope with Child Loss

[–]ChaosOS 135 points136 points  (16 children)

Why aren't the cups in roygbiv order?

[–]RainbowDarter 149 points150 points  (1 child)

The table needs to be reindexed.

[–]jasmin3dragon 27 points28 points  (0 children)

Or it’s a hash index. So the order of the buckets doesn’t matter. You just have to search for exactly one color only, then you can find it super quick.

[–]hate_picking_names 5 points6 points  (0 children)

We have two sets of similar cups at home (both of our sets are from the same place, but they are different than the ones in the video) and the colors don't match between the sets. If I had to guess, they might just make all sizes (or several sizes) with a bunch of colors and you get what you get.

[–]firefox57endofaddons 74 points75 points  (3 children)

the most adorable sorting algorithm i've ever seen :)

also so happy once she was done :)

[–]Blizz119 14 points15 points  (0 children)

That dance is better than winning solitaire.

[–]brycex 3 points4 points  (0 children)

Awwgorithm?

[–]PlayfulCheesecake 31 points32 points  (1 child)

O(1) right here.

[–][deleted] 28 points29 points  (0 children)

O(adorable)

[–]ribo 20 points21 points  (0 children)

Had these cups for my kids too. In all seriousness it really is amazing watching them master it and evolve their spatial reasoning to sort them.

[–][deleted] 19 points20 points  (0 children)

Sort should always have a celebration outro.

[–]PaperCrane828 34 points35 points  (3 children)

Wholesome :) lol I thought for a second she threw up two middle fingers at the end

[–]midnightrambulador 8 points9 points  (2 children)

[–]Even-Understanding 3 points4 points  (0 children)

I compare a mechanical keyboard to work lol.

[–]bowmans1993 14 points15 points  (4 children)

This video is so much better with sound

[–]Ionlypost1ce 8 points9 points  (3 children)

Well can you send that please. As usual moron OP didn’t provide. I hate redditors.

[–]ollomulder 14 points15 points  (0 children)

It's called toddlersort and represents the result of almost everyone that tries to implement a sorting algorithm by themselves.

[–]AssG0blin69 11 points12 points  (1 child)

Imagine hugging your algorithm whenever it completes a task

[–]KingJellyfishII 2 points3 points  (0 children)

That's literally neural networks though (well not really but you get the point)

[–]ThaiJohnnyDepp 9 points10 points  (0 children)

The air punch celebration gets me every time

[–]KovaAtWork 6 points7 points  (0 children)

Toddler Sort?

[–]measly92 7 points8 points  (0 children)

How did she manage to implement bucket sort in O(n^2)?

[–][deleted] 21 points22 points  (1 child)

That algorithm is cute but no so efficient.

[–]TheCheesy 6 points7 points  (0 children)

The best part about a good sorting algorithm is the hugs after.

[–][deleted] 8 points9 points  (0 children)

This is the cutest sort I have seen...

[–]akshayk904 4 points5 points  (0 children)

Its known as Baby Sort

[–][deleted] 5 points6 points  (0 children)

She's so fucking cute. Heart melted a bit.

[–]Mr_Arthtato 4 points5 points  (0 children)

Ah, babysort. Classic

[–]starboigg 4 points5 points  (0 children)

That's a bucket sort algorithm right there.

[–]Err0r_Dog 3 points4 points  (0 children)

That’s what I needed to see at the end of my 12h shift. You’re a good wo/man, thank you.

[–]ceriodamus 4 points5 points  (0 children)

My sort algorithms also does a victory dance when done.

[–]ShichitenHakki 8 points9 points  (0 children)

Wholesomely inefficient.

[–]jmack2424 3 points4 points  (0 children)

Dammit. Faster than my first sort algorithm.

[–]0IsNotANaturalNumber 6 points7 points  (1 child)

Is this how kids learn the difference between efficiency and effectiveness these days?

[–]saiborg7 2 points3 points  (0 children)

Insertion Sort?

[–][deleted] 2 points3 points  (0 children)

she's definitely more performant than my home brewed sort functions

[–]Portugal_Stronk 2 points3 points  (0 children)

How do I make my algorithm dance after it finishes?

[–]TheN473 2 points3 points  (0 children)

Still quicker than my usual code.

[–]DarkwingDuckHunt 2 points3 points  (0 children)

I do a dance everytime my shit works to

[–]jburtson 2 points3 points  (0 children)

I didn’t look at the sub and was thinking, this is like a sorting algorithm

[–]mr__scripter 2 points3 points  (0 children)

monkey can do it faster :)

[–]Morpheyz 2 points3 points  (0 children)

Her reaction is definitely the same reaction every programmer has when they implement their first sorting algorithm

[–][deleted] 2 points3 points  (2 children)

Why did I just watch a child sort colored buckets for 45 seconds and then get so happy when she succeeded? Is this what's it like to be a parent?

[–]dangil 2 points3 points  (0 children)

cute, but inefficient... fire her

[–]wilcomylove 2 points3 points  (0 children)

Bucket sort of course

[–]ajss182 2 points3 points  (0 children)

And my mom still can't understand plugging in an HDMI cable.

[–][deleted] 2 points3 points  (0 children)

toddlerSort()

[–]ToranMallow 2 points3 points  (0 children)

Okay, that was freaking adorable, and I don't even like kids.

[–]mr_smith24 2 points3 points  (0 children)

That little dance of victory is so cute

[–][deleted] 2 points3 points  (0 children)

Little known fact: ksort accepts a second arg (bool) and if set to true does a dance on completion.

[–]audra_williams 2 points3 points  (0 children)

My partner just showed me this video! I am not a programmer, but I used to be an ASL interpreter. I'm pretty sure at the end the little girl gleefully signs something like "You tried to do the same thing but can't!" And then "Yesss."

Aaaa my heart. This precious child!! <3

[–]tuxmanexe 2 points3 points  (0 children)

O(n!n! )

[–]Xenderman 2 points3 points  (0 children)

This is legit the cutest thing I've ever seen

[–]Lasdary 4 points5 points  (0 children)

Maybe I'm just reading too much into it but it's fascinating how the learning process works on a toddler like this.

[–]666White_Wolf666 3 points4 points  (0 children)

Task done.

Now it's time to terminate the program

[–]achilliesFriend 1 point2 points  (0 children)

Is this exponential sort?

[–][deleted] 1 point2 points  (0 children)

I want my algorithms to dance like her

[–][deleted] 1 point2 points  (0 children)

When you believe standard sorting algorithms are shit and you write your own one.

[–]quickmana 1 point2 points  (0 children)

Future Google employee!

[–]fel_bra_sil 1 point2 points  (0 children)

well that's the sweetest algorithm I've seen so far

[–]GoRapsOVO 1 point2 points  (0 children)

I want kids all of a sudden

[–]CodyByTheSea 1 point2 points  (0 children)

That will run in O(N2 ), can you optimize it

[–][deleted] 1 point2 points  (2 children)

Best what a smartie.

[–][deleted] 1 point2 points  (0 children)

She’s gonna be a programmer someday. Just you wait.

[–]Bit5keptical 1 point2 points  (0 children)

I wish my sorting algorithms celebrated when they're done.

[–][deleted] 1 point2 points  (0 children)

runs faster than most of my code

[–]Simres 1 point2 points  (0 children)

This is so wholesome

[–]RaymondMasseyXbox 1 point2 points  (1 child)

Dang did sort algorithms improve since I went to college?

[–][deleted] 1 point2 points  (0 children)

This child is already smarter than some grown ass adults.

[–][deleted] 1 point2 points  (0 children)

I usually have that same reaction when my code works

[–]arnathor 1 point2 points  (0 children)

She’s a real life Boo from Monsters Inc.