I want to propose a programming challenge. This could be fun for beginners and experienced programmers as well. It is language agnostic. It might even be more about community than the programming part itself. The challenge itself should not take more than an hour. But it shouldn't be so simple that you don't have to put in a little effort. I will propose the first one, and those who participate are welcome to propose the next and as we can agree on it we can go off and knock it out.
Once you see other people's results you can modify your own, or even propose something to make someone else's better or faster or fix a bug that you find.
These can become toy programs for you to have around for testing concepts, and helping to try out other languages.
If you are interested or know someone else who might want to play too share this with them.
I guess we can use this thread to get started, and I guess i am supposed to use a hashtag for something like this so how about #toyprogrammingchallenge
I will try to work in Python at least in the beginning but you are welcome to work in whatever you are comfortable with.
#toyprogrammingchallenge
First challenge:
"Ninety-nine bottles of beer on the wall"
Generate the whole song from "Ninety-nine" to "No". The output should look like :
Ninety-nine bottles of beer on the wall.
Ninety-nine bottles of beer. Take one down,
pass it around... Ninety-eight bottles of beer.
(You know what the middle looks like)
Two bottles of beer on the wall.
Two bottles of beer. Take one down,
pass it around... one bottle of beer.
One bottle of beer on the wall.
One bottle of beer. Take one down,
pass it around... No bottles of beer.
I won't put too many specifics on how you get there, but the output should be words, not numerals :) Try to write clean, maintainable and visually understandable code.
Let see if I am alone or anyone wants to play along. :)
Here is my first attempt total time 48 minutes.
A really cool programmatic ( #Python ) solution to the 100 pots problem by @Absinthe was posted here, worth checking out:
I posted the 100 pots problem I had shared here earlier to our discourse. Even though I already gave the answer I thought I'd share it here in case anyone has anything they would like to share or discuss about the topic:
As we covered, if you ask someone not to tag you or spam your account with unwanted messages, and you ask someone multiples times, they explicitly refuse and then continue to do so some 20 times even after a block. That **is** harassment by any definition of the term.
Also doesnt matter if you see it as harassment or not unless you can somehow actually make a compelling argument that convinces the admins/moderators but sadly no one has come close to doing that.
Sorry I've been away, was walking around Amsterdam all weekend and configuring a fresh Archlinux install on my Surface Book 2.
Had the basic install working a few days ago but was mostly tweaking and configuring the window managers to be pretty and behave how i like. I got both i3 and qtile working with mostly all the same key bindings. Its pretty cool and looks super sexy.
The Mr. Rogers episode following the Kennedy assassination. He tried to help teach the kids to cope with it.
Jeffrey Phillips Freeman
Innovator & Entrepreneur in Machine Learning, Evolutionary Computing & Big Data. Avid SCUBA diver, Open-source developer, HAM radio operator, astrophotographer, and anything nerdy.
Born and raised in Philadelphia, PA, USA, currently living in Utrecht, Netherlands, USA, and Thailand. Was also living in Israel, but left.
Pronouns: Sir / Mister
(Above pronouns are not intended to mock, i will respect any persons pronouns and only wish pronouns to show respect be used with me as well. These are called neopronouns, see an example of the word "frog" used as a neopronoun here: http://tinyurl.com/44hhej89 )
A proud member of the Penobscot Native American tribe, as well as a Mayflower passenger descendant. I sometimes post about my genealogical history.
My stance on various issues:
Education: Free to PhD, tax paid
Abortion: Protected, tax paid, limited time-frame
Welfare: Yes, no one should starve
UBI: No, use welfare
Racism: is real
Guns: Shall not be infringed
LGBT+/minorities: Support
Pronouns: Will respect
Trump: Moron, evil
Biden: Senile, racist
Police: ACAB
Drugs: Fully legal, no prescriptions needed
GPG/PGP Fingerprint: 8B23 64CD 2403 6DCB 7531 01D0 052D DA8E 0506 CBCE