Jump to content

Whats your most common error?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
23 replies to this topic

#1
phpforfun

phpforfun

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,236 posts
John and I were talking about this, and I thought it would be interesting to see what everyone else messes up.. lol

For me, I code PHP, I have 2 major errors..
1. I will type l instead of ;
example:

Quote

<? echo "hello world!"l ?>

I do that alot...

2. I type ( instead of { or ) instead of }
example:

Quote

<? if(isset($username))( echo "its set"; } else { echo "its not set"; } ?>

how about you guys :P
Checkout my new forum! http://adminreference.com/

#2
0xNull

0xNull

    Newbie

  • Members
  • PipPip
  • 11 posts
Whey I use some function inside of other I forgot some ( )

1.- Incorrect

<? if(isset($variable) { echo "jojo"; } else { echo "jiji"; } ?>


2.- Correct

<? if(isset($variable)) { echo "jojo"; } else { echo "jiji"; } ?>



#3
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
When I'm into C#, if I don't use comments when I'm using a lot of { and } I end up forgetting one or two and I end up with tons of errors... and I really mess the whole indentation thing.

#4
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
I'll bet you do...

My most common error is a TooCharmingForPlanetEarthException... I mean, I accidentally add in a semicolon in VB.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#5
Guest_Jordan_*

Guest_Jordan_*
  • Guests
In PHP my most common error is not escaping quotes when printing HTML. IE:

print "<a href=\"someURL">";

In JavaScript it is not having enough single quotes IE:

var title = '<a href="'+someurl+">';


Moving this thread to the general programming forum. Excellent topic.

#6
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Sometimes I do that too. I can't remember an error I used to make in VB.

#7
zeroradius

zeroradius

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,406 posts
My biggest biggest mistake is kinda like PHPforfuns except i just forget to end the line altogether.

<? echo "Goodbye World" ?> 
should be
<? echo "Goodbye World"; ?>
that and extra white space were it should not be!
Posted Image

#8
phpforfun

phpforfun

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,236 posts
Sometimes I start at the top, and keep going down... and forget the ?> tag, lol
Checkout my new forum! http://adminreference.com/

#9
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
In ASP, not closing ALL the parenthesis:
Response.write(queryRS("somefield")

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#10
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
mine errors genuinely is forgetting semicolons at end of lines, and using the right amount of quotes or apostrophes where applicable.

I program mostly PHP at the moment...

#11
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
In C#

I sometimes make

int userInput = int.Parse(Console.Readline();

It should be

int userInput = int.Parse(Console.Readline());

I miss the last bracket.

#12
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
It's a shame the IDE doesn't add it in automatically. :(
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums