[spam][crazy] coding therapy [beginner]: hello world with conditional

Often when my reality is upside-down and inside-out and my body won't obey me because I considered contributing to an anonymity project or something, I find it nice to work on very simple software to try to engage a struggling skill. An Exercise In Software: Hello World With Conditional It goes something like this: if (1) { print("hello world'); } else { print("hello back from the world!"); } Conditionals seem to me a step up from a single statement, so it's a nice structural addition. You can do it in any language, or even pseudocode. You can put anything you want in the conditional, and output any statements you want, or even do something other than outputing! But if you add variables or further control flow, you are advancing to a further stage. If you actually need this, than further use of control flow may stimulate mind control discouraging grassroots software, at which time it may be relaxing to return to an earlier stage like this one, to practice.

Further content in this thread will be example exercises where I practice the approach myself. The idea is 1 statement per path through 1 control flow element. So Hello World With Loop could also fit here, to not make too many threads. do { print("Hello, world!") } while("spamming user with hello world statements, string evaluates to infinite loop");

if user.can_write_software: print("User, be skeptical about writing software. Practice more." elif not user.can_write_software: print("User, in your heart, you can write software. This is something you can do. Go, build software! Build software, user!")
participants (1)
-
Undescribed Horrific Abuse, One Victim & Survivor of Many