Better HN
topnewbestaskshowjobs
Log inSign up

c_shu

49 karma · joined Dec 24, 2016 (9y ago) · 37 submissions

https://github.com/cshu

http://stackoverflow.com/users/2419922/cshu

Submissions

comment 7y ago · link · parent

when an error occurs in a machine and the machine tries to recover, maybe that's also a form of pain. A machine is not necessarily less sophisticated than any living creature.

comment 8y ago · link · parent

Could it be a chance of political corruption even if all source code and data are open?

comment 8y ago · link · parent

That's not the kind of torture i meant. Rifle or knife should be acceptable to most people. (This process is simple. Experienced butchers even work fast and clean.) Switzerland law is also about killing the lobster instantly so it's the same.

comment 8y ago · link · parent

I agree that we should pay more attention to people that are suffering.

But I think the rationale of such laws is somewhat valid. Can you imagine a person who is totally emotionless when torturing an animal but is also very compassionate towards human beings?

I think in some ways human ethics and animal ethics are connected.

Though if you ask me whether Switzerland has gone too far, I'm still hesitant about yes/no.

comment 8y ago · link · parent

They are not really bad. Reading about them can help you get familiar with how programmers usually name their patterns. But I don't think one needs to study "design patterns" to come up with code using builders, factories, and singletons. People should always know the optimal way to write their code (or almost optimal). They can come up with any design patterns when coding, instead of choosing some among the well-known ones.

comment 8y ago · link · parent

It depends on many factors. Choosing suitable tools for a project requires careful consideration.

Python is a popular language, but not the only one. So many languages exist for a reason. Of course you can always find justifications to reject a language, e.g. Python lacks compile time checking, C++ is outrageously difficult, Java code is full of boilerplates, Perl is a write-only language, PHP is just bad, etc. But all these languages are widely used for some reasons. Not only the popularity, you may also need to consider maintainability, performance, portability, libraries, licenses, etc.

comment 8y ago · link · parent

True. jEdit is one of the best editors i have used. Not my default editor but i use it from time to time and install it everywhere.

comment 8y ago · link · parent

The same goes for many other icons. Like rss, wifi, and shutdown icon.

It makes sense, because once an icon becomes popular reinventing it with another design makes people confused.

comment 8y ago · link · parent

kindof, but not always.

C++ and C# are powerful complex languages. C and Java are simple languages. But I can find lots of elegant programs in C or Java. They don't make the programs feel complex.

Still it depends on the programmer. Programs in any language can vary drastically in readability.

comment 9y ago · link · parent

It depends on how big the gap between the power of aliens and earthlings is.

Some people believe that science advances should progress like explosion, and "Any sufficiently advanced technology is indistinguishable from magic". In this case the possibility of aliens being at the similar level with us is small.

But I think you have a point. Sometimes I doubt the speed of science advances. Maybe the aliens are not so far away from us and their astronautics is not much stronger than our level. They don't look like magicians. In this case things can be boring, may be just an age of discoveries for the aliens.

comment 9y ago · link · parent

If the aliens are strong enough to land their spaceship on earth, investigating all countries is probably a piece of cake for them. There is no reason for them to tie themselves to a certain country or area.

In another case, if they establish communication with a certain country/organization, but they cannot arrive, and somehow can only communicate with that certain country/organization, then it could be a different story.

comment 9y ago · link · parent

Is the octahedron on the picture supposed to be an alien spaceship?

It reminds me of a creature in a certain animation I watched.

comment 9y ago · link · parent

Yes, human beings always do what's good for themselves.

There is a saying: Never underestimate the power of human wisdom!

They would never do negative-sum games or disastrous things like wars, arms races, environmental pollution, vicious competition, financial crisis, large-scale propaganda or persecution.

comment 9y ago · link · parent

like this one?

https://evertpot.com/npm-revoke-breaks-the-build/

comment 9y ago · link · parent

1. E-book and products like evernote/google keep. I rarely write things on paper now because I often experience the difficulty of copying/searching. On computers copying/searching is a breeze.

2. VoIP, Skype, WhatsApp, etc. Many years ago I thought they can totally replace traditional phone calls, at least for 99% users. But that didn't happen.

3. Technologies for telecommuting. Less congestion, less pollution. And it saves both time and money. But it's still not so popular. (In Asia, it's very rare.)

comment 9y ago · link · parent

Ideologies and violence caused so many disasters in history. At least money does not directly terrify us like that. Billionaires usually became victims of such disasters. In the end, money is not the ultimate power. It's violence that matters most on this planet.

comment 9y ago · link · parent

So you can insert/delete/update records without rewriting the whole file. And you get many other features like transaction, spill cache pages, fflush & fsync behind the scenes.

comment 9y ago · link · parent

No. 2.17 MB is NOT enormous. Usually there is no runtime library. In contrast, C or C++ runtime libraries can easily exceed that size. For example, vc_redist.x64.exe is 13.9 MB.

comment 9y ago · link · parent

Removing optional tags is recommended here: https://google.github.io/styleguide/htmlcssguide.html

comment 9y ago · link · parent

Postgres has better license

comment 9y ago · link · parent

Strange. Could it be related to labels as values? https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html

comment 9y ago · link · parent

it's kindof irrelevant to andrew ng's comments. It's about something like Cyberattacks. Something can be done very soon like tricking spam filters

comment 9y ago · link · parent

Scala is too complicated. It reminds me of C++. But C++ is fast. People use it probably when performance is their first priority.

For practical reasons I just bear with C++. Use it as necessary.

I would rather not bear with another complicated language, unless there are compelling reasons.

I think it's unlikely that Scala can be useful to me in the near future, because there are so many good alternatives.

comment 9y ago · link · parent

Because each method has its pros and cons. It's a difference of generality and specificity.

Consider this list as a ranking: 0 and 1 >> alphabet >> Chinese >> picture.

All 4 methods can be useful in some cases. Chinese has tens of thousands of characters, some people consider the language close to pictures, but real pictures have more than that (infinite variants).

Chinese is harder to parse than alphabet, and picture is harder than Chinese. (Imagine a compiler than can understand arbitrary picture!)

comment 9y ago · link · parent

One of the common nice features in OOP is polymorphism. You have a list/set/collection of objects which are of the same type, but also of different subtypes. They have the same behavior when calling some method and different behaviors when calling another method.

OOP is not a failure. But overengineering is another thing. (Sometimes I heard "Never write static function/method! Do it in OOP way!", though it doesn't make the code simpler or cleaner)

12