Discovering PYTHON suggestions

  • Member

    Calling everyone with computer language knowledge!!!

    I recently have started learning the basics of python (I chose to learn python first for the ability to code/program within some of my 3D applications). From what I understand so far it is mostly used within database creation/math equations/game creation such as EVE online (stackless python)

    I’ve made a list of a couple good websites for references. I guess what I’m really asking is what are some interesting things I could do with python and which would be the next most practical/logical language to learn afterwards.

    I want to try and learn a language or two in this upcoming year so I’d like to get an idea of what type of project I could possibly start cooking up. Will appreciate whatever input, THANKS FAM!! :alien:

  • Python is really good at patching together a bunch of libraries to make a tool to do almost anything sort of half-assed but quickly. Like ridiculously useful for prototyping almost any large project. It is perfectly capable of being used to write large-scale maintainable things, and as long as you are not CPU bound, it will likely be a fast, relatively easy tool to do that with.

    The rule of thumb is that a Python program runs 4 weeks sooner than the same program written in C. But, if you run it a few billion times in quick succession, the C program will finish running many years before the Python one will.

    I always suggest that you learn multiple paradigms of coding, rather than specific languages. I code in about 50 languages, can pick up a new one in a week or two… But learning a totally different way to think about problem solving is very powerful. I’d be tempted to do the following in order of utility/mental exercise:

    • SQL: Learn to database like a pro. SQL is a 4GL, and requires you to think in much different ways than procedural code to do it well. Instead of worrying about the details of “First you open the table, and check every row to make sure that this number plus that number never comes to more than 27” you write grand sweeping rules. You just say "The sum of column a and column b is always less than or equal to 27. And the DBMS will make sure that your commandments are never violated. Every update, insert or delete against the affected tables will forever be checked against your wishes, and rejected outright if it violates your commands. That is powerful code. Use it wisely. No matter what project you build in the future, you are likely to want to talk to a database at some point as it grows. Might as well know how to talk the language. Don’t be the python programmer who’s mess I recently had to work on cleaning up, where he went “I’ll just download the whole table into my client, manipulate it with loops in python code I understand, and then write the results back to the DB.” This worked fine for years. Then he quit. Shortly after that the table grew beyond the memory capacity to store on the local client machine… (it is currently 6 terabytes and growing…) Turns out he was downloading the whole thing, looping over it for several hours and throwing away all but 10 rows of data, because he did not know how to query for the 10 rows he wanted and could have had instantly because it is indexed in the table.

    • Prolog: This is a totally different 4GL. It works in pure logic. It lets you make statements about what you know to be true, and then query the logic engine to draw conclusions about that information set. I learned the language during a 3rd year artificial intelligence course, and it has completely changed the way I approach some classes of complex problems. Here’s a good example of what can be done easily in Prolog, but would be incredibly difficult in most other languages:

    • Any modern pure-functional language. Scala, Haskell, J, etc. They’re painful for most people to use most of the time. But some problems just… fit the model perfectly. Also, you might turn out to be one of the people who happen to think in math in such a way that the language will just become an extension of your brain. I really think that most programmers have a language that fits their thought patterns such that they can just think in code when they problem solve. Only learning one language makes you one of those people who has to translate all of your thoughts into that language instead of writing it directly.

    Personally, if I am working on a program and I don’t need to worry about who else is supposed to deal with it, I’ll either pick the “obvious” language that just solves that problem elegantly, or has a library that does 90% of the work, or code it from scratch in either C or TCL based on my mood. I can code in either of those half-asleep, or blind drunk, and it’ll probably work.

  • Member

    Well I subscribed to codeacademy just to help me out with the basics of starting out. My mind is set on learning Python and from what I was advised Python/C/C++ would be the simplest for PCB programming as well.

    Since I have a lot of time on my hands in the next year or so I would like to pick a lot of the basics of several different languages so I may choose which I might want further develop when I have much better idea of overall the different syntax and workfow.

    I’ve noticed there is a lot of newer languages I’ve never heard about (keep in mind I’ve always gone to school for art and not computer sciences haha). I’ve never heard of Sass and Ruby. Something else that confuses me a little bit is in what instance would you rather code something in Javasript vs. something like jQuery for a website… keep in mind I don’t really have a clue what I’m doing yet, I’m just taking notes and working through most of the Python tutorials/resources I can’t find for now. I just want to understand the basics and probably some novice stuff as when then move to another language and repeat the process.

    I’m probably going to plow through some python and try to do some stuff within the Maya python editor or try and build a silly calculator for now and move on to the basics of C or C++.

    Thanks for the advice Pierre, I appreciate it even though everything is kind of a confusing collection of characters at the moment!

    If you know of any books that are really good, send the titles my way :point_up:

  • There is an Open Souce book called Think Python, How to Think Like a Computer Scientist. You can download it as an eBook at
    I downloaded it because the author wrote it to focus “on programming, not the programming language.”
    (Actually, the author wrote the book for Java, but being Open Source, a collegue translated it for Python so he had “the unusual experience of learing Python by reading my own book”).
    Having said all this, I haven’t had time to read it and learn Python from it. But, it looks good.

  • Member

    Awesome, thanks for the link frank, will add it to the list!

  • @derpko said:

    I’ve never heard of Sass and Ruby.

    Sass is a domain specific language for writing better CSS for web sites… I am unlikely to ever learn it because I am only ever paid to make things work, other people go in after I get done and make it pretty if it matters. I would not be able to make a website pretty no matter how long I spend, because I have no frame of reference.

    Ruby is a very nice object oriented language with a very damaged crazy cultist community… I would happily write code in Ruby, but asking questions about Ruby stuff always leads to conversations with people who sound like they belong on Art Bell’s call in show.

    Something else that confuses me a little bit is in what instance would you rather code something in Javasript vs. something like jQuery for a website…

    jQuery is not really a separate language, it is a library that runs on top of Javascript. It does no things that you can’t do in vanilla js, but makes some of the syntax for doing common things a bit easier. Typically I’ll use jquery if some other part of the project is already using it, but won’t pull it in to just add one feature.

    If you know of any books that are really good, send the titles my way :point_up:

    If you’re going to learn C, read K&R. Brian Kernighan is one of my all time favorite authors, fiction or nonfiction. I attribute a lot of the longevity and widespread adoption of the C language directly to having a very well written source document. Hundreds of different people have implemented their own C-compilers on many different architectures for many years and had them come out almost entirely compatible with each other based on the quality of that book. If there is one thing you take home from this thread, learn to write clearly and entertainingly. Your docs will outlive your code.

  • And feel free to ask questions. I’ve been programming in C for 30 years, and Python for a few. I’ve also been contributing to MicroPython fairly actively (runs python 3 on some microcontrollers).

    C is actually a fairly simple language that gives you enough rope to hang yourself. Acquainting yourself with the standard is worthwhile. Personally, I’d probably skip K&R and focus on ANSI C.

    You can get a copy of the latest draft of the C language specification here:
    This is typically identical to the latest release.

  • @dhylands Good point… I meant the book by Kernighan & Ritchie, not specifically the old testament version :)

    As it happens I own the ANSI version of the book (I had to look up the cover to confirm that, since mine is packed in a moving box right now.) Among the things that I find very interesting in it is that they were doing literate programming in 1988, Knuth wrote WEB in 1987, but I don’t think he published anything about literate programming for a few more years. The NROFF sources for the book contain all of the source code in the examples, and they automatically extract the examples from the text, compiled them and unit-tested them before sending it off for typesetting. The foreword of the book was the first thing I found fascinating in a book full of good things.

    @derpko if you want to write programs that are well built and durable, you might want to go read about literate and test-driven methods. Not language specific stuff, but why they matter, and how people implement these methods.

  • @pierre blind-drunk aye. I would like to see that in action…

  • @Jacob-S.

    In my youth, it used to be a fairly common thing for me… I’d go bar crawling with my friends, consume excessive amounts of caffeine during the course of the night (so as not to fall asleep on the skytrain on my way back to Surrey…) When I get home, I could not sleep, so I’d open up something I’d been working on, usually homework but sometimes other code project and start making changes. I revision control automatically, so there is no danger I’m going to break things… Sometimes it gets better, sometimes it gets worse… usually it gets better up to a point then gets dramatically worse. The next day, after a course of gatorade and cranberry juice and about 10 hours sleep, I’d cherry pick my “good ideas” out of the changelog.

    Sometimes a little recreational time helps jar you loose from your normal ways of thinking. Other times, not so much.

    I still sleep with a keyboard beside the bed… sometimes I half wake up from a dream, type something and then roll over and go back to sleep.

  • Member

    So I ordered myself the python book as well as the one you referred @pierre, I got myself a nice ipad for cheap - I just need a nice wireless keyboard for it and I think I will be set for starting my long journey!

Log in to reply