jueves, 1 de julio de 2010

Frameworks = Mathematical Placebos

Thanks to Online LaTeX Equation Editor. Very helpful for "The Placebo Formula"
---

Programming Frameworks are like something I have called as Mathematical Placebos, extra data that we add to equations to help us reach its results.

This extra data bloats the language ahead of the future. We tend to find many gotchas before and while we are working on a code, and they will delay code delivery.

What started easy, now is not.

To give a mathematical example, a very interesting equation, Euler's Identity, goes like this:



LaTeX: e^{i\pi}+1=0
PHP: it doesn't have built-in calculations for imaginary numbers.
Python: print (math.e**(math.pi*1j))+1

The result is this Python expression is not exactly 'zero', but very near to it. This is a common catch in floating point calculations. ;-P

Do you imagine what amount of tests Leonhard Euler did, in order to find out that relation of constants returns -1?

What I call "The Placebo Formula" (numbers I recall when I solve fractional, algebraic, or exponential equations), goes like this:



LaTeX: \frac{\sqrt[1]{\left(\textbf{1}\right)^{1}}}{1}+0=1
PHP: echo pow(1.0,1.0/1.0)*1.0/1.0+0.0;
Python: print 1.0*1.0**(1.0/1.0)/1.0+0.0

Do you get the idea of all those extra artifacts in both placebo formula and frameworks? You have to remind yourself that if you see a simple "1" in a formula, you can add any of those pseudo-numbers to ease your calculations.

In programming, this effect is also achieved when you create a common Object class for every object, including those objects not yet discovered or planned. When you have to add a behavior to all objects, you add it to that base Object class.

---
PS: I annotated what I need to do in this post instead of actually doing it! (e.g. I typed "use an image of euler's identity and wikipedia link") It is always easier said than done, although this action can prompt you to do a better organization of the way in which you express your thoughts. Write for yourself!

Evolution of Coding

It all started so simple:
  • George Boole, and his Boolean Algebra.
  • Claude Elwood Shannon, and his Information Theory.
  • Alan Mathison Turing, and his Turing Machine.
  • Charles Babbage, and his Programmable Computer.
  • John von Neumann, and his Computer Architecture.
I tried to put this in the normal order of understanding for people, but actually I will use the order on which I normally encounter the problem.
  • Every computer problem is composed by 'only' three main parts: input, process, output.
  • The input part needs both a layout and an interface to look nice.
  • The main process must be structured, and it should support alternate logic to handle possible exceptions.
  • The output also needs a layout specifically designed for screens, papers and files.
  • Not all users will be allowed to use this program. So an authentication system is required. Also, it should allow many users, each one with possible different roles and levels.
  • In the input part, users commit many mistakes, so validation is needed for each data that program receives.
  • To ease distribution of the program, and to centralize the data store, a client/server structure is defined.
  • Many users in different remote location have different languages. So, programs now need to support different types of languages, like english, spanish, etc.
  • Good database software and modern platforms have been developed. So, it should be useful to make programs able to migrate to them. (db, os, platform, web, mobile, etc.)
  • It's hard to create a migrable program, so we should separate our development into three layers or tiers: back,middle,front (A.K.A M.V.C.)
  • There are several programming languages on which we can express many of these principles easier (C++, Java, etc.), so we should migrate our programs to them.
  • We are losing performance as our user base grows up. So, we should test concepts like replication.
  • Some foreign programs and systems also want to have access to our program. So, we should create Web Service or open ports for Socket programming.
  • It's probable that, with all these changes, we have left some doors open because of lack of sanitation. We must protect our programs against Session Hijacking, Cross-Site Scripting (XSS), and several types of Injections (SQL, HTML, CMD)
  • Many users access the same resource simultaneously, and that generates either deadlocks or data inconsistency. So, we should program taking into account concurrency and multiple threads of execution.
  • Our application is growing too much. So, we should apply concepts like distributed/cloud computing, to make our programs and database expandable by simply buying extra hardware.
  • OOP, EXCEPTIONS, CHANGE (files,interrupt)
Now, there's a question: What's next? How could we magically and instantly create or adapt a program to any change we still don't know? A possible simple change might touch EVERY AREA of our program! And a touch of that kind needs TIME to be checked in every area we have created. That's the problem known as Essential Complexity.

---
PS: IPO (Input-Proccess-Output) ... Hajime no 'IPO' ;-P

sábado, 5 de junio de 2010

Improving curiosity of "kids"

Money, Satellites, Vices, Limo-Hummer... either to look for or create inventions. Some hunt inventions for money; others for fame and acknowledgment; others, by pleasure; others by needs; others promote inventions to win money; others desperately look for inventions to become rich (they search for them all over the world), but discoveries are born from needs, learning and education. How could you wish that inventors flourish, if the only thing they have in mind is MONEY, not MESSAGE?

The game of adults is so promoted, that we all forget that we were children and, instead of showing to our children why some things are bad, we blindly forbid them, and by that time we also forget that those prohibitions were what motivated us to act opposite to our parents when we were little kids.

This is a Vice Cycle because, in many aspects, searchers and parents are also, although offensive, our bosses.

viernes, 21 de mayo de 2010

amo al sufrir ↔ formar a luis

"Un conocimiento reducido es algo peligroso; pero debemos de tomar ese riesgo, ya que un conocimiento reducido es lo máximo que nuestras cabezas más grandes pueden soportar."
George Bernard Shaw

Él no tiene esperanza, pero "no hay destino que no pueda decorarse con desprecio."
El Mito de Sísifo

"En este negocio, en el momento en el que te das cuenta que estás en problemas, ya es muy tarde para salvarte a tí mismo. A menos que corras asustado todo el tiempo, estás muerto."

Bill Gates

"Tener como meta la Comodidad y la Felicidad nunca me ha atraído; un sistema de éticas construído en estas bases sería suficiente para un rebaño de vacas."

Albert Einstein

"En este mundo hay sólo dos tragedias: una es no obtener lo que se quiere; la otra es obtenerlo. Esta última es la peor, es una verdadera tragedia."

Oscar Wilde

"Sabed sufrir: sabiendo sufrir, se sufre menos."

Anatole France

"El sufrimiento más intolerable es producido por la prolongación del placer más intenso."
George Bernard Shaw

"Si al ser feliz creo serlo,
sufro en mi dichoso estado,
pues me hace desgraciado
sólo el miedo de perderlo.
Y si estoy bien sin saberlo,
pues no lo sé, no lo soy;
así mañana como hoy,
ser feliz nunca podré;
pues si lo soy, no lo sé,
y si lo sé, ya no lo soy."
Joaquín María Bartrina y de Aixemús
(¿O era José María?)


Cúspides:

sábado, 15 de mayo de 2010

The Last "Atreyu" From Earth

After I saw Never Ending Story (first movie), I started to dream about how could somebody write something like that, that can give the same impression for adults as that story created on kids.

A friend of mine, KameKun, recommended me The Last Man From Earth movie. I can assure you that you can bring something useful for yourself after you see this movie. The most important thing I need to study about this movie is how to organize things you say, in a order that all people listening them will be able to understand you, and believe you.

If all is possible, and all these things have happened, then somebody must be desperately hunting for that last man. If not, then the way he organized the story is at the scale of an illusionist or a magician, because it is almost believable.
  • Aristarchus long before that. (story is getting sharp)
  • Yochanan
Now, impressively, I have recalled something I wrote some time ago. I called that story Immortal Rich. Recently, I have commented in my actual job how much I like dialogs in textbooks. Well, this movie is all dialog!

After you see this movie, haven't you felt how your mind tries to fly towards all those moments that John described? I really like that kind of jumps...

"The Last Supper" Man

Reference to my joke in the title:
http://en.wikipedia.org/wiki/The_Last_Supper_%28Leonardo_da_Vinci%29

I have seen Superman Returns movie. I really don't like to underestimate coincidences, like must people do, and in this time, I have found one related to Planet Krypton and Planet Vegeta, and, even knowing that they were not born in Earth, both Goku and Superman love this planet. When I see things like these, I think that Japan is copying some stories from United States...

Some extracts of quotes:
  • God doesn't share His power
  • In jail, my knowledge worth less than a piece of metal and cigarettes
  • Don't alarm. It is normal
  • They don't need superman, but they cry for one
  • Mind over muscle
  • Krrrrryptonite!

If Lex Lutor is the wolf, then is Superman the vampire? Never underestimate the perseverance of a wolf!

When I saw Superman falling towards earth and sea, I recalled the phrase "Fallen Angel" and Jiraiya... and also that I want to jump from a parachute and learn how to swim!! XD

viernes, 14 de mayo de 2010

Parameterizing

There are two ways to pass values to functions. I will state examples using PHP:
  1. showUser('Ignacio','Cortorreal');
  2. showUser(array('name'=>'Ignacio','last'=>'Cortorreal'));
Each one has advantages and drawbacks. At the end, when you are building an API, you must choose what to do. The first version is older, and I have started to valorate the older although, for analysis, it is too painful, but more efficient. Will the Old one version minimize "supposed logic errors" because of its strong typing? No! Neither the New one.

The power of the New one is that parameters can be expressed in any order!! For example, if you want to add the middle name and a second last name to showUser() function, we can add it, and it won't bring problems to other code using that function, but its interface and implementation stars to become a mess, something that is somewhat reduced with the Old method.

DOS
  • format /q/u/v/c/s
  • g++ -Wall hello.cpp -o hello.bin
  • type a.txt b.txt
  • grep -v " OK "
JS (PROGRAMMING)
  • save({a:1,b:2,c:3});
  • sum(1,2,3);
WEB
  • /products/view/5/1
  • /products/list/page:3/sort:desc/
  • script.php?first=john&last=doe
SQL
  • Horizontal Vs. Vertical Structures:

IDFirstLast
3IgnacioCortorreal

--Vs--

IDFieldValue
3FirstIgnacio
3LastCortorreal

In lambda calculus, each function has exactly one parameter. The process to emulate multiple parameters is called currying. It looks crazy, but I think it is the way to go if we want to find a new order for these Parameters' disorder. Python supports this kind of paradigm, and is my next language to study after I achieve a basic-intermediate level of my C++ abilities. I was looking to Haskell or LISP, but Python's documentation on the web is way too much better.

This is the strongest Yin-Yang I have found in programming. Which one to choose?

domingo, 9 de mayo de 2010

El Reino del Celo

Inspirada en Kingdom of Zeal, de Chrono Trigger.
Versión de 8 bits: http://www.youtube.com/watch?v=YxlFMufWaFk
El Reino Del Celo (cantada por mí)

Ya lo logré
Contento estoy
Soy el mejor
pero no sé...
[x2]

Ya caí!
Es que he acabado de
descubrir...

Que al terminar,
otra historia acaba de comenzar.
Acabo de notar,
que será asi toda la eternidad.
No puedo aceptar
que en un círculo vicioso voy a estar,
pero parece que continuar
es más conveniente que parar.

Confesión: Lloré! Fue muy nostálgico pensar como esta magnífica canción de Chrono Trigger se hubiese escuchado en un Nintendo... en esa tan feliz Época a la que llamo Mi Niñez! Y combinar eso con lo que sentí cuando la jugué en Super Nintendo, y con lo que escribí... fue una explosión de llantos para mí... :'-(

The Sealed Kingdom of Happymess...

sábado, 8 de mayo de 2010

The Never Ending Ocarina Of Time!

Alert: this post is too personal. It might contain too much bullshit.

I was trying to note what I think while I see The Never Ending Story movie, and to try to compare it with some of my thoughts from childhood, because the only concrete thing that I recalled was that I felt a deep and profound story the moment I saw it when I was a child. In my mind, pieces appear randomly, and I try to put them in order, just like a Jig-Saw, or Tetris. I started adding notes, but ended doing a mess of thoughts that it seems it will take a long time to get in order. I always believe that thoughts, like anger, clever or crazy, can hide interesting ideas.
  • this book is not for you (my eyes are getting wet)
  • No, not too much. We still have a long way to go.
  • Don't let the Sadness of the Swamps get to you (DKC2)
  • Atreyu wouldn't quit now
  • How did all this happen? With Luck (Wink!)
  • Only 9,891
  • Never give up, and good luck will find you (go down fighting)
  • It's to hurt if it's to heal (La Mole, Orochimaru, Dr. Lizard, I thought in Hal, but it was Triton from One Piece)
  • To the winch, wench
  • Be confident
  • What if they really do know about me in Fantasia?
  • Fantasia has no boundaries
  • Why is Fantasia dying then?
  • People who has no hope are easy to control
  • I am the servant of the power behind the nothing.
  • That was the end of Fantasia
  • It was the only way to get in touch with an earthling
  • ...others are sharing his
  • ...that one little boy could be that important
  • He's already chosen it
  • As many as you want. The more wishes you make, the more magnificent Fantasia will become
i felt identified with bastian

atreyu is link in ocarina of time

Auryn - wingw-auryn leviosa

chile easter island stones

people will try to hunt only for all the defects in the movie, but will ignore the message and the impression they tried to transmit. Maybe now I'm ready to see Star Wars, from Ronald ACS.

sadness of the swamps. Artax and the swamps moved me right now. I cried with Bastian.

Morla is like E.T.! Another must to see. It's a Turtle, like KameKun.

What? they heard Bastian Scare Cry? Nice, they showed how to get into the mind of the child, or the reader!

It can scare kids, but I think that is a too great story for starting kids.

Neo and Smith - Atreyu and Gmork - Yin and Yang: recursion of Nothing to the correct level, and to make it impressive for some, and that it can make it evident and ignored. Once again, stories must be read twice, and after some long time. I was writing while Bastian was reading.

I have read that directors are killing us with recycled stories. If that's true, they why they keep recycling them? MAYBE BECAUSE HUMANITY HAVEN'T STILL GOT THE MESSAGE OF IT!

God sent his first ship, Falco, and Atreyu grabbed it ASAP

Mikey and Pluto, Astro Boy and Jump, Casshern and Friender, Atreyu and Falco (Falkor, like a Dog-Dragon),

Now I know why I never forgot Falco. Hey I have noticed how language gets truncated with time. Black rappers do it, and dialects too!

I saw Naruto and the two old little toads!!

Southern Oracle - Matrix Oracle

Old Women doing the Hard Work to push the Old Man up?

Observatory to Astronomy. I recalled "Chapulin Colorado Chiquitolina", and now "hobbits"

The sphinxes reminded me the eye laser on Zelda, allegory on the game's challenges? Maybe the purity of the heart to get to the Inner Light is the meaning of the sphinx?

Goku purity of heart.

"Father, into your hands I commend my Spirit"

Magic Mirror Gate!! OCARINA AGAIN! Besides Zelda, I was always looking for another story that resembles Dark Naruto! Still, I don't know the story of Dark Ryu.

Ingredients in this post seems un-connect-able, but I think I will cook something interesting in the future, even if it's only for My Self.

In which circumstances a man can elaborate a colorful story like that? On drugs?

Not too much computer effects. That's why they feel alive and real.

What Atreyu saw at the mirror was the image of the reader?? These stories are seeds to plant into the heads of writers! Include readers into your story and take their feelings to the extreme!

"Now, this is going too far." Reactions like that is what people feel when they are confronted with disgusting truths. It is like when you light up your bedroom and find many insects and bugs inside it. But like in Moon said to Huo Yuanjia: because, "If you're sad", my Grandma told me "then cry", "After you cry, you still have to live life"

When was the first time I saw this movie? Before my vice with video games, before I was 11. I was loosing my vice, and this movie reminded it to me.

I recall a torment when Bastian was reading. Also, I compared Falkor with DBZ Shenlong.

"The Empress needs a name" Empress looks like Enterprise or "Empresa" in Spanish. Then the writers enterprise needs a new name? Also, I learned that Name is a pilot script in Bakuman manga... but "Empress" and "Name" can be exchanged with "Dream" and "Focus/How"

Although Fantasies can look imperfect, they are necessary to transmit the correct impression. I recalled all those rare things that we think, like orcs, gollums, hobbits, entz, bugs, etc. They are ugly but somehow, I feel that they are really needed.

The Bastian Storm was when reading "Sea of Possibilities" Possibilities are infinite!! I recalled the book "Who stole my cheese", and How I wanted to become a child. I recalled two girls in my school that sung "tienes que ser un niño". Some time ago, I wanted to feel like a child. Love Guru refreshed me that idea, and I was almost forgetting it.

LOL the Auryn was lost! Naruto necklace was also lost! Atreyu looks like young Servando and Florentino.

I recalled Link at the Valley of Death, but after the Sea Of Possibilities.

Each time I see The Rock Man, I recall "La Mole" or "The Thing"

I also recall Indiana Jones from time to time.

Still, if you try to do a movie like that right now in 2010, and only using superposition and physical background effects, it will be still a expensive movie to do.

Recursion of story writing that I thought when I read Bakuman, and also recalled Issac from Heroes.

"Little Red Riding Hood" Painting Twist! They have been shown Bastian there, to transmit the impression to the watcher, also! But I can't demand too much from 1982 cinema. What a coincidence...

When I saw Gmork, I recalled Splinter from Ninja Turtles, and Pluto manga, and Kerberos from Eyeshield 21; and Princess Mononoke when Falkor appeared after that.

When I recall about the origin of this movie, I also recalled Kinderheim 511 experimients in Monster manga, and Steiner the Magnificent.

Recalled also Mario Bros world 2-2 when Falkor found Auryn.

"That was the end of Fantasia." Instead, I really felt like Earth exploded. After that, when I saw the Ivory Tower, I have recalled some blogs and writings that say: "If you have arrived at this point, then I feel proud of you, and I felt I accomplish something." There's is still Hope.

Also I recalled a Bachata from Anthony Santos "Predica, que todavia hay luz."

When Falkor said "Go on" I recalled Toruk Makto from Avatar, and how I joked about Neytiri starting to respect Jake Sully after seeing "The Hummer". I recalled that I haven't seen neither Terminator Salvation nor Twilight nor Saw movies...

Dragon, the Dragon of Luck, Bugs Bunny, the Rabbit of Luck... 8-Mile B-Rabbit, Alice in Wonderland Rabbit Hole.

Inside Ivory Tower, Atreyu looks like Basshunter, and Empress recalls Nicole Kidman, and some superior beings that appeared in Assassin's Creed.

"Why you look so sad?" made me recall Thiaoouba Prophecy eBook.

I don't know what to think when I heard Empress to say Bastian. The first impression was "It's a child's tale", then "If they were to choose a name, they should be left it open". I now understand the message a little better, but how can we make an history in which the reader feels that he forms part of it? As I see it now: Atreyu --> Video Games. The next step is, either a model of yourself in the story, or you playing in a First Person View mode with a helmet. Life is like a Game, a long one, and sometimes it feels short. Life is like Chess, as Benjamin Franklin said.

I recalled when Ichigo couldn't hear his Zankapatou name in the moment I couldn't hear the new name for the Empress. I now saw another storm, the storm I recall from when I was a child, I think it is this one.

I also recall how some unseen but realistic ideas that I think occur after a couple of years.

"Lord" of Flies, flew and left us alone...

I have seen "Lord of the Flies" ... !@#$%^&*())_+{}:"|<>?`-=[];'\,./

This is exactly what I think will happen with our beloved Earth! Since the start, the fire was a signal!

I will stop now because, if I keep going, I will put inside this entry the whole UTF-32 Chart (Uhat The F#$%?) I got some laughs with Se7en, but even though this is another type of "Divine Comedy", I got mad with it. Also, after you see this movie, try to remember the "Over here!" moment... Why does God let bad things to happen? Why does He make those sadistic jokes? If you have seen Monster anime, then you'll understand this: maybe we are in God's Kinderheim 511.

We all only keep trying to look into differences instead of looking into similarities! Balance Everything! Don't turn the tide blindly to one side or the other. That is what I think, but it is also a Contradiction, because if we don't do it, then there won't be Progress... Can you see how a "right" decision can become "wrong", but in some aspects can return to be "right"? This movie is another evidence for myself that any enlightening situation can be seen either as "Wow", or "Bah."

Some phrases:
  • ... too many people are screwing around ... (could be "reading" screwing around?)
  • There's eight million "islands" out here...
  • Both March Songs in the movie were funny.
  • Over here! ... Hey, man, we were hunting.
  • If you don't stand up to him, you're just another one of his slaves. (what Jack did!)
  • What are you guys doing? (it looks like Cannibalism... Hannibal Lecter anyone?)
If there are really Powerful, Intelligent and Advanced Entities living in other planets, they will know for sure the greatest value of planets (for some Greek philosophers, some planets were Gods!) and they will come to Earth if they think something really dangerous is happening to the planet, just like The Day The Earth Stood Still movie.

Do you want to try it out? Even if they come, many of us will be punished from them. Or maybe they would let the whole Earth explode...

Haven't you feel how "magically" Noah has built his Arc to save some animals and people? Or how "magically" Lot was saved from Sodom? Or when Moses opened up the Red Sea? Can you make an analogy with Klaatu? Or with the ending of "Lord of Flies" movie? Don't you feel how "magically" we have anything we need to keep alive for many years? Swimming seems to be a kind of food... and a polluting act.

Lot's story fits more than a certain alternative I read about the origin of Adam and Eve, except that they were relatives...

I have now seen the vice cycle of "our" Universe: There are tons of evidence that many great people used to AFFIRM that there exists Real Powerful and Intelligent Entities in the Universe, but many people ignored, and still will continue to do so until...

"When Father's out, Kids make a Party", but if you leave kids alone, then they can "start to play with matches." In this case, kids can have two extremes. First extreme is to do exactly what Father said. Second extreme is to realize that kids will be alone for a very long time. Second starts to forget the teachings of and feel hatred for Father. First insists that Second is acting mad, but Second is alone and doesn't care about it, because Second does anything he can to survive (but ignores that Father built a house and left food). With this Wrath, Second attempts to beat First. While getting beat, First, who has been acting exactly as Father commanded, and seeing how everything he learned was for nothing, First says "Father, why have you forsaken me?" (recalling Chop Suey, from System of a Down - It seems to fit also in this movie). But the magical thing is that, if Father appear in that very moment, Second will magically also say "Father, why have you forsaken me?"

On the Internet I read that Lord of Flies book is a recommended reading in many schools. Nevertheless, I have never known about this book when I was a kid. If I ask to some of my literature teachers from school if they taught "Lord of Flies" book, they might blindly say Yes, and that I hadn't put enough attention. If that's the Truth, then I forgot it, but if that's a Lie, the education system is downgrading... Some schools might teach about this story, but if the message can't be spread, then it was for nothing, although the message might be inside somebody's psyche until it finds its way to fly out...

Some thoughts that people with a Second attitude will have after they saw this movie will be "Now we are adults. We are the soldiers." ( but not "We are the world. We are the children.") But if it is shown the real way, then they will say "Hey! Don't believe that silly science-fiction crap", or the most modern complain, "No girls! Too gay!" Now I know what some religions meant when they say "The origins of Universe and God are so simple, that we can't believe or understand them."

I can't help it, but I got INCREDIBLY AMAZED when I saw fight of Ralph and Jack in front of Piggy, and compared it with Sasuke and Naruto (respectively) ... Innocently, this movie has too many metaphors!

PS: Beelzebub is "Lord of Flies", and that term is related to evil... how many things have been taken as evil, but they weren't? ... ironically and funny, the next movie I have in queue to see is The Never Ending Story...

PPS: I want to play King Of Fighters and use Ralph's Galactic Phantom.

PPPS: This PPS thing was learned from Mary and Max movie... :-P