Effective Python (26) — Use multiple inheritance only for mix-in utility classes

Python is an object-oriented language with built-in facilities for making multiple inheritance tractable. However, it's better to avoid multiple inheritance altogether. If you find you yourself desiring the convenience and encapsulation that comes with multiple inheritance, considering writing a mix-in instead. A mix-in is a small class that only defines a set of additional methods … Continue reading Effective Python (26) — Use multiple inheritance only for mix-in utility classes

The Origin of Best Practices

Hacking According to Richard Stallman, hackers have love of excellence and programming in common. The enjoy the creative challenging to overcome technical limitations and achieve things not thought possible before. People who are good at hacking are indispensable in todays technology-driven society. Hacking is a key skill, and we need people who are good at … Continue reading The Origin of Best Practices

Performance of Python Data Structures

It is important for you to understand the efficiency of these Python data structures because they are the building blocks we will use as we implement other data structure in the remainder of the book. Lists The designers of Python had many choices to make when they implemented the list data structure. Each of these … Continue reading Performance of Python Data Structures

Mathematics for 3D Game Programming and Computer Graphics – Vectors

Vectors are of fundamental importance in any 3D game engine. They are used to represent points in space, such as the locations of objects in a game or the vertices of a triangle mesh. They are also used to represent spatial directions, such as the orientation of the camera or the surface normals of a … Continue reading Mathematics for 3D Game Programming and Computer Graphics – Vectors

Mathematics for 3D Game Programming and Computer Graphics – The render pipeline

This chapter provides a preliminary review of the rendering pipeline. It covers general functions, such as vertex transformation and primitive rasterization, which are performed by modern 3D graphics hardware. Readers who are familiar with these concepts may safely skip ahead. We intentionally avoid mathematical discussions in this chapter and instead provide pointers to other parts … Continue reading Mathematics for 3D Game Programming and Computer Graphics – The render pipeline

Getting MEAN – Designing a MEAN stack architecture

A common MEAN stack architecture A common way to architect a MEAN stack application is to have a representational state transfer (REST) API feeding a single-page application (SPA). The API is typically built with MongoDB, Express, and Node.js, with the SPA being built in Angular. The approach is particularly popular with those who come to … Continue reading Getting MEAN – Designing a MEAN stack architecture

Getting MEAN – Introducing full-stack development

The MEAN stack is a pure JavaScript stack comprised of four main technologies, with a cast of supporting technologies: MongoDB — the database Express — the web framework Angular — the front-end framework Node.js — the web server Why the MEAN stack specifically? The MEAN stack pulls together some of the "best-of-breed" modern web technologies … Continue reading Getting MEAN – Introducing full-stack development

日语谓语的各种形态 – “基本形”

动词的“基本形“ 语法解释 “基本形”是动词的基本形式。词典中的词条都使用这一形式。各类动词“ます形”去掉“ます”的形式和“基本形”的关系对应如下: 一类动词:“基本形”最后的发音为“う”段,“ます形”去掉“ます”后的发音为“い”段。 二类动词:“基本形”为“ます形”去掉“ます”后加“る”。 三类动词:“基本形”分别为“来る”和“する”,“ます形”去掉“ます”后则为“来”和“し”。 

日语谓语的各种形态 – 敬体形和简体形

语法解释 在口语里,日语的谓语形式根据说话人和听话人之间的上下关系,亲疏关系的不同而不同。对长辈或关系不太亲密的人使用的形式为敬体形。与此相反,如对方是自己的同辈或晚辈,或关系比较密切时则使用“简体形”。“简体形”是不使用“ます” ”です”的形式。 动词本身就具有“敬体形”和“简体形”,如“〜ます” “〜ません” “〜ました” “ませんでした”等四种礼貌的表达形式即是“敬体形”,而以前所学的动词的“基本形” “ない形” “た形”都属于简体形。但一类形容词、二类形容词和名词本身没有“敬体形”和“简体形”之分,只有在作谓语时,其谓语形式才具有“敬体形”和“简体形”。 动词的简体形  森さんは 毎晩 テレビを 見る。 コーヒー 飲む? ー ううん、飲まない。 昨日 テレビ、 見た? ー ううん、 見なかった。 注意:简体会话中常常省略助词。