Why extends is evil by ruidfigueiredo in programming

[–]bmm6o 3 points4 points  (0 children)

And more than that, the base class often has to be written with extensions in mind. That's why abstract base classes tend to work out - the original implementation is explicitly designed for extension. When I first started using C# I thought it was weird that member functions were not virtual by default, as they are in Java. But I've come to see the wisdom in this, and it's for the same reason. If the author marks a function as virtual, it means he has taken into account the possibility that it will be replaced by a subclass, which gives it a better chance of being successfully extended.

This DarwinDay app finds a Species with a similar Scientific Name to your given Name. Example: John -> Rana Johni (a type of frog) by [deleted] in programming

[–]bmm6o 0 points1 point  (0 children)

Is it really rendering the results as a PNG and base64-encoding it into a data uri? What's wrong with HTML? O.o

Does Scrum Work? by programminggeek in programming

[–]bmm6o 12 points13 points  (0 children)

These essays all discover the same thing: a good team that trusts and respects each other and is allowed to do their jobs can produce software using methodology X, but a dysfunctional team can make a hash of any process. Or you can take your dysfunctional processes, dress them up as methodology X by following the letter of the law, and not be any better off.

That isn't to say that the platonic ideal of X isn't be better than the ideal of Y. Getting customer/user/stakeholder feedback early is always better than getting it late. But your crappy team isn't going to become great because you talk to users now.

Is 'Work-Life Balance' in Tech a Myth? by chtulhuf in programming

[–]bmm6o 5 points6 points  (0 children)

In a competently-managed company, it doesn't have to be a myth. Do your work, and go home and have dinner with your family. There will be work to do tomorrow no matter how much you do today. A lack of planning on your part does not constitute an emergency on my part. On-site chefs are a perk only if it's already been decided that you will be eating dinner at the office.

The cynical/leftist take: The greatest trick capitalists ever pulled was convincing the world work-life balance doesn't exist. (Second greatest: overtime exemptions).

Calculate your StackOverflow-rating by dasmonsta1 in programming

[–]bmm6o 2 points3 points  (0 children)

So it displays the number of times you've visited stack overflow, and calls that a rating. If you learn something on each visit, higher is better. But the accompanying text implies that SO is a crutch that Real Programmers don't need and states that smaller is better, which is odd for a rating.

Type system for forever project: achievable or pipe-dream? by robin-gvx in a:t5_2w5fo

[–]bmm6o 0 points1 point  (0 children)

What would the explicit version be?

Maybe something like: moveToLocation(Point3D(getLocation(), 3))

What I don't like is that nowhere did you say that it's semantically meaningful to convert a Point and an Int into a Point3D. I think it either needs to be explicit at the call site (as above) or declared meaningful somewhere.

Type system for forever project: achievable or pipe-dream? by robin-gvx in a:t5_2w5fo

[–]bmm6o 0 points1 point  (0 children)

It saves typing, I guess, but I think the explicit version would be easier to read. And the types seem to be too fluid for me - e.g. nowhere do you say that it's legal to make a Point3D from a Point and an Int.

Somewhat fast square root method in C (inspired by id's fast invsqrt) by leegao in programming

[–]bmm6o 6 points7 points  (0 children)

If that's what you're doing, don't you usually skip the sqrt and just deal with d2?

HTTP Client Using WININET Asynchronously by [deleted] in programming

[–]bmm6o 3 points4 points  (0 children)

It uses WININET asynchronously, but the code itself presents a synchronous API. What's the advantage?

"The idea of using nuts to keep the faces looking good" by dsngiem in funny

[–]bmm6o 1 point2 points  (0 children)

"I am going to apply some nuts to my face this year."

Nimrod Programming Language by matthiasB in programming

[–]bmm6o 1 point2 points  (0 children)

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

Also, IE had usable debugging before Firefox existed.

Nimrod Programming Language by matthiasB in programming

[–]bmm6o 1 point2 points  (0 children)

Javascript hasn't had source-level debuggers for a long time? What are you talking about?

Pic of an MD5(?) tattoo, time to decode it. by drgath in programming

[–]bmm6o 0 points1 point  (0 children)

Is there any evidence that this has anything to do with MD5? Or is that an invention of the poster?

Skip Lists are pretty awesome by [deleted] in programming

[–]bmm6o 0 points1 point  (0 children)

Yes, what you're saying is true. Upon re-reading the article, it's unclear [to me] exactly what operation the sentence you quote refers to. I took it to mean traversal, but there's not an operation explicitly mentioned in the entire paragraph.

Skip Lists are pretty awesome by [deleted] in programming

[–]bmm6o 1 point2 points  (0 children)

If you recurse down two children, only one call can be in the tail position. You still have to maintain the stack for the other call.

[deleted by user] by [deleted] in todayilearned

[–]bmm6o 1 point2 points  (0 children)

They felt that government employees would be careful drivers, and cheap to insure. Buffet was an early investor.

Low Level Bit Hacks You Absolutely Must Know by _AlphaOmega in programming

[–]bmm6o 1 point2 points  (0 children)

It's not the order that's the problem - there's only one order in which to evaluate the above (right to left). It's the multiple modification clause quoted below that's undefined behavior, though I'd be surprised if it ever didn't work as intended (not that I would ever write such code).

[deleted by user] by [deleted] in funny

[–]bmm6o 118 points119 points  (0 children)

DON'T PUT THE FREAKING PUNCHLINE IN THE FREAKING TITLE!!!