|
A Collatz generator could be interesting since there are optimizations available but the Josephus problem already has an extremely simple solution using binary. I doubt it would yield any interesting programs except maybe the language used. Not a fan of the app since that specifically targets only people that use both AngularJS and NodeJS. Just my 2 cents
|
|
|
|
|
Jon McKee wrote: Not a fan of the app since that specifically targets only people that use both AngularJS and NodeJS.
I was just being smart here to get my work done.
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
I like the coding challenges, but, why should they be "simple" ?
best, Bill
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
I know I wouldn't want to spend all my time in a week looking over 20+ KLOC from 15+ entries, testing them to ensure they meet the requirements, and then using some metric to rate which came out on top. Depending on complexity that might be a restrained estimate as well
|
|
|
|
|
Hi, Jon, I would distinguish the relative difficulty of a problem from whether or not a problem inherently demands a lengthy solution.
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
Very true. Difficulty does not necessarily equate to lines of code. Personally, I come up with very few ideas when attempting to meet the criteria of difficult while staying within reasonable amounts of required code. That aren't exclusively mathematics that is - gotta mix it up. I'm all for it though if people have ideas
|
|
|
|
|
It maybe too easy, but in honor of the ongoing Chess Word Championship (for humans and for chess engines) we may do the 8 queen problem...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
I did N-Queens a few years back, but not the ability to determine which solutions are distinct/unique.
So include the above suggestion of rotating an NxN matrix, add flipping of the matrix, and then you've got something.
|
|
|
|
|
Drawing Lissajous curves with (pseudo)random variying frequencies for X and Y in away that the resulting line remains uninterrupted.
|
|
|
|
|
How about "Do something to make my life* easier"?
* Mine, that is.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Need someone to finish that novel for you?
|
|
|
|
|
When we were students, a long, long time ago, one of my fellow students realized that he didn't master recursion very well - termination conditions in particular. So he defined a simple programming challenge for himself:
The program should draw a vertical zigzag line of asterisks on the printer (this was in the age of line printers): A count of spaces reflecting the recursion depth, with a "*" at the end. Each function call creates one such line, nothing else.
Now, at the top, "main()" level, he would call the recursive function with an argument MaxRecursionDepth to which the recursion should go directly when started (creating a slanted line of asterisks), an argumment IntermediateRecursionDepth to which the recursion should unroll (continuing the line, slanting the other way, but not all the way back). Then, it should recurse deeper again to MaxRecursionDepth and unroll to IntermediateRecursionDepth, reapeated as many times as indicated by the third agument, NumberOfPeaks, before unrolling to complete the program.
The printout should look like a tipped-over contour of a row of mountain peaks separated by valleys, the peak height, number of peaks and valley depths given by the three arguments.
If you have been writing recursive functions every day the last ten years, this is quite trivial. But if you are a student who heard the term 'recursion' for the first time last week, it takes some fiddeling to get those termination tests (and re-recursing tests) right.
And then, when you see the working solution, you won't understand why it took that much effort to get it correct
|
|
|
|
|
Except we wouldn't use recursion, would we?
|
|
|
|
|
I can draw a zigzag line witout using a computer at all!
It wouldn't teach me much about terminating a recursion, though.
|
|
|
|
|
Implementing games is good exercise. The first game I implemented (in BASIC-plus on a PDP-11 in 1983) was Master Mind.
How about a function that determines the black/white counts for two arrays of items -- not just arrays of four colors, but two IList<IEquatable> s of equal size. (Well, maybe don't state it so .net-specific.)
|
|
|
|
|
adventofcode.com will begin tomorrow.
|
|
|
|
|
If you're looking for another string manipulation challenge, what about converting an input string to pig-latin? (Also where's the new challenge! I'm jonesing over here )
|
|
|
|
|
I always like to mention great books I stumble upon. I know a few others out there in CP-land are also avid readers. I am always especially on the lookout for books that encourage realistic motivation.
Have any of you read the great book, Grit: The Power of Passion and Perseverance - Kindle edition by Angela Duckworth[^]?
I've only read about the first 50 pages, but it is really fantastic.
Geniuses Need Not Read
If you're a genius then the book won't impress you, but if you're like me and you've found success in certain areas simply by being tenacious, you'll probably really like it.
Also, it's one of those books that is written so well it's like sitting down with the author.
A really fast read.
|
|
|
|
|
Genius often gives the impression of being connected with laziness, because your head is constantly flying off in so many different directions; so tenacity and determination often trump it, by sticking to one idea and seeing it through to implementation.
I won't read the book, though, because I can't read.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark_Wallace wrote: sticking to one idea and seeing it through to implementation.
It really is the best way. Quit every day. Just never give up.
Mark_Wallace wrote: I won't read the book, though, because I can't read.
I'm sure there's an audio version.
|
|
|
|
|
raddevus wrote: I'm sure there's an audio version. I even mentally edit the spoken word (if it's text that's been written) .
I'm a bugger to watch movies with.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Maybe I'm getting old, but I find that often, genius is simply experiencing something enough times to recognise the pattern and anticipate the outcomes. Of course the trick is to be aware and remember what you did and what happened
(But I do agree with the thesis: Super smarts are often trumped by super perseverance. Reminds me of my rock climbing days: some guys dyno for the big holds (and sometimes miss) and some just slowly, carefully, efficiently and safely find the right route.)
cheers
Chris Maunder
|
|
|
|
|
80% 0f intelligence is the ability to associate things*, and notice repeating patterns/attributes in seemingly disparate items/events.
Those of us without enough memory sticks have to work out how things work almost every time we look at them, which is good mental exercise.
* And 93% of marketing is the ability to make up percentages.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Chris Maunder wrote: experiencing something enough times to recognise the pattern and anticipate the outcomes. Of course the trick is to be aware and remember what you did and what happened Hmm. The irony of middle age is that you've experienced enough to 'recognize the pattern and anticipate the outcomes', but your memory is so full of bric-a-brac that you can't find it.
Software Zen: delete this;
|
|
|
|
|
Chris Maunder wrote: experiencing something enough times to recognise the pattern and anticipate the outcomes. Of course the trick is to be aware and remember what you did and what happened
Definitely true.
Malcolm Gladwell touches upon this in his book, Blink, also. All of that experience builds to a point where a person can have a flash of insight, a stroke of genius.
And, it's why you have to stick with something to get to genius.
|
|
|
|