2008年11月6日星期四

Firefox Extension 开发日记 - 基础

Firefox Extension的开发入门的门槛不高,搞个Hello World超简单,但是开发出好的extension则需要对Firefox的架构和api有深入的了解;即便是开发一些简单的extension,一些入门的基础知识和概念也是很重要的。这里就是进一步学习https://developer.mozilla.org 的wiki的摘录和笔记。

基础学习
  • tags: no_tag

    • In particular, you must set the javascript.options.showInConsole pref to true.
    • The folders are traditionally named "content", "locale" and "skin", and you should follow the tradition.
    • This means you should use unique names for global identifiers in your extensions to avoid clashing with other extensions. It's usually accomplished by prefixing all global identifiers with the name of your extension or by putting most/all of your variables and functions in an object with an unique name.
    • An important issue you should be aware of is that all scripts that are loaded for a given document (the scripts used by the window itself, and scripts loaded from overlays to that document) share the same scope.
    • DTD files are used to make XUL/XBL/XHTML and other XML files in Mozilla chrome localizable. Basically, instead of hard-coding the strings in your XUL file, you use XML entities, which expand to the values declared in the DTD file referenced at the top of the XUL file.
  • XUL是extension的view,很重要。
    tags
    : no_tag

    • In Mozilla, XUL is handled much in the same way that HTML or other types of content are handled.
    • This means that the same CSS properties may be used to style both HTML and XUL, and many of the features can be shared between both.
    • In fact, in Mozilla, all document types, whether they are HTML or XUL, or even SVG are all handled by the same underlying code
    • Since XUL and HTML are handled in the same way, you can load both from either your local file system, from a web page, or from an extension or standalone XULRunner application.
    • Mozilla provides a method of installing content locally and registering the installed files as part of its chrome system. This allows a special URL form to be used called a chrome URL. By accessing a file using a chrome URL, the files receive elevated privileges to access local files, access preferences and bookmarks and perform other privileged operations. Obviously, web pages do not get these privileges, unless they are signed with a digital certificate and the user has granted permission to perform these operations.
    • Registered packages are not required to use overlays, of course. If they don't, you won't be able to access them via the main browser interface, but you can still access them via the chrome URL, if you know what it is.
    • It is worth noting that the Mozilla browser itself is actually just a set of packages containing XUL files, JavaScript and style sheets. These files are accessed via a chrome URL and have enhanced privileges and work just like any other package
    • Mozilla does not use the file extension, unless reading files from the file system, but you should use the .xul extension for all XUL files
    • XUL may be loaded from a remote site, the local file system, or installed as a package and accessed using a chrome URL. This is what browser extensions do.
  • 这里的Preferences和Java中的非常类似。
    tags
    : no_tag

    • A preference is any value or defined behavior that can be set (presumably, one setting is preferable to another). Preference changes via user interface usually take effect immediately. The values are are saved to the user profile (in prefs.js). (Firefox confirmed).
    • A preference is read from a file, and is a can call up to three methods: pref(), user_pref() and lock_pref() . All preferences files may call pref() and user_pref() , while the config file in addition may call lock_pref() .
    • To protect privacy by preventing inadvertent loading of a preferences file in the browser, the first line of the file is made un-parseable and skipped on loading. The only exception to this is user.js .
    • Default pref. files

      In the defaults/pref/ directory of the application install directory are default preferences files with .js file extension. On application launch these files initialize preferences with default values.

    • Config. file

      A configuration file, usually with .cfg extension, may be called from a default pref file via the general.config.filename preference. This file allows preference locking via the lock_pref() function.

    • User pref. files js

      In the profile directory are two user pref files: prefs.js and user.js. prefs.js is automatically generated by the application and should not be edited manually, whereas user.js is an optional file the user can create to override preferences initialized by other preferences files.

      • On application launch, the application loads preferences in the following order:

        1. Load all default pref files. Non-platform-specific .js files are loaded first, in reverse alphabetical order. Then the platform-specific file is loaded.

        2. Optionally load the config file.

        3. Load user pref files, first prefs.js, then user.js .

        Preference conflicts are resolved in favor of the last entry; for example, user.js takes precedence over prefs.js .

    • any error during loading of a default pref file, the application will issue a warning that a configuration file has failed to load and then quit.
    • an error when loading user pref files, the application will issue a warning but will continue running
    • Usually when the user specifically commits a preference change via user interface such as the Preferences dialog, the application saves the change by overwriting prefs.js . On application exit, all user-set preferences are saved to prefs.js . This also means that preferences initially set by user.js will also be saved to prefs.js.
    • Do NOT edit prefs.js directly
    • Note the application never changes user.js
    • You can set user preferences via the advanced preferences editor, accessible by typing about:config in the Location Bar.
    • If you want to manually change preference values for a given profile, you should do so by creating user.js in your profile directory.
    • preference names are case-sensitive.
    • pref files are loaded in reverse alphabetical order
  • tags: no_tag

    • Preferences API allows you to save and read strings, numbers, booleans, and references to files to the preferences store.
    • The preferences API is exposed as a set of frozen XPCOM components and interfaces: nsIPrefService, nsIPrefBranch, nsIPrefBranch2.
  • Mozilla支持模块化。
    Common JS Modules

    tags: firefox extension

    • Here you'll find a collection of modules which you can import into your extension. The goal is to make extension development easier by implementing common functionality as reusable libraries. If you would like to contribute a new module
      一些有用的模块
    • Logging
    • Observers
    • Preferences
  • tags: no_tag

    • JavaScript code modules are a concept introduced in Firefox 3 (Gecko 1.9) and can be used for sharing code between different privileged scopes. Modules can also be used to create global JavaScript singletons that previously required using JavaScript XPCOM objects.
    • A JavaScript code module is simply some JavaScript code located in registered location. The module is loaded into a specific JavaScript scope, such as XUL script or JavaScript XPCOM script, using Components.utils.import.
    • An extremely important behavior of Components.utils.import is that modules are cached when loaded and subsequent imports do not reload a new version of the module, but instead use the previously cached version. This means that a given module will be shared when imported multiple times. Any modifications to data, objects or functions will be available in any scope that has imported the module. For example, if the simple module were imported into two different JavaScript scopes, changes in one scope can be observed in the other scope.
    • This sharing behavior can be used to create singleton objects that can share data across windows and between XUL script and XPCOM components.
    • Each scope which imports a module receives a by-value copy of the exported symbols in that module. Changes to the symbol's value will not propagate to other scopes.
      • That's to say the exported symbols work like reference in java. Import a module cause create new references defined in the EXPORTED_SYMBOLS and let them reference to corepsonding variables. To different import, these references are different, mutable and having nothing to do with each other, but their target are same. - post by ericwangqing
      • "resource://" protocol. The basic syntax of a resource URL is as follows:

        resource:////

        The is an alias to a location, usually a physical location relative to the application or XUL runtime. There are several pre-defined aliases setup by the XUL runtime:

        • app - Alias to the location of the XUL application.
        • gre - Alias to the location of the XUL runtime.

        The can be multiple levels deep and is always relative to the location defined by the . The common relative path is "modules" and is used by XUL Runner and Firefox. Code modules are simple JavaScript files with a .js or .jsm extension.

    • The easiest way for extensions and XUL applications to add custom aliases is by registering an alias in the chrome manifest using a line like this:

      resource aliasname uri/to/files/ 
    • Programmatically adding aliases

      Custom aliases can be programmatically added to the resource protocol as well

  • Chrome是Mozilla的一个特殊的protocol。
    tags
    : firefox extension

    • Chrome is the set of user interface elements of the application window that are outside of a window's content area. Toolbars, menu bars, progress bars, and window title bars are all examples of elements that are typically part of the chrome.
    • A supplier of chrome for a given window type (e.g. for the browser window) is called a chrome provider. The providers work together to supply a complete set of chrome for a particular window, from the images on the toolbar buttons to the files that describe the text, content and appearance of the window itself.
    • The main source file for a window description comes from the content provider, and it can be any file type viewable from within Mozilla. It will typically be a XUL file, since XUL is designed for describing the contents of windows and dialogs. The JavaScript files that define the user interface are also contained within the content packages, as well as most XBL binding files
    • The two main types of localizable files are DTD files and Java-style properties files.
    • A skin provider is responsible for providing a complete set of files that describe the visual appearance of the chrome. Typically a skin provider will provide CSS files and images.

      Note: Scripts (including those found in XBL) loaded from skin packages will not execute.

    • The Gecko runtime maintains a service known as the chrome registry that provides mappings from chrome package names to the physical location of chrome packages on disk.
    • This chrome registry is configurable and persistent, and thus a user can install different chrome providers, and select a preferred skin and locale. This is accomplished through xpinstall and the extension manager.
    • Firefox 2 will not find the chrome when packagename is mixed case.
    • comments

      A line is a comment if it begins with the character '#'; any other characters on the line are ignored.

    • content

      A content package is registered with the line

      content packagename uri/to/files/ [flags] 
    • This will register a location to use when resolving the URI chrome://packagename/content/.... The URI may be absolute or relative to the location of the manifest file. Note, that it must end with an '/'.
    • A locale package is registered with the line

      locale packagename localename uri/to/files/ [flags] 

      This will register a locale package when resolving the URI chrome://packagename/locale/... . The localename is usually a plain language identifier "en" or a language-country identifier "en-US". If more than one locale is registered for a package, the chrome registry will select the best-fit locale using the user's preferences

    • skin

      A skin package is registered with the line

      skin packagename skinname uri/to/files/ [flags] 

      This will register a skin package when resolving the URI chrome://packagename/skin/... . The skinname is an opaque string identifying an installed skin. If more than one skin is registered for a package, the chrome registry will select the best-fit skin using the user's preferences.

    • overlay

      XUL overlays are registered with the following syntax:

      overlay chrome://URI-to-be-overlaid chrome://overlay-URI [flags] 
    • style

      Style overlays (custom CSS which will be applied to a chrome page) are registered with the following syntax:

      style chrome://URI-to-style chrome://stylesheet-URI [flags] 
      Note that only stylesheets at chrome URIs can be applied in this way.
    • override

      In some cases an extension or embedder may wish to override a chrome file provided by the application or XULRunner. In order to allow for this, the chrome registration manifest allows for "override" instructions:

      override chrome://package/type/original-uri.whatever new-resolved-URI [flags] 

      Note: overrides are not recursive (so overriding chrome://foo/content/bar/ with file:///home/john/blah/ will not usually do what you want or expect it to do).

      There was a bug in Gecko 1.8.1.5 (Firefox 2.0.0.5) and earlier where you could not use a relative URL for the new-resolved-URI parameter. You needed to provide an absolute URL. See bug 323455 .

    • resource

      New in Firefox 3

      When using JavaScript code modules it may be necessary to create resource protocol aliases so extensions and applications can load modules using Components.utils.import. Aliases can be created using the resource instruction:

      resource aliasname uri/to/files/ [flags] 

      This will create an mapping for the res:/// to the path given.

      Note that there are no security restrictions preventing web content from including content at resource uris so take care with what you make visible there.

其它有用资源
Posted from Diigo. The rest of my favorite links are here.

2008年11月4日星期二

开发Firefox插件入门

开发Firefox插件实际上就是写xul,css,js然后把它们package为xpi(其实就是zip),开始开发之前先要配置好开发环境。首先就是:
设置Firefox
firefox非常强大,我们要为它开发插件首先就是要单独配置一个profile,免得开发工作造成日常使用的firefox出毛病。
  • tags: no_tag

    • To get started setting up your multiple browser users, you'll start up the Firefox profile manager. To do so, from the command line, run Firefox with the --profilemanager argument.
    • firefox.exe -P blogging starts up the blogging profile.
    • By default you can't run two different Firefox profiles at the same time
    • So you'd edit the shortcut in the screenshot above to read:

      \path\to\firefox.exe -P buffy -no-remote
    • This is also useful if you want to run different Firefox versions at once, for example if you want to run Firefox 3 Beta, but still want to keep all your current extensions working in Firefox 2. Just use different profiles for each of the versions. You can only run one version at a time though, although that might be fixed with the MOZ_NO_REMOTE=1
    • As of Firefox 2.0, you can also use the "-no-remote" command line option instead of setting the var in a batch file
    • It's also worth noting that using no-remote breaks external links. That is, if you click on a link from your favorite chat client, the link will not open in your Firefox instance.

      A way around this, assuming you want to run two profiles at once, is to start your primary Firefox instance normally, and then start your second instance using -no-remote. This way, external links will still work (they will open in the primary instance).

选择IDE
虽然在大部分的教程中说到firefox extension的开发,都是直接使用文本编辑工具和一些firefox的插件。这其中,当然有firebug、DOM Inspector这些东东啦。不过,最特别的是Extension Developer,特别为插件开发定制,有一组很好用的工具。然而,高效的开发当然离不开自动完成、上下文提示、自动语法检查和更正建议等等功能,我们需要一个IDE。
google了下这方面口碑较好的有XULBooster和Spket。由于,XULBooster比较重量级(虽然都是for eclipse, 但是需要wtp2.0),我暂时没有安装它,而是选择了Spket。
  • Spket IDE is powerful toolkit for JavaScript and XML development. The powerful editor for JavaScript, XUL/XBL and Yahoo! Widget development. The JavaScript editor provides features like code completion, syntax highlighting and content outline that helps developers productively create efficient JavaScript code.

    tags: no_tag

不幸的是,这个鸟东东没有XUL的runner,我想在接下来的开发中多少会有不便的。虽然可以使用Extension Developer提供的,但是C & P过来过去的肯定不是好办法。
而且,这厮竟然要注册(上帝啊,原谅我说脏话、不厚道),我只好对其com.spket.ui.internal.License 痛下杀手了(BS下自己先,做为软件从业人员,竟然吃里扒外)。现在搞定了这个东东,试试看是否有愉快的体验呢。我在这里声明,一旦从这个东东上获益,make any money from it,我一定买个License。

开发入门
说实话,这个插件开发的技术比较简单,这是几个比较有用的资源。对了,还有一本书《Programming Firefox》不错,正在看。
  • 在eclipse中动态开发Firefox扩展

    tags: eclipse, firefox, firefox extension

    • XULBooster与spket
  • tags: no_tag

    • sample@example.net - the ID of the extension
    • Make it unique
    • Specify 2 -- the 2 declares that it is installing an extension.  If you were to install a theme it would be 4
    • {ec8030f7-c20a-464f-9b0e-13a3a9e97384} - Firefox's application ID.
    • 1.5 - the minimum version of Firefox you're saying this extension will work with
    • (In Firefox version 3.0.1, you can not set both em:minVersion and em:maxVersion to "3.0.*". If you try the extension install will fail with the error "Not compatible with Firefox 3.0.1". I am not clear on the reason for this so will not speculate and will leave the explanation to somebody who is more informed. Setting em:minVersion to "3" and em:maxVersion to "3.0.*" fixed the problem for me.)
    • Firefox's user interface is written in XUL and JavaScript.  XUL is an XML grammar that provides user interface widgets like buttons, menus, toolbars, trees, etc.  User actions are bound to functionality using JavaScript.

      To extend the browser, we modify parts of the browser UI by adding or modifying widgets.  We add widgets by inserting new XUL DOM elements into the browser window and modify them by using script and attaching event handlers.

    • The browser is implemented in a XUL file called browser.xul ($FIREFOX_INSTALL_DIR/chrome/browser.jar contains content/browser/browser.xul). 
    • XUL Overlays are a way of attaching other UI widgets to a XUL document at run time.  A XUL Overlay is a .xul file that specifies XUL fragments to insert at specific merge points within a "master" document.  These fragments can specify widgets to be inserted, removed, or modified.
    • The called status-bar specifies the "merge point" within the browser window that we want to attach to
    • There are three types: content (XUL, JavaScript, XBL bindings, etc. that form the structure and behavior of an application UI), locale (DTD, .properties files etc that contain strings for the UI's localization), and skin (CSS and images that form the theme of the UI)
    • (Don't forget the trailing slash, "/"! Without it, the extension won't get registered.)

      (my_extension may not work! Redirect seems to break if the folder name contains an underscore.)

  • tags: no_tag

    • start "" "%ProgramFiles%\Mozilla Firefox\firefox.exe" -no-remote -P dev
Posted from Diigo. The rest of my favorite links are here.

Web Conference 的选择

我们现在的工作,大家分散几处,碰头开会的成本实在太高。这里找到了一些对Web Conference的评价比较的资源,并已经安排欧阳来选择一款适合我们的安装。
Posted from Diigo. The rest of my favorite links are here.

2008年11月2日星期日

量子计算机


Posted from Diigo. The rest of my favorite links are here.

认知革命、行为主义和神经网络


人类是如何感知和认识这个世界一直是个巨大的谜,这里是我学习认知科学时的一些笔记。
  • tags: no_tag

  • 二十世纪五十年代认知科学的诞生也被称为是认知革命。
    tags
    : no_tag

    • The "cognitive revolution" is the name for an intellectual movement in the 1950s that began what are known collectively as the cognitive sciences.
    • 认知革命的定义:an all-out effort to establish meaning as the central concept of psychology […]. It was not a revolution against behaviorism with the aim of transforming behaviorism into a better way of pursuing psychology by adding a little mentalism to it. […] Its aim was to discover and to describe formally the meanings that human beings created out of their encounters with the world, and then to propose hypotheses about what meaning-making processes were implicated."
    • 认知科学的五条假设(原则)
      • The mental world can be grounded in the physical world by the concepts of information, computation, and feedback.
      • The mind cannot be a blank slate because blank slates don't do anything.
      • An infinite range of behavior can be generated by finite combinatorial programs in the mind
      • Universal mental mechanisms can underlie superficial variation across culture
      • The mind is a complex system composed of many interacting parts.
  • 来自Stanford Encyclopedia of Philosophy。
    行为主义是已经过气的心理学分支,被认知革命革了命。

    tags: Cognitive Science

    • behave is what organisms do.
    • Loosely speaking, behaviorism is an attitude. Strictly speaking, behaviorism is a doctrine.
    • For such a person, there is no knowable difference between two states of mind unless there is a demonstrable difference in the behavior associated with each state.
  • Stanford Encyclopedia of Philosophy

    tags: Cognitive Science

    • 定义Connectionism is a movement in cognitive science which hopes to explain human intellectual abilities using artificial neural networks (also known as ‘neural networks’ or ‘neural nets’). Neural networks are simplified models of the brain composed of large numbers of units (the analogs of neurons) together with weights that measure the strength of connections between the units. These weights model the effects of the synapses that link one neuron to another. Experiments on models of this kind have demonstrated an ability to learn such skills as face recognition, reading, and the detection of simple grammatical structure.
    • Connectionists presume that cognitive functioning can be explained by collections of units that operate in this way. Since it is assumed that all the units calculate pretty much the same simple activation function, human intellectual accomplishments must depend primarily on the settings of the weights between the units.
    • feed forward net.
    • backpropagation
    • Training nets to model aspects of human intelligence is a fine art. Success with backpropagation and other connectionist learning methods may depend on quite subtle adjustment of the algorithm and the training set.
    • Connectionist learning techniques such as backpropagation are far from explaining this kind of ‘one shot’ learning
    • One of the most attractive of these efforts is Sejnowski and Rosenberg's 1987 work on a net that can read English text called NETtalk.
    • Nets may be good at making associations and matching patterns, but they have fundamental limitations in mastering general rules such as the formation of the regular past tense.
    • For example, Marcus (1998, 2001) argues that Elman's nets are not able to generalize this performance to sentences formed from a novel vocabulary. This, he claims, is a sign that connectionist models merely associate instances, and are unable to truly master abstract rules.
    • Over the centuries, philosophers have struggled to understand how our concepts are defined.
    • Connectionism promises to explain flexibility and insight found in human intelligence using methods that cannot be easily expressed in the form of exception free principles (Horgan and Tienson 1989, 1990), thus avoiding the brittleness that arises from standard forms of symbolic representation.
    • The last forty years have been dominated by the classical view that (at least higher) human cognition is analogous to symbolic computation in digital computers.
    • The connectionist claims, on the other hand, that information is stored non-symbolically in the weights, or connection strengths, between the units of a neural net.
    • implementational connectionists seek an accommodation between the two paradigms
    • They hold that the brain's net implements a symbolic processor. True, the mind is a neural net; but it is also a symbolic processor at a higher and more abstract level of description
    • They complain that classical theory does a poor job of explaining graceful degradation of function, holistic representation of data, spontaneous generalization, appreciation of context, and many other features of human intelligence which are captured in their models
    • Such radical connectionists claim that symbolic processing was a bad guess about how the mind works
    • The failure of classical programming to match the flexibility and efficiency of human cognition is by their lights a symptom of the need for a new paradigm in cognitive science. So radical connectionists would eliminate symbolic processing from cognitive science forever.
    • distributed representation seems both novel and difficult to understand
    • The sub-symbolic nature of distributed representation provides a novel way to conceive of information processing in the brain. If we model the activity of each neuron with a number, then the activity of the whole brain can be given by a giant vector (or list) of numbers, one for each neuron.
    • So the brain amounts to a vector processor, and the problem of psychology is transformed into questions about which operations on vectors account for the different aspects of human cognition.
    • This suggests that neural network models serve as counterexamples to the idea that the language of thought is a prerequisite for human cognition. However, the matter is still a topic of lively debate
    • In a series of papers Horgan and Tienson (1989, 1990) have championed a view called representations without rules. According to this view classicists are right to think that human brains (and good connectionist models of them) contain explanatorily robust representations; but they are wrong to think that those representations enter in to hard and fast rules like the steps of a computer program.
    • Fodor and Pylyshyn's often cited paper (1988) launches a debate of this kind. They identify a feature of human intelligence called systematicity which they feel connectionists cannot explain. The systematicity of language refers to the fact that the ability to produce/understand/think some sentences is intrinsically connected to the ability to produce/understand/think others of related structure.
    • Since connectionism does not guarantee systematicity, it does not explain why systematicity is found so pervasively in human cognition.
  • Stanford Encyclopedia of Philosophy

    tags: Cognitive Science

    • The notion of a "mental representation" is, arguably, in the first instance a theoretical construct of cognitive science.
    • Contemporary philosophers of mind have typically supposed (or at least hoped) that the mind can be naturalized
  • tags: no_tag

    伟大的Church-Turing thesis:所有可计算集都是等价的,所有可计算都是图灵可计算。神经网络也是图灵机,神经网络计算模型等同于向量并行计算模型。

  • tags: no_tag

    • The nature versus nurture debates concern the relative importance of an individual's innate qualities ("nature", i.e. nativism, or philosophical empiricism, innatism) versus personal experiences ("nurture") in determining or causing individual differences in physical and behavioral traits.
    • The famous psychologist Donald Hebb is said to have once answered a journalist's question of "which, nature or nurture, contributes more to personality?" by asking in response, "which contributes more to the area of a rectangle, its length or its width?"
  • tags: no_tag

    • Tabula rasa (Latin: blank slate) refers to the epistemological thesis that individual human beings are born with no built-in mental content, in a word, "blank", and that their entire resource of knowledge is built up gradually from their experiences and sensory perceptions of the outside world.
    • In computer science, tabula rasa refers to the development of autonomous agents which are provided with a mechanism to reason and plan toward their goal, but no "built-in" knowledge-base of their environment. They are thus truly a "blank slate".
    • Scientists recognize that the entire cerebral cortex is indeed preprogrammed and organized in order to process sensory input, motor control, emotions, and natural responses.[5] This preprogrammed part of the brain then learns and refines its ability to perform its many tasks.

Posted from Diigo. The rest of my favorite links are here.

2008年11月1日星期六

认知科学(转译自http://plato.stanford.edu/entries/cognitive-science/)

认知科学(来自斯坦福哲学百科全书)
本文初稿于1996年9月23日,重修于2007年4月30号
认知科学是一门跨学科的研究,研究思维智力,相关学科包括哲学、心理学、人工智能、神经科学、语言学和人类学。它的起源,从学科思想来说起源于二十世纪五十年代中期多个领域的研究者开始从复杂的表示和计算过程来建立有关思维的理论;而从组织形式来说,则起源于二十世纪七十年代认知学科学术界的形成,起标志就是期刊《认知科学》(Cognitive Science)的创办。此后,来自北美洲、欧洲、亚洲和澳洲的超过60所大学开始了认知科学的研究,还有很多的大学设立了认知科学的课程。
  1. 历史
  2. 方法
  3. 表示和计算
  4. 理论方法
    1. 形式逻辑
    2. 规则
    3. 概念
    4. 类比
    5. 影像
    6. 连接主义
    7. 理论神经科学
  5. 与哲学相关
    1. 哲学应用
    2. 对认知科学的批评
    3. 认知科学中的哲学话题

  1. 历史
    至少从古希腊时代起,人类就尝试去理解思维和它的相关操作,例如哲学家柏拉图和亚里斯多德试图解释人类知识的本质。关于思维的研究长期以来一直是从属于哲学的领域,直至十九世纪产生了实验心理学 -- Wilhelm Wundt和他的学生开创了实验室方法,使得对精神操作过程的研究更加系统化。然而,在接下来的几十年,实验心理学开始被行为主义所主导,而行为主义事实上否认了思维的存在。行为主义者认为,例如J. B. Watson所言,心理学应当仅仅研究可观测的刺激和可观测的应激行为之间的联系,而对于意识和精神表示的言论被视为不是严肃的科学讨论,特别是在北美洲,行为主义对心理科学的统治延续到了二十世纪五十年代。直到1956年前后,学术界的大环境有了戏剧性的变化。George Miller从大量的研究中总结得出人类的思考能力是有限的,例如,人类的短期记忆能力大概在7项左右。他还提出通过精神程序的编码和解码处理将信息记录为块或者精神表示能够克服这个限制。当时,原始的计算机才刚刚出现几年,但是诸如John McCarthy, Marvin Minsky, Allen Newell和Herbert Simon等先行者就开始建立人工智能(Artificial Intelligence)的基础。此外,Noam Chomsky否定了行为主义者认为语言是一种学来的习惯的猜想,代之以通过一组规则构成的精神语法来解释对(人类对)语言的理解。上述的六位思想家被认为是认知科学的奠基者。

。。。待续 。。。

2008年10月31日星期五

OWL和工具

OWL最近推出了OWL 2,据说更加强大,还没有来得及仔细研究,摘录下先。
  • tags: owl, owl2, ontology

    • OWL 2 extends the W3C OWL Web Ontology Language with a small but useful set of features that have been requested by users
    • effective reasoning algorithms
    • OWL tool developers are willing to support
    • extra syntactic sugar
    • additional property and qualified cardinality constructors
    • extended datatype support
    • simple metamodelling
    • extended annotations.
    • The OWL Working Group intends to make OWL 2 be a superset of OWL 1
    • OWL 2 will be backward compatible, and creators of OWL 1 documents need only move to OWL 2 when they want to make use of OWL 2 features

Posted from Diigo. The rest of my favorite links are here.

Activity theory -- 在认知心理学之外的理论,以及简单的CHI行为建模GOMS和KML

摘要

CHI、CSCW领域的研究着眼于支持人类工作,这不可避免的需要人类行为和心理的理论基础。这方面的主流是以认知心理学(Cognitive Psychology)为核心的认知科学。而也有采用其他理论作为基础的。例如 行为理论(Activity Theory)就是其中重要的一种。
Activity Theory和Cognitive Psychology最大的区别就在于,A认为意识(Consciousness)为人类所独有,人(Human)和物(Thing)有着本质的区别;而C则认为,从信息处理的角度来看人对信息的处理没有什么不同于计算机器的,信息处理只有能力和范围的不同,本质上,人类没有啥特殊之处。
GOMS是一种认知科学基础上的人机交互的建模方法:Goal、Operations、Methods、Selections,而KLM是这一方法的具体化,Keystroke Level Model是对基于鼠标键盘的人机界面的低层交互建模方法。

Activity Theory 行为理论
  • tags: “Activity, Theory

    • 行 为理论(Activity Theory)是在20世纪40年代由前苏联列昂节夫(Leont’ev)根据他的老师兼同事,著名心理学家和教育理论家维果斯基(Vygotsky)的 文化历史心理学理论发展而来的。行为理论属于交叉学科理论,研究特定文化历史背景下人的行为活动,最早被前苏联应用于残疾儿童的教育和设备控制面板的人性 化设计。在20世纪90年代,Bonnie Nardi等人将行为理论引入美国等西方国家。行为理论的哲学基础是辩证唯物主义哲学,其基本思想是,人类行为是人与社会和物理环境所造就的事物之间的双 向交互过程,人类行为的产生来自于主观人与客观事物之间的普遍联系和不断发展之中。
    • 行为理论通过构造行为系统来实现。行为系统包括三个核心成分(主体、客体和团体)和三个次要成分(工具、规则和劳动分工)。次要成分构成了核心成分三者之间的联系。
          核心成分中主体是行为的执行者,客体是主体加工处理的对象,团体是指行为发生时行为主体所在的群体。次要成分中的工具将主体与客体联系起来,工具包括具体 的工具(如语言、笔、纸、教材等)和抽象的工具(如某种思考方法、某种解题规则等)。规则是社会水平和团体水平的法律、标准、规范、政策、策略、伦理道 德、文化传统以及个体水平的价值观、信仰等等。规则是行为主体与团体之间的联系纽带。在将行为客体转换为某种结果的过程中,需要界定团体中的不同成员在达 到目标过程中所承担的责任,这就劳动分工。劳动分工将团体与客体联系起来。
  • tags: no_tag

    • Activity theory is a psychological meta-theory, paradigm, or framework, with its roots in the Soviet psychologist Vygotsky's cultural-historical psychology. Its founders were Alexei N. Leont'ev (1903-1979), and Sergei Rubinshtein (1889-1960) who sought to understand human activities as complex, socially situated phenomena and go beyond paradigms of psychoanalysis and behaviorism. It became one of the major psychological approaches in the former USSR, being widely used in both theoretical and applied psychology, in areas such as education, training, ergonomics, and work psychology [1]. Activity theory theorizes that when individuals engage and interact with their environment, production of tools are resulted. These tools are "exteriorized" forms of mental processes, and as these mental processes are manifested in tools, they become more readily accessible and communicable to other people, thereafter becoming useful for social interaction.
    • Activity theory is a psychological meta-theory, paradigm, or framework, with its roots in the Soviet psychologist Vygotsky's cultural-historical psychology. Its founders were Alexei N. Leont'ev (1903-1979), and Sergei Rubinshtein (1889-1960) who sought to understand human activities as complex, socially situated phenomena and go beyond paradigms of psychoanalysis and behaviorism.
    • Activity theory theorizes that when individuals engage and interact with their environment, production of tools are resulted. These tools are "exteriorized" forms of mental processes, and as these mental processes are manifested in tools, they become more readily accessible and communicable to other people, thereafter becoming useful for social interaction
    • In the study of Human-Computer Interaction and cognitive science, activity theory can be used to provide a framework for evaluating design.
    • In a framework derived from activity theory, any task, or activity, can be broken down into actions, which are further subdivided into operations. In a design context, using these categories can provide the designer with an understanding of the steps necessary for a user to carry out a task.
  • Dialectical materialism - Wikipedia, the free encyclopedia
    辩证唯物主义,看了这里才知道就像对这个名字的不熟悉一样,其实,和我们之前学的辩证唯物主义是大不相同的。
    tags
    : Dialectical materialism

  • 这里是华师信科院认知研究室的教学网页,有不少有意思的论文列表在那里。
    tags
    : cscw, chi, activity theory

  • tags: no_tag

    • GOMS stands for Goals, Operators, Methods, and Selection rules, an approach to human computer interaction observation. It was developed in 1983 by Stuart Card, Thomas P. Moran and Allen Newell, and spelled out in their book The Psychology of Human Computer Interaction
    • The plain, or "vanilla flavored", GOMS first introduced by Card, Moran and Newell is now referred to as CMN-GOMS. Keystroke Level Modeling (KLM) is the next GOMS technique and was also introduced by Card, Moran and Newell in their 1983 book.
    • All of the GOMS techniques provide valuable information, but they all also have certain drawbacks. None of the techniques address user unpredictability - such as user behaviour being affected by fatigue, social surroundings, or organizational factors.
    • only applicable to expert users, novices are not considered.[3]
  • KLM是GOMS的一种实现
    tags
    : chi

    • KLM (or KLM-GOMS) stands for Keystroke-Level Model, a hard science approach to human–computer interaction (HCI), based on CMN-GOMS, developed by Card, Moran & Newell, and spelled out in their book The Psychology of Human Computer Interaction, 1983. The Keystroke-Level Model is a 11 step method that can be used by individuals or companies seeking ways to estimate the time it takes to complete simple data input tasks using a computer and mouse.
    • KLM is not the only technique for evaluating interfaces, but it can be used to compare the speed of two different interfaces designed to accomplish the same task.
    • This method assumes that operator times are invariant and do not depend on the previous sequence of events. New physical operators can be added if their timing can be represented as a simple context-free function. KLM-GOMS does not account for either slips or mistakes automatically -- the analyst must create separate models of error sequences and perform their own sensitivity analysis.
  • 基于KLM和GOMS的一个具体应用。
    tags
    : chi

    • It can be expensive to train users with a prototype, but unskilled users do not interact with a product in the same way as a skilled user. Cognitive performance modeling aims to solve this problem by predicting how a skilled user will interact with a system. Simulation and analysis take the place of expensive training and testing.
Posted from Diigo. The rest of my favorite links are here.

Michael Richard Lynch - 传奇的人生,学生创业的典范


这里先来复习一下伟大的贝叶斯(Bayesion)公式:
贝叶斯公式说明了条件概率里面原因和结果概率之间的联系。贝叶斯分类器先设定一组条件的先验概率,然后用一组数据对分类器进行训练,得到更加精确的后验概率,最后就可以用分类器来进行分类和预测了。

今天,极天公司来实验室做交流,介绍了Autonomy公司,一家企业搜索提供商。极天公司是Autonomy的OEM商,为企业提供企业搜索解决方案(主要技术核心应该是在Autonomy的搜索引擎之上做了基于lucene的中文划词插件)。

期间,对Autonomy公司产生了兴趣,google之,发现了一个传奇的CEO, Lynch博士。他从大学期间开始创业,先后成功创办了多家高科技公司,其中3家以上的公司上市,最为成功的就是号称要Beat Google Up的Autonomy。从Lynch先生的生平我们可以推断,Autonomy公司的搜索引擎应该是基于Bayesion分类器的(Lynch先生从研究生开始就在搞Bayesion模式识别),他创办的几家公司都和神经网络、模式识别有关。


Posted from Diigo. The rest of my favorite links are here.

CSCW 领域最重要的论文

这里列表了CSCW领域最为重要的论文。
  • This paper list is the result of a citation graph analysis of the CSCW Conference. It has been established in 2006 and reviewed by the CSCW Community. This list only contains papers published in one conference; papers published at other venues have also had significant impact on the CSCW community.

    tags: cscw


Posted from Diigo. The rest of my favorite links are here.