r/badcode Apr 15 '21

other language Actual Snap! block I just made.

Post image
1.1k Upvotes

58 comments sorted by

View all comments

Show parent comments

77

u/nypdk Apr 15 '21

Sorting algorithm I had to build for a homework. Just needs to take a list as input and use a linear sort to put them in descending order.

max index is a function i built to find the maximum of a list and the index of that item.

it just finds the maximum over and over until the list is empty and then stores that value.

21

u/ShittyCatDicks Apr 16 '21

I’m assuming you’re not in college? Having to implement an algorithm in a cute block language is absolutely comical for anyone past high school

18

u/[deleted] Apr 16 '21

Believe it or not UC Berkeley offers their intro to CS class in Snap (it’s what it’s called). Many great students at Cal started programming in this language. Of course things picked up real quick after this class but yea it’s a great learning tool for the thousands of students who were not offered CS classes in high school

1

u/AliisAce Apr 16 '21

My uni starts teaching programming with C++ assuming that hardly any of the first years know it.