從八個刻度了解文化的多樣性

  • 低情境:精確、簡單、清楚。按字面意思表達及解讀訊息。只要有助於釐清溝通,複述可被讚許。
  • 高情境:深奧、細膩、多層次。傳達和接收訊息都在字裡行間。訊息通常是隱晦的,不直接表達。
  • 直接否定:直接、坦率且誠實。否定訊息單獨呈現,不會使用積極正向訊息加以軟化。經常使用絕對性描述字眼(完全不適合、徹底不專業)。可能會在一群人面前批評一個人。
  • 間接否定:柔軟、隱約、委婉。會使用正向積極訊息來包裝否定訊息。經常使用修飾性的描述字眼(有點不適合、略為不專業)。只在私底下給予批評。
  • 原理優先:陳述一項事實、論述或意見之前,先發展理論或綜合概念。偏好在推演得出結論之前,先建構理論論點,由此而來發布訊息或報告。重視每個情境背後的概念性原理。
  • 應用優先:從一項事實、論述或意見開始,之後再加入概念作為支援,或在有需要時做結論說明。偏好在發布訊息或報告前,先來個執行摘要或重點提示。以實際、具體的方式展開討論。避免在企業環境裡進行理論或哲理方面的討論。
  • 平權式:老闆與下屬之間的理想距離偏低。最佳的上司:關係平等的人群之間的協調者。組織架構是扁平式的,經常越級溝通。
  • 階級式:老闆與下屬之間的理想距離偏高。最佳的上司:在前方帶領強而有力的指引者。組織架構式多層級且固定不變的,通常是依照既定階級排序溝通。
  • 共識型:以群體一致達成協議來制定決策。
  • 由上而下:決策是由個人制定(通常是老闆)
  • 任務導向:信任透過商業相關活動而建立。工作關係容易建立也容易割捨,端視當時局勢的實際面而定。你工作始終表現良好,你可以被信任,我喜歡與你工作,我信任你。
  • 關係導向:信任是透過一起吃飯、夜間共遊、一同去投咖啡自動販賣機而建立。工作關係的建立緩慢又漫長。我深入了解你是怎樣的一個人,我與你共享私人時光,我認識的熟人相信你,我信任你。
  • 對峙:異議與辯論隊團隊或組織來說是正面的。公開對峙是洽當的,對關係不會產生負面影響。
  • 避免對峙:異議與辯論對團隊或組織來說是負面的。公開對峙是不洽當的,會破壞群體和諧或對關係產生負面影響。
  • 線性時間:計畫步驟是依順序進行,一項工作結束才開始下一項 。一次做一件事,不能中斷。關注重點在截止期限,堅守時程表。組織編制>靈活性
  • 彈性時間:計畫步驟是以流動不定的方式進行,當機會出現時就改變任務。許多事情都是立刻處理,可以中斷。靈活性>組織編制

Tessellation is the process of rendering pipelines that can divide the polygon on the GPU side.


This is an example show that how to use post-processing to create the star glow effect.

ApplyBrightnessEffect(src, brightness);
ApplyBlurEffect(brightness, blur1, blur2, composite);
CompositeEffect(src, dst, composite);

The overall idea could be summarized as the following steps:

  1. Extract bright regions that are above a certain threshold
  2. Apply blur effect along the star streak direction
  3. Combine all the blur images together as a composite image
    Blend OneMinusDstColor One
  4. Combine the composite image with the original image

The blurred image along is computed as :

for (int j = 0; j < 4; j++) {
color += saturate(tex2D(_MainTex, uv) * pow(_BlurAttenuation,
i.power * j));
uv += i.offset;
}

where we define the offset as :

var glowAngle = anglePerDivision * i + glowAngleOffset;
var blurOffset = (Quaternion.AngleAxis(glowAngle, Vector3.forward) * Vector2.up).normalized;
offset = _MainTex_TexelSize.xy * _BlurOffset * o.power;

前言

  • 獲利性分析: 是否穩定賺錢
  • 安全性分析: 體質是否安全
  • 價值評估: 股價是否便宜
  • 成長性分析: 是否具備短期成長動能
  • 獲利性分析: 穩定獲利的原因為何
  • 安全性分析: 安全性高的原因為何
  • 價值評估: 公司價值真的被低估了嗎
  • 成長性分析: 公司短期成長動能為何

獲利性分析

  • 毛利率: 公司產品本身競爭力(製造業)
    毛利 = 營收–營業成本(產品直接相關支出,原料/設備折舊/薪資)
  • 營業利益率: 公司本業經營狀況(腦力密集產業)
    營業利益 = 毛利 – 營業費用(產品間接相關支出,管理/銷售/研發費用)
  • 淨利率: 公司最終獲利情形(一般是一次性)
    淨利 = 營業利益 – 業外損益/稅額 + 業外獲利
  • 商業循環 = 存貨循環+應收款循環

存貨循環 (存貨周轉天數): 進貨 → 製造 → 銷售

存貨周轉率 = 營業成本/平均存貨 …

The followings are all the bad things and should be avoided in programming.

Comments

  1. Inappropriate Information (meta-data such as authors, last-
    modified-date, SPR number, and so on)
  2. Obsolete Comment
  3. Redundant Comment
  4. Poorly Written Comment
  5. Commented-Out Code

Environment

  1. Build Requires More Than One Step
  2. Tests Require More Than One Step

Functions

  1. Too Many Arguments (< 3)
  2. Output Arguments
  3. Flag Arguments (function does more than one thing)
  4. Dead Function (not used function)

General

  1. Avoid Multiple Languages in One Source File
  2. Avoid Obvious Behavior Is Unimplemented
  3. Avoid Incorrect Behavior at the Boundaries (Don’t rely on your intuition)
  4. Avoid Overridden Safeties
  5. Avoid Duplication (TEMPLATE METHOD, or STRATEGY pattern)

Why Concurrency?

  • Decoupling: what gets done and when it gets done
  • Improve the throughput and structure of the system
  • Concurrency improves performance only when there is a lot of wait time
  • Required a fundamental change in design strategy
  • Bugs usually aren’t repeatable
  • Complex
  • Incurs some overhead (in performance and writing additional code)

Concurrency Defense Principles

  • Concurrency-related code
    1. Has its own life cycle of development, change, and tuning
    2. Has its own challenges, different from, often more difficult than single
    3. Miswritten makes it challenging enough without the added burden of surrounding application code
  • Keep your concurrency-related code separate from other code
  • synchronized keyword
  • Take…

Getting Clean via Emergence Design

• Runs all the tests
• Contains no duplication
• Expresses the intent of the programmer
• Minimizes the number of classes and methods

Simple Design Rule 1: Runs All the Tests

  • A system that is comprehensively tested and passes all of its tests all of the time is a testable system.
  • A system that cannot be verified should never be deployed

Simple Design Rule 2: No Duplication

  • Duplication is the primary enemy of a well-designed system
  • Duplication: Lines of code that look exactly alike are
  • TEMPLATE METHOD
public void accrueVacation() {
calculateBaseVacationHours();
alterForLegalMinimums();
applyToPayroll();
}
private void calculateBaseVacationHours() { /* ... */ };
abstract protected void alterForLegalMinimums();
private void applyToPayroll() { /* ... */ }…

Class Organization

  • Class: a list of variables (public static constants → private static variables → private instance variables)
  • There is seldom a good reason to have a public variable
  • Functions: public function → private utilities (stepdown rule)
  • maintain privacy but in some case protected (accessible for testing)

Classes Should Be Small!

  • The primary rule of designing classes: smaller (with respect to responsibility)
  • The name of a class should describe what responsibilities it fulfills → concise name (bad: Processor or Manager or Super)
  • Brief description of the class in about 25 words without IF, AND, OR, BUT
  • Classes should have one responsibility — one reason to change

Question Kid

An interactive engineer based in Tokyo. CG/Unity/Coding/Book Review

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store