News for hackers. Stuff that matters.
Re:Why I Don’t Talk to Google Recruiters by perfmode on Tuesday February 21, 2017 @01:17PM (#13697889)
But Google's code quality is quite high...
Re:Why I Don’t Talk to Google Recruiters by yawaramin on Tuesday February 21, 2017 @01:45PM (#13698197)
I don't know about their code quality, but we consume some of their data via APIs and they periodically randomly change their non-nullable data types to nullable. Fun times hotfixing those in prod.
Re:Why I Don’t Talk to Google Recruiters by perfmode on Tuesday February 21, 2017 @01:48PM (#13698238)
When data comes in over the wire, you probably shouldn't be making assumptions about what's nullable. You should write a parser that fails gracefully if it receives unexpected input.

It's the robustness principle.

https://en.wikipedia.org/wiki/Robustness_principle

Re:Why I Don’t Talk to Google Recruiters by squeaky-clean on Tuesday February 21, 2017 @03:18PM (#13699458)
> When data comes in over the wire, you probably shouldn't be making assumptions about what's nullable.

I have to work with their APIs often (as well as Amazon, Facebook and a couple other big players, they're all equally awful).

Their documentation will tell you a type is an integer and will never be null. They will do this for 3 months, and then change it to send a string that can be nullable or empty string, without telling you or updating API versions. It goes beyond robustness. It's the "BigCorp will actively lie to you in their documentation" principle.

Re:Why I Don’t Talk to Google Recruiters by Drdrdrq on Tuesday February 21, 2017 @01:58PM (#13698389)
You're missing the point. Sure, you should make it fil gracefully on unexpected input. But Google shouldn't change APIs in a way hat causes 3rd party apps to fail at all.
Re:Why I Don’t Talk to Google Recruiters by perfmode on Tuesday February 21, 2017 @02:00PM (#13698422)
Third party apps wouldn't fail if they were correct in the first place. Failing gracefully on unexpected input is the way a competent engineer would structure their program.
Re:Why I Don’t Talk to Google Recruiters by ethbro on Tuesday February 21, 2017 @02:29PM (#13698850)
Is there a functional difference between "my production code suddenly stopped processing work because it rejected a newly nullable input value" vs "my production code suddenly stopped processing work because it crashed on a newly nullable input value"?
Re:Why I Don’t Talk to Google Recruiters by protomyth on Tuesday February 21, 2017 @02:39PM (#13698992)
If the crash gives an attack vector for a security threat then there is.

Personally, "Be conservative in what you do, be liberal in what you accept from others" is a bad policy in the modern world. It should be "Be conservative in what you do, be strict as if you don't trust them in what you accept from others".

Re:Why I Don’t Talk to Google Recruiters by ethbro on Tuesday February 21, 2017 @02:51PM (#13699168)
That's a valid point if it's security-critical. My initial response was with regards to grandparent comments arguing over semantics, when the end results in both cases was "successful processing ceased because of an API change."
Re:Why I Don’t Talk to Google Recruiters by yawaramin on Tuesday February 21, 2017 @03:03PM (#13699316)
'Liberal in what you accept from others' in this case would mean being prepared to handle nullable JSON fields.
Re:Why I Don’t Talk to Google Recruiters by klodolph on Tuesday February 21, 2017 @03:01PM (#13699297)
Ideally it's more like "my production code skipped over 1% of batch jobs because it didn't expect the null values" or something like that. Handling errors gracefully is a bit of an art unto itself.
Re:Why I Don’t Talk to Google Recruiters by perfmode on Tuesday February 21, 2017 @03:19PM (#13699463)
Indeed it is an art.
Re:Why I Don’t Talk to Google Recruiters by noir_lord on Tuesday February 21, 2017 @03:12PM (#13699398)
production code that rejects a suddenly nullable input value is more deterministic than "something crashed" and can be handled better (triggering a watchkeeper, notification) rather than relying on someone paying attention to the crash logs.
Re:Why I Don’t Talk to Google Recruiters by Drdrdrq on Wednesday February 22, 2017 @01:41PM (#13707944)
"Failing gracefully" is still failing. I don't want my app to fail, gracefully or otherwise.
Re:Why I Don’t Talk to Google Recruiters by captn3m0 on Tuesday February 21, 2017 @01:55PM (#13698340)
Funny you point this out. Google's JSON Style guidelines[1] say this:

>If a property is optional or has an empty or null value, consider dropping the property from the JSON, unless there's a strong semantic reason for its existence.

[1]: https://google.github.io/styleguide/jsoncstyleguide.xml?show...

Re:Why I Don’t Talk to Google Recruiters by perfmode on Tuesday February 21, 2017 @02:00PM (#13698407)
That's a different issue. The commenter is referring to keys that can take on null.

This style guide entry suggests a course of action in the event that one of these keys currently has a null value.

The style guide isn't prohibiting nullable keys.

Re:Why I Don’t Talk to Google Recruiters by walshemj on Tuesday February 21, 2017 @04:40PM (#13700315)
yes some of their api's and tools are a bit shoddy eg unable to parse a xml sitemap to spec and that spec was only a 3 page RFC!
Re:Why I Don’t Talk to Google Recruiters by ingsoc79 on Tuesday February 21, 2017 @01:30PM (#13698037)
Have you ever worked with the Android SDK?
Re:Why I Don’t Talk to Google Recruiters by perfmode on Tuesday February 21, 2017 @01:46PM (#13698215)
In my opinion, Android's code organization is a result of questionable architectural constraints applied early in the development of the platform.
Re:Why I Don’t Talk to Google Recruiters by JangoSteve on Tuesday February 21, 2017 @02:14PM (#13698636)
Isn't that exactly the point roguecoder made?

> I have had catastrophic failures caused by premature optimization, because locking a tool into a fancy algorithm before you know where the actual bottleneck is is a recipe for disaster.

EDIT: Or, are you saying that it was from the decisions made before Google acquired Android?

Re:Why I Don’t Talk to Google Recruiters by CaptSpify on Tuesday February 21, 2017 @01:43PM (#13698180)
I think that highly depends on what you value in code.
Re:Why I Don’t Talk to Google Recruiters by korzun on Tuesday February 21, 2017 @01:43PM (#13698181)
That's a bit biased.