Web Hosting Talk







View Full Version : What's wrong with this script's logic/or what's wrong with mark ... (part duex)


Tim Greer
04-15-2002, 05:54 AM
While I appreciate that the mods need to lock or toss threads and end ongoing issues, I will and I have the right, to respond to posts that use lies and bogus claims to defame me. This is my right and it is expected. Loack the thread after the people involved have a chance to respond, and don't leave it unresolved and people without a chance to defend their character that has been attacked. That is fair. That said, allow me to respond, then lock the thread.

In regards to:

http://www.webhostingtalk.com/showthread.php?&threadid=44660

I will now respond to end this...


To bitserve:

Originally posted by bitserve

I'm not going to guess who you are referring to,


You wouldn't know who I was referring to, because I mentioned people that are famous and infamous in the Perl community. Since you don't know Perl, I didn't expect you would, but it was worth a try. You see, Randall, Tom and Larry wrote the major parts of Perl and all the books you are trying to talk about like you read them. They, and many other's, have fun, use different delimiters and if you want to argue with these people.. well, actually, you may as well at this point....


but find one reference of a comma being used as a delimiter for the substitue function in the PERL man pages, and I'll show five times or more than that where a pipe is used. The pipe character is a much more unique character, especially when parsing an HTML document, than the comma is! You are welcome to code however you want, but you won't be checking your nasty code into any cvs respository of any PERL projects that I know of.


There's either standard, or there's not, as I stated. If you said "more common", fine. However, :what's common: and what's :standard: in regards to programming rules and programming preferences, are not the same or even close. Of course, this is the best you can do, so I'll let you wallow in your filth and move on...




You corrected no oversight in my code,


Right, that was more than a simple oversight, I agree. This is why I couldn't allow it.


let alone a major one!


Actually, it was a major one. If you knew how to program, you'd know this and how important it is.


You were the one being nitpicky,


No, I was being serious and genuine. You were being reckless in your ignorance -- and it has to be corrected.


when you obviously don't even know what you're talking about!


Yes, you continue to claim that. I am pretty sure I know what I'm talking about, when some brat is on a forum telling me I don't, because THEY don't realize how important these things are that they think "aren't needed". You've got a real problem. For you to continue this claim, well, it's just ludicrous.


So you care if the file is there and can be opened for reading,


Yes, that's important, you see, when you want to open a file and read it's contents.


but not if it has a body tag.


If it found a closing body tag, it added the hyperlink above it -- which is what the user said he wanted. I did my part, it was correct.


I was saying that if you're going to initiate some checks, you might as well check to see if your stupid substituion succeeded.


Yes, yes.. you've mentioned how "stupid" you think my substitution is.. we all get it... give it a rest. There was nothing stupid about the code, simply because you were offended by me correcting you. This goes beyond "there's more than one way to do it", and while that might be true, I don't have any problem as long as someone does it right and not recklessly. Again, substitutions don't need to check if it replaced any value, if the function itself is replacing a value only when and IF it finds it. There's nothing to check, even though I could have -- why would I? Why would you? Why would anyone? That's going too far.

Tim Greer
04-15-2002, 05:55 AM
Continued (obviously)


Even in your last revision, you're coming closer by assigning the value to $i, why not check the value, as long as you have it?


I know what the value is, if it's there. That just added a "1" to that variable to enable a switch to know if it still needs to check again. Get it? Oh, you don't know Perl. Do you want it to check print functions too?


Probably because you want to be selective on the checks that should be recommended, saying that one check is better than another, or more important than another.


I never said one was better than the other. I never said how it's adding the hyperlink was better than the way you did it. I never said that. I said that you didn't check your calls and that it's direly important. Yes, I did comment that I'd not use all the other wasted syntax. That's to say, even the way you did it, had a lot of wasted syntax. It wasn't an insult, it was just a suggestion. The correction wasn't the extra syntax either, it was your complete disregard for logical checks and programming rules. You're not getting around or out of that fact. I see you're obviously completely confused, still.


I didn't think that you would be such a moron while trying to prove,


I never tried to prove the way you did it wouldn't work, ever. I said your later example of error checking wouldn't and it was broken code.


and failing miserably,


You either need to pay attention quite desperately, or you need to look in the mirror. I failed to prove nothing. You're simply confused about what I said and why, which is why you're dwelling on the wrong issues and making up defaming claims to try and save your ego.


that your PERL code makes any sense.


My Perl code made perfect and logical sense. Simply because I choose to do it differently, doesn't mean it doesn't make sense. Try it, it works, I promise you that. It doesn't make sense to you, because YOU DON'T KNOW PERL! Good grief!


I didn't ridicule anything that I would consider preferences, only your logic.


You tried to ridicule anything you could, and are failing, because there's nothing to ridicule. Simply that you think you are, because you don't know. It's sad, really.


If you want to stress good programming practices, you might want to learn some.


Fine, and you might STILL want to try and show me WHERE I didn't practice any -- such as I did for you. I'm waiting.................


I already addressed this. And you yourself called them silly.


You damn fool! Enough, enough, enough! ENOUGH! You stupid kid, I am at my ropes' end about now! You addressed the checks by saying you didn't feel they were needed. Just admit that yes, you should always include them, even in examples. It's a rule programmers go by. The "silly" comment was sarcasm. It's one of the most important things a programmer can do.


You never explained why my code would bomb.


I indeed, DID! It will bomb, because when it can't open a file, it will error, it also won't print or log why. If it did print or log it, it won't tell you where, and the program will also try and run until it errors or completes. Good programmers don't like broken scripts run amuck.


Probably because it wouldn't.


You saying that, just shows everything you don't know. If you knew, you'd have just said "I didn't feel it needed to work, it was just an example."


There is no excuse for a troll,


I agree completely. Start packing!

[continued -- I didn't type all this for nothin' :-)]

Tim Greer
04-15-2002, 05:56 AM
Continued (obviously)


and so you should leave. I was not being one.


The hell you weren't and the hell you still aren't now! If you don't know how to program, fine. However, do NOT make the mistake to dare come here and act like I am trolling because you are flipped about being corrected. I explained the problems and even if you want to deny it, don't you dare claim I don't know what I'm talking about or that the problem lies in my examples and not yours. I've never seen someone take such a stance to being corrected for a major mistake.


So now you state that we were supposed to be psychic and address the issue of the multiple body tags?


You seem to have indicated that must be, since your entire argument about how poor my example was, compared to your flawed and broken, ammature example, was bad -- all based on my not having checks for multiple tags. You have nothing else that you've stated, and how could you anyway.


When before, it was okay that it wasn't handled because dylan didn't say that we should expect them.


That's what I said. How are you confused?


Your code doesn't even handle them appropriately, as I said before.


If that was the case, then neither did yours. I made a quick and simple modification for it to, you did not, yet you still continue on about that. What do you want anyway? What can I do to make you stop trolling?


You're doing it on the first body tag, and not the last.


As are you. Oh wait, you do it on all still, on any line it's on. Your point?


I thought it was pretty clear that dylan wanted to add it at the end of the document, right before the body tag.


Then why didn't YOU check for that, if this is all you've got to bitch about?


I made this clear (to a sane person) earlier.


Obviously not yourself. Now I'm clynically insane too, all because you don't know Perl well enough?


Obviously we weren't dealing with the entire script.


Then what the hell have you been complaining about this entire time? Again, my point, for the PART/PORTION of the script that we WERE dealing with, you royally messed it up.


If you're not smart enough to admit it, then you forgot to add in dylan's "$tmpcntr = 1;" line.


You seriously need to stop acting like such a tool and just pay attention -- unless your rebelling years have just begun (so it seems). Is this one of those "Hire a teenager while they still know everything" type of deals?


Obviously, you would want to do something with the $error variable.


Obviously. Obviously we could have added more checks and you'd have nothing to bitch about. OBVIOUSLY though, the fact remains that even if you DID do something with that variable, the code would still break and it's still flawed logic. I can type invalid syntax and flawed logic too, that does absolutely nothing at all, and just say "Well, it wasn't complete, it was just an example to be broken and not function properly. If you want it to work, just code something (else)".


You don't want to just kill the program, especially if it's a CGI program.


And there you mention CGI again, yet if I respond to that comment again, you'll go off about how you never mentioned CGI (again). He never said it was a CGI script. I also modified the example to deal with CGI. Obviously I'm aware of this and how to deal with it, so get off this subject.


That is the reason for not killing the program!


The reason for killing the program, is so it didn't run amuck and printed and logged errors. This is important. I gave you a quick example of another way to deal with it, for the sake of running it via CGI. Either way works and it's better for a program to die, than to have it continue and break more things.


If you didn't want to run the program to completion in the first place, you shouldn't have executed it!


Oh, that's CLASSIC! HA HA HA HAAAAAAAAAAA!! Yeah, I'm with you now, screw checking for any success of functions or errors from now on. Let's just run scripts and let them do whatever they end up doing. After all, why have any idea what's going on or check to make sure anything will even work right. Let's assume computers are perfect. You must have brain damage -- no wonder you continue to go on about this nonsense and act the way you are. I've never seen anyone to clueless. I'm astounded. You've completely summed up your lack of knowledge with that statement.


Dylan could have a lot of other functions in his script that he wanted to complete even if that one didn't!


Unlikely, if he wanted it to execute that function. I'm still laughing about your last comment. *LOL* Why don't you ask him that, rather than trying to go off into lala land. Further, that doesn't mean you can't log or report errors.


There was no reason to use a different variable for your error messages.


There was a reason to do what I did. Your code wouldn't have worked, that's for sure.


If you can't read them both from the same variable, then you're broken.


*LOL*.. WHAT!? WHAT!? *LOL*


Your the one here that doesn't understand how PERL accesses files.


HA HA AHA HAAAAAAAAAAAAAAAAAAAAAAAAAAA!!!!!!!

[continued -- You know the story :-)]

Tim Greer
04-15-2002, 05:56 AM
[and so on]


It is possible for a file open to fail, and still require a close.


If the FD didn't OPEN, you have NOTHING TO CLOSE!


Even if your open fails, you should attempt to close it.


No, no, no! IT WILL ERROR AND THE SCRIPT WILL DIE (even if you didn't tell it to!) Of course, you wouldn't know this, since you don't know Perl. Do I need to spell out how pissed off I am about something nothing nothing being a dick and claiming that I am the one that doesn't understand! If you expect me to TEACH you Perl just so you'll get what I'm saying, forget it -- read some documentation for goodness sakes!


At the worst, you'll get an error that the file is not open.


At worst, your script will fall over and die and you might have further problems.


If you fail to close it, then you have an open file descriptor!


Not if it's NOT OPEN! The FD will be closed when the script finishes executing. Someone that codes like you do, best just never close anything and not have to rely on reading or writing to that same file again before the script it complete.


You weren't even smart enough to print the actual error message in your first attempt.


Hey, d**wad, that's what "die $!" does! of course, you wouldn't know that, since you don't know SQUAT about Perl!!!!!!!!!!


You just made up your own!


I created a routine to print the error and exit (and stop running the script) on any serious error like that, to work in that manner in regards to CGI, since you brought it up. Now you bitch about that too?


How helpful was that going to be?


Pretty friggin' helpful!


My last revision printed an actual error message,


No, it did not. It appended the results from $! to a variable that never printed or did anything.


that would be able to be interpreted by a sane person,


Yeah, crazy ol' Tim. How dare YOU not know Perl, I must be nuts!


whether they had much experience at all.


Well, you obviously don't, and you don't understand it. So, that's not everyone. Most people though, wouldn't continue to try and act like they did know, only to dig themselves in deeper.


PERL has very descriptive error messages that would have made it clear that the error occured while closing or opening the file.


It would not have printed it and it would have bombed. You need to learn.

[continued]

Tim Greer
04-15-2002, 05:57 AM
If this was going to confuse you, since you're not sane,


How old are you, really? This whole insane claim is getting old. You think that's going to save you from not looking like you have no clue what you're talking about? To act like I'm insane, because you don't know a programming language? I've proven this in my posts. What is wrong with you? Is this all I can expect? What am I saying... I don't even know why I typed that.


you could obviously use a different variable for each error.


Huh? I never said you needed to -- that has nothing to do with the flaw in your broken example! Tell me, could you knew any LESS!??


You probably didn't even know how to get the actual error message with the $! variable until I posted it.


Sure, and let's just ignore the fact that I had already posted the error check call before you ever replied in the first place. Shall we continue?


So now I broke the code by adding the stupid little file checks that you were so persistent about?


No, you broke it by not using actual logical file checks. You didn't print the error, you allowed the script to continue anyway. That has nothing to do with that you tried your best and didn't know what was going on.


I never even once commented on your coding style (what you earlier called personal preference)


Your first response to me, you outright and most certainly did. Are you capable of going back and READING? I guess not, given your comment about how I didn't know what $! did, "until you posted it". Heh.


, but you'll ridicule mine,


It was bad, broken code. You want to try and argue and fight, and you have nothing to go on. Because you can't deal with being corrected about something you don't know anything about -- so you resort to ALL of this and claim I am the one that doesn't know. Hell yes, I'll ridicule you for that -- I won't allow you to do it to me. It's not my fault your mother didn't hug you enough -- or perhaps too much.


after stating that it was wrong to do so?


Trying to say someone doesn't know, when they obviously do, because you didn't make a good or working example, is not ridiculing. You started this, you wanted it. If you can't handle my response, don't provocke it in the first place, and certainly don't give me your sob story after I read three threads of your blatant lies and bogus claims to save your ego from deflating.


The style that I posted is the most common in all of the PERL programming projects of which I have worked on.


Then I pity the fools that paid to have you code their scripts. Seriously. You're an unknowledgeable, hostile little troll, that would rather try and flame due to ignorance and waste people's time and pollute threads, then ask what someone means, learn something or admit you made a mistake. I can say with all confidence, that given your uneducated and lame attempts to debate this, you have proven you know very, very little about Perl. I don't doubt that these projects you coded in Perl were coded in this manner, and I'm certain they will break, if they aren't already.


Whether you think that it is a waste of space or not, it is very readable, and is lost in the compilation anyway.


If you're talking about syntax, I never said I had a problem. I said I'd go for shorter syntax, and keep it cleaner. I didn't say there was anything wrong with it, I repeat myself again from earlier. You don't understand the most basic foundation of programming, is my point. Mind you, I don't care, but you were giving out poor information and advice with broken code examples. I corrected you and you lost your mind. Now, throughout all this crap, you have displayed utter ignorance. This was uncalled for, and you can bet I'll dish it right back out. Again, save your sob story for someone that cares.


Please don't try to correct my code until (if ever) you become capable of doing it corrrectly.


This is where I would say ^(@$%$%@ you, troll boy!


You should get used to posting on a public message board (note to be confused with the Internet),


You're obviously green, I'll let this slide.. but don't think I don't have a big bag of LART with your name on it.


where people are allowed to provide their opinions.


So, you'll just override all common sense, sanity, manners and logic and facts with your "opinion" and whine until the cows come home. How, whatever works for you.


I have said in may posts, if you have a different opinion, post it.


I see you have problems with posting facts. I'll just only post what I 'feel' next time, okay?


You don't need to pick apart others opinions while doing it.


Translation: "You better not try and correct me or counter my defaming claims about you, because I was embarrassed, you big meanie!".


In this case, we weren't even talking about opinions, we were talking more or less about logic.


You dare claim yuou were speaking about or using logic? That's rich!



Yours was worse, if there was any there to begin with.


Oh geez... Well, if you think you've proven that, you .. well, I don't even know what to suggest.


If you can't handle being ridiculed, don't ridicule others.


Pot->Kettle->Black. Soooo, anyway, yeah, again, if we could have ever just stuck to those nice little things called "facts".. but, I disgress.


If you can't handle being called names, don't call others names.


I can handle it fine. After all, isn't that the protocol on the Internet when someone corrects you?


I'll try not to take peronsally you calling me skippy, a tool, stupid, irrational, and a troll.


Well, I never said you shouldn't... I'm not going to play nice to someone that's a lying self-centered troll.


I'm sure that you didn't mean it personally. Yeah, right!

Continued...

Don't act like you can sarcastically put words (or letters) in my mouth (type). I never BS people. I don't say things about subjects I have no idea about. That's your game. I genuinely meant what I said. I'm brutally honest when I run into a jerk. I'll prove and explain what I meant, make sense and cover all the issues brougth up. I'm not going to ask you to not take it personally. My intention wasn't to offend you and comment about you in that regard, but if you treat me in that way and you lie and make things up, all because your ego is spilling out of your mouth, I'll tell you clearly the situation, the facts and what I think about how you're acting. Deal with it, whine, whatever... I really don't care...

[the end]