Page 1 of 2 12 LastLast
Results 1 to 20 of 24
  1. #1

    Default PSA: Never Code in Python Programming Language

    As the thread title suggests, I am here to urge anyone who will ever write even a single computer program ever in their lives to avoid using Python at all costs.

    Why might someone use Python? Because it seems sooo much easier than C++ when you start out. No semi-colons or squiggly braces or >> signs. It sucks you in with promises of rainbows and happiness....

    Then you write a code that has to produce a lot of output - which causes you to deteriorate into a weeping infant, assuming the fetal position and cursing whomever decided that a 10% reduction in the time required to write a program was worth the trade-off of running 100 times more slowly.

    So, do yourself a favor, and never, ever, EVER code ANYTHING in Python. It will only end in heartbreak.
    Quote Originally Posted by grodon9999 View Post
    a ‘tank’ build that can’t hurt anything is about as useful as a blow-up doll with no holes.
    Quote Originally Posted by WirelessJoe View Post
    Play the character the way you like and don't worry about what the math gamers say; you won't be in the top cell of the DPS spreadsheet, but you probably don't play DDO in Excel.

  2. #2
    Community Member Ystradmynach's Avatar
    Join Date
    Sep 2009
    Posts
    563

    Default

    Huh, that makes me feel less guilty about never learning Python. It still has to better than coding anything in Scheme though.
    Quote Originally Posted by Eladrin View Post
    One day you'll want to punch a smarmy Planetar in the face. It'll be nice to have then. "Look at me! I'm so shiny!"

  3. #3
    Founder PurdueDave's Avatar
    Join Date
    Feb 2006
    Location
    York, Pennsylvania, USA
    Posts
    2,854

    Default

    lol

    Duly noted.

  4. #4

    Default

    I dunno. I only know Python and C++.

    I actually learned a bit of Python (mostly the visual module) before learning C++, and Python just seemed so much easier to work with (it's not really, just ever so slightly faster to write programs; and certain mathematical quantities are easier to express - e.g., it actually has a good value for pi, whereas my C++ professor had us do 4*atan(1) ).

    There are some minor-moderate advantages to Python, but when I have to output 100,000 values at a time, I end up staying awake until 1 AM hating myself.
    Quote Originally Posted by grodon9999 View Post
    a ‘tank’ build that can’t hurt anything is about as useful as a blow-up doll with no holes.
    Quote Originally Posted by WirelessJoe View Post
    Play the character the way you like and don't worry about what the math gamers say; you won't be in the top cell of the DPS spreadsheet, but you probably don't play DDO in Excel.

  5. #5
    Community Member
    Join Date
    Oct 2009
    Posts
    1,299

    Default

    Nah. python is fine. for simple things.

    ie. one step above just a plain script.

    If you can't whip it out in python completely in about 2 hours. Don't use python for it.

  6. #6

    Default

    Quote Originally Posted by fuzzy1guy View Post
    Nah. python is fine. for simple things.

    ie. one step above just a plain script.

    If you can't whip it out in python completely in about 2 hours. Don't use python for it.
    Don't listen to this guy! That's just what they want you to think! Then you get addicted to your semi-colon-less lifestyle, and then the downward spiral begins! :O

    In all seriousness though: for simple tasks, Python. For lot's of output, avoid Python at all costs. If you swear you hear your laptop mocking you, that's (probably) just sleep deprivation because you didn't follow the aforementioned guidelines and you're still awake waiting for your program to finish running.
    Quote Originally Posted by grodon9999 View Post
    a ‘tank’ build that can’t hurt anything is about as useful as a blow-up doll with no holes.
    Quote Originally Posted by WirelessJoe View Post
    Play the character the way you like and don't worry about what the math gamers say; you won't be in the top cell of the DPS spreadsheet, but you probably don't play DDO in Excel.

  7. #7
    Community Member protokon's Avatar
    Join Date
    Aug 2007
    Location
    Sandy, UT
    Posts
    2,486

    Default

    Java ftw. as much as I hate to admit it
    Proud member of Renowned, Thelanis server.

  8. #8
    Community Member sacredguyver's Avatar
    Join Date
    Oct 2009
    Posts
    706

    Default



    This

  9. #9
    The Hatchery bigolbear's Avatar
    Join Date
    Dec 2009
    Posts
    1,804

    Default

    one simple little word my good fellow.

    LISP.

    recursion: its hell within hell within hell within hell within hell within hell.....
    Ex Euro player from devourer: Charaters on orien(Officer of Under Estimated & Nightfox): Wrothgar, Cobolt, Shadeweaver, TheMetal, Metaphysical, Allfred, Razortusk and many more.
    stuff by me: http://forums.ddo.com/showthread.php...02#post4938302

  10. #10
    Community Member caberonia's Avatar
    Join Date
    Mar 2011
    Posts
    300

    Default

    TBH.. i tried to learn python for civ IV modding.. and found it more difficult than C++ personally. IMHO your better off learning a C based language than even messing with python.

  11. #11
    Community Member Cardtrick's Avatar
    Join Date
    Sep 2009
    Location
    Cannith
    Posts
    2,025

    Default

    I think you're doing it wrong.

    Python's fast enough for virtually anything except truly high-performance software (real-time stock trading, some scientific computing, cutting-edge 3D games, etc.). If you're running into problems with its speed, there's very likely a faster way to do whatever you're trying to do. That may mean a better algorithm (maybe you're doing it in n^2 but there's a way to do it in nlogn, etc.) or it may mean a better technique (caching, concatenating strings before outputting, having I/O in a separate thread, etc.).

    And if worse comes to worst, profile your application to find out what's taking up the biggest chunk of time (likely a nested loop somewhere with significant calculation or I/O in the inner loop) and rewrite just the inner loop in C. Python has great C-interop.
    Quote Originally Posted by Wizard_Zero View Post
    One day I just wrote "Why Do I Die So Much?" in party chat, and that is how I learned about fortification.

  12. #12

    Default

    Quote Originally Posted by Cardtrick View Post
    some scientific computing
    1. Attempt to model chaotic system in Python.
    2. Weep openly.



    But thanks for the other advice. I'm still a newb to programming, so I'm likely not writing my programs as efficiently as I could/should.
    Quote Originally Posted by grodon9999 View Post
    a ‘tank’ build that can’t hurt anything is about as useful as a blow-up doll with no holes.
    Quote Originally Posted by WirelessJoe View Post
    Play the character the way you like and don't worry about what the math gamers say; you won't be in the top cell of the DPS spreadsheet, but you probably don't play DDO in Excel.

  13. #13
    Community Member
    Join Date
    Sep 2009
    Posts
    69

    Default

    Quote Originally Posted by Cardtrick View Post
    I think you're doing it wrong.

    Python's fast enough for virtually anything except truly high-performance software (real-time stock trading, some scientific computing, cutting-edge 3D games, etc.). If you're running into problems with its speed, there's very likely a faster way to do whatever you're trying to do. That may mean a better algorithm (maybe you're doing it in n^2 but there's a way to do it in nlogn, etc.) or it may mean a better technique (caching, concatenating strings before outputting, having I/O in a separate thread, etc.).

    And if worse comes to worst, profile your application to find out what's taking up the biggest chunk of time (likely a nested loop somewhere with significant calculation or I/O in the inner loop) and rewrite just the inner loop in C. Python has great C-interop.
    Just wanted to say, that there are games and applications written with python that work extremely well - ever heard of EVE online for example - it uses python. Many linux applications (like Amarok) use python. I think the python vs c speed comparison is not important/relevant to anybody else than the ones who write the applications and actually test those millisecond/second differences. For every computer user - if they see that application is slow - they get more powerful computer and thats it.

  14. #14
    Community Member protokon's Avatar
    Join Date
    Aug 2007
    Location
    Sandy, UT
    Posts
    2,486

    Default

    Quote Originally Posted by bigolbear View Post
    one simple little word my good fellow.

    LISP.

    recursion: its hell within hell within hell within hell within hell within hell.....
    LISP = lost in stupid parenthesis
    Proud member of Renowned, Thelanis server.

  15. #15
    The Hatchery sirgog's Avatar
    Join Date
    Apr 2007
    Posts
    17,195

    Default

    HISSSSSSSSSSSSSS....

    Oh wait, not that Python?
    I don't have a zerging problem.

    I'm zerging. That's YOUR problem.

  16. #16
    Community Member
    Join Date
    Oct 2009
    Posts
    1,299

    Default

    Real programmers do it all in asm!

  17. #17
    Community Member Truga's Avatar
    Join Date
    Jul 2009
    Posts
    1,675

    Default

    Quote Originally Posted by fuzzy1guy View Post
    Nah. python is fine. for simple things.
    I beg to differ:
    http://www.google.com/
    http://www.eveonline.com/
    Two very complex things, that both would not exist without python.

    I do most of my work in python. It works fine for everything (except threaded heavy computing). Anyone telling you anything else is lying.

    Edit: Also civilization 4.
    Last edited by Truga; 06-02-2011 at 08:42 AM.

  18. #18
    Community Member Yaga_Nub's Avatar
    Join Date
    Mar 2006
    Location
    Mabar
    Posts
    6,671

    Default

    Python is so 2000ish. All the cool kids program in YAGA now.
    Characters - Brion, Damerchant, Deathbot, Goode-, Minusten, Sepiriz, Spiritstrike, Stee, Steilh, Vorpaal, Wyllye, Yaga, Yagalicious, Yga. RIP - Catpizzle and Qazpe
    Beware My Gifts!!!

  19. #19
    Community Member Ravoc-DDO's Avatar
    Join Date
    Nov 2009
    Posts
    905

    Default

    EVE online is written in Stackless Python.

  20. #20
    The Hatchery Nospheratus's Avatar
    Join Date
    Jul 2010
    Location
    Limbo
    Posts
    1,123

    Default

    Quote Originally Posted by Truga View Post
    I beg to differ:
    http://www.google.com/
    http://www.eveonline.com/
    Two very complex things, that both would not exist without python.
    Yes they would...
    R.I.P. Devourer - 20-Aug-2010 11:00 GMT(+1 DST)
    (World Broadcast): World broadcast: 'Farewell to all our loyal players and thank you for your time in Eberron. We wish you all the best for your future adventures. Please log out now as the servers are now going down. Many thanks, Codemasters Online.'

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

This form's session has expired. You need to reload the page.

Reload