HNHacker News
TopNewBestAskShowJobs

ChrisGaudreau

298 karma · joined March 21, 2014

submissionscomments
ChrisGaudreau··on The Disappearance of Conservative Commencement Speakers
Milton Friedman would be considered a liberal by modern conservatives, really. Accepting that monetary policy can be effective is heresy to the conservatives who currently wield power.

But yes, Milton Friedman would be an excellent commencement speaker. I'm sure there are more great academic conservatives who would be equally good, but very few of them are well-known enough to be considered even if the students wanted a conservative.

ChrisGaudreau··on Introducing Socket.io 1.0
Finally! It's been a long time coming. Thanks for your hard work!
ChrisGaudreau··on Why I don't mock
Mocking is the primary problem with TDD as it exists right now. "Isolated testing" (or isolated TDD) is advocated by people like Uncle Bob. Many developers listen to Uncle Bob and end up believing that unit testing without complete isolation is not "real" unit testing.

Isolated unit testing is supposed to improve your designs. But when you mock everything, you end up with tests that know everything about your implementation (white box testing). The result is that refactoring breaks your tests. Your tests no longer document how to use the system; they are merely a mirror of its implementation.

Kent Beck's central point in his book is that TDD mitigates fear, allows refactoring, and gives you immediate feedback. Extensive mocking makes developers fearful to refactor (thus hurting design) and reduces the quality of feedback. Not to mention it makes your tests hard to refactor too.

Martin Fowler explains the difference between "classical" and "mockist" testing:

http://martinfowler.com/articles/mocksArentStubs.html#Classi...

ChrisGaudreau··on LoopBack, a new Node.js framework by StrongLoop
This framework feels kind of like Rails for REST APIs, but not in a bad way. I really like it so far.
ChrisGaudreau··on Google updates logo, moves 'g' and 'l' by one pixel each
You'd make a fantastic English teacher.
ChrisGaudreau··on How Does TDD Affect Design?
> Tests that fail every time you refactor are totally meaningless and a waste of time. They don't detect bugs. They just detect changed code.

I agree. This is where I think the distinction between classical and mockist testing [1] is useful. These days, most TDD involves mocking or stubbing every single dependency, effectively turning your units into a white box - "isolated TDD." When one has code whose implementation is known by and manipulated by client code, refactoring will almost certainly break stuff.

Why would you want to liberally refactor code when you know you will break 10 of your tests and have to rewrite them?

One frequently sees hardcore TDD advocates patting themselves on the back for isolating everything, because... now they can swap the database for a third-party API, in-memory store, remote service, or whatever. Really? You're going to replace the database with something that has wildly different reliability constraints? And why would you ever need to replace your database with a remote third-party service? I'm sure it can be useful, but for most people, YAGNI. Perhaps I've merely not worked on enough Web Scale™ or Big Data™ projects.

[1] http://martinfowler.com/articles/mocksArentStubs.html#Classi...

ChrisGaudreau··on Poof and then Rails was gone
Every application can benefit from sound engineering practices. Creating a complicated monstrosity when you're not going to need it is not sound engineering practice. At least I don't think it is, but then again I don't consider myself an "engineer."

Once again, Java is a great example. For over a decade, Java developers have piled on more and more "sound engineering practices." Maybe it's just me, but these Java applications are not easy to extend or modify in any way.

ChrisGaudreau··on Poof and then Rails was gone
That might be fine if the majority of software developers worked on game engines, compilers, or operating systems. But we're talking about Rails applications here.
ChrisGaudreau··on Poof and then Rails was gone
It does get a little tiring when somebody tells you "you're doing it wrong. It has to be more abstract and complex because you might become the next Facebook." And then everything turns into a StrategySingletonProxyFactoryBeanFactory.
ChrisGaudreau··on Poof and then Rails was gone
This code is painful to read. As somebody new to a team, how can you "extend" code when you don't have a clue how the rest of the system works because somebody else decided it'd be a good idea to unit test controllers and abstract everything away because "we might need it someday"?
ChrisGaudreau··on The DHH Problem
> Because DHH is just one person. And he only has DHH's experiences.

Yep. Uncle Bob is one person, too. tl;dr Think for yourself and don't listen to somebody just because they hurt your feelings.

> To pick a topical example: Is TDD hard in Rails apps because TDD is dead or because Rails makes TDD hard?

This is a misrepresentation of what DHH has said [1], which is that strict adherence to TDD can make your designs worse:

> Over the years, the test-first rhetoric got louder and angrier, though. More mean-spirited. And at times I got sucked into that fundamentalist vortex, feeling bad about not following the true gospel. Then I'd try test-first for a few weeks, only to drop it again when it started hurting my designs.

> Used as a hammer to beat down the nonbelievers, declare them unprofessional and unfit for writing software. A litmus test.

If you watch the conversations between DHH, Martin Fowler, and Kent Beck, it seems to me that they all agree: testing is good, test-driven design can be bad, and mocking everything is bad [2][3].

I took some time last week to re-read Uncle Bob's book, Agile Software Development, Principles, Patterns, and Practices [4], and Kent Beck's book on TDD [5]. There was a huge difference: Uncle Bob focuses on test-driven design, while Kent Beck focuses on test-driven development. Uncle Bob claims that test-driven development (especially through mocks) universally improves your design, because it reduces coupling and enables refactoring. Kent Beck talks about productivity, certainty, refactoring, and documentation. Uncle Bob says most of those things are just a side-benefit: the real point of TDD is decoupled design.

Uncle Bob's other book, The Clean Coder [6], berates people who do not strictly adhere to test-driven design: if you don't do it, you are unprofessional (he mentions this repeatedly). He says that TDD being universally good is a fact, and anybody who says otherwise is just ranting.

> Nowadays, however, they are just rants. The bottom line is that TDD works, and everybody needs to get over it.

> TDD is the professional option.

> It could be considered unprofessional not to use it.

The bottom line is that developers should listen to each opinion and use their head. Don't be hurt when somebody calls you unprofessional for not following the One True Gospel™ and mindlessly adopt practices. Don't be hurt when somebody says that mindlessly following those practices is counterproductive. Using your head is about the most professional thing you can do.

[1] TDD is dead. Long live testing. http://david.heinemeierhansson.com/2014/tdd-is-dead-long-liv... [2] Mockists Are Dead. Long Live Classicists. http://www.thoughtworks.com/insights/blog/mockists-are-dead-... [3] Is TDD Dead? https://www.youtube.com/watch?v=z9quxZsLcfo [4] Agile Software Development: Principles, Patterns, and Practices. http://www.amazon.com/Software-Development-Principles-Patter... [5] Test Driven Development By Example. http://www.amazon.com/Test-Driven-Development-By-Example/dp/... [6] The Clean Coder. http://www.amazon.com/Clean-Coder-Conduct-Professional-Progr...

ChrisGaudreau··on Spouses of Some H-1B Visa Holders to Be Allowed to Work
With the boomer swell and the possibility of prolonged stagnation, I don't see why you'd want to prevent skilled and innovative people from entering your country.
ChrisGaudreau··on Hangout with Martin Fowler, Kent Beck, and DHH: May 9th, 11am ET
Kent Beck and Martin Fowler do argue that TDD is useful[1][2]. They're just less dogmatic about it than some people.

[1] http://martinfowler.com/bliki/UnitTest.html

[2] https://www.facebook.com/notes/kent-beck/rip-tdd/75084019494...

ChrisGaudreau··on Atom Is Now Open Source
Well said. This is an insight rarely realized.
ChrisGaudreau··on Zombies once destroyed Japan's economy, now they're infecting China's
When the bubble bursts, then it'll be thanks to tight monetary policy, ironically. Sweden is now experiencing monetary-policy driven deflation, and hopefully I don't have to explain why that's a bad thing for a population with high household debt.
ChrisGaudreau··on Zombies once destroyed Japan's economy, now they're infecting China's
Indeed it is. Perhaps I wasn't articulate enough; I disagree with the notion that the Japanese are "deadly afraid of commitment and responsibility."
ChrisGaudreau··on Zombies once destroyed Japan's economy, now they're infecting China's
Americans have faith in bureaucrats?
ChrisGaudreau··on Zombies once destroyed Japan's economy, now they're infecting China's
Probably has something to do with their high national debt. Many people seem to believe that high national debt reflects a population that chooses government subsidies over employment. You see that with Greece and Spain a lot.
ChrisGaudreau··on Is it Pokémon or big data technology?
I got 2 wrong.

Disclaimer: I created the (currently) most popular browser-based Pokemon fan game. So it's pretty sad.

ChrisGaudreau··on In Bitcoin Debate, Larry Summers Sides with the History of Change
Seems like a typical weird Centrist argument. I don't think he really believes what he said; he's just trying to sound reasonable. He's basically saying "in 20 years, things will not be like they are today. Thus, when somebody tells you X will change the world, and you say otherwise, you are on the wrong side of history."
ChrisGaudreau··on Stanford study finds walking improves creativity
It actually does work wonders. If I have a really difficult design problem, I'll take an hour walk on the trail and have it solved by the time I get home.
ChrisGaudreau··on Dev-Metal Shows Ads to Adblockers
The problem with ads is when they are abused. Pop-ups, videos, scams, and so on. I think it might be nice to have some high-quality ads, especially if it contributes to high-quality free content.
ChrisGaudreau··on Piketty, inequality and volatility: How can r exceed g?
Piketty's worry is not about earned wealth; his worry has to do with inherited wealth.

Disclaimer: I don't mindlessly believe everything pg says just because he is a co-founder of YC.

ChrisGaudreau··on Andreessen: Beware Non-Silicon Valley Investors Bearing High Valuations
Pretty sure that honor goes to Dogecoin, but nice try. :)
ChrisGaudreau··on The Illinois Commerce Commission websites do not use OpenSSL
Looking around the site, it appears that they do use SSL for parts that require authentication. They may simply be using a different implementation of SSL.
ChrisGaudreau··on Microsoft ends support for custom domains in free email service
I just tried Outlook for the first time in a while, and I am pretty surprised. It's quite good.
ChrisGaudreau··on Condoleezza Rice Joins Dropbox’s Board As It Names New CFO, COO
That article was written in 2004, before anybody knew the extent of the hubris. We've learned a lot since then. The article itself states:

The final word on the 16 words may have to await history's judgment.

ChrisGaudreau··on Condoleezza Rice Joins Dropbox’s Board As It Names New CFO, COO
Will you use your normal account or just conveniently hide behind fake accounts to say things you know are stupid?
ChrisGaudreau··on Programming paradigms that change how you think about coding
If you don't know FP and you learn FP, then it will almost certainly change the way you think about coding.
ChrisGaudreau··on MongoDB 2.6 Released
Finally, MongoDB 2.6 lays the foundation for massive improvements to concurrency in MongoDB 2.8, including document-level locking.

This is exciting even if I don't expect it to happen soon.

← PreviousPage 2 of 3Next →