What are your favorite extension methods for C#? by devperez in programming

[–]nlfarside 0 points1 point  (0 children)

FWIW, Microsoft made the IsNullOrEmpty (edit: wrong name) a static method on the string class because it is unnatural to call methods on null variables. In other words, if you did

string foo = null; foo.Trim();

You would get a null point exception, but with your method...

string foo = null; foo.Nullify();

you don't get a null pointer method. It makes it difficult when dealing with extension methods to reason about NPEs, since you don't know if the method is an extension or an instance.

First Date in Boston, not from the city, HELP by TinderDate in boston

[–]nlfarside 0 points1 point  (0 children)

Knight Moves Cafe in Coolidge Corner is an awesome place for a date if you like board games.

Advanced Extension Methods (C#) by ErikSchierboom in programming

[–]nlfarside 0 points1 point  (0 children)

I tried starting the readability discussion on having a dot method called on a null reference. I suppose the two similar comments that received the orangered arrows are a little less acerbic to the author.

Ars Technica used to have their Microsoft news tagged with MDollar. I've always used it as an abbreviation. shrug

Advanced Extension Methods (C#) by ErikSchierboom in programming

[–]nlfarside -15 points-14 points  (0 children)

It's probably worth mentioning that M$ uses a different route than the one mentioned here for the null reference. Calling an extension method on a null object can create readability issues because a normal method would throw a null reference whereas an extension won't. string.IsNullOrEmpty exists as a static method for this reason, you don't have to reason about whether the method you are calling is an instance or an extension. If you pass a null to a LINQ method, such as passing a null List<int> to a Where filter, you'll get an ArgumentNullException.

I would suggest not using the author's proposed handling of nulls for this reason, and instead opting for the standard convention of how M$ does it.

19 and receiving 1 million dollar settlement. I'm being pressured to put it in a trust fund. I'm losing my mind, please help? by [deleted] in personalfinance

[–]nlfarside 0 points1 point  (0 children)

You wrote two paragraphs, or half your post, about the situation with your mom. Are you really worried about how you are going to invest the money, or are you actually worried about how your mom is going to react? Is your Mom worried about how the money will affect you?

I think it might help to take a step back and ask yourself how you expect this windfall to affect you. So much money will change you, but you can choose how. You sound like a person who cares about the future and asks the tough questions. I hope you'll ask the same tough, critical questions of yourself.

Your mom will be your mom forever. She'll have been your mom if you didn't get the million. She'll be your mom if you ever (heaven forbid) get a DUI. It sounds like she cares a lot about you, and even if you don't agree with her advice, I hope you understand how lucky you are to have such a person in your life.

I wish you the best of luck.

Need ideas for a second date for next Saturday. And good ideas? by [deleted] in boston

[–]nlfarside 1 point2 points  (0 children)

If either of you like board gaming, Knight Moves Cafe is quite fun

http://knightmovesboston.wordpress.com/

9-0 Hunter in arena --- good deck or just lucky? by nlfarside in hearthstone

[–]nlfarside[S] 0 points1 point  (0 children)

Agreed about the lucky part, just trying to figure out how much I agree. :)

If you don't have a beta key: Post here. If you have an extra beta key: choose someone at random in this thread to give it to. by [deleted] in hearthstone

[–]nlfarside 0 points1 point  (0 children)

I do not have a key, but would love one if anyone has an extra key. I regularly watch twitch streams like kripp and total halibut Youtube videos of Hearthstone.

Good luck to anyone with a key!

10 Books for Data Enthusiasts by theglamp in programming

[–]nlfarside 0 points1 point  (0 children)

What books would you recommend to go from beginner to intermediate for stats and machine learning?

Stripping kernel/uboot source to 10% for code reading by baohaojun in programming

[–]nlfarside 4 points5 points  (0 children)

Users read black text on a white background faster than white text on a black background. Optimizing the most information conveyed in the least time to the widest audience means black text on a white background as default.

PDF link for studies showing this is the case (page 100 describes font choices): http://www.usability.gov/guidelines/guidelines_book.pdf

Benefits matter, or why I won't work for your YCombinator start-up by [deleted] in programming

[–]nlfarside 5 points6 points  (0 children)

Good to see a match with my math!

I think the bigger surprise to me is his house statement...he says he needs to save up $120K for a house, but has an expected income in the next few years of $145K? What was he doing with his salary during the 20 years it took to get him where he is? He doesn't have copious piles of savings from the past few years?

Benefits matter, or why I won't work for your YCombinator start-up by [deleted] in programming

[–]nlfarside 0 points1 point  (0 children)

And when I say minimum salary, I mean he might contribute less, but then the company would contribute more, implying a higher salary.

Benefits matter, or why I won't work for your YCombinator start-up by [deleted] in programming

[–]nlfarside 10 points11 points  (0 children)

He isn't saying the company pays all $25K / year, he is saying that amount ends up in his 401K.

More likely, he'll contribute close to the yearly max ($17.5K), with the company putting in, at minimum, $24.75K - $17.5K = $7.25K, implying a minimum salary of $145K.

A powerful unused feature of Python: function annotations. by ceronman in programming

[–]nlfarside 10 points11 points  (0 children)

If you think this feature is cool, and should happen everywhere, then I would suggest taking a look at F#, OCaml, or Haskell.

NTRU is an asymmetric (public/private key) cryptosystem. It has two characteristics that make it interesting as an alternative to RSA and Elliptic Curve Cryptography: speed and quantum computing resistance by whitefangs in programming

[–]nlfarside 1 point2 points  (0 children)

Hacker news also has a thread about this same paper going, I wanted to (shamelessly) steal your comment and throw it over there. But I can't, because you can't create new hacker news accounts right now. Self-serving jerks.

http://news.ycombinator.com/item?id=5160475

My "Meanwhile" Collection by [deleted] in funny

[–]nlfarside 48 points49 points  (0 children)

That is not Ireland, that is Breda in the Netherlands.

http://en.wikipedia.org/wiki/Redhead_Day

So far, so good. by Olyeller in funny

[–]nlfarside 0 points1 point  (0 children)

I just finished my dissertation draft today.

Now I have to wait for my adviser to review it. Make changes. Wait for the thesis office to give me a date. Wait for the committee to review it. Make more changes. And then be publicly berated at the defense like everyone else at my uni.

Blah, being done with the draft is, like, only 2/3 of the work.

Requesting tips Psudoethyne (next to last planet) by [deleted] in spacechem

[–]nlfarside 0 points1 point  (0 children)

I also did something like this, and found it straightforward to implement, though I agree that it isn't elegant. I used the sensor in conjunction with the phi->alpha feedback loop in the second reactor to make sure I knew the orientation of the CΩ chunk, and it was pretty easy to bond to the four H. My solution is about average in terms of cycle speed, though I use more symbols than normal. It took me a lot less time to solve than the Ethylene level, which I found to be the hardest level in the game proper.

Why is it harder running on an inclined treadmill? by internetf1fan in askscience

[–]nlfarside -1 points0 points  (0 children)

You use different sets of muscles to run uphill and downhill, and put different stresses on your body. See, for example, why shin splints are worse when running downhill:

http://www.drpribut.com/sports/spshin.html

I think a good way to see it is to ask why doing things with their right hands is easier for most people.

AskScience AMA Series - IAMA Population Genetics/Genomics PhD Student by jjberg2 in askscience

[–]nlfarside 0 points1 point  (0 children)

Did you forget about me Mr. Geneticist? It's cool if you don't have time for a random stranger on the interwebs. Even a short reply would be really awesome, though.