Re: How to post chess games
Posted: Sun Jun 20, 2010 5:39 am
You are right... thank you!
Independent Computer Chess Discussion Forum
https://open-chess.org/
Thanks for the nice web app. I think the program is quite complete. One issue though, that is error popups. Would it be better to try/catch error of invalid strings/input and just ignore it instead?pgn4web wrote:
Yes. That was the intent.
D8 gives you the full PGN as posted, with all games included and with comments.
C8 gives you the PGN of the current game, with comments.
B8 gives you the FEN of the current position. When producing that, I thought that people would likely paste the FEN in their chess software to analyze, so I thought it would be a good idea to add the following moves (still you could have loaded the PGN of the game instead, but I wanted to make people's life easier).
If B8 were to give the comments, I'd suspect someone would ask why I left out the preceding moves... then B8 would become the same as C8
depends... for many exceptions that is what happens.kingliveson wrote:Thanks for the nice web app. I think the program is quite complete. One issue though, that is error popups. Would it be better to try/catch error of invalid strings/input and just ignore it instead?
Some of the exceptions are not necessarily errors -- is just that the functions wants input (full fen string for example) and when it's null, the error popups. Yes, you'd think people would preview a text before posting it, but as we've seen, that's not the case.pgn4web wrote:depends... for many exceptions that is what happens.kingliveson wrote:Thanks for the nice web app. I think the program is quite complete. One issue though, that is error popups. Would it be better to try/catch error of invalid strings/input and just ignore it instead?
however, I would expect that if you post a game you should have the decency of previewing your post and make sure it does not generate any exeption. for that purpose the tool lets you know what's wrong and needs fixing.
this leaves you free to post a bogus chessboard with popup errors annoying to everyone... that's life, a user could time and again post obscenities... then you terminate the account of who is not behaving properly.
if I hide the exceptions, how would you know that your PGN data is not correct?
Well... passing an incomplete FEN string, to me, it is an error.kingliveson wrote:Some of the exceptions are not necessarily errors -- is just that the functions wants input (full fen string for example) and when it's null, the error popups. Yes, you'd think people would preview a text before posting it, but as we've seen, that's not the case.
My post probably should have been directed to Jeremy. You are right that those error catches should be left as is to correct issues. But each site can always customize the module to fit its needs.pgn4web wrote:Well... passing an incomplete FEN string, to me, it is an error.kingliveson wrote:Some of the exceptions are not necessarily errors -- is just that the functions wants input (full fen string for example) and when it's null, the error popups. Yes, you'd think people would preview a text before posting it, but as we've seen, that's not the case.
How to handle the error depends on the application and on your user base, I guess.
It seems we have a different opinion how to handle those errors; fortunately it's not too difficult to adapt to your preferences.
Most of those error messages (apart from very few critical ones) are generated using a function called myAlert().
You can easily make that function silent taking care in one shot of all the error popups, without having to run around the code to find the next one.
Agreed, it would be nice if it quietly displayed an error message in the chessboard's place.Ovyron wrote:If the PGN contains an error, the tag should just not work.
Just noticed now that you said it. I posted a list of pgns and one has this bug.hyatt wrote:Seems to be a bug that causes moves ending with + (check) to generate an error that prevents advancing beyond that move... It seems to specifically affect only pawn moves, such as c4+ while piece checks seem to be OK.
Anyone else noticed this?