?

Log in

No account? Create an account
 
 
14 August 2016 @ 05:02 pm
Telling The Good Stuff You Know  
The act of discovery was not complete for him until he had taught it to someone else.
It is a good way to test that your theories have at least some ground in reality.


Richard Feynman was relentless about testing: "It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
Tags:
 
 
 
журнал закрытjuan_gandhi on August 14th, 2016 09:09 pm (UTC)
Here's the problem: if you have a piece of knowledge, and nobody else does, it hardly exists. You may just have gone crazy. Or made a stupid mistake. Knowledge should be tested on other people.
Dennis Gorelikdennisgorelik on August 15th, 2016 04:20 am (UTC)
Exactly.
And testing knowledge on other people is just one of the steps in a rigorous testing process.
gineergineer on August 15th, 2016 08:07 am (UTC)
So... you are already double checked your opinion about Levenchuk? ;)
журнал закрытjuan_gandhi on August 15th, 2016 05:05 pm (UTC)
No need. :)
Dennis Gorelikdennisgorelik on August 15th, 2016 05:11 pm (UTC)
Is making a stupid mistake about Levenchuk OK?

I have no clue about who Levenchuk is
:-)
gineergineer on August 16th, 2016 06:25 am (UTC)
ailev in LJ
Dennis Gorelikdennisgorelik on August 16th, 2016 02:02 pm (UTC)
Is there anything special about him?
gineergineer on August 17th, 2016 04:54 am (UTC)
Who knows... %))
gineergineer on August 18th, 2016 07:24 am (UTC)
I do not know what disgusts Juan in his writings,
so equally I do not know what can make you interested.
Are you interested in general ingineering?
(no subject) - dennisgorelik on August 18th, 2016 08:00 am (UTC) (Expand)
(no subject) - gineer on August 19th, 2016 05:53 am (UTC) (Expand)
gineergineer on August 16th, 2016 06:21 am (UTC)
Strictly logical, is'nt it?
(troll face)
Because there is only two opinions: yours and wrong?
gineergineer on August 17th, 2016 05:38 am (UTC)
Sorry in advance.
I'll use this place to expain some Denis's misunderstandings about FP and same time ask you to check my words.
Killing two birds with one stone, so to say. %)


Difference between ordinary (procedural|OOP) programming and FP is that
first used closely definition of algorithm as step-by-step instrutions.
While FP is more like algebra (though there is things like do-notaition in Haskel).

Its looks like no big deal for FP-people and they do not think about it much.
That algebraic substitution can be algotithmic.
Like (2 + x) and x=2
can be done in step by step maner:
1) (2 + x) and x=2 => (2 + 2)
2) (2 + 2) => (4)
3) (4) => 4 ;)
but in FP languages such details quickly hiding under the hood
and FP-people like to say something "substitute x and simplify an expression" or even "just use functor|monad X" %)
without thinking much about how its made under that hood (and there used quite a bunch of smart tricks, because math do not map well on current PCs architecture).

For us, who accustomed that our code can be
runned in debugger (almost) any time,
and seen in step-by-step manner even down to separate machine instruction,
its obviously looking like they mocking us. %)
Only stupidiest procedural|OOP programmer,
so called "bidlocoders" (like indusi or kitaitsi) do there programs as just a bunch of words, without thinking about what it doing on low level.

And that rises the question -- why FP=people do think that their FP is "much better then ordinary programming" (like "why use ordinary washing powder -- use Tide" comercial %)) ).
Where is real benefit of using?

In "F-program can be written in more dense manner"?
But its like FP-people think that ordinary programmers too stupid and think like "here I must first array element add to second, then to third",
instead of "here will be for-loop" or even "lets use library foreach method", or "let's ise that nitty-gritty map|reduce thing from latest standart".

So they also can use euristic "use some abstraction to substitute long and hard to read code with shortcut".
So what the difference?

Here FP like to say "you don't understand a thing, FP its math and its garanty that our code will work".
And here they have some point.
Because of so detailed ordinary programming are prone to ad-hoc programming.
And its really makes code look messy.

But its all about discipline of programmers...
журнал закрытjuan_gandhi on August 17th, 2016 06:20 am (UTC)
(sorry, I'lll reread it tomorrow, it's very interesting and takes time)
gineergineer on August 17th, 2016 07:28 am (UTC)
Thank you in advance.
Dennis Gorelikdennisgorelik on August 17th, 2016 08:33 am (UTC)
> FP is more like algebra

It is not.
FP is much more similar to assembler code than to algebra.

> But its all about discipline of programmers

Do you mean that difference between OOP and FP is in discipline of programmers?

You can't be serious.
gineergineer on August 17th, 2016 01:28 pm (UTC)
\\FP is much more similar to assembler code than to algebra.

What makes you think so? (may be its the reason of your hardships with FP)

In a way it may be right.
If you think about any PL as a way to communicate with special virtual machine.
But I think Juan will judge us here.


\\Do you mean that difference between OOP and FP is in discipline of programmers?

As far as I seen such opinion on the internet.
That "new sexy" languages and programmers who use them
and start arguing that this new hot PL make them more productive (and smarter ;) how without it).
Like PL with GC.
Its just because they released of stuff which need strict discipline like manual MM.
But not because (as they like to boast) this new PL "more expressive" or something (or just programmers on it are plain smarter then other ;) )

And FP-people support this judgment,
while they say that "FPL is more strict, so if you made your code compile -- its a good sign there is no errors either".
So. Real benefit from FPL is that it SO strict, that even undisciplined programmers cannot ruin code with their ad-hoc hacks. ;)
The same way as programmers in GC PL cannot ruin MM (that simple as in C, at least).
Dennis Gorelikdennisgorelik on August 18th, 2016 12:27 am (UTC)
> What makes you think so?

Because Assembler and FP solve similar problems (programming) while algebra solved significantly different problems: calculating.

Many other signs indicate that FP and Assembler language are much more similar than Algebra:
1) Notation.
2) Characters used.
3) Ability to compile into executable program.

> (may be its the reason of your hardships with FP)

No.

> As far as I seen such opinion on the internet.

That's only temporary effect.

> while they say that "FPL is more strict, so if you made your code compile -- its a good sign there is no errors either".

"they" can say whatever they want. It does not make it true.
The most costly errors are logical and FP does not prevent them.

> Real benefit from FPL is that it SO strict

It's not really a benefit.
Besides, FP does not necessarily mean "more strict".
(no subject) - gineer on August 18th, 2016 06:33 am (UTC) (Expand)
(no subject) - dennisgorelik on August 18th, 2016 06:50 am (UTC) (Expand)
(no subject) - gineer on August 18th, 2016 07:03 am (UTC) (Expand)
(no subject) - dennisgorelik on August 18th, 2016 07:06 am (UTC) (Expand)
Literally :) - gineer on August 18th, 2016 07:22 am (UTC) (Expand)
(no subject) - gineer on August 22nd, 2016 02:22 pm (UTC) (Expand)
(no subject) - dennisgorelik on August 22nd, 2016 03:39 pm (UTC) (Expand)
(no subject) - gineer on August 23rd, 2016 05:07 am (UTC) (Expand)
(no subject) - dennisgorelik on August 23rd, 2016 05:11 am (UTC) (Expand)
(no subject) - gineer on August 23rd, 2016 05:47 am (UTC) (Expand)
(no subject) - dennisgorelik on August 23rd, 2016 05:57 am (UTC) (Expand)
(no subject) - gineer on August 23rd, 2016 06:47 am (UTC) (Expand)
журнал закрытjuan_gandhi on August 17th, 2016 06:20 pm (UTC)
Ну на самом деле там все не так хорошо, как фпшники сообщают.
Просто есть определенный прогресс.

1. Лучше писать групповые операции - со списками, например. Фильтрация, мапинг, зиппинг. Все это есть в R, и тут ничего такого особо функционального нету.
2. Отсутствие мутабельности означает всего лишь отсутствие мутабельности. А вот ее присутствие означает, что вы забываете предыдущие значения, и вместо потока данных берете только хвост, теряя при этом многие полезные данные.
3. Строгие типы позволяют производить гораздо более чистые программы, не надеясь на совесть программиста. Но не всегда.
4. Для обеспечения 1) и 3) нужны типы высшего порядка. И тут выясняется, что операции над типами высшего порядка легко обобщаются еще дальше. Так возникают монады.
5. А монады хороши тем, что их свойства известны, и можно сокращать вычисления, просто расчитывая на свойства.
6. А глубже копнуть - еще возникают и комонады. Но обычно ФПшники до них не доходят.
gineergineer on August 18th, 2016 06:55 am (UTC)
1. Any such things can be done in ordinary PL by means of special libraries.
And such librries can be even more powerfull... in terms of PC performance (like using GPU for computing), not in terms of "conceptual power", of course.
Like that Julia prized by Levenchuck ;)

2. Immutability makes more difficult work with a state in programs.
So, while I totally agree that immutability can be helpfull and in general are sign of good style in programming.
But there is all different kinds of programming that do not benefit from it at all.
Separately it can be confirmed by that fact that immutability aproach are so late comer. Dozens of years people did a lot of staff without it.
So, it means, that someone who propose things like immutability to be widely adopted in all different areas -- must provide stronger PRO arguments and be more prepared to answer CONTRA arguments,
then just "its better programming style per se".

3. Its ordinary antagonism between dynamically and statically typed PL, am I wrong?

4. Mathematical one, not that in PL (I assume it from what I read in your blog.. about problems with realisation of it in different PLs)

5. Same. In math, not in PL.
And here my unheard in your blog question -- is there some method (in OOP we have OOD -- object-oriented Design and decomposition) of how to decompose real life project tasks into this math aproach with monads and etc?

6. No comments.

PS And. Can you look at Dennis's arguments too, please?
(no subject) - juan_gandhi on August 18th, 2016 05:33 pm (UTC) (Expand)
gineergineer on August 18th, 2016 09:14 am (UTC)
Из интервью, взятого MIT Technology Review (T.R.) у Бьерна Страуструпа (Б.С.):

"...
Б.С. - I think the real problem is that “we” (that is, we software developers) are in a permanent state of emergency, grasping at straws to get our work done. We perform many minor miracles through trial and error, excessive use of brute force, and lots and lots of testing, but–so often–it’s not enough.

Software developers have become adept at the difficult art of building reasonably reliable systems out of unreliable parts. The snag is that often we do not know exactly how we did it: a system just “sort of evolved” into something minimally acceptable. Personally, I prefer to know when a system will work, and why it will.

T.R.: How can we fix the mess we are in?

Б.С.: In theory, the answer is simple: educate our software developers better, use more-appropriate design methods, and design for flexibility and for the long haul. Reward correct, solid, and safe systems. Punish sloppiness.

In reality, that’s impossible. People reward developers who deliver software that is cheap, buggy, and first.
..."
(no subject) - juan_gandhi on August 18th, 2016 05:34 pm (UTC) (Expand)
You are firing your roads to retreat here... ;) - gineer on August 19th, 2016 05:49 am (UTC) (Expand)
gineergineer on August 31st, 2016 08:09 am (UTC)
Can you give your comments on that?
http://chaource.livejournal.com/149997.html
(no subject) - juan_gandhi on August 31st, 2016 03:09 pm (UTC) (Expand)
(no subject) - gineer on September 4th, 2016 10:41 am (UTC) (Expand)
(no subject) - juan_gandhi on September 5th, 2016 03:44 am (UTC) (Expand)
(no subject) - gineer on September 5th, 2016 05:44 am (UTC) (Expand)
gineergineer on August 22nd, 2016 02:30 pm (UTC)
Yet one excerpt
""Mathematicians, or people who have very mathematical minds, are often led astray when “studying” physics because they lose sight of the physics. They say: “Look, these differential equations—the Maxwell equations—are all there is to electrodynamics; it is admitted by the physicists that there is nothing which is not contained in the equations. The equations are complicated, but after all they are only mathematical equations and if I understand them mathematically inside out, I will understand the physics inside out.” Only it doesn’t work that way. Mathematicians who study physics with that point of view—and there have been many of them—usually make little contribution to physics and, in fact, little to mathematics. They fail because the actual physical situations in the real world are so complicated that it is necessary to have a much broader understanding of the equations.
What it means really to understand an equation—that is, in more than a strictly mathematical sense—was described by Dirac.""

The Feynman Lectures on Physics, Vol.2
Differential Calculus of Vector Fields
2-1

PS Try substitute "physics" with "programming" ;)
журнал закрытjuan_gandhi on August 22nd, 2016 03:45 pm (UTC)
Re: Yet one excerpt
Oh. My typical error. I did not read his physics books. But yes, that's my mistake.

Note though that I have noticed it - that all this theory does not exactly work in programming; and more, that our logic does not exactly work.
Dennis Gorelikdennisgorelik on August 22nd, 2016 03:52 pm (UTC)
Re: Yet one excerpt
I think Feynman's observation about logical fallacy in "if I understand them mathematically inside out, I will understand the physics inside out." -- would still be correct if we replace "physics" with "programming".

Math only provides a partial model of the more practical sciences.
If you limit yourself to that partial model - you would not be able to solve more complex problems neither in physics nor in programming.
Re: Yet one excerpt - juan_gandhi on August 22nd, 2016 04:18 pm (UTC) (Expand)
Re: Yet one excerpt - dennisgorelik on August 22nd, 2016 04:24 pm (UTC) (Expand)
Re: Yet one excerpt - gineer on August 23rd, 2016 05:03 am (UTC) (Expand)
Re: Yet one excerpt - gineer on August 23rd, 2016 04:57 am (UTC) (Expand)
gineergineer on August 23rd, 2016 04:51 am (UTC)
Re: Yet one excerpt
\\Oh. My typical error. I did not read his physics books.

In such cases my answer -- in today world its impossible to read all books.
Even all famous and recomended one.
Though I have my share of his lections... even almost two copies. %)


\\that all this theory does not exactly work in programming;

You mean FP. Yes, I'm kinda saw it.
But you have blinde spot of your own -- related to Levenchuk. ;)
His work is quite related to physics (and programming)
and complicated in a sence mentioned in that excerpt.
But you tend to dismiss his trials.

\\and more, that our logic does not exactly work.

Yeah... we like our logic.
But what if in this Universe its not logic what counts, but casuality only.
I see support for this in my AI studies -- that we, as we is, could not exist in a world of pure logic.

PS One of last posts of schkrobious looks interesting in this sence.
gineergineer on August 18th, 2016 08:31 am (UTC)
Script
Near future (with microbio and nanotech thingies).

People as always swarming in skyscrapers.
So in one of passages of one of skyscreper tall and manly man bumped (just so-so) into little office women.
Apologised, of course.
But She becomes rebelous and stated need of police intervention.
He smugly agreed and they come to closest justice terminal (its future you see, people have no need to appoint meeting at lawers offices and\or come to judges).
There he take initiative in his hands and start asking police robot to take stream from public camera from the place of bumping, make reconstruction of collision and deduse possible harm... (its THAT future, you see ;) geeks rulez here %) )
But suddenly comp stopped nice flow of his self defense and shows picture somewhere from social networks where he showed with the bunch of "scum of society"-antifeminists.

Level of accusations bumped higher.

Our hero noticing that police women at close police desc become interested in situaton.
And start thinking that its some "Women Power" movement ploy.
So, he decides to rise stakes and asks police comp:
"Disclosure my health record. Show that in time when that nusty trick from that bunch of fellows occure, I was at hospital. And was at state of narcosis after operation".
And also, he came in rage.
Start demending from comp to fixate, show and add to the case records of Who? and How? intervened into it (thinking that it might be that police women at hand).
Also, he noticed that time come to change shifts
and instead of a police women come two guys.
And feel more confidently: "Eat it, vagina-americans!".

But then suddenly police comp rises alarm "Fraud! Fraud!".

That polise guys takes out their guns.
While comp diclares the reason -- from somewhere came (sound only) transmission from our hero's name,
that unknown person stealed his belongins and IDs, and spreyed him into face something like acid, so he lost his authentic voice.
And really, voice sounds quite distorted.
Almost like comp-simulated one.

Heat rises.

But our guy is law-abiding one.
So he listen to cops demand and silently go to nearby detention zone (just plain in-building corner, where prisoners separated from outer space with rising bullet-proof glass wall).
But.
Our character are not from small potatoes. ;)
He peeks from his case special device -- omni-view fisheyed camera with connect to justice network,
throws it on the floor to activete
and states that here is some injustice take place,
so he demends attention of higher autorities to this crime...

But... camera-device scriches error message -- network connections from inside this detention box ARE impossible... so it start working in standalone recording mode only.

And... outside of the glass... instead of policemans on guard of this box... comes armed droids.

(and that's (not) all... at all... its just the beginning... folks ;) )