| 包's profile米罗斯苦铁的世界PhotosBlogLists | Help |
|
February 28 可能性雨人绝对是好片子,这没什么说的。而且关于这部88年片子的影评太多了。别人说过的我就不多说了,仅从另外的方面谈一下。 钱在片子里占了很大份量。雷的几次发作显现出的亲情固然令人感动,但如果没有赌场里赢的那8万多美刀,结局估计会有很大不同。假设查理没带雷去赌场,那他的公司必然倒闭。假设查理破产之后,和身家巨万却不知钱为何物且幼稚固执的哥哥穷困潦倒地一起生活,这片子就不好看了;然而可能更有讽刺性。这样的话,查理可能会不顾一切地要把雷攥在自己手心里,跟原结尾一样败诉,之后穷困而死,隔了若干时间,雷会说:好久没看见查理了,然后列举多少天多少分多少秒,等等等等;可能还会发作一次。 这也是一种可能性。 雷到底在想什么呢……始终无法明白。由此想到我自己。有时候,很多话想到了,但是不想,或不能,或怎么样,总之没有告诉应该与之沟通的人。对方一般不会试图来了解你,他们会说:真搞不懂你是怎么想的。然后关系就变得冷漠起来。 看了这片子,忽然觉得我就是雨人。不止是我,我们都是雨人。 休谟的不可知论与康德的不可知论之比较贝克莱否定洛克世界构成要素中的物质存在,休谟则走得更远,不仅怀疑物质存在、也怀疑上帝存在。不过他不是象贝克莱那样断然否定物质存在,而是说物质存在与否不可知。 休谟的不可知论主要表现在两个方面,一是关于物质对象和上帝是否存在不可知,另一个是关于经验之间因果关系(或普遍必然规律)是否存在不可知。关于物质的存在不可知,这是继承了贝克莱的思想,而后一个不可知是他的创见,它对康德哲学和现代科学哲学产生了巨大影响, 本书后面所说的休谟的不可知指的就是后一个不可知。 关于后一个不可知,休谟认为:我们相信因果关系存在是非理性的,因为归纳得不出普遍必然规律; 现实中我们相信因果关系,比如火使人温暖,水使人清醒,是因为不这样就要吃苦头; 但是从理论上看,我们的理性无论如何也得不出普遍必然因果关系。他写道:“关于原因与结果我们的一切推论无非是由习惯来的;信念与其说是我们天性中思考部分的行为,不如说是感觉部分的行为比较恰当。” 罗素在西方哲学史中写道,休谟和洛克一样,初衷是:明理性、重经验,什么也不轻信,追求由经验和观察能得到的不拘任何知识。 但是他最终却得出了从经验和观察什么也不能知晓这个倒霉的结论。 康德自称自己被休谟从形而上学独断论中惊醒,就是因为休谟提出的第二个不可知――普遍必然因果关系不可知。康德为此提出了自己的解决办法――主观改造客观理论。 康德接受了古希腊原子论者德谟克利特和洛克关于感觉和外物不相似的说法,为了解释我们意识到的自然界是怎么来的,以及普遍必然规律是怎么来的,他提出主观改造客观理论:人通过感官直觉把外物(物自体)提供的材料表现成感觉对象――红绿软硬等,通过先验的时空观念由感觉对象构成事物的表象――比如一颗树的表象,通过理性――先验理性――把许多表象放在一起构成现象界。据此,我们所了解的自然界实际上就是现象界或表象构成的世界。自然界有因果关系,有普遍必然规律,它们无需归纳证明,因为自然界是先验理性按照这些法则构成的。 所以我们知道的自然界都是现象界或者说表象世界中的东西,而物自体是什么样子,这是不可知的。这就是著名的关于世界本原的二元论。 康德的《未来形而上学导论》第三十六节标题是:“自然界本身是怎样可能的?”其中写道: 这一问题是先验哲学所能达到的最高峰。先验哲学,作为它的界线和完成,必须达到这一点。这个问题实际包括两个问题: 第一,自然界,在质料的意义上,也就是从直观上,作为现象的总和来看,是怎样可能的?空间、时间以及充实空间和时间的东西棗感觉的对象,一般是怎样可能的?答案是:这是由于我们的感性的性质的原故,这种性质决定了我们的感性按照它特有的方式被一些对象所感染,这些对象本身是感性所不知道的,并且跟那些现象完全不同。这个答案已见于《纯粹理性批判》一书中的“先验感性论”里,而在《导论》里已见于第一个主要问题的解决里。 第二:自然界,在形式的意义上,也就是作为各种规则(一切现象必须在这些规则的制约之下被思维连结在一个经验里)的总和来看,是怎样可能的?答案只能是这样的,即它之所以可能,只是由于我们的理智的性质的原故。这种性质决定了感性的一切表象必然被联系到一个意识上去,这就首先使我们进行思维的特有方式(即通过规则来思维)成为可能,并且通过这种方式,就使经验成为可能;不过这种经验和对自在之客体本身的认识是大不相同的。 这两个问题就是认识论和本体论问题。康德为了解决认识论问题而把困难推到本体论那边去了。康德在某种意义上解决了休谟的不可知问题(我以为更好的解决是马克思的实践检验说和波普尔的证伪说),但是却加深了另一种不可知,那就是物质对象或物自体不可知。我们称这种不可知论是康德的不可知论。 康德的理论被称之为二元论,因为他既承认物质本原,又承认精神本原。除了不可知论问题,康德理论还存在感官和外物(不管是物自体还是现象中的物体)如何协调一致问题。这是个大问题。比如人为什么相应苹果产生好吃的甜的感觉,相应自然光(波长在450到750毫微米之间)产生多种颜色感觉?假如说这是主观改造客观的结果,那么人为什么这样改造而不那样改造,比如令苹果产生不好吃的感觉,令紫外光可见而令自然光不可见?我以为这个问题只有结合进化论才能得到合理解答。我在《美感奥妙和需求进化》一书中阐述了人的各种快感功能(相应香甜美等的快感功能)和各种需求如何如何进化,这本书里,我将以色觉机制为例说明人的获取外界信息的感觉功能如何进化。 Learn how to discern which design patterns and frameworks would work best for your enterprise applicationsIf we blindly used POJOs (plain-old Java objects) and lightweight frameworks, we would be repeating the mistake the enterprise Java community made with EJB (Enterprise JavaBeans). Every technology has both strengths and weaknesses, and it's important to know how to choose the most appropriate one for a given situation. This book is about implementing enterprise applications using design patterns and lightweight frameworks. To enable you to use them effectively in your application, it provides a decision-making framework that consists of five key questions that must be answered when designing an application or implementing the business logic for an individual use-case. By consciously addressing each of these design issues and understanding the consequences of your decisions, you will vastly improve the quality of your application. In this article you will get an overview of those five design decisions. I briefly describe each design decision's options as well as its respective benefits and drawbacks. Business logic and database access decisions The other option is to use POJOs and lightweight frameworks, which I'll refer to as the POJO approach. When using the POJO approach, your business logic consists entirely of POJOs. You use a persistence framework (a.k.a. object/relational mapping framework) such as Hibernate or JDO (Java Data Objects) to access the database, and you use Spring AOP (aspect-oriented programming) to provide enterprise services such as transaction management and security. EJB 3 somewhat blurs the distinction between the two approaches because it has embraced POJOs and some lightweight concepts. For example, entity beans are POJOs that can be run both inside and outside the EJB container. However, while session beans and message-driven beans are POJOs, they also have heavyweight behavior since they can only run inside the EJB container. So as you can see, EJB 3 has both heavyweight and POJO characteristics. EJB 3 entity beans are part of the lightweight approach, whereas session beans and message-driven beans are part of the heavyweight approach. Choosing between the heavyweight approach and the POJO approach is one of the first of myriad design decisions that you must make during development. It's a decision that affects several aspects of the application, including business logic organization and the database access mechanism. To help decide between the two approaches, let's look at the architecture of a typical enterprise application, which is shown in Figure 1, and examine the kinds of decisions that must be made when developing it.
The application consists of the Web-based presentation tier, the business tier, and the persistence tier. The Web-based presentation tier handles HTTP requests and generates HTML for regular browser clients and XML, and other content for rich Internet clients, such as Ajax-based clients (asynchronous JavaScript and XML). The business tier, which is invoked by the presentation tier, implements the application's business logic. The persistence tier is used by the business tier to access external datasources such as databases and other applications. The design of the presentation tier is outside the scope of this article, but let's look at the rest of the diagram. We need to decide the structure of the business tier and the interface that it exposes to the presentation tier and its other clients. We also need to decide how the persistence tier accesses databases, which is the main source of data for many applications. We must also decide how to handle concurrency in short transactions and long-running transactions. That adds up to five decisions that any designer/architect must make and that any developer must know in order to understand the big picture. These decisions determine key characteristics of the design of the application's business and the persistence tiers. There are, of course, many other important decisions that you must make—such as how to handle transactions, security, and caching, and how to assemble the application—but answering those five questions often addresses these other issues as well. Each of the five decisions shown in Figure 1 has multiple options. Each option has benefits and drawbacks that determine its applicability to a given situation. As you will see in this article, each one makes different trade-offs in terms of one or more areas, including functionality, ease of development, maintainability, and usability. Even though I'm a big fan of the POJO approach, it is important to know these benefits and drawbacks so that you can make the best choices for your application. Let's now take a brief look at each decision and its options Decision 1: Organizing the business logic The key decision you must make is whether to use an object-oriented approach or a procedural approach. This isn't a decision about technologies, but your choice of technologies can potentially constrain the organization of the business logic. Using EJB 2 firmly pushes you toward a procedural design, whereas POJOs and lightweight frameworks enable you to choose the best approach for your particular application. Let's examine the options. Using a procedural design An important characteristic of this approach is that the classes that implement behavior are separate from those that store state. In an EJB 2 application, this typically means that your business logic will look similar to the design shown in Figure 2. This kind of design centralizes behavior in session beans or POJOs, which implement the transaction scripts and manipulate "dumb" data objects that have very little behavior. Because the behavior is concentrated in a few large classes, the code can be difficult to understand and maintain.
The design is highly procedural and relies on few of the capabilities of object-oriented programming (OOP) languages. This is the type of design you would create if you were writing the application in C or another non-OOP language. Nevertheless, you should not be ashamed to use a procedural design when it is appropriate. Using an object-oriented design In an object-oriented design, the business logic consists of an object model, which is a network of relatively small classes. These classes typically correspond directly to concepts from the problem domain. As Figure 3 shows, in such a design some classes have only either state or behavior, but many contain both, which is the hallmark of a well-designed class.
An object-oriented design has many benefits, including improved maintainability and extensibility. You can implement a simple object model using EJB 2 entity beans, but to enjoy most of the benefits you must use POJOs and a lightweight persistence framework such as Hibernate and JDO. POJOs enable you to develop a rich domain model, which makes use of such features as inheritance and loopback calls. A lightweight persistence framework enables you to easily map the domain model to the database. Another name for an object model is a domain model, and Fowler calls the object-oriented approach to developing business logic the Domain Model pattern. Table Module pattern |
|
|||||||
|
|