Feed:RoughDraft

From Tech Elephant


Bliki

Thursday, August 8nd, 2007 by Jonathan in Draft

[edit] Definition

A bliki is a blending of the best features of a blog and a wiki.

[edit] Using MediaWiki

  1. Creating custom namespaces
    1. http://meta.wikimedia.org/wiki/Help:Namespace
    2. http://www.mediawiki.org/wiki/Manual:Using_custom_namespaces
    3. http://www.mediawiki.org/wiki/Manual:Using_custom_namespaces#Content_namespaces
    4. http://meta.wikimedia.org/wiki/Help:Namespace_manager
  2. Administering accounts
    1. Special:Userlogin - Add user
    2. Special:Userrights - Update user rights
    3. http://www.mediawiki.org/wiki/Manual:Preventing_access
  3. Edit application messages
    1. Special:Allmessages
  4. Special, or Magic Words
    1. http://meta.wikimedia.org/wiki/Help:Magic_words
  5. Links
    1. http://meta.wikimedia.org/wiki/Help:Link#Subpage_feature
  6. Trackbacks
    1. http://meta.wikimedia.org/wiki/Trackback
      1. http://meta.wikimedia.org/wiki/MediaWiki:Trackbackexcerpt
  7. Navigation
    1. MediaWiki:Sidebar
  8. WYSIWYG
    1. http://mediawiki.fckeditor.net/index.php/Main_Page
    2. http://mediawiki.fckeditor.net/index.php/FCKeditor_integration_guide
  9. Generate Google Sitemap(s)
    1. 55 0 * * * webadmin php wiki/maintenance/generateSitemap.php --server=http://www.techelephant.com
  10. Labeled section transclusion
    1. http://www.mediawiki.org/wiki/Extension:Labeled_Section_Transclusion
  11. Page creation with a simple/configurable form
    1. http://www.mediawiki.org/wiki/Extension:CreateBox
  12. Create custom Special pages that do whatever you want - no limitations
    1. http://www.mediawiki.org/wiki/Manual:Special_pages
  13. Auto-generate page lists (e.g., recently updated, pages in category, page blurbs, etc.)
    1. http://www.mediawiki.org/wiki/Extension:DPLforum
    2. http://semeb.com/dpldemo/index.php?title=Dynamic_Page_List
      1. Example: Output a list of pages, ordered by popularity:
{{#dpl:namespace=
  |addpagecounter=true
  |mode=userformat
  |ordermethod=counter
  |order=descending
  |listseparators=,<font size="%COUNT%"> %COUNT% [[%PAGE%|%TITLE%]]</font>,
  |inlinetext=  <br/>
}}



Subversion

Saturday, June 6rd, 2007 by Jonathan in Draft

Subversion, or SVN for short, is an open-source revision control system, which aims to be a compelling replacement for CVS[1]. The project was initiated in 2000 by CollabNet Inc[2], but was conceived from the start to be a community-driven open-source project.

Contents

[edit] Best Practices

[edit] The directory structure

[edit] Overview

The beauty of Subversion is that you are not tied to a specific usage pattern. This lack of structure tends to confuse the newcomer. If you have used other version control systems, such as Microsoft's Visual Source Safe (VSS), CVS, or the like, the power of Subversion is not intuitive.

Particularly confusing is the notion of working with tags and branches. In subversion, your code can be tagged and branched by simply copying a file or directory into another directory. This other directory is usually called 'tags', but you are not forced to use that paradigm.

[edit] Why is there no required usage pattern for tags or branches?

The creators wanted to leave this decision completely in the control of the user/developer/software-engineer. This is because Subversion's underlying repository structure versions all content within the repository, including directories. Since a directory is version in the same manner as a file, everything points back to a revision number. So, when you wish to 'tag' a file or directory as a certain version number, then you simply copy that file or folder into a directory designated as your 'tags' directory. This copy simply points back to whatever revision number the original represented when you made the copy. Hence, your 'tagged' can pull out or export the exact state of the file or directory you wanted to preserve to reference a specific version number.



Python

Saturday, June 6rd, 2007 by Jonathan in Draft

[edit] Unit Testing

Pyunit is a unit testing framework for Python. It follows the same design as JUnit.

[edit] Documentation

Epydoc is a tool for generating API documentation for Python modules, based on their docstrings. A lightweight markup language called epytext can be used to format docstrings, and to add information about specific fields, such as parameters and instance variables. Epydoc also understands docstrings written in reStructuredText, Javadoc, and plaintext. For a more extensive example of epydoc's output, see the API documentation for Python 2.4.


PHPUnit

Tuesday, June 6th, 2007 by Jonathan in Draft

Draft

[edit] Overview

PHPUnit[1] is a unit testing framework for PHP. It provides a simple API to create a set of tests and provides a means to run those tests in a repeatable fashion. Specifically, PHPUnit allows PHP developers the ability to refactor[2] an API and ensure the core functionality does not break (e.g., regression testing[3]).

[edit] Installing PHPUnit

The easiest way to get started is by installing PHPUnit via PEAR[4].

First, you will need to add the PHPUnit PEAR channel to your local repository:

pear channel-discover pear.phpunit.de

You will see output similar to:

Adding Channel "pear.phpunit.de" succeeded
Discovery of channel "pear.phpunit.de" succeeded

Next, install PHPUnit via PEAR:

pear install -a phpunit/PHPUnit

Note: The -a argument will install the following required and optional dependencies:

  • pear/Image_GraphViz
  • dom
  • pear/Testing_Selenium
  • xdebug

You will see output similar to:

Failed to download pear/Testing_Selenium within preferred state "stable", latest release is version 0.3.1, stability "beta", use "channel://pear.php.net/Testing_Selenium-0.3.1" to install
phpunit/PHPUnit requires PHP extension "dom"
phpunit/PHPUnit can optionally use package "pear/Testing_Selenium" (version >= 0.2.0)
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.0RC2)
downloading Image_GraphViz-1.2.1.tar ...
Starting to download Image_GraphViz-1.2.1.tar (Unknown size)
........done: 23,040 bytes
install ok: channel://pear.php.net/Image_GraphViz-1.2.1