Page 1 of 1

Prime Numbers (A small web app)

Posted: Fri May 04, 2012 7:22 pm
by superLED
I am making something for my gf that is studying to be a math teacher, and she asked me to make something, so she could enter a number and check it it is a prime number.
And to make it as 'universal' as possible, I wanna make it on the web.

We don't have a "Design Discussion", so i just put it here, since it's not near a game.
(Edit: Well, fuck me, we have an "Art, Music, and Design" section on the forum. But I am asking for help regards to features and functionality as well, so it can be fun and easy to use.)

Check it out: http://nechrology.com/prime/

I want feedback on the design and the functionality. Thanks a lot!

Stuff I know I wanna do:

- Do not reload the entire site when entering a number; I am going to refresh only the "Yes"/"No" image (Ajax).
- I am gong to add some "Fun Facts" about prime numbers, so people can read what it's all about.
- Make a title like "Is this a prime number?" on the top, so it's clear what this is actually about.
- Make a "Progress Bar" when it is calculating. If you type in a large number, it will take some seconds before the calculation is done.

This is only a simple project, and it serves as a single-purpose-page; it's only going to tell if a number is a prime number or not.
(Don't mind the currently fuck'd source code)

Re: Prime Numbers (A small web app)

Posted: Fri May 04, 2012 7:53 pm
by tappatekie
Love the graphics :D
Feedback would be:
Maybe have some sort of no-input delay (like, when i stop typing on the text box after a few seconds, it calculates for me...) (not entirely sure this is possible ..)

Re: Prime Numbers (A small web app)

Posted: Fri May 04, 2012 8:03 pm
by superLED
tappatekie wrote:Love the graphics :D
Feedback would be:
Maybe have some sort of no-input delay (like, when i stop typing on the text box after a few seconds, it calculates for me...) (not entirely sure this is possible ..)
Thanks a lot!
I don't quite understand why that would happen. It doesn't auto-calculate in my browser. Which browser are you using? Do you have any plug-ins that could make this happen?

Re: Prime Numbers (A small web app)

Posted: Fri May 04, 2012 8:04 pm
by tappatekie
superLED wrote:
tappatekie wrote:Love the graphics :D
Feedback would be:
Maybe have some sort of no-input delay (like, when i stop typing on the text box after a few seconds, it calculates for me...) (not entirely sure this is possible ..)
Thanks a lot!
I don't quite understand why that would happen. It doesn't auto-calculate in my browser. Which browser are you using? Do you have any plug-ins that could make this happen?
I meant as a feature, but i'm using Google Chrome 14 with no addons...

Re: Prime Numbers (A small web app)

Posted: Fri May 04, 2012 8:11 pm
by superLED
tappatekie wrote:
superLED wrote:
tappatekie wrote:Love the graphics :D
Feedback would be:
Maybe have some sort of no-input delay (like, when i stop typing on the text box after a few seconds, it calculates for me...) (not entirely sure this is possible ..)
Thanks a lot!
I don't quite understand why that would happen. It doesn't auto-calculate in my browser. Which browser are you using? Do you have any plug-ins that could make this happen?
I meant as a feature, but i'm using Google Chrome 14 with no addons...
Oh, haha, I misunderstood your post. I thought that it did that at this moment.

If I am going add that as a feature, it have to make you toggle it on yourself. If young student or a slow typer would type in a number, it may calculate it before he/she was able to type in the full number. And when you are done typing, the input-field must be cleared, so you can continue type in more numbers. So it would suck if you didn't typed it in fast enough, and it would reset.
Maybe I can make a toggle function, but I don't know if people would wait for 3 sec to pass instead of hitting the return button :P

Re: Prime Numbers (A small web app)

Posted: Fri May 04, 2012 9:38 pm
by tappatekie
superLED wrote: If I am going add that as a feature, it have to make you toggle it on yourself. If young student or a slow typer would type in a number, it may calculate it before he/she was able to type in the full number. And when you are done typing, the input-field must be cleared, so you can continue type in more numbers. So it would suck if you didn't typed it in fast enough, and it would reset.
Maybe I can make a toggle function, but I don't know if people would wait for 3 sec to pass instead of hitting the return button :P
Makes sense :P

Re: Prime Numbers (A small web app)

Posted: Sat May 05, 2012 8:21 am
by Ginto8
It might be more interesting to also have a list of all primes. You could have it update as it scrolls by using the Sieve of Eratosthenes algorithm or something similar. I also think a lot of calculation here could be done client-side, since checking for prime-ness is not a terribly costly operation.

If the dynamic list seems too annoying you could also use the Sieve for a "list all primes below x" functionality.

Re: Prime Numbers (A small web app)

Posted: Sat May 05, 2012 9:37 am
by superLED
Ginto8 wrote:It might be more interesting to also have a list of all primes. You could have it update as it scrolls by using the Sieve of Eratosthenes algorithm or something similar. I also think a lot of calculation here could be done client-side, since checking for prime-ness is not a terribly costly operation.

If the dynamic list seems too annoying you could also use the Sieve for a "list all primes below x" functionality.
That is actually a pretty neat idea! Thanks a lot. I will see what I can manage to put together :)