HackerTrans
TopNewTrendsCommentsPastAskShowJobs

john_fushi

no profile record

comments

john_fushi
·3년 전·discuss
Thanks for the explanation!

That's the part I missed : the first null check can be skipped if the memory is allocated but the constructor hasn't been executed.
john_fushi
·3년 전·discuss
Doesn't the singleton example contain an error?

On one hand, the author says that instanciating the singleton and storing it is not safe because there is no synchronization, but on the other hand he says that null check before is safe because the mutex introduces synchronization.

My understanding would be that the mutex protects this whole section and that the atomic is not necessary at all in this case.

Please correct me if I'm wrong.
john_fushi
·3년 전·discuss
I guess Matsumoto should have charged for Ruby. I'm sure Mike Perham and Derek Kraan would have been glad to pay for that and that the Ruby community would be in a strong and healthy shape.
john_fushi
·3년 전·discuss
(In Canada) The max my bank offers is 10 years, and it comes at a premium. The standard I see around me are 5 years.
john_fushi
·3년 전·discuss
Let's say that, hypothetically, I lead a project for a very big customer that ended up being used to commit a (arguably) crime against humanity.

Should I put this on resume and would it be in poor taste to quantify the results?
john_fushi
·4년 전·discuss
> val x: Pair<String, Pair<String, String>>

This just describes the structure. Structure without intent is useless.

Comments and out of code documentation both have the same problems : - Blindspots - Rot

That is not to say they are useless, but they are rarely if ever sufficient.

In the end, the most complete and trustworthy source of truth for the code is the code itself.

Help others by having your code describe your intent. Using appropriate variable name and using appropriate types _help_ to keep displayed intent in sync with reality.

Another point to consider is that for the same intent the structure may need to change, to evolve. Proper typing can insulate the code from those changes.
john_fushi
·4년 전·discuss
Unless you live in Quebec - then google disabled this option to avoid complying with local children protection law.