Hidden Features of Java
stackoverflow.com
stackoverflow.com
Also AtomicInt,Float,Long make life easier when dealing with threaded programs.
>This question is not a good fit to our Q&A format. We expect answers to generally involve facts, references, or specific expertise; this question will likely solicit opinion, debate, arguments, polling, or extended discussion.
I appreciate StackOverflow's active moderators, but this question was actually pretty interesting. What harm would it do to let the question open?
If they allow other kinds of content, interesting as it may be, it will dilute that and turn stackoverflow into a discussion site or a place where people just post funny anecdotes or assorted programming trivia. That's not inherently bad but it makes it harder to use the site for its intended purpose.
(Disclaimer: I have like five karma on stackoverflow and don't necessarily know what I'm talking about.)
See: http://www.codinghorror.com/blog/2011/02/how-to-write-withou...
Did some digging and found this
http://stackoverflow.com/questions/8449696/project-doesnt-re...
This doesn't look like something to point someone in the right direction. Yes, you are working with proprietary code but you could think of ways to describe what is happening without disclosing information otherwise you are making users play the 20 questions game with your question (as noted by a moderator). A high rep and top contributor to the site (Jon Skeet) was trying to help you but you didn't seem to want to reciprocate with more information. As I said earlier, clear communication is key in SO, don't make users point in the dark. You are wasting their time and yours with the back and forth clarifications.
I think they fear a slippery slope to becoming /r/programming with everyones favorite cartoons, favorite quotes and "what do you hate about php?"-questions on the front page.
- What's your favorite "programmer" cartoon?
- What is your best programmer joke?
- Great programming quotes
- Defend PHP; convince me it isn't horrible
- What is the best comment in source code you have ever encountered?
- What's your most controversial programming opinion?
- What are some funny loading statements to keep users amused?
- Worst UI You've Ever UsedIt would interesting to see how many users (who voted) actually paged through all 100 answers.
Take instead the Greatest Hits which do take into account data to determine value http://stackoverflow.com/questions/greatest-hits and you will notice none of these hidden features or list of x questions make the cut.
The argument used to keep them open is that they have value (which is why the notice was added), developers and moderators alike have said that they have gotten valuable information from these questions (Nick Craver, Joel Coehoorn, Bill the Lizard)
> This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here.
As for the single binding vote made by a moderator this could have been a result of many flags made by users that he had to act on. SO moderators and to an extent SE moderators will always be called http://www.google.ca/search?q=%22overzealous+moderators%22+s... and that's something they just have to live with in order to keep StackOverflow a place that is different from a forum. SO emerged because of a need to get Q&A different from a forum. Elections (http://stackoverflow.com/election) are held every year to get moderators knowledgeable of the process and users the community trusts to make decisions the community might not normally. Most SO moderators never see the main site regularly and are stuck in the flag queue answering the community needs.
There are some similarities to the observations about leadership in realspace organizations made by (sci-fi author Jerry) Pournelle's 'Iron Law of Bureaucracy' and (sociologist Robert) Michels' 'Iron Law of Oligarchy'.
One of the clearest ways to demonstrate 'authority' in an online site is to say and enforce a 'No', so No's may be oversupplied.
At some point it starts to resemble an auto-immune disorder, a mis-calibrated system attacking itself.
See "Optimizing for Pearls, not Sand": http://blog.stackoverflow.com/2011/06/optimizing-for-pearls-...
Here's top 40 most favorited closed questions (closed questions can't be upvoted, but can still be favorited): http://data.stackexchange.com/stackoverflow/q/123697/top-40-...
"how does tools like JPS, JConsole or VisualVM know the JVMs running in a system? They simply look in the folder /tmp/hsperfdata_foo where a 32KB data file with the PID as name is created for each JVM."
Not a hidden feature of Java, but of Sun's (Oracle) JVM which I'm not sure if happens in other JVMs but it's kind of useful for doing different stuff.
In getCurrentThreadId it should read
return uniqueNum.get();
not
return uniqueId.get();
List<String> fruits = Arrays.asList("apple,orange,pear".split(",")); Arrays.asList("apple", "orange", "pear") List<String> fruits = ImmutableList.of("apple", "orange", "pear");
It also works for sets and maps: Set<String> fruits = ImmutableSet.of("apple", "orange", "pear");
Map<String, Integer> fruitCounts = ImmutableMap.of("apple", 3, "orange", 2, "pear", 6);
http://code.google.com/p/guava-libraries/wiki/ImmutableColle...