Pragmatic Programming Principles I Have Learnt over The Last 30 Years Peter Lawrey

Razor

2019/10/19 发布于 技术 分类

文字内容
1. Pragmatic programming principles I have learnt over the last 30 years QCon Shanghai 2019 Peter Lawrey CEO, Chronicle Software
2. Contents
3. Peter Lawrey Self funded $2.1m/y revenue Several Tier 1 banking clients 18m downloads 2018
4. Low latency FIX Engine < 20 us 99.9% Low latency Replication < 30 us Low latency Persisted messaging < 1 us 99% Custom FX Trading With 3 month ROI
5. First computer 5 Mhz 8” floppies 128 KB Keyboard cost $2k
6. Retraining as Computer Programmer “Computers are easier to fix than people” Working with people is harder than working with computers
7. Requirements vs Solutions Myth: Developers spend most of their time writing code.
8. Requirements vs Solutions Developers spend most of their time understanding the problem and only about 10% writing the code which will be used in production.
9. Your career is harder to predict than your think. “In ten years, 30% of graduates will be in an industry which doesn’t exist” WWW, Java, Algorithmic Trading didn’t exist when I graduated
10. Effective communication Don’t underestimate the importance of effective communication
11. Effective communication If you develop something but no one knows or understands it, it might never the be used
12. Effective communication Public speaking was far important to my career than I imagined
13. Productivity Junior developers measure how much code they added Senior developers measure how much code they deleted
14. Productivity I used to think exercise was for health reasons only. Exercising for 30 minutes several times a week helps reduce stress and improve concentration.
15. Programming Principles Developers love solving problems, whether they need to be solved or not
16. Programming Principles YAGNI You Ain’t Gonna Need It "Always implement things when you actually need them, never when you just foresee that you need them."
17. Programming Principles DRY - Don’t Repeat Yourself WET - Write Everything Twice Avoid duplication but also too much abstraction
18. Programming Principles KISS – Keep It Simple Junior developers take a simple problem and build a complex system
19. Programming Principles KISS – Keep It Simple Senior developers take a complex problem and build a simple system.
20. Programming Principles Separation of Concerns Make each component work independently with a clear contract or interface => Microservices.
21. Programming Principles Avoid Premature Optimisation Keep it simple and the JVM will do a good job of optimising it. Complex tricks will probably confuse the optimiser.
22. Programming Principles Clean Code is Clever Code. Most code will be read many more times than it was written. Write code for readability and ease of understanding.
23. Programming Principles In six months time someone will read your code and find your code confusing. That someone could be you.
24. Finding bugs early reduces the cost of fixing them
25. Driven Development Test Driven Development Behaviour Driven Development Model Driven Development Documentation Driven Development
26. Driven Development Driven Development works for developers who have done it before. Otherwise Prototype Driven Development
27. Driven Development Chronicle Decentred is a High Throughput Blockchain. This was something to new to me so after years of TDD and BDD, prototypes were the only way to start.
28. Driven Development Myth: Prototypes can be productionised. Always plan to rewrite any prototype using TDD or BDD.
29. Low latency Data for humans should be limited Data for computers can be much faster and sometimes has to be
30. Low latency 24 Hz 42 ms Limited change between frames
31. Low latency OPRA market data feed 54 billion per day Peak in 10 milliseconds 944,000 messages 78,000 packets
32. Low latency Low latency means different things based on context. 1 second 1 millisecond 1 microsecond
33. Microservices People and software work better together with clear seperations of concern and clear contracts of engagement.
34. Microservices Microservice models help keep separate area of concern developing independently. Your messaging infrastructure needs to be fast enough to support your SLA
35. Real time processing of transactions
36. Real time processing of transactions
37. Real time processing of transactions Series of low latency, non blocking tasks End to end latencies consistently low
38. Real time processing of transactions
39. Store every event model is getting cheaper 3.84 TB- £830 7.68 TB - £2100 15.36 TB - £4,200
40. Come to my next talk Friday 18th 14:00 Banquet Hall 2 Designing, Building and Testing Deterministic HFT Systems