Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,981 members, 7,817,896 topics. Date: Saturday, 04 May 2024 at 10:13 PM

Programming Blunders - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Programming Blunders (1122 Views)

(2) (3) (4)

(1) (Reply) (Go Down)

Programming Blunders by WhiZTiM(m): 12:15am On May 27, 2013
Share your top blunders of any category....
Semantics? Syntax?
Frustrating??
Funny?
Lessons?
or what, share it!!

PS: make sure you give insight to have a good visualization of your blunder!
Re: Programming Blunders by WhiZTiM(m): 12:40am On May 27, 2013
Ohhkaay...

A dot(member access) instead of a comma in a default argument function messes me up! ..C++

void func(tagger* t1, tagger* t2 = NULL)

I passed a call func(ttt,tag)

instead of func(ttt.tag)

which should have been ttt->tag
QtCreator converts . and -> appropriately... so I get lazy to using -> at times...

Well, it compiled an kept giving me seg faults!! till I almost threw the library away... only to discover my mistake weeks later with a debugger (stack tracing)...
Re: Programming Blunders by WhiZTiM(m): 12:45am On May 27, 2013
System trashing

I wrote a small numerical program of large 2D double array with a high amount of iterations and had memory leaking at each iteration till it used up 80% of my 2GB RAM!

I was surprised Windows didn't complain, it was instead paging other processes!!!
Re: Programming Blunders by WhiZTiM(m): 12:51am On May 27, 2013
I also recall, I once wanted to demonstrate a small text editor I wrote following a QtSDK example.... to my friends.
I failed to compile it! I couldn't figure it out and they laughed... then the following day, it compiled! thats how I learned about ENVIRONMENT variables and profiles
Re: Programming Blunders by spikesC(m): 2:25am On May 27, 2013
I always misplace dot(.) and plus(+) for concatenation in php and javascript embarassed
Re: Programming Blunders by Nobody: 7:37am On May 27, 2013
remembered miss placing '}' on a while loop which results into an infinite loop.. Only to run it on my browser and ..... shocked
Re: Programming Blunders by lordZOUGA(m): 6:47pm On May 27, 2013
using an uninitialized pointer. this gets me alot.
Re: Programming Blunders by PrinceNN(m): 7:35pm On May 27, 2013
well for starters, my variable naming style is funny..i just call anything....
a
a2
a21
yyyy
yyyyz
tongue
Re: Programming Blunders by Creatrixity(m): 7:42pm On May 27, 2013
* Forgetting to properly initialize every class.
* Forgetting to use 'this-> or self.' to refer to every variable in object oriented programming.Many more..
Re: Programming Blunders by lordZOUGA(m): 9:08pm On May 27, 2013
₱®ÌИСΞ:
well for starters, my variable naming style is funny..i just call anything....
a
a2
a21
yyyy
yyyyz
tongue
this is funny.
Re: Programming Blunders by PrinceNN(m): 10:04pm On May 27, 2013
lordZOUGA:
this is funny.

lol yea...but of recent i do search and replace after writing
Re: Programming Blunders by WhiZTiM(m): 11:32pm On May 27, 2013
Of recent. . .
For easy search, uncomment, or deletion... Using regex

I start and end my debug lines with a comment. Starting at #qaz and end with #wsx..

(look at your keyboard(US Layout))

(1) (Reply)

How To Get Started With Github / Please Help With Php Script / Who Can Do Photoshoping Very Well Or Album Cover Art Here?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 11
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.