Codes of Conduct – a call for calm, clarity and common sense

Much has been discussed recently on Twitter, blogs and other outlets about the need for all conferences to have a code of conduct. As a general matter, I avoid any conclusion that states a specific prescriptive device is suitable in all situations. I view conferences as businesses and I respect their right to run their business as they see fit. As consumers, we can vote with our feet if we feel that there isn’t a good value proposition of if there is something morally objectionable with a conference. As with all things, this is an intensively personal decision. Conferences however, have to be allowed some flexibility. And let’s be candid, just as not all men are pigs, not a single conference I’m aware of, regardless of whether they have a code of conduct or not, solicits bad behavior from its participants. Forget the moral issues – that would just be bad business.

As a general matter, let me put my cards on the table. I don’t believe a conference’s worth rises or falls on the presence of a code of conduct. Such a code is merely made of words on a page. The real question is whether there is a culture of mutual respect and consideration. You don’t need a code of conduct for that.

A recent case is the Columbus, OH conference StirTrek. This conference has gone on for years, successfully – without incident. They do their best to be inclusive. As for female representation amongst speakers, I think StirTrek is well above average. There have been no incidents ala PyCon. And guess what, StirTrek as of today, doesn’t have a code of conduct. StirTrek has something much more important – a dedicated board that fosters a culture of respect. The same goes for my friend Mike Eaton’s KalamazooX conference that focuses on soft skills. With that background, I ask folks to keep a level head about this issue and not paint all conferences and all people with the same brush.

As some of you know, I’m a software developer and a lawyer. I’ve seen many of the codes of conduct and I find the longer, more verbose ones are largely unworkable. They miss important items and contradict in some areas. The longer ones fall into the trap of being more than codes. They stray into the area of regulation. Keep in mind that no code or legal document is perfect. We also have to be mindful of the fact that conferences are put on by dedicated volunteers for the benefit of the community. Yes, we often pay hundreds of dollars to attend, but if we continually attend the same show, we must be recognizing the value. And in fact, we often ascribe the value of a conference to the conduct of its leadership. I ask that people remember that – the people that run a show and their conduct over years of running a show. Does it really matter whether or not a code of conduct exists or existed? I respect the right of people to expect a code of conduct. I also respect the right of conferences to have or not have a stated code of conduct. People, you have a remedy – don’t attend a conference if it is morally objectionable. Where you step over the line is when you demand, to the point of publically bullying conferences to have codes of conduct. Out of fear, some conferences may oblige. But is that what you really want? Don’t you want to change hearts and minds? The irony is that many of the public bullying we see is the type of conduct these same people would find objectionable under their ideal code of conduct.

And finally, how many of you that are demanding codes of conduct would be willing to forgo alcohol at a conference? How many of you attend the all too famous GitHub Drink-Ups. The fact is, alcohol is often a major part of the problem. The other part of the problem is either people who cannot, for one reason or another, handle the situation and get out of control. I’ve been around long enough to know the last thing on anybody’s mind when at a conference social function is whether there is a code of conduct and whether we are in compliance with such document.
OK.. To that, I offer this simple paragraph as a model code. It is small and it balances the equities between conferences and participants. It is merely a statement of expected behavior with a nod to enforcement. Don’t look for details of enforcement. Every situation is different. You’re all adults. You learned right from wrong early on (at least, you were supposed to). You don’t need a piece of paper to empower you. That said, I can understand why there is a feeling that perhaps, there should be an affirmative statement by conferences as to what is acceptable behavior. Personally, I don’t need it, but it is a personal decision and others may differ in their views. Keep this in mind as well – the longer and more specific you make things, the more maintenance it requires. It’s kind of like software!! I think the words below work and provide the kind of assurances any reasonable person would want. Then again, I wrote it and I may be a bit biased!! Note – I don’t get wrapped up in distinctions between attendees, sponsors, volunteers, etc. The code below applies to EVERYONE at the show. That includes staff. Another thing – if a violation amounts to a crime, call the police. Or, contact the venue. The last sentence clarifies that. What is “good conduct”? It’s kind of like pornography. Justice Potter Stewart 50 years ago said: “I shall not today attempt further to define the kinds of material I understand to be embraced within that shorthand description ["hard-core pornography"]; and perhaps I could never succeed in intelligibly doing so. But I know it when I see it, and the motion picture involved in this case is not that.”

Anyone affiliated with this Conference (The “Participant”) is expected to conduct themselves in a civil manner & treat any other Participant with mutual respect and consideration. (The “Standard of Conduct”). The Standard of Conduct is defined by what is deemed to be generally accepted by the Conference; the Venue; the Venue’s own standards of conduct, rules and regulations; and any legal authority of which the Venue or Participant is subject. Only timely and directly reported violations of the Standards of Conduct with sufficient factual details of the violation to the Conference, upon investigation if warranted, may result in sanctions including, but not limited to expulsion of the offending party/parties without recourse. Sanctions imposed under this paragraph shall be adjudicated and determined in the sole discretion of the Conference. Nothing in this paragraph should be interpreted to interfere or discourage with a Participant’s right to contact the Venue and/or Law Enforcement directly and in such a case, the Conference shall fully cooperate with the Venue and Law Enforcement.

Posted in Uncategorized | Tagged , | 1 Comment

Before you grab that content, think…

Recently, I’ve been asked about copyright matters and fair use. I thought I’d take a few minutes and post here and hopefully, begin posting here on a regular basis!!

Whenever you take an image or somebody else’s content, unless there are provisions that state otherwise, you are infringing on a copyright….period. It some cases, content may be in the public domain or licensed under Creative Commons are some other open licensing scheme. If you copy and incorporate somebody else’s content without permission, you may get a very unwelcome inquiry in the form a cease and desist letter and an outright demand for payment. Here’s some free advice for you – when you get a C&D letter, take the content down – at least temporarily. The person or entity asserting ownership still has the burden of proving ownership. When you receive that letter, assuming you have indeed taken somebody else’s content, the only thing you know for sure is that you don’t own the copyright. Whether the person or entity sending you the letter owns the content is not the issue.

Right now, the phrase you may be thinking of is the Doctrine of Fair Use. The issue is much more complicated as different countries and confederations have their own copyright laws. A good resource for you to review is this link:

Remember, the country you are domiciled in is likely a signatory to one or more treaties that you are subject to.

Getting back to Fair Use. For purposes here, I’ll limit the discussion to the doctrine in the USA. Legal doctrines are things created over years of case law. Through time, they change. What typically results from cases and their facts are things we refer to as multi-factor tests. These tests are stated in absolute terms. How they shake out in a particular case is by no means absolute because they application of these tests is fact intensive.

Fair Use is an affirmative defense – meaning that you readily admit that you are infringing on somebody else’s copyright, but it is permissible because of Fair Use.

Why have the doctrine in the first place? Perhaps you wish to comment upon and critique something? Perhaps the original work is political and you wish to voice an opposing point of view. Hard to do that without referencing and perhaps copying at least some portion of the original work. Perhaps the nature of your use is educational or news reporting in nature. A good read is this link:

In the USA, Fair Use is based on a 4 factor test:

  • The purpose and character of your use
  • The nature of the copyrighted work
  • The amount and substantiality of the portion taken
  • The effect of the use upon the potential market

Absent your specific facts and how courts have held, these 4 factors don’t mean much and don’t help to resolve one way or the other whether it is likely or not that your use of somebody else’s work constitutes Fair Use. The only way you will ever get a definitive answer is to have a case litigated in a US Federal Court. The likelihood of that is almost nil as very few cases are brought to court, much less tried and even lesser, reach a verdict. Most cases we read about come from the Supreme Court as the stakes in those cases are great or the facts represent a novel twist that could add color to how the law should be applied.

What can the monetary damages be in the US? For starters, you can be compelled to pay the other side’s legal fees. Then there, are the other monetary damages such as lost revenue for the right’s holder. Whatever revenue you derived through use of the work will be disgorged. Then of course there are your own legal fees. Not exactly what you bargained for when you grabbed somebody else’s work!!

A few tips for you to consider:

  • When searching for images, use the licensing filter option. Both Google and Bing make it easy to filter on license type. If the images and content are public domain you can use them straight away. Here’s the key to remember, others can take it from you as well. Best for you to be clear that such content is in the public domain. Take note of where you took the content. You never know, some troll may try to represent it as his. If the content is subject to something like Creative Commons, take heed in those requirements. You typically have to disclaim ownership and note that the content is subject to a CC license. Not doing so puts you in violation of CC. Never forget, CC and other licenses are just that – licenses with terms and conditions you have to comply with. They are not public domain.
  • Make sure on your site you have a disclaimer that rights as to content and images from others are held by others. There are numerous examples. Your site and blog should have at least some rudimentary terms of service. Chance are, the place you copied things from does… :-)
  • If there is content you want to use, ask the owner. You may be surprised that they may say yes – under some conditions. The key is to attribute ownership of that work to make it clear A – it’s not your work and B – whose work it is. Being reasonable can go a long way.
  • You may have to consider paying a license fee for use of the work. This is a business decision you will have to make. It’s important to note that the law demands copyright owners take affirmative acts to protect their work. When you get a C&D letter, it’s not due to the rights holder being a jerk. Courts expect rights owners to not sit on their hands.
  • And finally, establish a relationship with a lawyer in your jurisdiction. Don’t try to be your own lawyer – even if you happen to be a lawyer!
Posted in Copyright, Intellectual Property, Law | Tagged , | Leave a comment

A simple jQuery Qunit-based JavaScript Unit Test Project Template

UPDATE: I just updated the template. You can download it here.

Next week, I’m giving a talk on JavaScript Unit Testing at Codestock. I think this is my 5th year. Always a great show and am looking forward to seeing everyone in Knoxville, TN. The talk is going to be divided into 3 parts: 1 – recognizing and implementing testable JavaScript code, 2 – JavaScript Unit Testing fundamentals and 3 – Visual Studio integration. It is the 3rd part that I want to discuss right now. I’ve just uploaded a new JavaScript unit test project template to the Visual Studio Gallery.


There is a need for a simple unit test project that is devoted to JavaScript unit testing. For this template, I chose the jQuery QUnit project. To make full use of the template, you will also need the Chutzpah JavaScript Unit Test Runner installed. Chutzpah integrates your JavaScript Unit tests.

Once the extension is installed, the add-in will be available:

(Yes, I know the project type reads as Visual C#… When I created the template, I decided to start with a class library project – like any other unit test project. I could have hosted this in a Windows Store JavaScript project – but that would have left folks out that have not upgraded to Windows 8 yet. )


To get up and running, I added a simple Hello World QUnit JavaScript unit test. The following example shows the template in action:

Consider the following solution structure:


This solution has 3 projects: ASP.NET MVC, MVC Unit Test and a JavaScript Unit Test Project. To illustrate how to put your web project’s js code under test, I created a myFunctionTests.js file -  which corresponds to the myFunctions.js file in the UnitTesting.Web MVC Project. Here is the code for myFunction.js:

var myFunctions = (function () {
    var _functions = {};

    _functions.add = function (items) {
        var total = 0;
        for (var i in items)
            total += items[i];
        return total;

    return _functions;

A very simple function that takes an array of numbers and adds them together. Here’s the test in the JavaScript Unit Test Project:
(Take note of how to reference the js file that hosts the function under test.)

/// <reference path="../../../unittesting.web/scripts/myfunctions.js" />

test("My Function Add Test", function () {
    var result = myFunctions.add([1, 2, 3]);
    var expected = 6;

    ok(result == expected, "Result: " + result  + ", expected: " + expected);

In addition, there is also a standard unit test project which was added when the MVC project was created. The following figure shows the Visual Studio Test Explorer running all of our tests (in my Test Explorer settings, I’ve opted to organize the tests by project):


If I was to alter the test by changing the expected value to 5 and saved the file, the affected tests will run again. The following figure shows our unit test in a failed state:




Posted in Javascript, jQuery, QUnit, Unit Testing | Tagged , , , | Leave a comment

Pre-Process your images with promises

For this post, I’m using Windows 8 WinJS as the vehicle. However, this approach is applicable by any method that implements an XMLHttpRequest.

Here’s the scenario: you have an application with several images and those images are stored on a remote server. The sources of each image is something like

Looking at a Windows 8 store app as an example, the good news is that your page will display immediately. Your images may display immediately. Or more likely, they will begin to display after the page has loaded. You may see the images incrementally appearing. This does not make for a good user experience.

The good news is that WinJS implements the Promise Pattern and XMLHttpRequest via the WinJS.xhr object. This means we can pre-fetch images and resolve them to blob URL’s and then bind our UI to the blob URL instead of the raw image url.

Using a stock WinJS Navigation Project, the following code is placed in the app.addEventListener(“activated”, function (args) {} handler:

var promises = [];

//Load the blob for the default image in the event a specified image URL does not work.
WinJS.xhr({ url: "images/no-available-image.png", responseType: "blob" }).done(function 
(data) {
 var noImageBlob = URL.createObjectURL(data.response);
  //The imageResults.json file is a static result from the Bing Images API.
  WinJS.xhr({ url: "js/imageResults.json" }).done(function (data) {
     var results = JSON.parse(data.responseText);
     //Loop through the results to create the promise array.
     results.d.results[0].Image.forEach(function (element, index, array) {
     promises[index] = WinJS.xhr({ url: element.MediaUrl, responseType: "blob" })
        .then(function (e) {
           //When the promise executes, an imageBlob property is created
           //holding the image blob URL
           results.d.results[0].Image[index].imageBlob = URL.createObjectURL(e.response);
        }, function error(e) {
           //If an error occurs when trying to retrieve the image
           //the No Image BLob URL created on line 28 is used instead
           results.d.results[0].Image[index].imageBlob = noImageBlob;
     //The join method kicks off the promises handed to it.
     //The promises can run in any order and finish at any time. 
     //The done event for the join method fires after all of the promises
     //in the promise array have been fulfilled.
     WinJS.Promise.join(promises).done(function (e) {
        //Need to create a global namespace to hold a reference
        //to the images array. To facilitate data binding, 
        //the WinJS.BindingList method is invoked, passing the 
        //image array.
              Images: new WinJS.Binding.List(results.d.results[0].Image)
           //Now that all of the pre-processing has occurred, we can now
           //navigate to the home page that displays the images.
           if (app.sessionState.history) {
              nav.history = app.sessionState.history;
           args.setPromise(WinJS.UI.processAll().then(function () {
              if (nav.location) {
                 nav.history.current.initialPlaceholder = true;
               return nav.navigate(nav.location, nav.state);
           else {
                return nav.navigate(Application.navigator.home);

JavasScript, being a dynamic language, we can simply augment the object from the parsed JSON. In this example, I used a static file from the Bing Image Search API. You will have to conform the object references to the specific API you are working with. In the previous code, we wait until all of the images have been fetch. In an async world, this can be a challenge. We don’t know what order the requests will be processed. In some cases, a server status 500 could result. This approach affords us an opportunity to handle that error with a place holder image. If on the other hand, you deal with the raw URL’s directly, you have no such opportunity to intercept errors.

On the HTML markup side, I have this code to bind an image tag’s src to the newly created imageBlob property. For this example, the raw URL that is returned in the response is MediaUrl.

<section aria-label="Main content" role="main">
   <div id="ImagesTemplate" data-win-control="WinJS.Binding.Template">
      <div style="width: 150px; height: 100px;">
          <img src="#" style="width: 60px; height: 60px;" 
              data-win-bind="alt: MediaUrl; src: imageBlob" />
       <h4 data-win-bind="innerText: MediaUrl"></h4>
<div id="ImageListView" 
   data-win-options="{itemDataSource : ImageList.Images.dataSource, 
                      itemTemplate: select('#ImagesTemplate')}">

In the markup, I have a WinJS ListView control that uses the ImageList.Images.dataSource as its datasource. The ListView also references a simple template to display the output.

Here is the result (looks a bit skewed due to this page’s dimensions):


When the page displays, because the images have already been pre-fetched, they will immediately display as well. This makes for a more pleasant user experience.

Looking at the first image, it has a raw URL of:

When pre-fetched, the blob URL is:


Posted in Windows 8, WinJS | Tagged | Leave a comment

DongleGate: A Legal Perspective and some social commentary

Those of you that know me, know that I’m both a software developer and a lawyer. I’ve not commented on the #DongleGate issue – except to say that this issue has privacy, first amendment and civil litigation ramifications. Those of us witnessing this escapade have seen at least 1 guy lose his job and this just in, the complainant Adria Richards ( has lost her job as a developer evangelist for SendGrid. Here’s the blog post from her former employer:

One thing we can agree on, there is a massive lack of maturity in this business. At one time or another, including yours truly, has been guilty of an off-color joke. Most of the times, at community gatherings like conferences; we are typically amongst friends and feel comfortable that we can be ourselves, letting our guard down. At the end of the day, we must rely on the fact that in this business, we have to have a thick skin and that we are adults. That in no way is meant to justify offensive comments and that somebody like Adria didn’t have a right to be offended. She did have a right to be offended. And to that, it’s not for anybody else to question it. It’s enough for anybody to say they were offended – and others should respect that. That said, does it mean the offended have an open ended license to exact whatever retribution they want on the offenders? No…. In these community gatherings, there is a level of privacy, within the community cocoon; we have a reasonable expectation to.

We see the t-shirt shirt = “Fork you”. We see on open source projects: “Fork me on GitHub”. Doesn’t take a rocket scientist to see the double entendre here. If one is to where that shirt in public, does that give anybody who is offended license to snap a picture, tweet it, and then hope that some misfortune befalls that person? I don’t think such license is granted.

Consider this YouTube video from Ms. Richard’s: There’s a saying in the law that in matters of equity, you have to have “Clean Hands.” Is it permissible for her to be offended as she was when she makes a video that could be taken as offensive by others? At about 3:03 into the video, she talks about an incident that was done to her – that could very well be taken as offensive, and she let it pass. In this case, she decided to not let something pass…something that WAS NOT said directly to her. If I was prosecuting this case, and I was going to depose Ms. Richards, this is a line of questioning I would surly explore to great details. What was her real motivation here?

This gets to my first question:

Was there a reasonable expectation of privacy by these two gentlemen?

I believe there was. They were having a private conversation, which Ms. Richards overheard. Yes, this was a public place. Did she have the right to express her indignation at those comments to these two gentlemen? Absolutely yes. In fact, that would have been the more impactful thing to do. That would be a proportional response. Reporting the incident to the PyCon staff is not appropriate. They are not there to police what people say. Note, these two guys didn’t say the comment to her. She thrust herself into their conversation. By the same token, the two guys allowed her to confront them. She didn’t. Instead, she took their picture and posted a tweet. And from there, SHE took what was a private thing and made it public. She made the situation worse. In that regard, she violated the privacy rights of these two men, notwithstanding their comments. Speaking of those comments, only her, the two guys and maybe one or two others know what the precise words were. The first result, at least one of the guys lost his job.

Next question..
Does the guy who got fired have a cause of action against Ms. Richards?

This is the part you want to pay attention to as you should think very carefully about the consequences of tweeting something that is private and further, identifying specific people where harm could come to them. First, did these two guys have a right to say what they said, no matter how stupid it was? Yes, they had a right. There is such a thing as a First Amendment last I checked. It’s also not illegal to be stupid. Did the guy who got fired, his employer, have a right to fire him? If he works in an employment at-will state, the answer is yes. Is he totally out of luck? No.. He can sue Ms. Richards for Tortious Interference with an Employment Relationship. She knew and intended a certain level of a negative outcome to these two gentlemen. That’s malice. While his employer may be on good ground to fire him, he can nevertheless sue Ms. Richards to recover damages. There may also be a cause of action on defamation grounds. These two guys are being labeled as sexists when all that may have happened was a joke, off color as it may have been, that offended this one person. That too may be the basis of a cause of action.

Next question..
Is there any other entity that could be liable?

As SendGrid has already admitted, Ms. Richard’s was there in her capacity as a representative as a SendGrid Employee. Ms. Richard’s did not do SendGrid any favors when she tweeted that she had SendGrid’s full support – a claim that SendGrid didn’t dispute. In the law, there is the legal doctrine of “Respondeat Superior.” It effectively means that the master is liable for the actions of his agent. Ms. Richards has a large Twitter following and that is due in least in part to her former job as a developer evangelist for SendGrid. There’s a strong argument to be made that SendGrid is liable, at least in part, for Ms. Richard’s actions – regardless of the fact that they terminated her services.

This whole episode illustrates again the importance of how we react emotionally and the legal consequences therein. If I’m the gentlemen who lost his job, I’m exploring my legal options – and there are legal options. Above all, this is a teachable moment. If you are offended at something somebody does, consider the context. 99.99% of the time, these matters are best handled privately. Takes more courage and is more impactful when you communicate your disdain to the offending party directly. If your goal is to change behavior that will more likely have the desired effect. Sure, you may be told to eff-off. That’s a risk…a risk worth taking.

How about conference organizers?

I understand that PyCon has modified their code of condut… Didn’t know that such a thing existed. I would always suggest to any conference organizer to NOT get into the business of policing their attendees. Rather, I’d rely on the venue staff for that. Obviously, if somebody is disruptive, boot their tails out. These guys didn’t appear to be disruptive at all for the record – not that it really matters in this case.

A word about the “Brogrammer” culture..

You probably know about it. If not, look it up on our favorite search engine. The fact is, guys are often not the sharpest knives in the drawer socially and are often in need of an increase in maturity level. Women have a tough enough time in this business. I know several women that do a lot of work in getting more girls interested in software development. Sad as it is, Adria Richards did more to set that effort back than the two guys she was offended by. That’s a perfect example of irony!! It’s really a shame. Ms. Richards looks to be a pretty sharp individual – one who appears to have better common sense than she displayed here. Learn from it folks.

Posted in Uncategorized | Tagged , | 54 Comments