HN user

c_shu

49 karma

https://github.com/cshu

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

Posts0
Comments32
View on HN
No posts found.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.)

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.

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.

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!)

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)

You have a point. Some people still write C++03 code because "My code will mostly work fine when I flip flag to C++11 anyway". But I always hope newer standards prevail, and make C++ great again.

Please always use "-std=c++14" when you can. There are a lot of subtle differences between c++11 and c++14.