javascript not executing (onChange="return function();&

JavaScript and client side scripting.

Moderator: General Moderators

m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

actually it depends, while i agree here the debugger is needed, when codeing in java and c i find debuggers to be a pain in the ass and not helpful. i find well placed echos are much better.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I guess the customer will disagree after clicking away a forgotten messagebox the thousandth time (happend to a former college of mine, *ring**ring* "does 'hallo fred' mean anything to you?' *gulp*). And also think about code passages where you can't output anything or code that's not under your control.
Usually a debugger is faster and more reliable then a printf/echo debugger. You shouldn't have to take care of the debug-process as you do by placing extra code only for debugging. It also changes the flow of your application. A simple example: dbg-output -> you can't send headers afterwards. But there can be more subtile effects. And it is possible that it is just your debug code that isn't flawless.
Esp. if you're uncertain where the error occurs the usual encircle-cycle "start, check output, stop, change (debug) code, restart" is ...hmmm... a waste of time imho
Might take a while to get used to a debugger but then it's ...fun ;)
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

this one is easy to adapt to then.

i also think the difference i was trying to denote was missed. i mean writing a program you're not loading a page (yet doing the php i did it like that when i saw something not go right figuring who cares about the headers issue while unting the bug), so you're just doing information output. as long as you have good println()s, and not "point whatever", you see loop issues immediately as well as anything else. i normally start with a message about what method i'm in and then test that method (everything it can do) and if i have an issue in the method i put more until i find the exact issue. then take it out and add the next method. building up a complete program
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

right, and if you seperate this process from the remaining code and/or output you have a unit-test/debugger. The problem with the printf/echo debugger is, you have to write it over and over again and often have to remove it afterwards. A good debugger(gui) will show you what you would print anyway (local and currently accessed/changed variables) and often provides you with a different stream for debug-printing (seperating program output from debug output)
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

all i konw is that i found the one in microsoft visual studio second guessed me and told me i was wrong when i knew i was right, and wouldn't let me friggin complete a section before telling me i had a bug in it which got annoying, so i removed that, then the ones on unix i found just broke when i had infinite loops.

then again, the sys admin hated my programs because all the tas would go through them, run them, and just shrug saying "i can't figure it out" when i had a problem and went to them. the only two that didn't i never had as tas. but i'd tell any friend in a class they were taing not to see anyone else. those two wouldn't even wanna see how it ran, like with everyone else they'd bring up the code, scroll the page to the bottom, and tell the person they're helping the line with the particular issue, any lines with similar issues, and whether or not they'd have more that one was blocking. alex would aactually tell you a precise number and never fail to be correct. both were actually fought over by teachers as to who got to have them as a ta. i've yet to meet anyone else as naturally talented as those two. alex was definitely better. it was as native to him as rusian (considering he only moved to the usa after the wall fell and lived most of his life in russia....)
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

all i konw is that i found the one in microsoft visual studio second guessed me and told me i was wrong when i knew i was right, and wouldn't let me friggin complete a section before telling me i had a bug in it which got annoying,
that sounds like the visual basic syntax checker, which is a completely different thing (and deserves to be disabled ;) )
For your tas: Good for them but you can't rely on always having someone that tells you "the error is here -> <-". If you ask them wether they never have problems of their own and they say "no, never" I'd say they're not telling you the truth. But I doubt they will answer you that ;)
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

lol. i graduated last december. alex always said he knows he's not the best because he's never written a program that didn't have a problem (and lot of people think he lied about that. but judging from the fact he lived on my floor one year and i got ot know him outside fo the berry ptach (berry ptach == name of comp sci comp cluster) i'd say he was telling the truth. he seems to have a problem with people thinking he's any bette than the next person you pull at random at coding. problem is that he's talented enough even limiting the group to experienced programers he's probably better than the other person you pull from the pool if you pull two at random and he's one
Post Reply