Mostrar mensagens com a etiqueta SW Construction Process. Mostrar todas as mensagens
Mostrar mensagens com a etiqueta SW Construction Process. Mostrar todas as mensagens

sexta-feira, 4 de janeiro de 2019

BOOK: Optimizing Java

An interview with the authors can be found here:

https://www.infoq.com/articles/book-review-optimizing-java

Quoting:
"Key Takeaways

Performance tuning in Java is an experimental science.

There are no magic “go faster” command-line switches for the JVM.

There are no “tips and tricks” to make Java run faster.

The execution speed of Java code is highly dynamic and fundamentally depends on the underlying JVM.

The behavior of JIT-compiled code is significantly more important than the interpreter itself.

This book offers both theory and practice on how to performance tune in Java.

This is a comprehensive book that represents a tutorial for beginners and a reference for experienced Java performance tuning practitioners."

See also: JITwatch

quarta-feira, 22 de novembro de 2017

SW Construction: Generics and maintainability (C#)

http://www.dotnetcurry.com/patterns-practices/1381/using-generics-csharp-maintainability

Quoting:
"When we encapsulate data, we can change the internal representation of the data without affecting the consumers of the unit encapsulating the data.

On the other hand, when we don’t encapsulate data, the behavior units will access data (received as method parameters for example) directly and therefore they have a hard dependency on the internal representation of the data.

Therefore, when doing behavior-only encapsulation, it is harder to change the internal representation of data.

In this article, I am going to discuss how we can use generics in C# to make it easier to handle data-related change requests in software applications when doing behavior-only encapsulation."
(...)
"You aren’t gonna need it (The YAGNI principle)

Should we always separate data-independent and data-dependent logic into different classes?

Should we make our data-independent classes generic from the start?

Well, it depends.

But in most of the cases, we don’t have to.

In most of the cases, applications start small, and then they evolve with time. It is important to first concentrate efforts on meeting the requirements we have at hand. We can always refactor later to meet new requirements.

In a document processing application that processes plain text documents only, we can start normally without making the document type generic in the classes that deal with documents.

Later, when we need to introduce different documents types, we can refactor existing classes/interfaces to become generic, and we can also refactor to separate data-independent behavior and data-dependent behavior into different classes.

If we follow the SOLID principles (the Single Responsibility Principle in particular), chances are that separation of data-independent and data-dependent behavior, is already high. Also, refactoring in this case would be a lot easier compared to when our classes are very long."

quinta-feira, 24 de novembro de 2016

Process: SW Construction Process and its main work products

SW Construction Process:

While building your software (aligned with the gathered requirements - SRS - and the software design that your high-level architecture defines - SAS, and eventually the detailed design - DDS) several additional topics are relevant.

For instance:
- Shall the team code against any coding standard (is it a coding standard belonging to the project, to the company or is it external, e.g. imposed by a safety standard or by your contractor)?
- What kind of comments shall the team be producing, and what tags for doc extraction shall the team embed in comments (e.g. Javadoc)?
- Do we have a minimum % of comments to comply with?
- Shall the team also leave traceability hints in the source code (Class - Requirement ID, Class - Component ID, other)?
- What static analysis tool will it be used (and who is responsible to run it and analyze the reports)?
- What other static analysis measures shall the team abide for (cyclomatic complexity < X)?
- What integration tasks shall be configured in the CI server and under what well defined circumstances shall the build fail (e.g. shall it fail if 1 of the 10K unit tests fails or not)?
- What is the coverage goal for Unit Testing (if any - see the unit testing plan)?
- What is the coverage goal for Code Reviews (e.g. only certain well identified critical parts of the code shall be reviewed) and who is doing it? And so on.

While programming:
- Remember to keep on checking that "your code does not smell" and try not to follow the wrong guidelines and/or practices (e.g. "how to write unmaintainable code").
- And if the code "smells" (be it yours or from other programmer) you can always refactor it now or later on, "when the fire stops burning" - just make sure to take note of the need somewhere persistently (tip: "issue tracker").

The main work products and documents resulting after the phase where this process is being more heavily used are:
- The code (that could not be a deliverable - you could be delivering binaries only); includes unit test code;
- Updated end-user documentation: Manuals (administration, installation, user, etc.), online help.

Further Information:

Further information can be found in the following links in the DIGEST (some are INTERNAL):
http://silvaonsoftware.blogspot.com/2016/11/digest-sw-construction-further-reading_49.html