Vaporeon writes "worst pseudocode ever", asked to leave programming

(I understand that pseudocode is allowed to be bad, especially since I'm writing it just to figure out how the HTML parsing algorithm is supposed to work)

Follow

@vaporeon_ probably the worst code i ever wrote was when i was 12 and first learning how to program and i didn't know what for loops and while loops were so i would use GOTO statements in TI-BASIC to do loops

@vaporeon_ oh this is an ancient history sitting on ti-83 and ti-84s in my dad's house, maybe, so no can do unfortunately

@wallhackio If you ever can visit your father's house, please get the code for me

@wallhackio In assembly, there are no for loops nor while loops, only conditional jumps! So all your while and for get compiled to a conditional jump, anyway, while and for are just for the programmer's convenience (and they are very convenient)

In early FORTRAN versions, if I remember correctly, there also is no general-purpose while loop, only a DO loop to iterate over a range of numbers, so you also have to use conditional GOTO if your control flow doesn't fit into a DO loop

And that made the UNIX people so unhappy that they invented a preprocessor called Ratfor that lets you do structured programming (with while loops and such) in FORTRAN

So what you did is not unheard-of, it's just extremely silly to do it in a language that does have the while loops

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.