Hacker Newsnew | past | comments | ask | show | jobs | submit | corey's commentslogin

I agree that mocks are brittle and nearly useless.

If you follow SOLID principles to the extreme, you'll find that your code is separated into logic code that is pure and easy to unit test, and IO code that is very simple and can be tested by a relatively few number of integration tests.


To some extent this is pretty much the same as mocking. You are still injecting fake data into your pure logic functions whether its through their parameters or by them calling a mock.

I agree preferable but sometimes you want to test the logic of the code thats actually making decisions about how and when the IO is called.

You can do it with integration tests of course but in more complex environments with lots of complex IO dependencies mocking is cheaper. Its also hard to simulate specific failures in integration tests like a specific request failing. Pretty much mocking with extra steps.

So mocking has its place as well.


ASP.NET MVC, because:

- ASP.NET MVC makes it much easier to keep your domain logic decoupled from the framework. This is in contrast to frameworks like Django who expect you to use their ORM, and to derive your model classes from a framework provided base class.

- It's C#. I know it well, it is common in industry, and it is statically typed. For programs of any real complexity, I find statically typed languages to be much more efficient and pleasant to work with.

Eventually I want to move more in the direction of stronger type systems, but it doesn't seem like there are many jobs out there for Haskell programmers who aren't programming demi-gods.


Have you mastered algebra and trig? If not, do it. Khan Academy is great for this. Watch the videos and do lots and lots of problems. In learning math, there is no substitute for working through lots of problems.

After this, I suggest learning some discrete math and proof techniques. The book How To Prove It is great. It will teach you logic, set theory, how to write proofs, and how to invent proofs. Learning this first will help you actually understand calculus when you study it next.

For calculus, MIT's OCW course is really good. Pick up a standard book like Stewart, do a lot of problems, and try to understand the proofs of all the theorems. Or if you'd really like a challenge and some more theory, pick up Spivak's book.


Or just let the market handle it.

If people stop tipping, restaurants would be forced to increase wages, because nobody is going to work for $3/hour.


This solution will cause suffering for a great number of people as they have the choice of either making money on the low end of poverty or become unemployed altogether. It's simply not a realistic option.


"because stereotyping necessarily subordinates individual identity to group identity"

No it doesn't. Many stereotypes are useful when you have very little information about a person. You're only subordinating individual identity to group identity if you refuse to update your beliefs about a person after receiving new evidence about him.


Jammer's Reviews are pretty good for that.

http://www.jammersreviews.com/st-tng/


Imagine a Beowulf cluster of HNs?


Also a missile's range and effectiveness depend upon both aircrafts' altitudes and velocities. Even if the predator could fire an AMRAAM, I don't think it would stand much of a chance of winning an engagement against a fighter that can fly twice as high and ten times as fast.


Even in math "infinity" often means "unbounded". For example, in real analysis if we have a sequence x_n, we write lim x_n = ∞ to mean "given any real number alpha, we can find a natural number K, such that x_n >= alpha for all n > K".


Haskell: Programmers aren't disciplined enough to to isolate side effects by themselves.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: