Skip to content

Commit 28fb8d0

Browse files
Ranga Rao KaranamRanga Rao Karanam
Ranga Rao Karanam
authored and
Ranga Rao Karanam
committed
Adding Content
1 parent 7429be4 commit 28fb8d0

8 files changed

+134
-1
lines changed

README.md

+134-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,130 @@
11
# Java Best Practices
22
Best practices in Coding, Designing and Architecting Java Applications
33

4-
54
## Coding
65

76
###How to become a good programmer?
87
![How to become a good programmer?](images/BecomingAGreatProgrammer.png)
98

9+
###Ask Why?
10+
- Ask Why?
11+
12+
### Should I be an expert at all Design Patterns?
13+
- My personal view : Design Patterns are good to know. Have a good idea on what each one of them does. But, that where it ends. I’m not a big fan of understanding the intricate details of each Design Pattern. You can look it up if you have a good overall idea about Design Patterns.
14+
- Full Video on Design Patterns : https://www.youtube.com/watch?v=f5Rzr5mVNbY
15+
- Java EE Design Patterns : https://github.com/in28minutes/Java-EE-Design-Patterns/blob/master/JavaEE%20Design%20Patterns%20and%20Architecture%20-%20Presentation%20v0.7.pdf
16+
- Java Design Patterns : https://github.com/in28minutes/Design-Patterns-For-Beginners/blob/master/DesignPatterns-Presentation.pdf
17+
18+
### What is TDD?
19+
20+
### What is BDD?
21+
22+
### What is ATDD?
23+
24+
### What are NFRs?
25+
26+
### What is Sonar?
27+
28+
### Do not be fooled by Code Coverage?
29+
30+
### How can you increase performance and reliability of applications using Queues?
31+
32+
### What are the most important coding standards?
33+
- Complexity of a method
34+
- Naming variables, methods and classes
35+
- Size of methods and classes
36+
- Number of parameters
37+
38+
### Why is unit testing important?
39+
40+
### Why should a good programmer understand Mocking?
41+
42+
### Why is it important to have an API Standard?
43+
- YARAS
44+
45+
### Why should you create a reference component?
46+
47+
### What is the importance of Logging and Centralized Monitoring?
48+
49+
### What happens behind Maven? What is a Repository?
50+
51+
### Automate! Automate! Automate!
52+
- Why is it important?
53+
- Personal Experience with Deployment Automation, Providing user screen with requests/responses
54+
55+
### When should you have multiple CI builds?
56+
57+
### Why is performance of Unit Tests important?
58+
59+
### What are Cloud Native Applications?
60+
61+
### What are micro-services?
62+
63+
### Why should you avoid floats for Calculations?
64+
65+
### Why is it important to use Continuous Integration from Day 0 of the project?
66+
67+
### What is a vertical slice? Why should you need it?
68+
69+
### What is defensive programming?
70+
71+
### Why should you have minimum scope for variables?
72+
73+
### Why should you understand performance of String Concatenation?
74+
75+
### Why should you optimize judiciously?
76+
77+
### What are the best practices with Exception Handling?
78+
79+
### When is it recommended to prefer Unchecked Exceptions?
80+
- Spring Framework
81+
82+
### When do you use a Marker Interface?
83+
84+
### Why are ENUMS important for Readable Code?
85+
86+
### Why should you minimize mutability?
87+
88+
### What is functional programming?
89+
90+
### Why should you prefer Builder Pattern to build complex objects?
91+
92+
### Why should you build the riskiest high priority features first?
93+
94+
### Why should you have api & impl in each layer maven projects?
95+
96+
### Why should you create small components?
97+
98+
### Why should you have coding standards?
99+
100+
### Why should you migrate to GIT?
101+
102+
### What are the 4 Principles of Simple Design?
103+
104+
### What is Pair Programming?
105+
106+
### Whatt are Best Practices of Distribute Agile?
107+
108+
### Why is readable code important?
109+
110+
### What is component based architecture?
111+
112+
### Why should you commit your code often?
113+
114+
### What is use of Maven Parent POM?
115+
116+
### Why should you write unit tests with/before code?
117+
118+
### What are version control best practices
119+
- Do not commit derived files.
120+
- Do not commit IDE files.
121+
- Commit often
122+
- Use Git
123+
124+
### A few design patterns...
125+
126+
### Why do Stateless applications perform better?
127+
10128
###Code Quality Overview
11129
![Code Quality Overview](images/CodeQuality.png)
12130

@@ -18,6 +136,12 @@ Best practices in Coding, Designing and Architecting Java Applications
18136
- Next question is how to approach a Code Review. Difficult to cover everything. I would make a start. When doing a code review, I start with static analysis results (for example, sonar). I spend 10 minutes getting an overview of components and/or layers (focusing on size and dependencies). Next I would pick up a unit test for a complex functionality. I feel unit tests are the best place to discover the dependencies and naming practices (I believe good names = 50% of maintainable code). If a programmer can write a simple and understandable unit test, he can definitely write good code. Next, I look for 4 principles of Simple Design. After this, there are 100 other things we can look for - You decide.
19137
- PDF - https://www.mindmup.com/#m:a1972695706ab201340d4b0beac29b8bfc
20138

139+
### Why should you not take code quality tools at face value?
140+
- If a project has a great Sonar report, does it mean it is perfect?
141+
- Nope, code quality tools are just a guidance!
142+
- Your focus should be to write code that adheres to "4 Principles of Simple Design"
143+
- Peer Reviews are necessary!
144+
21145
## Performance
22146

23147
- First and Foremost - NO premature optimizations. Any optimization decision should be based on numbers or past experience. In Donald Knuth's paper "Structured Programming With GoTo Statements", he wrote: "Programmers waste enormous amounts of time thinking about, or worrying about, the speed of non critical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%."
@@ -94,6 +218,9 @@ Most important qualities I look for in an Architect are
94218
### REST Web Services
95219
- PDF https://www.mindmup.com/#m:g10B8KENIDghuHAYmFzM0daOU80SDA
96220

221+
#### How should you document your REST Web Services?
222+
- Swagger
223+
97224
### Distributed Cache
98225
![Distributed Cache](images/DistributedCache.png)
99226

@@ -204,6 +331,12 @@ Listed below are some of the important considerations
204331

205332

206333
## Indian IT
334+
### How to create Good Programmers?
207335

208336
## Campus Interview Guide
209337
- https://docs.google.com/document/d/1IP6HNgpMdCAAJEREowfBj2XPLBrPcIIFNIGFPGX0-ao/edit#heading=h.byb5dl2v0c4p
338+
339+
## Framework Comparison
340+
- Spring MVC vs Struts
341+
- Mockito vs EasyMock
342+
- Mockito vs JUnit

pdf/.DS_Store

6 KB
Binary file not shown.

pdf/CodeQuality.pdf

389 KB
Binary file not shown.

pdf/CodeReview-BestPractices.pdf

951 KB
Binary file not shown.
1.06 MB
Binary file not shown.

pdf/LayeringInJavaApplications.pdf

861 KB
Binary file not shown.
735 KB
Binary file not shown.

pdf/SecuringYourApplication-OWASP.pdf

1.73 MB
Binary file not shown.

0 commit comments

Comments
 (0)