This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void main(String[] args) { | |
| T t = new T(); | |
| C c = new C(); | |
| c.a = "a"; | |
| C c1 = new C(); | |
| c1.a = "b"; | |
| t.a.addAll(List.of(c, c1)); | |
| Finder finder = new Finder(t); | |
| C finded = finder.find("a"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Целеполагание | |
| Например, тебе дали таск, где нужно пофиксить какую-то незначительную проблему, | |
| НО гуляя по модулю, вдруг, ты заметил огромную проблему в производительности/ архитектуре и, ествественно, | |
| ты захотел исправь этот код - сделать его идеальным | |
| Что делать в таком случае? Перед тем как садиться делать эти "улучшения" - задай себе ряд вопросов: | |
| 1) Решена ли моя основная задача? | |
| 2) Насколько важно сейчас заниматься этими "улучшениями" (можно так же доложить о проблеме ТЛ или менедержеру, чтобы посоветоваться)? | |
| Нужно понимать для чего ты делаешь эти улучшения и кому они будут полезны |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Made this class fully public for next extend cases | |
| * For now it's unclear is this need to split FileContent class to different ones | |
| * | |
| * F.e. ParsedFile could have two methods returning SimpleContent and UnicodeFreeContent | |
| * And each *Content class could have unique logic in it | |
| * | |
| * ParsedFile is thread safe because of immutability | |
| */ | |
| class FileContent { |
OlderNewer