3rdstage's Wiki

Gurus and Readings




On Java


  • Constructor
    • The first statement of a constructor body may be an explicit invocation of another constructor of the same class or of the direct superclass.

    • If a constructor body does not begin with an explicit constructor invocation and the constructor being declared is not part of the primordial class Object, then the constructor body implicitly begins with a superclass constructor invocation "super();", an invocation of the constructor of its direct superclass that takes no arguments.

    • source : 8.8.7. Constructor Body of The Java Language Specification of Java SE 8 Edition

Guidelines for Designing API

  • Minimize public members.
  • Prefer stateless over stateful
  • Provide factory, builder, facade or something that acts as an entrance point of the library.
  • Utilize JSR 305 annotations to clearly specify nullness and concurrency constraints.
  • Apply consistent pattern on the choice of primitive or wrapper for the return type and parameter type.
  • Apply consistent pattern on the choice of null or empty collection/array.
  • Apply consistent way to manage configuration.
    • Define and describe the meaning of each configuration item.
  • Consider using with Spring framework.
  • Avoid get or set for the methods that's NOT trivial.
  • Don't miss the Javadoc for non-trivial public methods.
    • Explain boundary conditions, contraints, or exceptional behavior as possible.
  • Use English in the source as possible.

Using Pattern

  • Design Patterns
  • GRASP (General Responsibility Assignment Software Patterns)
  • SOLID (Single responsibility, Open-closed, Liskov substitution, Interface segregation and Dependency inversion)
  • DRY (Don't Repeat Yourself)
  • Divide and Conquer

Core Patterns

  • High Cohesion
  • Low Coupling
  • Don't Talk to Strangers
  • Singleton pattern
  • Factory pattern
  • Builder pattern
  • Adapter pattern
  • Proxy pattern
  • Facade pattern
  • Observer pattern (Listener, Reacter, Callback)
  • Command pattern
  • Strategy pattern
  • Open-closed pattern

Builder Pattern

  • To make a class thread-safe escaping the state change during initializing, you can use *Builder pattern*. By delegating the thread unsafety to the builder object, the product object created by the builder can be thread safe.


  • Immutables are thread-safe and shareable
  • Some mutables can be thread-safe and shareable
    • When the mutables contains only global or shared variables
  • Partially thread-safe

Formatting, conversion and validating of string, number or date type data

Available packages

  • Apache Commons Lang 3
    • Homepage : http://commons.apache.org/lang/
    • API : http://commons.apache.org/proper/commons-lang/javadocs/api-3.3.2/
    • Lang provides a host of helper utilities for the java.lang API, notably String manipulation methods, basic numerical methods, object reflection, concurrency, creation and serialization and System properties. Additionally it contains basic enhancements to java.util.Date and a series of utilities dedicated to help with building methods, such as hashCode, toString and equals.

Available utilities by case

  • String manipulation
    • org.apache.commons.lang3.StringUtils
      • general util. to investigate, join, split, substring or trim string
      • static methods, NullPointerException free
      • API
    • org.apache.commons.lang3.StringEscapeUtils
      • escape or unescape string in terms of HTML, XML, Java, JavaScript or CVS
      • static methods, NullPointerException free and thread-safe
      • API
    • org.apache.commons.lang3.text.WordUtils
      • capitalize, uncapitalize or wrap the string
      • static methods, NullPointerException free
      • API
  • Character manipulation
    • org.apache.commons.lang3.CharUtils
      • static methods, NullPointerException free
      • API
  • Date manipulation and calculation
    • org.apache.commons.lang3.DateUtils
      • java.util.Date type based basic calculations (add/subtract years/months/weeks/days/hours/minutes/seconds)
      • static method, NullPointerException free
      • API
  • Date formatting
    • org.apache.commons.lang3.DateFormatUtils
      • one line formatting
      • static methods, NullPointerException free and thread-safe
      • API
  • String -> Number conversion
    • org.apache.commons.lang3.math.NumberUtils
      • static methods, NullPointerException free, default definable style (like C)
      • API
  • String -> Date validation and conversion
    • org.apache.commons.validator.routines.DateValidator
      • validate and parse string in terms of date
      • API
    • org.apache.commons.validator.routines.TimeValidator
      • validate and parse string in terms of time
      • API
  • String -> Number validation and conversion
    • org.apache.commons.validator.routines.DoubleValidator
      • validate and parse string in terms of double-precision floating-point number(double).
      • API
    • org.apache.commons.validator.routines.FloatValidator
      • validate and parse string in terms of single-precision floating-point number(float).
      • API
    • org.apache.commons.validator.routines.LongValidator
      • validate and parse string in terms of integer in long type.
      • API
    • org.apache.commons.validator.routines.IntegerValidator
      • validate and parse string in terms of integer in int type.
      • API

General data container model

For meta modeling or untyped data transfer object(DTO), general data container model is necessary. A few real world samples are :

  • Open MBean descriptor classes.

On Hadoop

Interesting point

  • Full landscape of Hadoop echo-system and the detailed features of each component in the echo-system
  • Cloudera
    • the features and architectures of service and configuration management tool.

Leading products analysis

Cloudera Manager

  • Features
    • Statement management
      • manage model state(shape) and runtime state
    • Configuration management
    • Process management
    • Software distribution management
    • Management services
      • Metric Collection and Display
      • Health Tests
      • Events and Alerts
  • Interfaces
    • Web based admin tool
    • Java API

Related topics


  • Full list of command line or API in Hadoop
    • especially necessary or deeply related to admin or control the Hadoop system.
  • Running shell script from Java
    • ProcessBuilder in JDK
    • more elegant libraries or wrapper in open-source world ?
  • Distributed agent framework or library in Java
  • Data visualization UI framework or library
    • Especially JavaScript
    • other than D3.js
  • Monitoring and control Zookeeper from the application

On OpenShift






  • Applications, Cartridges, Gears, Nodes
    • What are the cardinalies among concepts
      • application : cartridge = ?
      • cartridge : gear = ?
      • gear : node = ?
    • "By default, for scalable applications, each cartridge resides on its own gears within its own group instance. However, sometimes it is required/preferred to have two cartridges be located together on the same set of gears." -> cartridge (instance) : gear = n : 1
    • Considering domain scope cartridge, application : cartridge = n : m
    • So, an application can be installed on top of multiple gears, and a gear can be involved with multiple applications.
  • Scope of cartridge
    • domain scope cartridge seems to be suitable for shared services such as database and middle-wares.


command action
rhc help command view more information on a specific command.
rhc authorization list view the tokens associated with your account.
rhc apps display information about all the applications you have access to.
rhc app show appName view information about an individual application.
rhc app create appName cartridge [... cartridge] [-n namespace] create an application.
rhc cartridge list view the current list of available cartridges.
rhc cartridge add cartType -a appName add an add-on cartridge to an application.


  • Generally sources on a system consist of several source projects. Then how to map source projects on to applications of OpenShift ?
    • Should consider the source configuration management view-points.
  • Can I use Subversion instead of built-in Git with OpenShift and how can I do that?
  • Can I share one database instance among multiple applications in OpenShift and how can I do that?
    • Generally environment of software development process consist of
      • multiple source projects
      • single database
      • single application server
      • single configuration repository
  • Can I use my own value for $OPENSHIFT_GEAR_UUID ?
  • Is it possible to share Maven local repository among gears ?

Necessary Cartridges

  • Oracle database cartridge
    • domain scope
  • Domain scope MySQL database cartridge
  • Domain scope PostgreSQL database cartridge
  • Jetty cartridge
  • Tomcat cartridge
  • Client env. cartridge
    • contains install script of Eclipse and necessary plug-ins.
  • Source projects cartridge
    • basically multiple source project.
    • should be able to customized on the number and names of source projects at cartridge install time.


On Hyperledger Fabric

  • Fabric CA
    • 기본 설치 및 설정
    • TCert, ECert 발급
    • 인증서 갱신/재발급
    • CA Server Clustering
    • LDAP 연계
  • Fabric Network/Channel
    • Fabric Peer 기본 설치/설정/구동
    • Fabric Orderer 기본 설치/설정/구동
    • Channel 설계/적용
    • Endorsement Policy 설계/적용
    • CouchDB 적용/최적화
    • Kafka 적용/최적화
    • Fabric Orderer Clustering
    • TLS 적용
    • Docker Swarm 구성
    • Kubernete 구성
    • ELK Stack 기반 Log 분석
    • Gossip Protocol 분석
    • gPRC 분석
    • Transaction Tracing
  • 성능/가용성 테스트
    • JMeter 기본 테스트 방안
    • JMeter 분산 테스트 방안
    • 시스템 자원사용율 모니터링 - CPU
    • 시스템 자원사용율 모니터링 - Memory
    • 시스템 자원사용율 모니터링 - Network I/O
    • 시스템 자원사용율 모니터링 - Disk I/O
    • 서버 자원사용율 모니터링 - Fabric Peer
    • 서버 자원사용율 모니터링 - Fabric Orderer
    • 서버 자원사용율 모니터링 - Kafka
    • 서버 자원사용율 모니터링 - CouchDB
    • Go Profiling 적용
    • Go Debugging 적용
    • 표준 성능테스트 케이스 정의
    • 표준 가용성테스트 케이스 정의
  • 20 Node Test Network
    • 기본 구성 (LevelDB, Solo Orderer, No TLS)
    • 기본 구성 성능테스트
    • CouchDB 적용 성능테스트
    • Production 구성 (CouchDB, Clustered Orderer, TLS)
    • Production 구성 성능 테스트
    • Production 구성 가용성 테스트
  • 100 Node Test Network
    • 시스템 구성 설계
    • 장비 구성
    • 구축 (CouchDB, Clustered Orderer, TLS)
    • 성능 테스트
    • 가용성 테스트

Provisioning scripts design

  • Use JSON format metadata.
  • Use GNU parallel.
  • Use headquarter-station pattern.
  • Minimize file transfer.
  • Confirm pre-conditions and post-conditions.
  • Generate final report including architecture and useful endpoints of the network or cluster.

Architecture decision

  • What is the optimal ratio between Orders, Leader Peers and Nonleader Peers ?
  • What is the optimal values of block creation criteria ?
  • How to optimize the connection or link between Peer container and CouchDB container on the same host machine ?
  • What is the optimal values of gossip communications ?
  • How to optimize CouchDB ?
  • How to optimize Kafka ?
  • How to measure and optimize the network performance between machines ?
  • How to measure and optimize the disk I/O performance of machines ?

On OpenCV

IplImage Anatomy

  • Definition
typedef struct _IplImage {
    int             nSize;              /* size of iplImage struct         */
    int             ID;                 /* version                         */
    int             nChannels;
    int             alphaChannel;
    int             depth;              /* pixel depth in bits             */
    char            colorModel[4];
    char            channelSeq[4];
    int             dataOrder;
    int             origin;
    int             align;              /* 4 or 8 byte align               */
    int             width;
    int             height;
    struct _IplROI *roi;
    struct _IplImage
                   *maskROI;            /* poiner to maskROI if any        */
    void           *imageId;            /* use of the application          */
      _IplTileInfo *tileInfo;           /* contains information on tiling  */
    int             imageSize;          /* useful size in bytes            */
    char           *imageData;          /* pointer to aligned image        */
    int             widthStep;          /* size of aligned line in bytes   */
    int             BorderMode[4];      /*                                 */
    int             BorderConst[4];     /*                                 */
    char           *imageDataOrigin;    /* ptr to full, nonaligned image   */
} IplImage;
  • Member priority
    • 1st : width, height,
    • 2nd : depth, nChannels
    • 3rd : origin, dataOrder
  • Constants for depth
Macro Value Type Mat Equivalence Mat Value
IPL_DEPTH_8U 8 unsigned 8-bit integer CV_8U 0
IPL_DEPTH_8S signed 8-bit integer CV_8S 1
IPL_DEPTH_16U 16 unsigned 16-bit integer CV_16U 2
IPL_DEPTH_16S signed 8-bit integer CV_16S 3
IPL_DEPTH_32S signed 32-bit integer CV_32S 4
IPL_DEPTH_32F 32 single-precision floating-point number CV_32F 5
IPL_DEPTH_64F 64-bit floating-point double-precision CV_64F 6
  • Constants for origin
Constants Meaning
IPL_ORIGIN_TL top-left origin
IPL_ORIGIN_BL bottom-left origin (Windows bitmap style)


On Red5


RTMPClient.connect(String host, int port, String app, IPendingServiceCallback connectCallback)
-> RTMPMinaIoHandler.messageSent(IoSession session, Object message)  (message = HeapBuffer[03 00 ...])
-> RTMPMinaIoHandler.messageReceived(IoSession session, Object message)   (message = HeapBuffer[...])
-> RTMPMinaIoHandler.messageSent(IoSession session, Object message)   (message = HeapBuffer[07 E8 ...])
-> RTMPClient.connectionOpened(RTMPConnection conn)
-> RTMPMinaIoHandler.messageSent(IoSession session, Object message)   (message = Packet[[header data type=20, ...] ...])
-> RTMPMinaIoHandler.messageReceived(IoSession session, Object message)   (message = Packet[[header data type=5, ...] ...])
-> RTMPMinaIoHandler.messageReceived(IoSession session, Object message)   (message = Packet[[header data type=6, ...] ...])
-> RTMPMinaIoHandler.messageReceived(IoSession session, Object message)   (message = Packet[[header data type=20, ...] ...])
-> connectCallback.resultReceived(IPendingServiceCall call)   (call.getServiceMethodName() = "connect")
-> RTMPMinaIoHandler.messageReceived(IoSession session, Object message)   (message = Packet[[header data type=4, ...] ...])
-> RTMPMinaIoHandler.messageSent(IoSession session, Object message)   (message = Packet[[header data type=4, ...] ...])

RTMPConnection.invoke("createStream", null, createStreamCallback)
-> BaseRTMPClientHandler.invoke("createStream", null, createStreamCallback)
-> RTMPConnection.invoke("createStream", null, createStreamCallback)
-> RTMPConnection.invoke(new PendingCall("createStream", null))
-> RTMPConnection.invoke(new PendingCall("createStream", null), 3)
-> RTMPConnection.getChannel(3).write(new Invoke().setCall(new PendingCall("createStream", null)))

On VirtualBox

Tips for CentOS on VirtualBox

  • Absolutely install the guest addition.
  • Use F10 for the Host Key.
    • [VirtualBox Manager > File > Preference > Input > Virtual Machine > Host Key Combination]
  • Make Mini ToolBars visible as possible
    • [Virtual Machine > Machine > Settings > General > Advanced > Mini ToolBars]
      • check "Show in Fullscreen/Seamless"
      • check "Show at Top of Screen"
    • Use "Seamless Mode" as possible
    • [Virtual Machine > View]

On Docker

Key Concerns

  • How to manage configuration per installation/instance, operation ?
  • How to manage logs ?
  • How to manage application deployments ?
  • How to manage persistent data ?
  • How to debug or monitor application in container ?
  • How to provide or access development tools ?
  • How to make containers collaborate or bind containers ?

Strategys and Tactics

  • Include development tools and environment into the docker image for developer local.
  • Make working copy of source code in local stored externalized storage or shared folder.
  • Externalize configuration. (using what ?)
  • Separate docker image from application source.
    • Make docker image which can clone, build and deploy an application in some predefined format from source repository.
  • Make and enhance own management service for pods, containers and so on.

On Redmine


Target files

  • page template : $REDMINE_HOME/app/views/layouts/base.html.erb
  • initial page : $REDMINE_HOME/app/views/welcome/index.html.erb
  • i18n message bundle : $REDMINE_HOME/config/locales/*.yml
  • default style : $REDMINE_HOME/public/stylesheets/application.css

Custom style

body {
  font-family: "맑은 고딕", Georgia, Verdana, sans-serif;
  font-size: 1.0em; 
pre, code, tt {
div.wiki.wiki-page, div.wiki.wiki-page pre, div,wiki.wiki-page code{
  font-size: 1.0em; 

  border:thin solid lightgray;
  line-height:1.5 !important;
div.syntaxhighlighter div.line{
  line-height:1.5 !important;

div#header > h1 {
  font-family:Georgia, Tahoma, Verdana, serif;
div#sidebar { 
  width:15% !important;
div#content {
  margin-right:17% !important;

@media screen and (min-width:1024px){
  div#wrapper { width:90%;max-width:1600px;min-width:1000px }

/* styles for Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: "맑은 고딕", Helvetica, "Trebuchet MS", Verdana;
  -webkit-font-smoothing: antialiased;

div.wiki.wiki-page h2, div.wiki.wiki-page h3, div.wiki.wiki-page h4, div.wiki.wiki-page h5, div.wiki.wiki-page h6{

h2, div.wiki h1, div.wiki.wiki-page h1 {font-size: 1.5em;}
h3, div.wiki h2, div.wiki.wiki-page h2 {font-size: 1.4em;}
h4, div.wiki h3, div.wiki.wiki-page h3 {font-size: 1.3em;}
h5, div.wiki h4, div.wiki.wiki-page h4 {font-size: 1.2em;}
h6, div.wiki h5, div.wiki.wiki-page h5 {font-size: 1.15em;}
.wiki h6, div.wiki.wiki-page h6 {font-size: 1.1em;color:black; }
#sidebar h3 {
  font-family: "맑은 고딕", Georgia, Verdana, sans-serif;
  font-size: 1.0em;   

div.wiki {

div.wiki h1 {
div.wiki h1:before {
div.wiki h2 {
div.wiki h2:before {
  content: counter(step-for-h2) ". ";
div.wiki h3 {
div.wiki h3:before {
  content: counter(step-for-h2) "." counter(step-for-h3) ". ";
div.wiki h4{
div.wiki h5{
div.wiki h6{
/* end of styles for Headings */

/* styles for Table */
div.wiki.wiki-page td, div.wiki.wiki-page th  {
  padding:4px 2px 4px 2px;
/* end of styles for Table */

/* styles for Form elements */
input, textarea, select {
  /* font-family: "맑은 고딕", Georgia, Verdana, sans-serif; */
/* end of styles for Form elements */

/* styles for menu */
#top-menu { font-size:1.0em; }
#top-menu li a { font-size:0.9em; } 
#top-menu li a, #main-menu li a { font-size:0.9em; }
#top-menu #loggedas { font-size:0.9em; }
/* end of styles for menu */

/* styles for TOC table */
div.wiki.wiki-page ul.toc { padding:0.5em; margin:0 0 0 0.5em }
div.wiki.wiki-page ul.toc li { font-size: 13px; }
div.wiki.wiki-page ul.toc li li { margin-left:0.9em }
/* end of styles for TOC table */

On TestLink



  • TestLink 1.9 needs PHP 5.2 or 5.3, MySQL database 4.1.x or higher, and Apache web server 2.x.
  • All of these can be prepared in oneshot using EasyPHP.


  1. Download "EasyPHP 12.0 with PHP 5.2.17" from www.easyphp.org/download.php
    • Other than version 1.9 of TestLink, refer the installation guide or something like that to confirm the exact dependency of TestLink
  2. Run the setup executable
    • EasyPHP installation file is in forms of exe file like EasyPHP-12.0_with_PHP-5.2.17-setup.exe
  3. Follow the instructions and specify the installation directory.
    • All the files for PHP, Apache httpd server, MySQL database and those related files will be located under the specified directory.
    • For windows, c:\servers\EasyPHP-12.0 would be proper and avoid to include white-space in the path like "c:\Program Files\EasyPHP-12.0"
  4. Check the installation directory
    • After the installation completed, you can see the following files or directories under the directory you specified during installation. Exact list could be different depending on the version and edition of EasyPHP
c:\servers\EasyPHP-12.0\ ----+--- apache\
                             |--- conf_files\
                             |--- home\
                             |--- modules\
                             |--- mysql\
                             |--- php\
                             |--- tmp\
                             |--- www\
                             |--- xdebug\
                             |--- EasyPHP-12.0.exe
                             |--- easyphp.ini
                             |--- EasyPHP.log
                             |--- gpl.txt
                             |--- langues.txt
                             |--- readme.txt
                             |--- unins000.dat
                             +--- unins000.exe
  1. Run the EasyPHP and check around
    • To run EasyPHP, execute the short cut of [Start > Programs > EasyPHP 12.0 > EasyPHP 12.0]
    • Easy PHP will run Apache web server, MySQL database and make an icon appear on the right/bottom side of the Windows task bar nearby clock. The icon is like black lower-case alphabet "e", When you click the right mouse button on the icon, you can see meues like 'Help', 'Log Files', 'Configuration', 'Explorer', 'Administration', and so on. For more on these menus, refer http://www.easyphp.org/introduction.php

On Solidity


The return of solc.compile function

After the following code executed

var output = solc.compile(data, 1)

The structure of output

"output" : {
   "contracts" : {
      contractName : {
         "assembly" : Object,
         "bytecode" : string,
         "functionHashes" : Object,
         "gasEstimates" : Object,
         "interface" : JsonArray,
         "metadata" : Json,
         "opcodes" : string,
         "runtimeBytecode" : string,
         "srcmap" : string,
         "srcmapRuntime" : string
      formal : {
         "errors" : {
            errorNo " string
      "sourceList" : Object,
      "sources" : Object

Smart Contract

  • Account White List
  • Whitelisted Token
  • Distingushiable Account
  • Distingushiable Polling

On Ethereum Signing

  • Signing of DSA
    • when message m is given
    • compute r from a random number k
    • compute s from the random number k, private key, hashed message(hash(m)) and r
    • signature : (r, s)
  • Signing of ECDSA
    • when message m is given
    • select a random number k
    • compute a point (x1, y1) from the curve with the random number k
    • compute r from x1
    • compute s from the random number k, private key, hashed message(hash(m)) and r
  • Signature doesn't have original message or hash of the message.
  • To verify the signature, the original message or hash of the message is necessary.

Using Python

def _recover_hash(self, message_hash, vrs=None, signature=None):
    hash_bytes = HexBytes(message_hash)
    if len(hash_bytes) != 32:
        raise ValueError("The message hash must be exactly 32-bytes")
    if vrs is not None:
        v, r, s = map(hexstr_if_str(to_int), vrs)
        v_standard = to_standard_v(v)
        signature_obj = self._keys.Signature(vrs=(v_standard, r, s))
    elif signature is not None:
        signature_bytes = HexBytes(signature)
        signature_bytes_standard = to_standard_signature_bytes(signature_bytes)
        signature_obj = self._keys.Signature(signature_bytes=signature_bytes_standard)
        raise TypeError("You must supply the vrs tuple or the signature bytes")
    pubkey = signature_obj.recover_public_key_from_msg_hash(hash_bytes)
    return pubkey.to_checksum_address()

Code Samples

  • Recovering address from the message and signature using wweb3.js (web3.eth.sign() and web3.eth.personal.ecRecover())
truffle(rinkeby)> accounts[0]
truffle(rinkeby)> signature=await web3.eth.sign("We built this city.", accounts[0])
truffle(rinkeby)> signature
truffle(rinkeby)> acct=await web3.eth.personal.ecRecover("We built this city.", signature)
truffle(rinkeby)> acct

Using JavaScript

On Ethereum Layer 2


  • ZK-Rollups are one of the options being developed for layer 2 construction that increases scalability through mass transfer processing rolled into a single transaction.
  • Creating zero knowledge proofs requires a large amount of computing power.
  • The latency to block confirmation will increase because the SNARK proof will be delayed by a number of blocks.


  • This is sometimes referred to as a two-way peg. Since chains are independent of one another, resources are typically locked on one chain and minted(created) on another. When they are transferred back, they are burned(destroyed) and unlocked.

2-Way Peg


  • Required features for assets
    • offer/bidding
    • lend/borrow
    • buy/sell
    • complex assets
    • handprinting, tickering - my asset
    • temporary, expiry
    • locked
    • categorized
    • creator signature

>> Auction

On System Management

Production Systems Management Considerations

  • Don't use SSH users same with those on development or test environment.
  • Don't use SSH key/cert same with those on development or test environment.
  • Don't use sudoers
  • Don't use default port for system softwares or middle-wares.
  • Don't use default account for system softwares or middle-wares.
  • Close unnecessary ports.

On Blogging

Service Description Cost Remarks
Ghost Not Free

On Finance

Concept Description Remark
Leverage any technique involving the use of debt (borrowed funds) rather than fresh equity in the purchase of an asset, with the expectation that the after-tax profit to equity holders from the transaction will exceed the borrowing cost, frequently by several multiples⁠.
Margin collateral that the holder of a financial instrument has to deposit with a counterparty (most often their broker or an exchange) to cover some or all of the credit risk the holder poses for the counterparty.
Position the amount of a particular security, commodity or currency held or owned by a person or entity. long position, short position, derivatives trading
Arbitrage the practice of taking advantage of a price difference between two or more markets
Fungibility the property of a good or a commodity whose individual units are essentially interchangeable, and each of its parts is indistinguishable from another part. company shares, bonds, precious metals, currencies
Entry Meaning Position Korean
Debit a transfer of value to that account right side 차변
Credit a transfer of value from the account left side 대변

Financial Instrument

  • Financial instrument
    • monetary contracts between parties which can be created, traded, modified and settled.
Instrument Description Remark
Bond an instrument of indebtedness of the bond issuer to the holders. debt security
Loan the lending of money by one or more individuals, organizations, or other entities to other individuals, organizations etc.
Deposit any other type of bank account that allows money to be deposited and withdrawn by the account holder.


In finance, margin is the collateral that a holder of a financial instrument has to deposit with a counterparty (most often their broker or an exchange) to cover some or all of the credit risk the holder poses for the counterparty.

  • What Is Margin Trading? (13.01.2020)
    • This ability to expand trading results makes margin trading especially popular in low-volatility markets, particularly the international Forex market. Still, margin trading is also used in stock, commodity, and cryptocurrency markets.
  • Margin (Jun 25, 2019)
  • Leverage (Mar 19, 2021)


initial margin              : A
initial margin-equity ratio : x  (예. 1.5, 2, ... 10)
equity drop ratio           : y   (예. 0.1, 0.2, ...)
loss                        : A * x * y
revised margin              : A * (1 - y)

margin-call at : loss = revised margin ---> A * x * y = A * (1 - y) ---> y = 1/(x + 1)
Concept Formula Remarks
Initial : initial price, margin
: initial value(volume)
: leverage factor
Current  : current price
: current value(volume)
: price delta (= )
Loss Limit
: threshold price
: minimum factor (< )
Concept Formula Remarks
: margin
: initial volume(value)
: borrowed
: initial margin requirement
Current : current price
Loss Limit

: minimum(maintenance) margin requirement
: threshold price (margin call)


Credit Card


Glossary Description Remarks
Reserve Price The minimum amount that a seller will accept as the winning bid Reservation Price
Blind Auction All bidders simultaneously submit sealed bids so that no bidder knows the bid of any other participant. FPSBA(First-Price Sealed-Bid Auction)
Bid Price a price for which somebody is willing to buy something, whether it be a security, asset, commodity, service, or contract. offered price, ask price

On Healthcare

Item Description Remarks
HL7 (Health Level 7) a set of international standards for transfer of clinical and administrative data between software applications used by various healthcare providers.
FHIR (Fast Healthcare Interoperability Resources) a standard describing data formats and elements (known as "resources") and an API for exchanging electronic health records (EHR)
SNOMED (Systematized Nomenclature of Medicine) a systematic, computer-processable collection of medical terms, in human and veterinary medicine, to provide codes, terms, synonyms and definitions which cover anatomy, diseases, findings, procedures, microorganisms, substances, etc.




Resource Description Remarks
MedicationRequest An order or request for both supply of the medication and the instructions for administration of the medication to a patient.
a single medication.
medication prescription, medication order
MedicationAdministration Describes the event of a patient consuming or otherwise being administered a medication.
  • Indicates that a medication product is to be or has been dispensed for a named person/patient.
  • the result of a pharmacy system responding to a medication order.
DiagnosticReport the set of information that is typically provided by a diagnostic service when investigations are complete.


File abstraction

  • path, directory, name, extension
    • path = directory + file-separator + name + '.' + extension
  • full-name = path
  • short-name = name + '.' + extension
  • Samples
    • c:\windows\system32\kernel32.dll
      • path : c:\windows\system32\kernel32.dll
      • directory : c:\windows\system32
      • name : kernel32
      • extension : dll

Message scheme

General message header

Item Meaning Value Space Remarks
Start of message
Message type the unique identifier for this type of message

Message mapping

  • Mapping rules
    • unit rules
      • concatenation
        • concatenation of <emp>n</emp> items of source
      • split
        • split by index
        • split by delimiter
      • replacement
      • formatting
        • pre defined formatting
        • user defined formatting using formatt pattern
      • format conversion
        • pre defined conversion : eg) 2013/01/01 -> 2013-01-01
        • user defined - is it possible ?
        • two step : unformat and apply new format
      • arithmetic calculations
        • addition of two items
        • subtraction of two items
        • multiplication of item and constant number
        • division of item
      • logical calculations
      • code to code conversion
      • to boolean conversion : different from logical calculation ?
      • regex conversion : ?
    • combined rules
    • free-form using expression directly
      • how to validate
  • Mapping rule unit test case

Things you MUST know about DEBUGGING

  • Eclipse debugger
    • How to setup debugging.
      • on server-side
      • on Eclipse
    • How to start debugging.
      • when launched by Eclipse
      • when externally launched.
    • How to make or delete break point.
    • How to view static fields in the Variables view.
    • How to view inherited fields in the Variable view.
    • How to view only logical structure of collection or map objects.
    • How to use Display view.
    • What is stack trace and how to trace it.
    • How to move forward.
      • resume, step into, step over, step return
    • How to list breakpoints while debugging
    • How to config debugging step filter.
    • How to config debugging stack filter. Is it possible?
    • How to change variable value and execute forward while debugging.
    • How to add or remove breakpoints on-the-fly (while debugging).

General strategy and tactics on development environment

Source projects

  • Concepts
    • portfolio = product+
    • product = module+
      • module ~ package
    • module = class+, resource+
  • Tactics
    • Construct source project per module not product.
    • Construct source repository per product.
      • Do not ...
      • Dependencies among products should be defined on binary repository, not source repository of dependent products.
    • The structure of trunk and tag or release directory in source repository.
    • Eclipse launcher and configuration
      • eclipse.bat and eclipse.ini under the trunk or the tag/0.0.0 directory.
    • Readme files
      • under the trunk or the tag/0.0.0 directory for Readme on scale of product.
      • under the per module Eclipse project directory for Readme on scale of module.
      • contents
        • requirement on environment. specially necessary environment variables and their meaning.

Configuration management

  • Naming environment variables, configuration property or variable placeholder
    • an item (environment variable or configuration property) whose value is a directory should have a name that ends in _DIR or .dir and the value should have a trailing slash.
    • an item whose data-type is boolean should have a name that includes ....
      • example ; ALLOWS_DELETE

Software Distributable Packaging

Concepts and terms

  • source, binary, resource
  • library, runtime
  • file types
    • C/C++ : *.lib, *.dll, *.pdb, *.h
    • Java : *.jar

Directory layout of deployed

UI(User Interface) design

  • Delete or Reset action should be reconfirmed by the user.
  • Internatiolization(i18n) or Localization(l10n) should be applied intrinsically for buttons, labels and titles.

Software development guideline

  • Guides source project layout
  • Guides selection of programming languages, software frameworks, and development tools
  • Guides coding convention
  • Guides design patterns and common libraries
  • Guides software build and packaging
  • Guides unit testing
  • Guides debugging
  • Guides static code analysis
  • Guides technical documentation
  • Provides boilerplate or scaffold artifacts

Blogging Service

Service Cost Description Remarks
WordPress Free
Blogger Free Goggled
Medium Free/Paid
Tumblr Free
Ghost Paid

PC Optimization

  • Disable services
  • Disable auto-starts
  • Disable auto-updates
    • Google auto-update
    • Notepad ++ auto-update
    • Hancom auto-update