How to be a good programmer

  • Be able to touch code, see code, write code

How to Grow Fast

  • Look at the code before you write the code
    • Good code is quick to understand when seen and captures the main design essentials
      • Common library code
      • Core system code: used design, principles
  • Look at the code and keep it sensitive
  • When writing code, summarize
  • Write code that reflects design ideas

How to improve technology

  • Knowledge of architectural aspects of the project, especially encapsulated components
  • Brief introduction to the work of the architect:
    • Building a highly available framework:
      • When setting up a database, consider how to switch services to another machine if one MySQL service fails
    • Consider high concurrency factors:
      • Need to know nginx, Mycat, Netty, Redis etc
      • Consider scaffolding for load balancing
    • To deploy the designed architecture online:
      • Want to know how to bring components like an Nginx cluster online
      • Understand deployed Linux commands and scripts
      • Know deployment tools like Jenkins
    • Able to resolve deployment and runtime issues:
      • Know how to build systems
      • Debug components such as Netty
      • You can use logs to know how the cluster is doing
      • Quickly solve cluster problems
    • Focus not only on technology, but also on business:
      • Implement business requirements through architecture
      • Know the strengths and weaknesses of components
      • Be able to select and design solutions
  • Familiar with related skills:
    • Start with Ant scripts, Jekins scripts and Linux scripts to familiarize yourself with the deployment of the system and the necessary Linux debugging skills
    • By looking at the configuration files of Nginx or Dubbo or ZooKeeper, you can learn how each component works and how load balancing and failover are configured in high-concurrency systems
    • Observe online logs to learn about system deployment and the relationships between components from the architecture level
  • Solve practical problems, understand key configuration of components and the underlying code of components
    • Familiar with basic deployment and architecture skills
    • Problems in the testing and launch phase:
      • Kafka is not configured properly, causing messages to backlog
      • The dubbo timeout period is too long. As a result, the call link timeout is invalid. Procedure
      • The REDis timeout duration is too long, causing the OOM exception. Procedure
    • Follow the senior personnel to check the problem, find the problem, manual recheck:
      • Familiarize yourself with component configuration
      • And understand the underlying code of components
      • Be familiar with the implementation of configuring various framework components
  • Questions related to architect interview:
    • How can Nginx or other components be deployed for high availability?
    • In Redis cluster, how is disaster recovery generally done?
    • How do I repeat messages in a Kafka message queue? How do I ensure that messages are not re-consumed?
    • How do read and write indexes work in Netty?

The mindset of a good programmer

  • Always study code you don’t understand
    • Study code you haven’t worked with before, familiarize yourself with different code structures and design patterns, and explore why code is written the way it is
  • Proficient in code debugging
    • Can you guess what’s going on
    • Assuming the guess is correct, think about what happens to the program as a result of the guess
    • Try to see if these results are unusual:
      • If no abnormality is found, the guess is probably correct
      • If an exception is found, the guess is wrong and you need to debug it
    • For a siege lion, this process is a flash of lightning. The more questions you solve, the more accurate your guesses will be
  • Focus on time-saving tools
  • Optimize iteration speed
  • Systematic way of thinking:
    • How does your code function in relation to other code
    • Did you test your code well
    • Does the code in the online production environment need to change in order to deploy the code
    • Does the new code affect the already running code
    • Whether the target user behaves as expected under the new functionality
    • Does the code have a business impact

Programmer’s algorithm

  • The key is to understand the deep theory behind the algorithm and develop the idea of solving the problem

Ten classic Algorithms

  • Quicksort algorithm
  • Heapsort algorithm
  • Merge sort algorithm
  • Binary search algorithm
  • Linear Search Algorithm (BFPRT)
  • Depth-first Search algorithm (DFS)
  • Breadth First Search Algorithm (BFS)
  • Shortest path algorithm (Dijkstra algorithm)
  • Dynamic programming algorithm
  • Naive Bayes classification algorithm

Algorithm part

  • Binary Search: Binary Search
  • Divide and Conquer
  • Our lines First Search
  • Depth First Search: Depth First Search
  • Backtracking
  • Double pointer: Two Pointers
  • Dynamic Programming: Dynamic Programming
  • Scan line: Scan-line algorithm
  • Qiuck Sort

Data structure section

  • Stack: the Stack
  • Queue, Queue
  • 1. Linked List
  • Array: an Array
  • Hash Table: Hash Table
  • Binary Tree: Binary Tree
  • Heap: Heap
  • And look up the set: Union Find
  • Dictionary tree: Trie

LeetCode

  • Brush questions in order:
    • If you’re pressed for time, check the top recommendations first
    • If you have time:
      • Brush the questions in groups from low to high difficulty
      • Brush the questions according to tag
      • Review regularly and redo the questions you have brushed
  • Brush the question method:
    • The first time: think first, look at the reference answer brush, combined with other people’s answer brush. Think, summarize and master the type of question, thinking way, the optimal problem solution
    • Second time: first thinking, recall the optimal solution, and before their own written solution to compare, summarize the problem and method
    • Third time: improve the speed of brush questions, take out a question, you can know the focus of its investigation, solution method, in a short time to write the answer
  • Regular summary:
    • Summarize according to the topic type: for a kind of problem, summarize what methods to solve the problem, which method is the best, why?
    • Summary key: some questions brush a lot of times or not, it is necessary to focus on, think about the solution, continue to practice strengthening

Technical learning route

Concurrent programming

Java Memory Model (JMM)
  • Thread communication and messaging in Java
  • What is reordering and order consistency, happens-before, as-if-serial
The concept and analysis of Synchronized
  • Analysis of principle of synchronization, heavyweight lock and Synchronized
  • Spin lock, bias lock, lightweight lock and heavyweight lock concepts, use and how to optimize
Knowledge of Volatile and DCL
  • Volatile usage scenarios and implementation mechanisms, memory semantics, memory models
  • DCL singleton pattern, what is DCL, how to solve the DCL problem
AQS in-depth analysis of concurrency basis
  • The concept of AbstrasctAueuedSynchronizer synchronizer, CLH synchronous queue is what?
  • Synchronous state acquisition and release, thread blocking and wake up
Lock and common utility classes
  • The Lock in Java:
    • ReentrantLock
    • ReentrantReadWriteLock
    • Condition
  • Concurrency utility classes in Java:
    • CyclicBarrier
    • CountDownLatch
    • Semphore
  • Concurrent collection classes in Java:
    • ConcurrentHashMap
    • ConcurrentLinkedQueue
General knowledge of atomic operation
  • Basic types of atomic operations:
    • AtomicBoolean
    • AtomicInteger
    • AotomicLong
  • Atomic operations on array types:
    • AtomicIntegerArray
    • AtomicLongArray
    • AtomicReferenceArray
  • Atomic operations of reference type:
    • AtomicReference
    • AtomicReferenceFieldUpdater
  • CAS concepts and knowledge points, as well as defects
Thread pooling and parallelism
  • Executor
  • ThreadPoolExecutor
  • Callable &Future
  • ScheduledExecutorService
  • ThreadLocal
  • Fork & Join
  • What is parallelism
  • How can thread pools ensure that core processes are not destroyed

Framework and source code applications

MyBatis application and source code analysis
  • Advantages and disadvantages of MyBatis,Spring and MyBatis integration
  • Cofig,Sql configuration, Mapper configuration. There are several ways to register mapper. What is the priority
  • Mybatis level 1 cache, level 2 cache. Why is MyBatis level 2 cache a chicken rib
  • Through the implementation of Mapper,MyBatis prepared SQL statements in three ways
  • MapperScan source code analysis, how does MapperScan work
  • How does MyBatis extend Spring’s scanner, and how does MyBatis use FactoryBean after scanning
  • MyBatis how to put objects into Spring container, what knowledge to use Spring
  • The connection between the core interface ImportBeanDefinitionRegistrar Mybatis and Spring
  • Why is MyBatis’ level 1 cache invalidated? Why does Spring invalidate MyBatis’ level 1 cache
  • MyBatis execution process, how to cache Sql in MyBatis, cache where
  • MyBatis method name why should be consistent with mapper in the ID, from the source to explain
Tomcat source code analysis
  • Tomcat overview and Tomcat startup process, source code analysis
  • Tomcat web request source code analysis, an HTTP request to Tomcat,Tomcat how to deal with
  • Tomcat protocol analysis, from the source analysis of Tomcat in a variety of detailed configuration significance
  • Tomcat and Apache,Nginx and other mainstream static server collocation
  • How to optimize Tomcat container performance in a production environment
Spring source code analysis
  • Spring basic application and Spring source code compilation
  • Logging systems in Java,JUL,JCL,log4j, SLF4J
  • Source code comparison between Spring4 and Spring for logging
  • AspectJ and Spring AOP, static weaving of AspectJ
  • JDK dynamic proxy source code analysis, how does the JDK manipulate bytecode
  • Spring does AOP through CGLIB. How does CGLIB do method interception
  • How is the AnnotationAwareAspectJAutoProxyCreator finish agent weave
  • What are BeanDefinitions, and what do Spring’s various BeanDefinitions do
  • What does a BeanDefinition do, and how does it change the behavior of a Bean
  • BeanDefinitionRegistry function, source code analysis
  • How does BeanNameGenerator change the beanName generation policy
  • How does BeanPostProcessor work with Bean instantiation, what are the classic application scenarios, and where is this interface used internally in Spring
  • What is the difference between BeanFactoryPostProcessor and BeanPostProcessor? How does Spring use BeanFactoryPostProcessor
  • BeanDefinitionRegistryPostProcessor and Spring BeanFactoryPostProcessor, relationship and difference between Spring bottom how to call
  • ConfigurationClassPostProcessor this class how to perform the Bean scan, how to perform the @ Bean scan, how to do @ the parsing of the Import
  • There are three types of @import:
    • Ordinary class
    • The configuration class
    • ImportSelector
  • How do I extend Spring with ImportSelector
  • @configuration why this annotation can not add, add and do not add the difference, why the underlying CGLIB
  • How does the @bean method keep singletons? How to configure a singleton if no singleton is required? Why is this configuration necessary
  • What is the difference between SpringFactoryBean and BeanFactory? What are the classic application scenarios? The classic application scenario of Spring’s factoryMethod
  • The role of ImportBeanDefinitionRegistrar this interface? How do mainstream frameworks use this class to integrate with Spring
  • When did Spring implement the post-processor? What are the important post-processors? Such as CommonAnnonationBeanPostProcessor
  • What is the mechanism behind @enablexxx in Spring and SpringBoot? How to customize one? For example, some custom functions can be dynamically enabled
  • How does Spring accomplish Bean loop dependencies and instantiation? What is Spring’s IOC container? How to understand the source code
  • Bean instantiation process? What is the difference between getSingleleton and getSingleleton? Source code analysis of SpringMVC

Spring micro service

SpringCloud
  • Eureka source code analysis, service registration and service discovery, heartbeat mechanism, protection mechanism? Comparing Eureka and Zookeeper, what are the CAP principles
  • Ribbon source code analysis and load balancing? Client load balancing? Server side load balancing? The Ribbon core component IRule and rewrites IRule
  • Fegin source code analysis and declarative service invocation? Fegin load balancing? How is Fegin used in conjunction with Hystrix? What’s the problem?
  • How does Hystrix implement traffic limiting and downgrading? How to solve the large distributed project service avalanche? What exactly is a service circuit breaker? Enterprise-level solutions for first-tier companies
  • How does HystrixDashboard implement custom interface degradation? Surveillance data? Data aggregation and so on
  • Zuul Unified gateway details, service routing, filter usage, etc. Intercept bad requests at source
  • Distributed Configuration Center Config How to integrate with Github or a custom Git platform such as Gitlab
  • Distributed link details? So there’s no place for bugs to hide? How to clarify the dependencies of microservices? How to keep track of the order in which traffic flows are processed
SpringBoot
  • SpringBoot source analysis and basic application? Use SpringMVC knowledge to simulate and hand-write a SpringBoot
  • How is zero configuration of SpringMVC implemented? What new knowledge does Servlet 3.0 take advantage of? How to embed Tomcat in SpringMVC how to remove web.xml
  • What is the relationship between listener in SpringBoot and observer mode in design mode? Emulates the event-driven programming model in Java
  • SpringBoot startup process analysis? How does SpringBoot initialize the context in Spring? How do I initialize DispatchServlet? How do I start Tomcat
  • SpringBoot configuration file type, configuration file syntax, configuration file loading order? Emulates automatic configuration in SpringBoot
  • SpringBoot logging system? How does SpringBoot design its own logging system? What are the advantages? How to unify logs
Docker
  • What is a Docker? Why Docker, and what does it have to do with development? Can bring convenience? Introduction to Docker? What is the architecture of Docker
  • Docker’s three core concepts:
    • Mirror image (Images)
    • The container (Cotainers)
    • Repository Service Registry
  • Basic usage of Docker and the basic operation of Docker image
  • Introduction to container technology? Docker container basic operation? Container virtualization Network Overview and what does Docker’s container network look like
  • How to use Dockerfile format,Dockerfile command and Docker Builder to build image
  • What is the difference between Compose and Dockerfile? Compose configuration file and using Compose to run the container? Docker combat application

Performance tuning

MySQL performance tuning
  • Why not use other data structures in MySQL instead of using B+ tree as index data structure
  • MySQL execution plan and MySQL query optimizer details
  • MySQL > alter database alter database Including ordinary query,group by,order by
Java data structure algorithm
  • What is the Hash algorithm? Java HashMap source code analysis? Write a HashMap by hand
  • HashMap JDK 7 and JDK 8 Why the change? Write a HashMap by hand
  • Sequential storage, bidirectional LinkedList, unidirectional LinkedList,Java in LinkedList source analysis
  • Java linear structure, tree structure and graphical structure analysis and application scenarios and classic use
  • Large number operations and classical sorting, binary tree red black tree sorting, search
JVM performance tuning
  • An overview of the Java memory model, the class loading process and the ClassLoader, the general content of the runtime data area, compilation principles
  • Memory areas and overflow exceptions, virtual machine objects, program counters,Java stacks, local method stacks, operands, method areas, heap memory, and metadata
  • How to break the parent delegate mode from JDK source code? Why break the parent delegate
  • Virtual machine performance monitoring and fault processing,JVM basic command, the use of jinfo command, the use of JMAP command, the use of JSTAK command, the use of JVisualVM analysis
  • Garbage collector and memory allocation strategy, garbage collection algorithm and foundation, series collector, parallel collector, memory allocation and collection strategy
  • What is the nature of program compilation and code optimization, runtime optimization, compile-time optimization, and JVM tuning? What is light GC? What is Full GC? How do you tune it
  • JVM execution subsystem, class file structure, class loading mechanism, bytecode execution engine, bytecode compilation mode, how to change bytecode compilation mode

Internet Engineering

Maven
  • Get an overview of Maven’s architecture
  • Maven’s core commands
  • Maven’s POM configuration architecture
  • Build Nexus private server
Git
  • Build Git client and server by hand
  • Git core commands
  • Git Enterprise Applications
  • Git basic pointer introduction
Linux
  • Linux startup, principle, directory introduction
  • Common Linux O&M commands,Linux users and their permissions
  • Shell scripting

distributed

Distributed coordination framework -Zookeeper
  • What is a distributed system? What are the challenges of distributed systems? This section describes how to start Zookeeper and build a cluster
  • What are the common commands and precautions of Zookeeper? What are the functions of zkClient and the Curator framework and how to use them
  • Common application scenarios of handwritten Zookeeper:
    • Distributed configuration Center
    • A distributed lock
    • Distributed scheduled Task
  • Zookeeper core concepts zNode, Watch mechanism, serialization, persistence mechanism and source code analysis
  • How does Zookeeper solve distributed consistency problems? Leadership election process and source code analysis
RPC Service framework -Dubbo
  • Handwritten RPC framework and why use Dubbo? How does traditional application system evolve into distributed application system
  • What are the six features of Dubbo? What are the benefits for enterprise development? A brief explanation of Dubbo’s role? A quick example of a Dubbo call
  • How are protocols, registries, and dynamic proxies in Dubbo scalable? Dubbo extension mechanism source code analysis
  • Dubbo source code parsing of the process between invoking a service from the service provider to the registry to the service consumer
  • Dubbo monitoring center and management platform to facilitate enterprise development and management
Distributed data cache -Redis
  • Relational Database Bottlenecks and optimization? Encache vs. Redis? NoSQL application scenarios
  • Basic Redis data types, such as Map usage scenarios? What are the advantages and disadvantages? When to use Map
  • Redis Advanced features? What about Redis single threaded but high performance? How to understand Redis and Epoll
  • Redis persistence? When is persistence needed? What’s the plan? What are the advantages and disadvantages? How do I elegantly choose a persistence solution
  • Application in Redis project? Redis advanced command mget,scan? Why is the scan command available? How to understand the Redis cursor
  • Standalone Redis installation and Redis production environment enabling scheme
  • Significance of Redis persistence machine for disaster recovery in production environment
  • How to achieve 99.9% high availability under the Master-slave framework of Redis
  • A set of master/slave replication + high availability + multi-master Redis Cluster was rebuilt in the project
  • Redis in practice some common problems and optimization ideas, including Linux kernel parameter optimization
  • Redis RDB persistent configuration and data recovery experiment
  • The advantages and disadvantages of Redis RDB and AOF persistence mechanism are compared
Distributed data storage -MyCAT
  • This section describes the scenario of database and table partitioning
  • MyCAT principle introduction
  • Sub-database sub-table actual combat
Distributed the RabbitMQ
  • RabbitMQ environment installation,RabbitMQ overall architecture and message flow, switch details
  • How does messaging guarantee a 100% delivery success scenario? Enterprise message idempotency concepts and industry mainstream solutions
  • Confirm Confirm message description,Return message description, traffic limiting policy on the consumer end, ACK and requeue mechanism on the consumer end
  • SpringAMQP user management component:
    • RabbitAdmin application
    • The SpringAMQP message template component
    • RabbitTemplate of actual combat
  • SpringAMQP message container:
    • SimpleMessageListenerContainer,
    • SpringAMQP message adapter
    • Use the MessageListenerAdapter
  • RabbbitMQ with SpringBoot 2.0 and RabbitMQ with SpringCloud Stream
  • RabbitMQ cluster architecture,RabbitMQ cluster image queue construction to achieve reliability storage,RabbitMQ cluster integration of the load balancing component HaProxy