|
Chris Maunder wrote: I'll announce Friday
I wasn't asked to test it, so it can't been known to work.
Michael Martin
Australia
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible."
- Mr.Prakash One Fine Saturday. 24/04/2004
|
|
|
|
|
You weren't drunk when it was written so your testing would be off anyway.
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
I, for one, do not have access to Chris' Big List of Mickisms with which to test mine.
Without The List -- and sixteen (!) years worth of posts -- none of us can perform a proper stress test of our codez.
I also don't want to melt down my system.
modified 30-Nov-16 8:46am.
|
|
|
|
|
Chris Maunder wrote: We need a simple task, easily coded, and easily tested.
Technically, that is how all projects should be implemented -- broken down into simply, easily coded and tested, tasks.
So I wonder, what would the weekly coding challenge look like if there was an overall story arc, ideally where only you know what the end goal is, and as an additional game, we could guess.
Which gets me to wonder next, does the coding challenge have to be stand-alone or can it involve some third party API or existing open source code base?
Regarding the story arc, I would probably avoid something that creates a product or website. That said, simulations are always fun, for example, I've always wanted to write something that models the gravitational interaction of objects. Simple games are also fun, though that probably gets into the "product" arena too much.
The point being, coming up with interesting (and useful!) coding challenges is actually quite a challenge, especially given that the idea of a story arc comprised of coding challenges requires, well, some management.
So, other than that, no immediate ideas right now.
Marc
|
|
|
|
|
An arc could be interesting. Do one component of a simple game, or other task, every week, and put it together at the end. Or recode the entire codeproject site, one step at a time oh wait - I meant
|
|
|
|
|
A financial transaction categorization engine with customizable categories and custom matching expressions.
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Idea: Rotating an NxN matrix in-place, maybe?
Question: What exactly are the answers graded on? Creativity, complexity, simplicity, or some other metric?
|
|
|
|
|
I have come to the conclusion that (depending on what you are actually doing) you don't need to actually rotate an NxN matrix -- you need only apply a transformation to the X and Y coordinates of the desired cell to access a cell as if the matrix had been rotated.
|
|
|
|
|
I know some people that use a similar technique with work
|
|
|
|
|
|
That's a hardware problem.
|
|
|
|
|
Josephus problem solver
Collatz sequence generator
An Angular2 SPA app that allows managing certain entities. And just for testing purposes, use Node for server side.
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
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?
|
|
|
|
|