Skip to main content

129 posts tagged with "in-English"

View All Tags

Rationalism (I)

· 3 min read

“I want to be, if I can, as sure of the world (the real world around me) as is possible. Now, you can only attain that to a certain degree, but I want the greatest degree of control. I don't… I never involve myself in narcotics of any kind, I don't smoke, I don't drink… because that can easily just fuzz the edges of my rationality, fuzz the edges of my reasoning powers; and I want to be as aware as I possibly can. That means giving up a lot of fantasies that might be comforting, in some ways; but I'm willing to give that up in order to live in an actually real world — as close as I can get to it.”

James Randi (@8:03)

“Economists… forgive me, for those of you who play the lottery… but economists, at least among themselves, refer to the lottery as a ‘stupidity tax’. Because the odds of getting any payoff by investing your money in a lottery ticket are approximately equivalent to flushing the money directly down the toilet (which, by the way, doesn't require you to actually go to the store an buy anything). Why in the world would anybody ever play the lottery?”

Dan Gilbert (@6:10) via The German Component

“One great mistake (and maybe this is the legacy of the Romantic Era) is that we think that all the great feelings of transcendence that you might get in the face of a marvelous piece of art; or you feel in front of a landscape; or the wonderful, oceanic sense you have when you feel love for someone… we have this idea that somehow these are incompatible with being rational. And this is a great problem. There is nothing paradoxical about a rational man or woman falling in love or [swirling?] in front of a Michelangelo. These are the great, wonderful emotions of being an adult human being.”

Ian McEwan (@17:20) via Richard Dawkins

I love quotes; I collect them. Whenever I read or hear a sequence of words that strikes me as true, or as particularly beautiful, cunning or moving, I write it down. Oddly, I have to admit that I love discovering quotations even if the source is considered frivolous or unreliable, e.g. advertising. I guess that the mere realisation that someone else uttered, or put in writing, a thought that one has always regarded as useful or valuable is in itself exciting, no matter the agenda or the legitimacy of the author. In the last few days I have stumbled on these three wonderful videos in YouTube, all of them related to rationalism in one way or another; and I strongly agree with most of what they say. What do you think?

Getting FB3's design view to work with your MXML components

· 5 min read

For the past ten months I have been working on the same Flex/Air application. It is part of a larger, multi-tiered, multi-language project, of which the Flex subproject is but the front-end. (Actually, I have been involved in one of the other tiers, too, messing with a different programming language; not all my time has been devoted to Flex development during this year.)

Our Flex codebase is a nice instance of a complex, heterogeneous Air application to which probably more than twenty developers have contributed to date. A not-so-well-known Flex MVC framework is at the core of the architecture, and we leverage quite a good number of Flex components and Flash libraries from third parties. We do unit testing, code coverage and continuous integration.

Ever since I joined the team (when the guys had just upgraded from the beta 3 of Air to Air 1.0) there has been an odd issue with the Air project in Flex Builder 3: we could not use FB3's “design view” to preview the layout of the application or to edit our custom MXML components.

The problems were two. First, the design view displayed what looked like a blank canvas — sometimes with whimsical wireframe edges that seemed to represent containers and other children. But only a few of those children appeared (if any at all). Rarely their sizes and positions were right, or their actual contents visible (see the screenshot below). Only when previewing simple components that inherited directly from Flex standard components (and not from our own components) the result seemed correct.

The second problem was that when switching from code view to design view a pair of errors suddenly appeared for every custom font that the project uses (even if the project builds just fine in code view):

unable to resolve '/project/assets/fonts/customFont.ttf' for transcoding | project | line 195
Unable to transcode /project/assets/fonts/customFont.ttf. | project | line 195

We gave it a go at trying to solve these issues at the time (ten months ago), with no luck. It never was much of a problem, though. Not for me at least, since I usually prefer to work on code view, even for building layouts and style-tweaking (in design view FB3 is slow rendering your changes, and I'm too fussy with my code to accept the auto-generated MXML). But boy, was it annoying.

A few days ago I investigated these problems again for a while… and this time I cracked it. Let me share what I learnt, because I think it is not that obvious.

The main problem has to do with the limitations of the design view in FB3. As you probably know (because you bothered to read this far), MXML is just a more readable way to describe visual Flash objects. MXML is more intuitive than ActionScript to define the layout of your Flex GUI precisely because the nesting of XML nodes in MXML matches the nesting of visual components that those XML nodes represent. Actually, the Flex SDK compiles all MXML classes to intermediate AS. If you know that, you would presume that Flex Builder treats both AS classes and MXML classes in pretty much the same way. Well, it doesn't.

It turns out that the “design view” can render any MXML class, provided that all its ancestor classes (up to the first standard Flash component) are defined in MXML too, i.e. not in AS.

In our project we had the situation represented in the diagram below. Most of the “screens” or “pages” in our application are based (directly or indirectly) on a common class. That common class, in turn, inherits from some other class that is defined within the MVC framework. The problem was, that common class was written in ActionScript, thus cutting off the hierarchy of MXML classes that the design view in FB3 “understands”.

All I had to do was rewrite that class in MXML and keep the name of the file, changing its extension from as to mxml. It was a quick change: the class was short and I could maintain parts of the original ActionScript embedded within a Script component anyway. Note that no other changes were necessary, because the subclasses don't care whether their superclass is originally written in AS or in MXML.

As for the other issue (the problem with the custom font families), it seems that the design view can't load custom fonts unless they are defined as embedded resources in AS, i.e. not in separate CSS files.

Originally we had something like this:

<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml">

<mx:Style source="../styles/fonts.css" />

<!-- … -->

</mx:WindowedApplication>

Where styles/fonts.css contained:

@font-face {
font-family: "_DefaultFont";
font-weight: normal;
src: url("../assets/fonts/verdana.ttf");
}

@font-face {
font-family: "_DefaultFontBold";
font-weight: bold;
src: url("../assets/fonts/verdanab.ttf");
}

I removed the CSS file and embeded the two font families directly into the MXML component (which is less elegant, of course):

<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml">

<mx:Script><![CDATA[

[Embed(source='../assets/fonts/verdana.ttf", fontWeight='normal',
fontName='_DefaultFont', mimeType='application/x-font')]
private var thisObjectIsNeverUsedButItHasToExist_1:Class;

[Embed(source='../assets/fonts/verdanab.ttf', fontWeight='bold',
fontName='_DefaultFontBold', mimeType='application/x-font')]
private var thisObjectIsNeverUsedButItHasToExist_2:Class;

]]></mx:Script>

<!-- … -->

</mx:WindowedApplication>

I guess the moral of the story is: Adobe, we need a better IDE!

About personal challenges

· 3 min read

(The third and last installment of my controversial “Cuento agridulce de navidad” is sketched and coming soon. In the meantime, I need to share a thought now, before it vanishes from my Gruyère-shaped memory.) Yesterday officially marked the beginning of the spring term at University of London and all its colleges — among which mine, Birkbeck. Today I got a brand new teaching pack for the core course. During the next eleven weeks I'm supposed to read (and grok!) all this (and ideally should read much more)… in addition to roughly the same amount of reading for one of the optional modules.

…all the while attending classes, preparing a couple of short presentations, writing another two 3K- or 5K-word essays (and I haven't finished all my essays for the first term yet), starting to dive into specific readings for my final dissertation (due in September) and, when possible (hopefully!) attending some of the wonderful seminars and conferences that our department, the School of Languages, Linguistics and Culture has in the oven for this term. I forgot to mention that I also work full-time. Oh, and I'm addicted to the Internet. “Suicidal” is a word that comes to my mind often in these days. And here the thought. Because I risk sounding pretentious (once again), let me first say that with the grandiloquent term “personal challenges” I encompass all the human, worldly, modest enterprises that we pose ourselves throughout life. Unless you can find your own name in the pages of the encyclopaedias, your personal challenges most likely will fall within that vast array of propositions, projects and justifications that we use to invest our existence with some purpose. Your personal challenges are devoid of meaning but for yourself, often hardly noticed by anyone else, completely unknown to the cosmos. And yet, didn't you challenge yourself hardly enough, your life would not be a life but mere resistance. Every time I take up a new personal challenge (a difficult one, not one of the sort “this year I'll eat more vegetables”) I kind of say to myself that, once that's achieved, I'll relax, get a life, switch back from objects to people and become more “normal” (whatever that be). But that never happens; rather the opposite seems true. I feel like I've taken up quite a few personal challenges during the last three years. Some of them proved to be very difficult. At least they were to me. I have succeeded more than failed (or so I think). Annoyingly enough, I keep on cooking new personal challenges which, in my own little world, might well be the toughest to date. Will those be the most rewarding, too? Increasingly, I have the feeling that I'm spreading myself too thin. Does that happen to you? Where is the equilibrium? How do you decide whether a particular enterprise will make you happier or just waste your time? Does the mere fact that I'm reflecting on it and writing this into the wee small hours indicate that I'm damned beyond hope? Good morning.

Jero

· 3 min read

Watch the music video before reading the rest of this post.

How was that? Did you feel that something didn't quite fit in the picture? That is the music video for 海雪 (umiyuki, “Ocean Snow”) the first single by Jero (ジェロ), released last February in Japan. Jero is a young black American from Pittsburgh… who sings enka. Enka is a form of Japanese popular music which was at its height in Japan during the postwar period. Its main themes are loss, loneliness, unfulfilled love, even suicide. Female singers of enka have been especially popular. I can't help noticing some striking resemblances to Spanish copla; not only in the themes, but also in the staging, the perceived attitudes of the performers, their use of vibrato and the way both genres have gradually become regarded by their respective younger generations as “uncool” and affected. For samples of enka, watch 修羅の花 (shura no hana, “Flower of Carnage”), the beautiful theme song for 修羅雪姫 (shurayukihime, “Lady Snowblood”) sung by Meiko Kaji and later reused by Tarantino in “Kill Bill”; or listen to 川の流れのように (kawa no nagare no yôni, “Like the Currents of the River”) by Hibari Misora, which at some point was proclaimed “the greatest Japanese song of all time” (?). As Jerome C. White himself explains in an interview with CNN International, his maternal grandmother was a native of Yokohama who married an African American. Jerome was born and grew up in Pennsylvania, close to his Japanese grandmother, listening and singing enka even before he could understand the lyrics. Apparently, his debut has been a great success in Japan, where black urban cultures from the United States have been trendy for some years now (as one can gather by the surprisingly large number of shops selling hip-hop-related products in cities like Tokyo and Kyoto). This form of strong cultural hybridisation is still rather unusual in Japan. Although we can find similar cases in other countries, where an “outsider” is “allowed” to succeed in an area that is traditionally perceived as idiosyncratic to that culture, Japan is (still) among the world's most ethnically homogeneous countries. Of course, Jero is not the first performer of enka born outside Japan, but I don't think that there has been any other gaijin before him who brought such distinctive traits of race, nationality, culture and language with him to the genre, all the while being supported by the industry and the media. That said, I must confess that I can't see the influence of rap in his music. Would you have been able to tell, had you listened to umiyuki with your eyes closed?

The nature of Japanese cultural exports

· 2 min read

“In the rise of a new desire for Japan led worldwide by contemporary forms of popular culture, original creations made in Japan are sold to foreign TV networks and media conglomerates (sometimes largely participated or even owned by Japanese companies). Those cultural exports are in effect multimedia content in ‘new’ fields such as animation, videogames and pop music. Cultural content (‘software’) contrasts with the more traditional assets that Japan has been exporting, such as food, bonsai*, martial arts, poetry or, more recently, technology (‘hardware’).*

It is pertinent to ask about the special characteristics of those Japanese cultural products that make them desirable and popular far beyond the Japanese borders, and to reflect on ‘how Japanese’ they are, and in what ways.”

Two days ago I finished this short paper (“Considerations about the nature of Japanese cultural exports”, in PDF) for the university. It is part of the application process for the MA that I want to do this year. Yesterday my future professors confirmed to me, unofficially, that I am accepted. 万歳! (which translated into Spanish means, roughly, “la que me espera… me voy a cagar la pata abajo”).

Know where (not) to touch

· 3 min read

Via Kirai I stumbled on the results of this survey that collects information about erogenous zones. Apparently, thousands of men and women were asked to rank different spots in their bodies and the bodies of a partner — in terms of how much they they like to be touched, and how much they desire to touch the other, respectively. The study is interesting, but I found it somewhat annoying that it is difficult to draw what seems to me like an important conclusion: a comparison between where we think that the other likes to be touched and where he or she actually likes to be touched the most. The body maps provided show coloured zones, but it is difficult to compare women's guess to men's desires, for instance, because the variations in hue are quite subtle. Even if the images are displayed side-by-side, bare-eyed it is hard to notice any change at all in most regions of the body. I am always up for a bit of a Gimp-challenge. So I decided to try and edit the original images to obtain a better representation. This is my take on the results of the survey:

The hot colours (no pun intended) dye areas where we are not touched as much as we would like, so to speak. That is yellow, orange, pink, violet and red. In less academic terms, you could read cool colours, i.e. all shades of blue, as “will you put your hand off now”. I find it much easier here to identify those areas at a glance. Now there are some interesting results in here. Boys, did you notice those three orange/red spots in the female body? That's good news or what. Also, it seems that she doesn't like to be touched in her head and face that much, except that apparently you are not kissing her enough. Oh, and for some reason her right arm expects more attention than her left arm (?). About men, feet and knees look a bit frustrated, in contrast with the arms, which are asking for some independence and need more space, you know, to live their lives or whatever. Penises demand more attention (yes, even more). But not the scrotum. The scrotum is fine, thank you. The diagram below summarises the process that I followed using Gimp. The female images are used here, but the same applies to the other case. The single most important step, on the left side of the image, involves inverting the colours of the image that represents where women are touched, and then adding it to the picture that represents where women want to be touched. Effectively, we are substracting one from the other. The branch at the bottom simply emphasizes colours to make them more apparent. The steps on the top-center of the image produce black-on-white edges that are used as a frame so that regions of the body become more recognisable.

Reading and running

· 2 min read

As naïve and twee and theatrical as they may sound, and yet these words by Will Smith really strike a chord on me. I can relate to this exaltation of knowledge and self-discipline; mentally and physically. Lore in its purest form — books. Control through one sport, the sport.

“The keys to life for me are reading and running. The idea that there are millions and billions of people who have lived before us, and they had problems and they solved them and they wrote it in a book somewhere. […] There is no issue we can have that somebody didn’t already write a thousand years ago in a book. […] You know it’s in a book somewhere but you’ve got to find the right one that is going to give you the proper information.” “When you get on the treadmill you deprive yourself of oxygen. What kind of person you are will come out very, very quickly. You’re either the type of person who will say you’re going to run three miles or you stop the treadmill at 2.94 and you hit it and you call 2.94 3 miles, or you get off after a mile, or you’re the type of person that runs hard through the finish line and when you get to 3.0 you realize, ‘God, I could really do 5,’ and you go ahead and do two more. And that little person talks to you and says, 'Man, do you feel our knee? We should stop. I feel we should stop ourselves right now. This is not healthy anymore.’ When you learn to get command over that person on that treadmill, you learn to get command over that person in your life.”