WTF Bites



  • @blakeyrat If it's not free it's not for the masses.



  • @groo Well. Ok. So make it free.

    Thanks for contributing to the discussion I guess?



  • @blakeyrat have a πŸͺ


  • Discourse touched me in a no-no place

    @blakeyrat said in WTF Bites:

    What we need is revision control for the masses.

    One of the better options I've seen is Time Machine on OSX, which periodically checkpoints the user's files to an external device. When the user wants to go and retrieve an old version, it provides the visual metaphor of a lot parallel versions going back in time. I'm not going to assert that it's perfect, but I've seen users handle it fine enough.

    That's only the least part of what version control does. Being able to label specific versions is at least as useful, as is the ability to compare versions. I wish I felt that named branches were a non-expert feature, but I really don't think that most users can cope with a non-linear temporal model. Not even most technical users. :(



  • @dkf I wish Microsoft had thrown more support towards ShadowCopy as a single-user tool instead of positioning it as an aid to network administrators, and then basically forgetting about it entirely for a decade.

    There are so many great things that Windows is capable of doing and yet practically there's virtually no way to actually do them.



  • @groo said in WTF Bites:

    @cartman82 cryptography should allow people to do some sort of p2p backups, like one guy store the other's backup.

    That's one of the projects I sometimes dream of making, if I had the skills to pull it off.



  • @dkf said in WTF Bites:

    One of the better options I've seen is Time Machine on OSX, which periodically checkpoints the user's files to an external device. When the user wants to go and retrieve an old version, it provides the visual metaphor of a lot parallel versions going back in time. I'm not going to assert that it's perfect, but I've seen users handle it fine enough.

    That actually looks pretty cool.


  • Discourse touched me in a no-no place

    @cartman82 said in WTF Bites:

    That actually looks pretty cool.

    The dynamic behaviour is even better. Apple have worked really hard to make this easy to use.

    Time Machine Tutorial: Back Up Your Mac – [07:30..14:03] 14:03
    — Tech Talk America

    I'm sure we could pick holes (and the integration with most applications is nowhere near as slick) but it's a good illustration of what can be done. Also, it's a great demo of what can be done with scalable UIs with alpha channels. ;)



  • @dkf said in WTF Bites:

    I'm sure we could pick holes

    For instance, this wouldn't be of much help to that guy who just needs to version his drawings and easily go back to earlier iterations.

    What he'd need is a super bare bones git, with just a few possible commands: save snapshot, show snapshots, restore snapshot. And a simple branch view, for experiments.


  • Discourse touched me in a no-no place

    @cartman82 said in WTF Bites:

    For instance, this wouldn't be of much help to that guy who just needs to version his drawings and easily go back to earlier iterations.

    I'm not sure I follow your reasoning on this.



  • @cartman82 said in WTF Bites:

    @groo said in WTF Bites:

    @cartman82 cryptography should allow people to do some sort of p2p backups, like one guy store the other's backup.

    That's one of the projects I sometimes dream of making, if I had the skills to pull it off.

    You know the skills you think you need are learnable, right? You already have the one skill that is least "learnable", that of ordering your thoughts in a way that can become a coherent thing in code.

    The rest is just specific domain knowledge and maybe a language suited to the job at hand.


  • Dupa

    @blakeyrat said in WTF Bites:

    A sane normal person would. I'm interested to hear why he can't.

    A sane normal person wouldn't make it necessary. The solution here is not to alias, but to refactor.



  • Sequelize decided to change the way decimals are parsed, and they did it in a minorpatch version, because fuck you.
    when people complained their response: https://github.com/sequelize/sequelize/issues/4893#issuecomment-218814852

    unfortunetaly not all PG numbers can be expressed in javascript so it's better not to try.

    πŸ–•πŸΌ πŸ–•πŸΌ πŸ–•πŸΌ πŸ–•πŸΌ



  • @Jarry said in WTF Bites:

    change the way decimals are parsed, and they did it in a minor version

    To be fair, based on the little I read of that thread, the previous behavior was a bug introduced in a minor version, and this was just reverting the bug. Unfortunately, some people had started depending on the behavior of the bug.

    :xkcd_space_bar.pdf:



  • @HardwareGeek
    yes, i know, but it was that way since november, semver has a reason to exist.

    also, their solution to the "bug" is ugly as hell


  • β™Ώ (Parody)

    @ScholRLEA said in WTF Bites:

    Did anyone ever think he was wrong about that part? It's one of the few really good things he said.

    No. The problem is that people will want to do more complicated things than simply recover old versions and then they'll need to know more details about how this stuff works and then he'll complain again because people need to understand something.


  • I survived the hour long Uno hand

    @boomzilla said in WTF Bites:

    people will want to do more complicated things than simply recover old versions

    Will they, though?

    It's like video editing software. When Windows came with Windows Movie Maker, a whole bunch of people could easily slap together video with an audio track, stick a title on the front and credits at the end, and upload that to Youtube. That was enough functionality to make it wildly popular. When people started to want to do more advanced techniques, they would graduate to a full-fledged video editing program..... with a terrible UX because video editing software is fucking awful across the board, but the point is an entry-level basic piece of software can be a gateway to going to something like git later because now you understand the basics of version control.

    And really, when you're not working in a team, branching and merging can be safely deferred as concepts for a long time.


  • β™Ώ (Parody)

    @Yamikuronue said in WTF Bites:

    Will they, though?

    Yes. Users always, always find interesting ways to use things that the creators didn't imagine. But I don't think this is particularly difficult to imagine going beyond simple temporal versioning.

    Which isn't to say that they'd be pretty happy to get saved versioning. Consider people experimenting with something. "Ooh...let me try this..." then sometimes they'll want to keep it and sometimes they won't (woo! branches!). Sometimes they'll want to keep multiple simultaneous experiments.

    No different than code, really, just a lot more difficult to implement than with relatively simple text files.


  • I survived the hour long Uno hand

    @boomzilla Yeah, but what I'm saying is, there's definitely room for a very basic beginner tool that doesn't have all the features. If you can't solve the hard problems, solve the easy ones with a really understandable interface, there's a market there.



  • As I - and many others - have said before, the real :wtf: is that this isn't handled at the file/document system level to begin with.

    Yes, I am aware of at least some of the historical reasons it wasn't done at the beginning, and how hard it would be to retrofit it on now, but seriously, the file systems for ITS, VMS, and TENEX handled this better than NTFS and ext4fs do now. The solution all of them used was crude as hell (basically, all they did was copy-on-write and kept a version number as metadata appended to the filename), but at least they didn't ignore the issue.


  • I survived the hour long Uno hand

    ...:wtf:?

    According to Pinterest, a huge trend this summer is sweet potato toast. Yes, that's right β€” apparently people are subbing sweet potatoes for bread in recipes like avocado toast and French toast. How does that make you feel?

    I... did not expect sweet potatoes to be subbing out for bread in toast. What the sweet and salty christ is going on in Pinterest?!



  • @Yamikuronue Jesus that's weird. Why not make sweet potato bread, then toast that? Sweet potato is too fibrous to get crunchy properly.


  • I survived the hour long Uno hand

    @AyGeePlus Because ~=~-<GLUUUUTEENNN>~=~



  • So there is this website that, like many others, dynamically generates PDF files. However it seems to do it in a rather... odd way that some browsers don't like.

    Basically, the javascript code first sends a POST petition to the server via XHR with some info about the requested file, and receives a JSON document with {"result":"OK"}. Then, it opens a new window pointing to a generic /show_pdf.php URL, with NO parameters of any type. The server simply sends you the last document you asked for.

    This works in Firefox and IE (after you enable pop-ups and try again). Edge, for some reason, sends the second request twice, and as a result immediately gets redirected to error.php.

    Chrome, on the other hand, does something even weirder. It opens the document properly in its built in PDF viewer. But when you try to save it, guess what file you get? That's right! error.php! Talk about confusing the user :facepalm:



  • @Yamikuronue I assumed they were using potato flour to make bread from, which is slightly weird but not hugely weird. It's actually kind of impressive considering how time-consuming it is.

    But that's just plain weird.


  • I survived the hour long Uno hand

    @blakeyrat said in WTF Bites:

    I assumed they were using potato flour to make bread from

    Nah, it's straight up slices:



  • @Yamikuronue How is that "toast" by any measure?


  • I survived the hour long Uno hand

    @blakeyrat I have no idea. I guess they do put it in the toaster though?

    0_1470246359462_upload-1f925347-db61-4691-9d17-825d2fd1dbd4


  • Considered Harmful

    ..


  • Notification Spam Recipient

    @error said in WTF Bites:

    Outlook just popped up a toaster to say "There are no new items in your Inbox."

    Thanks, Outlook.

    0_1470260179265_upload-e3d568e4-bdac-485a-ae73-947c6c3e9b75


    Filed under: I just got :disco:🐎d by Outlook.

    Perhaps any new messages were filtered away by rules?



  • @error said in WTF Bites:

    Outlook just popped up a toaster to say "There are no new items in your Inbox."

    Thanks, Outlook.

    0_1470260179265_upload-e3d568e4-bdac-485a-ae73-947c6c3e9b75

    I don't see the word "no" in the dialog...


  • Considered Harmful

    @dcon Fuck. It usually shows the message though. Now it's way more vague, and in the center of my screen instead of the corner.


  • Trolleybus Mechanic

    🐻 (pm) This customer says their staging server is broken. They go to "Page A", then "Page B", but still see the content for Page A
    πŸ‘¦πŸ» Probably caching. Tell them not to do that.

    {time passes}
    🐻 I can't repro the problem.
    πŸ‘¦πŸ» Did you try clicking between the pages.
    🐻 Yes. {click click click} oh

    {time passes}
    🐻 They say it isn't caching.
    πŸ‘¦πŸ» It is. Page.aspx?id=a and Page.aspx?id=b are the same page, so there's probably a cache ignoring the querystring.
    🐻 They say it isn't.
    πŸ‘¦πŸ» It's literally impossible for our software to do what's happening.
    🐻 But they insist they don't have caching.
    πŸ‘¦πŸ» Tell them it is.

    {time passes}
    🐻 How do we prove it's caching?
    πŸ‘¦πŸ» Really? Seriously? I dunno-- click on Page A with SQL profiler open, see queries being run, then click on Page B and see no queries because the page is coming from cache.
    🐻 ok

    {time passes}
    🐻 Can you run that test you told me about?
    πŸ‘¦πŸ» The one you were going to have the customer do on THEIR server that THEY maintain with THEIR IT department?
    🐻 Yes
    {click click click}
    πŸ‘¦πŸ» See? Exactly like I said. Like I've been saying for days now.
    🐻 But they said they checked and there's no caching.
    πŸ‘¦πŸ» Really? {click} IIS console {click} Output caching.
    πŸ’» RULE SET FOR *.ASPX CACHE FOR 30 SECONDS
    🐻 Oh.

    It took me five seconds. FIVE SECONDS to discover that. And I was just guessing.


  • Considered Harmful

    @dcon said in WTF Bites:

    @error said in WTF Bites:

    Outlook just popped up a toaster to say "There are no new items in your Inbox."

    Thanks, Outlook.

    0_1470260179265_upload-e3d568e4-bdac-485a-ae73-947c6c3e9b75

    I don't see the word "no" in the dialog...

    I fbmac'd the post as E_NOT_A_WTF, but I'm reconsidering. It's fucking infuriating that it keeps telling me there are new messages without any indication who sent them or what they might contain.


  • Considered Harmful

    @Lorne-Kates said in WTF Bites:

    πŸ’» RULE SET FOR *.ASPX CACHE FOR 30 SECONDS

    varyByQuerystring

    Edit: also, your URLs are bad and you should feel bad


  • Considered Harmful

    @error said in WTF Bites:

    @dcon said in WTF Bites:

    @error said in WTF Bites:

    Outlook just popped up a toaster to say "There are no new items in your Inbox."

    Thanks, Outlook.

    0_1470260179265_upload-e3d568e4-bdac-485a-ae73-947c6c3e9b75

    I don't see the word "no" in the dialog...

    I fbmac'd the post as E_NOT_A_WTF, but I'm reconsidering. It's fucking infuriating that it keeps telling me there are new messages without any indication who sent them or what they might contain.

    I wasn't the only one irritated by this issue.

    0_1470417398045_upload-9c6c3884-bc5c-4b5f-aa73-8e98d35beba9


  • :belt_onion:

    @cartman82 said in WTF Bites:

    @Maciejasjmj said in WTF Bites:

    Yeeeah, "image" collection.
    I'd tell you to just use Dropbox (it even has versioning built-in AFAIR), but that would probably put you on some watchlists.

    Aint no one got money for that.

    https://syncthing.net/ might work



  • @sloosecannon Found more people running Discourse: https://forum.syncthing.net/





  • I see a lot of this nonsense in the older code in our application

            stringBuilder.Append(string.Format("{0}", startDate.ToShortDateString()));
            stringBuilder.Append(string.Format(" - {0}", endDate.ToShortDateString()));
    
    1. using Append + string.Format instead of AppendFormat
    2. calling ToShortDateString() explicitly instead of using the convenient and null-safe {0:d} notation inline
    3. doing this twice in what could have been one sensible call

    Minor stuff but it gets aggravating as it adds up.



  • 0_1470439512992_upload-c522815c-9391-41bf-adc2-8c970161a442

    I'm starting to realise python 3 type hinting has one major, tragic flaw: circular imports.

    The only way to type hint is to import the hinted class as a module dependency. It means suddenly every module tries to import every other module, and your neat dependency structure goes to shit.

    WTF python people? Why not some "weak import" thing? Why do you have to ruin everything?


  • Discourse touched me in a no-no place

    @cartman82 said in WTF Bites:

    circular imports

    Only way to deal with that: persuade the people in charge of the import system to make it blow up if people use it circularly. This will piss people off for a while, but ought to persuade them to Fix Their Shit or find the idiot who's buggering things up and stop depending on their stuff entirely.

    Yes, it's theoretically possible to do it with less drastic measures, but being an asshole about it is the only way that makes things stay fixed.



  • @dkf said in WTF Bites:

    Only way to deal with that: persuade the people in charge of the import system to make it blow up if people use it circularly.

    Doesn't that already happen?



  • 0_1470642789040_upload-814ef7d6-64ab-481f-82ce-4722beb964c1

    From the code provided by the client:

    0_1470642753594_upload-4766c3e7-0d39-4606-ae0c-cd2677f50fcd

    Yeah, better make sure that console.log doesn't crash.


  • :belt_onion:

    @cartman82 Someone grabbed code from a code base that needed to support IE < 11 - console doesn't exist if the development tools aren't open.

    TR:wtf: is that this isn't just a library logging call - no need to sprinkle these around the codebase for no good reason. Unless this is the only place in the entire code base that swallows an error in which case either πŸ‘πŸ‘ or RUN FOR THE HILLS!



  • @cartman82 said in WTF Bites:

    Yeah, better make sure that console.log doesn't crash.

    Is that JavaScript?

    Nothing in the DOM or JS spec requires a global object named "console" to exist, so that error check is prudent. (Or defining your own global "console" if the browser hasn't provided one.)

    This is one of those occasions where stupid people bitch about IE not having "console" even though IE was following the spec exactly; "console" isn't required to be compliant. But, hey, any excuse to bitch about Microsoft, right?


  • FoxDev

    @cartman82 said in WTF Bites:

    Yeah, better make sure that console.log doesn't crash.

    better solution:

    // BEGIN: Console polyfill
    (function() {
        if(window && !window.console){
            window.console = {};
        }
        var actions = ["debug", "error", "info", "log", "warn", "dir", "dirxml", "table", "trace", "assert", "count", "markTimeline", "profile", "profileEnd", "time", "timeEnd", "timeStamp", "timeline", "timelineEnd", "group", "groupCollapsed", "groupEnd", "clear"];
        for(var i = 0; i < actions.length; i += 1) {
            if(!window.console[actions[i]]) {
                window.console[actions[i]] = function() {};
            }
        }
    })();
    // END: Console polyfill
    

    i'd do it with Array.prototype.forEach, but that's ES5 and doesn't support IE<9 without another polyfill.... so this one needs temporary variables.


  • Discourse touched me in a no-no place

    @accalia said in WTF Bites:

    i'd do it with Array.prototype.forEach, but that's ES5 and doesn't support IE<9 without another polyfill.... so this one needs temporary variables.

    I'd just upgrade my users computers to use a more recent browser… except I don't have to; they're already using Chrome. :)


  • FoxDev

    @dkf said in WTF Bites:

    @accalia said in WTF Bites:

    i'd do it with Array.prototype.forEach, but that's ES5 and doesn't support IE<9 without another polyfill.... so this one needs temporary variables.

    I'd just upgrade my users computers to use a more recent browser… except I don't have to; they're already using Chrome. :)

    i'm assuming enterprise needs, if you don't have enterprise needs then rewrite it with Array.prototype.forEach. :-P

    or you know, don't use console.log in the code you release to production. 🐠


  • BINNED

    @dkf said in WTF Bites:

    they're already using Chrome

    At least they are not stuck at FireFox 22 ...
    πŸ‡¨πŸ‡¦ πŸ”₯


Log in to reply