Showing 69 to 72

Running R in NixOS

In Nix and Guix, you can't install R packages with an R command like install_github() or install_git(), because they attempt to write to /nix/store/...-r-remotes-2.0.2/library. Nothing is allowed to write to /nix/store.

To make it work, add a lib= parameter pointing to a folder of your own:

remotes::install_git("https://github.com/rmcelreath/rethinking.git", lib="~/R/library")

What links here

  • Nix
  • Never kill a buffer
Created (6 years ago)

Book: What Is This Thing Called Science?

Mentioned concepts

Experiments

Inductivismđź”—

A good inductive argument (page 56):

  1. The amount of observations must be large
  2. The observations must be repeated under different circumstances
  3. No valid observation may conflict with the "induced" law

Falsificationism

  • Limitations
  • Relative falsifiability
  • New predictions
  • Criticism

Confirmation also occurs

Collision between Popper and the Wien circle (Logical positivists): the latter made theories that covered everything and could not be falsified, which made Popper suspicious. He drew from the case of when Eddington in 1919 confirmed Einstein's risky prediction that light turns in curved space, progress that could only occur because the prediction was falsifiable – and because the prediction existed in the first place, the theory didn't only explain previously made observations.

  • Problem: Theories that cover everything, cannot be falsified, are not useful.
  • Example: Logical positivsim.
  • Background:
  • Who says this: Popper
  • Opposite: If they were useful, it would have to be that merely stating a theory would make the world act in accordance with it.
  • Similarity: Eddington
  • Implications: Theories should be falsifiable.
  • Solution/Takeaway: The more falsifiable (but not falsified), the more useful.

Not just testable but independently testable.

Theories as structures: Kuhn's paradigm

  • Revolution
  • Normal science
  • Objective knowledge

Theories as structures: Imre Lakatos

  • Methodology
  • Predictions

Feyerabend's anarchistic theory of science

  • Arguments against methods
  • Criticism

Methodical change of methods

  • An universal method
  • Change of norms: preferring study observation over eye observation
  • Stepwise changes

The Bayesian approach

  • Subjective Bayesianism
  • Applications of Bayes' Theorem
  • Criticism

Objective Bayesianism is the attempt to … anyway, it's pointless, but why pointless?

Howson & Urbach 1989 reject that Popperian rejection of ad-hoc theories should be based on a criterion of independent testability: it's not the right reason. They show a simpler way.

They also reject (!) that data used to construct a theory cannot be used to prove the theory! Here's a very interesting viewpoint enabled by Bayes, because they can explain exactly why this error ("Hypothesising After Results Known") is usually an error… and show where it's actually OK.

Neo-experimentalism

  • Experiments with own life??
  • Deborah Mayo
  • Strict experimental tests
  • Learning from mistakes and triggering revolutions
  • In perspective

Faraday's discovery of the electrical engine Hertz' generation of radio waves

These two examples can support antirealism.

Lawful nature

  • Laws as

Realism

Course sessions 2018

Lecture 1

We will know less about what science is at the end of the course than at the start.

Einstein didn't use scientific method, at least by some definitons.

Science didn't really exist before Galileo, but we still count Tycho Brahe as a scientist.

Aristotelian idea: All objects have a natural state that they want to reach. Heavy objects want to go down, heavier objects even more so.

Galileo thought experiment: basket containing ten stones, and a single stone separate. Which of these two objects falls faster? The basket, if heavier, supposedly falls faster. What happens if you tie the eleventh stone to the basket? He arrived to the conclusion that all objects must fall at the same speed.

Experiment with rolling things down an incline so stuff would fall slower and it is easier to compare falling speeds.

Measure time by way of metronome-style clacking on the floor. People (musicians?) can notice an off beat at a resolution of 1/100th second?

Carve lines into the incline so that you can hear when the object rolls over them. This Galileo spent ten years on. He noticed that objects accelerate. The lines had to be further apart to each correspond to a second

Measuring the acceleration: differences in length increased according to some constant.

time 0   1   2   3   4  
length   5   20   45   80   125
diff     15   25   35   40  
constant       10   10   10    

Fibonnaci a guy who researched number sequences.

The constant varied, it wasn't always 10 as you see above. Galileo couldn't understand it, but we know it was measuring error.

We say that Galileo is the godfather of the scientific method because of this process of experimentation.

Cyclic process, the wheel of science:

hypothesis/model/theory -> predictions -> experiment -> interpretation -> new theory

THEORY -> (generalization/abstraction/simplification) -> PREDICTIONS -> (methodology) -> EXPERIMENT -> (generalization) -> INTERPRETATION -> (new concepts) -> THEORY

The most important aspects of all this are:

  • critical examination
  • documentation
  • reproducibility

Galileo started this loop with the theory part. Way before that, Francis Bacon … induction.

In the 1900s, Karl Popper sort of inverted the process, saying you should falsify.

If you visit Florence, you must visit the Galileo museum. Everything's there, his notes and all. Also two of his fingers.

If the Earth moves, why doesn't stuff fall off?

The Pope was friendly with Galileo(?) and he only had tobe in house-arrest rather than go to prison. Recently the Catholic church revoked their guilty sentence, 300 years after the matter.

We will have a lecture later about religion and science.

Can we describe the solar system well with heliocentrism? At the start, we couldn't, because we were still missing some knowledge; it was not better than the geocentric model, just an alternative.

(Github)

Circle. In a two-dimensional world, with 2D lifeforms, circumference divided by diameter was thought to equal pi. But pi is larger the larger the circle(?). This way you can discover that you live on the surface of at 3D object.

Newton, planetary orbits. Jupiter.

Einstein, the time dimension.

Maxwell. Electromagnetism.

We can connect various pieces of knowledge the more we learn.

We generalize between planets. They're made of different stuff but share some properties.

Symmetry important.

New concept to interpret results

Write books to tell the world what you learned rather than keep it to yourself.

Lecture 1 discussion summary

We discussed

  • what is science
  • what is truth?
    • the accepted truth is only the truth in a pragmatic sense: speak of it as if it was known, to simplify our language. Of course we know it's not set in stone and should be ready to abandon the current best theory for any better theory.
  • which part of the wheel of science is most important
    • first, all parts are necessary, of course
    • second, the wheel seems to be missing something, but what?
      • when to publish?
      • what to do when no experiment is possible?
      • the wheel may not be well-suited to social sciences
    • some thought that experiment was most important, some interpretation, some (me) prediction.
      • notably, noone said theory was most important, but i suppose this might be on account of theory, as compared to practice, being unfashionable lately (amongst the sorts of people taking this course)
    • after the discussion, I got the idea that prediction and interpretation are the hardest parts – theory and experiment are easy – so the former take all the work.

Lecture 2

Life as a topic for science

  • Important steps in the physical and logical understanding of life
  • Complement to Chalmers book
  • Not the history of biology
  • Personal interpretation
  • Seven dead white men

Genetics. Bengt started with mathematical logic before getting into biology.

Rene Descartes

  • Book: Discours de la methode (1637)
  • The organism as a machine
  • The laws of optics and mechanics hold
  • Important cost - but greater gain
  • Animals have no soul
    • Basically said that non-human entities are p-zombies and cannot suffer

The heart is a pump, fulfiling an exact mechanical function.

Carl von Linne

  • Systema naturae
  • Complete, consistent and hierarchic classification
  • Reactions in Paris
  • Can systematizing be scientific?
  • Yes, if open for revisions

"I, Carl, shall describe everything"

Three kingdoms: Rocks, plants, animals. Classify every object that exists, not just life. Stuff not to be in two kingdoms at once.

Never visited tropical areas. Did not know how rich biodiversity was.

Reactions mixed. Old-school to want to "put everything in boxes". Others adulated him.

The whole world celebrates Linnaeus.

Is systematizing really good science? Sure, if it's open for revisions, because you can learn about little-known members by inferring from the class they belong to. Also he revised his own work multiple times.

Whale? He never saw one. But it was found they belonged better in mammals, so Linnaeus moved them there.

Jean-Baptiste de Lamarck

  • Histoire naturelle des animaux sans vertebres
  • Delimits and defines biology
  • Opens up for physiology, genetics, etc
  • And for evolution

Military service. Accident? Quit.

French Revolution -> King died.

Monument of Lamarck at Botaniska tradgarden.

"Everything we know about plants and animals shall be a science. I shall name it biology."

All living things share some attributes. Metal doesn't share anything with us. Living things change over time, grow and die.

Charles Darwin

  • On the Origin of Species (1859)
  • Rejects teleology
  • Introduces historical dynamics in biology (compare Laplace on solar systems 1796)
  • A new way to argue scientifically

Captain of the boat couldn't talk to anyone else aboard because they were too low-class. So he brought Darwin as a gentleman of the higher strata to talk to.

Darwin's book is a lot more fun than e.g. Newton's book. The first edition particularly didn't have the degree of vagueness ("if, maybe, maybe not") that was later added.

Life's not truly cyclic like Newton said. It slowly, slowly changes.

First summary

  • The basis for a scientific biology is now in place: delimited, and with mechanics as well as dynamics
  • Aristotle is finally dead (though perhaps the greatest "biologist" of all!) – no more talk about "inner vital forces"
  • Now for two different but similar advances, both from experimentalists.

Claude Bernard

  • Intr. a l'etude de la medicine expeirmentale
  • Organisms consist of relatively independent subsystems
  • Disease = non-normal physiology in some subsystem

Cut open a live dog to see how food made its way through the digestive tract.

Observed that if you take out an organ you can clearly see that it's an indepndent system.

Erwin Schrodinger

  • What is life? 1944
  • Question of entropy
  • Life = retained order
  • Order is upheld by information (memory) plus energy
  • Life stabilizes itself, far from any thermodynamical equilibrium

Why the goatee fashionable through the centuries?

Building block of life must be terribly complicated. Protein discovered, must be it! Not quite correct, actually DNA, but he had the right idea.

Life retains order: when entropy increases e.g. a room gets more chaotic, you clean up, put stuff in their proper place. Everything you do, such as standing straight, is an instance of reversing entropy.

When you die, you no longer reverse entropy. Come back to your corpse in three weeks and it smells: entropy has done its work, which was blocked while you were alive.

Universal entropy is universal deadness.

The Enigma machine. How to use the concept of entropy to decode messages.

Other important results

  • All life is cellular (modular)
  • No current ongoing creation of life
  • Photosynthesis and nitrogen fixation
  • The details of sexual reproduction
  • The complementary structure of DNA
  • All life functions basically the same – "The Central Dogma"

Final summary

  • Life is not any longer a deep problem for physico-logical scientific analysis
  • There are, however, still plenty of interesting problems. For example: How do complex organisms manage with such few genes?

We used to think we had 4 million genes, then 400 000, then 70 000, now 22 000. Homework: is 22 000 genes enough to explain us?

A computer can do very complicated stuff, but is built on basic principles.

Next lecture: think of starting to meet researchers. Also he will talk about philosophical happenings in his life, not educate so much.

Lecture 3

E-mail about interview check

Philosophy in the life of a scientist

Philosophy in my scientific life

  • should function as tart for your interviews
  • should present philosophical ideas about science that differs from Chalmers
  • [my background, compared to Chalmers]

I studied math here at the university. Not good enough at it. Studied philosophy.

Work in science, quit studying philosophy. That's one explanation.

Or studying philosophy leads to science.

Or (3) I don't know. Philosophy is almost like air, no plan on how to use it.

one can haven't analyzed self, simply be told you affecte by this philosopher or other

Chalmers physicist. Grew from Chalmers. Chalmers classic philosophyer, me traditional(?) First edition best, got worse. I'm a bit against him

Two philosophical themes

The many ways by which we know things

  • Popper
  • Kuhn
  • Bachelard
  • [Feyerabned]

Falsifiction is fine but a too limtied idea

  • Question: What is the logical structure of scientific advances?
  • K Popper 1959
  • Before I started doing research, I found this an interesting quistion
  • Very limited and rare practical use
  • But the pep's fine: Be brave in your research!

I listened to Popper speak myself. Hard to remember the how of Popperism(?) after a few weeks. Popper just wanted to provoke(?) and made a complicated philosophy influenced by the physics of the 40s.

So, done with school, but at practical science I Was unexperienced. Then found could not use Popper ideas in practice. Looking at chromosomes.

One thing I still liked in his book: the pep. The encouragement to be bold!

The practical use of deductions

  • Question: How can thought experiments produce knowledge about the real world?
  • T. Kuhn 1977 A function for thoughts experiments, The Essential Tension: Selected Studies in Scientific Tradition and Change
  • Thought experiments help check model assumptions., i.e. our way of seeing the world
  • More pep: Normal science can be great fun!

How math equations can help us understand how nature avoids inbreeding? I wrote a big article on it.

Shcrodinger's cat, Maxwell's demon

Box containing molecules bopping around . A small demon blocking a hole unless particle fast enough.

Why thought experiment good? We can reason about what happens then if only fast particles exit.

Understanding Population Genetics refers to Kuhn a lot. So we can translate our wrok with Kuhn for use in other fields.

The strength of "non-theorizing"

  • Question: is science an improved form of everyday life understanding?
  • G Bachelard 1940 La philosophie du non Famous book, read well otgether with Kuhn
  • Doing science means being abstract – science is not about tackling what is self-evident
  • Great intellectual gains have come from "non-theorizing", non-Euclidean geometry, non-Newtonian mechanics and non-Mendelian inheritance

Linne's ystematizing was science?

The heart is just a pump, like we said last week. Abstract knowledge

Einstein like a special case of Newtonian physics, but still non-Newtonian.

The Selfish Gene a kind of non-Mendelian inheritance. We undestand Mendel much better if we can understand if he's wrong. When I did work on that I understood La philosophie du non

A side-issue Scientific richness doesn't flow from anarchy

  • Question: is science restricted by tradition and is anarchy the solution to this danger?
  • P Feyerabend 1975 Against Method
  • I find this an uninteresting argument
  • To me, natural science is similar to crafts requiring tadition and apprenticeship (see Bourdieu's theory of habitus)
  • there is no lack of creativity in science

Science is a craft, you learn from masters. Anarchy would hardly work

But "stupidity" and moral defeat threatens everywhere and all the time! Racial biology, oppression.

The many ways by wich we fool oirselves

  • Bacon
  • Lakatos
  • Wittgenstein
  • de Beauvoir

We must understand why science can be so stupid

  • Why is stupiditiy e.g. race biology so common in science/among scientists?
  • Francis bacon 1620 Novum Organum
  • Four idols - sources of mistakes in thinking
  • Among which are comon beliefs and standard modes of language – inescapable!
  • for me: "increasing raitonality" is easy and fun; "not being stupid" is difficulty and problematic

implicitly accepted truths (e.g. white men best) affects your science.

Anti-philosophy is sometimes needed

  • Question: can tinking in itself be harful n lead to stupidity?
  • Wittgenstein 1953
  • Sometimes we become ensnared in the presumed meanings of words
  • Then – be brave and stop philosophizing!
  • Perhaps you should do something instead?

Quarks

A science's hard core is close to being an ideology

  • Question: where in science does stupdiity enter?
  • I Lakatos 1970 Falsification and the methodlogy of scientific research programmes
  • Should be read as a philosopher in his own right
  • His description of research programmes is interesting - and devastating
  • There is hardly any difference between an old well-defended research program and an ideology

"I am like Popper but better".

When we ask research grants we must make a research program, why, what. A framework.

A protected pool of beliefs, e.g. the world wasn't created yesteray, and we can expect to put one foot in front of the other. Stuff taken for given. If a student says he's shown Mendel is wrong I'll invite him for a coffee and go over his argument, expecting him to be wrong.

It's like an ideology. The protected pool of beliefs needs not be questioned.

Knowing something doesn't explain everything

  • Which is the most common type of stupidity?
  • Simone de Beauvoir 1949 Le deuxieme sexe
  • Argument: being a woman is different. But not so different that it explains and legitimizes being excluded from voting rights, for example.
  • The most common source of scientific stupidity is lack of feeling for effect size; then comes the fetishism of significant differences

Meet Sartre. Good friendship. Bogth existentialists and write novels and philosophy. Her book not easy to read but easier than Sartre.

S de B didn't like having the menses, worrying about pregnacny being weaker than men etc. Didn't get children.

Tiny difference proven with three sigma. So?

A gene affecting schizo, or aclcoholism or whatever. Stat. significance? Ok?

To conclude: what is philisophy good for in science?

Chalmers's key paragraph Kuhn's account of scientific progress contains two incompatible strands, one relativirst and one not. This opens up two possibilities. The first is to follow the path taken by the scoilogists … to embrace and develop the reltivist strand in Kuhns thought .. The second alternative is to rwerite Kuhn in a way that is compatible with some overarching sense of progress in science.

Philosophizing science

Chalmers (easy): A good theory of science helps ensure thar rationality is increased

My alt (more difficult): Reflecting (in a wider context) on how scinece is done and what sicencei s used for may improve the moral/ethical/political qualities of the endeavour

Lecture 3 discussion

  • Did we hear ideas that differ from Chalmers?
  • Philosophy tend to lead you to science?

    • Professorn pratade ocksĂĄ om att filosofi lockar en person till forskning eller om det bara är löst kul och att man slutar med filosofi när man börjar forska.

    Hur brukar det vara?

    • Hur mĂĄnga av er tror att ni kommer sluta tänka pĂĄ vetenskapliga metoden när ni börjar forska?
  • The ways we know things
    • When he started practical research he found Popperianism limited use.
    • Thought experiments inform us about world?
    • What is "Non-theorizing"
  • The ways we fool ourselves
    • Do you feel that researchers do too much philosophy or too little?
    • What is common form of stupidity
    • Why is stupidity so common, [How did we arrive at race biology paradigm?]
    • The protected pool of beliefs we take for given - is it comparable to an ideology?
  • What is philosophy good for in science?

viktigt att veta vad man kan härleda. vetensakp är inte retorikmaterial.

Science court -> vaccin inte autism

we use some big theories with many suppositions and when falsified we cant throw away the whole theory cant falsify big theory with many suppositions

"a theory isnt stupid, it isnt intelligent" – sure but we consider old discarded theories stupid . Why? Because (1) hindsight bias and (2) maybe we feel like the old scientists could have done better. Applied more Bayesian rigor in selecting a theory to run with. Or seen immediately its flaws.

Lecture 4

ask guy how to friday

c a r

Nobel Prize winners often have multiple Nobel Prize winning students. This means we don't understand fully what makes a great scientist great. Some aspects are passed down from master to student. It could be advice like how to know which hypothesis to bother testing, which Science doesn't normally say anything about. And this is where Bayesian reasoning comes into play. You can guess which hypotheses are likely to be a waste of time before testing them, thru Bayesian reasoning. Thus instead of wasting ten years on a worthless hypothesis you could spend your effort where you rationally can expect great success.

why intrprtr lw

I take it as ethics.

(Questions to coursemates)

  • Linnea(?) how come she can recall particular studies like the Waveley whatshisface vaccine thing

Course sessions 2021

Apr 1

Galileo: Dropping things off the tower of Pisa, probably apocryphal story, but he did it as a thought experiment.

Moon landing experiment of dropping things. See on YouTube

Rolled balls of varying mass down inclined planes. Noted that the distance travelled grows with time squared (acceleration). These experiments took him many years!

There were no stopwatches in that time, so how did Galileo time it? With his lute as an incline, he put bells as gates for the ball to break through. Then spacing the bells increasingly distant so that the chiming sounds became equidistant.

Aristotelian physics: Stuff contains water, earth, air and fire. The more an object contains one of these, the faster its motion will be.

If A is the cause (force that moves an object), B the moved object (mass), C the path and D the duration, then

  • A will move B/2 the distance 2C in the time D
  • A will move B/2 the distance C in the time D/2
  • A will move B the distance C/2 in the time D/2
  • A/2 will move B/2 the distance C in the time D

How would I summarize LessWrong in an essay?

Aristotelian physics was destructible by a thought experiment, simply logic!

  • take a small mass m and large mass M
  • Aristotle: t(M) < t(m)
  • let us tie them together such that t(m + M) < t(M)
  • but m will slow down M, so also t(m + M) > t(M)
  • only resolution is t(m + M) = t(M)

Though if I was Aristotelian I would say that objects tied together make one object, so a lighter object wouldn't slow down the heavier, but be added to the total mass.

Even Copernicus had to add epicycles as he considered circular movement.

Galileo writes his books in a particular way. He uses three recurring characters carrying on a dialogue. Simplicio, Salviati, Sacretto? The last one's name means nothing and rarely shows up, but he represents some kind of philosopher.

  • Newton introduces the force as an underlying cause of fmovement
  • Given a force, one cam compute where things move, and how fast
  • He also wrote down the gravitational force between two masses
  • Combine the two, and find the planetary motions: Kepler's laws
  • Unification of two different physical problems!
    • Domains as everyday stones and balls were unified with that of planets
  • Unification is an important feature of modern physics

Popper

  • For something to be scientific, it must be able eto be proven false.
  • Make bold predictions, which can be falsified
  • Easy to apply on some examples
  • Duhem-Quine: impossible to isolate a scientific hypothesis.

Following Newton, scientific progress was plentiful. Maxwell's equations integrated Gauss, Coulomb, Orsted, Ampere, Faraday. But then Einstein showed that Maxwell's equations incompatible with Newton. Fortunately, Einstein replaced Newton. Something called action-at-a-distance.

Galileo some thoughe eexperiment with boats. Einstein did same, with a twist. Motivated by Maxwell, speed of light is invariant. Instead the solution was that time could pass differently in different places.

Without relativity theory, GPS would not work.

Kuhn's paradigms are a good model for understanding. Identify:

  • pre-science
  • anomaly
  • crisis
  • paradigm change

[a cyclic image]

Diff paradigms are incommensurable.

Kuhn and Popper provide a good language to talk about science.

Hur teckna vetenskaplig kunskap? Nya tecken for vetenskap?

  • Did Einstein falsify Galileo and Newton?
  • Not in the esame way as the Copernican Revolution and G falsified heliocentrism
  • [a different cyclic image]

Apr 8

Descartes

Discours de la methode 1637

  • The organism as a machine
    • Heart is a pump, no quintessential Platonic "heart thing"
      • Not "like" or "as if" a pump but exactly what you'd expect of a pump and nothing more
    • Hold up an ox eye to the window and see light diffracting thru the lens
  • The laws of optics and mechanics hold
  • Important cost - but greater gain
  • Animals have no soul
    • You kick a dog and it barks, this is an automatic reflex as befits a machine. It does not feel pain because pain is in the realm of souls, and dogs don't have souls.
      • Descartes did not have any pets growing up.

Maybe afraid after what he heard happen to Galileo [imprisonment], so did not publish book, but small texts at a time. Living in Holland for safety.

Died in Sweden after lung inflammation due to the cold.

Carl von Linne

  • Systema naturae 1735
  • Complete consistent and hierarchic classification
  • Reactions in Paris
  • Can systematizing be scientific?
  • Yes - if ready for revisions

Went to Lund University in the 1720s. Was a shitty place, war had been happening, poverty, pigs in the streets.

Whales are mammals, not fish, even though they suit heuristics like "must live in the sea cannot live on land" and "have fins".

Lamarck

  • Histoire naturelle des animaux sans vertebres 1815
  • Delimits and defines biology
  • Opens up for physiology, genetics, etc
  • And for evolution

Quote: "… it has no name but I want to name it biology". Stones are not living things, little in common with living things.

Charles Darwin

  • On the Origin of Species 1859
  • Rejects teleology
  • Introduces historical dynamics in biology (compare Laplace solar systems 1796)
  • … and a new mode to argue scientifically
    • Was he a scientist?

Not just looking at animals or digging up fossils, loved geology, looked at atolls and their shapes.

Very nicely written first edition. Not long. Lecturer recommended that we read it, no comments or reflection, just one simple read-thru. (I've heard this about Einstein's relativity paper too).

First summary

  • The basis for a sci biology is now in place: deliminted, and with mechanics as well as dynamics
  • Aristotle finally dead - no more talk about innere vital forces
  • Now for two diff but similar advances, both from experimentalists

Claude Bernard

  • Intr a letude de la medicine experimentale 1865
  • Organisms consists of relatively independent subsystems
  • Disease = nonnormal physiology in some subsystem

Gregor Mendel

  • Versuche uber Pflanzenhybriden 1866; Mendelism from 1900
  • Complex arguments from experiments
  • Organism traits are inherited as fixed and separate units

TLDR on this man, the way Harry taught Draco?

Second summary

  • The indiv organism at the centre of life eis now dissolved - Goethe would have hated this
  • The road towards biochemical reductionism has started
  • But one important step in this story remains, clearly belonging to physics

Erwin Schrodinger

  • What is life? 1944
  • Question of entropy
  • Life = retained order
  • Order is upheld by info (entropy) plus energy
  • Life stabilizes itself, far from any thermodynamic equiblirium

In 1937 or so he, despite not being a jew, decided he can't put up with the nazi party shenanigans anymore and left. To england?

Other important results

  • All life is modular/cellular
  • No current ongoing creation of life
  • Sexual reproduction in eukaryotes
  • Photosynthesis and nitrogen fixation
  • The complementary structure of DNA
  • Central Dogma of molecular biology

Summary

  • Life no longer a deep problem for physico-logical sci analysis
  • Thehre are however still plenty of interesting problems. For example: How do complex organisms manage with such few genes?

Conclusion

  • Science starts as a characteristic way of looking at the world
  • Theories and scientific methods come later to biology than to physics
  • It is necessary to mix discussions of science's rationality with studies of science as an actual phenomenon

Apr 15

Philosophy in my life as a scientist

Purpose of lecture

  • Should function as a start for your interviews
  • Present a practitioner's view on philosophical ideas about science, thereby complement the book

Falsification is fine but a much too limited prescript

  • Q: What is the logic behind science?
  • Popper 1959
  • Before I started to do research, I found this an interesting question
  • Now I find it limited and of little practical use
  • But the pep is fine: Be brave in your research!

Practical use of deductions

  • Q: How can thought experiments often relying on math deductions produce knowledge about the real world?
  • Kuhn 1977. A function for thought experiments. In The Essential Tension
  • Thought experiments help check model assumptions, ie our way of seeing the world

richness deosn't flow from anarchy

  • Q: is science restricted by tradition, and is anarchy the solution to this danger?
  • Feyerabend 1975
  • Found this an uninteresting argument
  • To me, natural sciences like crafts, tehy require tradition and apprenticeship
  • Also: problems in science (e.g. race biology) do not arise from any lack of creativity

The strength of "non-theorizing"

  • Q: is science an improved form of everyday understanding?
  • Bachelard 1940. La philosophie du non
  • No! Doing science means being abstract – science is not about tackling what is self-evident
  • Great intell gains have been won from "non-theorizing", e.g. non-Euclidean geometry, non-Newtonian physics and non-Mendelian genetics

A science's hard core is close to being an ideology

  • Q: Can theories actually be misleading?
  • Imr lakatos 1970. Falsification and the methodology of scientific research programmes
  • Should be read as a philosopher in his own right
  • Yes, research programs have protected cores - which may become problematic problematic in the long run
  • Degenerating research programs are similar to ideologies in being unperturbable

Knowing something doesn't explain everything

  • Q: Can scientific results be misleading?
  • Beauvoir 1949
  • Argument: Yes, being a woman is diff. but not so diff that it explains and legeitimzes being excluded from, for example, voting rights
  • Prejudices also inside science ("spontaneous philosophies") may influence the interpretation of results – distort the effect size, for example!

On knowing things

  • Popper
  • Bacon

On fooling ourselves

  • Beauvoir

Bacon: KNowledge and errors

  • Task of science is to release the world from faulty thinking (compare Galilelo, Descartes)
  • Bacon 1620, Novum ORganum
  • There are Idols i.e. sources of errors in thinking
  • Bacon: Discuss the hidden sources to mislead, as well as the best methods for doing science!
  • I agree – and write on the relation between scientific genetics and political ideologies

I studied math here at the university. Not good enough at it. Studied philosophy.

Work in science, quit studying philosophy. That's one explanation.

Or studying philosophy leads to science.

Or (3) I don't know. Philosophy is almost like air, no plan on how to use it.

one can haven't analyzed self, simply be told you affecte by this philosopher or other

Chalmers physicist. Grew from Chalmers. Chalmers classic philosophyer, me traditional(?) First edition best, got worse. I'm a bit against him

Two philosophical themes

The many ways by which we know things

  • Popper
  • Kuhn
  • Bachelard
  • [Feyerabned]

Falsifiction is fine but a too limtied idea

  • Question: What is the logical structure of scientific advances?
  • K Popper 1959
  • Before I started doing research, I found this an interesting quistion
  • Very limited and rare practical use
  • But the pep's fine: Be brave in your research!

I listened to Popper speak myself. Hard to remember the how of Popperism(?) after a few weeks. Popper just wanted to provoke(?) and made a complicated philosophy influenced by the physics of the 40s.

So, done with school, but at practical science I Was unexperienced. Then found could not use Popper ideas in practice. Looking at chromosomes.

One thing I still liked in his book: the pep. The encouragement to be bold!

The practical use of deductions

  • Question: How can thought experiments produce knowledge about the real world?
  • T. Kuhn 1977 A function for thoughts experiments, The Essential Tension: Selected Studies in Scientific Tradition and Change
  • Thought experiments help check model assumptions., i.e. our way of seeing the world
  • More pep: Normal science can be great fun!

How math equations can help us understand how nature avoids inbreeding? I wrote a big article on it.

Shcrodinger's cat, Maxwell's demon

Box containing molecules bopping around . A small demon blocking a hole unless particle fast enough.

Why thought experiment good? We can reason about what happens then if only fast particles exit.

Understanding Population Genetics refers to Kuhn a lot. So we can translate our wrok with Kuhn for use in other fields.

The strength of "non-theorizing"

  • Question: is science an improved form of everyday life understanding?
  • G Bachelard 1940 La philosophie du non Famous book, read well otgether with Kuhn
  • Doing science means being abstract – science is not about tackling what is self-evident
  • Great intellectual gains have come from "non-theorizing", non-Euclidean geometry, non-Newtonian mechanics and non-Mendelian inheritance

Linne's ystematizing was science?

The heart is just a pump, like we said last week. Abstract knowledge

Einstein like a special case of Newtonian physics, but still non-Newtonian.

The Selfish Gene a kind of non-Mendelian inheritance. We undestand Mendel much better if we can understand if he's wrong. When I did work on that I understood La philosophie du non

A side-issue Scientific richness doesn't flow from anarchy

  • Question: is science restricted by tradition and is anarchy the solution to this danger?
  • P Feyerabend 1975 Against Method
  • I find this an uninteresting argument
  • To me, natural science is similar to crafts requiring tadition and apprenticeship (see Bourdieu's theory of habitus)
  • there is no lack of creativity in science

Science is a craft, you learn from masters. Anarchy would hardly work

But "stupidity" and moral defeat threatens everywhere and all the time! Racial biology, oppression.

The many ways by wich we fool oirselves

  • Bacon
  • Lakatos
  • Wittgenstein
  • de Beauvoir

We must understand why science can be so stupid

  • Why is stupiditiy e.g. race biology so common in science/among scientists?
  • Francis bacon 1620 Novum Organum
  • Four idols - sources of mistakes in thinking
  • Among which are comon beliefs and standard modes of language – inescapable!
  • for me: "increasing raitonality" is easy and fun; "not being stupid" is difficulty and problematic

implicitly accepted truths (e.g. white men best) affects your science.

Anti-philosophy is sometimes needed

  • Question: can tinking in itself be harful n lead to stupidity?
  • Wittgenstein 1953
  • Sometimes we become ensnared in the presumed meanings of words
  • Then – be brave and stop philosophizing!
  • Perhaps you should do something instead?

Quarks

A science's hard core is close to being an ideology

  • Question: where in science does stupdiity enter?
  • I Lakatos 1970 Falsification and the methodlogy of scientific research programmes
  • Should be read as a philosopher in his own right
  • His description of research programmes is interesting - and devastating
  • There is hardly any difference between an old well-defended research program and an ideology

"I am like Popper but better".

When we ask research grants we must make a research program, why, what. A framework.

A protected pool of beliefs, e.g. the world wasn't created yesteray, and we can expect to put one foot in front of the other. Stuff taken for given. If a student says he's shown Mendel is wrong I'll invite him for a coffee and go over his argument, expecting him to be wrong.

It's like an ideology. The protected pool of beliefs needs not be questioned.

Knowing something doesn't explain everything

  • Which is the most common type of stupidity?
  • Simone de Beauvoir 1949 Le deuxieme sexe
  • Argument: being a woman is different. But not so different that it explains and legitimizes being excluded from voting rights, for example.
  • The most common source of scientific stupidity is lack of feeling for effect size; then comes the fetishism of significant differences

Meet Sartre. Good friendship. Bogth existentialists and write novels and philosophy. Her book not easy to read but easier than Sartre.

S de B didn't like having the menses, worrying about pregnacny being weaker than men etc. Didn't get children.

Tiny difference proven with three sigma. So?

A gene affecting schizo, or aclcoholism or whatever. Stat. significance? Ok?

To conclude: what is philisophy good for in science?

Chalmers's key paragraph Kuhn's account of scientific progress contains two incompatible strands, one relativirst and one not. This opens up two possibilities. The first is to follow the path taken by the scoilogists … to embrace and develop the reltivist strand in Kuhns thought .. The second alternative is to rwerite Kuhn in a way that is compatible with some overarching sense of progress in science.

Philosophizing science

Chalmers (easy): A good theory of science helps ensure thar rationality is increased

My alt (more difficult): Reflecting (in a wider context) on how scinece is done and what sicencei s used for may improve the moral/ethical/political qualities of the endeavour

Related

Things I believe

Social sciences: subject them to different standards?

Instrumentalism

How does this relate to pragmatism?

What links here

Created (6 years ago)

Graphing should be automatic

If you use a computer to track something for you, like your weight, work time or something else, it easily falls out of your mind. Out of sight, out of mind.

The benefit of using graph paper is that you record and graph in the same step, and are forced to see the graph's development, point by point, day after day. It can't fail.

If I use a computer for this again, I will make sure it automatically pops up an updated graph or report of some kind in my face, every time.

Created (7 years ago)

Excerpts from Sacha Chua's Emacs Chats

#emacs

Emphases mine.

Carsten: The point when I really found out how amazing Emacs is, was when I discovered the calculator.

Sacha: Yes.

Carsten: At the time, I was working in America at another institute. They had this great set up, because this was an institute behind a fence, so everybody who was in there was completely security-approved. Inside, everything basically was easily accessible for everything.

For example, they had a printer queue there. You could just take a document and print it to that queue. At the next morning, this thing would be bound as a book on your table.

Sacha: Wow.

Carsten: Or you could print images to a slide printer, and they would make slides out of it and just put it back on your table. That was really fantastic.

I used that to print a couple of manuals. I was just casually looking at a Calc manual and then printed it. It came back like a pile this size. It was this gigantic book. It totally sucked me in. I took this book and I read it over the weekend, from the first to the last page, the entire book, because I thought it was written so amazing.

Sacha: It's hilarious.

Carsten: Yes. I started reading the code which is amazing. Everybody always says that codes should be documented, it should have lots of comments, it should have documentation things. Well, you would be amazed. I don't know if you have ever looked at the code of Calc. There are no comments in there, there are no documentation strings for most of the functions, but you can still read it. This amazed me so much.

It told me that a person who has enough clarity in their head when writing code, they even can make code readable without putting a lot of extra commands and documentations. So it was really amazing. I totally fell in love with this program and just started studying and using it. I'm using it to this day.

It's such an amazing marriage of two worlds. On the one hand, he has made this –– he started out–actually maybe just a little detour, if you read his introduction toward the manual or to the tutorial, he said that he was just trying to write this in order to find out what – I don't know, whatever it was, 2 to the power of 10 or 32 or so – he couldn't do this on a normal calculator, so he wanted to do this. He chose Emacs Lisp, because he decided this is just an editor extension language, so he would truly hit a wall very soon, and then this project will be over. It never did, apparently.

On the one hand, he implemented this amazing functionality. It's like a poor man's Mathematica. It's of course not as good as Mathematica for complex stuff, but it does 3-D matrix operations, it does some analytic operations, integration, differentiation… All implemented there. And it was written in a time when Emacs didn't even have floating point numbers.

Sacha: Wow.

Carsten: It only had integers. He implemented arbitrary precision integers with lists of numbers and he implemented arbitrary floating points calculation with this thing. Today, I think Calc has not been re-written to make use of the internal floating points. All the floating point operations are actually hand-implemented. It's crazy. There's all this complex stuff in there.

But on the other hand, he keeps the simple calculator interface. If you use Mathematica, for example, then you have to type all these commands. That's just a lot of typing. The commands you're putting in are complex. While with the Calc calculator in Emacs, it's still you press a key and you get an action, just like you have it on a calculator.

You press the logarithmic key, and logarithm will be calculated. In Calc, it's usually two keys. Usually, it's sort of a category key like arithmetic or matrix or so. Then the second key for the command. It's extremely fast.

It has the best way to work with units of numbers. I'm an astronomer so we deal with big numbers and having the right units ready… when I sit here with my students, very often they come with something with an idea or so, and then I just turn around to my Emacs and make a little estimate using the unit calculation facilities. It's really the fastest and best way to do this. I totally love this.

I have an iPad. The one reason why I hate is that I cannot have Emacs on it just for the calculator. This is how good this program is. It's amazing. I always have the feeling it's not known well enough. This is why I use this chance to make a big advertisement for it, because it's an amazing program. It's really mind-blowing.

Carsten: Yes. Magit is really good. It's also because of the integration with the change log entry creation and stuff like this. That actually that may be interesting. If you write an Emacs package will be part of Emacs, Emacs of course requires you to produce changelog entries in the right form at hand. So you have this special changelog file which you have to do. For really a number of years, we basically had to do double bookkeeping in Org Mode because we had a version…

Sacha: Yes. I heard about that recent mix, the recent shift.

Carsten: We had a versioning system, and then we are still keeping all these changelogs. Even worse, when it came towards release time, I would actually go through and look at all the changes, and then sort of more or less by hand, produce all those changelog entries. Sometimes I would only produce half and hope that the Emacs maintainer wouldn't notice.

That was really terrible. And the way we do it now is we only use Git. No changelog files. We just enforce that the description of the change in the git commit message has to be formatted in a way that it will work as a changelog entry. And then in the end, at release time, we just have a script which uses Git to extract all the things and put them into a changelog file. This is really a very simple solution but very effective.

Carsten: Yes, that is possible. The table editor, I think, needs a rewrite. I've looked at that code recently because there was a bug report. I wasn't able to fix this bug because it was so convoluted and hard to maintain. There's this one thing which I think is great in Emacs and which I have used too much sometimes. In Emacs, if you have dynamic scoping, you can basically write a let statement and assign a variable, make a variable and assign a new value to it, and then call some other functions. In this way, you change the background in which this other function will work. It's not a parameter which you actually hand to that function, but it changed the background, and then you can make it something crazy. This can be really powerful, but of course, also dangerous, because it reduces maintainability if you use these hidden ways of communicating to another function.

Sacha: It's actually really helpful. I've been using it to study for various tests as well. I used to use Flashcard before. Flashcard.el did that kind of spaced repetition too. The nice thing about Emacs of course is you could hack things around. With flashcard, I'd set it up to show me a fortune cookie every time I got something correct. Then once I had gone through the entire fortune file, I think I had it set up to show me cute pictures of kittens from Cute Overload or something like that.

Carsten: That keeps you motivated.

Sacha: Yes. Emacs is an eminently hackable thing.

Carsten: You know what my prompt is on my terminal window? It's, “Sir?” Like an English butler, it would ask you what to do next. I like this kind of attitude of my computer towards me, to just stand there, and wait, and then do exactly what I want. That's how it should be.

Sacha: It is very tempting to just spend all of that time customizing Emacs and looking at other people's stuff, writing all those little hacks for your packages or whatever. But it pays off because then you don't have to think about it so much. You just work the way that you work.

Carsten: Yes, exactly. There are days where you have to self-censor and stop yourself. But normally, I agree. I just use this stuff in downtime when I couldn't really do something else otherwise anyway.

Sacha: As you said, it's your form of relaxation.

Carsten: It totally is. It's my hobby. Like other people would knit or something like this.

Bastien: Yeah. And somehow I feel like the Emacs is a nice tool for doing small, cheap prototyping. Are you using it for that? If you have something in Ruby that you know is big, do you start prototyping with Emacs with small functions or even for web development with bigger constraints?

Sacha: For personal use, definitely. I have a lot of these scripts that start off as Emacs Lisp functions, because I like being able to use buffers and regular expressions, search forward, and all these other little things. Sometimes I never end up turning them into a shell script or something else. I'll use keyboard macros or write small Emacs functions just to do something. Sometimes if I've got a good idea and it works out, then I'll go and write it up as an actual script that other people can use.

An Emacs-type editor has advantages as an app platform. Creating apps for other platforms takes quite a few man-hours, whereas it does not for Emacs. So if someone comes up with something that hasn't been done in Emacs, it can be recreated by one person in a day. The opposite process has often happened, i.e. ideas start out as Emacs apps, then become apps on other platforms. The creator of Anki first made flashcard.el, which means that Emacs had flashcards very early.

Mickey: What you can also do is C-M-t, which transposes the entire s-expression, and that does it like that, by swapping the s-expressions around. Not terribly useful here, but if you go back and then do M-t, you swap the whole thing. This is one thing that… You can sit down and learn the rules, but I find that just trying to use it over and over again in all kinds of different circumstances until you mentally map it is perhaps easier to do.

I can type C-M-u for control meta up and it jumps to the top. If you then combine it with C-M-k, the control meta kill, you kill the entire s-expression which is bound by the two braces. Now obviously that's quite handy. But if you're at the end of it, you can just type M– like that which is basically negative argument, and then type C-M-k. It's backward.

Mickey: That's right. That's C-SPC which sets the mark and then C-u C-SPC which jumps to the last one.

Sacha: Oh, and you might like–I found this Emacs Lisp snippet, it might have even come from you, I can't remember–but when you get C-u C-SPC and you keep hitting SPC to go back to the previous ones?

Mickey: So if you go to the command… let's see if I can… find-name-dired. What that lets you do is it takes a find command. You give it a starting directory and then you give it a standard globbing pattern. It will go through and it will get all the files that match whatever your find criteria is. Of course there's absolutely nothing stopping you from constructing a more elaborate find query with greater than sizes, and less than, and all that stuff. It basically lets you mark and add all these files in different directories. I just do it with one big unified dired session. That will in many ways replace your standard find and xargs command workflow from the command line. That's very useful.

Mickey: Exactly. But that's what I like about it. It's the fact that you'll bump into someone who may not have been using Emacs all that long. They'll show you a great trick you've never heard about. I find that really useful. That's what I like about Emacs. It's all these little things like being able to combine all these things with Dired, for instance, which is a very powerful paradigm. If you're not a master at using find, well, make slightly wider search criteria and then filter it manually using Emacs's own filtering and search routines and dired, and Bob's your uncle.

This one is useful. This one would insert the buffer file name from another buffer, insert-other-buffer-file-name, which when I run it, I'll give it (using ido) a buffer, and it will give me the full file path.

Sacha: Yes, I can see how that ends up being quite handy, especially if you're in shell.

Mickey: I do use it a lot. Sometimes I might be in the Python shell or something like that. I need to feed a file name to some function that I already have open. Instead of typing it out, I just do it like this. That's primarily what it's for.

Sacha: Re-builder lets you interactively build regular expressions and you can see what it matches and what it doesn't match in your buffer right away. […]

Mickey: Yes. It's great. It doesn't work very well in large buffers. It will actually stop placing the overlays. […] C-w, yes. You type C-c C-w and you paste it, but it will paste a Lisp-friendly version, which is quite handy if you're doing that a lot. So that's useful.

Sacha: Yes. I always end up counting slashes.

Mickey: That's the thing. By default, you can actually have a printout double-slashes so you don't have to do that yourself, which is quite useful.

Phil: The main thing people get tripped up on, I think, is that paredit will refuse to do certain things when it can tell that those operations will result in broken pairing.

Sacha: The number of times I've hit C-q )!

Phil: Right, yeah. It's trying to set you on the right path, so it does that by just making sure that all the operations it does are protected. Every time you insert a paren, you have to insert a matching one. Every time you kill, you can only kill up to the end. Otherwise that would leave your code in an invalid state. As long as you limit yourself to the commands it knows about, it provides this guarantee. C-w (kill-region) is not one of those commands, so you have to train yourself to avoid that. When you use kill-region, you're saying, "No, paredit, I know better than you," which is usually not the case. But once you've internalised that, you end up working on a higher level where you're not thinking in terms of characters any more, but in terms of expressions. You're saying, "I want to kill this whole string or this whole form", not, "I want to kill from this point up to this point". It's higher level commands, I would say. Especially people who are new to Lisp, they think this is so intimidating, seeing all these parentheses everywhere. If you have paredit on, it's… it does take some adaptation, but it's no additional mental overhead for you. You're changing the structure directly.

Christopher: There's a barrier for me to learn new programming languages. This touches on Skewer mode. Before I get into a language, I want to have a workflow set up in Emacs the way I like it. That's how Skewer came about. I need to learn JavaScript and web development, and I need to find some workflow in Emacs to make it work. I looked at swing.js and it didn't quite do what I was looking for. I ended up writing Skewer mode while I learned JavaScript.

Sacha: Let me see if I understand this correctly. You want to learn JavaScript, so you developed something in Emacs that talk interactivity using JavaScript to a browser, ending up writing however many lines of code in JavaScript to communicate with the Emacs process.

Christopher: Yes.

Sacha: In order to learn JavaScript?

Christopher: Yes. It's part of learning. A good exercise too.

Magnar: I think that's the best way of learning Emacs. Sitting down with someone who really knows it and well then you can just ask anytime you're stuck. “How do I save again?” “Well, it's CTRL+X, S, Enter”. And that's it. You don't have to read up or look somewhere else. You can just move on.

Sacha: Wow. It's really helpful to have that kind of side-by-side and also when they're watching you do something, you're doing it the way that you know and they're like, “No, no, no. You do it this way!”

Magnar: Yes, exactly.

Sacha: Keyboard shortcut or some tool. Yes.

Magnar: Yes, that was really fun because at first, or maybe the first week, it was just learning how to do basic stuff. But then we got into a cool game which was … if we did something that wasn't really efficient, we did it in a stupid way, the other one will say, “Hey, you should be doing some macros!” And you have to undo everything that you've done. Undo, undo, undo and do it right. That is a fun game.

Sacha: I think our definition of fun is very weird but it's awesome.

Magnar: Yes.

Karl: This time, I did it better than the first time. This time, I sat down and learned about the basic principles, about the keyboard shortcuts, and how to adapt them and so forth. Not just copy and paste from the Internet, and then wondering why something is broken or something like that. I started to learn about Emacs, and Elisp especially. But I'm not very familiar with Elisp. I still have to learn a lot to understand Elisp code. For the next couple of weeks, I plan to learn how to debug issues I have with Org Mode by myself.

Sacha: Yes. I hear from a lot of people that learning how to customize Emacs through Emacs Lisp is what gets them really into it. You basically started off with trying it out, using it as a basic editor. You spent 10 years or something like that using Vim instead. Then when you found that Org Mode really fit the way that you wanted to view your personal information management, that gave you enough reason to come back into Emacs.

Janis: To learn anything and to complete any large task… For example, when you do hand-drawn animation, you should start with the first frame, and the last frame, and then one in the middle, then one in the middle between those two, and go to the precision you need. So, you can implement this idea in any other area of your life, because you can take an Org file and make simple algorithm with the main things you have to do. Then you can put more points in and more detailed tasks in those points. So you go to the level you need to complete your task.

Janis: Cool. One thing I read something previously, there was a question, some person asked in stack overflow and I bind that into one reference like a joke but which is very true joke. Emacs is the editor which makes you a better person.

Sacha: True.

Janis: It's true and people are writing their answers for him when he asked it. “Oh, will Emacs make me a better programmer?” They're writing, “No, just use the editor which does the job and which makes you very, very comfortable enough.” Yes, in some sense, but Emacs makes you think – and if you think, then you can learn very quickly a lot of software. You can see for example on the net, you are still looking, “Oh, how should it be?” I like how people are watching YouTube videos and they do not read description and asking in the first comment on the top is, “What is the name of the song?” When he could just open the description and view there.

People do not read, they do not look. How do things actually work? They do not look in the world scientifically. It's like people think moon from the Earth is that distant as it is in the book. When you show him it's like eight meters away where the Earth is like a football ball, then they do not understand.

Sacha: Yes. I learned about it through… I think it was Bastien's Emacs Chat also, or one of those. There are all sorts of interesting conveniences in Emacs packages that are hard to come across because there's so many packages now.

Iannis: It's a way to debug actually. For a while, in the beginning it didn't look like it was more pretty. I was also used to writing pretty neat files by using Org Mode. was a bit suspicious about using it. I'm trying to be [inaudible 0:30:42] and after several months of using Org Babel for init file, I still have my doubts.

But then something happened which consolidated it, and that was something strange broke inside the init file. I could use something like tangle buffer - I think it's called, org-tangle-buffer or something like that - to recompile it until I found the very block that was from. It actually stops. It goes with a cursor at the place where the block fails. This, you don't get when you compile a buffer.

I think I've got something over 50 little blocks here, 60, 70 blocks. It's quite a long file. It would have been two hours instead of 15 minutes if I didn't do it in Org Mode Babel.

That absolutely convinced me that this is the way to go. I could go through and it would stop exactly where it had the problem. There is no question, Org Babel is the way to go, especially for init files.

John Kitchin. Very impressive. He's got data animation going on inside Org Mode live, literally, from running Python.

Sacha: Yes. Edebug is so powerful. By the way, if you can't remember C-u C-M-x, it's also the same as M-x edebug-defun.

Bozhidar: Yes and we can quit of course the debugger with q. I think that it's a great tool and more people should be using it. For some reason, it is extremely unknown. Often when I get bug reports on some of my projects, I have to tutor the users quickly how they can instrument and debug that code. I really wish it was a more popular tool.

Find-function is faster than describe-function when what you want is to go look at the source. Bind to C-h C-f or whatever.

One thing that open source has taught me is that you cannot conquer everything by yourself. You have to set the general tone and hope that you get enough traction, enough support. This is the only way to create something great, because nobody can do anything by himself/herself.

Sacha: So tell me about getting that traction. Projectile is quite popular, and Prelude as well. How do you get traction for those? You come up with an idea, you put together something on GitHub, but how do you let people know about it?

Bozhidar: I used to blog about Emacs on my personal blog as well. I guess some people found out about some of the packages there. At some point, the blog was linked to Planet Emacs, which increased the blog posts' popularity. I guess every time I create a new package, I post about it on the Emacs subreddit and in the Google+ Emacs community. I obviously tweet from time to time about the things I'm working on. These are the main communication channels that I use to promote a bit. Sort of.

Sacha: Yes, you do. This is wonderful. In fact this is an excellent opportunity to point out that thing that I noticed right away when I was reading your configuration file off Github. You organize your file with all these functions. Then at the end, you call all the functions, which is an interesting pattern. In the pre-interview, you said that you had strong opinions about this, so please feel free to share your strong opinion.

Harry: Very strong opinions about this. In my day job I write Ruby all day. That's what I do. In the Ruby world, it's considered good practice not to really use comments. Instead, it's suggested that when you have something that wants commenting, you probably have a method that's too long or a class that's too long, and you should probably break that into small parts and give it some kind of useful name. Comments… People often say that comments are just lies waiting to happen.

Sacha: Yes, I can see that.

Harry: Yes. Something will change your code, and you'll forget to change your comment. Now you have this comment which is lying to you. People will try to read your comments to get some sense of your code and it'll be a disaster. If you break this up into small named methods without comments, like treat-camelcase-as-separate-words, that pretty well tells you what that function does, but it also is evaluated. If I change that, then it will throw an error at me. It will call me on it. [Inaudible] because it combines the convenience, it combines the clarity of comments with the certainty that it will never break.

In short, Harry above puts (global-subword-mode) in a function called treat-camelcase-as-separate-words. Maybe not always needed but he prefers this over writing a comment at all. I for one would just call global-subword-mode uncommented, but it's worth realizing that the defuns hardly take space – they are just defuns, and don't add to maintainability burden.

What links here

Created (7 years ago)
Showing 69 to 72