language agnostic - Do you use design patterns?

language agnostic - Do you use design patterns?

What's the penetration of design patterns in the real world? Do you use them in your day to day job-discussing how and where to apply them with your coworkers-or do they remain more of an academi…


Which data structure would you use: TreeMap or HashMap?(Java)

Description | A Java program to read a text file and print each of the unique words in alphabetical order together with the number of times the word occurs in the text. The program should declare a v…


Code Reusability: Is it worth it?

We all write reusable classes and code. We factor in configurability to allow us to reuse this fantastic new class again and again. We tell our bosses that spending this extra time now will save…


Many threads or as few threads as possible?

As a side project I'm currently writing a server for an age-old game I used to play. I'm trying to make the server as loosely coupled as possible, but I am wondering what would be a good design decis…


Max name length of variable or method in Java

Is there a max length for class/method/variable names in Java? the JLS doesn't seem to mention that. I know very long names are problematic anyway from code readability and maintainability perspective…


mysql - Is there any reason to worry about the column order in a table?

I know you can ALTER the column order in MySQL with FIRST and AFTER, but why would you want to bother? Since good queries explicitly name columns when inserting data, is there really any reason to car…



C# has abstract classes and interfaces, should it also have “mixins”?

Every so often, I run into a case where I want a collection of classes all to possess similar logic. For example, maybe I want both a Bird and an Airplane to be able to Fly(). If you're thinking "stra…


language agnostic - Purpose of singletons in programming

This is admittedly a rather loose question. My current understanding of singletons is that they are a class that you set up in such a way that only one instance is ever created. This sounds a lot like…


java - Difference between HashMap, LinkedHashMap and TreeMap

What is the difference between HashMap, LinkedHashMap and TreeMap in Java? I don't see any difference in the output as all the three has keySet and values. What are Hashtables? Map m1=new HashMap()…


java - Web Frameworks: How is Play different from Spring MVC?

The Play Framework offers the following quick overview, but with the exception of the Groovy template engine(which you can get in Spring MVC if you want), Spring seems to offer all the same features…




how number the which java and use spark executors cores