« first day (768 days earlier)      last day (656 days later) » 

1:07 PM
<span class="todo-no-class-here" title="reputation score " dir="ltr">93</span>
I see SE have changed from the microclasses. But I'm not sure it's an upgrade.
 
1:38 PM
Seems better.
Where are you seeing that? I don't see it on Q&A.
Oh, in the mini-usercard on question lists.
Interestingly, it's not there on Stacks. The entire <span> tag is not there.
Oh dear.
Compare:
<span class="todo-no-class-here" title="reputation score " dir="ltr">11</span>
<span class="todo-no-class-here" title="reputation score 52,668" dir="ltr">52.7k</span>
<span class="todo-no-class-here" title="reputation score " dir="ltr">2,552</span>
<span class="todo-no-class-here" title="reputation score " dir="ltr">5,720</span>
<span class="todo-no-class-here" title="reputation score 21,751" dir="ltr">21.8k</span>
They... only add the reputation score to the title when they are rounding the displayed value?!
 
 
2 hours later…
3:38 PM
@CodyGray looks like yet another bug
 
A bug? Surely this cannot be!
 
that's the only reasonable explanation - I have no idea why would the title not have the number and have a trailing whitespace... Sigh
 
"reasonable"
Are you sure you're using that word correctly? ;-)
But yeah, that definitely looks like something which is supposed to append a number is falling over in certain cases.
Crystal ball says that the function which is responsible for doing the rounding for display purposes is actually responsible for adding the unrounded number to the title attribute. Which is an obvious violation of the single responsibility principle.
It's almost as if these principles/patterns were created to prevent specific categories of bugs!
 
 
1 hour later…
4:55 PM
@CodyGray OMG, I didn't even notice. It's also in my very own example.
@OlegValteriswithUkraine Ahem, it's a feature. I think. You know, one born out of probably lazyness. Or "creative interpretation" of the requirements.
If the rep is not rounded (133 in the screenshot) you hover and get an explantion that you've hovered on reputation score. Seems reasonable when you do that. It's a tooltip explaining the UI element.
If it's rounded, it also expands the full rep score.
I suppose the template for that is something like reputation score {{ isShort ? fullScore : ""}}
 
5:50 PM
@CodyGray what principles? Have you seen the frontend source? :)
@CodyGray eh, not so sure - it's more of a "this is the only way I can explain this happening in the first place" - it looks like it is supposed to insert the number but chokes out in the process and returns an empty string. The other possibility is that it is designed this way, but... it's horrifying to think about
@CodyGray it is very likely - I bet it's called something like initRepScore and does a lot of loosely related things
@VLAZ I am pretty sure that non-descriptive title text fails a WCAG criterion or two. And without the number it is undescriptive
@VLAZ I see your belief in humanity is on an even lower level than mine
 
@OlegValteriswithUkraine It's NaN
 
that interpretation is precisely what I fear is the case - but why on earth do that? The whole point of title attribute is to be descriptive of the styled text inside...
@VLAZ well... if it is fullScore || "", it starts to look even scarier...
 
Look, I've dealt with legacy code to an enough degree that I just kind of accept it. "It behaves a certain way? Well, ignoring what would be a good solution, <x> would explain it".
I suppose SE's code shouldn't be classified as "legacy", though. But I kind of zone out on these things eventually.
 
heh, yeah, I still can't believe that the largest IT resource has such a messy codebase, honestly
It should be a staple of cutting-edge tech instead of crumbling if you touch it (literally, apparently)
When a simple change to escaping has network-wide consequences (to the point of exposing sensitive data of clueless users), something's severely wrong
 
@OlegValteriswithUkraine network-wide consequences over the following month.
 
6:29 PM
Yeah, and that
 
 
5 hours later…
11:19 PM
@OlegValteriswithUkraine General principles.
@VLAZ "legacy", in that it was written more than 1 day ago?
This is brand-new code, not legacy stuff, we're talking about here.
It literally wasn't broken a few days ago.
 

« first day (768 days earlier)      last day (656 days later) »