« first day (1683 days earlier)      last day (3306 days later) » 
01:00 - 16:0016:00 - 00:00

1:22 AM
0
Q: Structured Tag Cleanup Initiative Phase II Planning

Thomas OwensBack in 2012, we launched the Structured Tag Cleanup Initiative (STCI). It was very successful in identifying tags to create, merge, remove, and blacklist. However, it has been about 3 years since this effort was launched, and I think that it's time to relaunch this campaign. The process will be...

 
@Ixrec They're very rare. When they do happen, they happen because of some discontinuity like the one illustrated here: an arguably overbearing community taking matters into their own hands, with the mod being the linch pin.
The mod thinks he has both community consensus and support from SE. Until the rug is pulled out from under him.
Mods going batshit crazy? I've never seen it happen.
Also, there are some subject areas where the community and SE differ dramatically in their opinions. Tag management is one of them. The SO community expects tags to be... well, organized. They never will be well-organized so long as they're allowed to assemble organically, which is the mode of operation that SE prefers.
 
user15026
I know like improper conduct has gotten at least one (possibly more but my brain is foggy on that) diamond removed.
 
user15026
But that's less going rogue and more "they were outright jerknuggets" and stuff.
 
Usually, the mod steps down first, before it gets that far.
The communities sometimes forget that these sites belong to SE. SE is never going to allow one person to wholesale remove a subject area from a site; that's just not the way it works.
The worst part is that SE is now talking about limiting mod powers, at a time when they probably need more.
 
user15026
@RobertHarvey Yeah, that's something people tend to forget - while having community is awesome, and making community decisions is awesome, it's still part of the SE network, and, well, SE is a business with expectations and stuff.
 
user20683
1:31 AM
@Ixrec I can count on maybe 1 hand the number of "truly" rogue mods we've had.
 
[still waiting for some nutty community to elect Evan Carroll]
@EEAA: I'll overlook the fact that you just called me an amateur. — Robert Harvey 20 secs ago
 
user15026
@RobertHarvey Oh, lovely.
 
user15026
I get it, they have an audience they are aiming towards, but so do many sites.
 
user15026
@RobertHarvey Oh?
 
@AshleyNunn Eh, I'll have to find it again. Not SE in general, but Shog specifically.
Basically, "We'll have to take a good hard look and determine if mods really need these tools at all."
 
user15026
1:38 AM
@RobertHarvey Ah.
 
user15026
@RobertHarvey I suspect in part that might be reactive to the situation.
 
user15026
But I of course have no way of knowing for sure. We will have to see what, if anything, falls out of this.
 
I'm one of those hobbyist developers you so eloquently talked about. Despite your protestations, your site is not the special flower you make it out to be, nor does your profession somehow stand head and shoulders above the others. Your site is a QA site, just like the rest. If you want to make this a productive discussion, then suggest ways you can improve moderation. Stack Overflow nearly collapsed under the weight of the kind of questions you're talking about, so please don't try to convince me that your site problems are somehow unique. — Robert Harvey 25 secs ago
Oh, did I mention that most of the regulars at the SF chatroom abandoned it for a private chatroom called "The Slack?"
 
user15026
@RobertHarvey I knew they abandoned ship, but didn't know where or what they named it.
 
user55340
2:12 AM
(scroll's up... you know, we really need to find Duga and myself a diamond somewhere...)
 
2:29 AM
Did somebody mention diamonds?
in C# on Stack Overflow Chat, Apr 1 at 18:00, by Pheonixblade9
if your only question is "HOW DO I DO THIS?" and you haven't even tried, go fucking Google it and stop expecting us to put effort into a problem you haven't put any into
Oh, I see. So ServerFault isn't the only site with this problem, eh?
 
user15026
@RobertHarvey sigh
 
user55340
3:13 AM
Just amused at all the blue... and the occasional italics.
 
user55340
7
Q: Why is "Is it possible to..." a poorly worded question?

MichaelTA lot of questions try to cast a net into sea of possible designs with the wording "is it possible to...". These questions often get closed for one reason or another. What steps should I take to try to ask a better question?

 
user55340
The Math.SE approach to "How do I do this" is "Hint: ..."
 
user15026
@MichaelT Which is not all that helpful.
 
user55340
@AshleyNunn Who ever said that Math.SE was helpful?
 
user15026
@MichaelT Well, they did help me a little tonight (I wanted to know why prime factorization always went biggest to smallest) but I don't expect it to happen often :P
 
user55340
3:18 AM
This actually brings up a point... ServerFault (as one of the trilogy sites) is trying to keep a 'professional only' site. Other sites have been able to do this - MathOverflow and TCS.SE. However, both of these sites have a more accessible level too.
 
user15026
@MichaelT And, from what I've seen, they don't turn into seething rage balls if you aren't OMG at their level.
 
user55340
@AshleyNunn Nope, they probably just sigh and migrate the content away.
 
user15026
@MichaelT But that's the thing - there are many sites with a very clearly defined audience - SF is not special in that regard. They're only special for how they (don't) handle it.
 
user55340
@AshleyNunn They also lack the 'accessible' version of the site.
 
user15026
@MichaelT Well, that too, but there is a difference between being clear about your scope and audience and being, well, often downright hostile.
 
user55340
3:23 AM
Every sysadmin idolizes the BOFH a bit. Its when they make that role into a reality is the problem.
 
user15026
And yes, it is unfortunate that there's not a site for those not at whatever level SF wants, but that doesn't mean you get to be a jerknugget about not wanting lower level stuff.
 
user15026
@MichaelT And it seems like, in SF's case, they've kinda run with that attitude, which brings us where we are today.
 
user15026
@MichaelT See, while I appreciate these stories for their humor, I would be super pissed if I had to work with someone like that.
 
user55340
 
user15026
3:26 AM
Yeah, I know the archetype.
 
user55340
 
user15026
While it is amusing as a trope and archetype, it's not a good working model.
 
user55340
... wait a moment... that is the password policy where I work...
 
user15026
@MichaelT When I worked at the insurance company, there were different rules for each thing. Like desktop machine had one set of password rules, mainframe had another, lotus notes had another, CSR program had another...
 
user15026
it was very frustrating.
 
3:51 AM
Strongly culturally dependent. — user1249 May 22 '11 at 12:07
^^^ flagged as rude or offensive
 
4:02 AM
An average mod probably reviews like 12,000 posts an hour. Maybe he/she didn't read the whole question. (12000 posts/hour = .3 sec/post) — jakekimds 3 hours ago
I can confirm this.
 
 
2 hours later…
6:34 AM
Try posting it on programmers.stackexchange.com instead — Lior Kogan 1 min ago
 
@MichaelT Where I work, there are three systems, each with slightly different versions of that requirement: One system has a maximum length so I can't fit the numbers I usually tack on the end, one does the reset every month thing, and the third does reset every month plus don't use any of your previous passwords; so I can't keep them all "in sync" in any meaningful way
 
7:15 AM
How do u draw uml for code that resembles dispatcher design pattern...?
 
 
1 hour later…
8:18 AM
@LiorKogan looking to find code monkeys for your projects is off-topic on programmers.SE. — ratchet freak 1 min ago
 
 
3 hours later…
11:30 AM
folks, what does the colon (:) stand for in a sequence diagram...? ptgmedia.pearsoncmg.com/images/chap4_0321193687/elementLinks/…
 
@deostroll "variable_name: TypeName" is widespread syntax for type declarations, and is used by UML in various contexts (usually, in class diagrams).
 
I need help sequence - diagramming a piece of code...
will post it soon...
Any ideas? ^
 
11:46 AM
remove the if/else
 
@amon what does the :Messenger mean?
I was thinking about depicting the HandleConnections() in a separate swim lane...how do I do so?
Or do I have to abstract that to another class?
 
@deostroll That looks like it was meant to be “some Messenger object which I didn't bother to name”. The HandleConnections thread isn't really separate from the SMTPServer. This server is started from the Context and then polls the TCP implementation for connections, which it passes on to a worker thread. The difficulty seems to be in the asynchronous calls, not in separating various objects in the sequence diagram.
 
12:15 PM
I think I did my to-do items for PSE this weekend. I cleaned up the meta FAQ tag and posted about STCI Phase 2. Did I miss anything?
 
12:27 PM
I also managed to get Haskell installed. My problem appeared to have been some kind of version mismatch. Managing my PATH environment variables is getting tricky. Haskell Platform comes with a version of MinGW that is self-contained. My MinGW was first on my path and it apparently didn't have everything that Haskell Platform needed (or maybe the versions were off, or something). Anyway, I moved Haskell Platform first and it was OK.
 
PATH has become a huge hack IMO
 
posted on April 12, 2015

Java master Bawan was interviewing an applicant for the Elephant's Footprint Clan. After the usual preliminary questions had been asked (about abstract classes, and how to make numbers fizz or buzz), Bawan drew a simple database schema on the whiteboard and asked the applicant to define some POJOs suitably annotated for Hibernate. “I don’t know what you mean,” said the applicant. “Doma

 
@ratchetfreak I'm thinking that, yes.
 
The premise is simple
 
Especially since in order to effectively manage it, you need a third party tool.
 
12:30 PM
store a collection of directories with executables that will be needed often
 
Some applications look for libraries on the path, as well.
Now that's hacky.
 
however when applications rely on it too much and don't really allow non-PATH reliant solutions...
like looking for the standard DLLs
 
IMO, the PATH should be for me as a user, not for applications.
 
indeed just what you can use in the command shell
 
There are other methods of configuring an application, ranging from user-specific environment variables to configuration files to arguments.
But yeah, PATH should be exclusively for executables that I run from a terminal window.
 
12:34 PM
there is also the registry to configure where libraries can reside
though that has its own nightmares
 
Eh. The registry is hard to change. A prime case is Java. I can install any number of JREs side by side. Especially in my work environment, we certify an application in a certain environment (including the OS and JRE). It should be easy to point to a new JDK (in my build environment) and JRE (in a test/deployment environment).
 
problem with the registry is that no-one knows how it should be used
 
Both registry and PATH are too hard to change. Using a shell script to launch the application is often easier, since I can change it to any JRE. I can also have the shell script take an argument of a JRE if I wanted to.
I don't even know how to use the registry properly. It's a giant mystery. Does UNIX even have anything like the Windows registry?
Everything has environment variables, though. But PATH is being abused to no end.
 
I once traced how files are opened when double clicked in explorer
it's a mess
 
I wonder if the registry will go away eventually.
Does Windows 10 still have it?
 
12:44 PM
I doubt it too many applications rely on it
things like language settings are stored there
so unless they provide an api like it
 
I think it would probably be an OS level change to make it go away. And would break many old applications, unless there was some kind of API to fake it.
Although a significant architectural change like Windows 10 would be a good opportunity to make that happen.
 
see HKCU/Control Panel/International
and the 32 vs. 64 bit registry is a real mess
 
12:57 PM
What I would like to see is a shell setup where the default commands is only the file management and a way to load/unload specific commands
basically everything is opt-in explicitly
and there should be an easy way to get back to the defaultsetup
 
That would be interesting. Isn't that the point of environment variables, though, when done right? You, as a user, can select where to look for commands (executables) and what order to look in each location?
It's just that application developers have abused them so it's not that anymore.
 
back to origins then :P
 
I still prefer the idea of application-specific configuration.
 
so each executable would need a config file next to it with the env variables?
 
Your application needs a library, tell me where that library is. During installation, I can scan common places to find one or see if your user configuration offers one and have that as a default.
 
1:02 PM
that'll lead to dll hell
 
@ratchetfreak Yeah. There should be sane defaults, perhaps defaulting to system level configuration. But I should easily be able to override any setting on a per-application level.
 
if you don't constrain versioning
 
We're already in DLL Hell.
 
no need to enable it even more though
 
We're already in a place where packages have dependencies on specific versions of other applications.
 
1:04 PM
but no central way to manage those versions
 
I do it manually based on where I install them.
But yeah, it's not the best or automated.
 
1:30 PM
@ThomasOwens isn't a tag, did you mean to say ?
 
@durron597 is a synonym of
 
@ratchetfreak I just meant, in his list in the STCI post
 
1:51 PM
@durron597 It's a synonym. You can edit the post, you know. It's CW. I generated my list by going to the tag page and searching for "job", "career", and "resume" and typing all of the ones that showed up.,
I'm sure there are others in the same category.
 
@ratchetfreak Are you the one attacking the tag? If so see this
@ThomasOwens oh, it doesn't show the number of posts next to it when it's a synonym
Also, I have little experience with CW etiquette. I have opinions (not facts) about the 32-64 bit tags but I don't know if I should just edit them in or if I should leave a comment.
 
user114359
2:17 PM
 
user114359
@ThomasOwens does this mean I should not waste CVs on these questions?
 
@durron597 If you aren't sure, comment and it can be discussed and worked in.
@Snowman What do you mean, exactly?
 
user114359
We have been voting to close some of those questions:
 
user114359
13
Q: Burninate and blacklist request: [career-*] [job-*] [resume]

durron597This is not a duplicate of this: Usefulness of [career-development] and [career-transition] tags ... it's time for them to be blacklisted. The narrowness of scope of what actually would be on topic here is so narrow that it's pretty much invisible. All it does is invite off topic posts. We absol...

 
@Snowman Continue to do that. If it's the top voted one, it'll get more attention if there's anything left come May.
 
user114359
2:20 PM
But if you, as a mod, can go in and do it faster without a daily limit, are we then wasting our votes?
 
I'm not going to do anything drastic until May. Or you can hold off for the tags to be blacklisted before doing anything else (which would probably be preferable).
 
user55340
@Snowman given SF, mods may be a bit hesitant on that course of action for a bit.
 
user114359
@MichaelT SF?
 
@ThomasOwens Ok, commented.
@MichaelT I don't think so. SF's drama happened because Noob acted WITHOUT going to meta and the community first. That is the exact opposite of what @ThomasOwens is doing here.
 
user114359
ServerFault?
 
2:26 PM
@Snowman yea
 
user114359
I actually had to find that one in the list. I rarely go to that site.
 
@durron597 And that's why I'm not doing anything until May.
 
@ThomasOwens Ha! You replied to my first comment before I edited it.
 
and he is doing enough advertising on chat to avoid aviation's drama
 
Reload the page
 
user114359
2:27 PM
Also keep in mind that @ThomasOwens is also doing what we have been discussing lately and want to do anyway
 
I just saw it.
@Snowman And that's why I want to capture some of the discussion in comments on answers so it's easier to find
I don't want there to be any hidden disputes or things hard to find in chat. It's OK to iron things out here before going to Meta, but everything should ultimately be captured on Meta (as a question, answer, or comment).
 
According to the Royal Mail website there should always be a space between between the out code and the in code. The second part - i.e. the in code should always be of the form space-number-alpha-alpha. The JavaScript found on this site validates and adds a space. — Jason Fox 2 mins ago
 
@Duga Duga, have you been drinking?
 
user114359
@Duga Ruh-roh, Duga got confused by a link!
 
Oh. Programmers is inside a link. Stop it, Duga, you're drunk.
 
user114359
2:36 PM
Duga is high... on life.
 
report the bug
 
@ratchetfreak By "report the bug" I think you mean report the bug here
 
user114359
the algorithm should probably only flag "programmers" inside a link if it also contains "programmers.stackexchange.com"
 
@durron597 yep
 
According to the Royal Mail website there should always be a space between between the out code and the in code. The second part - i.e. the in code should always be of the form space-number-alpha-alpha. The JavaScript found on this site validates and adds a space. A basic regex for the in code is ([0-9]{1}[ABDEFGHJLNPQRSTUWXYZ]{2})$Jason Fox 1 min ago
 
2:41 PM
What, Duga?
 
@Duga See, this is why I want this to happen
 
user114359
Caught an edit to the same comment
 
@JasonFox edited the comment
 
Ah, I see. "Programmers" is in the link.
 
user114359
So much hatred in this question:
 
user114359
2:48 PM
-3
Q: Why do many exceptions not contain useful details?

Martin BaNote: This may be a bit of a rant too, however, there is the question if I am wrongly expecting too much of vendor exception messages. It seems there is a certain amount of agreement that exception messages should contain useful details. Why is it that many common exceptions from system compone...

 
user114359
Can we just take off and nuke the site from orbit? It's the only way to be sure.
 
s/site/internet/?
and no. the internet is a net positive.
 
@Snowman Has 2 reopen votes already
 
@Telastyn parts of it, though I don't know about the rest
 
user114359
I mean the question, not the whole internet. Without the internet, how else would I get my daily dose of kittens and puppies with meme-text?
 
2:51 PM
@Snowman - I'm glad you asked! Just send $$$ to my account and I'll be happy to spam you with postcards of gumpycat.
 
user114359
I think what irks me about that question is I improved it in part by removing the text saying "this is a rant," then the asker basically said I had no business doing that. Eh? It is right in the help center not to ask a rant question, and that the Qs and As belong to the community and they may be edited by others.
 
@Snowman Where is the hate there? He kinda has a point; if you're going to throw an exception, it would be nice if you told me why.
 
user114359
@RobertHarvey I am fine with the core of the question, but if you look at the original before I edited it the tone was definitely a rant. Plus, it attracted some negative comments all around.
 
I looked at the original. Oh well.
 
3:06 PM
I think that's a fine question if focused.
 
user114359
And, of course, it is not really answerable anyway. Like we know what the authors of the Java and C# languages intended or why they did what they did.
 
The answer: Because everyone does it this way.
 
user114359
The other way to look it would be "discuss the pros and cons of exception messages that are terse v. verbose"
 
If anyone can focus the question, do it. If he rolls it back, I'll undo and lock it.
 
Exceptions are thrown when "something bad happened, and there isn't anything I can do about it." It's a developer throwing up their hands, so a dearth of debugging information is not exactly unexpected.
 
3:08 PM
The better forum for this is programmers.stackexchange.com. On the question, the key difference is that the back-end as a service is more general, but provides no compiled sports stats. — danh 1 min ago
 
Forum. >_<
 
BOOM HANDLED.
Like a boss.
 
I close about 90% of the questions tagged by Duga.
I migrate about 1 percent.
 
SO Primary Voting begins in 4 hours, guys.
Me for SO mod.
3
I'll close the other 9% of questions tagged by Duga.
:P
 
wow, closed before I could even click on close.
 
3:14 PM
@Snowman Oh. The title.
 
user114359
Uh-oh, there is an edit war over the "rant" text now. I deleted it, @MartinBa added it back in, @YannisRizos just removed it again.
 
If he undoes it, flag it.
I'll lock it.
 
Locking means nobody can vote to reopen it. You might as well delete it.
 
Does anyone think it's salvagable? Because if so, I think it is a valid question. I'm not sure that it's not opinion-based, though. Can we actually answer it with an authorative answer?
 
11 mins ago, by Robert Harvey
Exceptions are thrown when "something bad happened, and there isn't anything I can do about it." It's a developer throwing up their hands, so a dearth of debugging information is not exactly unexpected.
 
3:19 PM
@Snowman The disclaimer is just a distraction. I hope he'll realize that and behave.
 
Basically, it's a psychology question. Most developers will only put debugging information in the exception if they think it will help them troubleshoot the problem.
 
Yeah. I think I'm going to cast a reopen vote on it.
 
user114359
I think the question is borderline. There are some good reasons for exceptions to include or not to include detailed information. But there are two problems that I see. First, only the authors of the exception classes can answer for sure.
 
A good example would go a long way.
 
@Snowman I don't think you need to be an author of an exception class.
 
3:20 PM
@Snowman Haven't we all been "authors of exception classes" at some point or another?
 
user114359
Second, it might be too broad because there are a ton of different exceptions and reasons might be different
 
The class allows you to put the information in. At different levels, I put different amounts of information in. Sometimes it's very specific (if it's going to be handled by a developer. The closer it gets to a user, the less detailed I get so I don't expose implementation details or I can use the output in error messages / logs that are visible to the user.
 
user114359
That was bad wording on my part. Maybe "language author" would be better.
 
It's really the person who generates the exception. I can add any message I want to any exception.
 
user114359
But look at the actual question: "Why is it that many common exceptions from system components do not contain useful details?"
 
3:22 PM
@Snowman How is an exception generated from .NET or Java standard library code different than me throwing the same exception in my code?
 
user114359
as a developer I can change the exception thrown in my own code to include more detail if I find it has insufficient details. I am not going to change core Java or .NET code to do the same, it is not practical.
 
user114359
The question is a rant about standard libraries skimping on details
 
Well, it was a rant.
 
@Snowman The question was why they skimp on the details.
 
user114359
How can any of us answer it, then?
 
3:24 PM
They could add more detail to the exceptions. Why don't they?
@Snowman That's the only thing that I'm not sure that we can answer.
 
user114359
There are plenty of questions in the closed graveyard stating "we are not tech support for your company" or "we did not develop language/library X, Y or Z"
 
I don't know how many core Java or .NET or whatever developers we have. Although if someone can find a reference that explains it and summarize it, then it's a good question.
If it's not documented anywhere and you need to be a core language developer, then it should be closed.
 
user114359
And that is the crux of the issue: can we cite a reference where a language architect said "we did X because of Y"
 
user114359
But I do agree that the answer could be useful and interesting
 
I doubt such a reference exists. The basic principle is "be consistent;" you can't do that when the debugging information will vary wildly from exception to exception.
Look at "InvalidOperationException:" System.InvalidOperationException should be thrown if a property set or a method call is not appropriate given the object's current state. For example, writing to a System.IO.FileStream that has been opened for reading should throw a System.InvalidOperationException exception.
That means the exception has to be smart enough to figure out what is invalid about the operation, in order to generate proper debugging information for it. I submit that is the job of the developer, not the exception.
 
3:28 PM
@Snowman This is a chicken - egg problem. How can we attract core developers to the site, if we close all questions they could answer?
 
@RobertHarvey That's a C# example. Does C# have something like Java's "getMessage()" or "getLocalizedMessage()" operation on an exception that returns a human-readable string?
 
Exception.Message. But it's the same one you get in the stack trace.
 
In Java, I usually build that String up with all kinds of useful information before I throw the exception.
 
some exceptions I'll add info to, some I won't
 
user114359
Then how about we reopen the question, edit it to be as good as possible, then lock it?
 
3:29 PM
@Snowman What purpose would that serve? Nobody can answer a locked question.
 
often depending on if I expect the exception to reach a human post-release.
 
however the catch site can't really assume the exception message is parseble
 
The chicken-egg problem is a valid point. If there's someone out there who can answer it, should we actually close the question?
 
or if the stacktrace would be insufficient by itself.
 
@Telastyn Whenever I get an exception, I always log the message.
 
user114359
3:30 PM
@RobertHarvey ugh you're right
 
@ThomasOwens Generally, such questions only get closed if they veer into "Customer Service" territory.
 
@RobertHarvey Yeah. Tech support is off-topic for us.
brb grabbing noms
 
> Chicken Egg Problem n. def: A saturday morning where you have eggs, but no appropriate pork products, or pork products but no eggs.
 
Well, it's open now.
 
@ThomasOwens - exactly, are you going to get the exception? At least for me, there are some exceptions that are there only to alert developers that they added data and forgot to change a switch (for example)
things that only happen in production due to catastrophe.
 
user114359
3:31 PM
@ThomasOwens @YannisRizos Could we at least clean up the comments on that question?
 
@Snowman Hm... It's a borderline question, and I think leaving the comments there (for now) we'll save us from another round of "this is a rant", etc. I think there may be some value in letting people know that we already had that discussion.
@Snowman There's already a flag there, so we'll get at it eventually.
 
Is there any merit to editing it to be more language agnostic? e.g. if you do Integer.parseInt(null)... well (Java's source code):
public static int parseInt(String s, int radix)
            throws NumberFormatException
{
    if (s == null) {
        throw new NumberFormatException("null");
    }
 
Doesn't that produce a message like "string parameter cannot be null"?
 
since when is "null" an incorrectly formatted number? O_o
 
Correctly formatted number have... digits.
 
3:44 PM
@RobertHarvey No.
 
throw new NullArgumentException("s");
 
Yeah, that's a better exception.
 
If I was writing that code and the target was a developer, I would have written throw new NumberFormatException("Integer.parseInt(String, int) - String cannot be null");. If it was for a human, I would have written it as throw new NumberFormatException("String to parse cannot be null");
 
What about NullArgumentException?
 
Java doesn't have a NullArgumentException.
 
3:47 PM
@RobertHarvey doesn't exist only nullPointer and IllegalArgument
 
The options are IllegalArgumentException or NumberFormatException, for this particular case.
Apache Commons Lang does add a NullArgumentException that is explicitly designed for this purpose: commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/…
 
user114359
Keep in mind that Java exceptions have stack traces, so you should know the exact line of code that threw the exception. This means you can look up in the code to see the "if" (in this case) that failed, telling you precisely why the exception was thrown and_what_ code called it.
 
@Snowman That's true. But I don't think exposing stack traces to a user is a good idea.
 
user114359
@ThomasOwens I agree, this is an excellent candidate for a log file.
 
So if the user encounters a problem in deployed software, the contents of the message should be clear enough to point the developer to a location to start debugging, but not so specific that it reveals details.
 
3:51 PM
@ThomasOwens which is what the stacktrace is for
 
user114359
The user message should be domain-specific: error frobnicating widgets. The log contains as much detail as is appropriate.
 
@ratchetfreak Yes. But that shouldn't be in a log file.
I don't think stack traces are appropriate for a log file, either.
 
user114359
@ThomasOwens stack traces in log files have saved my ass more times than I can count
 
a trace or debug level log at least
 
Yeah, a trace or debug level, sure. But are you running production software with trace or debug logging?
Probably not. So the error message needs to be specific enough to help the developer start debugging in the right place.
 
3:53 PM
unexpected exceptions should have all info logged
including traces
 
That's a horrible, horrible idea. Exposing stack traces to a user is just plain wrong.
 
if you are parsing user input you will be expecting numberformat exceptions and shouldn't even expose that you caught one
then you wrap the entire thing in a ParseException and include the original record and location of where it failed
 
@ratchetfreak Depends on the data source.
 
user114359
@ratchetfreak Which is why I said the user needs a domain-specific error, log the exception if it is needed. A NumberFormatException or anything else from parsing user input probably doesn't even need to be logged.
 
User input that they type in? Sure, I'd expect errors. If I'm reading from a stream generated by another application that I make, it should be far less likely.
Even another application that isn't under my control but conforms to some standard or documented interface, I'd want to log nonconformances to that interface.
 
user114359
3:56 PM
Here is a specific example. If the app is talking REST/SOAP with another system and there is an error, I might log something detailed while telling the user "sorry, communication failed with system XYZ"
 
user114359
But as a developer poring over the logs I want to know if there was malformed XML, connection reset, cannot find IP or hostname, etc.
 
@ThomasOwens that's why wrap the numberFormat in Parse and log the record that failed to parse
 
@ratchetfreak I suppose that would work. But still, a message of "null" is not suitable for logging. It doesn't tell me anything about where to start debugging. And I still stand by never putting stack traces in a log file.
 
there should at least be enough information that you know where it was logged
so you don't have to go through 5 different places in the code
 
Yes, there should be.
And I think that starts with meaningful log messages all the way up and down the system, including exceptions thrown in core code.
 
3:59 PM
@ThomasOwens you don't need to include the method name, because that's included in the stack trace. However I definitely think it should say more than just "null"
 
01:00 - 16:0016:00 - 00:00

« first day (1683 days earlier)      last day (3306 days later) »