All Questions

4530
votes
15answers
766781 views

"Thinking in AngularJS" if I have a jQuery background?

Suppose I'm familiar with developing client-side applications in jQuery, but now I'd like to start using AngularJS. Can you describe the paradigm shift that is necessary? Here are a few questions that...
665
votes
66answers
418285 views

Why not use tables for layout in HTML?

It seems to be the general opinion that tables should not be used for layout in HTML. Why? I have never (or rarely to be honest) seen good arguments for this. The usual answers are: It's good to ...
73
votes
5answers
19416 views

What's wrong with Java Date & Time API?

Very often I come across negative feedback on Java Date and other date-time-related classes. Being a .NET developer, I cannot fully (without having used them) understand, what's actually wrong with th...
872
votes
25answers
105061 views

Why not inherit from List<T>?

When planning out my programs, I often start with a chain of thought like so: A football team is just a list of football players. Therefore, I should represent it with: var football_team = new Li...
177
votes
20answers
94052 views

Declaring variables inside or outside of a loop

Why does the following work fine? String str; while (condition) { str = calculateStr(); ..... } But this one is said to be dangerous/incorrect: while (condition) { String str = calcula...
91
votes
13answers
44526 views

Check if a class has a member function of a given signature

I'm asking for a template trick to detect if a class has a specific member function of a given signature. The problem is similar to the one cited here http://www.gotw.ca/gotw/071.htm but not the same...
139
votes
19answers
267188 views

How to compare objects by multiple fields

Assume you have some objects which have several fields they can be compared by: public class Person { private String firstName; private String lastName; private String age; /* Const...
91
votes
2answers
22037 views

Application Skeleton to support multiple screen

As we know Android coming with various device which having different Features, Resolution and Screen-size so while developing an Application which support multiple(small and big) screen there is an ob...
144
votes
10answers
43793 views

Uses for Optional

Having been using Java 8 now for 6+ months or so, I'm pretty happy with the new API changes. One area I'm still not confident in is when to use Optional. I seem to swing between wanting to use it ever...
405
votes
8answers
51732 views

Why create "Implicitly Unwrapped Optionals", since that implies you know there's a value?

Why would you create a "Implicitly Unwrapped Optional" vs creating just a regular variable or constant? If you know that it can be successfully unwrapped then why create an optional in the first place...

Previous Next