Using clipboard for application communication



  • On the Joel On Software forum there's been a real fun thread with some guy who is a is an MS Access programmer (that is not the WTF). Instead he is arguing for using the Windows clipboard to pass data between two applications.  People on the forum has tried to convince him how crazy idea that is, he argues back and make himself look even more stupid. Search for
    Brice Richard in the threads.

    Is MS-Access "future-proof"?

    Professionally Worded Follow-Up Thread 

     



  • That was humorous.  I wonder if the "anon" guy that was sticking up for him in the second thread was really just him.



  • It's actually not a whole lot different to how data was passed between applications back in windows 3.1 - which was crazy and dumb.

    Also, sadly, it is not a new idea. 



  • Actually reminds me of an app of which I got a trial version a while ago (yes, year 2000).  It's called MemoClip and it'll let you put multiple things on a clipboard, manipulate them (make them all caps or all small), etc.  I remember it being neat, but I also remember being in college and not wanting to spend $20 on a program.

    Also, @Brice Richard said:

    As for the comment regarding who owns the clipboard (it was suggested
    that USERS own the clipboard not developers) I think that's a
    ridiculous comment to make.

    That's like saying drycleaners OWN
    your clothes when you take them in......well they don't....they simply
    charge for a service associated with SOMETHING you own.....NONE of us
    owns the clipboard...it's a temporary community data repository -
    nothing more, nothing less.

    Could anything be more ridiculous?

    Finally, I know a thing or two about mailslots and named pipes (I believe they were referred to as named sockets in the comments).  The idea is that you make a connection to another program, but you write to and read from it the same way you would a file.  Not rocket science.  Doesn't sound that interesting to me as a Java coder, though.  In Java, all I/O are streams, and even network streams have an eof() function. 



  • @pjsson said:

    On the Joel On Software forum there's been a real fun thread with some guy who is a is an MS Access programmer (that is not the WTF). Instead he is arguing for using the Windows clipboard to pass data between two applications.  People on the forum has tried to convince him how crazy idea that is, he argues back and make himself look even more stupid. Search for
    Brice Richard in the threads.

    Is MS-Access "future-proof"?

    Professionally Worded Follow-Up Thread 

     

    You left out the second (and arguably the best) thread of this trilogy:

    Ken White is Jealous of Me



  • @belgariontheking said:

    Also, @Brice Richard said:

    As for the comment regarding who owns the clipboard (it was suggested
    that USERS own the clipboard not developers) I think that's a
    ridiculous comment to make.

    That's like saying drycleaners OWN
    your clothes when you take them in......well they don't....they simply
    charge for a service associated with SOMETHING you own.....NONE of us
    owns the clipboard...it's a temporary community data repository -
    nothing more, nothing less.

    Could anything be more ridiculous?

     

     

    It's completely ridiculous.  That's what they invented Pastebin.com for... our applications.



  • I have to plead guilty here.  I used the clipboard once a long time ago to move data from word to excel (or something- I don't remember the precise details any more).  In my defense, it's was the first of only three VBA scripts I've ever written, and it was to fix a problem with some files that had to be done that day, no time to go learn the right way to do it.



  • @jcoehoorn said:

    I have to plead guilty here.  I used the clipboard once a long time ago to move data from word to excel (or something- I don't remember the precise details any more).  In my defense, it's was the first of only three VBA scripts I've ever written, and it was to fix a problem with some files that had to be done that day, no time to go learn the right way to do it.


    But at least you acknowledge that it was a hack, this guy is asserting that it is the right thing to do.



  • The "Resource Viewer" default(!) plug in of the otherwise astonishingly sane VB 6 IDE actually loads some resources at startup that way - Which has the very annoying effect that you lose all clipboard content as soon as you fire up the IDE - everything in there gets replaced with some stupid icon...



  • This guy reminds me of a fellow who stubbornly kept arguing with everybody that in C, there was never any reason at all to use a pointer to a pointer (e.g. int**), and that everything should be done with only one level of indirection.



  • @belgariontheking said:

    Also, @Brice Richard said:

    As for the comment regarding who owns the clipboard (it was suggested that USERS own the clipboard not developers) I think that's a ridiculous comment to make.

    That's like saying drycleaners OWN your clothes when you take them in......well they don't....they simply charge for a service associated with SOMETHING you own.....NONE of us owns the clipboard...it's a temporary community data repository - nothing more, nothing less.

    Could anything be more ridiculous?

    Finally, I know a thing or two about mailslots and named pipes (I believe they were referred to as named sockets in the comments).  The idea is that you make a connection to another program, but you write to and read from it the same way you would a file.  Not rocket science.  Doesn't sound that interesting to me as a Java coder, though.  In Java, all I/O are streams, and even network streams have an eof() function. 

     

    Even funnier about that quote is that his analogy is pretty much backwards.  Users are the customers in the drycleaner analogy and they give their "clothes" to the "drycleaner" to keep, not to do destroy.

     

    As far as the I/O, he even mentioned the registry.  Depending on what he was doing, that might have actually been an ok choice, and certainly FAR better than the clipboard. (if not for those scary API calls).



  • I remember being forced to use Lotus Notes (talk about a WTF) as an email client.  At first there was no option to reply with the text of the message which was a right pain.  Dutifully, one of our Notes guys wrote a macro or whatever and miraculously it started to work.....except that it automated a copy & paste from the original message, stuffing the clipboard.  Irate users were appeased with the line that it was a "standard side effect of push-pull replication" .  Classic.

     



  • @shadowman said:

    @pjsson said:

    On the Joel On Software forum there's been a real fun thread with some guy who is a is an MS Access programmer (that is not the WTF). Instead he is arguing for using the Windows clipboard to pass data between two applications.  People on the forum has tried to convince him how crazy idea that is, he argues back and make himself look even more stupid. Search for
    Brice Richard in the threads.

    Is MS-Access "future-proof"?

    Professionally Worded Follow-Up Thread 

     

    You left out the second (and arguably the best) thread of this trilogy:

    Ken White is Jealous of Me

     Even better.  A previous trilogy of tirades on the use of functions.

     http://discuss.joelonsoftware.com/default.asp?joel.3.507923.45

     


     



  • Brice Richard is known on JoS for thinking that he's a great programmer because, despite being self-taught, he has made a good living writing small-scale Access applications.  He doesn't believe in breaking his code up into functions - from his past posting he seems to write everything as part of the event handler for a form/button/widget, and vehemently claimed that breaking code up into functions was stupid and he didn't see the point of it.

    His posts are quite hilarious to read, especially when he starts going off about how his way of doing things is right for him, no matter how many people disagree. 



  • Sadly enough i've met and had to work with people like this.  It's your classic old vb programmer, no formal education in programming at all and got into it about twenty years ago, and stopped learning anything new about ten years ago.  Usually these guys have code that is little more than a bunch of cut, pasted adn hacked together code snippets.  One guy i had to work with was showing me his solution one day and it was as follows, this is true, happened in 2006 and was for a commercial product.

    The application needed the user to enter newline delimited data into a textbox.

    in vb the default for textboxes is that they don't accept new lines, so rather than find out how to do it he figured he'd hack the following solution together out of existing bits of code he already had thus avoiding the need to actually learn anything new(this guy had an absolute fear of learning anything new)

    On the text field when a user right clicks a messagebox appears informing them that notepad is about to open, they should type the newline delimited list in notepad then cut and paste it into the textfield and then close notepad without saving.

    The sad thing was this guy was actually proud of it and thought it was a good solution, i almost blew his mind when i showed him the multiline property, the irony is he has 20 years more programming experience than me and i've never written anything in vb but about 15 seconds on google and i had him the answer.  These sorts of guys can't tell the difference between something that works and something that works well.

     Also in his list of annoying habits was printing out source code, a lot of source code, and then sitting there with a highlighter looking at it for hours?WTF!?!1  And i don't think i ever saw him find out anything for himself, he'd ALWAYS post in a forum and he'd be totally stuck until someone answered his question and posted the code to solve it, when it was the kind of question google would tell you in the first three hits, and always using stuff from ten years ago like really old cumbersome interfaces for talking to databases when there were a myriad of better, newer easier to use ones around.

    One more quick example before this turns into a huge rant is i was helping him do some interaction with a db, he'd never really seen this "new fangled SQL thing" and didn't really want to but he did master the "SELECT * from <tablename>" but unfortunately never got the concept of a where clause(despite me repeatedly showing him) and Joins?  Forget it.  So everywhere he would select * from the table and then iterate through it in a loop with if stements to build up an array of the results he wanted.  When i pulled him up on it he got really defensive and said this was the way he knew how to do it and it worked so he wouldn't change it, and even tried to argue it was better than using a where clause.

    Shit and the time i had to help him with parsing and writing an xml file, shit i reckon that needs a whole thread of its own
     



  • @element[0] said:

    Also in his list of annoying habits was printing out source code, a lot of source code, and then sitting there with a highlighter looking at it for hours?WTF!?!1

    Seen that before, he's cargo-culting. I can debug code that way - for the specific instance of examining student assignments. More than a few TAs and instructors can do it too, because it's usually the most efficient way to deal with them. He's almost certainly attended or observed a programming class.



  • @shadowman said:

    You left out the second (and arguably the best) thread of this trilogy:

    Ken White is Jealous of Me

    Yeah, as the Ken White in question, I quite enjoyed that thread. <g>
     



  • Brice Richards is one of the most entertaining JoS posters.  He is one of those "self taught" twits who literally learns only from himself when it comes to program.  Established and time-tested advice from the community and the "collective unconscious" is wholly disregarded, because all he needs is whatever seems to work for him.



  • @TheRubyWarlock said:

    Brice Richard is known on JoS for thinking that he's a great programmer because, despite being self-taught, he has made a good living writing small-scale Access applications.  He doesn't believe in breaking his code up into functions - from his past posting he seems to write everything as part of the event handler for a form/button/widget, and vehemently claimed that breaking code up into functions was stupid and he didn't see the point of it.

    His posts are quite hilarious to read, especially when he starts going off about how his way of doing things is right for him, no matter how many people disagree. 

     

    has made a good living? access? most likely a government contractor, and makes bukus of money... not exactly a WTF for him, but for us yes : (  why can't i be paid that much to write data to the clipboard....The gov pays well, but all the realy money is in making statements like "the internet is not a dump truck, its not something u just dump stuff on" 



  • @djork said:

    Brice Richards is one of the most entertaining JoS posters.  He is one of those "self taught" twits who literally learns only from himself when it comes to program.  Established and time-tested advice from the community and the "collective unconscious" is wholly disregarded, because all he needs is whatever seems to work for him.

    I think he just likes to argue/troll/whatever.  For example, he'll jump into a thread about recruiters, where the general consensus is "be careful, watch your back, don't get screwed by those guys."  Brice is the guy who says "No, no, recruiters are all looking out for us.  They're looking to get us the best jobs for the best pay.  The recruiter's cut of the money is only an afterthought for them."
     



  • Heh, that was fun. But he HAS gotten himself a bit fame, can't argue with that!

    I actually used an application in the beginning of this year that DID use the clipboard. And it used it under a long time, so I obviously messed the process up several times before I realized what was going on... WTF! 

    Anyway, coming back here after a year or so, and it's nice to see "Brillant!" and "wooden table" and all those remarks, still :)
     



  • What I love most about Brice, I think, is that whenever anybody points out a problem in his code, his response is along the lines of "You just don't understand, because you can't see the whole picture. If you saw the rest of my code, it would all make sense."

    If seeing his programs in full makes them make sense, he must be writing the code version of the Necronomicon. It's gonna melt your brain.

    (Side point: Firefox wants to change "Necronomicon" into "Microeconomics". Coincidence? I think not...)
     



  • @belgariontheking said:

    Actually reminds me of an app of which I got a trial version a while ago (yes, year 2000).  It's called MemoClip and it'll let you put multiple things on a clipboard, manipulate them (make them all caps or all small), etc.  I remember it being neat, but I also remember being in college and not wanting to spend $20 on a program.

    http://www.codesector.com/clipboard-manager.asp

    Also, @Brice Richard said:

    As for the comment regarding who owns the clipboard (it was suggested
    that USERS own the clipboard not developers) I think that's a
    ridiculous comment to make.

    That's like saying drycleaners OWN
    your clothes when you take them in......well they don't....they simply
    charge for a service associated with SOMETHING you own.....NONE of us
    owns the clipboard...it's a temporary community data repository -
    nothing more, nothing less.

    Could anything be more ridiculous?

    Finally, I know a thing or two about mailslots and named pipes (I believe they were referred to as named sockets in the comments).  The idea is that you make a connection to another program, but you write to and read from it the same way you would a file.  Not rocket science.  Doesn't sound that interesting to me as a Java coder, though.  In Java, all I/O are streams, and even network streams have an eof() function. 

     

    Utopia Angel (available at UtopiaTemple.com) can do this for free.  It's actually a formatter for an online game but it does what you describe.



  • This method is still being used for some legacy applications.  Rational SODA for Word, for example.  See ftp://ftp.software.ibm.com/software/rational/docs/v2002/rn/SoDAReleaseNotes.htm :

    RATLC00003750: 

    Description:

    If you try to use the clipboard or Word, or if you try to use Word-generated email while SoDA is generating a report or document, SoDA stops working

    Workaround:

    After you start to generate a report or document using SoDA, do not try to use Word, Word-generated email, or the clipboard until after generation is completed.

     



  • He works at an architecture firm in DC.

     

    Shocking.

     

    The best part is that on his Amazon reviews, the only one there is an Access book.

     

    link to Amazon profile



  • He sounds like the Ed Wood of computer programming. He really sucks at it, but just has no idea whatsoever.





  • @element[0] said:

    Also in his list of annoying habits was printing out source code, a lot of source code, and then sitting there with a highlighter looking at it for hours?WTF!?!1

    There's nothing wrong with that, as such - it can be an entirely valid debugging technique, particularly when doing a full test might have some sort of cost or difficulty involved or may not be able to cover all the edge cases. It can also be useful when you want to grok large amounts of someone else's code.

    That said, neither of these circumstances seem to apply here.
     



  • I inherited a code base written by a guy with a very similar style to him. It was an app written in VB6, and the longest single function in the app was over 5,000 lines long. I really couldn't make it up if I tried.

    The presentation and data access layers (if they were to exist) were completely wrapped up in one another, so that hard-coded values dictated database decisions and what listboxes would be displayed, yadda yadda yadda. I was never able to completely fix it, only get things working well enough to keep moving forward.

    If there are doubts to its existence, I can happily post a screenshot.

    Oh, and in the realm of clipboard-level coding, there are basically no variables to hold data behind the scenes. Almost everything on every form is contained in invisible textboxes and retrieved with lines such as DataSource1 = Textbox35.Text.

    Finding out that working on that app was part of my job was probably the worst day I've had at a job so far. And not surprisingly, it was coded by a lone developer with no supervision. Might as well have been using Access ;)
     



  • @djork said:

    Brice Richards is one of the most entertaining JoS posters.  He is one of those "self taught" twits who literally learns only from himself when it comes to program. 

     

    As the ancient proverb says: He who is self taught has a fool for a master...

     

    ... and an idiot for a pupil. 



  • I particularly liked the alternatives he suggested for using the clipboard as an IPC mechanism:

    "And there are a host of other ways in which I could develop a
    communications protocol between the apps like writing to an ini file, a
    regular text file, the windows registry, etc." 

    Woot!

    Can we see more of Mr Brice and his amazing technological trapeze act on WTF, please?

    It shames me that people like this can actually make good money in IT. 



  • Jesus.  You're kidding, right?

     I mean, I knew Ration were demented, but you're kidding me, right>
    I mean, I know you can't trust IBM to buy another useless company and improve their product, but, you're kidding me, right?

    Please say "right." 

     

     



  • @flicken said:

    This method is still being used for some legacy applications.  Rational SODA for Word, for example.  See ftp://ftp.software.ibm.com/software/rational/docs/v2002/rn/SoDAReleaseNotes.htm :

    RATLC00003750: 

    Description:

    If you try to use the clipboard or Word, or if you try to use Word-generated email while SoDA is generating a report or document, SoDA stops working

    Workaround:

    After you start to generate a report or document using SoDA, do not try to use Word, Word-generated email, or the clipboard until after generation is completed.

     

    OK, I'll try to cover my ass.

    Rational Rose, yada yada yada,  what I said, only spelt correctly and with the correct punctuation marks.

     Still, it's a little shocking that a blue-chip consultancy company with several praiseworthy technological achievements under their belt can produce the same "solutions" as Mr Brice...
     



  • @KenW said:

    @shadowman said:
    You left out the second (and arguably the best) thread of this trilogy:

    Ken White is Jealous of Me

    Yeah, as the Ken White in question, I quite enjoyed that thread. <g>
     

    Hee hee hee!

    It's a treasure just for the title, isn't it? But you're right, it's Brice at his foam-mouthed frothiest.  There's a lot of boring stuff from perfectly reasonable and intelligent people who feel the need to respond; but to save WTF readers the need to plough through the whole lot, may I offer the following gems from Madame Brice's mouth?

    "Try to get me to think like you as a function of development protocols
    and I will, in all likelihood fail because my synaptic connections are
    uniquely different than yours" 

    (Translation: you are all clones. I ignored the multiple errors in grammar, on account of the fact that my synaptic connections are mostly unique.) 

    "Nothing I'm writing about here is a new idea" 

    (Translation: I haven't the foggiest whether or not it works. or is appropriate to the task in hand.) 

    "Did you ever stop to think that the GOTO keyword, which has been with
    us since the beginning of programming, has some interesting utility to
    it....which is why it has survived for soooooooooooo long?" 

    No translation required.  This is probably my favourite.  Enjoy! 

    ... and, just in case that isn't enough Brice-juiciness for you, consider this on the same thread, by Tony Chang:

    "The software FAA project could be completed by a single good developer in a couple of months."

    Idiocy begets idiocy.  Thankfully, very few people listen.  But that very few is still far too many. 

    BTW: Still jealous, Ken? 

    Alex: Can we PLEASE have more from this lunatic? Let's face it, he's perfectly qualified... 



  • This is another gem, about functions:

    I guess I'll be the lone nonconformist on this
    issue....remember....everyone once thought the world was flat at one
    time as well...and everyone of them were WRONG.

     



  • @real_aardvark said:

    BTW: Still jealous, Ken? 

    Just as jealous as I've always been. <g> 



  • One other rather amusing example of clipboard communication I've run across is none other than Microsoft Office 2000, where adding a toolbar button with an image requires placing said image in the clipboard - Office 2002 and later allows you to do it in a more sane way.
    For this reason, the software produced by the company I work for (in which one module interfaces with Outlook) only does toolbar icons in Office 2002 and up.



  • @TheRubyWarlock said:

    This is another gem, about functions:

    I guess I'll be the lone nonconformist on this
    issue....remember....everyone once thought the world was flat at one
    time as well...and everyone of them were WRONG.

    And don't forget that there was "proof" of the flat-world theory at the time too.  I remember reading one such "proof" that basically stated the following;  "If the world is round, we have to buy new maps.  That costs money, and we don't want to spend money.  Therefore the world is round."
     



  • @belgariontheking said:

    @TheRubyWarlock said:

    This is another gem, about functions:

    I guess I'll be the lone nonconformist on this
    issue....remember....everyone once thought the world was flat at one
    time as well...and everyone of them were WRONG.

    And don't forget that there was "proof" of the flat-world theory at the time too.  I remember reading one such "proof" that basically stated the following;  "If the world is round, we have to buy new maps.  That costs money, and we don't want to spend money.  Therefore the world is flat."
     

    Just read my post again.  Realized I made a mistake. Fixed it.



  • His mentality reminds me of a co-worker from a couple of years ago.  He was a contractor on the job in charge of creating the client app for mobile devices which would communicate via web services to the server app.  Here are a couple of examples.

    1- He didn't think that the posted XML to the web service should be rejected if it was badly formatted - it should never be rejected regardless of format or data quality issues.  Part of his reasoning was that there was no way to test his data serialization code sufficiently to be sure it would always be correct.  In fact he went so far to say "can my client app reject the server's response if it doesn't like what it sends back?"  We said "sure - just have your app re-post as many times as it wants until it gets an answer it will accept" ;-]

    2- Part of his client app was a feature to download credentials to support local authentication (only someone with credentials registered in the central db should be able to get into the client app itself).  During the discussion of the response XML format, a pretty standard structure like <cred><user>xxx</user><pass>xxx</pass></cred> was defined.  Since the protocol was HTTPS and the passwords were encrypted, we were comfortable with this feature.  Well, he planned on having his app hold that data in a particular format - encode the user:pass pair in to a single value.  So he asked that the data be returned to him like that.  When we decided not to for various reasons, primary of which was to not return data specially structured for one of the several web-service clients, he went a step further and declared that that's the way it should be held in the db to begin with....a single column with user/encrypted-pass pairs encoded.  His reasoning was that it's faster to do the final db scan on a single column than against two, never mind other functionality that an application may need (say, getting a list of users).  Now, this wasn't just a suggestion of his, he was adamant that that's the way it should be and there was no reasoning with him.

     

    suzilou
     



  • He's teaching a course now.



  • @djork said:

    He's teaching a course now.

    TRWTF is that there are people who still want to learn VB.



  • Latest updates:

    Brice finally decided that the three dozen or so people telling him that using the clipboard was a bad idea might be right, so he came up with another solution: the Windows Registry. Yep, the Registry. According to Brice, that's an acceptable way to manage inter-application communications, and since Access has four builtin ways to work with the Registry, it's easy.

    So people start to hammer on him about this being almost as wrong as the Clipboard idea, and offer many other suggestions (named pipes, sockets, memory mapped files, even a small database - I mean, we are talking Access here). Brice lambasts everyone, telling us we have no idea of the specifications that he's having to meet. He then describes his specification as some sort of Access application that has to communicate with a VB.NET application to make sure that it's running because he's automating email through Outlook, and the .NET app has to be running because it's a third party tool that automatically clicks the "Ok" button in the dialog that Outlook displays when you automatically send too many emails, so you can confirm it's not spyware or malware sending the mail.

    When everyone stops laughing about that, other suggestions are made (like using SMTP to send the emails) and people are even posting code. Brice comes back the next day and blasts everyone again, and mentions that AFTER SPENDING 6 HOURS researching the possibility of using SMTP to send the mail from his app he's decided it's too hard, and still defends his decision to use the registry. "After all, it's just a string value. It's not like I want to store a ton of stuff there."

    How does "send SMTP email Access" take 6 hours of research? How does it work out to be too hard? How does this Access programmer, who claims to be "highly proficient in VB.NET too" not know about SMTP support built into the .NET Framework?

    If it wasn't so funny, it would be really sad. <g>

    And even though more than three dozen people have told him how bad his ideas are, he specifically mentions me by name in every thread. I'm beginning to wonder if he's jealous of me! <g>
     



  • Sigh, thats life... People who are skilled in a very narrow field tend to overlook any non-WTF ways of doing things. I have one of those people on my hands professionally and it does HURT... A wanabe VB "guru". I think Ive posted some of his ideas somewhere. Anyway,  his understanding of programming is building a complex data collection and processing application into one excel macro and then running it every time he needs something(about twice a day) over the same around 200 THOUSAND log files(20GB worth) doing string matching... An then he complains his computer is too slow... The same data is neatly parsed into a database, updated once a day, but he is too stubborn to even consider using that as data source and building his reports on it... Even after I made the queries needed for his reports... We have had a few rows about this when there started to be some talk about me extending his monster. I refused flat out to touch his code. After repetitive phrases like "unmaintainable nightmare, and "You must be kidding!" I think he got the point.
     



  • @KenW said:


    And even though more than three dozen people have told him how bad his ideas are, he specifically mentions me by name in every thread. I'm beginning to wonder if he's jealous of me! <g>

    Careful, he might start stalking you...

    WorseThanFailure needs to have a "profiles" section where we can compile profiles of the truly lost.  E.g. those people so completely off kilter that we really hope to never meet in a dark cubicle.  To qualify you would need to post WTF type comments and be a zealot in their defense.

    Brice is definitately a candidate.


  • Discourse touched me in a no-no place

    @Pap said:

    @djork said:
    He's teaching a course now.

    TRWTF is that there are people who still want to learn VB.

    Um - it's worse than that. He's 'teaching' VB<FONT color=#cc0000>A</FONT>, not VB,

Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.