@namark
Imagine a deck of cards numbered from 1 to some number. They are dealt out
one after the other in a straight line down the street. You grab the first card that is at the top of the road and if it is the same of less than the next you put it back down and grab the next one. If it is more than the next one you make them switch places. Then from that position, you continue
the same way until you get to the end of the street. If you have done no changing of places your deck is sorted. If you have done even 1 changing of places you start over from the top. Keep doing this until you make no
changes.
It is called a bubble sort, because it looks like values bubble up through the list until they come to rest at their respective positions. It is the simplest sort to write. And it works great for things that are almost sorted. Not quite as well for things that are in the completely reversed order. There are some things you can do to make it more efficient.
@nergal give me an example of how.. As it is, I am putting these here on Mastadon, as well at Twitter, and FB. But if there is a better way, help me set it up. But if it is too much trouble to set it up people won't bother.
@alex I would lean towards the squash because it is pollinated by bees. But even though idealistic vegans will not eat the product of bees as honey, they don't seem to mind partaking of the fruits of their pollination efforts.
How about a guessing game? Or job interview type programming tasks?
@nergal I can go super simple like "Create a Program that accepts 2 numbers and returns the Sum" or "Reverse a string" or "Towers of hanoi" things like that. "Dice toss" or "Card Deck Shuffle" ... just looking for what 1. won't be too easy for those with some experience. 2. Won't be too hard for someone new 3. Be interesting enough that people will want to try it.
@nergal @BradleySmall @yisraeldov IDK, I used cdpath in the past. Zsh does some interesting things with directory changes.
@nergal I am grasping at straws so all suggestions are welcome. I am not sure what you mean on the "etherpads". Pretty much anyone can use whatever language and development environment they like. Or are you suggesting some kind of pair programming?
FWIW, I would be thrilled to see a new programmer maybe get half-way there and ask for some help. Sometimes walking a solution together can open some doors,
@nergal at this point I am just pulling stuff out of thin air.
Okay, I thought I came up with some good challenges and a fun freebie to go with them. I seem to be getting some followers, but not a lot of people trying them.
What kinds of things are you all interested in? I can find all sorts of things, many of them are math-y (statistics and things like that), or string management and still others require you be willing to handle things like differential equations.
If you mention what you might like I can either find some or make some up.
@namark They are all hard to read/understand until you know them :) But definitely give J a peek, it is definitely one I will eventually get back to eventually.
@Ghosty @BradleySmall there are plenty of non-proprietary IDE's though. If you are stuck in Windows world, give SharpDevelop a look-see, or MonoDevelop. Otherwise Eclipse, or NetBeans, or CodeLite or Codeblocks all come to mind.
@Ghosty @BradleySmall money or the things it buys that yo might want to have in order to live :)
@BradleySmall @Ghosty Sometimes idealism is a wonderful thing. Sometimes you want to pay your bills and eat. It would all be great if we all had the privilege or luxury to just take an idealistic stand and do something because it was "right" or met with our philosophical stance on how things should be.
Morals and values can be relative, and subjective sometimes.
I have worked in the Gaming (casino gambling) industry as well as the Pornography (well known magazine) industry. Sometimes I just allow myself a little moral flexibility. I might not be the right person to ask if you are looking for moral guidance when it comes to writing software.
@zingbretsen @freemo Things that sound dirty, but aren't...
Of course, everything is dirty if you just add "...if you know what I mean..." after you say it. :D
@namark I got it to install the ROTD version, but then it wouldn't run without some other configuration stuff.
If I want procedural I will use Lisp and for logic would lean towards Prolog (though I haven't used it in way too many years)
If you like a tough language try BrainF**k
But I keep meaning to revisit the language "J" (kind of a modern take on APL) nice terse "golf coding" type language.
@freemo #2 but I like the first f better in #1
@namark Looks good. I liked your play on the lyrics. I tried to d/l the compiler but it was taking more effort than I am currently willing to put into yet another language :)
ninety nine vials of mercury
https://git.sr.ht/~namark/mercury_stuff/tree/master/toys/vials.m
took me ages and is probably the worst way to do it... worth it!
#toyprogrammingchallenge #mercurylang
@zingbretsen @freemo that might do it :) Yep, works on 3.7 that will teach me to try a shortucut! :)
The green faerie