HNHacker News
TopNewBestAskShowJobs

sdhgaiojfsa

662 karma · joined January 19, 2018

submissionscomments
sdhgaiojfsa··on Tim Berners-Lee on the future of the web: 'The system is failing'
It would be used by 1% of the population, with the other 99% using something else that looks much like what we have today.
sdhgaiojfsa··on Fraudsters Jailed for £37m Copycat Website Scam
I doubt they have the capability to cause whatever information you provide to magically become valid. Perhaps they do additional checking and notify you if there is an error. If that is what it is, then that is what they should say. The sentence as worded implies that any application has some chance of not participating in the lottery if made through ordinary channels.
sdhgaiojfsa··on Statement on Potentially Unlawful Online Platforms for Trading Digital Assets
It seems unlikely that it would be that easy. If it were, you'd see lots of unregulated stock markets out there in the wild (which, to my knowledge, is not the case).
sdhgaiojfsa··on Fraudsters Jailed for £37m Copycat Website Scam
> I suppose being open about it and not impersonating the government is the key difference between ethical and not.

That and being honest about how much value you are bringing to the table. If you don't actually improve on the free version, it is unethical to sell.

And you should never use language to imply a value proposition where there is none. For example, someone else posted a link to some green card scammers. One of their claims is:

> "USAFIS GUARANTEES 100% participation in the Lottery!"

This may be true, but it is still an unethical statement. It hints that this is a net positive vs. the free application the USG provides, but in fact any valid, submitted application participates in the lottery.

sdhgaiojfsa··on Icelandic language battles threat of 'digital extinction'
It would not be a big loss if this sentence were never expressed. I allowed for edge cases in my previous comment, and this is such a one.
sdhgaiojfsa··on Icelandic language battles threat of 'digital extinction'
> That's just not how language works. Gödel, Escher, Bach really hammered this home for me. Many ideas are easier to express in one language or another, to the point that they are practically inexpressible in another language.

I am very skeptical that this happens commonly, or that the necessary terms couldn't be ported over to the common language if needed.

sdhgaiojfsa··on Go best practices, six years in (2016)
> In most of the places were I worked even getting a couple of new machines for production use would take months

OK, well I guess this would be another caveat for my advice. If bringing up a production simulacra would take more resources than you have, then you might have to lean more on various types of doubles. This may be more often in environments that have insane prioritization of dev time vs. machine resources.

If I may ask, what was the bottleneck in your test suite? Did it saturate the cpu, ram, disk?

sdhgaiojfsa··on Go best practices, six years in (2016)
> I guess that you have never worked on big systems

I work on search and indexing systems at Google, and have done for more than a decade. I'm by no means the best, nor an authority. But I have spent some time living in this problem space, and this is my conclusion from my years of experience.

FWIW a single run of the tests for the system I work on now takes . . . I don't know. I would guess hours or maybe even a day of computer time? But, computers are cheap, and defects are expensive. So you split the test suite into bits small enough that the whole thing runs in ten minutes, and run them all in parallel. And, yes, there have been cases where I have had to debug the slow startup of a dependency so that I can make it fast enough to run in my test. But, that's what they pay me for, I enjoy that type of work, and it has ancillary benefits to the dependency when it needs to start up in production.

sdhgaiojfsa··on Go best practices, six years in (2016)
> Time, energy, and effort

My contention is that using real objects normally does not take materially more of any of these, and thus that most code is served best by being tested only by integration and regression tests. Where my contention is untrue, apply your best judgment, of course. :)

sdhgaiojfsa··on Go best practices, six years in (2016)
> "People are going to keep using terms ... and it's disingenuous to assume otherwise."

I'm sorry, I'm making an argument about how people should write tests, not what terms they'll use to describe it. :) I promise you that there is no disingenuity going on in my use of certain terminology to describe how I think it's best to write tests.

sdhgaiojfsa··on Icelandic language battles threat of 'digital extinction'
It's an analogy.
sdhgaiojfsa··on Go best practices, six years in (2016)
Lots of people have different opinions on this. You're entitled to yours, but I think it's hasty to call it bad advice.

I'm not so worried about http.Client behaving incorrectly, but I am worried about the server I'm targeting behaving in a way that's different than my expectations. I'm also worried about getting cookie, post-data, url, etc. formats wrong. Even if they match what I put in my mock, they won't necessarily match what's out there in production. I'm worried that I'll handle download resumption wrong, for example.

If I have the capability to bring up the target server locally, that's what I will do. If I can't, but it's straightforward to create a work-alike, I'll bring that up in process. Only in the most dire of circumstances will I use mocks to test my code.

Think about it this way. What harm is done by using the real object, under the circumstances I described? Sure, if the dependency code breaks, my tests will too. Is that bad? Is there any point in my tests passing when my code won't actually work in production? OK, so maybe the tests will run slower? This matters in the limit, but often times you can use the production dependency without materially increasing test time. OK but what about the CI system using more resources? That will only be a problem of significant economic import if you're running at a scale like Google or Facebook.

My opinion is there are a few main valid objections to my approach. One is an argument about the size of the test code. In some cases, bringing up the production dependency will require more code than a mock. Sometimes a lot more code. My response is that we should make it easier to bring up the production dependency! But if we can't, I can see the case for a mock or a fake. The other counterargument is for when we really are interested in testing the sequence of interactions the code under test has with the production system. In that event, I guess I'm ok with using a mock, but I think most of the time we're more interested in testing state. We can also use things like testvalue injection to test behavior sequences, which is normally a lighter-weight approach, and in some cases can allow you to reproduce paths that you'd otherwise have trouble hitting, even with a mock.

sdhgaiojfsa··on Icelandic language battles threat of 'digital extinction'
Perhaps, but y=x+1 and u=v+1 are the same, even if they use different terms. Likewise, y=x+1 !== y=x-1, even though they use the same terms.

It's really unclear to me that much harm will be done if everyone speaks the same language, and it's clear to me that there will be great benefits. That's an easy position for me to take as a primary speaker of the world's dominant language. It's also no skin off my back if other language groups wish to continue maintaining their own languages. But I guess that those which aren't strong enough will fade over the centuries, as many already did in the past.

sdhgaiojfsa··on Go best practices, six years in (2016)
The general theory is that, although you're focused on the code under test, if the underlying dependency is not behaving as expected, you want to know that. Mocks create an opportunity for your code's expectations about your dependencies' behavior to diverge from reality. So if at all possible, they should be avoided.

There are a few general ways to do this. The best way is to use the real underlying dependency. This should be the default.

If the dependency is too slow to use in the test (e.g. it has a long startup time, or is hosted remotely), the next best thing is to use a fake -- a local implementation of the dep that has the same behavior, but operates in memory on ephemeral data. The best libraries will provide these, and if they don't, you might be able to implement one and contribute it back. Even if you have to maintain it yourself, it often takes less code than describing mock behavior. The downside of fakes vs. the real implementation is that their behavior too can diverge. But this is not a net downside compared to mocks.

If you can't use a fake, the next best thing after that is a stub. See below.

Only if none of these options are viable should you use mocks.

(The position I'm describing is the one referred to as "classicist" in this post: https://martinfowler.com/articles/mocksArentStubs.html. I'm not by any means its originator.)

sdhgaiojfsa··on Go best practices, six years in (2016)
Pretty good advice, except the preference for interfaces to support mocking. You should avoid mocking when possible in favor of real objects or fakes. Interfaces are still cool, though.
sdhgaiojfsa··on Why I Quit Google to Work for Myself
Yes. I would never have become the engineer that I am if people had always helped me when I asked.
sdhgaiojfsa··on 4 Years Trying to Get Approval to Turn SF Laundromat into Apartment Building
That is a bad idea. The Soviet Union was a shitty place to live, and its economic policies were disastrous. As I pointed out in the comment you're replying to, this problem has already been well-solved by simply expanding the locus of control for zoning so that the interests served by it are more global.
sdhgaiojfsa··on 21 Years of Income as a Software Engineer in San Francisco
If anything it might be a little low. For example, "senior" engineer at Google (a rank you can hit in less than five years if you are competent) pays 250k according to GlassDoor[1]. The other competitive BigCos are similar, some paying more, and some paying less.

[1]: https://www.glassdoor.com/Salary/Google-Senior-Software-Engi...

sdhgaiojfsa··on 4 Years Trying to Get Approval to Turn SF Laundromat into Apartment Building
The other democratic societies who have solved this problem seem to belie your claim. The issue here is that the unit of democracy for this problem is too local.
sdhgaiojfsa··on Intel Has a Big Problem
It's down from 47 to 45, and it's almost impossible to attribute this to these bugs with any reliability. Yes, there was some initial panic in the first days after the bug. You can see this in the volume the day after it was announced. But things have largely recovered since the low midway through this month.

Of course, the stock market by no means knows everything. But the aggregate prediction of traders is that this doesn't matter very much to the bottom line, and I tend to agree.

sdhgaiojfsa··on Intel Has a Big Problem
I think the big institutional clients are always evaluating AMD, and even more exotic options. But I don't think this bug has materially affected the equation here. Savvy buyers understand that there will occasionally be bugs, and this one has already been mitigated. How Intel verbally responds to the issue matters much less than their actions, because the words do not affect the costs of using their products, and the actions do.

I am deeply skeptical of the commentary on Intel's attitude and press releases. I really doubt that matters much to most buyers.

sdhgaiojfsa··on Intel Has a Big Problem
I'm skeptical that Intel really has that much of a problem, and the investors in the stock market seem to agree. Intel only has a problem if alternatives come to be seen as economically viable. And right now it doesn't seem like there's any particular danger of this happening.

Pundits want to say that there's a huge thing here, because pundits don't optimize for the truth. They optimize for clicks. So you really need to be careful looking to their writing for the truth.

sdhgaiojfsa··on The cost of games
What aspect of life on earth has been growing exponentially for millions of years? I'm not clear on what you mean here.
sdhgaiojfsa··on The cost of games
I don't think it's necessarily true that good games will sell. Some will, sure, but others may not. There are massive numbers of games that fly under the radar and never really catch on, and some of these are bound to be good. Like anything else, there's an element of luck involved. Simply being good is not enough.

Price per MB seems like an attempt to capture the amount of work that goes into a game, but I agree it's not a great metric. You can decrease price per megabyte just by shipping models and textures with higher resolution, even though they don't cost you anything more to create.

← PreviousPage 5 of 5