|
|
|
|
|
posted at
06:01 PM
|
trackback
|
|
link
On the forums, someone was asking about creating a horizontal menu using Razor code in ASP.NET Web Pages. The technique of combining an unordered list (<ul> element) with CSS to create a horizontal layout, using <a> elements as the menu items, is a pretty well-known one; you can find examples here and here, not to mention in the Site.css file that comes with a lot of the Visual Studio web project templates.
The actual Razor part is likewise not hard. Someone showed this code as a way to dynamically build a list (to which you'd then apply the CSS):
<ul> @foreach (var item in collection) { <li>@item</li> } </ul> The interesting part was a comment that the original poster made: It sounds like if I have lots of logic inside the loop, I might be best served moving that to the back end somewhere and just calling a method that returns the text to display within each list item. What this sounded like to me was a fun excuse to see about creating a custom helper. Helpers are, in effect, chunks of code and markup; when you invoke the helper, it runs the code and emits the markup. For example, by creating a helper to render a horizontal menu, you could do something like this in a page:
@MyHelpers.HorizontalMenu( "Home|Default.cshtml", "About|About.cshtml", "Login|Login.cshtml", "Register|Register.cshtml") <h1>My Page</h1> <p>Hello, horizontal menu.</p> And get something like this:
Well, anyway, in the App_Code folder of an ASP.NET Web Pages site (it must be in that folder), I created a file named MyHelpers.cshtml. In the new file I replaced the default contents with the following:
@helper HorizontalMenu(params string[] menuListArrary) {
string[] menuItem; string menulink = ""; string menuLIitems = "";
<style> /* This should all be in a .css somewhere */ #horizontalMenu{height:28px;background-color:lightgray; font-family:"Segoe UI";font-size:11pt;font-weight:bold; color:white;} #horizontalMenu ul {margin:0px; padding:0px;} #horizontalMenu ul li{ display:inline;height:30px;float:left;list-style:none; margin-left:15px;position:relative; border-right:2px solid white;padding:6px; } #horizontalMenu li a {color:#fff; text-decoration:none;} #horizontalMenu li a:hover {color:red;} </style>
<div id="horizontalMenu"> @for(int i = 0; i < menuListArrary.Length; i++){ menulink = ""; if(menuListArrary[i].Contains("|")){ menuItem = menuListArrary[i].Split( new Char[]{'|'}); menulink = String.Format("<a href=\"{1}\">{0}</a>", menuItem[0], menuItem[1]); } else{ menulink = menuListArrary[i]; } menuLIitems += "<li>" + menulink + "</li>"; } <ul>@Html.Raw(menuLIitems)</ul> </div> }Some things of note, I guess:- The name of the file (MyHelpers.cshtml) acts as the namespace for any helpers in that file; the name of the helper itself (first list of the previous example) is the method. That's why the earlier example invokes the helper as
MyHelpers.HorizontalMenu.
- The CSS for the menu layout probably should not be in this file; it probably should be in a separate .css file.
- And/or at least parts of the CSS should probably be parameterized so that you can pass values to it when you invoke the menu. Maybe.
- You can pass as many items to this as you like (hence the use of the
params string[] syntax in the helper method signature).
- The original poster had noted that in some browsers, if the
<ul> and <li> elements are on separate lines, the silly browser puts blank spaces between them. So a goal here was to smush everything together onto one line.
- The menu text and menu target/link are separated by a pipe character ("|"). This was a quick-and-dirty thing. It might be more elegant to pass, say, 2-element arrays to the helper or something, but I generally think that invoking helpers in a page should be as straightforward as possible.
- As coded, the links for the menu items have to be absolute. However, they really should be expressed, or at least expressable, using the ASP.NET
~ operator, which returns the virtual root, but which requires the ASP.NET Href method to resolve. I didn't bother.
- For some reason I thought it was important to have logic in case a menu item was passed to the helper that didn't have a target in it. I can't offhand think of when this would ever be useful, tho.
I'm sure if I gave this another 5 minutes of thought I could improve it. And others could probably give it 10 seconds of thought, ditto. But it was fun while it lasted. :-)
[categories]
aspnet, webmatrix
|
posted at
08:46 AM
|
trackback
|
|
link
A couple of us on the ASP.NET documentation team are working on a topic that describes how to disable request validation in ASP.NET. What do you think about the following draft? Any feedback welcome.
Request validation is a feature in ASP.NET that examines an HTTP request and determines whether it contains potentially dangerous content. In this context, potentially dangerous content is any HTML markup or JavaScript code in the body, header, query string, or cookies of the request. ASP.NET performs this check because markup or code found in the URL query string, cookies, or posted form values might have been added to the request for malicious purposes.
For example, if your site has a form where users enter comments, a malicious user could enter JavaScript code in a <script> element. Then when you display the page with the comment to other users, the browser would execute that JavaScript code as if it had been generated by your website. This is commonly referred to as a cross-site scripting (XSS) attack.
Request validation helps prevent this kind of attack. If ASP.NET detects any markup or code in a request, it throws a "potentially dangerous value was detected " error and stops page processing. The default error page looks like this (click to enlarge):
Request validation throws this exception when any HTML markup is detected, including harmless markup like <b> (bold) elements. This can be a problem if you want your application to accept HTML markup. For example, if your site lets users add comments, you might want to let users perform basic formatting using HTML tags that put text in bold or italics. In cases like these, you can disable request validation and check for malicious content manually, or you can customize request validation so that certain kinds of markup or script are accepted. For information about how to specify a custom error page instead of the default page shown above, see How to: Handle Application-Level Errors. For information about how to customize request validation, see the whitepaper Security Extensibility in ASP.NET 4 (PDF).Disabling Request ValidationSecurity Note If you disable request validation, you must check the user input yourself for dangerous HTML or JavaScript. For more information, see Manually Checking Requests later in this topic. The method that you use to disable request validation depends on what type of ASP.NET web application you are working with:
Disabling Request Validation in ASP.NET Web Forms (4.0 or later)You can disable request validation for an entire application, but this is not recommended. The recommendation is to selectively disable request validation only for the virtual paths or specific pages where you want to allow markup.
In either case, you must make two changes in the Web.config file. The first change is to set the requestValidationMode attribute of the <httpRuntime> element to "2.0". This makes request validation occur later in the sequence of request processing events. This setting is required for applications using ASP.NET 4 and later because for as of ASP.NET 4, request validation takes place earlier in the request life cycle than it did in previous versions of ASP.NET.<system.web> <httpRuntime requestValidationMode="2.0" /> </system.web> The following example shows how to make request validation occur later for a single page, in this case the Test.aspx page:<location path="test.aspx"> <system.web> <httpRuntime requestValidationMode="2.0" /> </system.web> </location> The second change is to set validationRequest to false. For the application as a whole, you do this using the <pages> element in the Web.config file as shown in the following example. (This setting is effective only if you also set requestValidationMode="2.0".)<configuration> <system.web> <pages validateRequest="false" /> </system.web> </configuration> For an individual page, you can set set validationRequest to false in the @ Page directive of the page, like this:<@ Page validateRequest="false" %>
Disabling Request Validation in ASP.NET MVCTo disable request validation in an ASP.NET MVC application, you must change request validation to occur earlier in the sequence of request processing as explained earlier for ASP.NET Web Forms. In the Web.config file, make the following setting:<system.web> <httpRuntime requestValidationMode="2.0" /> </system.web> In ASP.NET MVC, you can disable request validation for an action method, for a property, or for a field (input element) in a request. If you disable validation for an action method, you disable it for any requests that invoke that method — that is, all user input is allowed for any request that calls the action method. This is therefore the least secure way to disable request validation.
If you disable validation for a property, you allow user input for any reference to that property. If you disable validation for specific fields, you can control which request element (field) allows arbitrary user input.
To disable request validation for an action method, mark the method with the attribute ValidateInput(false), as shown in the following example:[HttpPost] [ValidateInput(false)] public ActionResult Edit(string comment) { if (ModelState.IsValid) { // Etc. } return View(comment); } To disable request validation for a specific property, mark the property definition with the AllowHtml attribute:[AllowHtml] public string Prop1 { get; set; } To disable request validation for a specific field in a request (for example, for an input element or query string value), call the System.Web.Helpers.Unvalidated method when you get the item, as shown in the following example:var rawComment = Request.Unvalidated().Form["comment"]; Disabling Request Validation in ASP.NET Web PagesTo disable request validation for ASP.NET Web Pages, in code, call the Request.Unvalidated method and pass it the name of the field or other object that you want to bypass request validation for. The comments in the following code snippet indicate which lines of code cause request validation to be invoked and which ones do not.
Note In ASP.NET Web Pages applications that do not also include Web Forms pages or MVC controllers, you do not need to make any changes in the Web.config file. // Validated, throws error if input includes markup var userComment = Request.Form["userInput"];
Request.Unvalidated("userInput"); // Validation bypassed Request.Unvalidated().Form["userInput"]; // Validation bypassed
Request.QueryString["userPreference"]; // Validated Request.Unvalidated().QueryString["userPreference"]; // Validation bypassed; Manually Checking RequestsIf you disable request validation, you must manually check the unvalidated user input for potentially dangerous input. Doing this is critical for the security of your application. However, it is not necessarily an easy task. If your code is flawed or if you forget to protect one page or one field, malicious users may eventually find and exploit that weakness.
In general, you should restrict as narrowly as possible the list of HTML tags that you will accept, and reject everything else. (This is sometimes referred as using a whitelist.)
If you are working with Web Forms pages, you can often use a third-party "rich text" control that lets users format text. These controls often have validation routines built in that permit only safe HTML. (If you use a control like this, make sure that it offers HTML safety.)
If you are not using a control like that, a very simple approach is to HTML-encode the user input, and then to selectively unencode just the HTML tags that you want to allow. This is practical if the tags you want to allow do not include attributes, such as <b>, <strong>, <i>, and <em>. The following example shows a way to encode and then selectively decode just the <b> and <i> tags.// Encode the string input StringBuilder sb = new StringBuilder( HttpUtility.HtmlEncode(htmlInputTxt.Text)); // Selectively allow <b> and <i> sb.Replace("&<b&>", "<b>"); sb.Replace("&</b&>", "</b>"); sb.Replace("&<i&>", "<i>"); sb.Replace("&</i&>", "</i>"); To allow more flexible HTML markup in the user input, you can use third-party libraries, such as the HTML Agility Pack that you can download from the CodePlex website, or the open-source OWASP Anti-Samy utility. For more information, see the example on the OWASP site of disabling request validation for ASP.NET.
Another approach is to use an alternative form of markup, like MarkDown, and then convert the user's text to valid and safe HTML. Many wikis use this approach. For more information about Markdown, see the Daring Fireball site.See AlsoNew ASP.NET Request Validation Features for ASP.NET 4.5 ASP.NET MVC Tip #48 – Disable Request Validation
[categories]
aspnet, webmatrix
|
posted at
06:16 PM
|
trackback
|
|
link
For Friday Fun, a word that's new to me (tho not a new word per se — in fact, it's from the 1800s). First: I really like the word retronym, which refers to a term that has to be amended due to a technological change. Thus before the invention of the electric guitar, there was no notion of an "acoustic" guitar; all guitars were acoustic. Likewise dial phones, analog clocks, Classic Coke, and so on. (List of retronyms)
The new word I just learned is semantically kinda-sorta in that camp. (Maybe it's kind of opposite-y.) The term is skeuomorph (Greek: "vessel-shape"), and it refers to a vestigial design feature that represents something that was once functional. A popular example is the buckles on shoes — originally used to, you know, buckle the shoe, now used just for looks. Other examples are faux wood or fabric patterns in plastic; light bulbs shaped like candle flames; fake shutters that people mount next to the windows of their house; fake spokes in a hubcap; the "wax" on a bottle of Maker's Mark bourbon; and (a famous example) the tiny and useless "handle" that's on virtually all bottles of maple syrup.
Digital things often involve skeuomorphic features, and a lot of digital UI is often deliberately designed to look like something real. As a trivial example, drop shadows on anything and everything are purely decorative, since of course there is no light source on electronic bits. If you design digital things, you have a choice of a wide variety of textures — wood, metal, etc. — that you can paint onto something to make it look real. Digital cameras often have a fake shutter sound when you take a picture. The icons for every music player (for play, stop, pause, etc.) all derive from those same physical functions in a tape player, where the Play arrow actually represented physically moving the tape. Obviously, the desktop metaphor for Windows (et al.) is skeuomorphic, along with "files" and "folders". Lexicographerix Erin McKean notes that online dictionaries display information in a format that's based on book-y layouts, even tho that format was originally dictated by the constraints of the printed medium that don't really apply to online stuff.
Skeuomorphic design elements are by no means inherently bad or silly. Sure, putting fake rivets on jeans seems a little unnecessarily quaint. And there's a rousing discussion in the UI design community about whether skeuomorphic design is ultimately a good idea for something like tablets. One blog post calls it "the tactile illusion." For an earful, search for "skeuomorphic user interfaces".
But the argument in favor is that a skeuomorphic design provides a familiar interface — a "material metaphor" — so that people can fit a new design pattern into their existing understanding of the world. For using a music player on a computer this is convenient, tho not essential; ditto for being able to "flip" "pages" in a "book" on an e-reader. If I were designing a jet plane, tho, I would think long and hard before I made any changes to the control panel, no matter how anachronistic it might be in the age of fly-by-wire to have physical control yokes. When we start seeing cars that are likewise controlled all digitally (and we're not far off), it will be a long time before we are weaned off steering wheels, brake pedals, and accelerators.
Update 17 Jan 2012: Cory Doctorow posted a piece (In praise of skeuomorphs) on skeuomorphs just today (17 Jan)! (h/t to Edward Banatt for the link)
Anyway, I'm happy to know this new word and to have been introduced to the whole idea of skeuomorphic design. Apparently the learn-new-words part of my brain remains, in fact, more than just a vestigial decoration.
[categories]
language
|
posted at
06:46 PM
|
trackback
|
|
link
My wife is on the mailing list for the Democrats, and recently the Obama 2012 campaign sent us a peculiar little document that's like a little pocket guide to the accomplishments of the current administration. I say peculiar not just because I simply cannot imagine whipping out my handy wallet-sized list of talking points and lambasting some innocent with them, but because there are some editorial peculiarities in this little doc. And those are the issues I really care about. :-)
The most, er, egregious issue is parallelism in lists. Some of them are ok, like this[1]:- Ending Insurance Company Abuses.
- Keeping Premiums Low.
- Expanding Access To Care.
- Closing the Medicare Prescription Drug "Donut Hole."
Fine; all the list items are gerunds, i.e., they end in –ing. But here's another:- Equal Pay For Equal Work.
- Improving Women's Health.
- Protecting Women's Right to Choose.
Hmm. Two out of three are gerunds, but that first one is, like, you know, not. Odd.
Things get stranger yet. Here's another list:- Job Creation.
- Saved the auto industry from collapse.
- The private sector has created jobs.
Um ... what the heck kind of structure is that? It's like a smorgasbord of sentences on an idea platter.
There's more like this, but you get the idea.
Then there's the questionable punctuation. I don’t know if you noticed, but there's a kind of Random Capitalization thing going on with the list text. Some list items use heading caps, some use sentence caps. Is there some logic to the choices? Not that I can tell.
Then I don't know what to make of this. I cite it in full so you can see where the issue is:
Ending Insurance Company Abuses. Prohibiting insurers from denying coverage to people with preexisting conditions; cancelling coverage when someone gets sick. The way I read this, I'm pretty sure that where they have that semicolon they really just wanted an and (preventing ... denying and cancelling). Otherwise it reads to me that one of the accomplishments of the administration is cancelling coverage.
All in all, it was a highly distracting exercise to try to get through this.
Reading propaganda — from anyone — is always a bit of a challenge anyway. But you'd think the least they could do is get themselves a decent copy editor for it.
[categories]
editing, writing
|
posted at
12:06 AM
|
trackback
|
|
link
One of my tasks over the last few years has been to whittle down our collection of CDs, after of course ripping them. I use Windows Media Player for ripping, which has been quite satisfactory. In fact, more than satisfactory. I have fed innumerable CDs into my machine, and time after time, across a wide range of genres and for CDs going back 25+ years, WMP has blithely displayed the CD title and list of tracks.
This actually is quite amazing, if you think about it. I can start up a CD that I distinctly remember buying 27 years ago, and WMP figures out what it is and then goes out to ... somewhere ... to bring back album art and a track listing. (Try that with your vinyl or cassette tapes, ha.) When I was working my way through the pop/rock and jazz CDs, I don't think it ever failed to find the right CD and track listing. I think the only flaw I ever found was that it would retrieve CD cover art that was for a slightly different edition of the CD.
Now I'm ripping classical CDs, and here I begin to detect that this technology is not exactly, entirely perfect. What I'm realizing (after doing exactly zero research about this) is that WMP is leveraging a wee bit of crowdsourcing in order to come up with track listings.
For example, I put in a Dvorak CD that was an old Sony reissue on the "Essential Classics" label. WMP found the CD, no problem, but this is what it came up with for a track listing:
Oops. A DGG recording by Helene Grimaud was tagged by someone who I think must have intended to come back later and finish:
This RCA recording was tagged by someone who could not be bothered to repeat all of that stuff for every movement, good golly:
And this one made me, as the kids say, LOL. This budget "White Label" brand recording was tagged by someone who had heard of Mendelssohn but not "other guy":
("Other guy" is the admittedly obscure composer D. Cimarosa.)
There have been a few — very few — classical CDs that have flummoxed ol' WMP completely; it just has no idea what the CD is or what the tracks are. I'm keeping those in a pile for the end, because I'm going to have to go in and manually enter the names of all the tracks, bleah. (For that Cimarosa CD, it's going to be 37 tracks.)
On the plus side, perhaps my manually entered labels for the mystery tracks will become part of WMP's communal knowledge about these CDs. And someone down the line will some day slide some classical CD into their computer and get the benefit of what I enter. Assuming, of course, that I do a good job. :-)
[categories]
technology
|
Friday, 23 December 2011
|
"Lazy" speech
posted at
09:02 AM
|
trackback
|
|
link
Once again I have heard someone refer to a speech pattern as "lazy." Of all the complaints about the way other people speak (and by golly, there are plenty), the one that makes the least sense to me is that people's speech is lazy. And yet:... my pet peeves. They’re about pronunciation, rather than grammar and news people on television are doing this more every day:
1. Fill, instead of feel. 2. Pill, instead of peel. [etc.]
To me, this “sims” just lazy. [source] Plural forms are always going to be determined by what the majority is used to or comfortable with, with a tendency towards laziness. Very few people are going to bother with Priora when Priuses is perfectly functional. However, that doesn't mean that words adopted into English should use regular plural forms; it simply means that they are likely to. [source] If I'm talking with friends or sending a text, I don't use "proper" English grammar, but I do recognize that my grammar is incorrect. I just don't care, and I know that my listener will understand me even if I'm lazy. [source] A split infinitive can be a lazy way not to write a better sentence. [source] When a speaker or writer uses incorrect subject/verb agreement, it tells the audience that he is either lazy or does not care. [source] Using the singular 'they' means you're not trying, you don't know grammar rules, or you're lazy. [source] There's also a Facebook page titled Poor Grammar is the sign of a lazy mind.
What doesn't make sense to me is that lazy means unwilling to put forth some sort of effort. But for a native speaker, emitting correct sentences is literally effortless. People don't say aks instead of ask or I could care less instead of the nominally correct version because they've expended all the effort they're going to put forth and simply refuse to go that extra mile (or syllable, or consonant cluster). People don't say readin' and writin' because using a velar -n (-ng) is harder to use than a dental one. People don't say Priuses because it's so hard to emit some made-up plural like Priora.
Try this. If people were truly being lazy in their speech, what you'd expect is that they'd just use less speech — shorter words and shorter sentences. Or maybe they'd just stop talking.
Or try this. Compare a "lazy" speaker with someone who actually is having difficulty speaking: someone who's drunk. You can easily tell the difference, and even the "laziest" speaker sounds different when inebriated.
Or try this. Listen to other people who speak the same dialect. They all sound the same, right? So are they all lazy? That would seem to go against the observation that laziness, like ambition, smarts, and good looks, is spread around about the same everywhere.
There are of course alternative readings for "lazy." Perhaps someone is trying to say that a speaker is "too lazy" to learn the correct forms of words. I think you can parse this as "This speaker has a different dialect, but should also acquire a standard dialect." That's an interesting sociological discussion about the place of non-standard dialects in a given culture.
It also raises the question of whether the accusers feel that they themselves have made extra effort to acquire the speech patterns that are used by the non-lazy. Did they, for example, rise at dawn to practice their pronunciation drills and stay after school to master tricky verbal forms like ask? Or did they in fact acquire their dialect the way everyone else does, with the difference that theirs happens to conform more closely to standard written English?
"Lazy" is basically a moral judgment. But there is no moral calculus for dialects. Sure, there are social consequences to how you speak, just like there for how you dress. Is someone who shows up at a wedding in jeans "too lazy" to dress properly? Or are they maybe just clueless, or tactless, or "born in a barn," or even rebellious?
Probably what an accusation of "lazy" speech really means is that those "lazy" speakers should speak like me, because I speak correctly. That, of course, is a common human sentiment. But let's not confuse our conviction about the correctness of our speech with laziness on the part of those who don't share that conviction.
[categories]
language
|
posted at
10:30 PM
|
trackback
|
|
link
One way for me to retain sanity in the face of the commercial onslaught of Christmas is to keep an ear and/or eye out for the utterly lamest, most obvious attempt to co-opt Christmas for commercial gain. This is a periodic, if not annual, tradition: previous 1, previous 2.
The bar is low, obviously, but my favorites are always the ads in which the merchant tries to establish a connection between their blatantly off-season or aseasonal offering and the holidays. My favorite so far this year is a company that offers zipline tours up on one of the San Juan islands. The premise of their ad — and this is a typical strategy — is that so-and-so is just so hard to get a gift for, so the answer is a gift certificate for a zipline tour! The ad writer in this case felt obliged to provide some backstory on the putative recipient and why swinging through the trees was just the thing for him. Presumably the simple offer of the tour was by itself insufficiently, um, compelling.
My radio listening is way down in latter years, so I'm not really sampling broadly. This is a good thing in general, of course, since it spares me exposure to foolishness like this. On the other hand, it reduces my enjoyment of this little exercise.
Got any candidates?
PS Apologies to John McIntyre for the title.
[categories]
general
|
posted at
10:54 PM
|
trackback
|
|
link
Not long ago I posted about terms that just bug me. One of the commenters suggested the addition of in order to, on the theory that it's just grandiloquence. This isn't untrue. For example, the BBC suggests that in order to and just plain to "convey exactly the same meaning when conveying purpose."
However, sometimes I actually find myself inserting in order to. This is not because I love wordiness, haha, but because there are contexts in which it helps disambiguate a phrase. Consider these examples:
The method is required to support binary conversion. The method is required in order to support binary conversion.
The target server is a setting that you add to publish data. The target server is a setting that you add in order to publish data.
It's a prerequisite that you need to deploy a web site. It's a prerequisite that you need in order to deploy a web site.
You can assign query strings to the Query property to return data. You can assign query strings to the Query property in order to return data.
Sign In To Download Credentials Sign In In Order To Download Credentials The phrase in order to introduces a so-called infinitive phrase. If the phrase that follows to can be interpreted as either an infinitive phrase or as a noun phrase, it's advisable to include in order to disambiguate. This tends to come up with verbs that have a phrasal relationship with the preposition to. As you can see, examples include add [to], need [to], assign [to], required [to], and like [to].
Of course, native speakers can often tell from context what the intended meaning is. In our case, tho, we know that we have many readers who read English as a second language. And one of our "readers" is also machine translation program, which is getting better, but which needs all the help that we can offer for disambiguating constructions.
[categories]
editing, writing
|
Thursday, 8 December 2011
|
Crediting documentation
posted at
06:19 PM
|
trackback
|
|
link
The standard model for creating large documentation sets pretends, in essence, that the content springs from a single faceless source, namely <Your Company>. This is one of the concerns (not the only one) of a style guide, namely to define an overall tone for a content set that originates with different authors. And of course corporate-created documentation is generally not credited, and certainly not at the article level.
We're starting an experiment with changing this for our own docs. For our last couple of big tutorial sets, we're attaching author names and bios to the bottom. Here are a couple of examples:In both cases, the author info is at the bottom.
We're also going to be experimenting with adding this info to MSDN topics. Here's an example (actually still a prototype) of what that might look like:
We reckon that adding author attribution has these benefits, in no particular order:- Authors help develop their "brand".
- Readers can learn to associate an author's name with a specific level, quality, and focus of work.
- Content will get a personality and human face.
- Readers get the (correct) impression that documentation is created by actual people.
- Writers get public acknowledgment of their work — the company in effect puts its own stamp of approval on the writer's work, by name.
There is of course lots of precendence for this. Blogs have author attribution, obviously, and blogs have long had the benefits listed above. Books have prominent authorship, same benefits. The Patterns & Practices group at Microsoft often (not always, oddly) includes attribution (example).
It's actually interesting to contemplate whether there's any downside. The original idea of a monolithic corporate voice was probably of concern in the pre-blog days when such a voice was perceived to have more authority, perhaps. But the plethora of high-quality, attributed content on the web has probably gotten people very used to the idea that every article is written by somebody. And so it is.
[categories]
writing, work
|
|
|