Getting the now-hidden check-in policy to work with git-tfs.
Once upon a time, the “Require a Changeset Comments” check-in policy for TFS came in the TFS Power Tools. In Visual Studio 2012, they rolled that policy into the Visual Studio distribution. Now, the check-in tool from git-tfs cannot find it. To solve that problem, you need to make the check-in policy available to git-tfs.
C:\Program Files (x86) Microsoft Visual Studio 11.0 Common7 IDE CommonExtensions Microsoft TeamFoundation Team Explorer
git-tfs installation directory. That should allow the check-in tool to
find the policy.
A brief discussion on failing to create new things in ReST
Over on Twitter, @philipmatix just sent these tweets to me.
.— Philip Mateescu (@philipmatix) August 19, 2012
@realistschuckle in a ReSTful API how do you know what you know what you need to POST to create a new entity? Documentation?
.— Philip Mateescu (@philipmatix) August 19, 2012
@realistschuckle POST with an invalid payload and expect the server to reply with 400 (or 422) and a sample of a valid payload?
My response would take to long to break up over a multitude of Twitter-sized messages, so I’ll put it here.
Lazy administration led to "server meltdown."
I admit: I don’t pay attention to my Linux servers like I should. They have lulled me into a false sense of security due to their stability. This morning, though, my monitoring app sent an email to me. A snippet:
The VM XXXXXX has exceeded the notification threshold (90) for CPU Usage by averaging 90.8% for the last 2 hours.
mysqld sitting at 87%. Um, ok…
: sudo mysqladmin shutdown
Wow. Reboot. All is well.
Yep, mysqld choked on the leap second.
Stupid leap second. Stupid mysql.
Time to switch to SQL Server Azure.
Finally, a usable custom WPF tab control.
Well, I spent some time on it, this week, to make it usable. For you.
- Close buttons for each tab
- A nice little add button
- Tab reordering with graceful animations
- A bunch of little bug fixes
In which I disucss the editors in grijq.
I wanted to have a “pluggable” editor system for the grid so programmers could customize the widgets that appear in the cell when editing begins. This post discusses how to create a custom editor and use it in grijq.
In which I disucss navigating grijq with the keyboard.
I think this is the most interesting part of the grid. This feature required two different things: the ability to focus on a grid cell and the ability to capture navigation keys to move the selected cell.
In which I disucss the column resizing in grijq.
In which I disucss the scrolling in grijq.
In which I disucss the goals of grijq.
Last week I needed to convince some folks that the World Wide Web can act as a deployment platform for enterprise applications. They had some bad experiences with Web applications a couple of years ago and, since that time, felt convinced that desktop applications could only serve that niche of data-intense applications. I believe in the power of the browser and worked on a small demonstration Web application that would corroborate my beliefs.
Data-rich applications traditionally have grids. Users have grown comfortable scanning hundreds of rows of text and numbers to perform some kind of analysis. Trying to convince them that alternatives exist that could present the data in more comprehensible ways can pose challenges because these good people have adopted the Religion of the Grid.
They can have my Excel when they pry it from my cold, dead fingers.
To quell their unease, I went in search of a data grid that would meet my needs for this demo.
Look at window.HTMLElement
Often, I need to change the way I apply some CSS due to the different box models that browsers employ. Some include padding, some borders, some other stuff in their calculations of widths during their layout phase. I stumbled across this interesting way of detecting the browser that the visitor to your site has decided to use.
I put the version numbers on those
isXXX variables because those’re the
versions that I used to test those values. They might work for other versions,
If you use this trick and find a different value or even the same value, then please post your discovery on this page and we can compile a list of very easy-to-use tests for browser detection!
In which I temper my enthusiasm for TFS with developer hardships.
Over the past month I have taken a deep dive into the use and customization of Team Foundation as an application lifecycle management system. I’ve looked at both the 2010 and 2012 beta versions and, for the most part, feel admiration for the systems. It really allows different team members to access information that they need to create, review, or modify within the lifecycle of the application.
In which I celebrate openclipart.org.
I’ve used openclipart.org for a long time, I’ve always meant to submit something of my own. Because the site has an open submission policy, you can find some less-than-nice work on the site.
Finally, I have something good enough that I wanted to make it available to the world. Here’s the clip art page over at the site from which you can download the SVG or PNG of various sizes. If you like it, go on over there and “favorite” it.
That's SOOOO 1999!
Remember back in 1999 when the Internet still had a shine of youth, a time
when Web sites still used texture-based background images and the
tag still had meaning? When Web sites looked
For the youngsters in the audience, when an organization would purchase a domain name, they would plaster a big “UNDER CONSTRUCTION” or “COMING SOON” page to announce and reassure that something relevant would one day appear. Well, retro guy that I am, I’ve done the same thing.
But, I put up the “COMING SOON” page so that I can exert some internal pressure to get the work done to actually complete it. Working in a relative vacuum has shown me that, left to my own devices, I’d rather participate in less productive past times. So, internal pressure, build!
I still feel passionately about borax.js and what it represents. I think that, given a reasonable structure in which to understand REST, that most developers would enjoy the real power that REST-in-the-browser can give to them. At least, the way that I see it. And, in the absence of something standards-like, the definition of REST encompasses so much more than originally intended.
So, onward and onward. And, don’t forget, when you need an excuse in a clinch, you can always turn to excuse911.com.
A small post excusing my small post and a little bug in knockout.js.
I have one more document to write for my current client. Because of that, I really just don’t have time to write, today, in this blog. Not only that, but I don’t really have anything interesting to write. Except this thing I found with knockout.js.
It seems that knockout.js on IE8 strips any trailing white space between a data-bound tag and further text. For example, given the markup:
renders as the following in IE8.
And you can see the trailing whitespace of the first
span, the space
between the end tag and the word “away,” disappears. I haven’t had time to
hunt down the bug or even report it.
Maybe this weekend.
OMG! You're still here?
Yeah, I’ve been consulting. I’m not a successful Web 2.0 company owner that sold his latest company. I’m not someone that got in on Apple at $50. Instead, I’m the guy that likes building software, has done it for a while for a variety of companies, and has struck off on his own to try to fulfill a dream of entrepreneurship.
So, to keep the money flowing, I’ve taken a consulting gig.
Man, has it drained me.
Vacation. Where else?
Just hanging out at this lake house in the Sam Houston National Forest, surrounded by a couple hundred acres of undeveloped land.
A rename, some functionality, and an interesting feature of WPF.
I’ve renamed the classes, projects, and solution for the project because I didn’t want to infringe on Google’s IP. Thank you, philipmat, for pointing out their trademark and thank you, Google, for letting me search out the particulars of your intellectual property.
Since Friday, I’ve committed
- Changed mode on most files. Make resizing work correctly.
- Make the unselectable tab selectable (a tab with no ChromeTabItem as the child)
- Make the little round button for closing
- Remove objects from the mapping dictionary to prevent “memory leaks”
- Now tabs close nicely for the tab control
- AddTab/RemoveTab functionality demonstrated
- Moved the responsibility of dragging tabs from the tab item to the tab panel
- Added “Close selected tab” button on test window
- Draw the “add tab” button and have it react to mouse over for color change
- Wire up the add button to add a tab
Those last two commits demonstrated a feature that I knew about WPF but never had use to exercise: the difference between the logical tree and the visual tree.
An introduction to a new GitHub project and a call for participation.
Yesterday, I pushed my initial import of a Google Chrome-like tab control for WPF to a new GitHub repo. I have it rendering the look of the tabs and some very rudimentary dragging of the tabs. I don’t like the implementation of the dragging, yet, so I’ll have to fix that.
I’ve released it under my favorite FOSS license, the MIT license. Feel free to make a million dollars off of it, use it in your commercial software, or whatever. However, if you do make a million dollars off of it, please send a little my way. Help support FOSS.
(This project’s for you, eb² and DrH. :)
I started showing my blog around to some folks. They had IE8 installed. Or, IE7. I mean, WTF, right?
Well, here you go, users of the Internet that don’t have a “good” browser. My site now looks correct in your silly browser.
What did I do? I added the “Hey, IE! This is HTML5! Deal with it!” script. It looks like this.
IE will apply styles to the elements if you define them in the DOM as a “valid” element.
I named the script “ie-sucks.js” and put it on the site.
Hope you enjoy, IE-users.
For those of you in Chrome and Firefox, you get the gold star, today.
Another rambling foray into my pedantic world of nomenclature.
The entertaining and amusing winky99 recently tweeted at me.
@realistschuckle Should we quit saying MVC when most implementations are MVP? Or agile when actually it is scrum? Communication > purity— Scott Stevenson (@winky99) February 28, 2012
This came from a comment that he made regarding a post by Rob Conery. I have to disagree with his assertion that “communication > purity” primarily because precise communication is pure communication. We develop specialized languages with unambiguous terms just so we can communicate with one another clearly.
Since Rob sparked our short-lived debate, I went to look at Rob’s site.
In which I outline my current development plans for BORAX.
Ok, things have started to slow down in my personal and professional life. It seems that I have time, again, to work on BORAX.
And there was much rejoicing. “yay.”
In which I grouse.
I don’t like dimes.
They’re small. They’re pathetic. They’ve got that ridged edge. They make my fingers smell like inexpensive metal. They don’t represent the greatness of the man on them, Dwight D. Eisenhower.
I’d rather have two nickels than a dime.
I’d rather have just one nickel.
I don’t like frameworks.
They’re huge. They’re overwhelming. They’ve got that undocumented API. They make my fingers sweat from too much implementation. They don’t represent the intelligence of the software programmers that implement them.
I’d rather have two toolkits that solve my problems.
I’d rather have just the compiler.
I don’t like eggsalad sandwiches.
They’re messy. They’re globby. They’ve got that too-much-mayonnaise problem. They make my fingers smell like eggs and celery. They don’t represent the deliciousness that a sandwich could achieve.
I’d rather have two ear infections than an eggsalad sandwich.
I’d rather have tuna.
I don’t like homegrown IDEs.
They’re slow. They’re feature-poor. They’ve got that collection of bad-usability problems. They make my fingers ache from switching from keyboard to mouse to keyboard to mouse. They don’t represent the polished state-of-the-art you find in <your fav IDE/text editor>.
I’d rather have two instances of Notepad++ than a homegrown IDE.
I’d rather have a dime.
In which I talk about my small contribution to flatiron/plates.
Today, more training, more test-driven training. The group of attendees really seems to enjoy it. Yay! Because of this, I didn’t really work on anything else non-work related, except…
…I ran into a couple of problems when using flatiron/plates. You may recall my series of articles on flatiron that I posted about a month ago and the follow-up update that I posted because of the plates reëngineering. I found what I considered a bug.
In which I talk about the training I led, today.
Remember back on Monday when I said that I had to fill my week with typing other stuff? Well, I did. I mostly finished my leave-behind training manual (67 pages, so far) and started on the presentations for the three-day course to help the employees joining the new development stream. And, then, yesterday afternoon, a Muse inspired me to throw away the presentations and try something completely new: test-driven training!
In which I excuse myself from my normal typing assignment.
I have the opportunity to lead some pretty big training, this Friday. In the spirit in which I do most everything, I have thrown myself into the position with abandon. I’ve made it 17 pages into the supplemental text that I will distribute. I still have presentations and narrations to create. Busy, busy, busy.
You have my apologies if you find it discouraging that I will not post regularly, this week.
I want to make the training interesting and engaging, something difficult to do for programming. At least the attendees will have computers on which they can type.
In which I rant very briefly about my dislike for System.Web.Security.MembershipUser.
Yeah, it’s bad. Really bad.
bray and I just spent a couple of hours looking at the authentication model in ASP.NET MVC.
I threw up a little in my mouth. Sorry. I’m okay.
This class from which you must inherit for authentication to work just makes my heart sink. If nothing else, Microsoft, please just provide hooks on which to hang my authentication. Then, build your stuff atop that.
I’m a big boy and understand how to write my own authentication and authorization services. Really, I do. And, thanks for providing means by which to authenticate against Active Domain and relational databases. I’ll make sure to use them in “enterprise” systems.
But, for my home-grown system, for this software that I want to write here, for the awesome product that bray gets to help create for his energetic start-up, just give us tracks on which we can run our own locomotives.
Choo choo choo choo!
In which I give an example of a bullet-free presentation.
I remember using PowerPoint for the first time in my Public Speaking course at University in 1992. The medium of the electronic presentation, like all things PC, appeared new and shiny. The textbook had only a slim chapter on this new-fangled presentation aide so the professor invented as he went along.
Instructor: Put no more than five bullet points on a slide and make the text about about size 40.
Student: What if my sentence goes to the next line?
Instructor: Strip the unnecesary words to make it short again!
And, so it went until we started learning every bad habit that PowerPoint has encouraged its users to practice for over 20 years.
No longer shall I do these things!
In which I talk about my experiences and views of "managing sideways."
Warning: This post has salty language, i.e., profanity. Do not read it if you have cultural objections to four- and seven-letter words commonly referred to as “bad language.”
Over the past two days I’ve posted articles on managing down and managing up, how I think you should lead your team and work with your manager, respectively. Now comes the hardest topic of the three: managing sideways.
In which I talk about my experiences and views of "managing up."
I once had a job with Gateway Learning, Inc., the company responsible for Hooked On Phonics. They hired me to run their Web development and systems integration back during the beautiful dot-com bubble. This place, located down in the waterfront area of San Francisco, had the look of a seminal start-up. Their pride and joy, a 120-inch square of paper with the database ERD printed on it, hung in a place of honor so that every employee, visitor, and investor could see it upon entering the developer zone. Their “data dictionary” filled two three-inch binders.
I reported to a guy named Fred. He had the position of Vice President of Being French and Developing Software. We worked together for a month. One day he pulled me aside and said to me, “Curtis, I find it hard to trust you because you speak with such short sentences.”
I quit the next day.
In which I talk about my experiences and views of "managing down."
I have spent a lot of time thinking about leadership and what it means. I have heard people talk about personal and professional leadership, as if the two subjects require different talents or traits. I believe that they do not.
I believe that the following traits can make you an effective team leader regardless of the size of your team. They will not guarantee success; however, they represent important goals and standards toward which all leaders should strive. In their application, you can increase your effectiveness as a leader.
If you do not have a leadership position, right now, but feel like you would want to have one, these traits will garner attention from those that have the power to give you a team to get more done.
In which I clean up the server-side with BORAX In Server (BORIS)
As you may recall from the last BORAX post, I had set up the application to transition to the start state which, for the purposes of our application, means someone needs to login. The application loads its first state as indicated by a linked relation in the header of the launchpad. Now, I sure think we would find it cool if we could handle the authentication.
In which I express my dismay with nomenclature.
Yesterday, ayende posted some blog about some code with which he didn’t agree. I read it with apathetic eyes. I really go there to read the comments that people leave on his blog. Opinionated people draw opinionated readers. The post, about CQRS in some example app written once-upon-a-time, had people chattering like squirrels since CQRS has become a buzz-worthy thing. (I call it the Fowler Effect.)
About 20 comments in, someone wrote something about DTOs. It goes like this.
This kind of separation [CQRS] sounds good for me, because you can design queries based on UI, with specific DTOs, while I can design commands to affect my domain model, via write side of it, based on user tasks.
I don’t think this guy wrote anything offensive; it has a certain value of insight. I realized while reading it, though, that I can no longer abide the term “DTO”.
For those of you not in the know, a Data Transfer Object provides a typed representation for passing information between two layers of your application. Those layers can physically run in the same process or across the world. A DTO supplies a message contract. Also, we can’t bother most developers to figure out efficient serialization and deserialization algorithms for their objects. They’d rather use the ones provided by whatever their specific runtime or platform has in their communication packages.
I really dislike the “O” in “DTO.” I refer you to my first and second posts where I wheedle on about object-oriented design and falafel. The sum total of those posts: Classes define behavior. Objects perform it.
In object-oriented programming, we have a mantra, “Tell. Don’t ask.” We have that mantra because our objects, defined by classes, have behavior!
A Domain Transfer Object has no behavior. Thus, they do have the defining characteristic of an object.
From now on, I will call them “DT-NO”s: Data Transfer Non-Objects. Also, I think “ditno” sounds kind of funny.
In which I start a simple RIA atop BORAX.
In which I try to explain the meaning and practice of BORAX.
My sympathies go out to Dr. Roy T. Fielding. He conceptualized an architecture for network-enabled applications. Then, he formalized that in his doctoral dissertation. Then, some marketers got a hold of his term, REST, and started applying it willy-nilly as marketers do. This led to a dilution of the meaning of REST. When Dr. Fielding attempted to clarify why some services complied with REST and others didn’t, detractors accused him of grasping at purist ideals that no one could realize in “real-world situations.” He vented his spleen in a post entitled “Specialization”.
Before last week, I, too, had an improper understanding of REST. I read Architectural Styles and the Design of Network-based Software Architectures more than once. I thought about it a lot. Then, I started programming Rails, didn’t think beyond its definitions, and failed to continue my analysis. If I had continued, then I wouldn’t have been throwing around the term “REST” so loosely.
I want to change that because, after the little experiment I wrote on my fork of philipmat’s webmvc, I think I now understand the power of REST in all its glory. Moreover, I understand the limitation of browsers to bridge the gap between Rich Internet Applications and the REST-shaped services they consume.
- uri-template (browserified)
I’ll spend the remainder of this post explaining BORAX in a little more detail and, then, the components of a BORAX-compliant Web application. Tomorrow, we can spend some time reviewing code to figure this out.
In which I take my friend's advice to engage in more pedagogy about REST, and the New Web programming style BORAX.
In which I use my blog as a Web log.
Just the list of stuff I did, today.
In which I consider Roy Fielding's definition of REpresentational State Transfer.
Note: this discussion primarily centers on the HTTP; REST over other protocols exceeds the scope of this article.
[Updated with link to philipmat‘s blog.]
My friend philipmat over at his blog has published a novel approach to building Web applications that use the server as a REST service and use the browser as the controler and view in the MVC triumverate.
That idea, in and of itself, does not represent a “new idea.” The fine developers at Sencha and Yahoo! have already developed in-browser MVC frameworks that usually use some proxy as the Model to fetch/write data stored on a server.
philipmat takes this at least one step further. And, in that step, I find a favorable pace toward Roy Fielding’s notion of REST. First, I’ll go on about REST for a little while to cure any confusion about what REST means. Then, I’ll examine the step-toward-REST that philipmat‘s proposal makes to us.
In which I speak an empty word.
The agile dream: 40-hour work weeks. If you work more than 40 hours, don’t do it two weeks in a row.
I have not complied with that directive over the past three months.
Instead, my minimum work week has consisted of 60 hours.
My mind does not want to create. It merely wants to rest.
Alas, this post is nothing. Mere filler.
It is my empty word.
empty word, noun (especially in Chinese grammar) a word or morpheme that has no lexical meaning and that functions as a grammatical link or marker, rather than as a contentive.
In which I set up Python.NET with Python 2.7 and Monodevelop on Lion
Install subversion : I used homebrew.
Install Python for .NET Source : Pick a nice directory for installation. I put it in ~/dev/pythonnet. I ran these commands.
mkdir -p ~/dev/
Install Monodevelop : I installed version 2.8.5 because they don’t have a release for 22.214.171.124, yet.
Open Python.NET Solution : Start Monodevelop, answer its stupid questions, and open the solution. I found mine at ~/dev/pythonnet/pythonnet/pythonnet.sln.
Configure Build for Python 2.7
: Double-click the “Python.Runtime” project to open its optiosn. In the
dialog that appears, select “Build > Compiler” from the navigation pane on
the left. For each configuration in the Configuration dropdown, change the
PYTHON26 in the “Define Symbols” input to
Link the Python Shared Library to the Test Output Directory
: Create a softlink from
the output directory of the “EmbeddingTest” project.
mkdir -p ~/dev/pythonnet/pythonnet/src/embed_tests/bin/Release/
Patch the Import Unit Test
: In the “EmbeddingTest” project, open the
PyImportTest fixture. In the
SetUp method, you will see on line 28 a line that looks like a path to
a “tests” directory. You need to change that because Python on Mac OS X does
not know about those backslashes. So, change it to the following. (I’ve
already submitted a patch to the project, so you may not have to complete
this step if they choose to apply it to the source.)
char c = System.IO.Path.DirectorySeparatorChar;
Build Solution : You know, CTRL+COMMAND+B.
Run the Unit Tests One Fixture At A Time : This kind of blows. However, the Unix pipe used to communicate with the tests doesn’t do well with the embedded cPython runtime. They should all pass.
Now, you can use Python.NET in your Mono development. Just remember to link
in that shared library or put it in your
MONO_PATH environment variable.
In which we revisit the <b>plates</b> functionality.
Story 5: Each item in the task list will have a "Delete" link next to it so the user can remove the to-do item from the list.
This post continues the creation of a to-do list with flatiron.js.
Story 4: When a user issues a GET to / after session creation, the HTML page continues to show the input and button while showing the task list beneath it.
Story 3: When a user POSTs a form to /, it creates a new ToDo item, adds it to the session, and redirects to /.
Story 2: When a user first issues a GET to /, it serves an HTML page that shows an entry text box for a to-do list item and a button to POST the item to /.
Story 1: When a user first issues a GET to /, then it creates a new session.
In which I walk through making a primitive to-do list Web app with flatiron.js.
The makers of flatiron.js bill it as “an unobtrusive framework initiative for node.js.” It consists of five major components that the creators want to behave “isomorphically,” that is, similarly in the browser and on the server.
In which I cry, "Uncle!"
Well, I’ve spent three weeks on sqlcop and haven’t even made it out of the JOIN statement. I knew writing a parser for T-SQL could take a while; however, I did not realize that T-SQL has so many forms!
In which I share how to run nunit-console under mono.
I continue to program in C# even though I don’t consider it my favorite language. The experience of starting a VM on my Macbook Pro to use Visual Studio 2010 on Microsoft Windows 7 quickly paled. I downloaded and installed Monodevelop 2.8.5 so that I could compile C# without a VM.
In which I show you how to do runtime mixins for classes in Python.
Say you want to mix in a method into an existing class but can’t get to the class’ definition. In Python, you can use the following decorator to do that.
This method handles mixing in a single method as well as another class’ methods. You can even mix methods into a class after instantiating it.
Wow! That’s nice. You can download mixin.py for your use.
In which I implement the visitor pattern in Python with decorators.
I’m a fan of the visitor pattern for its emulation of dynamic dispatch and its ability to extend functionality of a tree of objects.
In which 91 ways to become the coolest developer confuses me.
Today, a friend sent this link to me 91 Ways to Become the Coolest Developer in the World. He wrote, “You should read this because you’re the coolest developer I know.”
That’s a nice compliment, so I started reading it with a smile on my face. The further I read, the less I smiled until, as I approached the end of the long, long list of lists, I no longer smiled.
The best programmers that I know do not really like computer programming. They like solving computational problems in a deterministic framework. They like to figure out the smoothest integration of human-computer interaction. They covet the experience of watching other people using their software in a productive or entertaining way.
Programmers that love to program for the sake of programming, they tend to write crap. And burn out fast.