A list of practical projects that anyone can solve in any programming language
41–50 of 67 posts
Re: A list of practical projects that anyone can solve in any programming language
#42Not only do I doubt that "anyone" can write these programs, most of them do not look particularly interesting or fun. Many if not all of the non-mathematical ones are simply replicating off-the-shelf utilities or tools; what is the point of reinventing the wheel? Even if you are looking to hone your skills in a new language, creating something genuinely new seems like it would be more useful and motivational.
But whenever I learn a new language (many times over many decades), I want to build lots of small projects of many different sorts in order to habituate myself to the new tools and patterns (using the tools in various combinations) as quickly as possible. My ideal is when I find a set of these small but diverse projects implemented by an expert in the language, so I can try it my way, see how a "native speaker" does it, get some explanation from him (again, ideally), adjust my approach to be more "native", and repeat, again, and again, and again. I can usually find the problems, but finding the "native" solutions is harder.
I don't need the exercises to be "useful" in any way other than delivering the desired fluency efficiently, and I don't need them to be "motivational". If I want the skill, I'm motivated by anything that can help me get it, and if I don't want it, the problems don't matter. I have other things to do.
Re: A list of practical projects that anyone can solve in any programming language
#43Write an autopilot module to take inputs from altimeters, airspeed instruments, compasses, gyros, GPS, and user input. Give outputs suitable for controlling ailerons, elevator, rudder, and throttles. Extra credit: deploy it in an airliner. :-) :-)
Re: A list of practical projects that anyone can solve in any programming language
#44Earlier quoted context omitted.
There are simple math formulas that approximate pi. You can look one up and run it to the right number of digits. It would be hard without Google, but most programmers should be able to do it with Google so that they don't need to figure out any of the math.
You need to use an arbitrary precision math library, I don't know how hard to use those. Those formulas have a hard limit in precision for standard floating point types.
Re: A list of practical projects that anyone can solve in any programming language
#45Re: A list of practical projects that anyone can solve in any programming language
#46Looks really good :-) I would just change Classes sot something more generic like Domain modeling ? I.e. I am thinking of using this as a list to help me learn some languages I find interesting, currently Purescript/Haskell and ReasonML/Ocaml. I don't think you would model any of the solutions to the projects in the list by creating class-hierarchies (and Ocaml even is capable of creating class-hierarchies.) Even in…
Agreed. The tagline talks about any programming language, and then the classes section goes on to talk aout classes, abstract classes, class hierarchies, etc. To me it seems like "any language" in that chapter at least would refer to what people traditionally call object oriented languages. Lisps, some low level c-style languages (go and rust among the newer ones), and some ML languages with algebraic data types don'…
Re: A list of practical projects that anyone can solve in any programming language
#47Not only do I doubt that "anyone" can write these programs, most of them do not look particularly interesting or fun. Many if not all of the non-mathematical ones are simply replicating off-the-shelf utilities or tools; what is the point of reinventing the wheel? Even if you are looking to hone your skills in a new language, creating something genuinely new seems like it would be more useful and motivational.
This took me by surprise!
Why do people complete crossword puzzles that millions of people have also completed? Why do people learn to play songs on the piano that millions before them have learned? Why do people learn math proofs that have been known to others for hundreds of years?
I can't quite apprehend the kind of confusion required to provoke such questions.
Re: A list of practical projects that anyone can solve in any programming language
#48Not only do I doubt that "anyone" can write these programs, most of them do not look particularly interesting or fun. Many if not all of the non-mathematical ones are simply replicating off-the-shelf utilities or tools; what is the point of reinventing the wheel? Even if you are looking to hone your skills in a new language, creating something genuinely new seems like it would be more useful and motivational.
-- C. S. Lewis
Why wouldn't that hold for programming, at least if you make something you actually want and use? For me, it's about being able to make something exactly how I want it, without having all the stuff I don't need.
For example, I started out with a simple CMS that was based on text files. The next iteration used MySQL, but each "type" of page (link, text, image, audio) was it's own thing. That sucked, so I did it a third time, this time everything was a node that could have a type and a parent and children, but could also nodes "inside" it, which in turn also can also be nested and have nodes inside themselves, initially just because I thought "why not", but it's so useful, I didn't realize how much so until after the fact.
The commenting system is the same, imagine a tree like this discussion, but then every comment could have such a tree of comments inside it, as well as nested replies on the level it is on. I know it's dumb to do that for comments (but it's dumb in a way that makes me laugh so it stays in), but for content it's just awesome.
Some node types like empty, text, links, etc., then let every node decides how subnodes and nodes inside it get displayed, and that's been all I need for over 6 years now. I don't worry about my setup being no longer supported, ever, because my setup is the developer setup. And the project will also by definition not be abandoned before I stop using it. Those are huge benefits actually. I keep checking out what's available on the "shelf", and I want none of it, while my CMS contains a lot of deal breakers for anyone who doesn't have my exact setup and needs.
The point of not getting something off the shelf is not to remake the same thing, but to get something that's not "off-the-shelf", what you count as just a negative is actually also plus. You might say e.g. Drupal can do all that and much more, but Drupal is a huge, and trimming it down to exactly what I want would mean I have to do it again when it updates. Sure, it took years to get to a point where what I had was better for me than off-the-shelf, but I wouldn't have gotten there at all if I had just stuck with off-the-shelf. That also kinda limits the imagination to off-the-shelf.. how can I know I needed something that didn't exist before I made it, right?
Speaking of imagination, that wheel analogy has to die, no offense. It's always more than just "the idea that a round thing rolls", apart from the ideas being more complex the implementation details do matter.
Re: A list of practical projects that anyone can solve in any programming language
#49Nice list, but ‘anyone’? The first on the list is ”Find PI to the Nth Digit - Enter a number and have the program generate PI up to that many decimal places. Keep a limit to how far the program will go” Easily solvable if you set that limit low and cheat. Just put a string representation of pi in the program, and chop it off at the requested length: n = Input “num digits?” if n between 0 and 8 inclusive print left(“3…
Simon Plouffe did it, years ago, with no help from Google.
http://plouffe.fr/Simon%20Plouffe.htm
https://en.m.wikipedia.org/wiki/Bailey–Borwein–Plouffe_formu...
Re: A list of practical projects that anyone can solve in any programming language
#50That could probably be addressed in part by focussing on types or data structures rather than classes per se.
Similarly, there are problems which mandate threading rather than either concurrency or parallelism, whichever is intended; there are languages in which threads as such are not directly supported, but with one or more structures for concurrency/parallelism that could solve the problem (and languages where threads are supported but directly using them may not be the idiomatic approach depending on the actual concurrency/parallelism requirements.)
So, for a language-neutral set of tasks, it focuses in some places too much on specific languages solutions rather than the problem to be solved.