I learned a wide range from setting up JUnit 5 to executing various assertions and how to migrate from 4 (old version). I knew that the API was renewed in JUnit 5, but I couldn't understand exactly what changed and how it changed, so it was helpful.
Examples of improvements made in JUnit 5 included the following material. All of them were inconvenient when I was using JUnit 4, so I would like to use them immediately.
--Perform multiple assertions in one test method -(4) If any one fails, no further assertions will be executed -(5) If you use the assertAll method, all assertions will be executed regardless of success / failure. --Testing for exceptions -(4) Specify (expected = XXXException.class) and class name --More ingenuity when you want to test exception messages -(5) Use assertThrows method --It's easier to test exception messages --Structured tests (how to group tests) -(4) Declare a public static inner class -(5) Add @Nested annotation to inner class (other than public static)
Despite these benefits, I also learned that the benefits of replacing an existing test (written before JUnit 4) are not significant. In the future, it seems that new tests will be written in JUnit 5 while existing tests will be run in JUnit Vintage.
I learned how to use Kotlin, which became the first language of Android development at Google / IO in 2017, on the server side. Combined with Kotlin and Spring Boot, you can develop fairly efficiently.
--Convenient Kotlin syntax --Property syntax - companion object --Named arguments / default values of arguments
However, you may need to be careful when using it with the Spring Boot function.
-(Example) When using the default value in the argument of the method for Controller -Use defaultValue of @RequestParam annotation --If you create a default value for Kotlin, an exception will occur when Spring starts.
I also found that using the auxiliary functions of the IDE (IntelliJ IDEA) makes it possible to write more Kotlin-like code efficiently. Even if you don't have much knowledge about Kotlin, you can introduce it little by little.
This session explains what you are careful about when developing an advertising server for SmartNews, mainly from the perspective of "code review."
SmartNews code reviews focus on "what the product should be" rather than the correctness of the program. Therefore, the review is conducted while reading the background materials and papers, and it takes considerably longer than when looking at the program alone. However, it seems that problems caused by the program rarely occur because the review is done after understanding the background firmly.
The following items were mentioned in the code review points.
--Isn't it implemented with old Java (SE 6 level) knowledge? --How to specify the character code --How to handle files --Are you aware of run-time efficiency? --Use Map and Array properly -Do you maintain a secure data structure? -Is the setter published to the outside with @ Lombok.Data?
I also learned some tips on how to measure to find bottlenecks. Access to SmartNews will increase rapidly at certain times (such as around 7 am and extra announcements). In order to respond to this access, it seems that the maximum load (number of accesses) for a certain period of time is measured instead of measuring the load at that time at regular intervals.
Some of the points pointed out in the review included what I usually wrote unconsciously. I want to improve little by little as much as I can.
Following on from ccc_m4, we talked about SmartNews' advertising server. This session focuses on the management screen and data structures. I was surprised that even if the story was about the same product, the content would be completely different if the cuts were different.
Within the ad server, it is more important to maintain consistency by properly dividing huge data and sharing the processing, rather than "not destroying" the data. When splitting data, be aware of the problems that each function needs to solve.
--Ad Server: Efficiently deliver large amounts of data --Ad Frontend (administrative tool): Display data in an easy-to-understand manner
As the number of functions increases, conversion work will be required at the part that connects each. The conversion work is prone to malfunctions and is the "dirty" part of the system. SmartNews is designed to let Ad Frontend take on this "dirty role" so that other features can focus on their responsibilities.
With these ideas, the development of SmartNews maintains Productivity (a concept that summarizes extensibility, mobility, safety, etc.).
I would like to develop huge data not only by dividing it, but also by being aware of each relationship and keeping the overall complexity as low as possible.
It is a session to roughly grasp from inexperienced Docker to starting the container where the Web server built with Spring Boot is placed. It's been a while since Docker became famous, but I missed the opportunity to touch it in earnest, so I decided to take this opportunity to re-introduce it.
As long as you have the Docker client installed, you can download the container image and start the container with simple commands. Many of the commands were easy to understand if you touched git or Maven.
--Command example --docker pull: Download the published Docker container image --docker run: Start the container --docker build: Build a container based on DockerFile (configuration file)
I missed the timing once, so I was very grateful to be able to participate in a session for inexperienced people at this time. It was something that I could start on my own, so I decided to proceed little by little.
At JJUG CCC, there are other things you can do besides listening to a session.
--See the exhibition booth ――You can ask questions and talk at some booths. --You can also get a yo-yo --Participate in the unconference
At the unconference, the agenda will be solicited on the day of the event and all participants will discuss it. I attended a time when information gathering and programming education were on the agenda.
People involved in Java from various perspectives participate in the JJUG CCC. The good thing about the unconference is that you can hear each opinion. On the agenda of what to ask for programming education, a wide range of opinions were raised, from how to write code to the underlying theory (algorithm). Everyone was convinced that "I want you to wear a heart that won't break even if you see an error", and there were scenes where laughter occurred.
If you find it difficult to talk to yourself at a social gathering, you may want to take advantage of these opportunities.
Not limited to JJUG CCC, at study sessions, information before it is compiled in books etc. may be shared. The subject of this session was the system under development right now. Information on the "raw" of the site, such as the flow from failure of prototyping to reconstruction using the concept of DDD, what was effective in it, problems that are occurring, etc., was released almost as it is. It was.
--Example of what was effective --Include program naming conventions when deciding on a ubiquitous language --Predetermine the viewpoint of source code review --Example of the problem you are having ――The parts that are not specified in the coding standard will be separated. --A lot of work (translater) is required to translate the concept for each domain.
There are few opportunities to know the process of trial and error. By knowing the process from gaining knowledge to utilizing it in development, DDD, which I thought was a high hurdle, became a little closer to me.
Recommended Posts