« first day (1294 days earlier)      last day (3687 days later) » 

user55340
12:40 AM
@RobertHarvey you need to have a chat with SO mods...
 
user55340
-1
Q: What are some good beginner programming projects to do in Java?

yubluI'm in the learning stages of Java and would like to practice and apply my skills.

 
user55340
Put the fear of Yannis in them.
 
user55340
12:55 AM
@JimmyHoffa @GlenH7 MSO on the 10k flag queue:
 
user55340
19
Q: Let's get rid of the 10K flag queue

Shog9The 10K tools are pretty cool... You get a birds-eye view of activity on the site, a "dashboard" view of what's happening. Some of the individual tools haven't scaled particularly well with Stack Overflow's growth, but the concept behind them is still sound: we trust you to enough to be a bee wat...

 
1:07 AM
@MichaelT I left a sticky note for Bohemian in TL.
 
user55340
@RobertHarvey Thank you.
 
user55340
... now if I could just get at the db so I could find what numbskull person up voted that question...
 
user55340
(Now I'm just sad that my close vote on
 
user55340
1
Q: Nice iterator naming

DanDanHow do you name your iterators when you return a begin and an end iterator from a class? Without it sounding clunky, that is. Example: typedef std::vector<Idea> Ideas_Type; Ideas_Type::const_iterator GetIdeasBegin() const; Ideas_Type::const_iterator GetIdeasEnd() const; Should it be GetIdea...

 
user55340
1:22 AM
has expired)
 
user55340
2:01 AM
(and poking at it sightly, it appears to be an up vote on SO that transferred over here... I don't feel quite as bad now... for calling the person a numbskull)
 
user15026
"No one knows why the software industry needs thousands of programming languages especially when the majority of applications are written in the most common languages. Probably sociological reasons are part of the constant creation of new languages." I have wondered about this for forever.
 
5:58 AM
not invented here syndrome
 
 
2 hours later…
8:08 AM
I want to maintain a record of emails sent out from my application - what, in your opinion, is important to store? Headers definitely, what about email text?
 
 
4 hours later…
12:33 PM
@MichaelT Oh. I like Deming's 14 Principles. I want to get them framed for my cube. And post them in every software engineer's cube and manager's office.
 
12:47 PM
You must feel so proud of yourself, keeping the quality of SO up by making it less useful. — wobbily_col 18 mins ago
This sentiment comes up a lot.
I think P.SE does a bad job of explaining its goal. People see it as a "help me now" Q&A site.
 
user41796
1:32 PM
I failed a review audit, and now I'm mad. The question is focused on copyright and ought to be closed.
 
user41796
4
Q: Should I include myself as an author after modifying 3rd-party code?

cvsguimaraesIt's common practice to make some tweaks or fixes in 3rd-party code (be it a simple gist or an entire submodule). But it's also common that many of them use they own license information. After making those modifications what's the correct thing to do next? Keep the licence info untouchable or tr...

 
@GlenH7 How is that focused on copyright?
It's about what the contributor should do when making contributions. It doesn't require a lawyer to answer what the best/accepted practices are.
 
user41796
@ThomasOwens Inserting yourself as author is an implicit claim to copyright
 
user41796
Depending upon the licensing of the original program and local law, you may or may not have a claim to anything in the derivative code that you generated.
 
user41796
Reading it more closely, the bigger problem with the question is that it has too many questions within it.
 
user55340
2:07 PM
@ThomasOwens There are so many things in there that are just... true.
 
user55340
I do find this one runs contrary to the of quoted how much it costs to fix something:
 
user55340
> Cost per defect stays flat from function test through maintenance. Cost per defect penalizes quality and is lowest for the buggiest software. The best metric for quality costs and quality economic study is “defect removal costs per function point.”
 
@MichaelT I thought about it, and it makes sense, though. Once you hand a particular feature off to test, it's gone through the full lifecycle.
 
user55340
This bit also addresses some of the anti-tdd idea:
 
user55340
> The reason cost per defect seems to rise is because of fixed costs. If it costs $10,000 to write and run 100 test cases and 50 bugs are fixed for another $10,000 the cost per defect is $200. If it costs $10,000 to write and run 100 test cases and only 1 bug is fixed for $200 the cost per defect is $10,200. Writing and running test cases are fixed costs.
 
user55340
2:10 PM
If you don't write bugs in the first place, then writing a unit test suite will cost more per bug discovered.
 
user55340
However, it misses that bit earlier about there are 10 generations of coders on a given piece of software... you're not writing it for yourself, you're writing it so the next guy doesn't mess it up.
 
user55340
> If you want to modify the architecture of a legacy system, reorganize and restructure the support organization first and then wait a while
 
@MichaelT And the odds of not writing a bug are...?
@MichaelT I need to think about that one some more, honestly.
 
user55340
@ThomasOwens Very, very, slim. Though one of the necessary attributes for such a person is an inflated ego.
 
user55340
 
user55340
@ThomasOwens Its related to Conway's Law: "Any piece of software reflects the organizational structure that produced it."
 
@MichaelT Yeah, I'm trying to get that one, too. I don't see how that's true.
 
user41796
2:47 PM
Props to @maple_shaft for re-opening the question before I could finish my answer to the meta question.
 
user55340
3:12 PM
@ThomasOwens Consider such things as compartilization of departments, non-integrated testers with the team, code ownership and such and how that changes how the code is written.
 
3:25 PM
Hey neat, I created a tag that was used by 50 questions, got taxonomist badge for at CR
 
4:14 PM
It's about integration. The vast majority of software exists simply to integrate systems together so that tools and data and various things can all interoperate to make larger more robust products. The amount of any industry that involves inventing altogether new products rather than taking known products and combining them is terribly miniscule, this goes for the software industry as well. Because of this a large majority of what developers are doing is integrating separate systems to get multiple independent features/products to work together as a single cohesive product. — Jimmy Hoffa 18 secs ago
 
I have a terrible problem. The work that I do is so cool, no personal project has held my interest for more than a weekend, since after solving the kinds of problems I solve at work, nothing else can compare. I want to play with JDK 8, learn about ZeroMQ, get better at Scala, write more Python, and stuff like that. But I need something that will interest and excite me.
 
user55340
An automatic dubstep music generation program.
 
Heh.
0
Q: Why were default and static methods added to interfaces in Java 8 when we already had abstract classes?

Mister SmithIn Java 8, interfaces can contain implemented methods, static methods, and the so-called "default" methods (which the implementing classes do not need to override). In my (probably naive) view, there was no need to violate interfaces like this. Interfaces have always been a contract you must ful...

 
user55340
There is an example in there that has the best use case... Collections.sort() vs List.sort()
 
user55340
The later was impossible to add in Java 7, but often wished for.
 
4:27 PM
And then I saw the light.
Collections.sort() was dumb. Having sort on the collection is awesome.
 
user55340
All those static Collections methods that take a List should be default implementations in List.
 
Is that the only reason for adding static methods to an interface?
Not that I have any real objection to static methods in an interface anyway.
 
user55340
Default interface methods don't need to be static.
 
"Default" interface methods?
 
user55340
public interface TimeClient {
...
    default ZonedDateTime getZonedDateTime(String zoneString) {
        return ZonedDateTime.of(getLocalDateTime(), getZoneId(zoneString));
    }
}
 
4:34 PM
interface methods with a default implementation
 
I'm starting to realize that Java and C# are very different languages, despite their superficial similarities.
 
the sooner you accept that the better off you'll be
all languages are unique
 
user55340
C# learned a lot from Java's early missteps.
 
and each has it's own idiosyncrasies
 
user55340
And Java is thus forever encumbered by it (unless they actually follow through with removing deprecated methods in Java 9)
 
4:36 PM
@MichaelT I doubt that
java will try to remain backwards compatible as much as possible
 
@MichaelT I suppose you would use a base class for that in C#.
 
user55340
@ratchetfreak The hope that some JVM implementation does a good job of it instead?
 
user55340
@RobertHarvey Consider, LinkedList which extends AbstractSequentialList...
 
sorting that in java 7 involves dumping to an extra array
while you can merge sort it in place without any extra memory
 
user55340
But you can't put sort() in any of those parents practically.
 
4:38 PM
@MichaelT Yes, right. An abstract class.
 
user55340
Partly because people don't past around AbstractList - they pass around a List
 
user55340
because I can write my own List that doesn't extend that base class.
 
user55340
(and I have)
 
it's a PITA but people do it
well mostly C&P
 
user55340
So now Sort in Java 8 docs.oracle.com/javase/8/docs/api/java/util/List.html has the following default methods: replaceAll, sort, and spliterator
 
user55340
4:44 PM
and Collection has removeIf and stream and parallelStream, and Iterable has forEach
 
See, I think Extension Methods in C# are a much better solution. If you did that with IEnumerable, it would have 100 static Linq methods in the interface.
 
user55340
None of those are static - they can access the non-static methods already present in the interface.
 
the biggest reason java can't do extension methods is because all methods need to be in a class
 
user55340
I need to be able to do List foo = new LinkedList(); foo.forEach(action);
 
I think C# just weaves them into the class definition. It's done at compile time, so for all intents and purposes, they belong to the class.
 
4:49 PM
but each .java file can be compile separately into a (set of) .class files
 
I don't know anything about that. :)
 
you don't know about the java build setup?
 
I don't use Java. I use C#, and pretend that I know Java.
It works, most of the time.
 
user55340
I'll admit to answering something about C# by pretending it was just Java too...
 
ah that explains a few things
I've answered a few questions just using general programming knowledge
 
user55340
4:53 PM
Many of the patterns are the same - just implementations are different... and some of the underlying issues are the same.
 
user55340
> Failing having access to C#, I looked at how Java deals with the line:

System.out.println(Math.sqrt(2.0));
 
user55340
> (I'm most familiar with Java, Junit, and mockito - so what I write below is based on my understanding of this applied to what I can find)
 
So I guess while loops of the form
List<String> currentStrings = getCurrentStrings();
while(currentStrings.size() > 0) {
  doThingsThatCanAlterCurrentStrings();
  currentStrings = getCurrentStrings();
}
are so 90's now.
 
user55340
Yes... but the question is what is more readable?
 
It's far better to turn it into an iterable, or build a state engine to abstract out the functionality. Just don't duplicate that single line of code.
@MichaelT I struggled with that bit of code duplication the first time I wrote a while loop... for about a half hour. Realized there was no better way to do it, never thought about it again.
 
5:00 PM
List<String> currentStrings;
while((currentStrings=getCurrentStrings()).size() > 0) {
  doThingsThatCanAlterCurrentStrings();
}
 
user55340
The thing that worries me with all of these new fangled chain everything together is that sometimes it adds complexity to the problem without adding more readability to it.
 
normally you'd use !currentStrings.isEmpty() though
 
user55340
Novice programmers often throw in the extra complexity without realizing it thinking that its somehow better.
 
@ratchetfreak Which puts you back into code duplication again.
But the original form is more flexible that way.
 
gah forgot to take out the last statement in the while
 
user55340
5:02 PM
24 hours ago, by MichaelT
> McConnell states that less competent developers favor code with advanced programming language features over code that is readable. Code written by these programmers tends to increase software complexity.
 
@MichaelT I've seen many a Linq statement, where a simple loop would have sufficed.
 
I can appreciate a elegant piece of code that does some non trivial stuff
 
user55340
@RobertHarvey Yep. Be clear with the intent of the code. And so the "so 90's" may be accurate in one sense, it is also timeless in another.
 
I can't write it reliably but that's why I don't call myself an expert
 
user55340
@ratchetfreak (Now I'm going to need to dig up that bit from the second book by Rothfuss)
 
5:05 PM
I might feel different if I'd been programming in Scheme for years, and been forced to use loop abstractions all that time.
 
@RobertHarvey I've seen many a loop where a simple Linq statement would have sufficed.
 
Ah, there you are. Didn't take long for you to show up. :)
 
It's a question of familiarity, if you're familiar enough with LINQ; it is far simpler than loops, if you aren't, loops are far simpler. But LINQ is very simple and after these 6 years of it, it should be expected that .NET devs are very familiar with it
 
it's like regexes
 
Most of my current work has to do with processing of real-time data packets. Not much linq is used.
 
5:06 PM
@ratchetfreak nonsense
 
some people can quickly find the gist of it but others just can't
 
regexes are complex and full of memorization, LINQ is very simple; people are just afraid to find out how simple it is
 
s/regexes/sql querries/ then
 
user55340
Regexes are very easy - there are only a few operators of interest and its a matter of being able to read them.... +, *, {}, [] and () and you've got most of it down.
 
there's a large leap from remembering that .select is used to execute a function across all members of a list than remembering the ?! is the lookahead and fail if matched symbol (I think?)
 
5:08 PM
@JimmyHoffa LINQ is complex and full of memorization, regex is very simple; people are just afraid to find out how simple it is
 
@ratchetfreak untrue, there's no memorization of strange symbols or things. select, selectmany, where, first, these are obvious what they do
 
you can get away with never using look aheads or fancy features in regex
 
you don't have to memorize that first gets the first element that matches your predicate
 
but you need to remember the name of it
 
@ratchetfreak it's still full of memorization, I genuinely don't remember what .* or .? do even though i see them all the time in regexps
@ratchetfreak nope, intellisense
LINQ avoidance is just avoidance on programmers part
 
5:09 PM
the dot is any character and the * and ? are quantifiers
 
@ratchetfreak see what I mean, nothing about . is descriptive of that, but first is descriptive of exactly what it does
 
user55340
> “Kvothe here played the simplest song in the world and made it look like he was spinning gold out of flax,” Marie said. “Then he took a real piece of music, something only a handful of folk in the whole place could play, and made it look so easy you’d think a child could blow it on a tin whistle.”
 
user41796
Need. More. Close. Votes!
 
@MichaelT ...after years of toiling in obscurity honing his craft.
 
user41796
Sorry to break the thread, but that question about oracle certification irked me. And I'm out of close votes.
 
5:17 PM
there there
I cast a vote for you
 
user41796
thanks!
 
user55340
Almost out now...
 
user55340
And here's another one for people to read: drdobbs.com/architecture-and-design/the-corruption-of-agile/…
 
user55340
(and there... now I'm out of close votes)
 
so that's how you get questions to stay open for longer...
you first wait until all the high rep users are out of close votes and then ask you question
 
user55340
5:22 PM
@ratchetfreak You've gotta dodge the Oded though.
 
he's got to sleep some time
 
user41796
@ratchetfreak and you better not let your feelings get hurt when you're down voted to oblivion
 
sock puppet account
 
user55340
Though yea, if you ask a question after we're out of close votes it stays open a bit longer...
 
user55340
Just browsing through first three pages, every third question on this website is 'on-hold'. Most users seem to have no clue what this site is about. What a bizarre website. I am out of here. Thanks for your help. — domino 38 mins ago
 
user55340
5:25 PM
(I'd contend this is why we need to do faster deletes of things that don't belong at all and have no hope of getting reopened)
 
@ratchetfreak every few questions a new one though; people get Q banned from downvotes here pretty quick oftentimes
@MichaelT just sent that laws of software engineering pdf to my team, cool find heh
 
user55340
Since we're fairly fast with close and down votes, if someone asks 3 rapid fire bad questions off the bat, thats enough for a question ban.
 
user55340
@JimmyHoffa So much good in there.
 
user41796
@MichaelT We're down to every third question? Sweet! Things are getting better then.
 
@domino: How right you are. If more people understood what the website was really about, they would be less prone to getting their questions closed. — Robert Harvey 8 secs ago
 
user41796
5:27 PM
Used to be every other question...
 
@GlenH7 read my mind; progress! :)
 
user41796
I do realize that some would pillory me for making that comment, but it is a sign of progress. The ratio of crap to good question is improving.
 
The Pro-Broken windows campaign yielded shite results as we all observed early on, the anti-broken windows campaign has however been a protracted successful approach from my perspective.
 
user41796
I'm still on the fence about crap answers and whether I should VTD or just down-vote.
 
now If you'll excuse me, I'm going to go delete vote stuff in
 
user55340
5:29 PM
heh... when you look at the 'recently deleted' in 10k tools, you get another idea of how much crap is cleaned up each day.
 
@GlenH7 Deletion refunds the downvotes, if that helps.
 
user55340
@GlenH7 Feeds the answer ban if they're persistent enough.
 
user41796
The answers kind of address the question, but the explanation is pretty poor.
 
user41796
This one: programmers.stackexchange.com/a/132362/53019 and the one below it are the 2 in question
 
@GlenH7 I like the black and white analysis of things. If the answer is fitting, no matter how wrong (short of being damaging, offensive, or spam) I vote up or down. As soon as an answer is not-fitting the question (not on the Q topic or not an answer) I attempt removal with all means available; delete votes and flags.
 
user55340
5:31 PM
@GlenH7 Its poor, the material is already in another answer better presented.
 
user55340
... and while a -1 serves as a warning to some, not having it as an example doesn't let others think that its ok. After all, a +1,-2 is a net gain.
 
user41796
So I think downvote is appropriate in this case as it reflects the site's need for better quality answers.
 
user41796
@RobertHarvey - he can't VTD on answers. Not enough rep.
 
P.SE needz moar delete voterz
 
user41796
yes indeed
 
user41796
5:37 PM
I gave in to peer pressure
 
Increasingly, we have a number of well-written, comprehensive posts that we can point people that deal with specific categories of problem questions. I like this.
 
user41796
@RobertHarvey blame @MichaelT
 
Yeah, he's done a very good job with those.
 
user41796
He's doing a better job of gearing up for any potential moderator election than I am.
 
user55340
Thank you.
 
user55340
5:43 PM
I just got tired typing the same thing in comments again and again and again.
 
user55340
So now you can just give a link to the appropriate answer.
 
user55340
But then you get those crazy moderators sticking faq-proposed and faq on all my questions..
 
user41796
How rude of them
 
user41796
At least that Community mod isn't giving you any problems
 
user55340
@Panzercrisis They are fairly consistent sets of questions that we get and close on a regular basis. The comment field doesn't have enough space to properly address the topic in full. By having a Q&A on Meta about the question, we can reference it instead and help the person ask a better question or come to terms with the broader issues at hand. — MichaelT Dec 27 '13 at 15:50
 
5:45 PM
I tried to do this with the "What Stack Overflow is Not" question. It seemed like a good idea at first, but the community began using it as a substitute for actual communication, and a new way to post snark. It quietly died on the vine.
I didn't have the will to try again here.
 
user41796
That snark bit does tend to do things in
 
user55340
Its a balancing act between the possibly... terse "we are not a forum" and a terse link to "why discussions make for poor questions on a Q&A site"
 
user41796
speaking of snark:
 
user41796
CENSHORSHIP!!badp Jun 27 '12 at 0:10
 
user55340
Part of the effectiveness of that is to try to make sure that the link they go to addresses all of the aspects of the question.
 
5:50 PM
It would have been better if I had addressed the issues individually in separate meta posts like you are doing here. Meta.SO tries to do that with its [faq] posts, but does it poorly. Help Centers, Faqs and the like are all too general, too nice, and dance around the real issues.
 
user55340
Yep. My posts work from the assumption that there is a real problem there... and if phrased or written properly, there is a good question trying to get out.
 
On the bright side, I can see how some of my thinking eventually made its way into the Help Center. And the "What questions can I ask here" page is editable by mods, so I tweak that page on Stack Overflow from time to time.
 
user55340
@RobertHarvey The only one I group everything together on is the close reasons - its a one stop shop for the background of all of the reasons why something would get closed.
 
The most common faulty thinking by new users: "The help center said I could ask it if it was a practical problem that concerns programmers." The second most common: "This two year old question is just like mine, but it's still open, and you closed mine."
 
user41796
@RobertHarvey And while we're quick to close the 2 year old question, that's of no solace to the OP of the just closed question
 
6:02 PM
@MichaelT That's a really good piece.
 
user55340
Yep. I'm 10% tempted to write a post that tries to gather all that "practical problem concerning programmers" into one spot... but that's its own set of things I'd rather not have to dredge up.
 
user55340
@RobertHarvey Agile today isn't the agile of a decade ago.
 
@MichaelT I fixed that in "What kinds of questions can I ask here" on Stack Overflow by putting a prominent heading in there that states "Your question might still be off-topic, even if it fits one or more of the categories above," and then restating all of the close reasons (and a couple that aren't official close reasons).
Agile is itself agile.
 
user55340
I'm of the "all methodologies fail or work based on the people using them... it doesn't matter what it is"
 
user55340
Waterfall? Ok. Agile? Ok. Kanban? Ok. Scrum? Ok. Cowboy? Ok. Just let me write code and move the state of the product forward and support the methodology that you want me to use.
 
6:06 PM
One could argue that if Agile is turned into a doctrine, then it's no longer Agile by definition.
 
user55340
(there's a close vote I don't often see... Bill The Lizard: programmers.stackexchange.com/questions/233085/… )
 
I don't pretend to be an agile expert, but I think the point of agile (mostly) is to shorten the customer feedback loop, so that there are fewer surprises when the software is released.
 
user55340
Yep. And thats a good thing... and where BDUF has failings. But would you ever want to fly in an agile developed autopilot aircraft? "we haven't had a user story yet for putting the landing gear down yet... our first story was to take off"
 
...out of delete votes...
 
user55340
@JimmyHoffa You get another one every 1000 rep...
 
6:17 PM
@MichaelT Are you challenging me to bounty my way back below 10k? Is that what I hear!? I am not petulent and I resent any who'd say otherwise!
 
user55340
@JimmyHoffa Nah... just teasing you with another delete vote in a few more rep.
 
user55340
700 more rep. You're already +291 above 10k - it gets easier every day too.
 
@MichaelT I have taken up that challenge, in (24? 48?) hours I will be dropping 100 rep.
 
user55340
@JimmyHoffa Spray that unicorn poo around on everyone! Wait... that didn't sound right.
 
user41796
Thanks @MichaelT
 
6:26 PM
@MichaelT and with that it's 250.
Oh I should have totally bountied ampt to get close votes
 
user55340
@JimmyHoffa heh. Next time. I bet he'd enjoy the unicorn poo spray.
 
Where is Yannis' meta answer with the traffic graphs?
 
user55340
48
A: How can I encourage Stack Overflow to rein in the 'subjective' vigilantes?

Yannistl;dr We already tried supporting those questions, we even gave them their own site. Sadly, it didn't work out. C'est la vie. 3 years ago, a Stack Exchange site called Not Programming Related came out of Area51, the Stack Exchange staging zone. NPR was supposed to be a site where questions t...

 
Thanks. I'll bookmark it.
 
@MichaelT You should clone his content into an M.P.SE Q churning over the wording for purpose and meaning fitting a Q titled: "Why subjective questions are off topic" or "Why the site's scope is narrow"
 
user55340
6:32 PM
@JimmyHoffa I'll look into it.
 
Could make another canonical M.P.SE link when people argue "But the community likes these questions, why can't you just leave us alone ya bully!"
 
3
A: Why was my question closed or down voted?

MichaelTPrimarily opinion-based Frequent culprits of those close reason include: asking people to explain a given quote asking people to chose/review between different designs recommendations for something (e.g. directory structure) company policies and best practices the name of something The key d...

^^^ already referred and quoted in there
> tl;dr We already tried supporting those questions, we even gave them their own site. Sadly, it didn't work out...
 
@gnat Yes, but I think that content deserves more than a link; I would like to see most of Yannis' very convincing argument in our meta as one of our canonical posts
ooo!
@RobertHarvey can we create M.P.SE tags?
we should have a in M.P.SE for all of that sort of stuff
 
I don't see why not, if we have sufficient rep on the main site.
 
user55340
There's the audience - Yannis's post was for MSO audience. Having a similar one for a P.SE audience could be useful.
 
user55340
6:39 PM
@JimmyHoffa Much if it is making its way into faq-proposed and faq ( meta.programmers.stackexchange.com/… )
 
@MichaelT I'll try to remember that for when I need to dig up any of those posts
 
user41796
@JimmyHoffa - random LINQ question
 
user41796
If I query for an instance of foo in a List<foo> but it doesn't exist, will I get null back or an empty foo?
 
user41796
and if that doesn't make sense I can sanitize my code and post here
 
Depends on which Linq function you use. If you use any of them that include the words "OrDefault" you will get a null back if there are no matches.
Otherwise, you'll get an empty IEnumerable or IQueryable.
 
user41796
6:43 PM
Just using First() at the moment
 
user41796
not FirstOrDefault()
 
I think First will throw an exception if there are no matches.
 
user41796
Foo foo = (from aFoo in fooList
		  where aFoo.Prop == bFoo.Foo
		  select aFoo).First();
 
user41796
> The First<TSource>(IEnumerable<TSource>) method throws an exception if source contains no elements. To instead return a default value when the source sequence is empty, use the FirstOrDefault method.
 
Unless you want to wrap that in a try/catch, I'd use FirstOrDefault, and check for the null.
 
user41796
6:48 PM
easier to check for null
 
user41796
Back to an earlier conversation - my code is an example where using LINQ (may have) simplified things. I have two unordered lists and I need to update the 2nd based upon entries in the first. Using LINQ allowed me to skip writing a second loop to iterate over the elements of the 2nd list until I found the one I was looking for.
 
The whole while loop thing was kind of a red herring anyway. Processing lists via declarative programming constructs goes all the way back to Lisp and Lambda calculus, and is a tried and proven technique, but that's not what the while question was about. The while question was about saving one line of code.
 
@maple_shaft I read and re-read the answer and can't see an explanation you mention. Per my reading, answer merely gives a brief (though accurate) overview of endorsed system features, nothing else. It doesn't even mention word "multi-tier". Such an "answer" can be word by word copied into a question asking about database design, or distributed application, or high performance system, whatever (no kidding, I am huge fan of Atlassian myself and I find it flexible and convenient to document basically anything) — gnat 4 hours ago
^^^ tool features overview instead of answering the question asked. Nice. Next thing is going to be likely merge of Programmers with Software Rec... and rename of a merged site to NPR
 
user55340
@JimmyHoffa I might have to send some of that rep back to you... I've already picked up an extra +20 rep from upvotes on the pi answer. Should have bountied it back on the 14th.
 
@gnat The problem is that the question is too broad. The OP has elaborately demonstrated prior effort, but his question (reiterated at the bottom of his post) still boils down to "how do I document my application?"
Or maybe "am I doing it right?"
 
user41796
7:01 PM
Agreed. The answer isn't great, but does kind of address the question. That points back to a challenged question.
 
@RobertHarvey yup, and I am pondering on whether to cast a CV. Still, getting an advertising brochure as an "answer" somehow stinks. However troublesome, question definitely doesn't ask to recommend a tool
it may deserve closure but not a spamvertisement like that
 
user41796
@gnat We frequently see that pattern though. "How do I do XYZ?" "Oh, XYZ is most easily done with tool ABC because of this, this, and this."
 
@GlenH7 this time, it's even more slippery, as answerer prominently omits "XYZ" and "because of" and jumps straight into "this, this, and this" (per se, it's a reasonably good overview, just way too detached from the question)
 
Question quality is a gate. If you can't pass through that gate, nothing follows. Is it a duplicate of another question? Doesn't matter, it's a crappy question. Could it be migrated to another site? Doesn't matter, it's a crappy question. Should I answer it because the existing answer sucks? Doesn't matter, because... well, you know.
Some questions have a good question in them, trying to find its way out, like this one:
2
Q: How to document the high-level structure of a Java program?

I Like to CodeBackground: My collaborators and I are writing an article for an academic journal. In the course of our research, we wrote a simulation program in Java. We want to make the simulation program freely available for others to use. We have decided on hosting the code on a GitHub repository. In order ...

This one basically boils down to "I don't know how to describe things." Which is why I answered it the way I did. I didn't even talk about DDD.
 
user41796
> +1 for not mentioning *DD in your answer
 
7:12 PM
DDD isn't even a development methodology, even though most software developers think it is. They ask questions like "How do I write this class using DDD principles?" You don't. You write your class using ordinary OO techniques. You create an overall design using DDD, taking advantage of a ubiquitous language that you and your customer both understand. Then you write your application.
 
user41796
But it's *DD so therefore it must be a development methodology!
 
@RobertHarvey this logic encourages posting tangential, meh answers. "Question is crappy anyway, so I'll drop something there." Do it a handful of times, see it hundred times dropped by others and it will become a habit, and it will create a culture. Next thing you'll se will be good questions filled with tangential crap
 
But the tangential crap does sometimes help us understand what question the OP is really asking. Without the tangential crap, it is simply "How do I explain things?" Which isn't a question at all.
 
recent example of someone droping crappy answer at crappy question:
-1
A: Is it possible to use win32com.client on mac?

Andrew MedicoNo. The win32com module is for use on Windows only.

 
That's a different problem. It's an "Ask the Audience" question.
 
7:16 PM
@RobertHarvey there is a feature dedicated for that. Comments. Two features actually, second is chat.
 
You'll never find it again in Chat. If there's some benefit to others, it's better if it's in a bona fide answer.
 
user41796
How is that question still open? Ugh.
 
I put my close vote on it.
A while ago.
 
user55340
@GlenH7 You voted to close this question 6 hours ago
 
user41796
@MichaelT I know. I had hopes it would be gone by now. It's a no-brainer VTC
 
7:24 PM
in The Water Cooler, 23 hours ago, by gnat
SO has it at priority -17 because they've got 17 mods, 2,000 trusted users, tens thousands close voters, common culture and flagging system perfectly tuned to serve that culture. Smaller / subjective-ish sites have nothing like that... and unlikely will ever have
 
This looks like a pretty good answer. Is it?
0
A: Given two sorted array in ascending order with same length N, calculate the Kth min a[i]+b[j]. time complexty O(N)

masgoLets go with this formulation: Another variant of the question goes like this: given a matrix with sorted rows, and sorted columns, find Kth smallest. Let M(1,1) denote the corner of the matrix with the smallest number and let M(n,n) be the corner with the highest number. (obviously they...

 
user55340
@RobertHarvey It looks that way.
 
It looks correct to me, but I just wanted another pair of eyes on it before I upvoted it.
 
@GlenH7 It depends. If you do a .First() and it's not found, you get an exception, if you do a .FirstOrDefault() you get the first or default(T) (null for object types, 0 for value types). However if you do a .Where() you'll get an IEnumerable<T> with all the elements that meet the criteria. If none exist, you get an IEnumerable<T> with no elements in it.
the semantics for First and FirstOrDefault are ditto for Single/SingleOrDefault
though I think single throws if multiple entries match the predicate (maybe)
 
I accidentally an Android.
0
Q: How to think an android project?

user1805I would really appreciate some help about how to draw an android app. I did plenty of courses and I read have more or less the same things explained in a different way (data type,int,declaring variables,creating constuctor,anonymous inner classes...).Its very theorical but necessary, I understan...

 
7:38 PM
@RobertHarvey Hate when that happens
 
Oh, shit. Didn't mean for it to come out that way. :P
 
user41796
@JimmyHoffa In this particular case I should only see 0 or 1 matching entries. So I figured I was safe enough just grabbing the "first" and silently ignore any exceptions to that expectation
 
user41796
@RobertHarvey Your comment was funnier than gnat's though
 
@GlenH7 Then go with .FirstOrDefault() and coalesce a better default value in if it's a reference type
 
user41796
Fortunately, it's an object type. So I can think less from that point of view.
 

« first day (1294 days earlier)      last day (3687 days later) »