|
I name some of my funcs as exactly what they do, even if it becomes something like:
CheckUSBIDAndIfWeCanHandleItGetDescriptorData(...);
Yeah, its a mouthful, but it dont half make the good freaking self documenting!
|
|
|
|
|
WhatHappensIfItCant?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Ignores it and f***s off down the pub! What else do you expect to happen!
|
|
|
|
|
Throw an exception? A tantrum? Plays a wav file going "haha-ha!"?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Nah, it is in the kernel. The execution just wanders off and does something else useful.
|
|
|
|
|
Eddy Vluggen wrote: Plays a wav file going "haha-ha!"?
Perhaps a laugh similar to Mandark[^]?
On the other hand, you have different fingers. - Steven Wright
|
|
|
|
|
Munchies_Matt wrote: it dont half make the good freaking self documenting
(please tell me that was sarcasm)
|
|
|
|
|
Nope.
|
|
|
|
|
As long as it's meaningful, I always prefer a long name for methods, variables, properties... whatever you say. 'GetPersonName()' is preferable than 'GetPN()' or 'GetP()' etc. The most important thing is, you don't have to write self-documentation and the person on the other side still understand what the code works. Just my thoughts...
Vote up or Mark as Answered, if this information helped you.Kind Regards - Kunal Chowdhury | Microsoft MVP (Windows Development), Windows 10 Champion Checkout my 'Technical blog': http://www.kunal-chowdhury.com
|
|
|
|
|
not program parameter (/argument), but related:
A few years ago, the group set down in our company to revise the coding rules tried to set a maximum source code line lenght of 80 chars. Our project leader immediately declared that our code was not to accept that limit: We had rules for creating C #define symbols that lead to symbols exceeding 80 chars (and every character in UPPERCASE). Actuall, we had several guys praising those rules (the same ones who were complaining about the 260 char file name length in FAT file systems).
Going even further back in time: I was working for a company selling their own Fortran compiler. One customer hit one ceiling: A function could have at most 99 parameters; he had more than that.
Another crazy hit-the-ceiling: A friend of mine had to extend a linker: Each module had an export table that was indexed by a signed 16-bit integer. One customer's project created a module which exported more than 32767 symbols. The quick fix was to double the maximum table size by making the index unsigned. The same project created a struct type definition of roughly 8300 lines of code. (That didn't break any limits, though.)
If noone breaks a limit, that limit serves no real purpose...
|
|
|
|
|
Kind of related - many years ago we had someone join our team who was a one finger typist - literally. Used the caps lock key rather than hold down shift whenever he could, that sort of thing.
When we cottoned on to this, method names in our libraries started to "evolve" under the guise of better clarity, so fg() became setDefaultForegroundTextColour() and cp() became setVirtualTextCursorPosition() and so on.
this was before the days of intellisense and auto-completion, of course.
|
|
|
|
|
Some code generators get to having super long variables. In the 1990's at Sun Microsystems we had to fix a 'bug' in the compiler because variables went over the 256 character limit.
|
|
|
|
|
Is it good to press F5 because it's so refreshing?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
We really need a :groan: smiley.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Is there no ESC ? No Pause/Break . . . or will you simply INSERT another SHIFTy remark?
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Good idea, get Coke-Cola to sponsor the F5 key, that way all keyboards will be free!
|
|
|
|
|
F1! They're getting worse!
98.4% of statistics are made up on the spot.
|
|
|
|
|
How about ctrl + F5? Guarantee refreshing !!
Bryian Tan
|
|
|
|
|
I dunno if F5 makes me less keybored
... such stuff as dreams are made on
|
|
|
|
|
You need F1!
Marc
Latest Article - Create a Dockerized Python Fiddle Web App
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
We all need to Shift+F11 of this thread.
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
ALT-F4. Repeatedly. Here's the coat
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I must press F9 (recalc) to understand it
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Why do they ask us to tick a box, or type in a couple of words - both jobs that a computer can do pretty easily?
To prove we aren't robots, what we should have to do is harm a human being, or through inaction allow a human being to come to harm.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Some sort of "log me in, or I'm gonna come over and kick your ass" clause...?
I think I like it.
|
|
|
|