Skip to main content

Home/ Mac Attack/ Group items tagged architecture

Rss Feed Group items tagged

Benjamin Bandt-Horn

The Architecture of Open Source Applications: Python Packaging - 0 views

  • There are two schools of thought when it comes to installing applications
  • each application is its own standalone "appliance", and installing and removing them should not disturb the rest of the OS. If the application needs an uncommon library, that library is included in the application's distribution
  • a collection of small self-contained units called packages
  • ...8 more annotations...
  • Libraries are bundled into packages
  • Self-contained applications also make the developer's life easier when she needs to support several operating systems. Some projects go so far as to release portable applications that remove any interaction with the hosting system by working in a self-contained directory, even for log files.
  • Fellowship of the Packaging
  • In Python a package is a directory containing Python files. Python files are called modules. That definition makes the usage of the word "package" a bit vague since it is also used by many systems to refer to a release of a project.
  • use the term "Python packages" when we talk about a directory containing Python modules
  • The term "release" is used to define one version of a project
  • "distribution" defines a source or a binary distribution of a release as something like a tarball or zip file
  • advanced tools like Setuptools, which add features on the top of it, or Distribute, a fork of Setuptools. There's also Pip, a more advanced installer, that relies on Setuptools
  •  
    There are two schools of thought when it comes to installing applications
Benjamin Bandt-Horn

Practical guidelines for beautiful Python code | TurnKey Linux Blog - 0 views

  • a well defined mental model of the problem domain
  • Refining the architecture is part of the "refactor mercilessly" rule
  • If you've never inherited from a built-in data type, experiment with a small test case in a throw away script. This way you don't mangle your current project and you can be as experimental as you like.
  • ...3 more annotations...
  • constants are always class level attributes because they are shared by all instances
  • code is communication
  • If a method doesn't need access to instance level attributes then it should be a class method, not a regular method. If a method doesn't need access to class level attributes then it should be a static method, not a class method.
1 - 2 of 2
Showing 20 items per page