background preloader

Programming

Facebook Twitter

Mathematics

Unicode. Documentation. Soap. Versioncontrol. Iso. Ars Technica: Title - Page 6 - (6/2002) Part I: Basic Computing Concepts by Jon "Hannibal" Stokes The programming model and the ISA Back in the bad old days, programmers had to enter programs directly in machine language (after having walked five miles in the snow uphill both ways). In the very early stages of computing, this was done by flipping switches.

Once memory sizes and processing power increased to the point where programmer time and effort was valuable enough relative to computing time and memory space, computer scientists devised ways of allowing the computer use a portion of its power and memory to take on some of the burden of making its cryptic input and output a little more human-friendly. In order to write assembly language programs for a machine, you have to have am understanding of the machine's available resources, i.e. how many registers it has, what instructions it supports, etc. By now, most of the parts of the diagram above should be familiar to you.

Fetch the instruction at #501. Reinteract | Google Groupes. 3.1 A Quick Start with the Publisher Handler. Python: Myths about Indentation. There are quite some prejudices and myths about Python's indentation rules among people who don't really know Python. I'll try to address a few of these concerns on this page. "Whitespace is significant in Python source code. " No, not in general. Only the indentation level of your statements is significant (i.e. the whitespace at the very left of your statements). Everywhere else, whitespace is not significant and can be used as you like, just like in any other language. Also, the exact amount of indentation doesn't matter at all, but only the relative indentation of nested blocks (relative to each other). Furthermore, the indentation level is ignored when you use explicit or implicit continuation lines. Of course, most of the time you will want to write the blocks in separate lines (like the first version above), but sometimes you have a bunch of similar "if" statements which can be conveniently written on one line each.

Have you ever seen code like this in C or C++? Unifying types and classes in Python 2.2. Python Version: 2.2.3 Guido van Rossum This paper is an incomplete draft. I am soliciting feedback. If you find any problems, please write me at guido@python.org. Table of Contents Change Log Changes since the original Python 2.2 version of this tutorial: Don't scare people by suggesting classmethod may go away. (4-Apr-2002) Introduction Python 2.2 introduces the first phase of "type/class unification".

This is one of the biggest changes to Python ever, and yet it can be done with very few backwards incompatibilities. A bit of terminology: "classic Python" refers to Python 2.1 (and its patch releases such as 2.1.1) or earlier versions, while "classic classes" refer to classes defined with a class statement that does not have a built-in object amongst its bases: either because it has no bases, or because all of its bases are classic classes themselves - applying the definition recursively.

Classic classes are still a special category in Python 2.2. Subclassing built-in types Which reminds me. Statistical programming with R: Part 1. Dabbling with a wealth o. Wiki.zope.org IssueTrackerProducts. SourceForge.net: My SF.net Projects. Up the tata without a tutu. By Joel Spolsky Saturday, December 02, 2000 Until yesterday, the FogBUGZ license said that you couldn't reverse engineer the program, attempt to look at the source code, or modify it in any way. Various honest people have asked how much we charge for a source license, so that they could customize a few things. Hmmm. Why does the license say you can't change the source code?

Way back in 1995, I was working at Viacom, where a small group of us hardy pioneers were building web sites for various Viacom properties. In those days, there were no application servers. A brave company called Illustra started telling people that their database management system was perfect for the web. A colleague of mine at Viacom was put in charge of building an ecommerce site so that Blockbuster could sell, I kid you not, CDs on the web. Unfortunately, disaster struck. "Please can I not use Illustra? " "Well, OK, but what are you going to use instead? " And my reputation was on the line. Want to know more? The science of computing and the engineering of software (Sir To. Tags: europython2009, europython In his younger days he worked on an Algol 60 compiler.

It was much better than the legacy language of the time, Fortran, of course. Fortran was 4 years old at that time :-) Science of computing or engineering of software: does any of those two exist? He hopes to show that both exist and that both exist because of the other. There’s a scale from science to engineering. Some differences between the two, scientists and engineers: Science is more long-term. Sir Tony assumes most of us present at Europython to be software engineers. But what about the science of computing? What does it do? One day... Software will be the most reliable component of every product that contains it.Software engineering will be the most dependable of all engineering professions. All this goodness happens because of the successful application of research into a) the science of programming and b) the engineering of software.

AssertNoDiff. I recently had to test output that consisted of a long list of dicts against an expected set. After too many long debugging sessions with copious print statements and lots of hand-comparison, I finally got smart and switched to using Python's builtin difflib to give me just the parts I was interested in (the wrong parts). With difflib and a little pprint magic, a failing test now looks like this: ...and I can now easily see that the "Received" data is missing the last dict in the "Expected" list. Here's the code (not exactly what I committed at work, but I think this is even better): The get_diff_msg function is broken out to allow a test method to call self.fail(msg), where 'msg' might be the join'ed output of several diffs.

Happy testing! Extreme Programming: A Gentle Introduction. Py-fun - Google Code. Doug Hellmann: PyMOTW: exceptions. Welcome to Mako! Python code complexity micro-tool. One of the side-effects of going to PyCon is getting immersed in some side project or other. Being immersed in all things Python for a few days away from the other usual complexities of life makes it a natural environment in which to dive deep. This PyCon, I was ignited by a comment Matt Harrison made about there not being a tool to find code paths in Python. Having wrestled with the difficulty of analyzing Python code for coverage.py, I thought I could hack something together.

A few days later, the meager result is codepaths.py. It's a command line script. Give it a Python source file, and it will report on the McCabe complexity measure of the functions and class methods within. This will make a PNG file, for instance: python codepaths.py -d mycode.py | dot -Tpng -o mycode.png Weaknesses: It's a quick hack starting point. Guyon Moree: Simple Python-extensions using ctypes. Doug Hellmann: PyMOTW: weakref. Pyglet.