martes, 24 de agosto de 2010

Autist Cowgirl

I saw Temple Grandin. It's a comedy movie, right?

She knows that humans care about cows because they are food, and so they will be killed. Nevertheless, she also thought that cows deserve some kind of respect. She also said that if she were to die, she would like it to be in the best and most peaceful way possible...

Have you read the previous paragraph? Many of you could think "Cows are not human. Why should we treat them as humans?" Well, I don't know what you could think about random citizens, workers and soldiers, but they also are/will be "killed" (citizens will be taxed, workers won't have enough freetime, and soldiers will go to wars), but that doesn't matter, because they are not cows, but sheeps of some big shepherds.

My favourite phrases from the movie:
  • People. I don't understand people ...
  • She thinks in pictures.
  • They mess with the perspective!
  • Think of it as a door ...
  • It's almost time for The Man from U.N.C.L.E.
  • Nature is cruel, but we don't have to be.
  • I touched the first cow as it was being stunned ...
  • I don't want my thoughts to die with me.

jueves, 19 de agosto de 2010

Pulpy Enough

I saw Pulp Fiction. I think this movie was made with several kind of people in mind, because part I didn't like much, I'm sure those same parts will be lovable for women, delinquents or polices.

Each one of these phrases are very related to parts I like. There are many phrases, so I only stated those memorable ones for me of the whole section:
  • Royale with Cheese.
  • Eenie, meenie, minie, mo.
  • "Please" would be nice.
  • All right, now, Yolanda!
  • ... shepherd. (I avoided the temptation of putting that complete "ending" phrase)
As dreamy and delightful as Kill Bill 1 & 2 were.

miércoles, 18 de agosto de 2010

Function's Name, Code and Usage Relationship

To show how important the relation between a function's name, code and usage is, let me show you this silly example using Python:

#Look this valid function definition:
def are_different(a,b):
return a==b

#This line looks nice. They are different:

if are_different(1,2):
print "1 & 2 are different!"
else:
print "Houston: we have a problem!"
#Huh? Where is the mistake?

raw_input
("Press [ENTER] key...")

(You can download previous code in this link. Double-click to run it.)

What can you see? It's fun to see how function name says one thing, and its implementation says another.

Conventions are important. It should be clear by reading any part of the code.

In validation functions, there are two possible values. True and False. Although you can choose to return the one you like the most, when you want to say that a validation has_failed or has_passed, it "should" be clear what value to use, shouldn't it? ...

Actions (or processes) should be according with names. Names should be chosen according to actions. "What you say should be backed-up with what you do." "Things you do speak louder than things you name."

Comparing this with Positivism, I like how inspiring messages are written, although they don't promote planning.

#300-private

martes, 17 de agosto de 2010

What Programming Languages contribute

Each programming language should contribute something new to the programming world, like some kind of new element to the structure of a program, to name a example. An inconvenient I have is that I still see sequential solutions easier to find than a structured ones.

My programming rabbit hole started when I was 14, with slight touches toMS-DOS command prompt. Then I lightly met FoxPro, then COBOL, until I hit Turbo Basic.

I learned that Assembly Language existed, the one I consider the genesis of imperative programming language style. When you notice that Assembler is essentially data movement and comparison, it's hard to imagine something like Warcraft coded in this language. Some time ago I learned that programs are based in a theoretical Turing Machine.

When I saw function and sub statements in QBASIC and the list of commands of the Help, I knew that something different was comming. Something called procedural or structured programming. In college, I saw DBASE III Plus (which I compared with FoxPro), Turbo Pascal and Borland C. I saw in the last two some resemblances to QBASIC, but declaring variables and importing libraries where something new to me.

In the university I learned what was the real importance of C and Pascal, why GOTO is evil, complex typedef struct, and recursion, that by itself was something too abstract for me, not to mention the fact that it's needed for some sorting algorithms (also abstract) like Quick Sort. I wish I had met SmallTalk and LISP at this time... I feel power and flexibility in LISP, but I still neither understand it, nor its macros.

In 1995, the first language I saw after QBASIC was HTML, but I didn't see some statements (no conditions, no loops, no variables). So HTML was not programming language for me, and I rejected it until I learned about JavaScript. Something interesting that I learned with JavaScript is that you can "store" function definitions in variables, but later I learned that what gets stored is a reference, and that C allowed this kind of assigment. About JavaScript events, I heard of the event concept with Visual Basic (QBASIC successor) and Delphi (Pascal's).

OOP... What a headache!! I was doing a lot of HTML, CSS, JavaScript and PHP, before I learned about OOP and Java. I saw C++ before, but I never saw something about Object-Oriented Programming on it. I learned that SmallTalk was an older OOP language than Java. Inheritance, abstraction, polymorphism, encapsulation, imports (I took them like includes, but later I learned that they are namespaces!), collections, threads, bytecodes, and patterns: all of these were part of the tsunami that Java was for me. Some interesting things that I tested with Java for Eclipse were Test-Driven Development and Source Navigation (like navigation in Internet)

If something was difficult after starting to learn Java, it was to learn CakePHP and the concept of MVC Frameworks. It's nice to jail a group of developers into conventions, but the problem is when the framework doesn't provide what you need in a way that is easy, accesible and well documented.

A problem I get with JavaScript is when I want to access some local variable, inside a function called from another function. In C# there is something called closures, designed to avoid this kind of problems.

I wanted to experiment something new, so I looked into Ruby, and then Python. I choose Python because of how it does things and it tends toward procedural and imperative styles easier. Not to mention Python IDLE. What I discovered is that code blocks are delimited by tabs or spaces, but the flexibility of its dynamic typing was a good pay-off for me. I later knew that FORTRAN was also space-delimited for code blocks. Python use import for namespaces, but here, they are are real plus!

The first time I heard the term lambda was when I learned what is the Haskell language. This is a concept vaguely experimented by me, but it's a pending one.

ASSEMBLY speed never will be 100% matched by compiled languages, but his drawback is his bad programming productivity.

FORTRAN was the most used language for Math.
LISP seems so flexible and so abstract that it looks boring.
C focus on Implementations to increase Portability.
SmallTalk was the first famous OOP language.

Now we have Haskell, Scripting Languages, C++ and Java. It seems like including several new libraries and constraints, and also change the semantics of old languages. But how could you use the power of LISP without never ever using parenthesis? or fixed-width? or brackets? or tabs? or begin/end blocks? If you can solve the problem of Hierarchy of Operators without using any of these block delimiters, please show me that novell discovery! But not bring another one.

Now, I think that the next step would be a language that could abstract or force segregation of the many individual areas of a program in a meaningful way. MVC Frameworks are a great example, but not wide and crystal-clear enough. I think that OOP is for Programming the same that Calculus is for Math.

There are things like SSH and HTTPS that are standard and globally "accepted". So, why can't some essential authentication structures come by default in some languages, just the same objects like System, String, Math, Thread, etc. exist?

lunes, 16 de agosto de 2010

Luffy Laughters

ALERT: Some One Piece Spoilers!!!

Many thanks to YouTube and those people who cut some of these clips. These really made me laugh!! But more importantly, many thanks to Eiichiro Oda and Toei Animation for making this lovely One Piece to happen!!

Meeting Crocus
http://www.youtube.com/watch?v=ZPDCu0IBVak

Ero-Camel
(Chapter 97, 20:29)

That Camel gets beaten
(Chapter 103, 15:58)

Zoro and Sanji wake-up 'kiss'
http://www.youtube.com/watch?v=WnldPHfOT78&feature=related

Zoro's Tarzan Call
http://www.youtube.com/watch?v=tGL2-9pcPfk

Nami hits a wolf
(Chapter 166, 15:38)

Luffy's Baka Song
http://www.youtube.com/watch?v=gQG0V2yHlEI

173: 13:58 "Funny Vehicle Horn"
195: 10:17 "Going Merry scared"
195: 15:41 "Zoro woke up"
200: 7:48 "Condoriano"
205: 2:14 "Sanji hugs Nami"
213: 4:22 Luffy eating a "cucumber"-like kiwi
242: 5:50 Iceburg Testament
258: 8:44 Nami dress-up on Rocket Man
285: 16:49 Nya Nya Song
290: 5:43 Sogeking's Shakeen!!
302: 9:20 Calling Usopp
303: 9:06 Luffy's Sakura Song
304: 10:05 Carring Usopp + Kabuto
307: 10:03 Sanji's Nyngou
357: 4:40 Ussopp's Best Fight
359: 8:50 Sanji's Spoiled Dream
408: 19:43 Luffy's Seta
409: 8:53 Luffy's Kintama
416: 7:50 Luffy's Binks' Sake
418: 18:10 Franky's Right & Left (after his sneeze)

No laughs, but worth mention:
24: Mihawk Vs. Zoro
26: Zeff & Sanji's Story
28: 19:34 Luffy's Best Gomu Gomu No Pisutoru
30: 16:19...19:08 Red Leg's Farewell to Sanji
37: 18:16 Nami begs a favour from Luffy
348: 20:46 Yoho hohó, Yoho hóho
414: 20:04 Sonia's Back is burning
419: 16:24 Coincidence?

Idea of a Web of Ideas

I was contemplating my sms_list, while I got the idea of a web of ideas. In this web, ideas can be compared and analyzed using synonyms and similar words, to make it easier either acceptance or rejection by applying the rule of the majority.

While I was thinking about that web, I took an example of somebody promoting the idea of 100% Perfect. but instead, I promote 99.99%. I imagined a situation on which a person says that my 99.99% idea is wrong, and that person let me try to explain it, and I choose an example of a wake.

I was trying to continue that story in that previous linear form, but I decided to transform it into a dialog. And so, I did this:

- Your idea is wrong. I can get the 100% of my plan.
- No plan is 100% Perfect.
- Ok. Explain it better.
- I will put an example. Imagine that you are in a wake. Take the opportunity to say some words in that wake and say 'I love God'
- I won't do it because you say it. I'm not your pawn.
- O.K., don't do it. Don't say that you love God. Even in that moment, you will hide your love for Him.
- Why don't you tell it instead?
- Because I don't feel it nice. Also, I'm no the one promoting the 100%
- What does it have to do with 100%?
- Somebody will give you a suggestion which is in concordance with the plan, but because it was exactly that person (me in this case) you will show, bring or find any kinds of blockade, errors and mistakes. You will dismiss the possibility that person shows, and so, that 0.01%.
- Well, to say 'I Love God' in that moment is not completely necessary.
- And there goes that 0.01% away... Also, while you execute your plan, alternatives appear...

It was a nice thought, but this sequence in my head impressed me so much, that I decided to plaster it here.

viernes, 13 de agosto de 2010

FUD

Ogg versus the world: don't fall for open-source FUD

I believe in Communties. The previous link could be the result of scrapping some FSF press releases, but if some things it shows are true, then they prove an Universal Law: that even Entities against some Forces will use any mean to get noticed, including means used exaclty by their Opposition or Enemies.

What to do if both bands have partners in both sides, partners that keep their rivalry ignited? In warfare, this is called Department of Intelligence.

What to do if every idea or action can be misinterpreted? This is because every good act have a bad point of view.

What to do if you try to achieve fame by every possible mean? Will you do a wrong action because your point of view is the right one?

The only True Truth in this Universe are those Needs we will always have.

Manga War

Best Manga Review: Pluto
http://bestmangareview.blogspot.com/2007/12/pluto.html

I have read Pluto manga. The previous URL inspired me to re-read it again, so I went to OneManga... What a big surprise! They don't offer the manga anymore!

Many other online-reading manga websites have been blocked, and are prohibited to show mangas.

This is my anger.

This is the kind of action that characterize Japanese. This kind of mentality have earned my atomic bombs. :-@

It is like the battle between Open Source and Paid Software (Copyright vs. Community). My solace is that Black Market will always exists. I thought they would improve lessons from Linux, instead of going totally backwards.

Pluto and Robots, equals money.

We users can show our gratitude and pay a fee, but is not acceptable for me to buy the physical manga version, and to wait for those "big robots" to translate our beloved mangas.

Could it be a pressure from U.S.A.? Or an egoist Japanese Nationalism? Or are they zealous because they couldn't see the idea of a big community of international manga evangelists coming through?

Instead of giving merit to those websites that helped them to spread fame, they try to remove or ban a possible right or opportunity.

Unless, of course, that you, "big robots", want to centralize online manga and scanlation.

Next match will be: Anime War.

jueves, 5 de agosto de 2010

Extra Comma

Middle-Square Method vs. Linear Congruential Generator. Two methods for generating random numbers... TIMTOWTDI.

A friend of mine (Puntiel) and I were analyzing a common problem that I have named "Extra Comma". When you elaborate a query to insert several records at once, each input should be separated with comma, except either the first or the last one.

A similar problem also is presented when you should separate several web links with the pipe character '|'.

I think the best way to do this is by using a flag boolean to indicate if it's either the first or the last data, but its easier to indicate the first data.

$isFirstTime = true;
$comma="";
while($data = get_value($rst)) {
$output .= "{$comma} '{$data}'";
if($isFirstTime) {
$comma = ",";
$isFirstTime = false;
}
}

Although I believe that's the ideal way, I don't like how it looks. So, I modified it a little bit.

$comma="";
while($data = get_value($rst)) {
$output .= "{$comma} '{$data}'";
$comma = ",";
}

I chose this one because I didn't find that comma re-assignation as expensive, and also it's easier to read. But my friend prefer this method:

while($data = get_value($rst)) {
$output .= ", '{$data}'";
}
$output = substr($output, 1);

He says that his method is faster than mine. It could be true, because we are not benchmarking anything. But I don't believe that 'substr' is faster than:

while($data = get_value($rst)) {
$output .= ", '{$data}'";
}
$output[0]='';

TIMTOWTDI ("Tim Toady") as you can see. When performance is an issue, these trivialities become important. But, only a benchmarking for both, processes and network, shows when those modifications gives us a real gain.

lunes, 2 de agosto de 2010

Memento of our Society

I saw Memento.

Good and Evil are playing with all of us humans.

Although we have no vision, we should have a system to test or define our direction. But, any system can be sabotaged.

It's not to choose the best thing for one person, or a country, but for the whole world.

We still keep playing inside this kinder-garden bubble that we (we) have called Earth.

The sad part of all this is that, even if Earth explodes, it will be so hard to reconstruct this knowledge again.

20100813T1103: In another point of view, a possibility I also explored is how could we misinterpret old or former memories or facts of the past with our limited memory. It could also mean that it could be a mistake to try to seek the origin of everything with our current level of development, because we can take that complete beginning as all wrong, as we normally do every time we see any "better" alternative or suggestion.

My Highest Thanks

These are three paragraphs I wrote some days ago. I tried my best to express my feelings with them; although they will never be enough to express what I really mean, I wrote them because I don't want to forget them.

"First, I want to thank THE CREATOR, for letting me be able to live the life I have. I know it could be better, but also it could be worse! Sometimes I make this big mistake of forgetting these thanks, but it's because I'm too busy trying to not repeat many of terrenal mistakes, and trying to take note of them. Someday, I could help someone using these notes, or someone could help me to improve my actual status in life that I have defined within these notes. [20100727T1247]"

"Second, I want to take this opportunity to give thanks to all the people capable to create art. Art that digs out from deep of ourselves those feelings of joy, fun, happiness, shame, sadness,... all what makes us still feel human and not robot. Feelings that keep us pushing our limits: writing, painting, music, movies. All my depressions from my former jobs were aliviated by the Art, and the actual one won't be the exception, nor the future one! Thank you all! Like Love, Art will never die!
[7 ARTS]: architecture, sculpture, painting, dance, music, poetry, cinema,"

"Third, I want to thank all and every one of the people who helped me and made possible the level of understanding that guided me through this life. Each one of them put something in me, but I won't name them all because I'm not still on the podium. ;-D
[20100820T1230]"