Posts

Showing posts from April, 2022

The More You Say, the Less People Remember The Fewer the Words, the Greater the Profit

Image
These wise words were written by François Fénelon, a writer and theologian living during the 17th century. This is an article summarising different approaches to the development of IT solutions. Learn why the above quote is very relevant for developers in the 21st century.   Business-driven development  is a meta-methodology for developing IT solutions that directly satisfy  business requirements . This leads to increased flexibility and shorter turnaround times when changing the business and adapting the IT systems.    This is achieved by adopting a  model-driven  approach that starts with the business strategy, requirements and goals and then refines and transforms them into an IT solution. Due to the alignment of the business and IT layers, it is possible to propagate changes in the business automatically to the IT systems.    This is partially replaced by Domain-Driven Design and Behaviour Driven Development in Agile terminology.  ...

Nine Core Java Questions

Image
My previous post with Eight Core Java Questions was popular so I created nine more. Please join the discussion of the answers for these questions on Twitter 1. Comment on this question How many elements does this set have? Set set = new HashSet(Arrays.asList( -0, +0, -0L, +0L, -0F, 0F, -0D, 0D, 0xF, 0xD, 0x0.DP+0)); System.out.println(set.size()); 12 1 6 9 2. Comment on this question This compiles in Java 17 due to static int[] a(int[]... a)[] { return a; } static final int one = a(new int[0]).length; // 1 It confuses the compiler It’s a static method Backward Compatibility JEP 747 3. Comment on this question The code below prints "23 & 52" the following due to System.out.println( new BigDecimal(2.008f).toString().length() + " & " + new BigDecimal(2.008).toString().length()); A bug in Java 23 The randomness of floating-point Length of the mantissa Magic numbers ...

Eight Core Java Questions

Image
Please join the discussion of the answers for these questions on Twitter The answers to each question can be combined for a bonus question at the end. 1. Which of these is NOT a means of communicating between processes in Core Java. Comment on Twitter UDP Pipes/Files Pass by reference TCP 2. Which of these methods of copying an object is the LEAST efficient? Comment on Twitter Java Serialization clone() Copying field by field Using a builder 3. Which of these is the lowest amount of time Comment on Twitter A micro-day A nano-year 0.001 seconds A millsecond A million nanoseconds 100 microseconds 4. This loop doesn’t throw an Exception Comment on Twitter List<String> words = new ArrayList<>(Arrays.asList("one,two,three".split(","))); for (String word : words)   if (word.startsWith("t"))     words.remove(word); Because It’s in proportional font A thread s...