Top Banner
On Being a Professional Software Developer Anton Kirillov
44

Антон Кириллов, ZeptoLab

Dec 21, 2014

Download

Technology

On Being a Professional Software Developer
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Антон Кириллов, ZeptoLab

On Being a Professional Software Developer

Anton Kirillov

Page 2: Антон Кириллов, ZeptoLab

About Author

antonkirillov@ akirillov@

architect@

Ph.D. in CompSci

Computer Scientist, Distributed Systems Architect and Passionate Programmer

Page 3: Антон Кириллов, ZeptoLab

Agenda

What is this talk about● Developers’ Essence● Computer Science● Polyglot Programming● Evolution

What is this talk not about● Agile● Soft Skills● How to Sell ABC to XYZ

Page 4: Антон Кириллов, ZeptoLab

Software Developer

A person concerned with facets of the software development process. Their work includes researching, designing, implementing, and testing software. A software developer may take part in design, computer programming, or software project management. They may contribute to the overview of the project on the application level rather than component-level or individual programming tasks.

Wikipedia

Page 5: Антон Кириллов, ZeptoLab

Software Engineering

The required techniques of effective reasoning are pretty formal, but as long as programming is done by people that don't master them, the software crisis will remain with us and will be considered an incurable disease. And you know what incurable diseases do: they invite the quacks and charlatans in, who in this case take the form of Software Engineering gurus.Dijkstra (2000) "Answers to questions from students of Software Engineering"

Page 6: Антон Кириллов, ZeptoLab

Beauty is more important in computing than anywhere else in technology because software is so complicated. Beauty is the ultimate defense against complexity.

David Gelernter, “Machine Beauty: Elegance and the Heart of Technology”

Page 7: Антон Кириллов, ZeptoLab

Programming

We have seen that computer programming is an art, because it applies accumulated knowledge to the world, because it requires skill and ingenuity, and especially because it produces objects of beauty. A programmer who subconsciously views himself as an artist will enjoy what he does and will do it better.

D. Knuth, Computer Programming as an Art (1974)

Page 8: Антон Кириллов, ZeptoLab

Programmers’ Competency Matrix

source: http://sijinjoseph.com/programmer-competency-matrix/

Page 9: Антон Кириллов, ZeptoLab

What’s in the Market

Page 10: Антон Кириллов, ZeptoLab

Market Requires Tools not Skills

Page 11: Антон Кириллов, ZeptoLab

Toolset is Legacy

“I suppose it is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail” ― Abraham Maslow

“The tools we use have a profound (and devious!) influence on our thinking habits, and, therefore, on our thinking abilities”― Edward Dijkstra

Page 12: Антон Кириллов, ZeptoLab

Skillset

Page 13: Антон Кириллов, ZeptoLab

Math & Abstraction

The effective exploitation of his powers of abstraction must be regarded as one of the most vital activities of a competent programmer.

E.W. Dijkstra, The Humble Programmer(1972)

Abstraction in mathematics is the process of extracting the underlying essence of a mathematical concept, removing any dependence on real world objects with which it might originally have been connected, and generalizing it so that it has wider applications or matching among other abstract descriptions of equivalent phenomena.

Page 14: Антон Кириллов, ZeptoLab

Abstraction in CompSci

● Languages:● OOP● Functional● Modern Lisps

● Control flow

● Abstract Data Types

● Lambda Abstraction

● Layered Architecture

Page 15: Антон Кириллов, ZeptoLab

Abstraction Principle

Each significant piece of functionality in a program should be implemented in just one place in the source code. Where similar functions are carried out by distinct pieces of code, it is generally beneficial to combine them into one by abstracting out the varying parts.

Benjamin C. Pierce in Types and Programming Languages (2002)

Page 16: Антон Кириллов, ZeptoLab

Why Math● Understanding function convexity very deeply● Using induction to prove a recursive algorithm● Formal correctness proofs● DFAs, NFAs, Turing Machines, and theoretical computation in

general● It makes a lot computer science concepts easier● Specific concepts applicable to computer science are covered

arguably more deeply by mathematics● Diversity of paradigms● Precision and skepticism● Math people are really smart =)

Page 17: Антон Кириллов, ZeptoLab

(Very) Applied Mathematics

● (Pure) Functions and State Machines -> Stateful/Stateless Services Models

● HOF -> DI/IoC

● Set Theory -> SQL Joins

● Probability Theory -> Load Balancing, Probabilistic Data Structures

Page 18: Антон Кириллов, ZeptoLab

Comp Sci

Page 19: Антон Кириллов, ZeptoLab

Theoretical Computer Science

Page 20: Антон Кириллов, ZeptoLab

Theoretical Computer Science

Page 21: Антон Кириллов, ZeptoLab

Applied Computer Science (AI)

Page 22: Антон Кириллов, ZeptoLab

Applied CS (Engineering)

Page 23: Антон Кириллов, ZeptoLab

Applied Computer Science (Computational & Informational)

Page 24: Антон Кириллов, ZeptoLab

Data Structures & AlgorithmsUse Cases

Page 25: Антон Кириллов, ZeptoLab

Why Data Structures & Algorithms● Queues:

○ Any Queueing processes ○ Distributed Persistent Queues for Event Processing

● Bloom filters:■ Used by Cassandra to check which SSTables mostly contains the key■ Hbase also uses it to optimize the reads

● Trees:○ KV Database designing○ Creating file system (S-Tree in HDFS)○ Suffix tree: Genomic sequencing○ Zoology: Maintaining the structures of the entire animal & plant kingdom.○ Social Networks : Establishing relations between users based on some key

● B-Trees (Binary Trees): ○ E-commerce : while accessing unique keys. B-Trees balanced multi-way

search tree of order N.○ Searching : Searching quickly for a given element

● Skip Lists:● Implementation of ordered sets - Redis datastore

Page 26: Антон Кириллов, ZeptoLab

Single Example: Graphs● Search (PageRank)● The Facebook news feed & Facebook Graph Search.● Google Navigation and Google Directions on top of Google Maps uses some

very efficient planar graph shortest path algorithms.● Compilers use graph traversals to find code dependencies.● Graph coloring algorithms are used when optimizing the code for parallel uses of

the CPU registers.● CPU layout design problems are modeled as graph problems.● Memory garbage collection strategies may use graph traversals.● Inventory allocation in web advertising can be written as a network flow problem.● Data replication problems frequently use minimal spanning tree algorithms to

keep the bandwidth use down.● Most big data processing pipelines involve a series of interdependent steps that

can be modeled as a directed acyclic graph.

Page 27: Антон Кириллов, ZeptoLab

Programming Languages

Page 28: Антон Кириллов, ZeptoLab

Programming Languages

About the use of language: it is impossible to sharpen a pencil with a blunt axe. It is equally vain to try to do it with ten blunt axes instead.

E.W. Dijkstra, How do we tell truths that might hurt?(1975)

Page 29: Антон Кириллов, ZeptoLab

Why Polyglot Programming Matters

● Most interesting open-source projects are in different

language than yours (Storm, Finagle)

● Lay back and relax in Turing’ Tarpit

● Concurrency Idioms (Shared Memory, Actors, STM)

● Write once - run anywhere! JVM is mature enough to

host new languages (and they appear!)

● We don’t need most of GoF Patterns in FP!

● There are a complete frameworks build around lack of some features in core language (DI containers)

Page 30: Антон Кириллов, ZeptoLab

Why Polyglot Programming Matters

● Another level of abstraction● You can borrow design ideas from other

languages (e.g. I am a lambda junkie)● Different understanding of things (address

arithmetic, OOP, HOF, Monads etc.)● Effective reasoning (map and reduce)● Idiomatic code: ceremony vs. conciseness

Abstract away from language!

Page 31: Антон Кириллов, ZeptoLab

Language Landscape is Changing

FORTRAN —"the infantile disorder"—, by now nearly 20 years old, is hopelessly inadequate for whatever computer application you have in mind today: it is now too clumsy, too risky, and too expensive to use.

PL/I —"the fatal disease"— belongs more to the problem set than to the solution set.

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence.

APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums.

Page 32: Антон Кириллов, ZeptoLab

Code Samples

Page 33: Антон Кириллов, ZeptoLab

FizzBuzz: Java

for (int i = 0; i < 100; i++){ if ((i % 15) == 0){ System.out.println("FizzBuzz"); } else if ((i % 3) == 0){ System.out.println("Fizz"); } else if ((i % 5) == 0){ System.out.println("Buzz"); } else { System.out.println(i); }}

Page 34: Антон Кириллов, ZeptoLab

FizzBuzz: Java

for (int i = 0; i < 100; System.out.println(++i % 3 == 0 ? i % 5 == 0 ? "Fizzbuzz" : "Fizz" : i % 5 == 0 ? "Buzz" : i));

Page 35: Антон Кириллов, ZeptoLab

FizzBuzz: Scala(1 to 100) map { x => (x % 3, x % 5) match { case (0,0) => "FizzBuzz" case (0,_) => "Fizz" case (_,0) => "Buzz" case _ => x toString }} foreach println

Page 36: Антон Кириллов, ZeptoLab

FizzBuzz: Clojure(use '[match.core :only (match)]) (doseq [n (range 1 101)] (println (match [(mod n 3) (mod n 5)] [0 0] "FizzBuzz" [0 _] "Fizz" [_ 0] "Buzz" :else n)))

Page 37: Антон Кириллов, ZeptoLab

FizzBuzz: Enterprise Edition

LoopComponentFactory myLoopComponentFactory = new LoopComponentFactory();LoopInitializer myLoopInitializer = myLoopComponentFactory.createLoopInitializer();LoopCondition myLoopCondition = myLoopComponentFactory.createLoopCondition();LoopStep myLoopStep = myLoopComponentFactory.createLoopStep();

IsEvenlyDivisibleStrategyFactory myFizzStrategyFactory = new FizzStrategyFactory();IsEvenlyDivisibleStrategy myFizzStrategy = myFizzStrategyFactory.createIsEvenlyDivisibleStrategy();StringPrinterFactory myFizzStringPrinterFactory = new FizzStringPrinterFactory();StringPrinter myFizzStringPrinter = myFizzStringPrinterFactory.createStringPrinter();

IsEvenlyDivisibleStrategyFactory myBuzzStrategyFactory = new BuzzStrategyFactory();IsEvenlyDivisibleStrategy myBuzzStrategy = myBuzzStrategyFactory.createIsEvenlyDivisibleStrategy();StringPrinterFactory myBuzzStringPrinterFactory = new BuzzStringPrinterFactory();StringPrinter myBuzzStringPrinter = myBuzzStringPrinterFactory.createStringPrinter();

IsEvenlyDivisibleStrategyFactory myNoFizzNoBuzzStrategyFactory = new NoFizzNoBuzzStrategyFactory();…..

EnterpriseQualityCoding/FizzBuzzEnterpriseEdition

Page 39: Антон Кириллов, ZeptoLab

Evolve!

Page 40: Антон Кириллов, ZeptoLab

Evolve!● Wiki that!

● Build a robot!

● Attack a book!

● Compete!

● Toy projects!

● Open-source!

● Coursera?

● Hire people smarter than You!

Page 41: Антон Кириллов, ZeptoLab

Enjoy the Community!

● Attend conferences, check!● Attend meetups in Your city● Share Your knowledge, sync with community!

Ads =)

Page 42: Антон Кириллов, ZeptoLab

Recap

● Computer programming is the core competency

● Don’t depend on market

● Abstraction as main tool

● Choose field, not framework

● Be polyglot

● Don’t fear to explore

● Evolve

Page 43: Антон Кириллов, ZeptoLab

First they ignore you, then they laugh at you, then they fight you, then you win

Mahatma Gandhi

Page 44: Антон Кириллов, ZeptoLab

{}

thisRoom getPeople foreach( person => {shakeHand(person)thanks(person)

}

> ~questions?