Wednesday, September 03, 2008

Asterisks

Here's an anecdote from my high school days:

A classmate of mine was having a science report. I was seated 3 rows from the board. Our teacher was seated at the back to check on those who are not listening. As my classmate went on about her report, she scribbled phrases of words of the board, line by line. She was interrupted by my teacher on the middle of her long report. My teacher said, "Could you emphasize what you have written on the board?" My classmate then said, "What do you mean?" "Can you but bullets on what you have written on the board?" Then she looked at me and whispered, "I don't have an idea what am I supposed to do." I said, "Just put asterisks before each line of the phrases you've written in the board."


Then she said, "How do you spell it?"

:)

Tuesday, July 29, 2008

Why I like The Dark Night

I received a text message from a friend asking me how I find The Dark Knight (TDK). He knows I love watching movies and likes my points on what is missing and what works.

I replied, " The best. 5 out of 5".

Then he asked again, "Is it better than Batman Begins?."

"Yes. Way much better."

Then he said, "I don't like Batman Begins because it is too serious."

I said, "My only problem with Batman Begins is the action sequence. It gave me headache."

"I hope TDK is not too serious."

I said, "You will be surprised. It's definitely serious, I think you have been duped by Schumacher, you like it cartoony, and liked the Batsuit nipples."

"Hahaha."

--- END ---

It was Saturday when I watched TDK, I just woke up, no bath yet, cause I planned to watch the movie on its first showing at 10am. (The movie house is just around the corner). I usually rate a movie by how many times I go to the bathroom to pee. When I watched TDK, I never went to the bathroom for a second or even felt the need to.

Comic book movies has gone a long way, Iron was humanized, it was given a human treatment, like what if they really happen in the real world. TDK also has this idea, the acts are all about the now. The Joker is a maniac, like a terrorist and Harvey "Two Face" Dent is a charismatic public servant who would like to clean up Gotham. Bruce Wayne wants to get out of the costume, and supports Dent, so he could live a normal life. Also, this time around, all the characters have enough screen time to shine. Maggie, as the new Rachel Dawes, is a better replacement for Mrs. Tom Cruise.

It's not anymore the old colorful movie where kids get giddy at how beautiful the costumes of the villians are. This time, it was all about how human each characters are on the screen like we are living with a Batman somewhere and we are watching his biography. It is like watching Mayor Alfredo Lim-in-a-costume true-to-life story on screen.

I'm out!

Wednesday, July 23, 2008

Musing with Music

I have to do something before I go to sleep so I was thinking of posting another blog for the sake of having something new. I've been listening to a lot of new album lately, and unfortunately no local artists here. What has been my favorite so far?

Jason Mraz - We Sing, We Dance, We Steal Things
I was a fan of The Remedy and Geek in the Pink, but I had never listened to any of his album. Then an officemate of mine kept playing I'm Yours in the office for a gazillionth times that I was able to read the lines and found out how lovely it was written. Then I listened to his latest album, which is unexpected of Mraz. The songs from start to finish is very poetic and the melody is lovely. My favorites would be Details in the Fabric, which has the wonderful James Morrison as a guest, Love For A Child, which is about a life after maybe his parents' divorce, and Butterfly, which is a very very erotic and with a Marvin Gaye-vibe to it.

Alanis Morrissete - Flavors of Entanglement
I said to a friend of mine that Alanis makes beautiful music when she is heartbroken. The details are here in this album. You could almost here hear angry, lonely and happy. I always wonder how she makes a song out of those difficult sentences. This album also makes a very far distinction from her previous ones because there are fusions of electronica everywhere, and even a techno-inspired song. The words and the melody are good for the earbuds and made beautiful music.

N.E.R.D - Seeing Sounds
I not good with adjectives but the only word I can describe about this album is PERFECT! With catchy grooves and accompaniments, I can't help myself but dance to it. A perfect party music.

I'm going to sleep and I'm out!

Ciao!


Tuesday, June 24, 2008

Building Shadow with Prototype

We have projects that we have to tweak with JavaScript to satisfy our customers' meticulousness on how their site will look. I'm not a fan of some site designs which rely heavily on how the site looks but not much on how the site works.

I was handed a project with a stupid design where I get to place shadows on almost all boxes on the page and not to use tables, for SEO's sakes. So I have a hard time figuring out what to do.

First, I cut the shadows to use on Photoshop by areas, top-left, top, top-right, left, right, bottom-left, bottom, and bottom-right, cause the image looks like this:



The width and the height of the content grows, so a slice on other than what I had in mind would be impossible.

Next, I was absorbing the ideas of Prototype framework and scriptaculous, so I decided to use it. For scriptaculous, I only made use of builder.js. To equalize the height of the left and right areas, I found the code somewhere which makes the heights of 2 divs equal.

So the code:


function buildShadow(itemarea) {
var objBody = itemarea.parentNode;

objBody.appendChild(Builder.node('div', [
Builder.node('div', {className:'stop'} , [
Builder.node('div', {className:'sleft'}) ,
Builder.node('div', {className:'sright'})]
),
Builder.node('div', {className:'sinner', id: itemarea.id+'sinner'} , [
Builder.node('div', {className:'sleft', id: itemarea.id+'sleft'}) ,
Builder.node('div', {className:'sright', id: itemarea.id+'sright'}),
Builder.node('div', {style:'overflow: hidden;', className:'detailsarea'}, [itemarea])
]
),
Builder.node('div', {className:'sbottom'} , [
Builder.node('div', {className:'sleft'}) ,
Builder.node('div', {className:'sright'})]
)
]));


fixH(itemarea.id, itemarea.id+'sleft');
x = $(itemarea.id+'sleft').style.height.replace("px", "");
$(itemarea.id+'sright').style.height = String(x) + "px";
}

function fixH(one,two) {
if (document.getElementById(one)) {
var lh=$(one).getHeight();
var rh=$(two).getHeight();
var nh = Math.max(lh, rh);
document.getElementById(one).style.height=nh+"px";
document.getElementById(two).style.height=nh+"px";
}
}



The css:

.stop{
height: 4px;
font-size: 2pt;
background: url('shadow_top.jpg') repeat-x top left;
}
.sleft {
height: 4px;
width: 4px;
background: url('shadow_top_left.jpg') no-repeat top right;
float:left;
}
.sright{
height: 4px;
width: 4px;
background: url('shadow_top_right.jpg') no-repeat top left;
float: right
}
.sinner {
width: auto;
font-size: 2pt;
background: white;
}
.sinner .sleft {
background: url('shadow_left.jpg') repeat-y top left;
height: 100%;
}
.sinner .sright {
background: url('shadow_right.jpg') repeat-y top right;
height: 100%;
}
.sbottom {
height: 4px;
font-size: 2pt;
background: url('ishadow_btm.jpg') repeat-x bottom left;
}
.sbottom .sleft {
background: url('shadow_btm_left.jpg') no-repeat bottom right;
}
.sbottom .sright {
background: url('shadow_btm_right.jpg') no-repeat bottom left;
}



To accomplish the shadow, I make a call to the function, passing the object(div) as parameter:

buildShadow($("divIDHere"));


Downloads:
prototype
scriptaculous

Friday, June 20, 2008

The Innocent Man

Since I got hold of books by John Grisham, I have become attracted to legal thrillers. I have read countless of his books, except for his old ones like The Client, The Pelican Brief, etc. I started reading his books when my landlady hand me The Chamber. It was made into a movie but I wanted to read and know how good he is.

Fast forward, then came his first non-fiction book. When a friend of mine was in Manila, he told me that he was in Powerbooks and because he knows I read a lot of Grishams, informed me that The Innocent Man is out on paperback. I told him to buy me one, unfortunately, he doesn't have some extra cash. It was Midnight sale anyway in G-Mall so I decided to try my luck at NBS. Then I found the last 2 copies of the book. Without thinking of my budget, I bought it and hurriedly read it.

The element of thriller that are present in most of Grisham's book is still evident in the book. It was narrated in a manner that you will fell sorry for the protagonist and how he suffered the consequences of the crime he did not commit. The story then continued on his being misjudged and his life on death row. There are also religious aspects discussed on the book, on how Ron (that was his name) was denied by his church and decided to join another community. It all ended on the time of his death when he was diagnosed with liver disease.

It is a good read because you will get to realize that there are indeed injustices, not because of money or lack of it, but because people in power plays with it.

Thursday, May 22, 2008

Wednesday, May 21, 2008

Enjuto Mojamuto

This is one great Spanish cartoon, don't worry, it has a subtitle in English. Check it out

http://muchachadanui.rtve.es/videos/05-enjuto-en.html