Anyone else feel a certain disgust towards Python?

This is a discussion on Anyone else feel a certain disgust towards Python? within the Tech Board forums, part of the Community Boards category; I've read about Python, seen code examples and last night, attended an open source club meeting at OSU about Python. ...

  1. #1
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    951

    Anyone else feel a certain disgust towards Python?

    I've read about Python, seen code examples and last night, attended an open source club meeting at OSU about Python. While Python is extremely robust, easy, has way too many libraries to do everything imaginable, whatever, etc. it just seems like it makes things too easy, like it takes the fun out of programming. One of the presented pieces of code was a Pidgin chat bot that was like 40 lines of code...I mean, that's pretty cool, but dang, where is the fun in that (at least for a hobbyist programmer)?

    I think it's just way too easy for someone to get comfortable in Python. (Happened to me with Lisp, luckily I had taken a C class before looking at Lisp at all). Slippery slope, they started teaching Java as a beginner's language, soon it'll be Python and then students will be drooling retardedly when they see C/C++ for the first time.

    Just my two cents.

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    I can code in a multitude of languages (including C#, C++, Java, IA32 Assembler) and most of the stuff I do now is in python. Not because I have dumbed down, but because the stuff I'm doing calls for a language that can do what python does in an easy manner with the least amount of fuss.

    Most of what I do involves taking data from various types of databases across both Windows and Linux and moving them securely to different servers, manipulating the data and making it accessible to people via web portals. Could I do this in C++? Damn right I could! Will I? Hell no.

  3. #3
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,238
    I think it's weird that you see the expressiveness of Python as a bad thing, but whatever.

    Python is probably the world's best computer language for teaching students. It reads like pseudocode, with the advantage of actually being real, executable code. It provides a nice mix of imperative and functional constructs and lets you mix them in whatever proportion you are comfortable with.

    The only thing really missing from Python is static type inference and more robust compile-time checks (yes, Python is interpretted, but its compiled to intermediate code first).

    Disgust? No, I love Python. When I'm having trouble expressing the solution to a problem in C++, I often turn to Python, get the problem worked out, then translate back to C++. The result is usually better than what I'd end up with by hammering it out in C++ from the start.

    EDIT: If you see the low volume of code as a drawback for a "hobbyist programmer," try thinking of it another way. If you are just trying to satiate your need to write lines of code, Python lets you create more stuff in a given period of time. You can still write however much code you want, it's just that this volume of code translates to more programs.
    Last edited by brewbuck; 10-23-2009 at 12:20 PM.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  4. #4
    Registered User
    Join Date
    Aug 2006
    Posts
    99
    If a certain tool can do the job, use the tool.
    If a different tool, can do the same job, but quicker and easier... uhhh... switch.

    Python isn't 100% perfect, but what is? It can be used to accomplish very small, to very large jobs, quickly and easily... You find that somehow wrong?

    I suppose perhaps you should abandon all high(er) level languages, and start programming directly in machine code... not assembler, actual machine code! That should at least be 'Fun'!

  5. #5
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,238
    Quote Originally Posted by rdrast View Post
    Python isn't 100% perfect, but what is? It can be used to accomplish very small, to very large jobs, quickly and easily... You find that somehow wrong?
    Well, I can sort of understand how you might get bored if everything is so easy to do. If your goal is to get your hands dirty with borings mechanicals then Python probably isn't the right choice.

    I lost interest in the nitty-gritties a long time ago, and any time I feel like I'm programming close to the metal I make a deliberate effort to genericize the code so I don't have to do that particular task again. I like doing stuff, not pushing bytes around.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  6. #6
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    951
    Quote Originally Posted by rdrast View Post
    I suppose perhaps you should abandon all high(er) level languages, and start programming directly in machine code... not assembler, actual machine code! That should at least be 'Fun'!
    What a ridiculous statement.

    My point is that I'm very familiar with the concept of getting too comfortable with a higher-level language (when I say higher, I mean like a scripting type language). You think about how you would program something, but you think of it in terms of that language. So what happens when you need to program in C for an embedded application or you have to program in C++ to use a certain API?

  7. #7
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,412
    Quote Originally Posted by Epy View Post
    So what happens when you need to program in C for an embedded application or you have to program in C++ to use a certain API?
    What happens? You do it. That's what a programmer does. That's what many programmers out there in the world do. That is called programming. If you can't do it because Python is dumbing you down, that is your limitation. Don't blame the language for your shortcomings.

    On the other hand, if this is currently being a problem to you, then it clearly shows you are not ready yet. Your C or C++ knowledge hasn't matured enough for you to start dabbling in other programming languages. Better consolidate your C or C++ first.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #8
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,461
    Quote Originally Posted by Epy
    What a ridiculous statement.

    My point is that I'm very familiar with the concept of getting too comfortable with a higher-level language (when I say higher, I mean like a scripting type language). You think about how you would program something, but you think of it in terms of that language. So what happens when you need to program in C for an embedded application or you have to program in C++ to use a certain API?
    What a ridiculous statement

    If this is a problem with a language like Python vis-a-vis C and C++, then this is a problem with C and C++ vis-a-vis assembly language (and machine language, but that was obviously just an exaggeration).

    The point that I would highlight from brewbuck's first post is that Python reads like pseudocode (in fact my pseudocode is pseudo-Python), thus it is arguably an effective tool for training new programmers to think about algorithms and problem solving instead of blindly groping for a solution. This kind of learning can carry over to other programming languages, including C and C++.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  9. #9
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    I've seen Python, didn't like it. I've used Actionscript 3, didn't like it. This is mostly 'cause when I deal with it, I want to depth of C++ in it, I just like the control or something :P still, you wouldn't use C++ to make a flash like game, as in a game for browsers, and you wouldn't use C++ for stuff Python does better and easier, that's just logical thinking. Then you can think more about it and actually don't get involved with projects that would be best made in something as simple as Python, but make a project that's best made in C++ or C or whatever you like. It's like talking about a Land Rover and a Ferrari, only an idiot would challenge the Land Rover to a dirt race.
    Currently research OpenGL

  10. #10
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    951
    Quote Originally Posted by Mario F. View Post
    What happens? You do it. That's what a programmer does. That's what many programmers out there in the world do. That is called programming. If you can't do it because Python is dumbing you down, that is your limitation. Don't blame the language for your shortcomings.

    On the other hand, if this is currently being a problem to you, then it clearly shows you are not ready yet. Your C or C++ knowledge hasn't matured enough for you to start dabbling in other programming languages. Better consolidate your C or C++ first.
    I don't use Python. I used BASIC when I was first starting out, now I use Lisp for AutoCAD stuff and C for my hobby projects. I've been forced by OSU to learn MATLAB. Lisp is the higher-level language I was too comfortable in.

    I'd be more apt to learn assembly than Python, simply because it takes more understanding in order for a person to learn assembly than to learn Python. Not really apples to oranges, I know. This is my entire point though...yes, it's fine as a teaching tool, but when it's so incredibly easy and there are so many libraries to do everything you need, it's just so clear to me that anyone introduced to programming is going to see Python, then see everything else and choose Python. When you do something with a lower-level language, it forces you to understand more of what's going on, rather than just using some high-level function in a library that does everything in one fell swoop. It's like using that piece of crap MATLAB.

    Say I want to see f(x) = x^x in the domain [0, 1]. In MATLAB, it'd simply be fplot('x^x',[0 1]). Yay, you got your graph, and that's all fine and dandy. To do the same in C, you'd have to set up a for loop to plot all the points, get something like libSDL to create a window and actually show the points, make sure you display the part of the graph where the line is present, etc. It'd be overkill, yes, but you'd learn a lot in the process. This is how it is at school, you memorize how to do something for one class and then totally forget it, which is what I think is likely to happen with students that see how easy and complete Python is. They don't give a damn about what's actually going on behind the curtain.

    It just seems to me that Python takes too much thinking and knowledge out of the equation.

  11. #11
    Registered User
    Join Date
    Jul 2009
    Posts
    51
    Quote Originally Posted by Epy View Post
    It just seems to me that Python takes too much thinking and knowledge out of the equation.
    It seems to me that you're placing blame on the poor innocent high-level languages that are just over there minding their own business and increasing productivity.

    Each language is good for something, which is why there are so many of them. You can't fault a programming language for the bad teaching and lack of motivation that some students seem to have.

    In fact, one could argue that much more could be learned about programming and software engineering in general when using a high-level language that lets you do things quickly. You spend less time fretting over code that is already done and more time actually designing a good program.

  12. #12
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    951
    Well, I can see that no one is going to agree with me here. I'll pose this question though: would you be more apt to hire someone to do some game programming or make a performance application whose main language of choice and knowledge is python?

  13. #13
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Quote Originally Posted by Epy View Post
    Well, I can see that no one is going to agree with me here. I'll pose this question though: would you be more apt to hire someone to do some game programming or make a performance application whose main language of choice and knowledge is python?
    Depends on the job, if it was to program gaming scripts and we were using python for that then why not?

    http://developers.slashdot.org/artic...5/09/17/182207

  14. #14
    Registered User
    Join Date
    Jul 2009
    Posts
    51
    Quote Originally Posted by Epy View Post
    Well, I can see that no one is going to agree with me here. I'll pose this question though: would you be more apt to hire someone to do some game programming or make a performance application whose main language of choice and knowledge is python?
    As Fordy says, it depends. I can see what you're trying to ask, though and see your point there.

    Unfortunately your point moot, as there are just as many/more jobs where you would prefer somebody with knowledge of python over knowledge of asm.

  15. #15
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,238
    Quote Originally Posted by Epy View Post
    Well, I can see that no one is going to agree with me here. I'll pose this question though: would you be more apt to hire someone to do some game programming or make a performance application whose main language of choice and knowledge is python?
    I would hire somebody who has a demonstrable history of creating kick-ass products regardless of what their language of choice is.

    If I was hiring somebody to do C++ programming, obviously, I'd hire somebody who is a good C++ programmer. But their preferences toward other languages aren't really relevant.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. python c api
    By ralu. in forum C Programming
    Replies: 0
    Last Post: 03-01-2009, 12:19 PM
  2. C and Python
    By alexnb185 in forum Tech Board
    Replies: 5
    Last Post: 04-11-2008, 11:11 PM
  3. Python Embedding Help...
    By Rendered in forum C Programming
    Replies: 2
    Last Post: 11-17-2007, 09:08 AM
  4. Python
    By mart_man00 in forum Tech Board
    Replies: 7
    Last Post: 10-06-2003, 07:24 AM
  5. Python
    By Xterria in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 05-05-2002, 04:08 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21