Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Code Quality - Portability

Code Quality - Portability

Yohei Yasukawa

October 07, 2013
Tweet

More Decks by Yohei Yasukawa

Other Decks in Technology

Transcript

  1. • ۩ମྫ: The application or code that can • run

    on both Win & Unix. • run on both Pentium & SPARC • be compiled by both Intel & GNU CC • work on both Win GUI and X Window System • be displayed both English and Japanese • work on both SCSI & SATA Ҡ২ੑͷ໰୊
  2. 6.1. OS • ͱ͸͍͑ɼֵ৽తͳػೳ΋࢖͍͍ͨ. ඪ४తͳํ๏Ͱ͸࣮ݱͰ͖ͳ͍ػೳ΋͋Δ: • Web Server, DB Engine,

    Game, etc... for: • Thread, Lock, Devise Driver, Network. • “ඞཁͱ͞ΕΔશػೳ͕ POSIX ඪ४...!!”
  3. 6.1. OS • όΠφϦϑΝΠϧ΋҆৺Ͱ͖ͳ͍: • όʔδϣϯ͕ҟͳΔͱਖ਼͘͠ಈ࡞͠ͳ͍͜ͱ΋: • syscallͷҾ਺, ߏ଄ମ, ڞ༗ϥΠϒϥϦ,

    etc. • e.g. PhantomJS ͸ίϯύΠϧʹ̏̌෼͔͔Δ. • → όΠφϦͰ༻ҙͪ͠Ό͑. • → OS/Arch͕ҧ͏ͱ (౰વ) “invalid hogehoge...” • ରࡦ:ޓ׵ϨΠϠͰFoo OS͕ظ଴͢Δܗࣜʹม׵.
  4. 6.2. HW & Proc. Arch. • ϢʔβϓϩάϥϜ͸ (ཧ࿦্) ϓϩηοαΞʔΩς Ϋνϟͷ૬ҧʹ͸ແԑ...???

    • ϝϞϦ্ͰͲͷΑ͏ʹॲཧ͞ΕΔ͔ʹؔͯࠜ͠ڌ ͷͳ͍ԾఆΛஔ͘ϓϩάϥϜ͕গͳ͘ͳ͍. • e.g. ςετͷߴ଎Խɼεϫοϓɼฏߦॲཧ. • ΋͔ͯ͠͠: ҉໧ͷԾఆΛஔ͍͍ͯΔ...?