PDA

Click to See Complete Forum and Search --> : Pet Peeves Version 2.0


filburt1
Jul 19th, 2001, 08:58 AM
My VB pet peeves:

1. Using SendKeys. Usually there is a better way.
2. Using OLE. It just slows down your app and makes it chunky.
3. Calling everything Form1, CommonDialog1, Winsock1, Text1, etc. Get a clue!
4. Using deprecated methods. If global is deprecated, don't use it. If an API call is deprecated, don't use it.
5. For all languages: not using consistant naming conventions. Constants should be in ALL_CAPS_WITH_UNDERSCORES_AS_DELIMITERS for every language (or at least C, C++, Java, Basic, QBasic, Visual C++, and Visual Basic.)
6. No comments. At all.
7. Using an excessive amount of color in a program. Not only does it look amateur, but color-blind people might miss the point.
8. Speeling wrng n a proggie. It makes you look stupid. (But I probably spelled something wrong in here :))
9. Not bothering to look in the help or (with VB5 but not 6, I think) the Books Online. Asking how to use a command on the forum is stupid if the syntax and examples are right there in the help.
10. Using variants. At all. They are slow, can cause conversion (is it a string or a number?) problems, and are native to Visual Basic.
11. Not completely testing your program before releasing it into the public. As the programmer, you know how to use your own proggie. The user may not.
12. Similarly, no documentation. Microsoft is famous for it. You don't have to be.
13. Not using control arrays. txtEntry1, txtEntry2, txtEntry3, and code for each one could be replaced with For i = 0 to txtEntry.Count - 1 and then the code.
14. No encapsulation. Don't chuck all your code in one module! Networking code should go in one module, UI code should go in another, other code should go in another.
15. For all languages: Not using arrays, similar to 13. Instead of having Strings called Card1, Card2, Card3, just make a freaking array!

Any comments? Please vote in the poll!

Also post any feedback and your pet peeves!

filburt1
Jul 19th, 2001, 10:32 AM
Anyone!

beachbum
Aug 11th, 2001, 05:22 PM
Hi Flobbert
I will answer u
1. SendKeys is OK in simple cases and within the same program. I have seen this argument described well in VBPJ where the short answer was that if a simple sendkeys saves u 5 billion lines of code with api's etc then use it.
2. Again, that depends. I dont use it personally but am sure it is integral to some applications.
3. Agree
4. Hate that word deprecated
5. Partly agree. U can use ur own standard but whatever u use stick to it. I use 'l' for in sub variables, 'f' for form, 'm' for module etc then 3 letters for type eg 'int', 'sng' then descriptive name eg lintCounter. Caps inside the name make it easy to check u have typed correctly as u go becos VB will change name accordingly.
6. Agree but dont go crazy eg a=a+1 'adds 1 to a
7. Agree. Some ppl design in the dark i think
8. Agree again
9. Agree but it gives u the chance to yell at ppl doesnt it Flobbert?
10. Partly agree. Sometimes u need variants for ParamArray etc. Also some ppl unknowingly declare variants using Dim a,b as Integer
11. Agree.
12. Agree but unfortunately the mental type that makes u a good programmer usually makes u a lame documenter.
13. Agree.
14. Agree. Thats not strictly what encapsulation means but i get ur point.
15. Agree

Whew that was tiring. Need a coffee now. :D
Regards
Stuart

filburt1
Aug 11th, 2001, 05:51 PM
Well, I'm glad you most agree. :D

BTW, Flobber? You can call me either Filburt (my username) or Arien (my real name).

parksie
Aug 12th, 2001, 12:53 PM
Originally posted by filburt1
:eek: :eek: Ah, you came prepared :D

filburt1
Aug 12th, 2001, 01:00 PM
*gag*

parksie
Aug 12th, 2001, 01:08 PM
*laughs at furby*

filburt1
Aug 12th, 2001, 01:09 PM
*wishes people would either call him filburt or Arien*

parksie
Aug 12th, 2001, 01:19 PM
*grins manically at Ariel*

filburt1
Aug 12th, 2001, 01:28 PM
*sighs at the constant use of the asterisk and the name Ariel*

parksie
Aug 12th, 2001, 01:41 PM
*wonders why Filburt doesn't like being named after washing powder*

filburt1
Aug 12th, 2001, 01:42 PM
*wonders the same* BTW, we should probably keep to the original subject of the thread.

parksie
Aug 12th, 2001, 01:45 PM
*no we shouldn't*

filburt1
Aug 12th, 2001, 01:49 PM
*sigh, ends conversation because it is getting boring*

filburt1
Aug 12th, 2001, 01:57 PM
You: Is Parksie just being an idiot?
Leo: Is Parksie just being an idiot?.


:D :D

scoutt
Aug 29th, 2001, 10:40 PM
what do you call a flying fuzz ball? .............. A flying Ariel Furby:D:D:D

one of my pet peeves

17. people who plagurize out of a programmers manual.

and what makes you the resident programmer, oh ya I forgot you made a program that nobody downloaded. :D

aknisely
Aug 29th, 2001, 10:42 PM
18. People who ask newbie questions without bothering to try it out themselves or looking it up on MSDN or the book (guys like me).

rjlohan
Nov 14th, 2001, 07:27 PM
[QUOTE]Originally posted by filburt1
[B]My VB pet peeves:

1. I don't so I can't comment.
2. I avoid that too.
3. Yes, goddamn it. Esp. when they want your help & you've no idea what's doing what.... :rolleyes:
4. Ugly word, what's it mean? :D
5. Yeah, well what are the conventions, hmmm? I'll pay the constant one, but it's a bit iffy on anything else. I'll go with Stuart on this, but I go a 3-letter prefix - frmMain, strName, etc. I still haven't worked out what to call a frame though.... frm is taken... :p
6. 'Well, I leave them out all the time.
7. Hard on the eyes. Definately.
8. Let's not get in2 that. We'll b hear foureva.
9. Yes. I know I've put alot of posts here saying - Check the help...
10. Yep. 'Cept in ASP, but then, you've got no choice. :p
11. Yeppo.
12. I'll go with Stuart. I can make decent docs myself, but it bores the **** out of me. :D
13. Yep.
14. Sounds good to me.
15. Yep.

rjlohan
Nov 14th, 2001, 07:28 PM
Originally posted by parksie
*wonders why Filburt doesn't like being named after washing powder*
What about the Little Mermaid?


She's pretty hot. :p

rjlohan
Nov 14th, 2001, 07:32 PM
OH WAIT!

I gotta add one.

19. (are we up to 19 yet?) People who post on their own posts with annoying messages like :mad: :mad: :mad: and 'Why can't anyone help me?' before there's been a response to their question.

filburt1
Nov 14th, 2001, 07:34 PM
Extending that, people who do :mad: :mad: :mad: and are pissed that nobody can help. Probably because they didn't include any code to debug. :D

chrisjk
Nov 14th, 2001, 08:17 PM
Originally posted by filburt1
9. Not bothering to look in the help or (with VB5 but not 6, I think)??

filburt1
Nov 14th, 2001, 08:19 PM
What part? The Books Online was just that, actual MS programming books on the CD, but for some stupid reason MS decided not to put it in VB6, only VB5.

chrisjk
Nov 14th, 2001, 08:21 PM
sorry I thought you meant VB6 had no help files, I was like "what??" :D

YoungBuck
Nov 14th, 2001, 08:26 PM
20. Subject lines such as Arghhhhhh!!!!, I Hate VB, Need Help Now, Q For the Gurus, URGENT!

I boycott these threads.

As for number 10 though I think variants definitely are an advantage if used correctly.

filburt1
Nov 14th, 2001, 08:27 PM
Originally posted by YoungBuck
As for number 10 though I think variants definitely are an advantage if used correctly.

What situation in VB6 requires a variable declared as a Variant?

chrisjk
Nov 14th, 2001, 08:27 PM
I agree, variants are good because without them you couldn't return arrays from functions

YoungBuck
Nov 14th, 2001, 08:30 PM
I can't think of a time when I've ever need to declare a single variable as a Variant but an array of variants can be very useful.

beachbum
Nov 15th, 2001, 01:47 AM
rjlohan, congrats!! U win today's Raab award for digging up old threads :D lol

Flibbert
What situation in VB6 requires a variable declared as a Variant?

I can think of a few cases where a variant is useful and some where it is vital. I already gave u one back in the early days of this thread - ParamArray.

InvisibleDuncan
Nov 15th, 2001, 02:51 AM
Originally posted by filburt1
What situation in VB6 requires a variable declared as a Variant?
For Each Variable in Collection requires a variant or an object.

SjR
Nov 15th, 2001, 03:01 AM
Originally posted by YoungBuck
20. Subject lines such as Arghhhhhh!!!!, I Hate VB, Need Help Now, Q For the Gurus, URGENT!


I don't do this myself (I don't think) but I know people that do. If you put the real subject in, you get about 2-3 views if you're lucky... If you put "This is a real tough Q", you get 20-30 views and eventually a reply.....

because people like to be able to answer questions that are "difficult"... it makes them look good. :p

SurfDemon
Nov 15th, 2001, 08:38 AM
Am I the only person with a life here?

My pet peeve is when barmen don't fill my pint up properly (cute barmaids can get away with it :D )

SD

ghost ryder
Nov 15th, 2001, 08:50 AM
my pet peeve is when i pay for 20 bricks of raw, and i get 12 bricks of raw, and then 8 bricks of baking soda, man that just pisses me off

simonm
Nov 15th, 2001, 10:12 AM
Filburt1 (I think this is the first time I've ever posted a reply directly in response to you!!!)
What situation in VB6 requires a variable declared as a Variant?
A couple of examples:

1) When you have an optional parameter in a function/sub and you want to be able to use the IsMissing() function (all other data types have default values).

2) When you want a variable to store a value from a database field that might be null.

gravyboy
Nov 15th, 2001, 10:55 AM
or when you are using a generic function to pull data from a db from a given SQL string - the fields will have varying datatypes everytime

steve65
Nov 15th, 2001, 11:30 AM
21. I think thats right. When people PM you to look at their very important question. :mad: