Smart pointers, the Tizen way


  • area_pol

    Found in a certain Tizen project (yes, it's used that way):

    std::shared_ptr<SomeClass> *p = new std::shared_ptr<SomeClass>();
    

    "I could not help feeling that they were evil things-- mountains of madness whose farther slopes looked out over some accursed ultimate abyss."



  • I don't remember enough C++ to understand the WTF here.


  • area_pol

    It's aimed at C++ folks, alas let me explain.

    A "std::shared_ptr" is a smart pointer with shared ownership. A "std::shared_ptr *" is a dirty raw C-style memory pointer to a smart pointer. In other words - someone managed to take the "smart" out of "smart pointer" concept.



  • Aaaaa. Back in my Mac Classic C days, we called pointers-to-pointers "handles". So basically someone made a pointer to a handle, which invalidates the entire point of using a handle in the first place.



  • Continuing the conversation from Enlightened with @Carsten, huh?


  • area_pol

    Don't you know his access to TDWTF has been blocked?



  • I know his work blocked us, but I know nothing about what we've done to him.


  • area_pol

    He might some day come back and enlighten us all with his wisdom.



  • @TwelveBaud said:

    Continuing the conversation from Enlightened

    And now imagine what happens when the makers of Bada take over something built on that!

    Bada is, or fortunately rather was, a “great” mobile operating system by Samsung. I am not sure I've seen a representative :wtf: there, but it was generally a 💩. Memory mapping? Who needs it?¹ POSIX API? We have it. You wanted it to work too? Don't you say. Automatic builds? You mean building manually from EclipseBada IDE is not OK? You need a timed mutex? Whoa, whoa, not so fast please. You don't like null being alias for NULL? What do you mean you use it as identifier in your code? And so on...

    Fortunately that system died off shortly after version 2 getting released, presumably due to lack of applications.

    Guess what replaced it?²


  • area_pol

    At least projects there didn't live in two different unsynchronized version control systems simultaneously.


  • Java Dev

    @Bulb said:

    Automatic builds? You mean building manually from Bada IDE is not OK?

    Apparently one-click-in-a-ui qualifies as automatic to some people. You may want to involve the term unattended, or something along thoose lines.



  • @PleegWat said:

    You may want to involve the term unattended, or something along thoose lines.

    If you can find something. It looks to me these days like "unattended" is a bad word. None of the software companies seem to support this anymore...

    "Who need unattended? You got icon on desktop in corner right there. Click and work be done. Click four times every day and all work be done timely. What you say you need vacation? Get inexperienced serf to do in your absence. What do you mean what if serf forget? No forget or work no be done timely."

    Okay, maybe that's a bit over the top, but it's true. Scheduled repetitive tasks, report printing, FTP and integration with other products: more and more we're seeing companies that offer no unattended support for any of these. And drag their feet when you press for unattended.



  • The computers are TAKING OUR JOBS!!!1!one



  • sudo apt-get install unattended-upgrades

    or

    sudo dpkg-reconfigure unattended-upgrades
    

    or

    sudo apt-get install how-can-i-help


  • @tar said:

    The computers are TAKING OUR JOBS!!!1!one

    I had thought that was the point of automation. Since when did software makers decide to protect client worker jobs?

    @riking said:

    sudo install-blah-blah

    For software upgrades and such, yes. But that's not what I'm talking about.

    I'm talking about ERP-type software makers, such as the banking place that wants us to send all our invoices for payment. But not unattended, oh no. "We can't program that. You'll have to click this icon twice a day to synchronize your ERP with our ERP. Automation is much too hard."

    Or, "Yes, we can produce an Excel spreadsheet for you. Daily? Just click this link and fill in all these fields and submit; you can do that every day. Produce a report automatically, every day, for the last day? No, we can't do that."

    Or, "Sure, you can import your time and attendance into our product. For best accuracy, you'd need to do that at least once an hour. Oh, your product can produce a file automatically every hour, and you want us to automatically import it? No, we can't do that. No, you'll have to have an employee do the manual import process once per hour."

    Or, "Our product helps you handle your emergency room registration. You want to register patients before they arrive? You need to know which preregistered patients are coming in the next four hours? Just scroll through all the (thousands of) patients and look at the time when they're supposed to arrive, to pick out the dozens who'll be arriving soon. You want we should produce a list of which ones are coming in the next four hours? No, our product can't do that. Just scroll through the full list, everything you need is right there."

    That's what I mean.



  • If the need is great enough, all of those can be scripted.


  • Discourse touched me in a no-no place

    @riking said:

    If the need is great enough, all of those can be scripted.

    So we've now got years of material for Radio WTF, just from one post?


  • BINNED

    @dkf said:

    So we've now got years of material for Radio WTF, just from one post?

    Make it a dramatic reading of /t/1000 and you have decades!



  • @dkf said:

    So we've now got years of material for Radio WTF, just from one post?

    No, for that they would have to be transcripted.


  • Discourse touched me in a no-no place

    @TwelveBaud said:

    but I know nothing about what we've done to him.

    Nothing has been done on here for that account; there's nothing stopping them from coming on here.


  • Discourse touched me in a no-no place

    @CoyneTheDup said:

    That's what I mean.

    Argh.



  • @riking said:

    If the need is great enough, all of those can be scripted.

    For two of the examples I named, the application was like Excel without VB. There was no script capability in the app and, if the desired activity could be scripted at all, it would have to be done by emulating user at keyboard and mouse. Seriously.

    We solved one of the other two problems by getting an extract from their database and scraping it for the desired data ourselves, with our own add-on app. But a lot of third party app providers these days are like all, "Our database is proprietary, you may not read it."

    Plus, I just got bitten today by another one. We send this external company a file daily...but can they provide an acknowledgement file? No. All they can do is send a confirming email. If the process fails, the user is supposed to check the email...and the user didn't (because they are busy) and I didn't (because I'm busy) and the result is a file failed 3 days ago and now I'm having to deal with the fallout.

    Like I was saying, it appears that there is a general movement away from unattended solutions, to manual-only solutions. Those are good enough, right?


  • Java Dev

    Using an email with subject "Your file has been processed" and 40 lines of cruft in the body before mentioning "The processsing failed" in the same size and type as the usual "The processing was successful"?

    I don't mind email. I don't even mind frequent automatic email. But I mind not being able to see from subject+sender whether an email requires action.

    EDIT: oh, and if they send an email on success but not on failure that's even worse.


  • Discourse touched me in a no-no place

    @CoyneTheDup said:

    Like I was saying, it appears that there is a general movement away from unattended solutions, to manual-only solutions. Those are good enough, right?

    There are those of us who make something of a living from automating the unautomatable, scripting the unscriptable. You're not trying hard enough. GUI apps? Scriptable if you know what you're doing. Email handling? Definitely scriptable. Services that are implemented using an abortion of badly written HTML backed by PHP? Scriptable. Weird programs that do their damnedest to be impossible to script by any means at all? We've got the tools for that. There is nothing that the computer does that can't be made possible for it to do automatically. (At the worst, you end up having to go with Mechanical Turk or shit like that, but that's just horrendous.) It's just that it takes a lot of effort, and not so many programs are CLI tools (or “terminal GUI screens”) any more, for which there are good tools.

    If you ever catch up with some of the people responsible for the trend in anti-automation, give them a few extra kicks from me.



  • @NeighborhoodButcher said:

    Don't you know his access to TDWTF has been blocked?

    I leave for a two weeks' vacation and miss the Enlightened discussion and get TDWTF blocked at work. Shit.



  • @CoyneTheDup said:

    it would have to be done by emulating user at keyboard and mouse. Seriously.

    And yes, I was talking about doing that. You can launch an AHK script from a scheduled job. Even easier, you can pack it into a .exe: https://www.autohotkey.com/docs/Scripts.htm#ahk2exe


Log in to reply