How do you get Modafinil?
As far as I know, buying it online in the US without a prescription, even if it comes from overseas, is illegal. This is not true everywhere though (the UK, for example.)
As others have mentioned your mileage may vary. I used it for about 6 months during crunch development periods or when I felt I needed a bit more focus and it definitely helped me get through those times. I stopped using it because I felt out of touch with my team members when I was on it and I had started to experience a deeply unpleasant metallic taste in my mouth just after taking it.