this post was submitted on 18 Feb 2024
518 points (96.9% liked)

Programmer Humor

19197 readers
1129 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 

Insert <it's not much but it's honest work> meme. It only supports ints and bools, some logic and simple arithmetics and it compiles to Java but damn was it hard to get that far.

Can you guess what everything does?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 9 points 7 months ago (1 children)

Looks like you've got a bug in there.

if false no cap
    canYouSeeMe = false
if cap
    canYouSeeMe = true
sheesh

Won't this always go into the else/cap condition since the if condition is checking to see that false == true?

[โ€“] [email protected] 7 points 7 months ago

You're correct, but it doesn't really matter for demo purposes. In an actual use case (whatever that would be for this language) you would of course want to use some kind of variable or expression there instead of a constant.