-12

There is a flash of the vote count before displaying a message. The message explains that a user can't vote on their own content.

When voting on your own content:

An example of upvoting my own question

It should just display the message instantly if a user does click on it and avoid the flash and the server round trip all together.


Note: This question has been heavily edited, please view the history to see the original post if interested.

15
  • 6
    If it ain't broken, don't fix it
    – Pekka
    Commented Nov 26, 2013 at 16:37
  • To @Oded who edited my question to include the tag "status-by-design" - I didn't know it was by design, I'm going to revert the edit to my old tags. Thanks for your answer below.
    – Dauh Fhauc
    Commented Nov 26, 2013 at 16:38
  • Oh moderator only tags are new to me. Carry on :-)
    – Dauh Fhauc
    Commented Nov 26, 2013 at 16:39
  • 10
    @DauhFhauc - I am a dev on Stack Overflow.
    – Oded
    Commented Nov 26, 2013 at 16:39
  • Sorry for not responding sooner @probablyPekka , I guess you're right. I wish e-mail would evolve to something else though ;-)
    – Dauh Fhauc
    Commented Nov 26, 2013 at 16:49
  • @Dauh oh yeah, amen to that.
    – Pekka
    Commented Nov 26, 2013 at 16:57
  • You'd have to have the server side checks anyway because you should never trust the client, so why duplicate the checks Commented Nov 26, 2013 at 17:09
  • @RichardTingle It would prevent the flash of numbers as I've stated, and would reduce the (although negligibly small) data transfer that occurs.
    – Dauh Fhauc
    Commented Nov 26, 2013 at 17:12
  • @DauhFhauc I see you're active on Stack overflow so I assume you're familiar with the concept of premature optimisation. While this would be worth changing if the data was significant but at negligible data transfer it would actually be negligent to change this as it could introduce (real) bugs with no actual gain Commented Nov 26, 2013 at 17:16
  • @RichardTingle Very familiar with the subject. I'm used to working with detail oriented people - it just caught my eye form a UX standpoint. I'm not sure how long StackOverflow has been around & it's obviously not a concern of theirs. I'm going to have to remove this question to get out of the red. I can't ask new questions on this site anymore due to the downvotes I've received for asking this question.
    – Dauh Fhauc
    Commented Nov 26, 2013 at 17:21
  • @DauhFhauc Be aware if you are question banned then deleting your questions is the very worst thing you can do Commented Nov 26, 2013 at 17:24
  • @RichardTingle Can you point me in the right direction then? My questions as you can see haven't been all that favorable. I was hoping that this one would do as well as my other style concern issue (CSS notifications) but it did the opposite for me. If I wait 6 months then delete my questions is that any better?
    – Dauh Fhauc
    Commented Nov 26, 2013 at 17:26
  • 1
    Agreed, the flash of numbers is annoying. Perhaps you should rephrase your question to focus on that, instead of the (negligible) data transfer. Also, there's absolutely no reason at all for the vote arrows to be clickable on your own posts. The server knows they are your own posts before it serves them, disabling the arrows is extremely simple.
    – yannis
    Commented Nov 26, 2013 at 17:28
  • @DauhFhauc Deleting your own questions makes things worse under all circumstances. Editing existing questions so they get upvotes (Yannis makes a very fair suggestion for editing this one) is the best thing you can do. Second to that (and a poor second) is answer questions Commented Nov 26, 2013 at 17:31
  • 1
    Re edit: this question is basically a request for developers to change things so it avoids the 0.3kb transfer. The downvotes are people saying that this doesn't need changing and the developers should spend their time on the huge number of other ideas Commented Nov 26, 2013 at 17:40

2 Answers 2

13

The server is what determines whether you are or not allowed to vote on a post.

The UI cannot and should not make that determination - a round trip is the right thing to do here.

10
  • 1
    I guess my reasoning was you can do the check on the client side first AND on the server side. We aren't in the 90's anymore with forms. There is such a thing as client-side verification as well. Obviously you don't trust it and double check on the server side...
    – Dauh Fhauc
    Commented Nov 26, 2013 at 16:37
  • 3
    @DauhFhauc - so, if we do it on the server side anyways, why block it on the client side?
    – Oded
    Commented Nov 26, 2013 at 16:38
  • 3
    This has happened to me maybe 30 times in four years. I generate more regular requests in a half hour on SO
    – Pekka
    Commented Nov 26, 2013 at 16:39
  • 2
    @DauhFhauc Other than voting on your own question, which not many people do, how else would this be used anyways? I find it funny how you tag the question as a bug.. Commented Nov 26, 2013 at 16:43
  • @probablyPekka Wow; you've tried to vote for yourself about half of the times I have myself! Commented Nov 26, 2013 at 16:43
  • 4
    @Oded, this is just me nit picking as it's a trivial amount of data... But if I was on a mobile device it would waste data. A simple example of a more real-world situation would be uploading an image. Instead of wasting the bandwidth to upload the image and then check the size, why not check the size on the client side first. Another reason to do this is to avoid that flash of numbers which is more of a user experience problem.
    – Dauh Fhauc
    Commented Nov 26, 2013 at 16:43
  • 5
    @DauhFhauc Based on your gif above, it's only transferring .3kb.. meanwhile the size of the gif alone is 1.8MB ! Commented Nov 26, 2013 at 16:48
  • 1
    As long as we are being over-pedantic: Why are the vote arrows on your own posts clickable in the first place?
    – yannis
    Commented Nov 26, 2013 at 17:23
  • 1
    @Yannis +1 for the thought, but I think being clickable makes the user click it, and then they are presented with the message on why they can't click it ;-) . It's a great learning experience that I think is the right way to do it vs. having the users read a manual about how to use the site. Learn by... experience I suppose.
    – Dauh Fhauc
    Commented Nov 26, 2013 at 17:33
  • @DauhFhauc You can still show the message, if you want. All the server needs to do is (for example) add an .own_post class on the arrows. When the client catches a click on an .own_post arrow, it could go straight to the message, skipping the round trip validation and the annoying numbers flash.
    – yannis
    Commented Nov 26, 2013 at 17:37
1

Any change to a code base has to weigh risks and costs against rewards. In this case it breaks down as follows

Downsides

Costs

  • Developer time
  • Tester time

Risks

  • Possibility to introduce bugs (as with all code changes)

Upsides

  • A reduction in a negligible amount of data transfer than no one will ever notice (without instrumentation) in a situation that affects users very rarely

All in all the negligible upsides vs moderate costs there is no reason to change this. If anything it would be negligent to change this.

10
  • 1
    Thanks for the true answer to my question & I agree with your statements. Unfortunately the reputation you gain from my up vote will be lost - I've received too many down votes from this question and have been banned from posting any new questions till I fix my negative reputation. Edit: I can try removing other posts first and save you the reputation loss.
    – Dauh Fhauc
    Commented Nov 26, 2013 at 17:23
  • 1
    @DauhFhauc The reputation Richard and Oded earned from their answers won't be affected by your (unfortunate) question ban. If you are about to delete your question, I'm afraid you can't do that since it has upvoted answers.
    – yannis
    Commented Nov 26, 2013 at 17:24
  • @Yannis Good to hear, thanks. :-)
    – Dauh Fhauc
    Commented Nov 26, 2013 at 17:25
  • @DauhFhauc - deleted posts are considered in the question ban. Deleting them means you will not be able to improve them in order to get it lifted (it is automatic).
    – Oded
    Commented Nov 26, 2013 at 17:27
  • 1
    @Oded Is there any way out of the fox hole? I thought this question would do well on here (based from my other CSS related notification question). If my posts are old how can I recover? I can't really alter my old questions - the community didn't like their topic, not their quality of content. I can make a lot of false accounts and upvote myself, but that doesn't seem ethical... going to look for related questions. Have a good day Mr. Oded.
    – Dauh Fhauc
    Commented Nov 26, 2013 at 17:31
  • @DauhFhauc - I gave you a hand up there, but you are still rather close to the threshold. I can only suggest that you don't ask something controversial or trivial for your next questions...
    – Oded
    Commented Nov 26, 2013 at 17:34
  • aww @Oded, I'll revise my old questions and get it the hard earned way. Thanks though. I'm running out for lunch, I'll clean up my questions though I may make the answers irrelevant in the process as I fine tune them.
    – Dauh Fhauc
    Commented Nov 26, 2013 at 17:45
  • @DauhFhauc - No. That's worse - don't make answers irrelevant.
    – Oded
    Commented Nov 26, 2013 at 18:52
  • Back from lunch - I'll do general cleanup and make sure they don't become irrelevant. My edits to this question may have done that, but I included a disclaimer at the end of my post for others to view the revision history. Edit: It appears edits bump posts to the top and may gather unwanted down votes. The edit to this question just granted me another down vote even though it's no longer nitpicking. I'll just not edit anything and stay low for awhile & make my profile name more professional along with the user image.
    – Dauh Fhauc
    Commented Nov 26, 2013 at 18:55
  • @Dauh hmm, perhaps. It really shouldn't matter but there is something about your user image, somehow it's angering Commented Nov 26, 2013 at 19:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .