Archive for February, 2007
I have been working away at a problem related to japanese strings in a database, character encoding, and java servlets for the past week. Not continuously but the problem has resulted in an unacceptable amount of my time being consumed and even some emotional bruising (from the java sun forum). Basically, I was getting a utf-8 encoded string from the database and I wanted my servlet to return an html or xml page, also encoded in utf-8, containing the string. I probed my program at every step to determine when the data I was getting from the database (a byte array of utf-8 character values) was turning into “???????……”. Could not figure it out until just now. Even though I had this set:
I also needed to specify utf-8 encoding when I made my printwriter (how the html or xml page strings are sent out):
PrintWriter pw = new PrintWriter(new OutputStreamWriter(res.getOutputStream(), “UTF-8″));
yeah…that last little bit there…, “UTF-8″ was all I needed.
I am sooooo happy that I finally figured out what I was missing but…really…all of this time. It is things like this that make me think about my life on the time/production/satisfaction scales. If I were indexed I would draw some nice little diagram resulting from these reflections but…time to move onto other things (like double checking that things I think work now are *actually* working).
I have to find the right font.
This size is too big. My thoughts will seem too loud.
Maybe if I give this folder a funny name, the amusement will make me more eager to work on things inside.
Damn my yogurt cup is emptying – what happens then?
I need a log, which notebook? Oh maybe this one that I stuck a motivational sentence sticker on a long time ago. What does it say again?
I should wash my face this oiliness is distracting me. It’s like a film that is trapping productive thoughts inside.
Hmm I wouldn’t mind mapping this out on paper. It would be nice to have a new notebook lying around. Maybe even a moleskine. No maybe a moleskine would be over doing it. For now I will staple some foolscap together. Can I make it funky looking though? Maybe some ribbon…
Now which pen…I can’t use this one because I use it for studying kanji and can’t have it dry up too quickly. My gosh I have a serious lack of good pens.
I need to remember that it will not be written from word 1 to word N or even from section 1 to section N. Patches we need patches here.
Does the thesis get double spaced?
And can you plagiarize yourself?
It is warped. I find half of myself taking immense pleasure in distracting the other half from the task.
m1: oh let’s due some pushups!
m2: okay…1…2…3…oh crap, wait…
m1: ha ha fooled you but we might as well finish now right?
m2: well yes…I guess that would make sense…oh you, *blush* you get me every time
m1: it’s for both our own goods…
m2: can you be so sure about that?
m1: well, I won that round. As a reward, I get another 5 minutes of your time to write about it.
Does it count as working on thesis time if I go to LIVIN to get some office supplies I am seriously running on scraps here. I need:
- smooth pen
- notebook (2)
- post-it notes: bold colours, none of that pastel crap that makes ideas look like they have the flu
Omigod this is horrible. My dorm room wall is covered in this awful textured wallpaper. Awful because post-it notes do not stick. It could be because I am using 3 and a half year old post-it notes (heh heh bought when I was an eager fresh master’s student) but…I dunno. Add to shopping list above: white board wallpaper. This is Japan – they have to have it somewhere.
Oooo my neighbor just brought me cheesecake from Hokkaido (in the North of Japan) and I have to eat it today because it expires but if I eat this…I really have to giv’er until 11:30pm.
Last night: I started working on my thesis. From 7:30pm (okay 7:45 after I spent 15 minutes reorganizing my computer desktop space) to 11:30pm I stayed on the playing field. I got distracted and frustrated and confused a lot but for the most part I think I was playing the game. I did actually get some progress…I feel. Most importantly two things happened:
1. I left the thesis denial phase – note a new post category for thesis related things which you may see a lot of in the near future.
2. I am eager to meet that monster again tonight.
I love Jan Chipchase’s work and try to keep up with his site. He is a researcher for Nokia: travels around the word, observes mobile phone culture and takes a lot of pictures. What I love the most is his honesty. He brings to light interesting trends, habits, etc. but notes when there might be a bias:
Despite the rear area often being considered, in the words of a female clothing designer we interviewed, a ‘problem zone’, in Tokyo mobile phones and music players like the iPod (pictured above) are increasingly making their way into the back pockets of women. (…) Of course this ‘trend’ could merely be a result of me seeing what my male brain is hard-wired to see.
To note on women carrying their mobile or mp3 players in their back pockets:
1) The back pocket is used to state the worth of a pair of jeans. It is indeed a zone for personalization, for advertising, for expression. The mobile adds to this expressive zone – people will be looking there (for reasons other than hard-wiring in the male brain…I would be lying if I said I did notice back pockets).
2) Are women more attentive to things in their back pockets? Possibly due to self-consciousness (“is there something on my butt?”). I put my mobile in my back pocket when I am expecting a phone call or email that I cannot miss.
3) A mobile phone or mp3 player in the front pocket of women’s jeans/pants? No that doesn’t work.
Today – I used a hex editor for the first time.
K so I’ve had to deal with hex before but this is like…I used a hex editor.
If you spend a lot of time on computers or programming this might be a fairly insignificant event for you but for me – there is some strangeness to it.
Luckily it is helping me find answers. I am battling with character encodings in Java. I have to convert text (possibly Japanese) encoded in iso-2022-jp to utf-8 and it is only half working. Some characters (mostly hiragana but a few kanji) are showing up as ???. I’ve been able to figure out that in my program, characters are been properly converted from iso-2022-jp to their Unicode values. So it is a problem when going from Unicode to utf-8.
I’m sure this was really interesting for you all…
Oh! Last night after work I missed a train by a few seconds and in my frustration I bought this strange hot sweet red bean beverage from the station vending machine. I can’t remember the name but I will try to post a picture tomorrow. It was nice at the time but on reflection I don’t know if it is necessarily good to consume habitually.
Next entries »
It was pissing rain. I thought it was a sign. I am not ready for this race and now it is raining so the event will be cancelled and I will be saved. I checked the marathon’s website on my mobile at 5:30am – no notices. Maybe they forgot to update the site like they said they would. Well there is no harm in preparing and getting myself to Tokyo. By the time I arrive at Shinjuku they will have made a cancellation announcement and I will take a deep breath, think “oh that is too bad” and head back home. Heh – no.
Sometime after Yokohama I started spotting other runners on the train. Identifiable by plastic bags distributed to store our belongings during the race and RC tags attached to the laces of their running shoes. Getting off at Shinjuku station I tried to lessen my nervousness by observing the pre-race activities of fellow participants. Drinking sport drinks? Eating? What are they wearing? How are they tying their shoes? Stretching? What are those patches they are adhering to their legs and neck? I wondered about these things as I headed to the starting area. The entire way was occupied by marathon participants. I began to realize the crazy number of people who would be running today.
It was still pissing rain and I had no umbrella. I had to find truck #23 to drop my belongings off in. The crowds I squeezed through kept me relatively warm but I was still getting soaked. I can’t believe this. How will this affect the race? Why didn’t I buy a poncho!! I dropped off my bag, luckily received a large plastic bag with arm and head holes (free poncho) to wear during the race (luckily as I think I later overhead another guy asking why he couldn’t get poncho as the race guide said they would be distributed), then headed to block K, the last starting block; for slow people (?) and first timers. There was still another 30 minutes before the race would start. I jumped up and down a lot, I tried to stretch. I was quickly turning into an icicle. My jacket sleeves soaked through and stuck to my bare skin. I was wringing water from my 100円 shop gloves (k so I don’t have like…marathon gear) and wondering if my hands would be warmer with or without them. I thought I was going to die.
Around 10 minutes before the starting time, the people in the back of my block started a wave of hands in the air and “woooooh”. As it flowed ahead my frozen mouth managed to break into a smile and it actually made my whole body feel warmer for a moment. Maybe this would be okay. “But if it is going to be okay – I want to start…now!” The race started at 9:10 but being in the last block, we had to wait for more than 27,000 people (btw I am sort of guesstimating these numbers) to go before we would get to the start line. A large screen display a few blocks ahead showed the start line. The first people to leave – they appeared to just gun it. I wondered – how fast will people run? Am I just a jogger? Can I really “run” in a race?
We moved forward to the starting line slowly and anticipation grew. Some people hopped, jogged, others kept walking. As each block started it felt like a wave of energy would be passed to the blocks behind it. I was forgetting my coldness more and more. A woman was standing on her apartment balcony and as groups passed by she waved her arms and called out to them. Hundreds of faces looked up to her and cheered back, waving hands in the air. That one woman made thousands of people cheer on Sunday – that was incredible. Approaching the starting line I actually felt hot with happiness. This is it, I don’t know if I can do this or not but I don’t care anymore because wow this is so amazing.
The first 4km flew by. No I didn’t fly by, I was unsure of my limits so tried to keep a steady, comfortable pace the entire race. Given the comfortable pace, and my excitement over the event, I almost felt like I was just trotting down the streets of Tokyo. Like – no effort. I can’t get over how amazing the energy felt. I didn’t have to motivate or push myself. I was driven by the other runners, the yells of “ganbatte yo!!!” from the spectators, the sound of 60,000 feet slapping the ground. At points bands were playing – marching, bagpipes, taiko and the sound made my legs float. Passing under the train bridge a hilarious but polluting amount of men stopped to relieve themselves. I half felt sad and eww and half of me laughed at the rows of runners face up to the bridge’s cement base. Then a block of buildings with brightly coloured vertical signboards came into sight. A perfect representation of what I thought Japan looked like before I came here, it made me think “holy crap I am running through the streets of Tokyo”.
After 4km the initial excitement wore down a bit. I was thinking about my endurance. I know I can run 4km but what happens when I passed 7 or 8? This made the trip to 5km feel long but once I got there the realization that I was half done drove my energy back up. I felt like I was making relatively good time (for my standards) and if I continued at this fairly comfortable pace I could make it to the 10km in (almost ha ha not really) no sweat
I made it. Passing the finish line the runners slowed down to a walk and we followed each other down a path into Hibuya park where we were given heating ponchos to wear. I slipped mine over my numb body and entered the scramble of people getting Soy Joy bars, bananas and water. Past the refreshment row was the handing out of medals and then after that, the removal of our RC tags. I won’t even talk about the craziness while trying to pick up my belongings or drying/changing in a large theatre with thousands of other sweaty people. Let’s just say that eventually I made it home, ran a hot bath and laid there until the water was cool again.
By nighttime I was able to see my running time online. 01:03:27 – a shade quicker on the second 5km than the first. It is not very fast but for a first, I am really happy about it. I was incredibly uncertain over my ability to run the 10km so never pushed myself to hard. I did not spend a moment out of breath so I think that next time I will be able to pick my speed up a little more and maybe shoot for 50 minutes? I did experience some discomfort in my left leg. My hip was cramping up and near the end the cramps were crawling down my leg’s thigh. There were never any sharp or unbearable pains but I think I need to make my bottom stronger.
I feel a little bad about writing so much when I only ran the 10km, not the marathon, or even a half marathon but…the 10km was like, a mini-meghan-marathon. My mind is shooting for that full marathon someday but not anytime soon. I think I am a fan of these 10km races and when I get bored of them, that’s when I will consider going for the full marathon.