Translation | How to become a qualified agile developers

Blog publishing platform from the original medium, authored by better-programming of Ravi Shankar Rajan, Portal

If you want to know what agile development, first of all you have to first understand what is agile development.

Agile development is a term used to describe an iterative and incremental software development methodology, such as:

  • scrum, the most popular Agile framework for product development management
  • kanban, can help developers make in the development of a methodology of planning tasks
  • Limit development to provide a methodology for the completion of a series of rules specific project development for developers

And, an agile developer does not mean developers who retire tying themselves in a separate space, wearing headphones to enjoy music, you think of it. Agile development roles in the developer is significantly much more broad and diverse.

Agile developers are more concerned with sustainable development. Good sustainability means to assess, efficient code branch management strategies to ensure the quality of automated testing and continuous deployment for obtaining rapid feedback from users.

All this means that the entire organization should receive, the quality is much more important than deadline and schedule planning, this concept.

In other words, the cornerstone of agile development is to convert the area into a dynamic variables (like every changing business / market needs), in order to ensure the quality of the team, to build a vibrant cultural development and to maintain close of business.

Also, as a work in the agile developer environment, it is important that they need to understand all agile development methodologies, tools and guidelines followed in the organization.

In addition, agile developers should have good communication skills for teamwork and talking with customers.

Most importantly, the realization of agile developers should understand the entire development process of the organization and processes.

Here and there are no shortcuts, but the practical point listed below can help you better integrated into agile application development, test, and debug in.

Intent-oriented programming

Intent-oriented programming suitable conditions to learn any programming language.

When we learn any language, it will naturally tend to break the problem into a series of functional steps. The higher refining step, you'll be able to better understand the underlying language. This technology is confirmed this.

Intent-oriented programming is that writing code than step by step, imagine that you own has in place appropriate methods and practices to the current situation will seem a better solution to the problem.

Ask yourself: "What are the input and output such an ideal method requires it as well, for me now, how to make my own name was impressed to make me feel this approach already exists??"

Also, since the method does not actually exist, so in addition to your own imagination, and other factors will not affect you.

Reflection in the following code:

REPORT ysdnblog_class_ideal.
parameters : p_rows type count default ‘100’.
* — — — — — — — — — — — — — — — — — — — — — — — -*
* CLASS lcl_main DEFINITION
* — — — — — — — — — — — — — — — — — — — — — — — -*
CLASS lcl_main DEFINITION.
PUBLIC SECTION.
CLASS-METHODS : start.
PRIVATE SECTION.
METHODS : get_data ,
display.
CLASS-DATA : lr_main TYPE REF TO lcl_main.
DATA it_mara TYPE mara_tt.
ENDCLASS. “lcl_main DEFINITION
* — — — — — — — — — — — — — — — — — — — — — — — -*
* CLASS lcl_main IMPLEMENTATION
* — — — — — — — — — — — — — — — — — — — — — — — -*
CLASS lcl_main IMPLEMENTATION.
METHOD start.
CREATE OBJECT lr_main.
lr_main->get_data( ).
lr_main->display( ).
ENDMETHOD. “start
METHOD get_data.
 — — WRITE SOME CODE HERE……
ENDMETHOD. “GET_DATA
METHOD display.
 — — WRITE SOME CODE HERE……
ENDMETHOD. “display
ENDCLASS. “lcl_main IMPLEMENTATION
START-OF-SELECTION.
lcl_main=>start( ).

start() The method is a public method called when the current class performance reports.

Other methods, get_data()and display()is a private method of the class, they will only be invoked within the class object. We will simply call these methods are known as functional steps.

The key is that they are implemented as part of an internal class, rather than for external exist.

Of course, they have not truly realized. So when you try to compile this code, the compiler will throw an error indicating that they do not exist, they must be able to write the job as compiled code.

That's the next thing we need to do.

In the intent-oriented programming, we allow ourselves the attention on how to break the problem into the needs of the whole environment.

We do not prepare and execute the kind of large blocks of redundant code. We have to do is to code into functional blocks step by step and step by step, they have achieved.

I think under the following functional steps implemented get_data()and display().

METHOD get_data.
SELECT * FROM mara INTO TABLE me->it_mara UP TO P_rows ROWS .
ENDMETHOD. “GET_DATA
METHOD display.
DATA : lr_table TYPE REF TO cl_salv_table.
cl_salv_table=>factory( IMPORTING r_salv_table = lr_table
CHANGING t_table = me->it_mara ) .
lr_table->display( ).
ENDMETHOD. “display

In this whole process, not too much change. We are just in different ways and different rules to simply write the code only.

Test-driven development (TDD)

When you first use the TDD Perhaps you will find it very strange.

Why is this so? To write unit tests? Who would do such a stupid thing?

Having said that, but it's one of the most important agile development concepts.

Let's take a simple example to illustrate the next bar.

This example assumes that we have a method with SUMthe class LCL_SUM. The role of this method is to increase the operating numbers.

It combines a digital as the most important parameters of the object itself and its addition operation to obtain a result, now let's put this method is called method of producing it.

This class code as follows:

CLASS lcl_sum DEFINITION.
PUBLIC SECTION.
METHODS: SUM IMPORTING iv_1 TYPE i
RETURNING VALUE(rv_sum) TYPE i.
ENDCLASS. “lcl_sum DEFINITION
*
START-OF-SELECTION.
* Nothing here yet
*
*
CLASS lcl_sum IMPLEMENTATION.
METHOD SUM.
rv_sum = iv_1 * iv_1. "我故意使用乘法而非加法来产生错误" sum
ENDCLASS. “lcl_sum IMPLEMENTATION.

Write test classes

Now we write a test class.

In the SAP which, when you define in this class you need to add keywords FOR TESTING. Thus these may be separated from the manufacturing code (production code) in.

CLASS lcl_test DEFINITION FOR TESTING
PUBLIC SECTION.
METHODS: m_sum FOR TESTING.
ENDCLASS. “lcl_test DEFINITION
*
CLASS lcl_test IMPLEMENTATION.
METHOD m_sum.
ENDMETHOD. “m_sum
ENDCLASS. “lcl_test IMPLEMENTATION

Test Method Implementations

In this test method, you need to do is to test the production code.

Therefore, in order to test LCL_SUMthe SUMmethod, you need to instantiate LCL_SUMthe referenced object, and call the method SUMand pass virtual data.

Based on these virtual data, the method returns the actual results of the method.

Based virtual data, you will know what expectations Yes. Into the sunset, if you will 3 passed as a parameter to the SUMmethod, it will return 6, because of the increased 3.

When the actual results obtained from the production code or method tested, you need to compare the results.

If the actual and expected values ​​are not the same, you need to let the system know that there is a problem and show them some appropriate information.

CLASS lcl_test IMPLEMENTATION.
METHOD m_sum.
DATA: o_cut TYPE REF TO lcl_sum.
DATA: lv_result TYPE i.
*
CREATE OBJECT o_cut.
lv_result = o_cut->sum( 3 ).
*
cl_aunit_assert=>assert_equals(
EXP = 6
act = lv_result
msg = ‘something wrong in output’
).
ENDMETHOD. “m_sum
ENDCLASS. “lcl_test IMPLEMENTATION

Unit testing results

This reminds me achieve some of the production methods of error.

For, if you carefully observe the SUMimplementation of the method, I have an error. I was using multiplication rather than addition. So I need to correct it and re-run tests to verify successful.

We often spend before attempting to compile or run code on a lot of time writing code. However, the code execution and testing where each takes only about two minutes.

So, in short, is to follow the TDD, first write unit tests, and then write the specific code, then reconstructed final undone , this principle to achieve short development cycle development.

Unit testing is an automated test for checking whether the expectations expected to work. Your first unit test case should fail because it was written out before you write any code.

In this approach, the perfect point you to the test, the perfection in production code. Both tags together with increasing mutual maintenance. As a test case for the production of antibodies and antigens as the code.

The package everything

The rule of thumb which is: according to the policy package, on-demand call (encapsulate by policy, reveal by need).

When in doubt, hide it; when there is a need to call them.

When the abstract problem solving, hide and packaging.

Abstract means: "You are allowed to a higher point to observe all the details of the object", while packaging a step further, it means: "You are not allowed to observe all the object through the minutia at any level."

This is the inheritance, the origin of the concept of.

When designing any software system, we often look for very similar objects.

For example, when designing a contract system, we can find many different kinds of contracts (full-time, temporary, assets, contracts, etc. irritating), but the general attributes of each contract is the same.

Therefore, you can wear a piece called contractgeneric object, then the definition of fixed price(full-time) contract as a successor contract with additional object class and attributes, and so on.

Inheritance simplifies the design because you through the preparation of a common object to handle everything and write specific object to handle specific scenarios.

Code becomes not only "clean", and also to use this class to inherit the developer provides an excellent way to separate unnecessary detail.

Inheritance is object-oriented programming in one important idea. It is a double-edged sword, when used properly can provide great help; when used incorrectly will bring great harm.

Simply put, we should make every effort to be able to package things encapsulation, because it simplifies our maintenance process.

Oriented interface design (IOD)

Typically, the port is connected to another entity - a method, a class, or a program module, one way.

Common Interface form:

  • Can set access methods object.
  • Protocol, such as file transfer protocol (FTP) or Simple Mail Transfer Protocol (SMTP).
  • Programmatic interfaces, such as web service.

And, for the design of the interface from implementation layer defining layer to carve away. The key is to ensure that the design can be simplified so that the testing becomes easier, and improve maintainability.

Interface only signature (name, parameters, and return type of call after expectations) contains a set of methods. Interfaces can not contain data members (attributes), because it means that the implementation step.

Definition and separation to achieve the design has obvious advantages. It allows the performance of the test, and an external (e.g., external format) implemented easily accomplished and can be replaced with an internal separation significantly.

The same API, you can programmatically internal interface provided from an external supplier (third-party interfaces) or development group to be separated. Needed to develop their own interfaces and adjust them.

So you can feel free to create a clean, easy to adjust and readable code.

prototype

Agility work in an iterative mode and prototype iterations required work needs to be presented and discussed on a regular basis.

Perhaps the biggest advantage is the ability to prototype design of visual performance feedback; a map, even if small scale and then, also came more useful than a thousand words. Pictures not only help us to confirm the feasibility of the design, but also help to obtain the necessary "identity" and approval to continue to advance.

Prototyping can also serve as a one-time model to understand the project before design and coding requirements. In essence, the prototype is the touchstone of the project.

Even if you have already made numerous changes to the design, in the process of software development, there will still be many unexpected problems occur.

Prototype testing can at least let the team know where the problem lies and that they have the opportunity to follow up before the software is released.

Use the principle (discipline) together, the prototype will become the main tool developers, and for conflict code and design.

Can refer to the iPhone, this reward can be very great.

Last words

Agile development is not just a series of rituals. It is a culture and philosophy of technology.

It is through the practice of raising the personal capability, thereby building a solid foundation of technology in their products and generate cultural cooperation in the team.

A core principle of agile development is steady progress, which, in turn, also allows you to steadily deliver the product, rather than sporadic work finally what can be output.

Developers will be more invested in the Agile team, write better code and more fun. They tend to write code maintainable, build a good relationship and to have a clear assignment of the final return projects.

In the true sense of teamwork is getting better, continue to improve.

Like Edison said it:

There is a way to do it better — Find it.

Small speakers

Guangzhou reed Java technology development team

Reed Technology - Internet software services company specializing in Guangzhou

Guangdong micro-channel public number Outsourcing | nail development | micro enterprise development letter | small micro-channel process outsourcing | small game production | H5 construction

Our public concern number to find out more

We want to fight with you? lagou search for " reed technology " or put your resume to [email protected] join us.

img

Follow us your comments and point us praise our greatest support

Guess you like

Origin blog.51cto.com/14517592/2432512