C Board  

Go Back   C Board > Community Boards > Tech Board

Reply
 
LinkBack Thread Tools Display Modes
Old 10-23-2009, 10:00 AM   #1
Epy
I like turtles
 
Join Date: Sep 2009
Location: Ohio
Posts: 179
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.
__________________
Jake, that CAD guy
Hazudra Fodder
Epy is offline   Reply With Quote
Old 10-23-2009, 10:08 AM   #2
&TH of undefined behavior
 
Fordy's Avatar
 
Join Date: Aug 2001
Posts: 5,183
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.
__________________
"If A is success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut."
Albert Einstein (1879 - 1955)


Board Rules
Fordy is offline   Reply With Quote
Old 10-23-2009, 12:18 PM   #3
Senior software engineer
 
brewbuck's Avatar
 
Join Date: Mar 2007
Location: Portland, OR
Posts: 5,381
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.
__________________
"Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot

Last edited by brewbuck; 10-23-2009 at 12:20 PM.
brewbuck is offline   Reply With Quote
Old 10-26-2009, 04:26 AM   #4
Registered User
 
Join Date: Aug 2006
Posts: 76
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'!
rdrast is offline   Reply With Quote
Old 10-26-2009, 10:59 AM   #5
Senior software engineer
 
brewbuck's Avatar
 
Join Date: Mar 2007
Location: Portland, OR
Posts: 5,381
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.
__________________
"Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot
brewbuck is offline   Reply With Quote
Old 10-27-2009, 06:45 AM   #6
Epy
I like turtles
 
Join Date: Sep 2009
Location: Ohio
Posts: 179
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?
__________________
Jake, that CAD guy
Hazudra Fodder
Epy is offline   Reply With Quote
Old 10-27-2009, 07:54 AM   #7
(?<!re)tired
 
Mario F.'s Avatar
 
Join Date: May 2006
Location: Portugal
Posts: 5,220
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.
__________________
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.


Mario F. is offline   Reply With Quote
Old 10-27-2009, 09:18 AM   #8
C++ Witch
 
laserlight's Avatar
 
Join Date: Oct 2003
Location: Singapore
Posts: 10,352
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
Build + Version Control System: SCons + Bazaar

Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
laserlight is offline   Reply With Quote
Old 10-27-2009, 11:46 AM   #9
Hail to the king, baby.
 
Akkernight's Avatar
 
Join Date: Oct 2008
Location: Faroe Islands
Posts: 713
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.
__________________
I deny the Holy Spirit; burn me.

http://blasphemychallenge.com/ <- Do you dare?
Akkernight is offline   Reply With Quote
Old 10-29-2009, 08:01 AM   #10
Epy
I like turtles
 
Join Date: Sep 2009
Location: Ohio
Posts: 179
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.
__________________
Jake, that CAD guy
Hazudra Fodder
Epy is offline   Reply With Quote
Old 10-29-2009, 09:47 AM   #11
Registered User
 
Join Date: Jul 2009
Posts: 32
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.
crowe is offline   Reply With Quote
Old 10-29-2009, 10:39 AM   #12
Epy
I like turtles
 
Join Date: Sep 2009
Location: Ohio
Posts: 179
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?
__________________
Jake, that CAD guy
Hazudra Fodder
Epy is offline   Reply With Quote
Old 10-29-2009, 10:45 AM   #13
&TH of undefined behavior
 
Fordy's Avatar
 
Join Date: Aug 2001
Posts: 5,183
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
__________________
"If A is success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut."
Albert Einstein (1879 - 1955)


Board Rules
Fordy is offline   Reply With Quote
Old 10-29-2009, 11:00 AM   #14
Registered User
 
Join Date: Jul 2009
Posts: 32
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.
crowe is offline   Reply With Quote
Old 10-29-2009, 11:17 AM   #15
Senior software engineer
 
brewbuck's Avatar
 
Join Date: Mar 2007
Location: Portland, OR
Posts: 5,381
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.
__________________
"Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot
brewbuck is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
python c api ralu. C Programming 0 03-01-2009 01:19 PM
C and Python alexnb185 Tech Board 5 04-11-2008 11:11 PM
Python Embedding Help... Rendered C Programming 2 11-17-2007 10:08 AM
Python mart_man00 Tech Board 7 10-06-2003 07:24 AM
Python Xterria A Brief History of Cprogramming.com 10 05-05-2002 04:08 PM


All times are GMT -6. The time now is 10:57 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

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