Live data from Hacker News

A list of practical projects that anyone can solve in any programming language

github.com

11–20 of 59 posts

Re: A list of practical projects that anyone can solve in any programming language

#11
post #7

> Prime Factorization - Have the user enter a number and find all Prime Factors (if there are any) and display them. not to sound pedantic, but for any integer greater than 1 there is always at least one prime factor: https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithme... edit: for prime numbers, it is the number itself

and "1" does not, so the thing youre trying to be pedantic about isnt even wrong.

Re: A list of practical projects that anyone can solve in any programming language

#12
post #11
post #7

> Prime Factorization - Have the user enter a number and find all Prime Factors (if there are any) and display them. not to sound pedantic, but for any integer greater than 1 there is always at least one prime factor: https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithme... edit: for prime numbers, it is the number itself

and "1" does not, so the thing youre trying to be pedantic about isnt even wrong.

True, and when talking about "numbers" one would generally include 3/7 and maybe e, negative numbers and perhaps complex numbers... or at the very least negative integers...

Re: A list of practical projects that anyone can solve in any programming language

#13
post #8
post #7

> Prime Factorization - Have the user enter a number and find all Prime Factors (if there are any) and display them. not to sound pedantic, but for any integer greater than 1 there is always at least one prime factor: https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithme... edit: for prime numbers, it is the number itself

Not to sound pedantic, but a number is only its own prime factor if it itself is prime! (Your point stands, though: every integer > 1 has at least one prime factor.)

fixed, thank you

Re: A list of practical projects that anyone can solve in any programming language

#15
post #11
post #7

> Prime Factorization - Have the user enter a number and find all Prime Factors (if there are any) and display them. not to sound pedantic, but for any integer greater than 1 there is always at least one prime factor: https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithme... edit: for prime numbers, it is the number itself

and "1" does not, so the thing youre trying to be pedantic about isnt even wrong.

i meant it more in the sense that it is good to clarify that if the user enters "13", the program shall output "13" instead of "no factors"

Re: A list of practical projects that anyone can solve in any programming language

#16
post #12
post #11

Earlier quoted context omitted.

and "1" does not, so the thing youre trying to be pedantic about isnt even wrong.

True, and when talking about "numbers" one would generally include 3/7 and maybe e , negative numbers and perhaps complex numbers... or at the very least negative integers...

all of which have prime factors ;)

besides, you may as well consider 1 a prime factor. the task is just a silly programming toy problem. 1 not being prime is pure definition, including 1 in the primes would not materially change the definition of primes. just make a lot of advanced math tedious to write down.

Re: A list of practical projects that anyone can solve in any programming language

#18
post #2

Great list for inspiration! Though, it is not true that all the problems can be solved in any programming language: try to make a "Bandwidth Monitor" in Coq.

Coq's not really a programming language, is it? It's a proof language. So, you could prove the correctness, or perhaps possibility, of a bandwidth monitor in Coq, given certain assumptions, but it would be up to some other poor schmuck to actually write it.

Re: A list of practical projects that anyone can solve in any programming language

#20
post #18
post #2

Great list for inspiration! Though, it is not true that all the problems can be solved in any programming language: try to make a "Bandwidth Monitor" in Coq.

Coq's not really a programming language, is it? It's a proof language. So, you could prove the correctness, or perhaps possibility, of a bandwidth monitor in Coq, given certain assumptions, but it would be up to some other poor schmuck to actually write it.

Well, what constitutes a programming language then? It sounds like there is a clear definition :-)

Coq is certainly a programming language, as you can build programs. But you can't interact with the subsystem, you can only build pure functions (Therefore it is quite hard to build a performance monitor).

In my opinion English could also go as a programming language. Especially given the rise in NLP products. You can actually program a computer to do quite advanced tasks solely through natural languages.

Post reply on HN