this post was submitted on 22 Feb 2024
693 points (96.4% liked)
Programmer Humor
33336 readers
117 users here now
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.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Is this the same person who coded the odd/even function?
I have a better odd/even function:
This will work for both negative numbers and arbitrarily large integers. I've tested it up to 26 but I'm pretty sure it will work up to infinity.
Though serious question: Why are these forums coded in such a way that they ignore single newlines? How hard is it to replace a newline with a br tag?
Edit: added two spaces, should look much better.
Edit2: just looks a bit better lol
Edit3: better now?
It’s Markdown syntax. You can actually format it nicely in a code block:
You do that by adding ``` above and below it. To force single line breaks, you can terminate your sentences with two spaces, or a backslash.
Ah thank you, the editor in connect isn't great and doesn't have the markdown guide or buttons for the preformatted block, so I couldn't find the character combo to use it (and never would have guessed that lol). Also it keeps giving an error when I edit, though the edit is going through.