News for hackers. Stuff that matters.

corey

Re:The day I started believing in unit tests on Tuesday December 19, 2023 @10:36AM (#38696895)
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.

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.

Re:Ask HN: How can I learn math? on Sunday June 14, 2015 @11:38AM (#9715234)
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.

Re:10%? 20%? Apps Are Changing How We Tip on Monday March 30, 2015 @11:16AM (#9290055)
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.

Re:OkCupid’s Unblushing Analyst of Attraction on Sunday September 07, 2014 @04:36PM (#8282324)
"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.

Re:Show HN: Star Trek DS9 Episodes Worth Watching on Monday July 21, 2014 @11:07AM (#8064034)
Jammer's Reviews are pretty good for that.

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

Re:Google Trends: Hacker News vs. Slashdot on Sunday June 29, 2014 @11:06PM (#7963498)
Imagine a Beowulf cluster of HNs?
Re:Pierre Sprey on the F-35 [video] on Tuesday June 17, 2014 @06:16PM (#7907368)
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.
Re:What type of Machine is the C Preprocessor? on Monday January 27, 2014 @05:41PM (#7133908)
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".
Re:What languages fix on Thursday December 26, 2013 @08:37PM (#6968984)
Haskell: Programmers aren't disciplined enough to to isolate side effects by themselves.
Re:Advanced Data Structures in Python on Wednesday December 18, 2013 @02:58PM (#6930183)
Those aren't data structures.
Re:Things You Can Do That Will Make You Happier on Wednesday October 09, 2013 @08:19PM (#6524859)
Lukeprog wrote a great and well researched blog post on being happy:

http://lesswrong.com/lw/4su/how_to_be_happy/

Re:Shown HN: texit - Embed LaTeX anywhere on the web on Monday September 16, 2013 @10:05PM (#6397176)
This isn't pointless, as it allows you to easily post latex equations on any site that allows images.
Velleman's "How to Prove It" is a great book to learn how to do mathematics.

http://www.amazon.com/How-Prove-It-Structured-Approach/dp/05...

Re:How fast can we make interpreted Python? on Tuesday June 25, 2013 @10:45PM (#5943840)
Python has an array class too:

http://docs.python.org/2/library/array.html

Re:Discrete Optimization course begins today on Tuesday June 18, 2013 @06:50PM (#5902559)
How do you like working in OR? Are there a lot of jobs in the field? I'm a math major and like programming, so it seems like it'd be an interesting career for me.
It's not just cheating, it's also the fact that when you have to use automated grading, it's much more difficult to create good tests.

I hope in the future they offer you the option of taking a real test at a testing center, which is graded by a human being.

Re:Where TDD Fails on Tuesday March 05, 2013 @10:31PM (#5329151)
> TDD promotes testing trivial methods

Kent Beck might disagree:

http://stackoverflow.com/a/153565

So far it looks great. A full screen button for the videos would be nice, though.
Re:Lean Domain Search: Two Weeks After the HackerNews Launch on Monday January 30, 2012 @01:58PM (#3530092)
Hello Matt, I just want to say thanks for Lean Domain Search. A couple weeks ago I was struggling to think of a domain name for a small project of mine and then I saw your post. It helped me find a pretty good unregistered domain name in just a couple minutes. Since I'm no very creative myself, this really took a burden off my mind and helped me stay motivated.

Thanks!

Re:Another free course: Model Thinking on Monday November 28, 2011 @10:03PM (#3288799)
The instructor is actually from University of Michigan, so it appears that this phenomenon is spreading.
Thanks for sharing.
Would you mind sharing some more about how you got your first programming job?

Did friends help you land the job, or did you just wow them in an interview? Did you have an impressive portfolio or degree?

I'm currently loving Jennifer Widom's DB class, and I'm excited about this and ML next quarter.

I really hope this phenomenon spreads outside of their CS department; I'd love it if there were some pure math classes(like real analysis and abstract algebra) in this format.

Re:Proposal: Linear Algebra Study Group on Tuesday September 13, 2011 @05:41PM (#2993665)
I'd also like to know which book. I just bought Strang's Introduction to Linear Algebra to study along with his video lectures.

If it's based on this book I'd love to join.

Re:Stanford Fall 2011 - Introduction to Databases on Tuesday August 16, 2011 @12:53PM (#2891895)
The videos are already online if anybody would like to get a head start.

http://infolab.stanford.edu/~widom/cs145/index.html (Click on "OpenClassroom Videos")

Older »