The log levels WARN, ERROR and FATAL are pretty clear. But when is something DEBUG, and when INFO?
I've seen some projects that are annoyingly verbose on the INFO level, but I've also seen code that favors the DEBUG level too much. In both cases, useful information is hidden in the noise.
What are the criteria for determining log leve...
How do I configure an ASP.NET application to write verbose log messages of what ASP.NET engine itself is doing. What I get with
<trace enabled="true"
pageOutput="false"
requestLimit="10000"
writeToDiagnosticsTrace="true"/>
is just as much as
[2488] aspx.page: Begin PreInit
[2488] aspx.page: End PreInit
[...
I think the more verbose, the more beautiful code is. Code is meant to be read by computers and humans. Verbose, correct code therefore serves humans and computers best, and therefore is the most beautifull code. With Linq, I have seen some code (but unfortunately can't post here due to rights etc).
Please do not discuss about verbosity...
I just wrote this incredibly verbose code to turn numbers like 2 into 02. Can you make this function shorter, please (maintaning the functionality)?
public static function format(n:int, minimumLength:int):String {
var retVal:String = n.toString();
var stillNeed:int = minimumLength - retVal.length;
for (var i:int = 0; i < stillNee...
In general, I prefer to be verbose with .NET class and instance names, but some times (to quote Mike Woodhouse):
Over-verbosity tends to conceal syntax, and syntax is important.
The first place I felt like I really strayed into the over-verbosity regime is upon implementing the Model-View-ViewModel (MVVM) pattern in Silverlight and...
I like how Groovy makes all of your instance variables and class variables public and writes getters and setters on your behalf. This saves a lot of unnecessary coding. On the other hand, my boss hates it, making me very sad :(
Is there a way to achieve the conciseness of Groovy in Java without having to use Groovy or some other framewo...
I recently came upon some code filed with the following
} catch (FooException e) {
//do something
} catch (BarException e) {
//do something
} catch (Exception e) {
throw e;
}
which is easily re-written as
} catch (FooException e) {
//do something
} catch (BarException e) {
//do something
}
and
if (!(flag == false))
which ...
what is good practice for generating verbose output? currently, i have a function
bool verbose;
int setVerbose(bool v)
{
errormsg = "";
verbose = v;
if (verbose == v)
return 0;
else
return -1;
}
and whenever i want to generate output, i do something like
if (debug)
std::cout << "deleting interp" << std:...
The Python unittest framework has a concept of verbosity that I can't seem to find defined anywhere. For instance, I'm running test cases like this (like in the documentation):
suite = unittest.TestLoader().loadTestsFromTestCase(MyAwesomeTest)
unittest.TextTestRunner(verbosity=2).run(suite)
The only number I've ever seen passed as ver...
I recently started studying functional programming using Haskell and came upon this article on the official Haskell wiki: How to read Haskell.
The article claims that short variable names such as x, xs, and f are fitting for Haskell code, because of conciseness and abstraction. In essence, it claims that functional programming is such a...
Gnu GPL page advocates a following header in each file of GPL project:
This file is part of Foobar.
Foobar is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your optio...
I work in a shop where the mentality/culture does not have any sense of the concept of "less being more" (i.e. the less code you have to maintain, the more flexible you can be, and the faster you can fulfill customer requests). There's also a strong copy-and-paste mentality around here.
The backend code base being used is written in ra...
While I realize that Visual C++ is a language lacking much of the syntactic-sugar that most of us new programmers are used to these days, VC++ 2005 must have some shortcuts that can decrease the verbosity of the code at least a little; does anyone know of these, or is c++ just that verbose?
...
I hear people comment on Java's verbosity (and other languages) as if it were a bad thing, why? To me it makes code easier to understand. Less typing seems like a really trivial argument.
...
In the following examples:
the first seems more verbose but less wasteful of resources
the second is less verbose but more wasteful of resources (redefines string each loop)
Which is better coding practice?
First example:
using System;
using System.Collections.Generic;
namespace TestForeach23434
{
class Program
{
s...
Is there a way to make ssl handshake more visible to me using boost asio?
I am getting an error: "asio.ssl error".
I just want more verbosity, because this message means almost nothing to me.
Thanks.
...
I want to create a model named Model. I'm pretty sure this isn't allowed, so I'm forced to use some other term for the model name. Let's say I call it Mdl. However from the user perspective, I want to still refer to the table as Model. Is there a way to define a verbose name for the entire model Mdl the same way you can for model fie...
I often use String.Format() because it makes the building of strings more readable and manageable.
Is there anyway to reduce its syntactical verbosity, e.g. with an extension method, etc.?
Logger.LogEntry(String.Format("text '{0}' registered", pair.IdCode));
public static void LogEntry(string message)
{
...
}
e.g. I would like t...
Okay so i've got a stored proc which does a bunch of things (not important).
Now, the stored proc is quite verbose, it prints out a lot of things (progress, rowcounts, etc).
As you all know, using PRINT with variables is extremely painful (requiring you to have a CAST party).
So, ive used RAISERROR to print these friendly messages (ev...
Is there a way to make unittest.TextTestRunner completely quiet, meaning that it never prints to output on its own? Even at verbosity=0 it prints results when done.
The thing is that i want to process the TestResult object returned by the runner before anything is printed.
...