CodeBetter was a group blog by .NET developers on software practices, REST API versioning, TDD, CQRS and Microsoft's open source stance.
HN links it for .NET-era posts on REST versioning, event sourcing and CQRS, and for criticism of Microsoft's MVP program.
I'm irrationally passionate about testing. Shameless plug: (rendered version at https://gist.github.com/androidfred/501d276c7dc26a5db09e893bb7c9f3ee)
# Test your tests
## Summary: test interfaces, not implementations
Tests that pass when something is actually broken, and fail when things actually do work, are worse than useless- they are positively harmful.
## The requirement
Let's say we've been tasked with returning `400` when `GET` `/users/<userId>` is called with a negative `userId`.
## The test
The requirement can be turned into a test that hits the endpoint with a negative `userId` and checks that a `400` is returned:
```java
@Test
public void getUser_InvalidUserId_400() {
expect().statusCode(400).when().get("/users/-1");
}
```
## Implementation
A ubiquitous style of implementation may look something like this: (ignore whether you like the style of implementation or not, it's just an example)
```java
public class UserResource {
@Inject
private UserService userService;
@GET
@Path("/users/{userId}")
public Response getUser(@PathParam("userId") final Long userId) {
try {
return Response.ok(userService.findById(userId)).build();
} catch (final UserException e) {
return Response.status(e.getErrorCode()).build();
}
}
}
```
```java
public UserService {
@Inject
private UserDao userDao;
public User findById(final Long userId) throws UserException {
…
via: http://xrrg.com/x/r/53-web-20-feeds/
43 Folders. A different look into the minds of freelancers.
http://www.43folders.com/rss.xml
A List Apart. Since 1998 they’ve been promoting the proper use of web design methods. Their ideas are original and they’ve set in motion many critical layout standards.
http://www.alistapart.com/feed/rss.xml
AfterDawn. Optical Media meets Web 2.0.
http://rss.afterdawn.com/afterdawn_news.xml
Apple Hot News Ticker. Get the good stuff directly from the source. The Apple blog will keep you up to date with Official Apple announcements and product releases.
http://wdirect.apple.com/home/2008/ticker.rss
AppleInsider. Looking for iPhone, iTunes, or just Apple Rumors in general, AppleInsider is one of the authority blogs covering this topic.
http://www.appleinsider.com/appleinsider.rss
Ars Technica. Ars Technica is looked up upon for creating original content in the Technology industry.
http://feeds.arstechnica.com/arstechnica/BAaf
BetaNews.
http://www.betanews.com/rss2
BoingBoing. Looking for something totally unique, BoingBoing publishes interesting tidbits found from around the web.
http://feeds.boingboing.net/boingboing/iBag
CenterNetworks.
http://www.centernetworks.com/rss.xml
CodeBetter.
http://codebetter.com/blogs/MainFeed.aspx
Coding Horror.
http://feeds.feedburner.com/codinghorror/
Consumerist. Consumerist has gained trust from many people by making Corporate wrongdoings public knowledge. Consumerist has also connected companies…
Maybe I was being overly sensitive. I do think you could've got your point across as easily without naming names though, or scrubbing the email to protect the "innocent".
Since you did name names, I doubt any amount of compliments would avoid leaving a bad taste.
As far as the message, maybe I'm just in a funny mood, but it strikes me as a great balance, and while I mentally get less excited about a project whenever I see "MySQL", it is probably about the nicest I've seen.
In an attempt to be on topic though: If we're going to critique mailers like this, targeting the ones with the extensive Qualifications/Requirements list from recruiters to be allowed to work with their client's run-of-the-mill app seems fair enough.
Here's one of my recent ones:
Qualified candidates will possess the following skills and experience:
* A proven background in Ruby on Rails design and development
* Expertise in MVC architecture and design
* Experience in MySQL RDBMS
* Test Driven and Agile Development experience
* If you have experience with other languages (e.g. PHP, Python, Objective-C), frameworks, multimedia, etc. all the better.</quote>
Ok, so Rails+MySQL is about as vanilla as it gets in my book. MVC architecture and design though? Seriously, you can count the number of Rails developers who've put any thought whatsoever into that on one hand. In Rails it just "is". You don't think about it. Compare to http://codebetter.com/. Years after I left .NET and…
A long time ago, I used to jump on every bandwagon that seemed interesting. That lead to lots of wasted time and effort with technological dead-ends. So I over-reacted and only bothered with technology that had been around a minimum of 2 years (or if a "for dummies" book on the subject came out).
Some of our shipping products are based on VB6, while some of the others are .NET 3.5. Generally, if some new technology adds an edge, like Entity Framework (the shiny new name for "linq to whatever"), then we use it. Also, for internal tools, any new technology is fair game. So our internal tools have all sorts of bizarre stuff in them, and if that new stuff is useful, we end up using it elsewhere.
I don't blog, but I'm thinking of doing it for some educational projects. Making a public promise to do something generally makes you more likely to go through with it and do it: whether it is a project or losing weight. One example is the "build your own CAB" [composite application block] series.
http://codebetter.com/blogs/jeremy.miller/archive/2007/07/25/the-build-your-own-cab-series-table-of-contents.aspx
Something like this project might be what you're looking for to push yourself out of your "comfort zone."
well I've certainly experienced my fair share of people on HN not understanding things, case in point you me now.
I thought it would be obvious what I said was a joke since it is absurd, but now I'm getting annoyed at the person who didn't understood my sense of humor.
However there are obviously also different ways you can write half a line of code, for example I can write half of any specific line of code you give me (allowing of course for rounding up or down when that line is an odd number of characters in length)
Finally there are actually different ways you can count lines of code, generally it is considered best to use logical lines of code http://codebetter.com/patricksmacchia/2007/10/03/how-do-you-count-your-number-of-lines-of-code-loc/ which it seems is not your definition, at any rate it is not necessarily the case that a single character counts as a line depending on what way you are counting lines.
Otherwise thank you for the education, I consider the hours I have spent on HN golden hours, and the lines
of com
ment
time well
spent.
As I remember, one Microsoft was one of the original TDD pushers.
You may be mistaken: There was a well-known incident back in 2005 where Microsoft published guidance for TDD that was flat-out wrong (or at least not fitting with the mainstream understanding), and they had to retract it (in fact it was so far-out that they had to expunge the article from MSDN).
http://codebetter.com/jeremymiller/2005/11/18/microsoft’s-recommendations-for-test-driven-development-are-wrong/
One person who worked there for over 20 years told me that "the peak TDD" at Microsoft was right around time of Win ME release
Of course, Microsoft is big, and the broken guidance may not have reflected practices elsewhere in the company, but it seems unlikely that they were early TDD pushers if they hadn't grasped the concept (as commonly understood) by 2005.