#31 in Operating systems books
Use arrows to jump to the previous/next product

Reddit mentions of Python in a Nutshell, Second Edition (In a Nutshell)

Sentiment score: 4
Reddit mentions: 5

We found 5 Reddit mentions of Python in a Nutshell, Second Edition (In a Nutshell). Here are the top ones.

Python in a Nutshell, Second Edition (In a Nutshell)
Buying options
View on Amazon.com
or
Used Book in Good Condition
Specs:
Height9 Inches
Length6 Inches
Number of items1
Release dateJuly 2006
Weight2.14068856402 Pounds
Width1.6 Inches

idea-bulb Interested in what Redditors like? Check out our Shuffle feature

Shuffle: random products popular on Reddit

Found 5 comments on Python in a Nutshell, Second Edition (In a Nutshell):

u/chekt · 3 pointsr/learnprogramming

No matter where you start, make sure you get a reference book. If you start to branch out on your own, without the internet you're going to have a hard time figuring out how things work and how to do things that aren't spelled out in any beginner resources. If you're going to start with python, the in a nutshell books by OReilly are usually pretty good. If you going to start with C, The C Programming Language doubles as a reference and a tutorial, but if you want to do any game programming, you'll want to look into getting a book on SDL (simple, what I recommend), DirectX or OpenGL (these are both more powerful than SDL, but more complicated.). Make sure to download as many libraries and resources as possible before you deploy, even if you think you won't need them. You may want to get a book on Ubuntu if you're going to use linux so you can troubleshoot things.You can buy the books or download the pdfs, I recommend you download the pdfs to anything you don't buy, if you end up using it a lot you can buy the book when you get home.

If you want to follow a course, which I think you should, I recommend the stanford one. Downloading the lectures is a bit of a pain; you have to click on each youtube video, click on "show more", and download the MP4 file. It teaches the course in Java, which some people frown upon, but I part of the camp that believes that the programming language you start out with hardly matters, as you'll learning more soon enough, and what matters most that you just start programming. The stanford course is extremely good, and I recommend you download it and watch all of them, as they'll take you through the fundamentals. Make sure you download all the course materials as well. They use the acm graphics libraries, so download the jars and as much documentation as you can.

Things I recommend you download as well (after you set up linux):

  • VIM (type: "sudo apt-get install vim" into the terminal)
  • Emacs ("sudo apt-get install emacs23")

    Emacs and VIM are two text editors that people some people love. They're probably a bit advanced for a beginner, but they're fun to learn if you're brainfried from all the programming you'll be doing.

    To enter the vim tutorial, run the command "vimtutor" from the terminal.

    To enter the emacs tutorial, open emacs and do the command Ctrl-h t (hold down control and press h, then let go of control and press t)

  • Pygame ("sudo apt-get install python-pygame")
  • SDL ("sudo apt-get install libsdl1.2-dev")
  • C compiler ("sudo apt-get install build-essential")
  • Java compiler ("sudo apt-get install openjdk-7-jdk openjdk-7-doc")
  • Eclipse ("sudo apt-get install eclipse")
  • Gnome Media Player ("sudo apt-get install gnome-mplayer")

    Some people prefer VLC to Gnome-Mplayer, so you might as well get both.

  • VLC ("sudo apt-get install vlc")

    Tips for linux: Keep the CD which you installed it from, because if/when you mess up your linux side, you'll need a way to reinstall it. If you get stuck, you can type "man <whatever>", e.g. "man python" to get some info. The "man" command opens up the manual-page for whatever command, if it has one. Learn to use the command line, because it's extremely powerful.

    Good luck! I found programming to be extremely difficult when I started out, but it eventually becomes a lot of fun! Building something or figuring out an algorithm is incredibly rewarding. Don't give up, and have fun!
u/ewiethoff · 2 pointsr/learnprogramming

Congratulations for deciding to learn Python! A few thoughts:

  1. Don't worry for now. :-) Just tell yourself a tuple is a Python list without append, count, extend, etc. methods. Just tell yourself a lambda is a function without a name. You can fill in your understanding later.

  2. What Python book are you using? Maybe it's too simple for you. Finish that book, then head for one by Alex Martelli: Python in a Nutshell. Unfortunately, the Nutshell book is quite old by now. So borrow it from the library or get it used cheap. Martelli is a much deeper teacher than most out there.

  3. I think Python's mathier than most other popular languages out there, and it has sparked me to learn more math. I have a BS in engineering with 8 semesters of math plus all the extra math that's taught in the engineering courses, but not the type of courses which mention "tuple" or "lambda." So I read cheap math books for pleasure. I've been getting a lot out of An Introduction to Algebraic Structures. It doesn't happen to mention the words "tuple" or "lambda," but it does go into mappings, ordered pairs, operations, and other stuff which help my Python head explode happily.

    Edit to clarify 1): Just tell yourself a tuple is an immutable Python list without append, count, extend, etc. methods.
u/Mr_Bennigans · 2 pointsr/gamedev

> I think if I learn how to program with an aim to work as a software developer and make games on the side, is this viable after just turning 20?


There's nothing wrong with the age of 20. I started school at 20, graduated in four years, and found work as a software engineer right out school.


What you have to figure out is how to make the best of your time left in school: should you take a class or two on programming and graduate on time, or (more dramatically) change your field of study to computer science and spend a few more years in school? That's something only you can decide. If you want to finish your architecture program and graduate in a reasonable amount of time, I can assure you that your math and physics background will be enough to get you work as a software engineer, but only if you can actually program.


Part of working as a software engineer means being able to program in multiple languages. That's because it's not really about the language, it's about the logic. All languages follow certain patterns and while syntax or wording may change, they all share ways to implement the same logic.


It also means knowing what data structures to use for what scenarios. The phrase "There's no such thing as a free lunch" comes to mind. All data structures have advantages and weaknesses and no data structure is perfect for every occasion. Know the differences, know the performance impact, and be able to speak to them. This won't just help you write better code, it will help you land a job. Interviewers love to ask questions about data structures.


As a corollary to data structures, you also need to know your algorithms. You need to know the performance impact of different ways to search and sort, traverse graphs, and find the shortest path (particularly relevant for game programming).


You said you're learning Python and that's great. Python is a great way to learn how to program. It's dynamic, it's friendly, and it has a rich library. Learn Python inside and out, then pick another language and figure out how to do the same things. C++, Java, and C# are all pretty popular in the industry, pick one of those. Once you know how to program in a few languages, you focus less on minute implementation details specific to one language and more on high level abstraction shared across multiple languages. By that point, you'll no longer be speaking in code, you'll be speaking in plain English, and that's the goal.


I don't know many good free online resources for learning languages, I learned mostly out of textbooks and lecture slides (along with lots of practice). There are some links in the sidebar to some tutorials that are worth checking out. Beyond that, I can recommend some books you may want to read.


  • Algorithms in a Nutshell - one of the best quick references on algorithms you can read
  • C# 5.0 in a Nutshell - excellent language reference, aimed more at advanced programmers, though it's comprehensive in scope, covering everything from language syntax and structure of a program to more complex tasks like threading, multiprocessing, and networking
  • Learning XNA 4.0 - a great game programming book, teaches 2D and 3D game development using Microsoft's C# and XNA framework
  • Java in a Nutshell - another great language reference
  • Starting Out with Java - introductory programming text, has end-of-chapter problems for reinforcement, a little pricey so see if you can find a used older edition
  • Starting Out with C++ - another good introductory programming text from Tony Gaddis
  • Python in a Nutshell - I can't speak to this one as I haven't read it, but I have been extremely happy with O'Reilly's "... in a Nutshell" series so I suspect it's as good as the others
  • Learn Python the Hard Way - free online book about learning Python, begins with simple examples then teaches you how to break it so you know both sides of the story, wasn't as comprehensive as I'd hoped but it taught me the basics of Python
  • Programming Interviews Exposed - sort an all-in-one book covering lots of different topics and giving an insight into what to expect for that first interview

    EDIT: I added Programming Interviews Exposed because it's a good reference for data structures, algorithms, and interview questions
u/name_censored_ · 2 pointsr/Python

>Is there any books you would recommend as a reference not a guide? I have a few bookmarks that have really helped but i'd love a hard copy on hand.

I personally cut my teeth on a borrowed copy of Python Essential Reference - it's basically just a rehash of the standard library (though it's fantastic to have a hard copy, and it sounds like what you want). You can also try this book by Alex Martelli - I have never read it, but Alex Martelli is practically a god in the Python world (as someone who read GoF's Design Patterns, I loved his Python design patterns talk). Reddit also raves about Learn Python The Hard Way, though I have never read it because I erm... "disagree" with how Zed Shaw tends to approach things (to put it mildly), and I think it's a guide as opposed to a reference.

>Oh, and i've been having difficulty using the built in help function and such, is there a guide on how to use it effectively? I seem to struggle finding examples of the code too and how to use the functions and what i believe are called attributes ( the sub functions, e.g. datetime.datetime()),

I assume that the inbuild help you're talking about is the code documentation? This documentation is intentionally brief, so it's not particularly useful as anything but a reminder. You can create your own simply creating a string after you open a function or class;

def foo(etc):
""" This is the documentation for foo().

Triple quoted so that it can safely run over multiple lines"""

blah


As for the terminology; you are correct that they're called attributes. There are two sorts of attributes - methods (functions) and properties (values). It can get very messy/fun when you use the @property decorator or toy with __getattr__/__getattribute__/__setattr__, but let's not go there (let's just say that Python can be no-holds-barred).

>but i came from PHP where the PHP manual is amazing for a novice/new coder.

Python's online docs are absolutely fantastic. They are a comprehensive reference of not only the builtins and standard library, but also the object model, features, a rather good tutorial, the C API reference, and even heavy stuff like metaprogramming. The only things it's really missing is the really hardcore stuff like __code__ and __mro__, and to be honest, that's probably a good thing.

>And what is the difference between import datetime and from datetime inport datetime. Does it just allow me to call the attribute as datetime() and not datetime.datetime()?

That's exactly correct.

Just to add another complication, you can also from datetime import datetime as tell_me_the_time_please, and then instead of datetime() you can use tell_me_the_time_please(). The reason this is useful is that sometimes things in modules are named too generically (maybe it's main() or something), so you can import part of the module as a different name.