Summarized using AI

Magenta is a Lie - and Other Tales of Abstraction

Konstantin Haase • June 26, 2014 • Singapore • Talk

Title: Magenta is a Lie - and Other Tales of Abstraction

In this talk, Konstantin Haase discusses the concept of abstraction in programming, using the metaphor of the color magenta to illustrate the complexities and implications of abstract thinking in software development. He explores how abstraction serves as a foundational principle in various fields, particularly in computer science, influencing how problems are solved and how code is structured.

Key Points Covered:

  • Definition and Importance of Abstraction:

    Abstraction simplifies complex systems by allowing programmers to focus on high-level processes rather than low-level implementation details. Haase emphasizes that abstraction is fundamental not only to computer science but also across different scientific disciplines.

  • Historical Context:

    He references Christopher Alexander's "A Pattern Language" and the influential book "Design Patterns" by the Gang of Four, which provide frameworks for thinking about design and abstraction in both architecture and programming.

  • Types of Abstractions:

    • Data Abstraction: The importance of structuring data without being overly defined by it, as discussed in influential papers from 1967 on data-less programming.
    • Control Abstraction: The evolution of managing machine instructions, including significant papers such as Dijkstra’s recommendations against the use of the Goto statement, focusing instead on modularization and clear communication between code parts.
  • Object-Oriented Programming (OOP):

    Haase explains how OOP integrates both data and control abstractions, citing Alan Kay's definition of OOP and its significance in programming methodologies.

  • Leaky Abstractions:

    The idea that abstractions can sometimes fail, exposing underlying complexities, exemplified through discussions on color theory and individual perception, particularly in reference to the color magenta, which cannot be represented on the visible spectrum.

  • Security and Abstraction:

    The significance of maintaining abstraction levels in programming and system design to prevent vulnerabilities, with real-world examples of attacks like Heartbleed that exploited assumptions around abstraction.

  • Cultural Perspectives on Color:

    He discusses color perception differences across cultures and species, referencing studies on the Himba tribe in Namibia and the concept of color as a cognitive phenomenon rather than a simple physical property.

Conclusions:
Haase wraps up his talk by reiterating that abstractions are constructs of our minds that enable us to navigate complex systems. The processes of programming, according to him, emphasize shared abstractions that empower innovation and facilitate understanding among developers. He encourages programmers to be mindful of how their chosen abstractions shape their work and the systems they build, promoting thoughtful engagement with abstraction rather than default reliance on it.

Overall, this talk challenges programmers to reconsider their assumptions about abstraction and its role in both their work and the broader context of scientific understanding.

Magenta is a Lie - and Other Tales of Abstraction
Konstantin Haase • June 26, 2014 • Singapore • Talk

Abstraction is a fundamental approach in programming. It shapes how we solve problems, it is a defining factor in how we view the internals of software and even the world surrounding it and us. The questions of when, how and what to abstract are some of the biggest in computer science and can make the difference between good and bad code. This talk is a fresh take on different facets of abstractions we encounter, build on and have to fight with.

Help us caption & translate this video!

http://amara.org/v/FGZK/

Red Dot Ruby Conference 2014

00:00:20.249 hello everybody hello everybody let me
00:00:27.609 be the first one to welcome you all to a Singapore who in here likes raising
00:00:34.030 their hand all right all right who here
00:00:39.340 does not not like raising their hand huh okay I'm here I'm here to talk about
00:00:51.670 magenta and by magenta I do not mean I
00:00:58.589 need to turn this on sorry it's not my clicker bye magenta I do not mean
00:01:05.760 magento I do not mean Magneto I mean
00:01:18.240 magenta or in general all the pink magenta spectrum this talk is a very new
00:01:29.290 thing for me I've never given this talk before I've never talked about anything that's anywhere related to what I'm
00:01:35.650 going to talk about so i'm i'm slightly freaked out a bit about this usually i
00:01:41.650 give very technical talks this torque is very very meta I've not really given a
00:01:48.580 meta talk and it's not just about magenta it is also as you might see from
00:01:55.330 this picture or not about abstraction and I did some research about
00:02:02.770 abstraction I interviewed famous Ruby developers one said too much magic you
00:02:11.410 mean in general it can make a lot of stuff simpler to
00:02:16.540 understand but it can also go too far I did that research during another truck
00:02:23.349 today so play it's for real let's talk
00:02:30.189 about abstraction I think abstraction is
00:02:35.909 a principle that is the basis for science and who doesn't love signs who
00:02:45.879 doesn't love science cool science rocks
00:02:53.099 abstraction is a principle that I think you find in all fields of science one
00:03:00.909 part where this was very inspiring is an architecture an architecture Christopher
00:03:07.359 Alexander published a book a pattern language which is actually the sequel to
00:03:13.949 another book called the Oregon experiment in the 70s which define
00:03:22.269 general-purpose patterns that you can use an architecture that are not bound to a specific type of building that you
00:03:28.750 can use in on small scale he talks about interior design or designing your house
00:03:35.799 or actually designing a district designing a city and this inspired
00:03:42.689 another book you might or might not have heard of that was influential in
00:03:48.780 computer science called design patterns elements of reusable object-oriented
00:03:55.060 software I actually keep forgetting that name because everyone calls it the Gang of Four book it came out in 94 and a
00:04:03.519 defined general purpose design patterns to be used in software development and that for me that's that's what I think
00:04:12.280 of when I speak about abstraction in software development and picking the
00:04:17.739 right abstractions is crucial and in computer science everything as an
00:04:23.289 abstraction everything and less you actually speak about transistors and go on about how the
00:04:30.230 electrons fly in there I mean even that model is an abstraction on some level
00:04:35.570 but when we program we don't really think about the transistors which is what everything in the computer is made
00:04:41.780 of so if you don't know a transistor is basically a not end gate and out of not
00:04:47.300 end gate you can create any other logical gate with which you then can use
00:04:52.730 to build an ALU ALU or anything else that runs in your computer but I guess
00:05:00.940 most of you don't actually think about transistors does anyone actually think
00:05:06.200 about transistors when they write their rails application great that guy okay
00:05:14.420 maybe maybe maybe this is so that is why I talked about abstraction so you might understand this concept that lets you
00:05:20.870 get away from the thinking about transistors and especially in computer
00:05:31.040 science where the abstractions are very abstract and are there right from the
00:05:36.500 beginning maybe in contrast to some other sciences sciences Sarah plural
00:05:44.860 there is a lot a lot of room for interpretation how to interpret such
00:05:51.050 abstractions which abstractions to use and so on which in my view makes it
00:05:56.660 actually very similar to arch and to math and which you could now have this
00:06:05.960 whole discussion where people like to point out that programming is like an
00:06:11.870 art and I think a lot of that stems from the fact that we can choose and express
00:06:17.060 easily with different expressions there are different ways different things we
00:06:24.110 do for abstracting when we program one thing we do is we abstract away
00:06:30.440 semantics we have abstraction levels where we do not think about
00:06:37.729 who this represents I don't know a user in our database and if we abstract that
00:06:44.779 way that allows us to have generic algorithms if you don't know what an
00:06:50.509 algorithm is it's the word used by programmers when they do not want to explain what they do they did anyone
00:07:02.900 know what that is quicksort quicksort
00:07:07.969 yeah is it is quick sort and quicksort does not care what it's sorting as long
00:07:14.180 as it knows how to compare and that's what I mean when I talk about genetic algorithms generally we assume that
00:07:20.659 sorting a list is a solved problem or in every or whatever so we just call dot
00:07:27.349 sort and then on an error and that's abstracted away and sorts everything for
00:07:32.449 us and that is very powerful because we don't need to re-implement the sorting
00:07:37.849 algorithm for our web application there are the types of abstractions there's
00:07:43.370 data abstraction and if you look in the past this was actually a very big debate
00:07:49.339 there was a paper written about this in published in 1967 data less programming
00:07:56.020 that was quite influential there it
00:08:01.459 stated that the big problem we have right now is that when you start a new
00:08:09.529 program the first thing you do is you think about the data structures and then you're bound to these data structures
00:08:15.289 and this might cause big problems later on when you want to change these data structures now we still have these
00:08:22.969 problems kind of when you choose your database layout and it leaks into your
00:08:29.449 public API that you use single table inheritance or whatever but we got very
00:08:39.829 far away from this by now because of all the progress that was made back then
00:08:45.079 that was for every little small thing you implemented you first need to choose the outer the data
00:08:52.950 structure I when I learned programming I read a book that first pointed out that
00:08:58.620 is really important to start sitting down and think about your data structures before you actually stop
00:09:05.550 writing any code and I don't know about you but that's not how I write code today the paper goes on to suggest that
00:09:15.360 we need programming languages that allow us to write code in a way that it does
00:09:22.260 not imply the data structure that there is a universal interface and then you
00:09:28.380 later can pick the data structure and I think that especially with dynamically
00:09:33.390 typed languages and so on we have gone very far into that direction where you
00:09:39.630 can star just implementing writing some business logic and then filling in the gaps with the data structures there's a
00:09:48.810 second kind of abstraction or a third kind its control abstraction basically
00:09:59.780 when you execute something on the CPU it isn't exists machine instructions and if
00:10:06.240 you want to manage a large portion of machine obstructions you midge machine
00:10:11.600 instructions you need good abstraction and this started with basic concepts
00:10:21.570 like subroutines and there were big debates in the 60s and 70s about how to
00:10:28.800 structure them and big standards and out of that came for instance a very famous paper go to statement considered harmful
00:10:37.070 that is a big part of the debate how do we abstract code away what should we actually how should you actually manage
00:10:46.650 subroutines and I think not much of that paper remains today except for the fact
00:10:52.710 that we generally do not use go to except maybe if you do see I actually
00:10:59.430 submitted a patch to MRI that was accepted where I used go I followed the general coding guidelines
00:11:08.910 but I think we shouldn't get caught up and go to there's actually a bigger
00:11:14.200 picture here and in just five years
00:11:20.500 after that paper another paper came up or actually Dijkstra's go to say man
00:11:26.410 considered harmful was not a paper it was a letter but of this was actually a paper by james morris jr protection in
00:11:35.290 programming languages where he talks
00:11:42.370 about isolating parts of code from each other and then having means of
00:11:47.740 communicating between those parts this is face this is the basis for module
00:11:55.600 ization for having for dividing your program in reusable modules in this
00:12:01.330 paper he actually goes on a lot about how to technically enforce this I think
00:12:06.670 it is not necessary to enforce rules it
00:12:11.980 is necessary to alert adhere to them he
00:12:17.830 actually tries to develop a system where you can hand out data that belongs to
00:12:23.020 your model module and you can encrypt it so nothing or sign it so nothing else
00:12:28.390 can mess with it and I think all that it's not really necessary but out of
00:12:34.540 that paper came important ideas like you should be able to reason about modules
00:12:40.870 in isolation which then in turn is the basis for tools like unit tests or in
00:12:51.100 general having having libraries that you can reuse and I think it's very
00:12:59.470 important to look at where all this comes from we take a lot for granted from that but there's also a lot we
00:13:06.700 simply ignore like the idea that global variables are harmful also came up in
00:13:13.240 the 70s and I still see programs everywhere that use global state and
00:13:20.370 that later on comes to hunt people and makes it really hard to scale things or
00:13:25.900 to rearrange things but so thinking
00:13:31.270 about this we have data abstraction on the one hand and we have control
00:13:37.240 abstraction on the other hand if we combine the two one programming
00:13:42.280 methodology that comes to mind for me that also came out of the 70s is object-oriented programming I think that
00:13:51.850 as both who's still listening cool who
00:14:01.090 knows what this guy is yes two people
00:14:06.280 this is Alan Kay the inventor of small talk also this picture is ideal for
00:14:13.630 starting a new internet meme LMK holding things anyway he said object oriented
00:14:24.370 programming to me means only messaging local retention and protection hiding of state process and extreme late binding
00:14:31.480 of all things and when you think about it this basically describes both data
00:14:36.730 abstraction and control abstraction there's an interesting side story there
00:14:42.850 where he so he worked at xerox parc together with dan ingles Gilad bracha
00:14:49.360 and view others and they develop small talk ad and they got a visit from this
00:14:54.790 guy who knows what that is Steve Jobs
00:15:02.200 okay is you don't and about this visit there is his interview or what Steve
00:15:08.980 Jobs where he said that when he went there they showed him three things and he didn't see the first
00:15:16.340 thing which was object-oriented programming he didn't even see the second thing which was network computers
00:15:24.200 they actually had all the computers there in one network because of the third thing they showed him and that was
00:15:31.550 a graphical user interface and the fascinating thing for me about the story
00:15:37.040 is all three things are about abstraction we make the rules we make
00:15:49.820 the rules by deciding which abstraction we choose and which rules apply for
00:15:56.090 these abstractions by the way so this is from a softer world and they have like a
00:16:04.820 hover title like XKCD I'm not sure can you read this yes back there those
00:16:13.280 people aren't listening anyway ok so the
00:16:20.150 hover text is getting your hair cut a rebellious one anyway some rules our
00:16:28.940 neighbor good programs and those are principles that we use most of the time
00:16:34.010 to write programs abstract them single responsibility principle comes to mind
00:16:40.280 where one object should have a single responsibility and if it has two responsibilities you should split up two
00:16:48.470 nights ago we came up with a zero responsibility principle and I'll use
00:16:54.620 that from now on in all programs i right there another one that very much place
00:17:01.460 into abstraction is a list craft substitution principle which says any
00:17:08.140 subtype of a given type should be able to be used as a full substitute for that
00:17:13.730 type law of Demeter about you should
00:17:19.430 only know things about your friends friends describing objects close to close to the object you're talking about
00:17:27.030 it's very important to keep in mind to not abstract too early so I maintained
00:17:33.790 Sinatra as was pointed out and from time to time i get an issue or pull request
00:17:40.330 that tries to reflector one part of Sinatra is like the first thing people do when they want to contribute to
00:17:45.790 Sinatra and this pull request takes the list so Sinatra has these lists like get
00:17:51.940 and then you give it a path post and then you give it a path or pattern etc etc and so those are all methods that
00:17:59.710 all basically look the same so the first thing people do is 0 this screams do not
00:18:05.380 repeat yourself let me reflect that and then get pull requests like that and
00:18:10.480 then the person who wrote this page is actually in the room I think anyway
00:18:17.560 that's totally fine I would have probably done that myself a while back way before I John Sinatra but I think
00:18:28.090 the abstraction is very unnecessary doesn't actually buy you anything all these methods are one-liners and if I
00:18:34.450 look at this if I look at this this code I need to think about what's going on
00:18:39.820 here so this is generating code and then and then up there that makes way more
00:18:46.000 sense to me I look at that and I instantly see what the methods are and instantly see where they go and code is
00:18:52.330 way more often read than it is written yeah so I politely declined those poor
00:18:58.240 requests which is sometimes hard
00:19:03.340 sometimes easy ok so in Ruby we use a
00:19:11.020 lot of inheritance as an abstraction we use classes it's the basic abstraction
00:19:16.720 we use an object-oriented programming here's the thing to think about there is inheritance a good abstraction because
00:19:25.330 we use the we use inheritance for two things we use it
00:19:33.770 for type hierarchy and we use it for implementation sharing we use a common
00:19:40.500 base class for our controllers so that our controllers all behave the same we
00:19:47.490 have cookie base or pool based sessions in rec inherit from the same class so
00:19:53.690 because they are of the same type and this basically boils down to the argument do subclasses equal subtypes so
00:20:02.010 do they have to add her to the do they have to follow the list craft substitution principle and so on and it
00:20:09.390 is very interesting for me what programming some programming languages
00:20:14.490 do that simply do not have inheritance in go interfaces are used for type
00:20:21.930 hierarchy and composition is used for implementation sharing and this for me
00:20:29.940 is a very intriguing concept to go for separating out the two strong external
00:20:37.130 abstractions allow weak internal abstractions one of the most amazing
00:20:42.360 things when we move to it from one one of the thick rails app to a distributed
00:20:47.460 app a distributed app is you can actually ride crap code if it's just a
00:20:54.750 very small app that is easy to rewrite easy to test easy to think about you do
00:21:00.390 not have to follow any any principles as long as the external interface is well defined you can even switch programming
00:21:07.140 languages however you want abstraction
00:21:12.930 can also be a security issue almost all attacks that I've seen rely on switching
00:21:21.660 the abstraction level where someone else didn't think that they should switch the abstraction level the heartbleed attack
00:21:27.300 people thought we have SSL so we're safe and I think about higher levels like are
00:21:34.440 my passwords encrypted or whatever but if you can attack ssl you can just read
00:21:42.390 all the traffic and you can just read the passwords from there so that's switching an abstraction level
00:21:48.299 you can also switch an abstraction level the other way to the extreme of social engineering where someone goes in and
00:21:54.570 says yeah I'm the repairman I need to check the service and you just grab the hard drive or someone actually entered
00:22:01.110 fake numbers for the FBI in San Francisco in google maps and then when
00:22:06.480 people would search for the phone number of the FBI that would call this veil a fake number he would proxy the call band
00:22:11.490 recorded that is just an abstraction level that people probably didn't think about when they thought about how to
00:22:16.950 make the telephone lines safe
00:22:22.880 abstraction as i said the UI is an abstraction you talk about metaphors and
00:22:32.960 principles and paradigms let's talk
00:22:38.520 about color because after all this sorry suppose of Europe magenta color is light
00:22:45.950 light comes from electrons electrons in
00:22:51.570 an atom or around an atom that are in an excited state and excited state means they have more energy than they need an
00:22:58.710 excited state and an electron means they're on outer shells further out than
00:23:03.840 they're supposed to be and then at one point they just jump towards the core and they really is a photon and
00:23:10.850 depending on how far they jump that gives the photon more energy and that
00:23:19.590 will lead to a shorter wavelength which will then lead to a different temperature to a different color in the
00:23:26.040 spectrum we can see this part of the spectrum the flying photons which are released by it this is the visible
00:23:32.610 spectrum humans most humans have what is
00:23:39.270 called tri chroma see that means in our eyes we have color cones for three
00:23:46.530 different colors red green and blue and these colors are sensible to a certain
00:23:53.429 to certain wavelengths so we have a certain sensation in them depending on the light that
00:23:59.520 enters our I so if we have blue light then we have an extreme sensation in the
00:24:06.900 blue color cones and we're weak
00:24:11.910 sensation in red and green and if we have read lied then we don't have a
00:24:17.640 sensation in blue etc etc we can also imagine it here's simplified so these
00:24:24.450 are the color cones so it's from cold to hot so if we have a sensation in red we
00:24:33.930 see red we have a sensation green we see green we have a sensation in blue we see blue if we have a sensation in both red
00:24:44.190 and green we see yellow because our brain assumes that imagine the x-axis
00:24:53.520 being the the wavelength our brain assumes that we see lied with the wavelength that corresponds to yellow so
00:25:01.590 what happens if we have a sensation in blue and red mathematically it should be right in the middle so it should
00:25:08.280 actually be green light but we don't have a sensation in green cones so it
00:25:13.340 can be green light can it so brain is may be confused about this and it
00:25:23.970 doesn't actually show us green light instead it makes up a new color magenta
00:25:30.410 well what actually happens if we have a sensation in both red and blue but not
00:25:35.550 in green is there probably two light sources hitting us at the same time but
00:25:45.240 does that mean is magenta real and this principle with the three three different
00:25:51.870 color cones actually resulted in how we implement color how we treat color if we
00:25:58.830 use that if you use magenta on a website we give it the color we add red light
00:26:05.550 and Ed blue light but no green light and this directly translates in how our
00:26:10.560 monitors work they just red green and blue dots
00:26:15.910 interestingly if the satellite takes a picture it actually takes three pictures
00:26:22.750 shortly after each other for the different colors and then planes move too fast and you get a picture like this
00:26:30.610 so you could argue this as a leaky abstraction a lot of information is actually lost from the original size
00:26:38.230 from the original light source so imagine the periodic table I'm going all
00:26:48.290 over here imagine the periodic table of elements one way to figure out what and
00:26:55.220 which element you're dealing with is by pumping it full of energy and then it
00:27:00.890 starts glowing as I said if it starts glowing that means electrons or jumping
00:27:08.179 shot shells releasing protons photons not protons photons my big fear with
00:27:15.350 this talk is that someone comes up to me after the second says like that was completely wrong what you just said so
00:27:23.110 judging from the light that comes off at such an element you can actually find
00:27:29.390 out for out what element it is this is the periodic table for looking at the light spectrums this is really important
00:27:41.170 when you think about space space is big
00:27:52.040 you might think the way down the the road to the chemist is big but that's
00:27:57.510 just peanuts compared to space give you some suspect a perspective earth
00:28:04.440 compared to all the other planets and Suns and so on the interesting thing
00:28:10.980 here people don't often realize when comes to space travel is so the ISS fly
00:28:17.040 something slightly more than 100 kilometers about above earth so that's I
00:28:22.440 don't know 10 times the height that normal planes fly out so if you look at
00:28:29.250 the second picture if we would draw the ISS in there it would seem like it's
00:28:34.710 actually on earth because the distance is too small the distance between Earth
00:28:39.780 and the moon is large enough to fit all planets from our solar system it so
00:28:46.110 would be some way here this is how far
00:28:53.309 they went in the 60s now we don't even make it here just something to think
00:29:00.150 about but anyway I was talking about light so light is very interesting when
00:29:07.380 you want to decide how all this star is there's this thing I think it's called a
00:29:17.240 hatch from Russell diagram or something where you basically have the light color
00:29:25.470 down here that's emitted by a star and then you can enter it in the graph and
00:29:30.950 these are different paths they can take so if you take so this is a star
00:29:37.230 somewhere here you have the luminosity and the color and then if you have those two you can put it on this map and then
00:29:45.270 you can figure out what stage the stars in you have different paths you can take
00:29:50.490 this is the normal sequence where you go
00:29:56.850 from the youngest up here to the oldest down here and there also
00:30:01.890 other things in there late so you can't just just judge from the color but it
00:30:07.590 helps a lot figuring out how old the star actually is because the older star gets the more iron the more heavier
00:30:13.620 metals are there because of the fusion happening in the stars but that's just
00:30:20.670 an excuse where I think that how we store color is a leaky abstraction because you cannot get back to the color
00:30:28.110 spectrum to the actual frequencies from a JPEG file but the thing where this
00:30:37.200 becomes way more of yours is tetra chrome at tetra chroma see I think I got
00:30:45.330 that right there is where you have four different color cones and you might think what's the use case why would we
00:30:51.060 encode in four different color cones or in four different colors so one use case is if you have a startup that rather
00:30:58.230 than targeting humans it's targeting Birds actually for most mammals this is
00:31:05.160 irrelevant because most of them only have two different color cones so their brain doesn't even show them magenta but
00:31:14.250 birds actually have a fourth color cone and it's gray in here it would be a different color but we can like we can't
00:31:20.370 visualize that which is three colors because it's outside our visible spectrum but so birds I'm not writing
00:31:30.090 software for birds we need a new HTML standards for designing websites for birds no the interesting thing is
00:31:37.800 actually some women have four different color cones and because it's there is no
00:31:47.180 large data set on that the estimates are that they're either either two to three
00:31:52.740 percent of all women or fifty percent of all women
00:31:59.899 what's pretty sure is nearly all men
00:32:06.769 have three color crumbs and that is because of the gene the genes color
00:32:13.950 cones are inherited on the X chromosome so you can get three per chromosome so
00:32:20.820 if you have one y chromosome one X chromosome you can have three maximum
00:32:26.690 there those are actually the names of the gene in case you want to patch your gene someone did that publish it on
00:32:35.190 github and someone sent a pull request to the genome so but if you do the math
00:32:40.700 women in theory could have up to six different color codes and so a lot of
00:32:51.840 women even if it's just two percent of the world populate of the female world population that's we're still talking
00:32:57.960 millions of women so why why have we never really thought about I talked
00:33:03.450 about this because they're mostly mostly dysfunctional mostly women only see as
00:33:12.119 many colors as men do but there are at least two confirmed cases one recently
00:33:19.710 and one in the 40s when this K of theory first came up where women definitely had
00:33:27.419 four different functional color cones and that allowed these test subjects to
00:33:36.269 see millions millions of more colors than the normal human being imagine
00:33:44.100 having four different color cones not only can you see more colors you can
00:33:49.740 also have more scenarios where your brain invents new colors there's a
00:33:55.649 standard scenario which might probably be magenta but you could also have those to have a sensation or other
00:34:03.289 combinations so is this a leaky abstraction why are
00:34:14.409 those dysfunctional why are the color constant attention I have my own theory that I can share with you I have not
00:34:21.880 done much research except for reading Wikipedia and watching a BBC a section
00:34:27.760 on this but here's my idea why we don't
00:34:33.159 see colors with our eyes we see colors with our brain it's like whoa brain and
00:34:41.520 our brain adjusts colors this is for instance if you take a picture in here
00:34:48.100 like I see that someone shirts a shirt is white but if you take a picture
00:34:53.230 without changing the settings okay nowadays our cameras are pretty smart but the light would be colored by
00:35:00.070 whatever the color of the light up there is and then you need to adjust the white balance our brain does all that it can
00:35:06.550 even turn green into blue or yellow if all the context around it is also some
00:35:11.650 sort of green and interestingly we start seeing color in the first three months
00:35:18.190 of our life after birth and experiments
00:35:24.190 with toddlers that were not able to speak yet there were three four months old showed that they see colors with the
00:35:31.930 left side of the brain the left side is active when they see colors now we don't
00:35:42.640 see colors that we don't have the abstract content a concept for so the
00:35:48.190 color vision develops we get the concept in our brain and then we can differentiate the colors I kind of come
00:35:55.960 back to the toddler's in a second but first Wow a double rainbow how many
00:36:03.850 colors of the rainbow have seven six five four Julian yes it's gradients we
00:36:11.920 see seven colors because we were trained to see seven colors when this toddler
00:36:18.370 learns to speak the color perception the part of the brain responsible for seeing color moves
00:36:26.500 from the left side of the brain to the right side of the brain this I think
00:36:32.800 means that color perception is linked to
00:36:38.200 language is anyone here been at rubyconf Australia not the last one but the first
00:36:45.220 one there was a keynote by Dave Thomas there no that's okay some are the
00:36:52.270 Australians because I can repeat something from the keynote so might be
00:36:59.410 boring if you had already seen it he had a section in there about the Himba tribe from Namibia they are well known for
00:37:08.380 putting clay in their hair and for
00:37:14.170 having a different concept of colors so the Nimba only know four different colors and the interesting thing is they
00:37:22.990 draw the lines between colors at different points than what we do it so
00:37:29.940 dark blue red green and purple for them are the same color and some shades of
00:37:38.440 green and blue are a different color and so on it's they actually translated with
00:37:45.010 black and white for instance and say things like this guy is black the water
00:37:50.560 is wide so they do not have a fine-grained a color concept that we
00:37:56.980 have and it actually differs from our concept so there was an experiment with
00:38:03.460 them where they measured how quickly they can tell apart colors so they
00:38:08.590 showed them a circle different colors in the circle hope you can see this so
00:38:17.310 where is the square that has a different color yes everyone's pointing at this I
00:38:26.950 think I hope anyone not seeing that okay and you
00:38:36.860 should check this out the BBC video they actually have really hard time finding
00:38:43.130 the square most of them most of the tribesmen actually point at the wrong square first takes them a long time to
00:38:50.600 concentrate and see where it is on the other hand if you show them this one
00:38:56.660 they instantly point out the one with the other color can you see it anyone
00:39:05.110 it's this one you actually see a better on my screen but it's still hard I see
00:39:12.950 it instantly because i watch the video
00:39:23.100 they simply don't have the concepts the abstract concepts of color abstraction
00:39:31.380 happens in our minds and I think this is true for all abstraction object-oriented
00:39:38.890 programming is not something that happens on our CPU it's something it's a
00:39:44.530 way that we think about programs it's a way that allows us to quickly grasp how
00:39:49.690 to remodel a problem it's a way that allows us to communicate programming you
00:39:57.460 I happens in our mind not our computers our screen just shows us red green and
00:40:04.480 blue dots our mind turns it into a bottle and our mind is trained for these
00:40:11.500 abstractions anyone who has parents or grandparents that grew up without a computer and I have to sit in front of
00:40:17.950 one those people usually don't have the
00:40:23.980 abstract concepts to easily grasp and understand you I that we use today who
00:40:32.020 knows what this is anyone yeah i SPECT there yes this is douglas adams and he
00:40:41.950 said that anything that's in the world when were born is a natural part of the
00:40:47.110 way the world works anything that's in wintered between our 15 and 35 fifth
00:40:52.510 birthday is exciting and revolutionary and can probably get us a career
00:40:57.810 anything invented after we're 35 is against the natural order of things
00:41:07.700 you can take this further most of the things we take for granted the way the world works are abstractions countries
00:41:15.290 are abstractions there's no physical exist like countries is not something in
00:41:20.839 the physical laws this doesn't mean countries don't exist they exist this
00:41:26.660 abstractions in our minds and are very powerful for that and enable us to do
00:41:31.670 things and don't let let me get started on religion exists in our collective
00:41:39.589 minds this is the important part that we share these abstractions and extending the abstractions that we share in
00:41:45.890 changing these abstractions it's a basic principle of innovation in progress it's
00:41:50.990 what's referred to as a paradigm shift sometimes so it's magenta color should
00:42:05.000 we vote who is in favor of magenta being a color okay who's in favor of magenta
00:42:13.069 not being a color because its a mix of two colors or something green magenta is
00:42:18.589 green down with the middle color code so
00:42:24.710 actually so the argument goes for people get claiming Magenta's not color is here
00:42:31.670 is the visible spectrum I headed earlier the rainbow now show me magenta well
00:42:37.430 actually the visible spectrum is more like this on the outer line is a
00:42:43.730 frequency and then if you mix multiple
00:42:49.910 light sources multiple single frequency light sources you get extra spectral
00:42:56.960 colors those are is everything what is not on this line so if you say magenta
00:43:03.470 which is down here is not a color that means everything in here isn't a color
00:43:08.569 either which kind of plays into my art teacher telling me that white and black are not colors but I think claiming that
00:43:16.810 everything here is not a color you just really find how color were what
00:43:22.279 the definition of color is so I actually personally think yes magenta is a color
00:43:32.170 but then again color is nothing that really exists except for in our minds
00:43:37.989 it's when you think about there was a visualization that recently went around
00:43:43.279 the internet of this is a real unmodified picture of some virus under
00:43:49.880 an electron microscope and it was brown and the skin head skin color or
00:43:56.390 something I was sitting on some cell I don't know so which color do atoms have
00:44:04.839 they don't because what we see is photons not Adams its electrons jumping
00:44:10.400 it's something our brain adds to the light there's one last thought I want to
00:44:16.700 leave you all with vote for Pedro thanks
00:44:34.309 mantis shrimp eyes 16 cones i believe 12 something like that I'd love to see the
00:44:41.970 university there I so there's another interesting part our color cones are
00:44:47.490 actually able to see ultraviolet light but because of the wavelengths of
00:44:53.999 ultraviolet light and the form of our lens they never the ultraviolet light
00:44:59.460 usually does not reach our color cones so if you have the color cones if you
00:45:07.410 have your lens removed for medical reasons you start seeing ultraviolet light and it usually seems kind of white
00:45:14.880 because all all you three color cones are sensible to it but the blue one is
00:45:20.609 more sensible so you see it a whitish
00:45:25.650 blueish also you don't have your lens so you have a hard time focusing like
00:45:30.869 actually not in your brain but actually focusing on things but you see ultraviolet light ok any other remarks
00:45:43.440 or questions
00:45:53.619 yes I've too many slides not wait good
00:46:03.950 more some more basically I just wanted to clarify that the colors the it's not
00:46:12.220 the colors that show what Adam it is it's the absence of the color that
00:46:18.859 actually shows what what Adam what Adam it is right or yeah it's what's present
00:46:26.270 in there it's the it's the black part it's because the atom absorbs or no so
00:46:33.980 this is not this is not the light that's reflected by something you cannot tell what an element is if you if you shine a
00:46:44.420 light on it and then see what's reflected because they can only reflect whatever light source falls on them this
00:46:50.210 is actually the light they emit when you pump them full of energy and they start
00:46:55.700 glowing themselves because because I was watching one documentary about how they didn't determine the atoms in a star
00:47:02.690 okay and the meter that they use actually detects the absence of these
00:47:08.630 ocular spectrums and yes it's the absolutely i think that's basically equal just what's easier to easier to
00:47:15.980 identify because it's also because our sensors sensors and work like our eyes
00:47:22.100 so they don't actually see the frequency so what they do is you actually use the
00:47:28.010 wavelength there's a thing where they send them through a magnetic field and then they fly in a in a curve and then
00:47:34.460 you see how far from the entry point daylin and i'm not actually i'm not a
00:47:39.920 physicist neither right but i don't know but it's actually the light they admit so the light spectrum the light they
00:47:48.619 admit depends on which jumps they have the electrons when they are excited how
00:47:54.920 far they jump and so if you certain elements have more shells and electrons
00:48:00.020 on certain positions and some electrons of brilliance or not and then you have different jobs
00:48:05.620 so that's also why you see that actually there is not a one-to-one mapping between frequencies and elements but
00:48:12.580 there are certain frequencies that a lot of elements have and certain frequencies that not all the elements have that with
00:48:30.010 the dude cosmos scishow youtube or the television the sign show with the guy
00:48:45.990 okay yeah so if you have any other
00:48:53.710 feedback feel free to hit me up later um I'm probably more relaxed now that I'm done with my talk hahaha thank you thank
00:49:02.590 you you
Explore all talks recorded at Red Dot Ruby Conference 2014
+20