Lo que las empresas piden
-
Upload
svet-ivantchev -
Category
Education
-
view
389 -
download
0
Transcript of Lo que las empresas piden
Por qué no debemos aprender “Lo que las empresas piden”
Svet Ivantchev, [email protected]
1 de abril de 2009, Uni Encounter V
Welcome to siglo XXI
Plan
• Los informáticos, el futuro y nuestra preparación
• Tecnologías interesantes
• El marcado de trabajo y Lifelong Learning
¡Decidido!Primero voy e Uni EE
Informáticos
• Ingeniería?
• Arte? Artesanía?
• O son albañiles (aka picateclas)?
• Y si fuera poco ... ¡hay intrusos!
• En realidad ... hay de todo
“Preparar para el futuro”
• 1992 (DOS, Clipper, HTM-qué? ...)
• 1996 (Windows 95, HTML, PH-qué?)
• 1999 (Java)
• 2004 (PHP, J2EE, J2ME)
• 2007 (PHP, mySQL, Ruby on-qué?)
Así que ...
• Todo lo que podemos estudiar no vale?
• Líderes vs seguidores
(+ (* 3 (+ (* 2 4) (+ 3 5))) (+ (- 10 7) 6))
¿De quién depende?
¿Qué hacer?
Innovar (con perdón)
Innovación
• Hélice de inclinación variable• Tren de aterizaje retráctil• Tipo de construcción monocoque• Motor radial enfriado por aire• Alerones
La aviación civil y el DC-3
La fotografía
1521 1609 1826
EC2
Ideas
1. Rendimiento “humano”
2. Pensar “al revés”, RPN
3. Erlang y variables que no cambian
4. Paralelización, CUDA
1) Rendimiento “humano” La motivación de los agentes: € y :-)
1990 2009 $$$
CPU 80286, 6 MHz Xeon, 3 GHz 1/5.000
RAM 128 Kb 4 Gb 1/40.000
Disco 360 Kb 1 T 1/3.000.000
yo / hora 2 € 50 € 25 x
Un tarea que lleva: 10 h de programación y 10 h de cálculo?
Una herramienta que me hace 10x mas productivo pero es 20x mas lenta?
Ruby
Python, Perl, PHP...
Ejemplo: Ruby OSA
Ej: Ruby OSA
it = OSA.app('iTunes')OSA.app('iChat').status_message = it.current_track.name
• 20.minutes.ago
• 1.gigabyte
• 15.times { ... }
Ej: detalles
2. HP y RPN
RPN
1 + 2 = 3
1 + 2 * 5 = 15 ← (1+2)*5
1 + 2 * 5 = 11 ← 1+(2*5)
1
1
1
2
2
3
+
3
5
5
15
*
RPN
• ((42 + 16) * (87 - 31)) / 12 =
• 42 ↵ 16 + 87 ↵ 31 - * 12 /
(42 + 16) * (87 - 31)---------------------------------
12
function quicksort(array) var list less, greater if length(array) ≤ 1 return array select and remove a pivot value pivot from array for each x in array if x ≤ pivot then append x to less else append x to greater return concatenate(quicksort(less), pivot, quicksort(greater))
Quicksort42 16 23 8 15 4
4 8 15 16 23 42
Ref: http://es.wikipedia.org/wiki/Quicksort
void quicksort(int* izq, int* der) /*Se llama con: quicksort(&vector[0],&vector[n-1]);*/{! if(der<izq) return;! int pivot=*izq;! int* ult=der;! int* pri=izq; ! while(izq<der)! {! ! while(*izq<=pivot && izq<der+1) izq++;! ! while(*der>pivot && der>izq-1) der--;! ! if(izq<der) swap(izq,der);! }! swap(pri,der);! quicksort(pri,der-1);! quicksort(der+1,ult);} void swap(int* a, int* b){! int temp=*a;! *a=*b;! *b=temp;}
Erlang
qsort([]) -> [];
qsort([Pivot|Rest]) ->qsort([ X || X <- Rest, X < Pivot])++ [Pivot] ++ qsort([ Y || Y <- Rest, Y >= Pivot]).
Erlang 101Erlang (BEAM) emulator version 5.6.5...Eshell V5.6.5 (abort with ^G)
1> 1+6.72> X=3.33> Y=12.124> {P, Q} = {11, 12}.{11,12}5> P.116> Y=Q.127> Y=13.** exception error: no match of right hand side value 13
Erlang (BEAM) emulator version 5.6.5 [source] [smp:2] ...Eshell V5.6.5 (abort with ^G)
1> L = [ 7, 65, 5, 9, 11 ].[7,65,5,9,11]2> [ C | R ] = L.[7,65,5,9,11]3> C.74> R.[65,5,9,11]
tienda.erl:-module(tienda).-export([precio/1]).
precio(manzanas) -> 2.90;precio(fresas) -> 3.50;precio(leche) -> 1.50;precio(ordenador) -> 199.
tienda1.erl:-module(tienda1). -export([total/1]).
total([{Que, N}|T]) -> tienda:precio(Que) * N + total(T); total([]) -> 0.
Erlang (BEAM) emulator version 5.6.5 [source] [smp:2] Eshell V5.6.5 (abort with ^G)
1> c(tienda1).{ok,tienda1}
2> c(tienda1).{ok,tienda1}
3> L=[{ordenador,1},{manzanas,2},{fresas,3},{leche,1}].[{ordenador,1},{manzanas,2},{fresas,3},{leche,1}]
4> tienda1:total(L).216.8
Permutaciones123 -> 123 132 213 231 312 321
1234 ->
["1234","1243","1324","1342","1423","1432","2134","2143", "2314","2341","2413","2431","3124","3142","3214","3241", "3412","3421","4123","4132","4213","4231","4312","4321"]
Para ver todas las permutaciones de X123:
1- calcular las de de 123: 123, 132, 213, 231, 312, 321
2- Intercalar X: X123, 1X23, 12X3, 123X, ..., ...
p.erl:-module(p).-export([perms/1]).
perms([]) -> [[]];perms(L) -> [[H|T] || H <- L, T <- perms(L--[H])].
Erlang (BEAM) emulator version 5.6.5 [source] [smp:2] ...Eshell V5.6.5 (abort with ^G)
1> c(p).{ok,p}2> p:perms("12").["12","21"]3> p:perms("123").["123","132","213","231","312","321"]
“Yo lo que quiero es trabajo”
http://blogs.oreilly.com/iphone/2008/11/turning-ideas-into-application.html
Mike Vanier: LFM and FLSP
• languages designed for smart people
• languages designed for the masses
http://www.paulgraham.com/vanlfsp.html
Java
• "We wanted to build a system that could be programmed easily without a lot of esoteric training and which leveraged today's standard practice."
http://java.sun.com/docs/overviews/java/java-overview-1.html
Craig McClanahan
servlet 2.2, 2.3 y JSP 1.1, 1.2 specifications, JavaServer Faces 1.0 Tomcat, Ant
James Duncan Davidson
¿Así que aprendo Ruby, y Erlang y ya esta?
Q & A