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

Developer Guide to Migrate Across Galaxies

Developer Guide to Migrate Across Galaxies

Presentation given in App Builders 2017, Lausanne, Switzerland.

Speech:
https://akos.ma/blog/the-developer-guide-to-migrate-across-galaxies/

Adrian Kosmaczewski

April 25, 2017
Tweet

More Decks by Adrian Kosmaczewski

Other Decks in Technology

Transcript

  1. "In our industry, every technology generates what I call a

    “galaxy.” These galaxies feature stars but also black holes; …
  2. …meteoric changes that fade in the night, many planets, only

    a tiny fraction of which harbour some kind of life, and lots of cosmic dust and dark matter."
  3. 42.

  4. <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <munder> <mo form="prefix" movablelimits="true">lim</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi>

    <mo stretchy="false">&#x2192;<!-- → --></mo> <mi mathvariant="normal">&#x221E;<!-- ∞ --></mi> </mrow> </munder> <mfrac> <mn>1</mn> <mi>k</mi> </mfrac> <mo>=</mo> <mn>0.</mn> </math>
  5. "In earlier version of Visual Basic, functions without a "Return"

    statement just "Return None", without any kind of compiler warning (or error)…
  6. Class Customer Private m_CustomerName Private Sub Class_Initialize m_CustomerName = ""

    End Sub ' CustomerName property. Public Property Get CustomerName CustomerName = m_CustomerName End Property Public Property Let CustomerName(newValue) m_CustomerName = newValue End Property End Class Dim cust Set cust = New Customer cust.CustomerName = "Fabrikam, Inc." Dim s s = cust.CustomerName MsgBox (s)
  7. "the ASP server is multithreaded and assigns a different thread

    to each page request (…). VBScript class instances (…) must run on the thread that created them."
  8. "(…) VBScript classes are merely a way to group data

    and the operations on the data together to improve encapsulation."
  9. Option Explicit Dim MyVar MyVar = 10 ' ... and

    your code explodes (because not declared)! MyInt = 10
  10. !.

  11. !.

  12. !.

  13. exampleWithNumber: x | y | true & false not &

    (nil isNil) ifFalse: [self halt]. y := self size + super size. #($a #a "a" 1 1.0) do: [ :each | Transcript show: (each class name); show: ' ']. ^x < y
  14. ABI

  15. HRESULT CMyMAPIObject::QueryInterface (REFIID riid, LPVOID * ppvObj) { // Always

    set out parameter to NULL, validating it first. if (!ppvObj) return E_INVALIDARG; *ppvObj = NULL; if (riid == IID_IUnknown || riid == IID_IMAPIProp || riid == IID_IMAPIStatus) { // Increment the reference count and return the pointer. *ppvObj = (LPVOID)this; AddRef(); return NOERROR; } return E_NOINTERFACE; }
  16. Reference Counting! ULONG CMyMAPIObject::AddRef() { InterlockedIncrement(m_cRef); return m_cRef; } ULONG

    CMyMAPIObject::Release() { // Decrement the object's internal counter. ULONG ulRefCount = InterlockedDecrement(m_cRef); if (0 == m_cRef) { delete this; } return ulRefCount; }
  17. !

  18. "(…) choose your galaxy wisely, (…) keep your telescope pointed

    towards the other galaxies, and prepare to make a hyperjump to other places if needed."
  19. C++17. PHP 7. C# 6. ES 6. Java 9. Kotlin

    1.1. Swi! 3.1. Scala 2.12.
  20. Lambdas. Type inference. Traits / default methods / protocol extensions

    / multiple inheritance / mixins / optional interface implementations. Categories / extensions.
  21. It is not the programming language. It is not the

    frameworks. It is not the patterns. It is us.