I’ve seen someone code that way. Not since high school, but that’s a way that some people think coding works when they start out writing code.
This person was trying to write a game in (trigger warning: nostalgia) QBasic and had it drawing kindof a Pacman kind of character. And in pseudocode basically what he was doing was:
// Draw character with mouth open at (100, 100)
moveCursorTo(100, 100)
drawLineFromCursorAndMoveCursor(116, 100)
drawLineFromCursorAndMoveCursor(108, 108)
drawLineFromCursorAndMoveCursor(116, 116)
drawLineFromCursorAndMoveCursor(100, 116)
drawLineFromCursorAndMoveCursor(100, 100)
// Wait for half a second.
sleepSeconds(0.5)
// Draw character with mouth closed at (101, 100)
moveCursorTo(101, 100)
drawLineFromCursorAndMoveCursor(109, 100)
drawLineFromCursorAndMoveCursor(117, 108)
drawLineFromCursorAndMoveCursor(109, 116)
drawLineFromCursorAndMoveCursor(101, 116)
drawLineFromCursorAndMoveCursor(101, 100)
// Wait for half a second.
sleepSeconds(0.5)
// Draw character with mouth open at (102, 100)
moveCursorTo(102, 100)
drawLineFromCursorAndMoveCursor(118, 100)
drawLineFromCursorAndMoveCursor(110, 108)
drawLineFromCursorAndMoveCursor(118, 116)
drawLineFromCursorAndMoveCursor(110, 116)
drawLineFromCursorAndMoveCursor(102, 100)
// Wait for half a second.
sleepSeconds(0.5)
...
He hadn’t gotten to the point of working in user controls. (Like “change direction to ‘up’ when user presses the ‘up’ key” or whatever.) And understandably had no idea how that would work if/when he got that far.
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
Posts must be relevant to programming, programmers, or computer science.
No NSFW content.
Jokes must be in good taste. No hate speech, bigotry, etc.
I’ve seen someone code that way. Not since high school, but that’s a way that some people think coding works when they start out writing code.
This person was trying to write a game in (trigger warning: nostalgia) QBasic and had it drawing kindof a Pacman kind of character. And in pseudocode basically what he was doing was:
He hadn’t gotten to the point of working in user controls. (Like “change direction to ‘up’ when user presses the ‘up’ key” or whatever.) And understandably had no idea how that would work if/when he got that far.