[VV7] Diamond Operator, RestController, react GET, product backlog, green picture, growth mindset, typing speed
JAVA CERTIFICATION QUESTION: Generics and collections
Given:
List/* Spot 1 */ list = new ArrayList/* Spot 2 */();
At which position can the diamond operator '<>' be inserted without throwing a compilation error?
From Oracle Java trails:?https://bit.ly/3M1aCLM
You can replace the type arguments required to invoke the constructor of a generic class?with an empty set of type arguments (<>) as long as the compiler can determine, or infer, the type arguments from the context. This pair of angle brackets, <>, is informally called the diamond. For example, you can create an instance of Box<Integer> with the following statement:
Box<Integer> integerBox = new Box<>();
·? s? ???su? ??? :uo?sn???o?
SPRING CERTIFICATION QUESTION: What is the difference between '@Controller' and '@RestController'?
'@RestController' is a compound annotation, which is meta-annotated with '@Controller' and '@ResponseBody' annotations.
Thus response-request bodies are a subject of http-converters omitting view-model phase.
One might prefer to use '@Controller' and '@ResponseBody' annotations instead; '@RestController' is just a convenience annotation.
@ResponseBody ???https://lnkd.in/efNxXiCn
@RestController/@Controller ???https://lnkd.in/ea_v5AMS
QUOTE
REACT: Do a simple HTTP GET
?? How to call ?? a backend to read data via REST API in React
So it was time for me to learn how to interact ?? with the backend with a react App.
And I used Axios to do so.
Axios is a simple promise-based HTTP client for the browser and node.js. Axios provides a simple-to-use ?? library in a small package with a very extensible interface.
So I coded ?? ?? a simple react app which:
1?? fetch ?? with axios a data object in the JSON format
?function fetchActivityHandler() {
fetch('https://www.boredapi.com/api/activity').then(response =>
? response.json()).then(data => {
? console.log(data);
? setActivity(data);
? });
?}
2?? display ?? its fields in the middle of the screen
?return (
?<div className="App">
? <header className="App-header">
? <p><h3><b>Activity</b>: {activity.activity}</h3><br /></p>
? <p><b>??? Type</b>: {activity.type}<br /></p>
? <p><b>?? Participants</b>: {activity.participants}<br /></p>
? <p><b>?? Price</b>: {activity.price}<br /></p>
? <p><b>?? Link</b>: {activity.link}<br /></p>
? <p><b>?? Key</b>: {activity.key}<br /></p>
? <p><b>? Accessibility</b>: {activity.accessibility}<br /></p>
? </header>
?</div>
?);
Here is the code ?? if you wanna play with it, just download it??, and run it from its directory with 'npm start'??
GREEN IT Developer ????: Avoid using bitmap images for the interface
It is important to choose the right ?? image format to avoid sending unnecessary bytes and thus save bandwidth ??. Moreover, vectors should be used instead of bitmaps as screens and resolutions continue to grow.
By doing so, the interface does not depend on the screen’s resolution??. This also limits the technical debt ??.
The first rule is to replace bitmap images??? (GIF, PNG, JPEG, WebP, etc.) with styles ??(CSS), pictograms, glyphs, or icons provided for by a web font or standard typeface. This prevents the user from having to download ?? additional ? resources.
If you are unable ? to use CSS or a standard typeface (already installed on the user’s device), you could instead use:
领英推荐
Fo example a 198 x 198 px image is: - 118 KB as an uncompressed bitmap - 6.5 KB as a JPEG (90% compressed) - 3.8 KB as a PNG - 0.7 KB as a minified SVG
In this case, the vector is 5-10 times smaller than the bitmap and can also be resized indefinitely.
SCRUM: Product Backlog
The Product Backlog is an emergent, ordered list ?? of what is needed to improve the product. It is the single source of work undertaken by the Scrum Team.
Product Backlog items that can be "Done" ? by the Scrum Team within one Sprint are deemed ready for selection in a Sprint Planning event. They usually acquire this degree of transparency after refining activities. Product Backlog refinement is the act of breaking ?? down and further defining Product Backlog items into smaller more precise items ??. This is an ongoing activity to add ? details, such as a description, order, and size. Attributes often vary with the domain of work.
The Developers???????? who will be doing the work are responsible for the sizing ???. The Product Owner???? may influence the Developers by helping them understand ?? and select trade-offs ??.
Commitment: Product Goal
The Product Goal describes a future ?? state of the product which can serve as a target ?? for the Scrum Team to plan against. The Product Goal is in the Product Backlog. The rest of the Product Backlog emerges to define “what” will fulfill the Product Goal.
A product is a vehicle to deliver value. It has a clear boundary, known stakeholders, well-defined users or customers. A product could be a service, a physical product, or something more abstract.
The Product Goal is the long-term objective for the Scrum Team. They must fulfill ? (or abandon??) one objective before taking on the next ??.
SOFT-SKILL: Fixed mindset versus Growth mindset.
Have you ever heard somebody tell you: "You are bad at it, you will never succeed in this." ?? This is typically a fixed mindset. ?? ♂? Neurosciences have proved that the human being is gifted to fit with a growth mindset. ?? ♂??? ♀?
The human being can learn and change his situation. ??Let's spot the inconsistencies of a fixed mindset in several topics:
???????????????
???????????????????? ??
???????????????
???????????????? ???
?????????????????
POLL RESULTS: ?? Typing skill: how good you are?
? Check your level here???https://lnkd.in/e_Zftu8H
The fastest typists in the world, with speeds ranging from 160 WPM – words per minute – to over 300 ??, don’t “need” to type so fast that no one can hear over the sound of their clattering keyboards. But typing that fast gives them a distinct advantage ?? in their chosen careers, and wins awards ?? to boot.
The average typing speed is about 41 WPM, with an accuracy rate of 92%. There is nothing wrong ?? ♂? with typing more slowly than this, but it can impact your ability to take notes ??, write documents, and keep up with a competitive ?? ?? workplace. Learning to type faster will improve your professional profile.
PS: My typing speed is 47WPM ?? (with an accuracy of 100%)
CSS JOKE
My 2cents?? box-shadow: -2px 10px 10px black; (for the dog shadow inside the white box)