Seun's Posts
Nairaland Forum › Seun's Profile › Seun's Posts
1 2 3 4 5 6 7 8 ... 546 547 548 549 550 551 552 553 554 (of 1139 pages)
Ghana cannot "colonize" Oshodi alone, not to talk of the whole of Nigeria! ![]() |
Take your "demon-possessed" child to a good mental institution, and he will be "healed" in 2 weeks. Grr. |
So it's 3-1 now? |
Let me put it this way: Python is object oriented. It is also procedural. And functional. And module-oriented. The website emphasizes the OOP aspect to keep people like you interested, that's all. I think we can all agree that the misuse of OOP constructs is a bad thing. What we don't agree upon is what constitutes misuse and what constitutes acceptable use. To discuss this we have to discuss various specific problems and explore the ways of solving them with each approach. |
What is J2EE used for? ![]() |
moderator, i want to know why i found this thread in the recycle bin. |
Barca! (Making this thread sticky because both teams are really well known) |
@seunAs someone who uses Python everyday, I can assure you that you don't know what you're saying. Python is a multi-paradigm language. It supports OOP, procedural, functional, etc. Anyone you like. (Unlike Java which forces OOP on you by forcing you to declare classes in every single program.) Your post is quite insightful, even though I don't fully agree with you, but please leave Python alone. ![]() |
bgees:Big talk! |
Liverpool? League Leaders? How and when did this happen? Is this a train we need to jump on? ![]() |
Chelsea, the most boring team on the planet, is probably going to win yet again. Alas. |
The report is nothing new. We all know these things already. Why are we making it such a big deal? |
I don't support women doing tedious sports.Does she even know you exist, not to talk of seeking to be romanced by you? The fact that you are not attracted to muscle does not imply that women should not play sports. Every woman need not please you, you only need one. Some like them feminine (wimpy and weak) and some like them strong. |
What. Man U is losing? I don't believe it. They had just equalized when I left. |
These gunners; always breaking peoples' hearts. |
Someone I know was being beaten by her husband like a dog. She went to the police to complain and the police man said and I quoteWhy couldn't she look for a police woman? If you're waiting for wife-beaters to save you from other wife-beaters, you will wait forever. Women need to take charge of their own concerns and stop expecting men to 'save' them. Wise up, ladies. ![]() |
I honestly don't think anyone should question God's word "OKO NI OLORI AYA"Question: was that statement not written by a man? You're just proving the original poster right! |
Yeah, can we create a long-running thread for every single Nigerian player abroad and update each one regularly? |
This is a discussion forum. It's a place for people to "bitch" about things. ![]() |
OOP sure does help in ActionScript, with inheritance and creating classesThis reminds me of something i wanted to point out. GUI development is one of those areas where OOP seems to work really well. Another area is gama development, or any program that involves virtual simulations. I would absolutely use OOP if I was creating anything like that, because OOP is a natural fit for those problems. But it's a mistake to force OOP into every 'complicated' problem. The Linux kernel and GNU linux are not OOP. Apache is not OOP. PHP became successful without supporting OOP. Yahoo used PHP exclusively before it supported objects. Is Yahoo not a complex website? It's a myth that OOP is better for every complex problem. OOP is just one possible approach and it fits certain problems better than others: games, simulations, graphics. You can still do all this in a procedural language if you structure your app into modules and you have functions here and there but my point is that you can do it more easily in OOPYou think it's easier in OOP is probably because that's what you're used to. But it's not the only way, and it's not always the best or most user-friendly way. Let's use the right tool for every job. Very valid pointsThanks. But: those concepts originally came from procedural programming and OOP simply stole them. ![]() Tuples and list are just Lists in java but i have a problem with the fact that you can have mixed data type in them. It will be very hard to find bugs that are based on you putting a wrong type in a tuple. i.e ur app expects a String but you have somehow added a number into the tuplePython is strongly typed. If you try to perform numeric operations on a string, you'll get a TypeError. So that's not a problem. (but you have to run your program to catch the error). The advantage is that I can group any arbitrary objects together without defining a class or struct. Instead of being forced to define a User class, I can create a tuple (iduser, username, emailaddress). And I can take 50 such tuples and add them to a list, and send the list to a PromoteThemAll() function. Unlike a class, I can include only the fields needed by the PromoteThemAll() function. @Seun: good point but u can not extend the hello, standard library without the source code if need be or can u ?.Yes, you can. You can create new functions that depend on the functions in the standard library. That is equivalent to overriding a class method with a new method that calls the parent method. You can create new data structures that contain data structures in the standard library. This is equivalent to adding new variables in a child class. @Seun: Guess u still have a lot to learn about OOP in the real sense. Inheritance solves that problem neatly and it works fine for me sha.No, it does not. Unless your database supports inheritance, you have to rewrite the database queries, which is the same as what you'll need to do in a procedural program. Inheritance is a fancy name for "writing new functions that depend on provided functions". The amount of code you have to write is the same, the only difference is the way you write it. @Seun: I am hearing that for the first time in my life ?. What holds a Student's table in your programme logic ?The database holds my students table. My program logic retrieves rows based on SQL queries and stores them in tuples, which contain just the fields that are needed in the current function. "redundant and wrong" what authority are you quoting. HuhThe [url=http://en.wikipedia.org/wiki/Don%27t_repeat_yourself]don't repeat yourself[/url] principle (DRY) All you need to do is to write an app that builds your classes straight from your database.What happens to your classes when your database changes? That's why the DRY principle exists. read up "OBJECT ORIENTED DATABASE DESIGN".I have and it's mostly hype too. It's meant to appeal to people who are afraid of SQL. Don't be: SQL is just another programming language that you can master very easily. I think anything you can do with a procedural language you can do with an OOP language but the converse is not the case.There is no modern procedural language that doesn't support OOP, and there is no OOP language that doesn't support procedural programming. The point is to use the right tools for the right job. When you use OOP for appropriate problems like GUI work, simulations, and graphics, it helps a lot. When you use it inappropriately in text/html processing programs, data access libraries, etc, it just makes your program harder to read. Anything you put in a program that doesn't need to be there makes the program harder to read and maintain (except comments, of course). OOP makes sense because reality (as in things we see around us) is most easily modeled using this paradigmProgramming is not about modelling reality. It's about solving problems. Sometimes, the problem involves modeling virtual objects e.g. game characters and GUI widgets, and that is where OOP is really useful. But when you're executing complex mathematical calculations, doing complex text/html processing, or manipulating a complex corporate database, OOP can be more of an obstacle. What I'm proposing is a multi-paradigm approach: let us understand the best practices in OOP and procedural programming, and use the most appropriate mix for each project. Don't define classes or use inheritance unless that is the clearest way to solve the problem. In fact, there are many useful programming paradigms beyond OOP and Procedural. E.g. functional. Let's learn them all, and use them all, where appropriate. ![]() |
Nice! |
List elements can be used with great success in certain unconventional places: site menus, for example. But for basic layout, I'll have to recommend that the DIV element, because that's precisely what it's for. |
I see your point, but I learnt BASIC very early and that didn't stop me from learning C and C++ later. If you start with Python and you need something Python doesn't offer, you can just get Visual Studio (C#). |
Python is definitely the easiest programming language that's popular. |
What do you call the killings in Jos Kano and in the Niger Delta on a regular basis?What we're experiencing today is nothing compared to a war. They are incomparable. |
Yet another language? No thanks. I've not got around to learning Javascript and Actionscript yet. |
Python is a dynamic language and it offers features that are common to most dynamic languages.You make a good point. The flexibility of Python is probably one of the reasons I am hardly tempted to create classes and such. I can create ad-hoc tuples, lists and dictionaries to hold my data instead of defining classes. I can return multiple values from a function instead of having to create a new class to contain them. But this is still in line with my first comment on this topic: "I recommend procedural programming and python". But: OOP is all about defining classes , inheriting behaviour from other classes etc. If you have a lang that provides you a "Psuedo" way to acheiving this, then thats fine but to practice true OOP these concepts have to be strictly followed in some sense.This is what I'm unhappy about. Why do we assume OOP must be "strictly followed"? Is it a religion? If OOP isn't boosting your productivity in a particular project, why should it not be swept aside? Another typical advantage of object Oriented Programming is CODE REUSE ABILITY.Code reusability is good, but it predates OOP. Even a prehistoric language like C supports code reuse - hello, standard libraries! In Python you can organize procedural code into modules, and import them elsewhere. I can't remember re-writing the code that will login a user whenever i am writing a system that requires authentication in any project.Really? Even if the database schema changes completely? Even if columns are renamed and added? Nah. All I'm saying is that classes and objects are just another programming construct. Like variables. And operators. You don't see anyone talking about operator oriented programming do you? And classes are not needed in every situation: - A maths library doesn't have to contain a "sine" object, a "cosine" object, or even a "MathsWizard" object with a sin method. It can just contain the mathematical functions you need. - A user authentication library doesn't have to contain a User object. All it needs are three functions: "register", "login", and "verifycookie". OOP doesn't really fit database programming, because it's redundant (and wrong) to define the same business entities in two different places. - A program to print the numbers one to ten does not need a "NumberPrinter" class. Thanks. |
1 2 3 4 5 6 7 8 ... 546 547 548 549 550 551 552 553 554 (of 1139 pages)



But: those concepts originally came from procedural programming and OOP simply stole them.