Half a croissant, on a plate, with a sign in front of it saying '50c'
h a l f b a k e r y
Incidentally, why isn't "spacecraft" another word for "interior design"?

idea: add, search, annotate, link, view, overview, recent, by name, random

meta: news, help, about, links, report a problem

account: browse anonymously, or get an account and write.



BEEYOTCH keyword

New C++ keyword: BEEOTCH!
  (+5, -7)
(+5, -7)
  [vote for,

Occasionally, in my software development, I encounter the problem of a command not executing properly. Usually, it's because some other process in the system is hogging the CPU cycles, but sometimes it's because a resource is being used by another application. For example, I've tried opening COM ports, only to receive an error from the OS indicating that the comport is in use by someone else.

It would be nice if there was a keyword in C++ that would permit a particular line of code to temporarily increase it's priority over everything else running in the system.

My suggestion is a keyword that would be appended to such lines of code. The tentative name for the keyword is "BEEYOTCH!".

So, say if you want to open a comport with no delay and 100% success, you would type:

FILE* f = fopen("com1", "rt"), BEEYOTCH! ;

Another advantage to this syntactical addition is that it would be easy to grep through the code for BEEYOTCH!'s, thus giving a better idea of where exactly the critical sections of the code are.

AntiQuark, Nov 01 2001

Please log in.
If you're not logged in, you can see what this page looks like, but you will not be able to add anything.


phoenix, Nov 01 2001

       What's wrong with:   

       cout << "If you want me to finish ever, please kill some processes. But not this one. Actually, you might as well kill me, coz I won't be done till Christmas anyhow.";   

       (Mmm, suicidal computer programmers are kind of the opposite of what you want.
pottedstu, Nov 01 2001

       Is that an acronym? If so what does it stand for, if not wouldn't it be better to use an actual word?
sirrobin, Nov 02 2001

       [sp: ... its prioritiy...; the spelling of your new keyword in the subtitle is different from the one in the text.]   

       [sirrobin], I figured this is a drawn out "bitch" (as if the programmer is trying to dominate the system), but it's something of a streyotch.   

       How do you get from the priority increase to 100% success rate?   

       A way of making programs always succeed is a WIBNI.
jutta, Nov 02 2001

       If it is a drawn out "bitch" (a streeyotch indeed) wouldn't it be better to say "pleeayozze"?
sirrobin, Nov 07 2001

       The Perl equivalent would be to add "or die trying" to the end of each statement.
pottedstu, Nov 07 2001

       So the process that gets cut off by the BEEYOTCH! keyword would be "bitch-slapped"?
joetcochran, Apr 08 2002

       AmigaOS had the lovely/evil Forbid()/Permit() pairs to do this... on the other hand, BeOS might be the best OS for this feature, given the naming similarity...
Jeremi, Apr 09 2002

       Of course, you would want the program that was cut off by the BEEYOTCH! keyword to be able to handle this interruption, and maybe counter it with a different keyword, (pseudocode) e.g.,   

       try Open COM1; on BEEYOTCH! OH_NO_YOU_DIDNT!   

       Of course this could result in an endless loop of OH_NO_YOU_DIDNT! 's, but isn't that what happens on Jerry Springer anyway?
joetcochran, Apr 22 2002


back: main index

business  computer  culture  fashion  food  halfbakery  home  other  product  public  science  sport  vehicle