Nice 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…
A list of practical projects that anyone can solve in any programming language
11–20 of 67 posts
Re: A list of practical projects that anyone can solve in any programming language
#12Nice 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…
Re: A list of practical projects that anyone can solve in any programming language
#13Nice 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…
Re: A list of practical projects that anyone can solve in any programming language
#14Re: A list of practical projects that anyone can solve in any programming language
#15Looks 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'…
The last update seems to be five years ago and I have to admit, If were writing this 5+ years ago, I too might assume "All modern languages have class hierarchies, right?" comming from Object-Pascal/Java/Python/Ruby
Funny enough, 5 years ago I started workin on a Clojure project at work, which changed my perspective somewhat :)
Re: A list of practical projects that anyone can solve in any programming language
#16I would add a bunch of cellular automata to that list, Conway's Game of Life, Wolfram and Wireworld are easy to make something very rewarding, cover many bases, and are absolutely open ended.
Re: A list of practical projects that anyone can solve in any programming language
#17Nice 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…
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.
Re: A list of practical projects that anyone can solve in any programming language
#18Even 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.
Re: A list of practical projects that anyone can solve in any programming language
#19Re: A list of practical projects that anyone can solve in any programming language
#20Earlier 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.