GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   make a perl script stay resident (compiled)? (https://gfy.com/showthread.php?t=77463)

HQ 09-16-2002 07:08 PM

"and" = "and/or"... I'm not sure if mode x had more than 2 buffers.

spanky 09-16-2002 07:09 PM

Quote:

Originally posted by HQ
what about PerlEx?

PerlEX is only for windows systems, I *think*.

yup, PerlEx is just for windows. It's pretty solid, there are some pretty heavy sites using it without problems. We had a **huge** performance increase when we got it for one of our sites.

if you have the same web/cgi script ticking off several times a second you will probably see a huge improvement porting it to mod_perl. The porting would probably be pretty easy, you can look into the Apache::Registry module for running perl cgi scripts under mod_perl with little to no change and Apache::DBI for persistant database connections. There are issues with using non-thread safe perl libs under PerlEx and there probably will be with mod_perl and the new multi-threaded Apache.

I only noticed a small speed improvement using the apache c api over mod_perl except for a project that required custom crypto. The C crypto routines really took off compared to the perl (big surprise ;-) but I bet that if the crypto had been compiled as an xs lib the mod_perl version would have been almost as fast.

HQ 09-16-2002 07:15 PM

Quote:

Originally posted by TheFLY
Why waste so much CPU time on tracking every IP address for a trading script? Throw your whole IP database in the trash and trade on cookies.
Using cookies, how do you keep track of stats of all the surfers in just one individual trade? For example, if you suspect a hitbotter and you want to list of all the details of everyone from that trade.

TheFLY 09-16-2002 07:17 PM

Quote:

Originally posted by HQ
TheFLY, not really...

Every time my perl script is executed, a compiler has to be loaded into memory and executed, then the script has to be compiled and placed into memory, then the compiled version of the script has to be execute...

There has to be a faster way. I did not even know of any way to keep a compiled version of the script in memory, but I just *knew* that someone had to have thought of this optimization before.

I am coding anything that is run per-click or per-hit in C from now on...

Well what are you trying to do that is making your script run so slow in the first place? Go through your code and take out all the lines that you don't REALLY need... LIke who the fuck cares about uniques? After about 6 months of trading on uniques -- I said to myself -- you know this is totally useless information -- FUCK IT -- so I removed all my code for trading on uniques -- I deleted my damn IP database... I've said it a million times -- the term UNIQUES was invented by cheating shavers... All you should care about is RAWS and PRODUCTIVITY. In.cgi $click++; $click++; $click++; out.cgi BAM you are making money... LOL
Ok where are the haters now? Where are the coders to tell me -- NO FLY You need that %.0001 accuracy for trading efficiently... Well fuck all that. We aren't sending a fucking man to the moon -- do some approximations! Who cares if SITE A sends 10512 and SITE B sends 9523!? All you need to know is that SITE A needs more traffic! Look at Choker -- shit he comes up with an ENTIRELY NEW SYSTEM of trading traffic... He should have a patent for that shit just like I should have a patent for my shit... I think his script worked something like this -- I send SITE A 100 hits -- I send SITE B 100 hits -- if A returns more than B, then fuck you B-otch. Trading is like the old programming Game of Life -- it's all about survival man -- let weak trades die -- let the strong trades thrive -- your site should be like a living breathing organism making decisions and generalizations -- not a damn science project doing pointless calculations just so we can look at pretty pie charts all day long.

TheFLY 09-16-2002 07:19 PM

Quote:

Originally posted by Nbritte
If you are tracking surfers why store the information on your site when you can store it on their computer for free
Brian

YEAH DUDE EXACTLY!!!!!!!!!!!!!!!!!!!!!!

Why waste a bazillion CPU cycles with IP's!!!!! Cookies aren't exact -- but as long as you're making money who cares right?

TheFLY 09-16-2002 07:26 PM

Quote:

Originally posted by HQ


Using cookies, how do you keep track of stats of all the surfers in just one individual trade? For example, if you suspect a hitbotter and you want to list of all the details of everyone from that trade.

That's my secret -- figure it out yourself ;)

To know if somebody is cheating -- I don't need the IP address of every surfer -- I just need to observe general behaviors -- and this doesn't require huge databases either. In fact -- your main script doesn't even have to be doing cheat calculations all day long! That's wasted CPU time! All you need to do is store the essential behaviors to disk... When you suspect cheating -- run an entirely different program to do cheat calculations and analysis. This way you don't bog down your site.

Wath the movie PI -- you know how he's watching the ticker -and he just feels the flow? Get into the flow man! Feel the traffic!

TheFLY 09-16-2002 07:31 PM

Anyway I'm not dissing the serious programmers out there -- I have mad respect for guys like Phil that take the time to use real databases instead of using text files like me. But all I do is count clicks so I don't really need a big database... I'm just trying to stir up some controversy -- some intellectual debate... Let's come up with some new ideas -- new ways of trading traffic... Creativity! I hate it when programming is too tedius -- I like short quick programs that make money -- then you can just tinker around with them like little toys... Fun as shit! Got to keep the programming fun or damn it's too much like a job.

HQ 09-16-2002 07:34 PM

Quote:

Originally posted by TheFLY
We aren't sending a fucking man to the moon
hahahahaha:1orglaugh :1orglaugh :1orglaugh

Ok now back to read the rest of your post...

HQ 09-16-2002 07:38 PM

Quote:

Originally posted by TheFLY
Look at Choker -- shit he comes up with an ENTIRELY NEW SYSTEM of trading traffic... He should have a patent for that shit just like I should have a patent for my shit... I think his script worked something like this -- I send SITE A 100 hits -- I send SITE B 100 hits -- if A returns more than B, then fuck you B-otch. Trading is like the old programming Game of Life -- it's all about survival man -- let weak trades die -- let the strong trades thrive -- your site should be like a living breathing organism making decisions and generalizations -- not a damn science project doing pointless calculations just so we can look at pretty pie charts all day long.
My script is VERY similar (I think). I thought I invented some of the shit in my script until I found it in only 2 other scripts that I know of...

Mine uses unique IPs, however, so I do not count 1 hit in and 1,000 clickthrus the same as 800 hits in and 1,000 clickthrus. I do not let the same surfer account for more than ??? hits.

HQ 09-16-2002 07:39 PM

Quote:

Originally posted by TheFLY
Anyway I'm not dissing the serious programmers out there -- I have mad respect for guys like Phil that take the time to use real databases instead of using text files like me. But all I do is count clicks so I don't really need a big database... I'm just trying to stir up some controversy -- some intellectual debate... Let's come up with some new ideas -- new ways of trading traffic... Creativity! I hate it when programming is too tedius -- I like short quick programs that make money -- then you can just tinker around with them like little toys... Fun as shit! Got to keep the programming fun or damn it's too much like a job.
The more I read your posts the more respect I get for you dude... :thumbsup

TheFLY 09-16-2002 07:57 PM

Quote:

Originally posted by HQ


The more I read your posts the more respect I get for you dude... :thumbsup

Yeah man we got mad skills!!! This is the best job in the world! Writing programs that make money from thin air! It's a dream come true -- shit I just have to kick myself in the ass once and a while -- threads like these get me motivated.

But no programming for me tonight damn I need some beers and pussy in that order.

HQ 09-16-2002 08:01 PM

Quote:

Originally posted by TheFLY
But no programming for me tonight damn I need some beers and pussy in that order.
True dat.

Juge 09-17-2002 06:00 AM

Quote:

Originally posted by TheFLY
I used to love programming until windows came out. Dude I wish we all still used DOS. I used to love addressing the video memory directly in 320x200x256 -- Mode 3 or something, right?... And fuck all that OOP crap like garbage collection and portability -- like it made programming any better or more fun... Windows was the worst thing that ever happened to programming. I remember when programmers coded their own window libraries... If I wanted to draw a damn window I would draw the fucking window myself direct to the video memory with my own fucking code... If I wanted fonts -- I would draw the fucking letters myself! If I wanted the letters to have colors I'd code my own fucking algorithm to shade them! If I wanted to access the modem I could communicate directly with COM1 or COM2... If I wanted to make a sound I'd fucking talk directly to the fucking sound card! Now you got to jump through the hoops of anal retentive dumbasses...

It just ain't the same man. Too much bullshit.

I completely agree. 320x200x256 is mode 13h - man it was nice to have a linear frame buffer you could access directly. The only problem is that you needed to go to mode x, which wasn't linear, if you wanted multiple frames. But some algorithms just seemed to work just as nicely in modex, since things were drawn vertically (like doom and voxelspace). Anyway, for the applications in question in this thread, the fly is right - all that overhead crap is just shit slowing the system down.

BUT, you can't dis OOP (even though I hate it, personally), because it is respsonible for the fact that I can make a multi-media app for one PC, and have it run on 1,000,000's of others without worrying about which video card or sound card they had. Yes, back in the day mode 13h would work for everyone, but the sound cards were a mess. The fact is, with the capitilistic society we live in, it is impossible to govern standards, so it was bound to happen that everyone had their own unique PC. Bill Gates and all that DirectX overhead enables coding as if we were coding on a video game console - it works on them all (almost). ;)

Man, did I ever hate windows when it started to become popular, though...

HQ 09-17-2002 06:01 AM

TheFLY,

What have you programmed in mode 13h anyway? Anything you willing to show me?

Juge 09-17-2002 06:04 AM

Quote:

Originally posted by TheFLY
... I'm just trying to stir up some controversy -- some intellectual debate... Let's come up with some new ideas -- new ways of trading traffic... Creativity!
I can see you are doing exactly that. I wish there were more people like this on the boards.

TheFLY 09-17-2002 09:56 AM

Quote:

Originally posted by HQ
TheFLY,

What have you programmed in mode 13h anyway? Anything you willing to show me?

Nope.... I had some simple games -- some spaceships in space and shit. One of my all-time favorite games was Sopwith and Sopwith2 -- I played those for days on end so I tried to code my own version. Probably 2 years ago I dumped about 100 floppy disks in the trash ;) I had also worked on my own BBS from scratch (not a Telegard hack but I had one of those too :) -- I had devised an ANSI algorithm for my BBS that would essentially compress the ansi by only re-drawing (with x,y) only the parts of the screen that needed to be re-drawn (doing a compare with what was already on the screen) -- instead of redrawing everything from scratch each time (scrolling up)... I was pretty proud of that idea for a BBS -- but highschool got the best of me and that's about the time people were discovering the internet w/ dialup gateways from BBS -> university computers... I met one of the original ANSI inventors at some interview for the Pathfinder Awards (highschool shit) but he seemed pretty un-appreciative of my interest in ANSI graphics haha... Fuckers didn't give me the award -- owell...

Juge I didn't know you wrote code... Can you ICQ me for a fresh trade? #1622420 Hmm I don't see you in my ICQ list...

TheFLY 09-17-2002 10:08 AM

Quote:

Originally posted by HQ
TheFLY,

What have you programmed in mode 13h anyway? Anything you willing to show me?

I just did a google.com search -- you can still play Sopwith! Wow I wonder if the multiplayer internet option works...?!

"Sopwith2.zip The cult classic!"
http://www.classicgaming.com/sopwith/multi.htm

Juge 09-17-2002 11:18 AM

Quote:

Originally posted by TheFLY
Nope.... I had some simple games -- some spaceships in space and shit. One of my all-time favorite games was Sopwith and Sopwith2 -- I played those for days on end so I tried to code my own version.

...snip...

Juge I didn't know you wrote code... Can you ICQ me for a fresh trade? #1622420 Hmm I don't see you in my ICQ list...

Sopwith 1 and 2 rocked. I played those forever. Digger was probably my all-time favorite. Someone recoded it to work on today's PC's with higher resolution graphics, BUT, they maitainer the original code, so you are still playing the exact same game... very cool.

I just wrote you ICQ, btw. ;)

Juge 09-17-2002 11:21 AM

Ahhh.. the memories (from http://www.mobygames.com/game/shots/gameId,1380/ ):

http://img.mobygames.com/images/shot...7594376-00.gif

http://img.mobygames.com/images/shot...7594394-00.gif

HQ 09-17-2002 11:24 AM

http://www.sexhost.info/future_crew_...mages/sr03.gif
http://www.sexhost.info/future_crew_...mages/sr63.gif
http://www.sexhost.info/future_crew_...mages/sr17.gif

MUSIC (remix):
http://www.soundtrackers.de/archives...nd_reality.mp3

HQ 09-17-2002 11:26 AM

Pics from:
http://www.fortunecity.com/skyscrape...1/g2ndreal.htm

HQ 09-17-2002 11:42 AM

Future Crew today:

Crazy Finns Forge 3-D for PDAs
http://www.wired.com/news/games/0,2101,47850,00.html

XXXManager 09-18-2002 11:22 AM

$a000. rings a bell anyone :thumbsup LOL
Mode X was double buffering - not triple.
TheFLY: Windows was not a bad move for programming. If was a move on OS. Programming progressed regardless of Windows. OOP and Garbage collectors were not invented because of windows, nor was multi-tasking (remember autodesk?)
Saying Windows is bad because it complicated your life is like saying cars is bad move because horses were good enough (and safer :winkwink: )
HQ: All the jokers (no offense) that told you all you need is to clean your code.. Ignore them. Getting a car to run 500Mph dont require some extra-weight removel - it requires a Jet engine :1orglaugh
Mod_perl is a good tool if you want to still code in perl but make the script run fast. Its not only accelerates the scripts it also gives you DB connection pooling tools - which are essential if you are doing DB things.
Writing in C - instead of perl will solve something but not everything. If you do DB stuff - writing in mod_perl with DB connection pooling will work MUCH faster than C code or even ASM code (with no connection pooling).
Biggest disadvantage of mod_perl = memory consumption. Its a killer. make sure you got atleast 1G mem.
TheFLY: Relying on cookies or approximation to track traffic is a brilliant idea - I would even go further and not require stats from my sponsors - just approximate the traffic I send them and devide by 2000 and multiple by $20.. Good enogh no? :1orglaugh
Same thing with diving air/time reserve calculation - Approximation rocks ;)
Who needs Unique?.. Hell - who needs productivity? hehe. Hell - who needs tracking anything??? in average - everything is average - so fuck it :Graucho

Juge 09-18-2002 04:23 PM

Quote:

Originally posted by XXXManager
$a000. rings a bell anyone :thumbsup LOL
Mode X was double buffering - not triple.

Yes, $A000 sure rings a bell....

Mode-X can be double buffered and triple buffered... hell, I even quadruple buffered with it. It helped when I didn't know how to get an interrupt to fire at the start of the retrace for proper triple-buffering. In 320x200, there's room for 4 pages. 320x240 only had room for 3, and 320x400 only had room for 2.

HQ 09-18-2002 06:01 PM

XXXManager,

1GB RAM for mod_perl? I am getting a new server tomorrow and it's only for 512MB RAM. Are you sure I need an upgrade?

TheFLY 09-18-2002 06:21 PM

Quote:

Originally posted by XXXManager
TheFLY: Windows was not a bad move for programming. If was a move on OS. Programming progressed regardless of Windows. OOP and Garbage collectors were not invented because of windows, nor was multi-tasking (remember autodesk?) Saying Windows is bad because it complicated your life is like saying cars is bad move because horses were good enough (and safer :winkwink: )


(...Future Crew music in background...) LOL are you talking about Quarterdeck's DESQview -- I loved DESQiew! There was also OS/2 which was the first to do "preemptive" multi-tasking... and was able to multi-task DOS long before Windows.

Sure programming "progressed" in small circles -- but Windows took over the market! Nobody had a choice in the matter! Even IBM employees would complain about having to code for Windows... that's where the money went. Windows was being shipped pre-installed everywhere -- you didn't have a choice -- it was force-fed to the consumer. Microsoft did the same thing again with Frontpage! ;)

Sure OOP was an evolutionary step independent of Microsoft -- but personally I think it sucks. And many die-hard coders will agree with me.

OOP sux for the following obvious reasons.

1. More lines of code to do the same thing.
2. Why force inheritance on problems? Take an example from a classic OOP argument. Why does a toaster need to inherit a heating element? So I can build an oven to inherit a damn heating element? NO! Just build the fucking toaster AND THEN build a fucking oven! Why? BECAUSE AN OVEN IS NOT A TOASTER. By trying to be crafty -- "saving work" -- by avoiding "redundant" code -- you have in effect made the same task much more complicated! And you didn't even save any time because you had to a) work within the complications of the OOP methodology/syntax and b) code runs slower and c) since the heating element is not exactly the same for both devices -- you have to make adjustments anyway!
3. OOP is all about "hiding" what's *really* going on -- they call it "encapsulation". Who needs good documentation? Just use these objects! Use these objects and you can build anything! LOL. Now we have hoards of dumb programmers that don't even understand why they are using objects in the first place!
4. Portability is a bullshit issue -- everyone runs Windows anyway. It used to be nice that MAC's were considered graphics machines and IBM's were considered number crunchers, and Amigas were considered video machines. Now we just do everything brute-force instead of elegantly.
5. If you merely want to save reduntant work -- that's called procedural programming -- it was invented long before OOP and essentially does the same thing -- in a more straightforward and flexible way.

It's insane! It's insane how slow computers are given the amazing advances in hardware. It's insane that I can load up a Java application on a Pentium processor and watch window drawing itself. That is pathetic. All this bullshit about Java being platform independent -- big fucking deal! Everyone runs Micro$hit anyway. Same goes for Java's promise about being version independent and more stable -- that's a load of BS -- if you don't have the correct SDK your shit is going to crash.


Quote:

Getting a car to run 500Mph dont require some extra-weight removel - it requires a Jet engine :1orglaugh
This is exatly the attitude that pisses me off!!! 500mpg is too fast for human reaction time... this ain't fucking TRON! Stop thinking like an OOP programmer -- your car did not inherit a "engine object"!!! Should all engines be the same? Noooo... Every engine is UNIQUE!!! OOP is Diversity's enemy... It's the enemy of Intelligence. The enemy of Creation!


Quote:

TheFLY: Relying on cookies or approximation to track traffic is a brilliant idea - I would even go further and not require stats from my sponsors - just approximate the traffic I send them and devide by 2000 and multiple by $20.. Good enogh no? :1orglaugh
Same thing with diving air/time reserve calculation - Approximation rocks ;)
Who needs Unique?.. Hell - who needs productivity? hehe. Hell - who needs tracking anything??? in average - everything is average - so fuck it :Graucho
OK while you're busy doing calculations I will be posting on GFY and tonight I'm moving to NYC! ;)

Anyway we aren't diving for surfers -- this is the fucking internet -- not Baywatch.

HQ 09-18-2002 07:11 PM

TheFLY, I once felt like you did for years and years until finally the day came when Windows did *NOT* run slow. I believe this was when I purchased a 200MHz computer running windows 95 or 98. It was the first time ever that I could click on a window and have it come up within 0.5 seconds, as opposed to listening to the hard drive swap memory in and out for 10-20 seconds for every fucking ALT-TAB. At that point, I started to realized that Windows was here to stay and it would make all of our work easier and make us all more succesful. When this really hit home is when 3D acceleration graphics cards hit the market, specifically 3Dfx's Voodoo 2. Games not ran fast on a Windows system for the first time ever, and it higher detail than every previously imagined.

Then I saw what Bill Gates saw back in 1975 (or sometime around then). The little road bumps here and there that we complained about were insignificant in the big picture.

XXXManager 09-18-2002 07:15 PM

HQ: I would suggest you get 1G. It can run on 512 as well but 1G is definately a requirement (unwritten I guess). MOD_PERL is HEAVY on mem. Get more while you can - its cheap these days. More mem will help you anyway even for non-mod_perl stuff

TheFLY: Hey :) I truely read all what you wrote. Damn - I dont have time to live now :)
so...
OOP unlike windows does not come preinstalled with every machine like windows. People would not program it if it was a bad idea. OOP is not good for everything but its a damn good idea for complex object. If you have'nt been a part of such a project you would not understand the need. Hell - I dont use if for everything but when its needed its a bless.

OOP is quite the oposite from what you said:
"More lines of code to do the same thing" - wrong. I would not program a file compression utility in OOP but a banking system or an ERP or any other multi-"essence" system - i will indeed do.

Proceduraly programming sux. Procedures is the nicest way to do things "un"nicely. OOP takes that ugliness and covers it.
OOP is not a syntax - its a way of thinking. Encapsulating (hiding the shit :winkwink: ) is only one aspect of it.

Same thing with Inheritance.

Save redundant work? Writing dumb procedures will get you as far as possible from doing efficient non-redundant work. OOP helps as much as anything today is able to - in saving redundant work. It takes some time to clean your room - but once you did that - its damn much easier to find your lucky socks :thumbsup

"Getting a car to run 500Mph dont require some extra-weight removel - it requires a Jet engine:1orglaugh"
This was an analogy for people (you included I think) saying that HQ needs to just tidy his code a little. BS - tidy you code from now till forever - keeping a code in native perl will never be fast if you don't use DB connection pooling and compiled code.

HQ: listen man - if you do DB stuff - mod_perl is better for you than C or ASM - Forget about cleaning your code - you GOT to use DB-connection pooling and use compiled code. doing C DB connection pooling is possible - but you will have to figure out how OR find an already written library for that. MOD_PERL has all of that inside and needs very little porting IF you wrote your perl code right. Get the MOD_PERL running and ONLY THEN think about other smarter moves like really porting your code (atleast the mission critical parts) to C.

HQ 09-18-2002 07:33 PM

XXXManager,

I'll think about the 1GB RAM... I'm leasing, so it is a bit more expensive. $40 extra / month. That's actually not too bad.

Explain DB-connection pooling. Does it keep things resident in memory? Does it keep the connections opened so you do not have to connect and disconnect to the DB all the time? What is it exactly? Sounds similar to what I want mod_perl to do, just keep the fucking thing open and compiled so I do not have to re-do that 10 times every second.

Right now, to remind you, I am using PERL/DBI/MySQL.

XXXManager 09-18-2002 07:49 PM

Quote:

Originally posted by HQ
XXXManager,
I'll think about the 1GB RAM... I'm leasing, so it is a bit more expensive. $40 extra / month. That's actually not too bad.
Explain DB-connection pooling. Does it keep things resident in memory? Does it keep the connections opened so you do not have to connect and disconnect to the DB all the time? What is it exactly? Sounds similar to what I want mod_perl to do, just keep the fucking thing open and compiled so I do not have to re-do that 10 times every second.
Right now, to remind you, I am using PERL/DBI/MySQL.

Well. dont know about prices and server. More memory makes sense. especially 1G. Maybe consider colocated server :)
Anyway - DB connection pooling:
Once you said you use DBI - I shouldn't care (for that DB conn pooling) what DB you use because its all hidden behind the DBI.
Anyway...
DB connection pooling is - creating a "pool" of opened connection to the DB and when ever your script needs a connection to the DB it takes one from the pool.
This saves the time and resources needed to create a new connection. This actually helps in two places - both your web-server and your DB server (assuming they are different machines). anyway - even if its the same machine - its helps him twice. Openning a new DB connection is very laborious. It takes alot (relatively) time, cpu and memory to do that. Instead - pulling an already connected connection from the pool is very fast and easy on resources. there are mechanisms to ensure the connection is valid (like db pinging etc) but there are all done for you and you need not to worry about them. basically - you keep using your DB as you are now - mod_perl wraps all the DB commands and "covers" them with a layer that does all that funky shit.
Just to let you realize this thing - it can help you turning your script from a server killer to a neat code that can sometimes run hundrads of times faster - literally speaking!
You ofcourse need to configure it right - so you dont have too little connections opened (keeping your script waiting in queue for a connection too long) or too many connections (keeping your resources low and maybe even killing performance)
BUT in general - if you do heavy DB stuff in perl MOD_PERL will help you FAST and ALOT. both DB conn pooling and keeping a pool of processes of the compiled code.
Pools are popular with mod_perl :thumbsup

TheFLY 09-18-2002 07:49 PM

Quote:

Originally posted by XXXManager
"More lines of code to do the same thing" - wrong.
Dude it's simple. You take out all the extra syntax required for inheritance and you get fewer lines of code. Why do I need so many parent objects -- when I can compress all the methods into one object with no parent? If you need two objects to inherit the same parent -- you don't need OOP to solve that problem! All your parent objects will be converted into sequential instructions anyway! Code sequentially in the first place -- less code -- faster code.

Quote:

Proceduraly programming sux. Procedures is the nicest way to do things "un"nicely. OOP takes that ugliness and covers it.
OOP is not a syntax - its a way of thinking. Encapsulating (hiding the shit :winkwink: ) is only one aspect of it.
Hate to inform you bro, but OOP is just procedural programming with lots of syntactical sugar added. Procedural programming is only ugly if you are using things like global variables and goto statements... And I never said that OOP wasn't "a way of thinking" -- it's just a dumb way of thinking.

HQ 09-18-2002 07:56 PM

Quote:

Originally posted by TheFLY
Why do I need so many parent objects -- when I can compress all the methods into one object with no parent? ...[cut]... Code sequentially in the first place -- less code -- faster code.
Steve Gibson?

XXXManager 09-18-2002 07:56 PM

Quote:

Originally posted by TheFLY
Hate to inform you bro, but OOP is just procedural programming with lots of syntactical sugar added. Procedural programming is only ugly if you are using things like global variables and goto statements... And I never said that OOP wasn't "a way of thinking" -- it's just a dumb way of thinking.
Bro - Computer programming is all about syntax.
Saying OOP is a "programming with lots of syntactical sugar" damn - what? of course - thats why its good!
If you don't like OOP - good for you. If like my father - he don't like computers - he believes he can write with pen and paper much better. he never had a paper crash on him. Explain to him that he can copy and paste things he already wrote, spellcheck etc...
OOP rocks and explaining it here will be futile and stupid - there are books about it - and the fact that so many people use it - and that the better software are written in OOP prooves enough to me. I can do in OOP a complex thing in a year - which will take me 3 in procedural programming (and even then I will try to mimic OOD) and still will be not-mantainable.
I would love to discuss this but lets open a new thread about OOP. Call it "OOP sux! .... not !/?" :thumbsup

Juge 09-19-2002 05:56 AM

Quote:

Originally posted by TheFLY
This is exatly the attitude that pisses me off!!! 500mpg is too fast for human reaction time... this ain't fucking TRON! Stop thinking like an OOP programmer -- your car did not inherit a "engine object"!!! Should all engines be the same? Noooo... Every engine is UNIQUE!!! OOP is Diversity's enemy... It's the enemy of Intelligence. The enemy of Creation!
Fly, you have quite a few good points against OOP. I think OOP works well for certain things, like the GUI of an OS or program. But, you are right... there are TONS and tons of programmers out there that don't have a fucking clue what is going on. There are tons of teachers out there teaching these fuck nuts because they dont have a clue, either. I've gotten questions wrong for describing how shit actually works, and not desribing it the way they think it magically works (the teachers think I miss the generalilty of the question - fuck you!). I never understood how someone can program something without having a fucking clue of how it works... it's amazing.

XXXManager 09-19-2002 08:16 AM

Quote:

Originally posted by Juge
Fly, you have quite a few good points against OOP. I think OOP works well for certain things, like the GUI of an OS or program. But, you are right... there are TONS and tons of programmers out there that don't have a fucking clue what is going on. There are tons of teachers out there teaching these fuck nuts because they dont have a clue, either....
Having some people who dont know, or dont like (because they dont know) OOP dont make the "points" against it right.
The points pointed are wrong, and there are other cons for OOP - not the ones suggested.
Indeed - some people dont know OOP and babble shit about it - some programmers dont know how it works (or how to think) and they are a pittiful excuse for programmers, BUT they dont make OOP less good - they just suck :winkwink:
As to your point - "OOP works well for certain things" - you are correct. OOP does'nt suit everything.
Having a script that goes through files and find the ones with the letter "a" in the filenames requires no OOP.

Script Dude 09-19-2002 11:30 AM

Interesting Thread

Quote:

Originally posted by TheFLY

OOP sux for the following obvious reasons.

1. More lines of code to do the same thing.

Good OOP results in less code for the same thing, but allows you to take on bigger tasks.

Quote:


2. Why force inheritance on problems?

Inheritance is very misused in OOP. Inheritance can result in very brittle programs. The primary benefit is enabling polymorphism in languages such as java and C++. Other OOP languages such as SmallTalk and Objective C can handle polymorphism without using inheritance.

(Polymorphism can be much better than the old style case statements. If your code has case statements, its probably not OO from a purist point of view.)

Quote:


3. OOP is all about "hiding" what's *really* going on -- they call it "encapsulation".

True. This hiding is absolutely required in any large program and just darn useful in small ones.

Good programming (Clear programming) is all about limiting unwanted interactions and putting things that are related close together in the program.

OOP is intended to do this. That doesn't mean that everyone uses it correctly.

Quote:


Now we have hoards of dumb programmers that don't even understand why they are using objects in the first place!

Oh, So very very true.

Quote:

4. Portability is a bullshit issue
Java <> OOP.

Quote:

5. If you merely want to save reduntant work -- that's called procedural programming -- it was invented long before OOP and essentially does the same thing -- in a more straightforward and flexible way.

Paradoxically, It takes a lot of effort to save redundant work.

There is no difference between an Object library and a procedural library for these purposes, except that OOP gives you more tools for program organization.

Juge 09-19-2002 11:48 AM

Quote:

Originally posted by XXXManager
Having some people who dont know, or dont like (because they dont know) OOP dont make the "points" against it right.
The points pointed are wrong, and there are other cons for OOP - not the ones suggested.
Indeed - some people dont know OOP and babble shit about it - some programmers dont know how it works (or how to think) and they are a pittiful excuse for programmers, BUT they dont make OOP less good - they just suck :winkwink:
As to your point - "OOP works well for certain things" - you are correct. OOP does'nt suit everything.
Having a script that goes through files and find the ones with the letter "a" in the filenames requires no OOP.

Yes, I agree with you. Because the majority of people who learn a language stink at it, does not make the language stink. I 100% agree that OOP enabled the windows GUI to become what it is today, and allow programs to easily ALL use the same file-open dialog box which makes it easy for the programmer, and easy for the user (since they don't have to 'learn' each new program - we have to realize the majority of computer users suck, and this is what windows is for).

HQ 09-19-2002 12:15 PM

I think OOP only becomes beneficial on large scale projects. This problem has to be defined more precisely before anyone can start calling the others wrong.

TheFLY 09-19-2002 12:41 PM

Quote:

Originally posted by Script Dude
Paradoxically, It takes a lot of effort to save redundant work.

Save($Effort) {
$Effort += $Time; # Work
Save($Effort);
}

:)

I loved your post Script Dude!!!

Jer 09-19-2002 12:58 PM

Years ago one of my perl scripts was getting to many requests, so I was in need of a quick temporary fix because it was getting the server DOWN.

I searched for weeks and I finally found the solution.
And it is what I call a permant temporary solution, ya know ?
I said years ago, but it still running sweet. I just love it.

No one posted this solution here yet.


Quote:

The more I read your posts the more respect I get for you dude
I agree with HQ.

Yeah, we need scripts just for saving time and making money. :thumbsup

Jer


All times are GMT -7. The time now is 12:50 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123