Hello, I’m Koha.
Long time no see, to bring you good news, kohanyu’s new topic “programming feather record” series officially on the new, mainly to introduce some articles about the interview questions and experience summary.
Will provide you with some technology stack, programmers also need other aspects of hardcore knowledge, to achieve all-round development, in this increasingly fierce society, in the future have a better development space.
Without further discussion, this issue is about some essential skills of programmers. I believe that mastering these skills inside and outside coding will take us one step closer to being a good software developer.
Here’s a look at my summary of these skills, ready to add to the collection (eat ashes)?
Within the coding
Code specification
The first benefit of normalizing your code is that it looks neat and comfortable.
We can write code in a non-standard way, and it makes sense now, but in a few months, you’re going to look back and you’re going to be confused. Not to mention, in case the project is iteratively developed and handed over to someone else, code must be written in specification.
Here are some code specification considerations I summarized:
Encoding: use UTF-8, and generally do not change it.
Indent: Four Spaces are used to indent the Tab key. If Tab size is set to 4, four Spaces are used to indent the Tab key.
Parentheses: Curly braces should not be on a single line, the same line as the code that precedes them. Also, there is a space between the curly braces and the preceding code.
Space: Leave a space between the logical keywords such as if, else, for, switch, while and the following statements. Operators are separated by a space on each side; Each parameter of the method is separated by a space.
Blank lines: Separate logically related code segments with blank lines to improve readability. A blank line is also a blank line, not multiple lines.
Variables: Declare one variable on a line, rather than multiple variables on a line. This makes it easier to write comments.
Recommended Books:
Clean code
Naming conventions
I think programmers have a headache when they think of naming, and when we encounter confusion or wrong names, not only make our code difficult to understand, but also misleading our thinking.
With good naming, we can greatly improve the readability and maintainability of our code.
Here are some basics of naming conventions:
Package name: domain name reversed + project name + module name, all words in lower case.
Class and interface naming: Use the big hump rule. Use nouns or noun groups and capitalize the first letter of each word.
Method naming: Use the little hump rule. Use verbs or gerunds, lowercase the first word and capitalize all other words.
Constant names: all uppercase words, separated by underscores.
Variable naming: a combination of range description + meaning description + type description, using a hump, with a lower case first letter.
Annotation specifications
We also must form the good habit of writing comments, when we write a program that could present remember very clearly, what is this passage mechanism, how to implement, but more and more when you write a program, you’ll forget why write so, changes and transition is also very trouble, the code comments can effectively avoid this situation.
Comments not only make the code readable, but they also give the reader more information.
Here are some suggestions for the annotation specification:
Header comment: Add a copyright statement to the top of the file.
Class and interface comments: Javadoc comments are added to classes and interfaces.
Method comments: a description of the purpose and parameters of the method, and a description of the return value.
Variable and constant comments: Comment on the right // first, add a comment on the top if the comment is too long.
The framework
Java is one of the most popular programming languages at present. With the popularity of Java object-oriented language and the emergence of multi-tier architecture applications, the reusability of applications has been greatly improved. Frameworks have also begun to appear in applications and have been widely used.
In an interview, the interviewer will generally ask you about the framework you used in your project, and then give you some scenarios and ask you how to do it with the framework.
Some of the most popular Java frameworks are:
SpringMVC: Uses the idea of MVC architecture pattern to decouple responsibilities in the Web layer based on a request-response model.
Struts2: for building modern JavaEEWeb applications, it can help you quickly build an MVC model.
Hibernate is an open source object relational mapping framework. It is a fully automatic ORM framework.
“How dare you say you know ORM framework when you don’t know Hibernate technology?”
Spring is an open source development framework that is a lightweight Inversion of Control (IOC) and Aspect Oriented (AOP) container framework.
“A guide to basic use of the Spring Framework”
SSH: An integration of three JAVA EE frameworks, namely Struts, Spring and Hibernate frameworks, is a relatively popular JAVA Web open source framework.
SSM: Is a framework composed of three layers, namely Spring, SpringMVC and MyBatis.
Mybatis is an open source framework that simplifies and implements the Java data persistence layer. It abstracts a lot of REDUNDANT JDBC code and provides a simple and easy to use API and database interaction.
Springboot: Springboot is a new framework that simplifies the initial setup and development of Spring and uses a specific way to configure it, eliminating the need for developers to define boilerplate configurations.
Dubbo is a distributed service framework dedicated to providing high-performance and transparent RPC remote service invocation solutions and SOA service governance solutions.
“Dubbo is a must-ask in a micro service interview. Do you think you can’t get a job with all this detail?”
Apache Shiro: Is a Security framework for Java designed to simplify authentication and authorization.
SpringCloud: is a microservice solution that relies on SpringBoot implementation. Registry (EUreka), client load balancing (Zull), gateway (Zull), distributed locking, distributed session, etc.
“How do YOU explain microservice to your girlfriend?”
“A little deeper: How do you explain microservices to your girlfriend?”
The database
Database is a very important part, no matter for the interview or work, is a commonplace topic.
What is more important is the database optimization part. Kohwa has summarized an article about MySQL optimization before. If you want to know more about it, you can check it out in the following article:
“Dry goods! Analysis of MySQL Optimization Principle and Summary of Optimization Scheme”
The two most common database models are relational (SQL) and non-relational (NoSQL).
Relational database:
• Large: Oracle, DB2• Medium: SQL Server, MySQL• Small: Access
Non-relational databases:
• Temporary key-value stores (memcached, Redis) • Permanent key-value stores (ROMA, Redis) • Document-oriented databases (MongoDB, CouchDB) • Column-oriented databases (Cassandra, HBase)
Redis is the most commonly used word. Please refer to this article to understand:
“Play With Redis | Learn these 10 points that will help you win Redis in minutes and satisfy all your questions.”
Common databases:
Common database
The data structure
As programmers, we deal with different kinds of data every day. So do we really know the data structure?
Kohwa’s article also describes the use of various data structures in detail:
“Some are in love, some are young and financially free, and some can’t memorize data structures.”
All kinds of data structures are classified, and the application methods are analyzed and combined with relevant cases of implementation from the definition, characteristics and principles:
• Stack • Queue • Linked list • Hash Table• Sorting binary TREE• red-black TREE• B-tree • Bitmap
Data Structure Recommended books:
Talk about data structures
algorithm
Algorithms are essential for both learning and work. If we have mastered the logic behind these algorithms, it will be a good promotion for our study and work.
I covered some of the classic Java algorithms in detail in a previous post:
“Algorithm is beautiful, listen to me tell these Java classic algorithm package you fall in love with her.”
“I told my girlfriend about encryption algorithms over the weekend, but I didn’t expect…”
There are mainly the following classical algorithms. The introduction, application scenarios, steps, and code examples of each algorithm are introduced in detail.
• Binary search • Bubble sort • Insertion sort • Quicksort • Hill sort • Merge sort • Bucket sort • Radix sort • Pruning • Backtracking • Shortest path • Maximum subarray • Longest common suborder • Minimum spanning tree
Algorithm recommended books:
Algorithm diagram
Version management
Most of the company’s code on the market today is hosted by version management tools, from SVN to Git, which everyone needs now.
We need to understand the specific use of Git commands and arguments, know what each command will do, and avoid conflicts caused by various branch or fork operations.
Can help us:
1. Save the code in the development process for subsequent modification. 2. Can clearly see the code submitted and modified by each team member, and the responsibility is on the person. 3. Facilitate us to complete the task of collaborative development and work efficiently. 4. Provide records of different versions of the project to subsequent customers.
There are many tools for code versioning. Here are the ones I use:
•SVN: It replaces CVS, the most popular version control software in the open source community, which has a lot of improvements on the basis of THE functions of CVS and can better solve some deficiencies of CVS system. •Git: A version control tool for Linux kernel development. It uses a distributed repository approach. It does not require server-side software to operate version control, making it extremely easy to distribute and communicate source code. •GitHub: GitHub is by far the most popular tool, and has many open source projects to offer. GitHub has always been a favorite platform for programmers. If you want to learn, you can download the project to learn.
Mainstream tools:
Mainstream tool
Build tools
Build tools are as important as version management. In the actual development of the company, we need to carry out dependency management on Jar packages. Currently, the mainstream build tools are Maven (most cities) and Gradle (most used in Xi ‘an). To become a standard software developer, we need to learn not only how to build with these tools, but also how to resolve dependency conflicts when they occur.
Of course, in addition to Maven and Gradle, there are several other build tools that anyone interested in can learn about:
Hudson: Continuous integration (CI) tool written in Java.
Jenkins: An open source continuous integration tool written in Java. The project came from the Hudson branch after a dispute with Oracle.
Apache Ant: Software tool for automating the software build process. It originated in the Apache Tomcat project in early 2000.
SBT: Open source build tool for Scala and Java projects, similar to Maven and Ant for Java.
Atlassian Bamboo: Continuous integration and delivery tool that bundles automated builds, tests, and releases into a single process.
TeamCity: A Java-based built management and continuous integration server from JetBrains.
Grape: A JAR dependency manager embedded in Groovy.
Ivy: a subproject of the Apache Ant project, a passable dependency manager.
Leiningen: An automated build and dependency management tool for software projects written in the Clojure programming language.
Commonly used:
Jenkins
Unit testing
We in the usual development process, when the completion of their own functional modules, need to test again, so as to ensure the accuracy of the code, reduce unnecessary bugs.
Kohwa uses Junit the most for unit testing, using junit4’s annotation-based approach to unit testing.
Common notes:
To integrate with Spring to get configured beans, it is common to use @runWith to load the springjunit core class.
Use @ContextConfiguration to load the configuration file.
Inject the beans by name via @Resource, and then add @test to the method you want to Test.
Test principles:
• Source code and test code need to be separated; • The test class and the target source class should be under the same package, i.e. they should have the same package name; • The name of the class being tested is preceded or followed by @test, and the name of the method being tested usually begins with Test.
Example code:
@ RunWith (SpringJUnit4ClassRunner. Class) / / running environment is equivalent to the spring to monitor function related to the spring @contextConfiguration (locations={"classpath:spring-common.xml","classpath: spring-datasorce.xml "}) @contextconfiguration (classpath:spring-common.xml","classpath: spring-datasorce.xml "} Public class TestSpring {private @resource UserService UserService; public class TestSpring {private @resource UserService UserService; @Test public void testFind(){ List<User> userList = userService.findAllUserInfo(); for (User user : userList) { System.err.println(user.toString()); }}}Copy the code
To learn more about unit testing, check out this article:
“Farewell to prayer programming | Unit testing the correct landing position in a project”
Code debugging
Code debugging in our development, the most used is debug, we often say that hit a breakpoint, follow the program step by step, see which step has a problem, so as to troubleshoot the bug, is our most effective means to solve the problem.
Of course, we must have the ability to troubleshoot, locate the problem to solve. In addition, learn to check the log, which clearly records what we do every step of the way.
Here are some online debugging sites:
Codepad: A simple online IDE editor that can be compiled and run by pasting code into it. Codepad supports 9 programming languages including C, C++, PHP and Python.
Ideone: An online compiler and debugger that lets you compile, run, test, and code in more than 40 programming languages, including Java, JavaScript, PHP, and Python.
PractiCode: An online Web code debugging tool that supports HTML, CSS, JavaScript, VBScript and PHP.
Cssdesk is an online debugging tool for CSS code.
Google Code Playground is an online debugging tool for various Google JavaScript apis.
Recommendation:
IDdone
Refactor the code
Every programmer needs to have the basic ability to refactor existing code to make it optimal without compromising any existing functionality.
Kohwa has compiled a list of common ways to refactor code:
• Extract child functions • place public methods in parent classes • Move functions down to subclasses • encapsulate fixed call logic • Use generics to remove repetitive logic • Functions avoid too many incoming arguments • Transfer functions with clear responsibilities • State mode • Avoid null objects • split functions
Recommended Books:
refactoring
Read the source code
This is very important for us to have better promotion space or get a higher salary in the future. So we usually want to read more source code, grasp the underlying implementation.
Although we will spend a lot of time and energy to deep research, but when you interview, to a technical point source to the interviewer a burst of output, then the initiative of the interview will be in your hands. Read more source code at the same time, for us to solve the bug is also helpful.
To summarize how to read the source code in IDEA:
1. Locate the constructor/method implementation class 2. View the class hierarchy 3. Source statistics 5. Specific source code
Ability to troubleshoot and solve problems
We choose to develop this path, will encounter all kinds of problems, when the problem occurs, is to test the programmer’s ability. Most of the time, it is not difficult to solve the problem, it is difficult to locate the problem.
This will involve a lot of knowledge, for our knowledge reserve is very important, so usually must do a good job of accumulation.
You can also improve your ability from the following aspects:
• View logs, analyze Java stack information, and view cluster monitoring indicators
The log can be read in this section:
“Don’t look down on the Log, it’s got our group’s architect baffled.”
Programming for Google
Domestic already have baidu, why most programs will choose to use Google, because baidu search out of things too miscellaneous, such as you search for a technical thing, but many irrelevant things, baidu may search the Google search results will be more professional, so to find the information you need will be more efficient.
Ordinary programmers are object-oriented programming, and the real senior programmers are interviews for Google programming, learning the correct use of Google programming is very important, but also because Google Chrome browser comes with a wealth of plug-ins, for our programmers are also very friendly.
Some of the things I mentioned earlier about Chrome plugins:
Must-have Chrome Add-ons
Chrome Plugin recommended Programmer Series
Have questions, more Google:
Besides the coding
notes
The Internet industry updates quickly, and it needs to keep learning. There are many knowledge points to learn, which cannot be remembered by brain alone.
We can record the usual technical points, knowledge, good articles saved or recorded in the notes.
Kohwa recommends a few good notes that I use here:
• Youdao Cloud • Evernote •OneNote• Whisperbird
Recommended sparrow:
Language finches
MarkDown
Markdown is a markup language that can be written using a plain text editor, allowing plain text content to be formatted through a simple markup syntax.
I generally use Typora, this interface is simple, support real-time preview, support a variety of formula types, support TOC and other labels this first prepared, and then copy to their favorite editor for rendering format, and finally publish the article to various platforms.
Recommend a Typora:
Typora
Learn to write
Writing is a great way to get ahead. But usually our programmer classmates are very busy with many things, so we do not have much time, and it is difficult to continue writing, so how should we keep writing?
In fact, it is not easy to stick to anything. You can start with a technology blog and then write about things in your life. Anyway, let yourself write first, write first and then form a habit, you will benefit for a lifetime.
They usually use the Markdown syntax described above, and there are many editing tools, both online and on PC.
Like this one from my bookmark:
The editor
Team collaboration
In our development process, many people work together on every project. No programming job can be done by yourself. The code we write must interact or mix with others. Even good programmers, if they can’t work with others, will have a negative impact on the project and the normal operation of the company.
As a qualified programmer, we should learn to cooperate with others. There is a sentence I remember very clearly, no one’s success, everyone’s success is based on the cooperation with others, we are a whole, we need to face the difficulties together, together to share the success.
The following methods can be referenced:
• Efficient communication mechanism (chat software, task panel, email, etc.)• Regular check and timely adjustment (codeReview, daily, weekly, big and small meetings)
Keep on learning
In daily development, be sure to learn to go to Github and other sites, learn some other people’s excellent open source projects, learn other people’s ideas and architecture, learn other people’s logic.
To sum up the limitations of my coding process, only in the process of continuous learning can I make my own technology continuously improve.
I have sorted out some summaries about the learning platform website:
Must-have Web Sites for Programmers
Summary of Free Working Platform for Programmers at home and abroad
Learning Sites in my bookmarks:
Learning website
Create your own product
As software developers, we can not only develop software products, but also information products such as books and videos.
Many big guys I know have cooperative relations with publishing houses, have published their own books, or have entered b station and other video fields with good results, which will provide a good influence on personal IP shaping and subsequent development.
In my opinion, I should have the following abilities:
• To choose a good direction, more research, understand the needs of users. • Before you start, try to go to the market first to see if there are similar products and understand the current situation. • Pay attention to good details to avoid too many defects in subsequent products.
Try it on the following platforms:
Creative platform
The body is the capital of revolution
Programmers work, mostly sitting in front of a computer screen, sitting for hours, lack of exercise, many of us will get cervical spondylosis, there are fatty liver, some people have lumbar disc protruding, so young, the body is not good.
Therefore, we must take good care of our own body and learn to keep in good health. It is not only responsible for ourselves, but also responsible for society.
A bit of advice from Kohwa here:
• Get enough sleep • eat a regular diet • keep fit • run and walk more • work overtime reasonably • develop other interests
Learn to export and share technology
Writing down your programming knowledge and sharing it with other programmers will make you a better programmer. The benefits of writing articles are manifold. You can share ideas and help programmers around the world
We should put every day to learn the knowledge, technology, or reading experience, with their own way to express. It can be posted on blogs, public accounts and other platforms, as well as through video.
Of all the platforms I bookmark, I will insist on sharing on each:
The blog site
Try we-media
What is we-media? From the point of view of the name attribute, it is very simple, is to do their own media, their own things to share, is the media.
As for me, I think we-media is very promising, and many people say that which type of we-media is very late. I think it’s never too late if you put your mind to it. Success belongs to those who hold out to the last.
I have also shared some thoughts and conclusions about we media before:
“Indispensable multi-platform synchronization and a little assistant for we-media people”
“In the era of everyone we-media, how should programmers make good use of their advantages? I remember these artifacts…”
“We media sharing for ordinary people | all things are difficult at the beginning, dare to share ourselves, we are all great!”
We need to collect and sort out some of the tools that need to be used in all aspects, so that we can use them like a duck to water:
We media creation tool
Read the official documents
Official documents are much better for getting started than blogs and forums. When we encounter many problems and technical details, we will carefully go through the official documents, and you will find that many problems and fuzzy areas will become clear.
Programmers should have the ability to learn a technology through official documentation. If you master this ability, you will have the foundation to learn all other technical frameworks. And the most original official documents, but also exercise your self-learning summary ability.
Examples of official Spring documentation:
Official Spring Documentation
Cultivate self-study ability
Programmers, no matter suitable, should have a heart to keep learning, because technology updates quickly, demand changes quickly, we do not learn will be eliminated.
Opportunities and challenges will only be allocated to those who are prepared. When we have the opportunity to enter a better company, we still need to rely on our own hard strength. At this time, if we accumulate knowledge through self-study for a long time, I believe we can seize any opportunity.
I think self-study should start from the following aspects:
• Set your course first • Prepare for long periods of hardship • study regularly and purposelessly • Study in a quiet place • Take advantage of available online resources and books **
Although I work in Java, I have the time to read books in other languages:
Technical books
English level
For us, since technical documents are in English, although we can read others’ documents by translating them into Chinese, it is not advisable to blindly believe in translation. After all, mistakes and omissions are sometimes unknown.
And we programming every day and dealing with English, a better English level, our code naming and so on will be a great help.
Here are some good software for practicing English:
• Behead with one hundred words • English for alpacas • Words for scallops • Youdao Dictionary • Fluent English
Recommended hundred words chopped:
The word cut
Expand your relationships
A programmer is a human who spends a lot of time at the computer. We don’t have much spare time, and we may work overtime on Saturday and Sunday, so we are very closed.
But we must take the time to maintain our network management. The pressure itself is also relatively large, with more friends, we can also be free to come out together, chat, talk about the future development. Everyone’s pattern is different, more communication, to progress.
Here’s how I maintain my network:
• Learn to connect. • Go to social events. • Learn from great people
Good logical thinking
Logical thinking ability is an essential ability in our study, work and life.
Having good logical thinking helps us to study, work and live efficiently. In short, practicing logical thinking can make us smarter, more confident and stand out from others.
• Systematic thinking: Consider the whole, focusing on each connection. • Think outside the box: Learn to innovate and increase curiosity. • Emotional control: Control your emotions properly. • Empathy: When a conflict occurs, put yourself in the other person’s shoes.
Time management skills
Time is money, efficiency is life, nothing more. In a society where most people procrastinate, what can be done about it?
In fact, mobile phones are the biggest influence on us now. Compared with most of us, when we have leisure time, we will have entertainment software (short videos and so on) on mobile phones to pass the time. To avoid this, we need some time management tools to improve.
Here are some of my favorite time management tools:
• Tomatotodo •Forest focus • Tick list • Small daily •Pendo• Block time • Minimalist •Todolist
Recommended tick list:
Tick list
The last
Ha ha, sorry, because for a long time no more, so this article on the writing a little too much, but also to make up the owed article. But the list above I’m sure you’ll get something out of it if you put your heart into it.
It is true that the most important skill in software development is to improve the technology, as long as the task is completed, but I don’t think it is advisable to program solely for the purpose of completing the company code.
We also need to think about our future, because the 35-year-old decision will come to us sooner or later, so we need to keep improving our skills in order to prepare for that.
The last word: hard power determines the lower limit, soft power determines the upper limit. The soft power beyond coding is also a source of power for us to keep moving forward. Let’s refueling together!