Aprende a programar

jj.github.io/aprende-a-programar

Como si fuera 2017

LET a=10
PRINT a
program Hello;
begin
  writeln ('Hello, world.')
end.
	    
#include<stdio.h>
main()
{
    printf("Hello World");
}
	    
public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello, World");
    }

}
	    

El mundo ya no es así

Sin embargo

lenguajes usados en top
	       universidades
print "Epa"
('α','●⚈⚉',{$^þ²},π,¾, (1,3 … ∞)).map( { .WHAT} )

Los lenguajes no están separados de la realidad

Poliglotismo

package main
import (
	"fmt"
	"net/http"
)
func main() {
	http.HandleFunc("/", func (res http.ResponseWriter, req *http.Request) {
			fmt.Fprintln( res, `<html>
  <head><title>Página</title><script>console.log('☒ Cargada')</script></head>
  <body><h1>Cargada</h1></body></html>`)
		})
	ε := http.ListenAndServe(":50403", nil)
        if ε != nil {
		panic( ε )
	}
}
	    

Ejecutando

go run code/hey.go &
cargada
go comentado

Encuentra el lenguaje

1. Go

2. HTML

3. JavaScript

4. HTTP DSL

5. Toolchain DSL

Entorno

package main
import (
	"fmt"
	"net/http"
	"os"
)
func main() {
	http.HandleFunc("/",
		func (res http.ResponseWriter, req *http.Request) {
			fmt.Fprintln( res, `<html>...</body></html>`)
		})
	ε := http.ListenAndServe(":"+os.Getenv("PORT"), nil)
	if ε != nil { panic( ε ) }
}
	    
>

Go test!

package main
import (
	"testing"
	"strings"
)
func TestPage(t *testing.T) {
	page := MainPage() 
	if strings.LastIndex(page, "<") < 0 {
		t.Error("Estructura incorrecta")
	}
}
Testeando go

Aprender a programar en 2017 debe ser...

En equipo y con metodologías ágiles

En múltiples lenguajes, ámbitos y paradigmas

Con despliegues en la nube

Con Stackoverflow

Se puede enseñar mejor

Se puede aprender mejor

Bienvenidos a 2017

Créditos