Live data from Hacker News

Baidu File System – A distributed file system for real-time applications

github.com

61–70 of 169 posts

Re: Baidu File System – A distributed file system for real-time applications

#61
post #33
post #25

Earlier quoted context omitted.

Not to be rude, but I'm glad I don't work where you work. How would that be consistent with your own classes? "Oh no, you can't just use a 'Tree' object, you need to explicitly set that there are no leaves yet, no branches yet, no squirrels yet, etc… etc…" Do you .clear() your vectors before you use them? This sounds like newbies that do: #define TRUE (1 == 1)

It's not about initialization, it's more about specifying clearly what happens in all cases. Anyway the reason for which it would no pass review is that today you use one compiler, tomorrow you have to use another and then you have to review all these little details again. It's about saving money more than anything and you do that by not relying on compiler behavior.

Sure, I would have preferred a non-branching:

std::string pad = descriptive_name_here(path);

with the added bonus of being able to add "const" to that, for the benefit of the reader.

This is not relying on compiler implementation! Can you name one language that has strings that initialise to anything but a valid object containing an empty string?

This is not an obscure side-effect. This is like assuming "std::vector v;" creates an empty vector, not a undefined-state vector container.

(I don't want someone coding C++ as if all objects are references. Coding in one language as if it were another is a well-known antipattern)

Re: Baidu File System – A distributed file system for real-time applications

#62

Why is there no English documentation ?

Because is written by chinese developers for a chinese company?

They put that code in github, releasing it to non-chinese developers.

Won't it be good if code has at least some documentation in English ? It's not that they don't want, they have some part in English.

Re: Baidu File System – A distributed file system for real-time applications

#63
post #42
post #25

Earlier quoted context omitted.

Not to be rude, but I'm glad I don't work where you work. How would that be consistent with your own classes? "Oh no, you can't just use a 'Tree' object, you need to explicitly set that there are no leaves yet, no branches yet, no squirrels yet, etc… etc…" Do you .clear() your vectors before you use them? This sounds like newbies that do: #define TRUE (1 == 1)

That define is very clever: it always lands on it's feet! :)

Except there's already a 'true'. When I see this I know that whoever wrote is completely incompetent (as in "does not know programming", not "is stupid").

It's clever, yes. The bad kind of clever that's also misguided.

Re: Baidu File System – A distributed file system for real-time applications

#64

Earlier quoted context omitted.

Because is written by chinese developers for a chinese company?

They put that code in github, releasing it to non-chinese developers. Won't it be good if code has at least some documentation in English ? It's not that they don't want, they have some part in English.

GitHub isn't just for English users

Re: Baidu File System – A distributed file system for real-time applications

#65
post #33

Earlier quoted context omitted.

It's not about initialization, it's more about specifying clearly what happens in all cases. Anyway the reason for which it would no pass review is that today you use one compiler, tomorrow you have to use another and then you have to review all these little details again. It's about saving money more than anything and you do that by not relying on compiler behavior.

It is specified clearly though. The behavior is not compiler dependent, it's specified in the C++ Language standard. See http://en.cppreference.com/w/cpp/language/default_initializa... and http://www.cplusplus.com/reference/string/string/string/ If a different compiler breaks this behavior, it's not standard compliant and thus could do all sorts of stuff in every possible line, including in: std::string pad = "";

Standards change. Don't they?

Re: Baidu File System – A distributed file system for real-time applications

#66

Earlier quoted context omitted.

Because English is the lingua franca of the software industry, and developers are usually expected to know English, no matter where they're from.

The point of my comment was, that shouldn't necessarily be the case forever, and it might not be reasonable to expect it to be.

Sure, nothing ever stays the same, but I think that for the foreseeable future, we can reasonably expect English to stay the universal language of software development. It's the default foreign language people learn in their home countries for a lot of reasons, so a lot of people who want to get into the field already have at least a basic understanding of English. This aids them in learning and communication with other developers, and it's just too convenient to be displaced any time soon.

Re: Baidu File System – A distributed file system for real-time applications

#67
Can't speak much for the project, but have to admire them for sticking with Mandarin.

India is atleast a 100-200 years away from something of this kind happening; or more likely never at all.

Indeed, there is not a single research university worth its name that isn't also essentially an export hub of brains to the 5-eyes (& Singapore).

English is crucial for India's system of feudal slavery to work.

Re: Baidu File System – A distributed file system for real-time applications

#69
post #65

Earlier quoted context omitted.

It is specified clearly though. The behavior is not compiler dependent, it's specified in the C++ Language standard. See http://en.cppreference.com/w/cpp/language/default_initializa... and http://www.cplusplus.com/reference/string/string/string/ If a different compiler breaks this behavior, it's not standard compliant and thus could do all sorts of stuff in every possible line, including in: std::string pad = "";

Standards change. Don't they?

Do you think that's any more likely than the constructor of std::string changing?

Re: Baidu File System – A distributed file system for real-time applications

#70

Can't speak much for the project, but have to admire them for sticking with Mandarin. India is atleast a 100-200 years away from something of this kind happening; or more likely never at all. Indeed, there is not a single research university worth its name that isn't also essentially an export hub of brains to the 5-eyes (& Singapore). English is crucial for India's system of feudal slavery to work.

Why would India use Mandarin?

English is the most common script in India, why would we use anything else. Unless you are Hindian trying to impose your minority language on the rest of us.

Post reply on HN