News for hackers. Stuff that matters.
Re:Comments by a developer inside the Windows Media Player s... by CurtHagenlocher on Sunday September 27, 2020 @07:41AM (#24605891)
Ten years ago I found a comment in Excel's code base preceding a function over 1000 lines long that seemed to be parsing dates:

  // I just cleaned up the code. I have no idea what this fn does. Here is
  // what the comment said earlier for your reference!
  // --> BUG!! - this code is a crime against nature and has absolutely no
  // --> redeeming value (other than the amazing fact that it works)
Re:Comments by a developer inside the Windows Media Player s... by cm2187 on Saturday September 26, 2020 @06:46PM (#24602766)
Lecturing on keyboard shortcuts when windows media player is the only video player in the world not using the space bar as a shortcut for play/pause.
Re:Comments by a developer inside the Windows Media Player s... by Jare on Sunday September 27, 2020 @03:23AM (#24604892)
Amazon Prime web player uses it but does not force keyboard focus on the place where it can detect it, so many times you have to click first before it will pause on space bar.

Focus handling is generally terrible in web apps, but few instances infuriate me like this one.

Re:Comments by a developer inside the Windows Media Player s... by m0dest on Monday September 28, 2020 @04:26AM (#24614290)
Space bar handling in media players is a particularly hard problem because space bar is also the key that users expect to trigger the currently focused button. Some users rely entirely on keyboard focus.

So it starts to intersect with some non-obvious accessibility issues.

Re:Comments by a developer inside the Windows Media Player s... by Jare on Monday September 28, 2020 @01:34PM (#24619182)
This is true as an explanation why it happens. I would expect the focused control to be visible and obviously marked (highlight, rectangle, etc). When all that's visible on the screen is the movie, or when the last thing you did was hit something to play the movie, the app should switch focus to whatever control needs to have it for space to play/pause. This is already a solved problem, many console video players do this, Netflix does it, etc. It drives me nuts that something so trivial in an area of an app that is (comparatively) so simple, remains broken for so long. It is not really important, but it destroys the potential for the app to feel natural and (in Apple parlance) beautiful to use.
Re:Comments by a developer inside the Windows Media Player s... by patrickthebold on Sunday September 27, 2020 @08:15AM (#24606067)
Disney Plus doesn't either, most annoying thing ever. Has me wondering why there's no open source 'streaming website' the only value add is the content.
Re:Comments by a developer inside the Windows Media Player s... by philihp on Monday September 28, 2020 @06:05AM (#24614964)
Have you used Kodi?

Roughly equivalent: why do people shop at Whole Foods when they can get the same food cheaper at a farmer’s market? The produce is washed, curated for imperfections, and marked up.

These streaming platforms are not perfect as no product since Unix has been, but to think altruistic programmers working for free can do an equivalent job is hubris. These interfaces take years of iteration and optimization in subtle ways like Netflix A/B testing thousands of generated cover photos.

Re:Comments by a developer inside the Windows Media Player s... by cobalt on Saturday September 26, 2020 @09:14PM (#24603436)
WinAmp doesnt
Re:Comments by a developer inside the Windows Media Player s... by devenblake on Sunday September 27, 2020 @04:26AM (#24605105)
Fortunately Audacious does, and you can use WinAmp skins with Audacious.

Doesn't at all discount your point, just wanted to help out anyone who's still using WinAmp because of the skins (I was up to last year).

Re:Comments by a developer inside the Windows Media Player s... by irrational on Sunday September 27, 2020 @05:31AM (#24605385)
Really? What key does it use instead?
Re:Comments by a developer inside the Windows Media Player s... by cm2187 on Sunday September 27, 2020 @05:46AM (#24605462)
ctr P
Re:Comments by a developer inside the Windows Media Player s... by cblconfederate on Sunday September 27, 2020 @05:41AM (#24605432)
neither does twitter. and it pauses when you maximize
Re:Comments by a developer inside the Windows Media Player s... by alphakappa on Saturday September 26, 2020 @08:02PM (#24603131)
Neither does YouTube, likely the most popular video playing entity today, respect the spacebar on iOS.
Re:Comments by a developer inside the Windows Media Player s... by dijit on Saturday September 26, 2020 @08:05PM (#24603151)
I think you’re mistaken, YouTube (in all the forms I use it with a keyboard at least) supports spacebar as a pause key.

Your browser might try to pop you down half a page if the thing that is selected or highlighted on the page is not the video player itself though. But it works 100% of the time in fullscreen.

Re:Comments by a developer inside the Windows Media Player s... by exikyut on Sunday September 27, 2020 @12:11AM (#24604172)
YouTube's keyboard handling is Insanely Intuitive™, I must absolutely agree.

Usefully, the up/down keys don't change the volume unless the player is also focused.

What's incredibly sad is that j/k/l were agreed upon to rewind/pause/forward the video, and these generally work unless you're in a textbox... but dedicated keys were not similarly approved to control the volume.

--

My current winner for Absolutely Favorite Piece Of YouTube-Related Keyboard Functionality©®℠ is...

YouTube Music (https://music.youtube.com/)... which uses a different set of fundamental keyboard shortcuts to YouTube. [;]=pause, [j]=next, [k]=prev, [l]=forward, [h]=rewind.

There are two disasters here.

The first is that <YouTube/pause> == <YouTube Music/rewind to beginning>. "Nooooo! I was 2 hours?? and how many seconds??? into this video... >.<". Naturally, in this situation, I ReWoUnD ThE ViDeO To ThE BeGiNnInG MySeLf, so YouTube's "last play position" indicator can't help me here. YAYYY.

The second disaster is that it's obvious a Vim user clearly argued successfully for Music to use Vi-style hjkl, but both the key choices and how they are presented in the UI could not be less intuitive, regardless of whether the user also uses Vim or not.

I copied above exactly how the UI (in the [?] popup) lists the sequence. Specifically, the whole thing is shifted left by 1 position, wrapping [h] around to the right. Fixing that to show the sequence how a Vim user would expect, it looks like: [h]=rewind, [j]=next, [k]=prev, [l]=forward.

But then, any Vim user is going to be utterly confused by this sequence, not only because of the mild readjustment of assigning up/down to prev/next and left/right to seeking - but because Vim "up" [j] is assigned to "next", and Vim "down" [k] is assigned to "prev".

Upside down playlist much?!?!

I no longer use YouTube Music, solely because of the number of long videos I have rewound and lost my position in.

I'm also incidentally trying to passively commit hjkl to memory (you know, the whole spaced repetition thing), and all the above was just too confusing.

Re:Comments by a developer inside the Windows Media Player s... by ogurechny on Sunday September 27, 2020 @04:48AM (#24605195)
Not sure if whether it is intended, or a weird combination of my browser and extensions, but right now, if I click on the play/pause button on Youtube video page, it becomes focused (with a visual clue of a blue box), and then pressing space bar starts and stops (or stops and starts) the video in rapid succession because it is considered a keyboard command and a button activation at the same time.

Actually, not quite at the same time, and that returns us to the old question of viability of reinventing GUIs in Javascript. I guess that even around 1990 window messages of some kind appearing with such a delay from a single action would mean the GUI is based on wrong principles, or the programmer doesn't know how to use it.

It's even funnier to imagine what happens when you press and hold space. The button icon is mostly in in-between animation state from all the repeated presses, but the video starts or stops only on first press and on release. Guess how much fun people have programming window system inside a virtual machine inside a browser using window system inside real machine.

Re:Comments by a developer inside the Windows Media Player s... by senkora on Sunday September 27, 2020 @01:39AM (#24604463)
> Vim "up" [j] is assigned to "next", and Vim "down" [k] is assigned to "prev".

j is down and k is up in vim

Re:Comments by a developer inside the Windows Media Player s... by schoen on Sunday September 27, 2020 @02:18AM (#24604615)
Originally derived from https://en.wikipedia.org/wiki/ADM-3A#ADM-3A, which I only learned (maybe from HN) long after becoming a vi user.

Edit: I've wondered whether the Dance Dance Revolution on-screen arrow order https://en.wikipedia.org/wiki/Dance_Dance_Revolution#/media/..., which I also have deep in my muscle memory, is somehow also related to the hjkl arrows (as it also goes ← ↓ ↑ → horizontally).

Re:Comments by a developer inside the Windows Media Player s... by Moru on Sunday September 27, 2020 @03:21AM (#24604885)
Wait, a mouse driven application is using the right hand keys for shortcuts? Yes, that sounds very handy for a left hand mouse user.

I prefer to be able to set my keys myself. I use the left hand WASD keys together with ctrl+shift for most things so I can control the music in any application (with winamp). No need to find buttons, the hand is already there even if I'm using the mouse with the right hand.

Re:Comments by a developer inside the Windows Media Player s... by ThePadawan on Sunday September 27, 2020 @03:46PM (#24609581)
> (...) but dedicated keys were not similarly approved to control the volume.

Arrow-up and arrow-down?

Re:Comments by a developer inside the Windows Media Player s... by dkdk8283 on Saturday September 26, 2020 @11:31PM (#24604020)
Youtube itself changed the space bar behavior from context specific (pause if player in focus, scroll of comment in focus) but they rolled that back so space is always pause.

I like the context sensitive behavior and wrote a grease mo key script to restore it.

Re:Comments by a developer inside the Windows Media Player s... by jailbird_bd on Sunday September 27, 2020 @05:02AM (#24605247)
Run into a strange behavior though. When I pause the video with the mouse (and consequently, leave the pointer above the play button), and later try to continue the play with space, it will double-press the play button and pause the video again.
Re:Comments by a developer inside the Windows Media Player s... by chrismorgan on Sunday September 27, 2020 @08:03AM (#24605995)
The play button is focused, and pressing Space activates a button. So it resumes playback. Then the key handler kicks in, and recognises that Space should pause playback, so it does that.

(I don’t know which order the two things happen in, but clearly they should make sure both don’t happen.)

Re:Comments by a developer inside the Windows Media Player s... by II2II on Sunday September 27, 2020 @05:50AM (#24605482)
Thank you for pointing that out since it seems to explain why the space bar behaves erratically. I far prefer the space bar to hunting down the k-key when trying to relax.
Re:Comments by a developer inside the Windows Media Player s... by ezconnect on Sunday September 27, 2020 @07:44AM (#24605913)
My problem with Youtube is when you're not watching a video the spacebar doesn't respond to its default behavior in the browser of doing a page down.
Re:Comments by a developer inside the Windows Media Player s... by httpsterio on Sunday September 27, 2020 @08:02AM (#24605985)
Unless your tab focus is on the other controls like volume :)
Re:Comments by a developer inside the Windows Media Player s... by sam_goody on Sunday September 27, 2020 @03:24AM (#24604896)
OT: There's an thread on SO with a collection of awesome comments in code. Well worth a read. If not for the insight, than for the chuckle:

https://stackoverflow.com/questions/184618/what-is-the-best-...

Re:Comments by a developer inside the Windows Media Player s... by Sembiance on Sunday September 27, 2020 @07:17AM (#24605802)
Ahh, stack overflow. Hugely popular thread with a lot of engagement? Lets lock it. Wouldn’t want to encourage behavior that doesn’t match our narrow minded “vision” for the site. Still though, an improvement over the early years where they just outright deleted countless pages with countless contributions. In the end it’s their site and they can run it however they want, but it’s sad to see such massive potential squandered through a policy promoting deletionism. Hindsight is 20/20 though and it’s not like I’ve gone and coded a better one, so I should probably just delete this comment and move on.
Re:Comments by a developer inside the Windows Media Player s... by ChrisSD on Sunday September 27, 2020 @07:39AM (#24605884)
I do like that they are focused on being a collaborative Q&A site, nothing more and nothing less. Some sites care so much about "engagement" that they try to be all things to all people and end up simply becoming yet another generic forum.

I have other issues with SO but having a USP and sticking with it isn't their problem, IMHO.

Re:Comments by a developer inside the Windows Media Player s... by nyanpasu64 on Sunday September 27, 2020 @08:08AM (#24606024)
I adblock Hot Network Questions because it always distracts me when I'm looking for programming help.
Re:Comments by a developer inside the Windows Media Player s... by bytesandbots on Tuesday September 29, 2020 @02:11AM (#24624616)
I do that too! I try to block all kinds of Related/Hot/Recommended stuff on websites. Those can be more distracting than real ads if you ask me. Most useful has been to block the end card recommendations after YouTube videos.
Re:Comments by a developer inside the Windows Media Player s... by martin_a on Sunday September 27, 2020 @07:30AM (#24605848)
Pleae be nice to the 2374568234th user that could not manage to read any manual or just google for his error message before opening a new question!
Re:Comments by a developer inside the Windows Media Player s... by httpsterio on Sunday September 27, 2020 @08:00AM (#24605979)
It's not always that simple. Half of the time when I run into errors, there's no one solution that either works or 100% applies to my case so it's a lot of trial and error. I'm also not the most skilled developer and manuals are often way too verbose and difficult to parse if they don't contain very clear examples.

Sometimes, we just need someone to help translate our needs into a different wording and everything clicks into place. I'm sure that this causes a lot of repeated questions, but that's why when someone links a relevant question, it might be enough to solve the issue.

Re:Comments by a developer inside the Windows Media Player s... by gspr on Sunday September 27, 2020 @08:19AM (#24606094)
I think a lot of people's frustration comes from questions where it's abundantly clear that the asker searched neither SO nor the web first.

It only takes a few dozens of "why is [insert programming language]'s {addition, multiplication, subtraction, division} broken?!?!" questions that are all pointed to What Every Programmer Should Know About Floating Point Numbers before you lose all faith in humanity and get cranky. It's quite understandable.

If you can take the time to make an SO account and write a title and question body, why not Google that title first?

Another class of almost offensive questions is exemplified by this question on the front page for me right now: https://stackoverflow.com/questions/64087844/programming-tiv... . The user states what he wants, then completely useless debugging information, then a wall of code that in no way complies with the SO guidelines of reducing your code to a minimal working example, and finally an all-caps expression of personal feelings. Come on – nobody would feel sorry for someone acting like this in the real world. There are a few basic rules for social interactions.

Re:Comments by a developer inside the Windows Media Player s... by oefnak on Sunday September 27, 2020 @12:18PM (#24607766)
Or, even more annoyingly, when you Google something and the first result is the exact problem you have, with the answer being someone pointing out that the solution can easily be found by googling...

People like you seem to forget that not only the question-asker profits from an answer, but future people as wel...

Re:Comments by a developer inside the Windows Media Player s... by nishmastime on Sunday September 27, 2020 @12:55PM (#24608033)
Did you consider looking at the other 1000s of results returned by Google?
[dead]
Re:Comments by a developer inside the Windows Media Player s... by ma2rten on Sunday September 27, 2020 @12:54PM (#24608030)
No it doesn't if you make well reasoned arguments.
Re:Comments by a developer inside the Windows Media Player s... by flurben on Sunday September 27, 2020 @05:04PM (#24610120)
Your argument here is not well reasoned.
Re:Comments by a developer inside the Windows Media Player s... by ma2rten on Sunday September 27, 2020 @10:40PM (#24612433)
It doesn't have to be because it's not controversial.
Re:Comments by a developer inside the Windows Media Player s... by notional on Saturday September 26, 2020 @01:46PM (#24600668)
> so we need to add yet more ugliness in the form of assembler to an app which is already hardly a paragon of pulchritude

Throwing some serious vocab shade in these comments, love it.

Re:Comments by a developer inside the Windows Media Player s... by floatingatoll on Sunday September 27, 2020 @02:00AM (#24604548)
It's for the alliterativeness.
Re:Comments by a developer inside the Windows Media Player s... by kamel3d on Saturday September 26, 2020 @07:18PM (#24602905)
YouTuber Barnacules, use to work for Microsoft and he did tell a story on his live stream about ridiculous comments MS developers use to put in their code, I am sure they still do
Re:Comments by a developer inside the Windows Media Player s... by cybert00th on Saturday September 26, 2020 @04:24PM (#24601812)
Pulchritude!? Boy, I had to look that one up!
Re:Comments by a developer inside the Windows Media Player s... by chrismorgan on Sunday September 27, 2020 @08:08AM (#24606019)
I know the word but never use it myself, even among people that I know know it, because it sounds ugly. It’s the first syllable that does it.
Re:Comments by a developer inside the Windows Media Player s... by chapium on Saturday September 26, 2020 @04:46PM (#24601979)
Looking it up, I still have no idea what it means. The best I can gather is its beautifully wholesome. Other sources say beauty, but it seems like such a specific word for a form of beauty.
Re:Comments by a developer inside the Windows Media Player s... by necubi on Saturday September 26, 2020 @07:37PM (#24603014)
Yes, it comes directly from the latin pulchritudo which my dictionary gives as "beauty, excellence" and which is quite common in Latin texts.

To me, pulchritude is such an ugly sounding word I can always remember the meaning as being the opposite of how it sounds.

(Funny enough, I was just looking up to see if there is a name for words that sound opposite to their meaning and found this [0] discussion on the English stack exchange, which gives pulchritude as its example!)

[0] https://english.stackexchange.com/questions/103741/name-for-...

Re:Comments by a developer inside the Windows Media Player s... by Jare on Sunday September 27, 2020 @03:32AM (#24604923)
"Pulcritud" and "pulcro" are not everyday words in Spanish, but pretty frequent. Mostly used to describe something that has been cared for and set up in a deliberately clean and orderly way.

A guy with an unshaven face, wild hair, casual or wrinkled clothes, etc would never be described as "pulcro", even if they otherwise look very handsome, beautiful, or attractive.

Re:Comments by a developer inside the Windows Media Player s... by FroshKiller on Saturday September 26, 2020 @04:58PM (#24602063)
It means physical beauty, like an attractive appearance.
Re:Comments by a developer inside the Windows Media Player s... by Izkata on Saturday September 26, 2020 @08:10PM (#24603169)
Weird, I'd've guessed the opposite - the word looks as though it could've been related to "putrid".
Re:Comments by a developer inside the Windows Media Player s... by throwawgler87 on Saturday September 26, 2020 @08:57PM (#24603364)
Understandable. The meaning is easy to grasp intuitively if you've studied Latin for a semester or two and happen to know the word "pulchra." If not, I'm having trouble thinking of any cognates in English that are in any kind of common parlance.
Re:Comments by a developer inside the Windows Media Player s... by EasyTiger_ on Saturday September 26, 2020 @07:36PM (#24603009)
Have never come across the word before either. Makes you think - did the person say the word to convey some kind of meaning? Or to sound super-smart to their peers?
Re:Comments by a developer inside the Windows Media Player s... by iokevins on Saturday September 26, 2020 @08:19PM (#24603222)
Alliteration. They wrote "paragon of pulchritude", which to me sounds like smart, dry humor. It works.
Re:Comments by a developer inside the Windows Media Player s... by devnonymous on Sunday September 27, 2020 @04:35AM (#24605143)
Precisely. The phrase is pretty popular in prose, particularly when prefixed with 'perfect'.
Re:Comments by a developer inside the Windows Media Player s... by leephillips on Saturday September 26, 2020 @08:19PM (#24603226)
It could just be that the developer’s native language happens to be English, reads books, and he/she used a familiar word without thinking twice about it. Because this is, in fact, a fairly common word.
Re:Comments by a developer inside the Windows Media Player s... by grumple on Saturday September 26, 2020 @09:46PM (#24603551)
I’ve read at least several hundred books in English, and probably hundreds of thousands of news stories and blog posts, and don’t recall encountering it before. It seems to appear mostly in searches for its definition and gre prep...
Re:Comments by a developer inside the Windows Media Player s... by leephillips on Saturday September 26, 2020 @10:17PM (#24603681)
Try, say, Google ngram. Would you say that, for example, “disharmonious” is a rare word? Graph them together. Pulchritude is not even moderately rare.
Re:Comments by a developer inside the Windows Media Player s... by grumple on Saturday September 26, 2020 @10:25PM (#24603723)
I’m not sure what you’re trying to say here; pulchritude twice as rare as disharmonious, which is relatively rare. It’s an order of magnitude rarer than effervescent, as an example, which is a word I would consider uncommon but in most people’s vocabularies. And given how much more common pulchritude is - surely physical beauty is one of the most common subjects in any language - while disharmony and effervescence are more complex and rarer in practice, I think it speaks to how little the word is used. Its synonym, beauty, is used 2000x as often.
Re:Comments by a developer inside the Windows Media Player s... by leephillips on Saturday September 26, 2020 @10:37PM (#24603766)
Except that pulchritude beats disharmonious for over a hundred years. And even now, it’s half as common as disharmonious, which is a commonplace word. But if you think that a word like “disharmonious” is in any sense rare, then I don’t think I can convince you with data.
Re:Comments by a developer inside the Windows Media Player s... by lukeschlather on Sunday September 27, 2020 @12:22AM (#24604208)
When compared to "harmony" usage of the other words is basically zero. Harmony is a common word, and it is the root which makes "disharmonious" easy to understand despite its extreme rarity.

Even "disharmony" is far more common than "disharmonious."

Re:Comments by a developer inside the Windows Media Player s... by zhangeru on Sunday September 27, 2020 @11:47AM (#24607501)
Disharmonious just seems common because it sounds similar to a word we're familiar with. Most times I can recall, a writer would craft a sentence using the word 'disharmony' instead, which is many times more common than either. What led you to pick disharmonious as a comparison point, anyway?
Re:Comments by a developer inside the Windows Media Player s... by dorkwood on Monday September 28, 2020 @02:02PM (#24619489)
I agree. I think if you're going to use "disharmonious" as your benchmark, you should be comparing it with "pulchritudinous" instead.
Re:Comments by a developer inside the Windows Media Player s... by harrygeez on Sunday September 27, 2020 @01:16AM (#24604392)
Probably learned it while prepping for their SATs
Re:Comments by a developer inside the Windows Media Player s... by devnonymous on Sunday September 27, 2020 @04:38AM (#24605155)
If you search for the exact phrase you'd see it is fairly commonplace in literature.
Re:Comments by a developer inside the Windows Media Player s... by dorkwood on Sunday September 27, 2020 @02:56AM (#24604781)
It is a pretty rare word to come across in modern writing.

"And a sea of pulchritudinous models would have served as a lesson on how not to choose words: the ugly pulchritude sounds like the opposite of what it means, and it is one of those words that no one ever uses unless they are trying to show off.” https://www.goodreads.com/work/quotes/40167209-the-sense-of-...

Re:Comments by a developer inside the Windows Media Player s... by astrobe_ on Sunday September 27, 2020 @03:47AM (#24604983)
A Redditer notes that a similar word is common in Spanish. For speakers of Latin-derived languages (French, Spanish, and of course Italian), English vocabulary quizzes are generally a bit more easy because English took its literary words from old French and Latin. Thanks William The Conqueror for that.

That said, as a french speaker I would have had no idea what this word means if I did not took Latin in high-school.

Re:Comments by a developer inside the Windows Media Player s... by 20thCB on Sunday September 27, 2020 @02:53AM (#24604761)
It's not common at all.
[dead]
Re:Comments by a developer inside the Windows Media Player s... by redis_mlc on Saturday September 26, 2020 @08:15PM (#24603196)
Your comment says more about you than the author.

It was a rarely-used but well-known word in use in school in the 80s and 90s.

Re:Comments by a developer inside the Windows Media Player s... by ladelfa on Saturday September 26, 2020 @11:29PM (#24604007)
It's used in the Paul McCartney song "Famous Groupies" (on the 1978 Wings album "London Town").
Re:Comments by a developer inside the Windows Media Player s... by rob74 on Sunday September 27, 2020 @03:31AM (#24604915)
Same here... who would have thought reading random ancient source code comments could expand your vocabulary?
Re:Comments by a developer inside the Windows Media Player s... by AnIdiotOnTheNet on Sunday September 27, 2020 @09:23AM (#24606423)
I learned this word (actually, it was pulchritudinous) from the DOS game Hyperspeed last year when I streamed a blind playthrough of it. To date, this is only the second usage I have ever seen of it.
Re:Comments by a developer inside the Windows Media Player s... by ramraj07 on Sunday September 27, 2020 @04:08AM (#24605050)
Gonna take a gander and guess the developer might have an Indian origin! Or at least studied for the GRE!
Re:Comments by a developer inside the Windows Media Player s... by JdeBP on Sunday September 27, 2020 @05:06AM (#24605265)
"pulcher" is a fairly elementary piece of Latin vocab. It's in Book I of the Cambridge Latin Course, for example. This is much the same in other courses. So anyone, Indian or not, who has done basic Latin in school is likely to have encountered it and hence be aware of "pulchritude".

* https://www.dl.cambridgescp.com/dl_course/book-i

A random other example: https://www.ocr.org.uk/Images/221512-gcse-latin-j282-defined...

Re:Comments by a developer inside the Windows Media Player s... by vatican_banker on Sunday September 27, 2020 @06:14AM (#24605572)
Or anyone fluent on a romance language [1]

[1] https://en.wikipedia.org/wiki/Romance_languages

Re:Comments by a developer inside the Windows Media Player s... by tibbydudeza on Saturday September 26, 2020 @03:22PM (#24601434)
One of the ugly hacks you do in SAP to make it work is reading/changing variables and structures inside the SAP standard code because there is no API exposing them.

It is blessed officially as doing a "dirty" assign.

Re:Comments by a developer inside the Windows Media Player s... by xmprt on Saturday September 26, 2020 @11:35PM (#24604043)
> there is no API exposing them.

If there's no API exposing them but there's a way to make use of the internals with a dirty assign then sounds like the internals are now part of the API.

Re:Comments by a developer inside the Windows Media Player s... by Mandatum on Sunday September 27, 2020 @05:48AM (#24605473)
Correct. Same reason I learned a bunch of German words writing against supposedly English-dev'd and platform agnostic abstractions.

It's a fucking mess, but boy do they print money.

Re:Comments by a developer inside the Windows Media Player s... by tibbydudeza on Sunday September 27, 2020 @01:25PM (#24608315)
It is a feature of their language but you are on your own as a customer when an upgrade breaks the internals.
Re:Comments by a developer inside the Windows Media Player s... by DavidSJ on Sunday September 27, 2020 @07:31AM (#24605854)
At a web startup I worked at years ago, I spent all night tracking down a nasty bug related to user signups.

I eventually traced it to one specific line of original founder code, and lo and behold, on that line was the comment: "this is probably buggy".

Re:Comments by a developer inside the Windows Media Player s... by jackewiehose on Saturday September 26, 2020 @07:25PM (#24602943)
The bug here is in media player to listen on key-up events. Mouse-button-up makes sense because the user can move the mouse to cancel the click. But key events should be on key-down and that's how it is done most of the time. So if you use key-up you run into these problems.
Re:Comments by a developer inside the Windows Media Player s... by Waterluvian on Saturday September 26, 2020 @07:40PM (#24603036)
> But key events should be on key-down

Why?

I like how keyup is less ambiguous: it avoids the question “what do I do if the user is holding the key down?”

I also like being able to hold the key down to cue up a command and then at the right time, pull my hand away to execute crisply. For video editing mainly.

I’m not saying keyup is the only answer. Just that there isn’t one obvious answer.

Re:Comments by a developer inside the Windows Media Player s... by jackewiehose on Saturday September 26, 2020 @07:56PM (#24603107)
> Why?

Because of the reported bug in this example (which I also encountered quite often):

- user hits ESCAPE

- my window gets key-down/ESCAPE and closes itself

- your window (which happens to be the next in the focus-order) gets key-up/ESCAPE and closes itself

> I also like being able to hold the key down to cue up a command and then at the right time, pull my hand away to execute crisply

Ok, but if your window wants to support this behavior (which is not very common) you have to watch for key-up AND key-down like the bug-report suggests.

Re:Comments by a developer inside the Windows Media Player s... by cortesoft on Saturday September 26, 2020 @08:05PM (#24603147)
What if the OS only sent key-up events to a window if it also received the corresponding key-down event?
Re:Comments by a developer inside the Windows Media Player s... by dmurray on Saturday September 26, 2020 @08:37PM (#24603290)
Then you'd lose useful functionality like dragging a file from your file manager to an application window to open it there.
Re:Comments by a developer inside the Windows Media Player s... by efreak on Saturday September 26, 2020 @10:12PM (#24603654)
That's your mouse button, not a keyboard key. Although modifier keys occasionally are used, what's important here is the state of those keys (ctrl for copy, shift/alt or whatever for shortcut); nothing happens when you release them.
Re:Comments by a developer inside the Windows Media Player s... by dmurray on Sunday September 27, 2020 @06:02AM (#24605534)
You can do it with arrow keys, too. I remember doing this all the time back on Windows 3.1 and I'm sure it's still used now especially by people with disabilities.

Anyway, there's a way to fix this: send a reference to the key-down event when you send the key-up event. Then the receiving window can determine if it cares about it or not. If this is a security hole, send a reference to the window where the key-up event was sent instead.

Re:Comments by a developer inside the Windows Media Player s... by jackewiehose on Saturday September 26, 2020 @08:14PM (#24603188)
Then we wouldn't have this conversation.
Re:Comments by a developer inside the Windows Media Player s... by dkersten on Saturday September 26, 2020 @11:31PM (#24604023)
Keydowns have the physical button analogue: when you press a physical button, it immediately closes the contact, it doesn't wait until you lift your finger again.

Not saying key down is better than key up, there are certainly arguments for both.

Re:Comments by a developer inside the Windows Media Player s... by JdeBP on Sunday September 27, 2020 @05:20AM (#24605334)
Your experience of physical buttons is limited. There are many sorts. To pick an apposite example: The "Pause" button on old tape players used to be press-and-release to change state. Because it was a direct mechanical linkage and not motorized on some players/recorders, this made it possible to perform quite accurate editing with very basic kit: pressing and releasing pause to pause, pressing it again and keeping it held down, and releasing exactly when one desires to un-pause.
Re:Comments by a developer inside the Windows Media Player s... by phab on Sunday September 27, 2020 @11:30AM (#24607367)
Now THERE's a rabbit-hole if ever I saw one. Here's an 8-part (!) article [0] on why a physical button is in reality... nowhere near that simple.

[0]: https://www.eejournal.com/article/ultimate-guide-to-switch-d...

Re:Comments by a developer inside the Windows Media Player s... by fiddlerwoaroof on Sunday September 27, 2020 @01:12AM (#24604383)
Can’t physical buttons work either way, depending whether you want to break a normally closed circuit or close a normally open circuit.
Re:Comments by a developer inside the Windows Media Player s... by mantap on Sunday September 27, 2020 @01:33AM (#24604449)
Imagine a physical button on a car stereo. It activates when you press it, not when you press and release it.
Re:Comments by a developer inside the Windows Media Player s... by Someone on Sunday September 27, 2020 @01:53AM (#24604517)
“But key events should be on key-down”

Should they, in general? If you want to press a key combination, you never press the two keys at exactly the same time. So, if key events were on key-down, you would have to press modifiers before letters to type capital letters, use keyboard shortcuts, etc. I think that would be annoying and slow typists down.

It also rules out using bare modifier key presses as input methods, but that is less of an impact.

Re:Comments by a developer inside the Windows Media Player s... by williamdclt on Sunday September 27, 2020 @06:51AM (#24605711)
I've never seen a system where you can press modifiers _after_ letters, what are you using? Letters are definitely inserted on key down on all windows/linux/macos I've used
Re:Comments by a developer inside the Windows Media Player s... by fooker on Sunday September 27, 2020 @01:36PM (#24608432)
Ligatures pretty much work this way.
Re:Comments by a developer inside the Windows Media Player s... by jml7c5 on Sunday September 27, 2020 @02:12AM (#24604598)
I would argue keydown is generally right, for the sake of latency and immediacy of action.

Do people who want a capital 'A' ever intentionally type A-Shift instead of Shift-A? I've never heard of it before.

Re:Comments by a developer inside the Windows Media Player s... by JdeBP on Sunday September 27, 2020 @05:22AM (#24605348)
Where on Earth have you been typing capital letters? One does have to press the modifier first on conventional home and personal computer keyboards.
Re:Comments by a developer inside the Windows Media Player s... by InfiniteRand on Monday September 28, 2020 @04:01PM (#24620685)
There is the case of a sustained key press, where holding down the key might be part of navigation and only on key-up is the navigation finished, is it possible on platforms like Windows to distinguish between the sustained key up vs a normal key up?
Re:Comments by a developer inside the Windows Media Player s... by zerr on Sunday September 27, 2020 @03:36AM (#24604939)
That's the good side of working on proprietary closed source codebase - one has so much freedom of expression, be it in the code or in the comments.
Re:Comments by a developer inside the Windows Media Player s... by ackbar03 on Sunday September 27, 2020 @05:03AM (#24605250)
What is the best library to use these days for developing in Visual C++? I had to write some VCpp code a few days ago using the Winhttp api and it was a nightmare. I'm not sure if its because I've been spoiled rotten by python where you can do a get/post request with a few lines of code, and that this is just how CPP is, but most of the complications are to do with calling and using the (not very well) documented API itself. Is there usually a easier way to do this? I'm just doing simple post and get requests, and I couldn't even do a file upload post properly by passing the binary data in, had to convert to base64 text in the end for it to work.
Re:Comments by a developer inside the Windows Media Player s... by speps on Sunday September 27, 2020 @06:59AM (#24605740)
vcpkg has lots of libraries and is well integrated with CMake or Visual Studio.
Re:Comments by a developer inside the Windows Media Player s... by mschuster91 on Sunday September 27, 2020 @05:04AM (#24605255)
For http? Embed libcurl.
Re:Comments by a developer inside the Windows Media Player s... by rbrbr on Sunday September 27, 2020 @04:41AM (#24605174)
Pretty much what I am expecting from Windows based software considering the mess windows always was and is to this day.
Re:Comments by a developer inside the Windows Media Player s... by iforgotpassword on Sunday September 27, 2020 @04:51AM (#24605204)
Eh, I've seen similar stuff in the Linux/UNIX world. Whenever different software components interact there's a chance you need some stupid stuff to get them to play nice. As some issues get fixed over time, new ones arrive since something gets swapped out for the next big thing. The interaction of X, the display manager, logind and dbus on session start comes to mind. There's been stupid stuff in Xsession.d et al over the years while these evolved.

xscreensaver also comes to mind; Jamie likes to keep all the legacy crap in the source code for operating systems and X extensions long gone, including rants about how they're broken under certain conditions, even if the bug is long fixed, just in case someone wants to compile the current version on their 1996 HPUX workstation.

Re:Comments by a developer inside the Windows Media Player s... by dragandj on Sunday September 27, 2020 @05:56AM (#24605506)
Well, if anyone is still using screensavers in 2020, there is a good chance they’re running a 90’s system too :)
Re:Comments by a developer inside the Windows Media Player s... by marcosdumay on Sunday September 27, 2020 @08:55AM (#24606277)
Those things are distracting a hell, so it's no surprise many workplaces mandate them.

But it's never xscreensaver, of course.

Re:Comments by a developer inside the Windows Media Player s... by cblconfederate on Sunday September 27, 2020 @05:39AM (#24605424)
Yeah let's rewrite the entire system from scratch every 2 years with the langue-du-jour and deprecate everything. That 'll show them
Re:Comments by a developer inside the Windows Media Player s... by alex77456 on Sunday September 27, 2020 @06:23PM (#24610641)
"Windows bad something else (linux?) good"
Re:Comments by a developer inside the Windows Media Player s... by ezconnect on Sunday September 27, 2020 @07:48AM (#24605930)
Yes Windows is a mess but it's a beautiful mess and that is because of their mantra of being backwards compatible.
Re:Comments by a developer inside the Windows Media Player s... by joemazerino on Saturday September 26, 2020 @05:15PM (#24602183)
Microsoft internal shade. Juicy!
Re:Comments by a developer inside the Windows Media Player s... by Alopis on Saturday September 26, 2020 @04:46PM (#24601982)
My favorite part is

> If you add some obscure code such as below, to this or any other app, even if it has only the teeniest chance of being less blindingly obvious to someone else than it is to you at the time of writing, please please please add a fing comment.

This rings as true now as it did then and its my favorite comment so far out of this whole leak. I've reached a point where my comments are there to remind myself why I did a thing, because more often than not I'm the poor bastard who's stuck fixing what past me did, and past me was either a sadistic asshole or a blithering idiot.

Re:Comments by a developer inside the Windows Media Player s... by prox on Sunday September 27, 2020 @03:47AM (#24604987)
I watched Adam13531 on Twitch a lot, and the way he comments is very extensive, but complete. Ever since I started doing the same. Quite helpful to yourself.
Re:Comments by a developer inside the Windows Media Player s... by chris_wot on Saturday September 26, 2020 @07:00PM (#24602821)
This is why I love open source. In LibreOffice, cruft like this is often removed due to the embarrassment factor.
Re:Comments by a developer inside the Windows Media Player s... by sn_master on Saturday September 26, 2020 @07:18PM (#24602906)
It was removed from Microsoft code too. This is an old snapshot of the code, almost two decades old.

Since the 2002 TWC initiative, anything from easter eggs to things like that are all very strongly banned, and actively get removed as they're discovered.

Re:Comments by a developer inside the Windows Media Player s... by netsharc on Saturday September 26, 2020 @10:20PM (#24603690)
Afaik easter eggs got banned because MS wanted to gain certification for government/military use, and in order to get that, all functions/features must be documented and previously specified..

But a bit of googling shows it was part of TWC: https://docs.microsoft.com/en-us/archive/blogs/larryosterman...

Re:Comments by a developer inside the Windows Media Player s... by skee0083 on Saturday September 26, 2020 @08:28PM (#24603254)
Not surprising. No fun is allowed anywhere anymore. just dull flat interfaces with grey and black colors. people can say what they want about windows xp and vista but they had soul. todays OSes are souless. Looking at you windows 10..
Re:Comments by a developer inside the Windows Media Player s... by sterlind on Sunday September 27, 2020 @12:44AM (#24604282)
I dunno. I certainly keep my comments family-friendly and clear, but these comments resemble my own in their dry wit. I also use emojis as icons in internal tools, since they don't require finding images, but this had the side effect of people reporting "sad cat" errors and the like.
Re:Comments by a developer inside the Windows Media Player s... by dmix on Saturday September 26, 2020 @11:19PM (#24603958)
Looking at you Reddit...
Re:Comments by a developer inside the Windows Media Player s... by speedgoose on Sunday September 27, 2020 @12:22AM (#24604209)
You can configure the colours in Windows 10 to make it look fun and childish.
Re:Comments by a developer inside the Windows Media Player s... by dkersten on Saturday September 26, 2020 @11:33PM (#24604032)
I assume in the modern day of git and code review on commit diffs, its harder to slip things in than it was in the 90's.
Re:Comments by a developer inside the Windows Media Player s... by chris_wot on Sunday September 27, 2020 @05:46AM (#24605458)
I wasn't aware of this.
Re:Comments by a developer inside the Windows Media Player s... by TedDoesntTalk on Saturday September 26, 2020 @09:51PM (#24603568)
What is TWC?
Re:Comments by a developer inside the Windows Media Player s... by EE84M3i on Saturday September 26, 2020 @10:13PM (#24603668)
TrustWorthy Computing.

In this context it refers to the early 2000s memo/paradigm shift at Microsoft as well as the now-defunct centralized infosec group.

Re:Comments by a developer inside the Windows Media Player s... by bredren on Saturday September 26, 2020 @10:37PM (#24603767)
Indeed. One of the first things I did after adopting a package was remove a well understood and unnecessary exploitive. One person noticed and gave it the looking eyes emoji.
Re:Comments by a developer inside the Windows Media Player s... by mkl on Saturday September 26, 2020 @11:39PM (#24604055)
> well understood and unnecessary exploitive

Probably not what you intended to say. "Expletive" or "exploit"?

Re:Comments by a developer inside the Windows Media Player s... by bredren on Sunday September 27, 2020 @01:30PM (#24608375)
Expletive.
Re:Comments by a developer inside the Windows Media Player s... by shp0ngle on Sunday September 27, 2020 @01:41AM (#24604469)
lol LibreOffice codebase is cruft on top of cruft.
Re:Comments by a developer inside the Windows Media Player s... by chris_wot on Sunday September 27, 2020 @05:45AM (#24605457)
Indeed, it is an ancient codebase. It is being constantly refactored.