using a home brew kit I followed all the initial instructions implicitly, got to the final stage of adding the dried yeast and stirred it in. 4 hours later I realised I had failed to add the sugar which I then did. Question1: Was I too late and should I discard it all? Question2: Even adding the sugar immediately after the yeast does it have a detrimental effect on the brewing process?
Its perfectly fine to boil the sugar up in some water now and add it. Many people do just that for certain bigger beers. As long as the yeast are chugging away when you add the sugar all should be well. I would try not to exceed an additional volume of a quart or so. Boil the sugar in two cups if possible. The boiling will sanitize the solution and also drive out much of the oxygen.
Q1: Maybe. Usually no. But in this case infection may have been introduced. Only time will tell. Let it ferment and see how it turns out.
Q2: Adding the sugar 4 hours after a pitch usually has little effect on the yeast. But if the addition wasn't sanitary it could introduce another microbe that could become dominate.
Adding adjucts that soon after a pitch needs to be sanitary (boiled then cooled) since there's no alcohol in the wort yet to inhibit bad microbes.
Adding sugar 4 hours after adding the yeast to a made up beer kit wort will not necessarily ruin the beer - I would even say it most probably would not ruin the beer. The odds are that the beer will turn out well so I would not recommend discarding it. In fact many "not so good" beers will improve immensely over 6 months conditioning in a bottle.
The only real problems with adding sugar directly into a beer wort is making it dissolve fully and a small possibility that the dry sugar is carrying some spoiling agent (bacteria). That too need not be fatal and I would not reject the batch just because of this.
My advice in all such circumstances is to finish the brewing process, bottle (or keg) the beer, condition it for some time and see how it turns out. Sometimes beers made "perfectly" are not that impressive and some made "badly" turn out to be the best ever.
As everyone else has mentioned, I wouldn't worry about it. The only thing I would be mildly concerned about is contamination. With that being said, there isn't anything you can do about it now except wait and see. I also would've taken gravity readings after adding the sugar so that alcohol can be accurately measured in the final product. Whatever though, no big deal. It's just something to keep in mind next time.