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...
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.
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...
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.
$a000. rings a bell anyone 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 )
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
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?
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
Originally posted by XXXManager $a000. rings a bell anyone 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.
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 )
(...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.
Getting a car to run 500Mph dont require some extra-weight removel - it requires a Jet engine
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!
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?
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
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.
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.
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 ) 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
"Getting a car to run 500Mph dont require some extra-weight removel - it requires a Jet engine"
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.
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.
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
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.
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 ) 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.
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.
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 !/?"
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.
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
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.
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.
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.)
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.
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.
4. Portability is a bullshit issue
Java <> OOP.
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.
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
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).
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.
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.
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.
Actually, I am unable to try it yet, as I am migrating all my stuff to a new server so I cannot change anything on one server or the other. I just want to know what you mean by 'compile'. What does it do? How does it make your scripts go faster? Where can I get more info on it other than a directory listing of the file. Enough questions!?!
Just search Google for "perlcc" and you'll find all the info you need. This scripts makes a executable file, so it's like a compiled script. It runs without opening RAM queries (I forgot the right term) all the time. You'll the difference in RAM usage by your script.
With the normal perl script (script code, text file) it was fucking my flat text databases all the time (lots of IDs almost everyday). Now it runs with more traffic and database crashes like every just 15 days with just 1 ID. So it really made difference for me.
Comment