Question

Am I wrong if I think that Python is all I need to master, in order to solve most of the common programming tasks?

EDIT I'm not OK with learning new programming languages if they don't teach me new concepts of programming and problem solving; hence the idea behind mastering a modern, fast evolving, with a rich set of class libraries, widely used and documented, and of course has a "friendly" learning curve programming language.

I think that in the fast evolving tech industry, specialization is key to success.

Was it helpful?

Solution

You are right and wrong.

Right: Knowing a single tool very well is very marketable and to be desired. And Python is good for OO, for scripts, for functional-ish programming, and it has excellent mathematical and scientific libraries.

Wrong: Python doesn't teach you everything a good developer should know. Sometimes you will need JavaScript to provide some client-side functionality. Sometimes you need to understand what's happening at a more fundamental level, such as the C underneath the Python. And sometimes you need to learn to think in different ways, as you would with Haskell or Clojure.

OTHER TIPS

Yes

You would be wrong to think that any single language can do everything without considering other languages.

I think that in the fast evolving tech industry, specialization is key to success.

I can't think of a better way to shoot yourself in the foot. Learning and mastering a language is great, but you mention you aren't comfortable with learning new languages if they "don't teach me new concepts of programming and problem solving."

Languages don't teach you these concepts, thick dusty tomes and many years working closely with people better then yourself does. These basic patterns, concepts, and principals of design transcend languages and can be applied in many different scopes.

You may be able to solve many problems with it but it won't always be the best tool for the job.

I don't necessarily know that there's anything wrong with this, but I wouldn't advise it for the sake of your career. There are a couple of problems I can think of:

  1. Python is hot now, but will it be in say 5-10 years? I don't know about you, but I don't desire to become the future equivalent of a COBOL mainframe programmer.
  2. Python won't be fast enough for every task. You can do a lot with it, but there are tasks out there that Python by itself isn't fast enough for. In these cases, you'll either need to know C (if there's one specific piece of the code that's going to run slow) or a JVM language (if you need the whole thing to be fast or are concerned with security).

I'm not OK with learning new programming languages if they don't teach me new concepts of programming and problem solving

I personally didn't see many advantages to trying Greek food until I did. Once I did try it, I was regretful that I put it off for so long. Of course, foods aren't programming languages, but the analogy actually isn't that far off. Oftentimes, the only way to see the advantages of learning a new language is to try it out.

Paul Graham called it the "Blub paradox":

Programmers get very attached to their favorite languages, and I don't want to hurt anyone's feelings, so to explain this point I'm going to use a hypothetical language called Blub. Blub falls right in the middle of the abstractness continuum. It is not the most powerful language, but it is more powerful than Cobol or machine language.

And in fact, our hypothetical Blub programmer wouldn't use either of them. Of course he wouldn't program in machine language. That's what compilers are for. And as for Cobol, he doesn't know how anyone can get anything done with it. It doesn't even have x (Blub feature of your choice).

As long as our hypothetical Blub programmer is looking down the power continuum, he knows he's looking down. Languages less powerful than Blub are obviously less powerful, because they're missing some feature he's used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub.

When we switch to the point of view of a programmer using any of the languages higher up the power continuum, however, we find that he in turn looks down upon Blub. How can you get anything done in Blub? It doesn't even have y.

By induction, the only programmers in a position to see all the differences in power between the various languages are those who understand the most powerful one. (This is probably what Eric Raymond meant about Lisp making you a better programmer.) You can't trust the opinions of the others, because of the Blub paradox: they're satisfied with whatever language they happen to use, because it dictates the way they think about programs.

If you get the opportunity, I recommend reading the entire article.

And lastly, I can see your point in terms of wanting to specialize. But I don't think that's what you're trying to do. By definition, doing "almost any programming task" isn't what I would consider specialization. It sounds like you're using Python to generalize. If you're looking to specialize, I'd recommend going into a specific field of programming like Machine Learning or Data Warehousing or Integration. But a programming language by itself isn't much of a specialization.

Python (despite my misgivings about it) simply can't^H^H^H^H^Hshouldn't be used for everything, the same way my slip joint pliers aren't used as a screwdriver.

SQL? Stored procedures? Startup scripts? HTML (already mentioned) and XSLT? C library wrappers?

I don't think Python is going to be a very good fit for embedded microcontrollers which might have only 32K of flash and 4K of RAM, but need to handle 25,000 interrupts per second.

(p.s. I have nothing against Python, in fact I recently purchased Pycharm 1.0 from JetBrains. I just don't see it as general-purpose as C, for example. Can you write all of Python in itself?)

I think you are right formally, as Python, being a Turing-complete programming language, should allow you to solve almost any task computers can solve (especially with help of some libraries). And you probably could comfortably make a living staying entirely inside Python sphere.

However, I think you are wrong on a number of levels:

  1. You are getting attached to a tool. It's like a mechanic saying particular type of wrench is everything he needs. Languages are tools. A good programmer should use the best tool for the task (within limits of his environment, of course), whatever it is, and recognize there's no tool that can be best for all tasks.
  2. You are artificially limiting your horizons. Languages are tools, but they are tools with characters and ideas behind them. If you use only one of them for everything, you are denying yourself the possibility of a new look on things, new approach to solving problems, new ways of thinking.
  3. You seem to be confusing getting good in your profession with getting good at using any specific tool. Good programmer can use any tool, because he understands underlying principles that guide creation and usage of these tools and can identify how and why deploy each of them. I think it is a mistake to focus on becoming a good Python programmer instead of getting a good programmer (that may happen to write programs in Python when an occasion presents itself). Don't get me wrong - the former is OK, but the ultimate goal should be the latter. And the latter is incompatible with "Python is all I need".
  4. Emotional investment in the tool can lead to fanboyism, and fanboyism will lead to ignoring more effective solutions and instead wasting your effort on making Python do things it is not meant to do. Don't get me wrong - it's fun to hack things to make them do what they aren't meant to (like building a car out of an old bathtub and a leafblower or writing an OS kernel in Python), but if and when you become a person to make decisions on the projects that require real-world efficiency, you have to know both strength and weaknesses of your tools. And emotional investment makes you exaggerate strengths and ignore weaknesses.

I wouldn't say that you are wrong at all. Python is a multi-domain, general-purpose programming language.

It really depends on the industry you plan to enter. I would say that far more jobs are available in Java or .Net than Python (not that there's anything wrong with Python). More people using these two application languages means they have, pretty much hands down (at the risk of offending someone), the widest knowledgebase and most expansive frameworks available. In the business app world, framework support is a huge part of remaining competitive.

Python is an extremely flexible general-purpose programming language, it has been used to write nearly anything imaginable, except OS kernel (QUICK UPDATE: in fact it has: http://mail.python.org/pipermail/python-announce-list/2004-July/003220.html).

However, it's always good to learn new languages, especially one that is very different from the languages you already know about.

While you are right that you should master at least one language, learning another language is rarely if ever a waste of time. Even the most horrible programming language (I won't tell the name because this could end up in a bloody religious war :-)) has some features who made me think:"Hey, why can't Java/C/ do this?".

Besides, there isn't THE perfect language as of today. Though Python comes pretty close to it ^^.

By the time you've mastered Python, you will know if you can do everything in it.

The answer will come to you naturally.

This would be like a golfer saying he will only play with a 5 Iron. You can do it (or so I am told) but its not always the best choice. There are many things that python does well, but sometimes it is not the best tool for the job!

IMO, yes, you are wrong to think that you only need Python, although it is indeed a wonderful language:

1) C-C++ are the foundations of everything in the PC world. IMO if you don't know C-C++, you don't really know how to program for a PC. Consider C-C++ like calculus and statistics in college - a rite of passage.

2) Be a GENERALIST - get your finger into as many pies as you possibly can, and always be looking at what's new, without getting caught up in any particular fad or idealogy.

If you plan on making a living as a programmer, you must understand that you are probably going to be living life 'on the edge' most of the time - you don't know what's going to destroy your current job and you don't know where your next one will come from....

HTH

I want to see you writing in pure Python:

  1. Factory floor control, realtime safety, guaranteed 300ms reaction time
  2. Car alarm remote firmware, must fit in your palm.
  3. Database engine intended for >1000hits/s
  4. an operating system, any real (physical) hardware platform. Can be very simple.
  5. a BIOS for a PC,
  6. a competetive (=fast) Python compiler/interpreter
  7. Live video feed object recognition for 25 frames per second video feed.
  8. A modern, competetive game engine for dynamic FPS games
  9. a fun dynamic arcade webapp game
  10. an antivirus.

Finish half of these tasks in Python and I'll admit Python is the king.

Licensed under: CC-BY-SA with attribution
scroll top