RedDot Ruby Conf 2014

Historias sobre abstracción de aplicaciones software

Konstantin Haase  · 

Presentación

Vídeo

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

hello everybody hello everybody let me be the first one to welcome you all to a Singapore who in here likes raising their hand all right all right who here does not not like raising their hand huh okay I'm here I'm here to talk about magenta and by

magenta I do not mean I need to turn this on sorry it's not my clicker bye magenta I do not mean magento I do not mean Magneto I mean magenta or in general all the pink magenta spectrum this talk is a very new thing for me I've never given this talk

before I've never talked about anything that's anywhere related to what I'm going to talk about so i'm i'm slightly freaked out a bit about this usually i give very technical talks this torque is very very meta I've not really given

a meta talk and it's not just about magenta it is also as you might see from this picture or not about abstraction and I did some research about abstraction I interviewed famous Ruby developers one said too much magic you mean in general it can make a

lot of stuff simpler to understand but it can also go too far I did that research during another truck today so play it's for real let's talk about abstraction I think abstraction is a principle that is the basis for science and who doesn't love

signs who doesn't love science cool science rocks abstraction is a principle that I think you find in all fields of science one part where this was very inspiring is an architecture an architecture Christopher Alexander published a book a pattern language

which is actually the sequel to another book called the Oregon experiment in the 70s which define general-purpose patterns that you can use an architecture that are not bound to a specific type of building that you can use in on small scale he talks about

interior design or designing your house or actually designing a district designing a city and this inspired another book you might or might not have heard of that was influential in computer science called design patterns elements of reusable object-oriented

software I actually keep forgetting that name because everyone calls it the Gang of Four book it came out in 94 and a defined general purpose design patterns to be used in software development and that for me that's that's what I think of when I speak

about abstraction in software development and picking the right abstractions is crucial and in computer science everything as an abstraction everything and less you actually speak about transistors and go on about how the electrons fly in there I mean even

that model is an abstraction on some level but when we program we don't really think about the transistors which is what everything in the computer is made of so if you don't know a transistor is basically a not end gate and out of not end gate you

can create any other logical gate with which you then can use to build an ALU ALU or anything else that runs in your computer but I guess most of you don't actually think about transistors does anyone actually think about transistors when they write their

rails application great that guy okay maybe maybe maybe this is so that is why I talked about abstraction so you might understand this concept that lets you get away from the thinking about transistors and especially in computer science where the abstractions

are very abstract and are there right from the beginning maybe in contrast to some other sciences sciences Sarah plural there is a lot a lot of room for interpretation how to interpret such abstractions which abstractions to use and so on which in my view

makes it actually very similar to arch and to math and which you could now have this whole discussion where people like to point out that programming is like an art and I think a lot of that stems from the fact that we can choose and express easily with different

expressions there are different ways different things we do for abstracting when we program one thing we do is we abstract away semantics we have abstraction levels where we do not think about who this represents I don't know a user in our database and

if we abstract that way that allows us to have generic algorithms if you don't know what an algorithm is it's the word used by programmers when they do not want to explain what they do they did anyone know what that is quicksort quicksort yeah is it

is quick sort and quicksort does not care what it's sorting as long as it knows how to compare and that's what I mean when I talk about genetic algorithms generally we assume that sorting a list is a solved problem or in every or whatever so we just

call dot sort and then on an error and that's abstracted away and sorts everything for us and that is very powerful because we don't need to re-implement the sorting algorithm for our web application there are the types of abstractions there's

data abstraction and if you look in the past this was actually a very big debate there was a paper written about this in published in 1967 data less programming that was quite influential there it stated that the big problem we have right now is that when

you start a new program the first thing you do is you think about the data structures and then you're bound to these data structures and this might cause big problems later on when you want to change these data structures now we still have these problems

kind of when you choose your database layout and it leaks into your public API that you use single table inheritance or whatever but we got very far away from this by now because of all the progress that was made back then that was for every little small thing

you implemented you first need to choose the outer the data structure I when I learned programming I read a book that first pointed out that is really important to start sitting down and think about your data structures before you actually stop 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 we need programming languages that allow us to write code in a way that it does not imply the data structure that there is a universal interface

and then you later can pick the data structure and I think that especially with dynamically typed languages and so on we have gone very far into that direction where you can star just implementing writing some business logic and then filling in the gaps with

the data structures there's a second kind of abstraction or a third kind its control abstraction basically when you execute something on the CPU it isn't exists machine instructions and if you want to manage a large portion of machine obstructions

you midge machine instructions you need good abstraction and this started with basic concepts like subroutines and there were big debates in the 60s and 70s about how to structure them and big standards and out of that came for instance a very famous paper

[ ... ]

Nota: se han omitido las otras 3.335 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.