Pragmatic Approach Case Android Developer
Pragmatic Programmer is required book reading for every programmer, a book by Andy Hunt and Dave Thomas was helped a generation of programmers examine the very essence of software development, independent of any particular language, framework, or methodology. It can help programmer how to code in a way or a best practice that can be followed
In 2nd Chapter of the book was tell us about how to approach pragmatic concept and there are some example case.
- DRY Concept
Don’t Repeat Your Self is basic concept to reduce inconsistent of code. As defined Andy & Dave “Every piece of knowledge must have a single, unambiguous, authoritative representation within a system”.
Characteristic of repetitive code is every change logic of code, must be changed in one place. Here are some example
- Reuse able component
- Function util or extension
- Group codes by function
2. Orthogonality
It’s mean that code than we create must decouple. We must separate two or more things or activities. If we change one code isn’t impact to other things so we didn’t get more bugs
- Define correct architecture
Use architecture base on your needs. MVP, MVVM or MVI
- Use clean architecture
3. Reversibility
The code than we created must easy adapt for changes. If there are libraries or dependencies that need to be upgraded. our code will be easy to adjust without many changes.
- Use abstraction if using library
Use network factory abstraction when call remote data. It’s mean if change network library just change in the Network Factory Implementation
4. Domain Language
Business logic minded. Based on functionality of the app wrap it in to domain with same actor or depended data.
- Create domain by use case
5. Trace Bullet
Create code than glow in the dark, means that if we trace some cases or issues it can spawn object than can help to find problem.
- Skeleton Project
6. Prototype
Prototype to measure how code than we have created work well or other thing become a learning tools. Usually use unit test, it was become important things to measure of code quality.
- Unit Test, Mocking data
- Performance test
7. Estimating
To get conclusion what we will achieve, usually breakdown specific declaration of the objects. And give measured parameter
- Timeline estimation
Breakdown task by epic, be specific and detail, and then give parameter to measure. Count all time than we need by it’s parameter
As a developer their has own style and own point of view based on their concern. So more specific it is not pragmatic