Sobes.tech

How are you generally with DevOps technologies — Kubernetes, CI/CD, and others?

192

How do you feel about AI potentially replacing developers? How do you see development in 2-3 years?

192

import java.util.Arrays; import java.util.HashMap; import java.util.Map; public class badCounter { public static Map<String, Integer> mapOfBadNames = new HashMap<>(); protected void doProcessing(String filePath) throws IOException { try { FileInputStream fis = new FileInputStream(filePath); BufferedReader br = new BufferedReader(new InputStreamReader(fis)); while((br.readLine())!=null){ processWords(br.readLine()); } br.close(); fis.close(); } catch (IOException | NullPointerException ex) { System.out.println(ex.getMessage()); } } private void processWords(String line) { Arrays.stream(line.split(" ")) .map(String::trim) .forEach(word -> { if(mapOfBadNames.containsKey(word)){ mapOfBadNames.put(word, mapOfBadNames.get(word)+1); } else{ mapOfBadNames.put(word, 1); } }); } public void writeResultToFile(String path) throws IOException { try { PrintWriter out = new PrintWriter(path); out.println("word,frequency"); for(Map.Entry<String, Integer> entry : mapOfBadNames.entrySet()){ out.println(entry.getKey() + "," + entry.getValue()); } out.close(); } catch (NullPointerException | IOException ex) { throw new RuntimeException("Error writing to file", ex); } } public boolean isEverythingFine() { return true; } public static void main(String[] args) { badCounter bcn = new badCounter(); try { bcn.doProcessing("bad_input.txt"); bcn.writeResultToFile("result.csv"); bcn.doProcessing("bad_input1.txt"); bcn.writeResultToFile("result1.csv"); } catch (IOException ex) { System.out.println("Something went wrong"); } } }

Senior
191

What is the difference between Hibernate and JPA?

Senior
191

Can the argument of a method be considered a temporary variable inside a function?

Junior — Middle
191

Is it possible to implement a RESTful API relying entirely on the DELETE HTTP method for all operations?

Junior — Middle
191

In what form did the requirements for the tasks come to you?

191

How to solve the data inconsistency problem: an external call was successful, but saving to the database failed?

191

How can you view or display the current Instance object in the program?

Junior — Middle
191

If there is a chain of objects that refer to each other, at what point can a specific object be deleted?

191

If the number of tasks is floating (from units to hundreds), what type of thread pool should be chosen?

Senior
191

What are Spring Boot starters? How do they differ from regular libraries? What is auto-configuration?

191

What are your thoughts on writing tests?

191

Are there any restrictions on indexes? What types of indexes exist (hash, B-tree) and when should they be used?

191

List the transaction isolation levels and briefly explain their purposes.

191

What alternatives to the Outbox Pattern exist?

Senior
191
/730