MonthMarch 2011



Day 77

330. That’s how many pictures I took in Paris after going through every picture. If I didn’t go through them, I’d have 475 pictures. From the Basilique du Sacre-Coeur, to the Notre Dame, the Eiffel Tower, the Musee du Louvre, and the Arc de Triomphe. It wasn’t very hard to take tons of photos in Paris because all the tourist attractions were just so beautiful.

After being in Europe for over 2 months, I finally visited Paris three days ago. Going to Paris is something that many people in North America (probably the world too) dream to do. I woke up early in the morning for my train from Stuttgart that left at 7 and met up with my friends from Bosch.

On the train, sitting together proved rather difficult because that went against the preassigned seating provided by the French TGV. We tried our best to find vacant seats, but in the end, two of us ended up sitting elsewhere. I managed to sit with the rest of the group for the duration of the train ride.

Along the way, the train passed through the French countryside. Only farm fields separated Paris and Stuttgart, with the exception of a few cities and towns. We joked about how the only things in France were farm fields and an Eiffel Tower. After a four hour journey, we arrived at the eastern train station in Paris.

The train station in Paris set my first impression the city. I didn’t see Paris in the beautiful setting that all the tourism advertisements showed. Seeing that the first place I go to in any city is often the train station, I ended up basing my first impression on that. To my surprise, the metro here lacked the maintenance that the trains in Stuttgart got. In general, the trains looked much dirtier and vandalized in more places. I saw graffiti in all of the train tunnels, and beside all the train tracks. In some areas, the station smelled like a dirty washroom. The trains themselves looked very old as well, but that’s just aesthetics. One of the trains even used tires and not train wheels, so it ran like a bus on train tracks. Despite this, the metro served as our only means of transportation within the city. We took the train to our first destination.

Our first destination was the Sacre-Coeur, a basilica located on the summit of butte Montmartre, the highest point of Paris. Unfortunately, the Sacre-Coeur was not exactly in the best part of town. The enormous amount of street performers, street vendors, and people trying to get me to donate money caught my attention right away. They really liked bugging the foreigners. I guess they think that if foreigners can afford to come to Europe, they must have lots of money. Some of them were like pushy salesmen that wouldn’t leave people alone. Some of them even know how to greet people in different languages. I heard them say phrases like “ni hao”, “konnichiwa”, and “arigatou”. I wondered about how many more of these people there’d be at the Eiffel Tower, when I already saw of many of these people at a lesser known landmark. I tried my best to ignore these people and focus on where I was, the Sacre-Coeur.

Looking at the basilica from afar reminded me of the Dom in Cologne, but this place was a little smaller. Unfortunately, the church did not permit photography, otherwise I’d post pictures of this place. I must say though, after seeing the Cologne Dom, this place didn’t seem that special to me.

When we left for the Notre Dame afterward, we passed through the poorer part of town. For some reason a big crowd of people stood outside selling prepackaged food that one could get from the supermarket. Why would they end up selling the food that they bought? Or maybe they never bought them at all.

Our next destination was the Notre Dame. The Notre Dame was one of those places that almost everybody knew, so many tourists visited it. In fact, there were so many tourists there that the city decided to post armed guards wielding FAMA’s at the site in case anybody tried to cause trouble. Like many other European churches, the church also had the old European design. The design here definitely rivaled the Cologne Dom.

The Notre Dame was situated beside the Seine River, so the natural next thing to do was to walk along the Seine. Unlike the Rhine River, the Seine was a lot more polluted. As we walked, I saw many more street vendors, but these ones sold retro photographs of Paris, post cards and various antiques. In the distance, we could see the Eiffel Tower. Before heading there though, we went to visit the outside of the Louvre. Seeing the pyramid in the courtyard instantly reminded me of The Da Vinci Code, when they revealed the location of the Holy Grail. Further outside the Louvre was the Arc de Triomphe du Carrousel which was a smaller arch that served the same purpose as the Arc de Triomphe. Further down the road, was an obelisk that Napoleon once took from Egypt during the Napoleonic Wars.

We walked along the Avenue des Champs-Elysees to the Arc de Triomphe, but before getting there, we had to hurry to the Eiffel tower so that we didn’t miss the time we reserved online. Because of our reservation, we didn’t have to wait hours like everyone else. Hundreds, if not thousands of tourists waited their turn. As I expected, there were a lot of street vendors here too, but the ones here weren’t as pushy.

In every picture I’ve ever seen the Eiffel Tower looked so small, so the sheer size of it total surprised me. At the base of the tower, I tried to take as many pictures as I could of the tower using the photography knowledge that I crammed the night before. Hopefully, my pictures turn out really well.

The view at the top of the Eiffel Tower totally struck me in awe. One could see as far as the eye could see. I pretty much saw all of Paris from here. In the distance, I could point out some of the landmarks such as the Louvre, Seine River, Arc de Triomphe, and Les Invalides. I also saw how the streets were laid out in the whole city. It differs a lot from the modern urban planning in the way that the roads don’t form grids. They seemed to go in random directions. No wonder it was so hard to find where we were going at times.

I could even see rain clouds slowly moving toward us. We didn’t choose the best day to go to Paris, but we couldn’t exactly predict the weather a month in advance. On the way down, it rained pretty hard, but it stopped about two hours later.

In the evening, we decided to go for a drink at a local cafe, since we were all so tired from carrying our things and walking around all day. Looking at the menu, I found that the price of beer is very high. In Stuttgart, I typically pay around 3 to 4 euro for half a litre of beer, but here, it costs 8 euros. That makes sense, I guess. Stereotypes do say that Germans are a lot more crazy about their beer than the French. I ended up trying a beer called Saint Omer. I don’t really know how to describe the beer so I can only really say that it tasted quite good, but not as good as German beer though.

After our little break, we went back to the Eiffel Tower to take pictures of it from afar. As the sky began to darken, the tower lit up. It must look even prettier at night. Unfortunately, we didn’t stick around to see it.

We went to the hostel since we were all so tired. For dinner, we ate baguettes that we bought from the local supermarket. And since we were in France, we had to have a bottle of wine. From the window, we could see the Sacre-Coeur.

After dinner, we went around some more to see what Paris looked like in the night. Because of the rain earlier, the wet cobblestone roads reflected the lights nearby. We stopped at a bar for a quick drink before heading home. This time, I ordered a beer called an Amstel. It had quite a strange after taste. By about 11:30 pm, we were all ready to sleep because we all woke up so early to catch the train and walked around so much, so we went back to the hostel where would recharge before continuing our journey the next day.

Little did we know when we organized our trip to Paris, this weekend would fall on the time change for daylight savings time, and as a result we had one less hour in Paris. We just slept one hour less to make up for it.

In the morning, we woke up early to get to the Louvre when it opened to avoid the enormous line up that we saw the day before. After passing the security check, we went to get our tickets. To our surprise, residents of the EU could get admission for free. I showed the ticket staff my work visa and got my free ticket. That saved me ten euros.

The main highlight of the Louvre was probably the Mona Lisa by Leonardo Da Vinci. I don’t think many people know why the painting is so famous, and I don’t either. Like everyone else, I went to see it purely because it’s famous.

The whole area we were in housed many Italians and Spanish paintings from the Renaissance. I didn’t understand any of the paintings, but I noticed that people back then really liked to paint about Christianity. A lot of the paintings showed Jesus on the cross. In other paintings, they really liked to paint naked people. Naked men, women and kids showed up in so many paintings.

The next group of exhibits we went featured art from the Americas, Africa, and Asia. They displayed mostly sculptures from various native groups living in the area a long time ago. It was quite interesting to see the difference in art among all these cultures.

Afterward, we looked at the section on Egyptian art. Here they showed various relics left over from the Ancient Egyptian civilization. They displayed various styles of sarcophagi used in the past and also urns of mummified remains. Among all the relics, the ones they showed the most were the stone tablets and papyrus paper with hieroglyphics written on them. I don’t know what any of it means, so for all I know the writing could just be something ordinary like, “today I went fishing by the river.”

At this point, we realized that the museum was so large that we wouldn’t be able to get through it all. So we looked at the map and chose to see what we wanted to see most.

We then arrived at the exhibit about French culture from the 14th to 17th century. The decorations in the rooms was decorated the same way as the old French style and it made the room look so beautiful.

Our next exhibit was Ancient Greece. The majority of items here were statues of the Greek Gods. These statues were pretty much everywhere, but they were all interesting too. It goes to show how devout the Greeks were when it came to worship.

The next item on our list was to find the Code of Hammurabi. Along the way, we went through the exhibit for Mesopotamia. Although not far from Greece geographically, their culture differed immensely.

When we arrived at the Code of Hammurabi, I saw a giant stone, but on it were a set of laws inscribed into it. It basically spoke of the consequences of actions that people did. A lot of it resembled the principle of “an eye for an eye”. For example, if a builder builds a house collapses on its owner, then the builder shall be put to death.

After being at the Louvre for about five hours, we were ready to leave. We didn’t even see half of the museum. I’m sure there are people that stay there for like ten hours or something. I even saw people sitting down with their artboards and drawing the sculptures they saw. As we left, we saw a huge crowd of people waiting to get in. I’m glad we went early. We barely waited at all.

After leaving the Louvre, we went to the metro to make our way to the Arc de Triomphe, located on the Avenue des Champs-Elysees, the rich district in Paris. It is a monument constructed for Napoleon to showcase his triumphs. It stands in the center of the Place Charles de Gaulle. The monument also honours the soldiers who fought and died for France during the French Revolution and the Napoleonic Wars. Also there is the Tomb of the Unknown Soldier from the First World War.

The flame at the Tomb of the Unknown Soldier is always lit. It serves as a memorial for all the soldiers killed in action who could not be identified during the First World War. I went up to the grave to pay my respects and gave him the traditional three bows that the Chinese typically give to the deceased.

Also there was a plaque of Charles de Gaulle’s famous BBC radio speech to the French people in 1940, telling them not to lose hope, and that the war does not only affect France, but rather the entire world.

The arc also named the major victorious battles of the Napoleonic Wars. The inside walls of the arc name most of the generals who served under Napoleon and the names of those who died are underlined.

When we were finished at the arc, we went back to the Eiffel Tower to get one last look of it before leaving. On the side of the tower were the names of famous French engineers. As an engineer, myself, I had to look at each name to see which ones I recognized. I ‘d say I knew about a quarter of them. They were people like, Lagrange, Carnot, Ampere, Fourier, Clapeyron and Laplace.

While we all took more pictures of the tower, we had the idea of getting our French friend to wear the stereotypical French hat and hold a baguette while we took pictures of him with the Eiffel Tower in the background. It was so stereotypically French that this teenage girl got so excited seeing that she wanted a picture with him. We joked that if working at Bosch didn’t work out for him, he could make a living taking pictures with tourists in Paris! We stayed there until it was time leave for our train back home.

Paris was quite a beautiful city to visit, especially in the tourist locations, but some parts of the city were quite dirty, especially on the metro. That part of the city I didn’t really like, but the rest was amazing.

On the train, I tried to go to my assigned seat, but unfortunately a family had taken up all the seats there. I didn’t want to make them all find new seats, since I knew how hard it was to get everyone to sit together as a group without reservations, so I went to find an empty seat instead.

On the way home, due to some technical difficulty, the train made an unscheduled stop in the middle of nowhere. This delayed us by about twenty minutes and we all wondered how we were going to catch our connecting train. We found out later that our connecting train was going to wait.

As we crossed the border, the police came by checking people’s passports. In the entire wagon, only one of my friends and I were checked for passports. They did that probably because of the fact that we looked foreign.

As the train got closer and closer to Stuttgart, I was reminded of the fact that I’d have to go to work the next day and that I’d return to my usual routine once again. At the same time, I felt really good about the fact that I can now cross off another place on my list of places to visit.

My Picasa Album for Paris


A Time of Firsts

Day 69

I gotta say, I was pretty spoiled before.  Not in the way of material things, but more the fact that my parents did all the cooking, laundry and pretty much all the other house cleaning chores.  I don’t think I ever had to set foot in a grocery store either.  All the food my mom bought and cooked, I ate.  She even took the time to make the food that I liked to eat.  That all changed when I came to Germany.  Well, it’s been a time of firsts.


To state this bluntly, I can’t cook.  I came here without knowing one of the most critical things to keep myself alive.  In order to avert the crisis of me starving to death, I had to learn this crucial skill.  I already know how to cook like eggs, bacon, and pasta (but not the sauce, unfortunately), but it’s not like I really know how to cook.  I can’t eat that stuff everyday either.  I remember during my first few weeks here, I researched online for different recipes.  I sucked so much at cooking that I didn’t even understand what I was reading.  Marinate? Sautee? What?  Instead of following recipes, I took a different approach.  I started with the easy stuff.  Potatoes.  I was so bad that I even cut myself the first time I tried cooking potatoes.  I think I’ve gone a long way since then.  Now I know how to marinate my meat (thanks to my mom for teaching me that over VOIP), and how to make sauces like curry.  It doesn’t sound like much, but I probably quadrupled, if not tripled my cooking knowledge.  I want to learn some more like how to steam my own fish and cook rice with a stove (too bad I don’t have a rice cooker).  I am by no means a decent chef at all, but it’s a start.

Grocery Shopping

I wasn’t so clueless in this regard, but it didn’t help when I couldn’t read any of the food labels in the supermarket.  Luckily I installed an English-Deutsch dictionary app on my phone before I left Vancouver.  The app saved me so many times already.  It was kind of like, “What the hell does this mean?”, type type type, and then “oh, so that’s what it is”.  I think I ended up eating nothing by sandwiches for almost a whole week.  I mean, I can buy eggs, sausages, bacon and all that, but I had no idea what canola oil was called.  The dictionary didn’t help here, unfortunately, since they used a different word altogether.  Eventually, I figured out everything, and now I’m buying all the food I can eat and more.


My flat doesn’t have a washing machine, and I wasn’t about to pay to go to the Laundromat.  I didn’t even know where it was either.  I knew that my mom occasionally washed some clothes by hand and so I consulted her on how to do it.  Her instructions sounded simple enough, but I needed to go out to buy laundry detergent.  Problem: I didn’t know what that was called in German.  I looked it up on my phone and found out.  I thought it’d be pretty straight forward after knowing what laundry detergent was called, but I was so wrong.  I went to the laundry section in the store and saw about fifteen different brands/kinds of detergent.  I had no idea which was which.  I stared at the wall of items for about twenty minutes while looking up various words on my phone before I knew which one to get.

Planning Trips

Since I’m here, I must take the time to travel around Germany and its nearby countries.  Before doing that however, I had to look up the places I wanted to go.  How do I get there?  How much will it cost?  Where will I stay?  Only two methods really exist for transportation: train or plane.  To book a ticket for travelling, I had to use the Deutsche Bahn website and that site confused the hell out of me for the first little while.  But now I know.  Booking flights should have been quite simple, except for the fact that the discount airlines don’t fly out of the major airports.  Now I had to think about how to get myself to one of these airports.  Seeing that I’m not made of money, I try to optimize costs everywhere.  50 euro a night for a hostel?  No way, time to look for something cheaper.  30 euro?  That’s a good deal.  Despite all this planning, I’ve gone to so many places already, and I still have not exhausted my list of places to go.


Stereotypes say that Germans like to drink, and it’s totally true.  Although, it’s not really my first time drinking, it is my first time making a habit of it.  Every Thursday is my drinking day.  Sometimes Saturdays too.  I’m never looking to get hammered, but I find that drinking beer and socializing is just super relaxing.  Typically, I try a new beer every week, but a lot of times I just order my favorite beer, Hefeweizen.

Living in Another Country

This is the first time I’ve ever left home for longer than a week.  I used to live on residence at the university, but I went home every weekend.  I could go home every weekend and enjoy my mom’s wonderful cooking.  I have no such luxury here.  I often find myself craving the things I’ve temporarily given up in order to be here.  Besides missing family and friends while over here, I started appreciating the little things.  It’s just things like sleeping in my own bed, sitting in my own computer chair, and eating Chinese food.

Dealing with A Landlord

I always thought a landlord was just someone you pay so you can live in their house, but I learned to realize that it’s not only that.  A landlord is analogous to a dictator (but obviously not as bad).  They pretty much have total control over how I like to live in their space.  If they’ve got a problem with something I’m doing, they’ll tell me and I have to change my habits for them.  Just like the time where I showered too long.  Luckily, my landlords are pretty nice people, but I could have been really unlucky and gotten some mean ones.  Maybe the mean ones might even try to kick out their tenants if they didn’t like the way their lifestyle.

Goal in Life

Day 68

During lunch, I spoke with a colleague about how I my work term was going so far.  I told him that I didn’t really have a huge interest in Microsystems, but I didn’t hate it either.  I feel more or less indifferent towards the subject.  Because of this, he asked me what I wanted to do.  What field do I want to work in?  What kind of work do I want to do?  Do I want to stay in research or go into design?  I didn’t really know how to answer those questions.  This colleague is older than me by probably seven or eight years so I was quite sure that he had been through the same ordeal at some point.

A lot of advice people typically give are similar in the way that they just say to follow one’s own interests.  Apart from saying that, he also asked me what my goal in life was.  He clarified his question by giving examples such as being super rich, or doing something that people will remember me for when I die.  I already knew my answer to this question.

My goal in life isn’t anything grand.  I don’t need to be able to afford a Porsche or a Ferrari.  I’m not looking to change the world.  My goal is just to lead a happy life.  Well everyone wants that.  But different thinks make different people happy.  For me, it’s the idea of leading a chill life, not how many Porsches and mansions I can buy.  As I said before, money can’t buy happiness, but the lack of money can’t either.  I believe it’s about having enough money to not have to worry about it.  Yeah, rich people don’t worry about money, but that’s not what I’m referring to.  Take my family for example.  My parents own a house, two cars, and are able to send both my brother and me to university.  When we go out to eat, we don’t have to worry about the money.  I’m not talking about only these things specifically.  It’s about not having to worry about every penny being spent.  People don’t have to be super rich to do that.  In a way, it’s like always having enough money to go out with friends for a few beers.  I suppose with a goal like this, I chose the right major.  The next question is what field in engineering I will work in.

After I told him the way I wanted to live life, he told me his view on it.  He started by saying how he didn’t like staying in one place a lot and likes a change in scenery every now and then.  He was born in Germany, but he’s worked in the Netherlands and in Switzerland.  By going to all of these places, he’d get a lot of life experiences and moving around is what he enjoyed.  He’s following his interests and that is certainly good.  He then added when he’s old and sitting on his rocking chair, he will be surrounded by his grandkids that would ask him about his life.  He wanted to be able to tell the kids stories of his youth and listen intently and enjoy his stories until the kids get tired and fall asleep, but he would know he lived a fulfilling life if the kids come back again and again to hear him talk about all the adventures in his life.

I never heard anyone put it like that before.  Everything he said seemed so profound and I probably did a really bad job replicating that here, but the stuff he said really got me thinking.  From something like my future career path, he managed to dwarf that entire issue and expand it to the idea of how to live life.  Telling interesting stories to my future grandkids sounds pretty cool to me.

Factory Outlet in Metzingen and My Unexpected Discovery in Stuttgart

Shopping at the Factory Outlet in Metzingen and My Unexpected Discovery in Stuttgart

Day 66

After learning from a colleague that a factory outlet existed in Metzingen, I organized a trip there with a few of my friends from Bosch. I was told that this place would have lots of brand name items at really reduced prices. I guess that is similar to the factory outlets in the United States. But even at the reduced prices, the items are still quite pricey. I suppose that this is good for people who really want their brand name clothes. Unfortunately, I only bought a t-shirt since I couldn’t find anything else I liked here. But a friend of mine did manage to buy a pair of shoes for 35 euro when its original price was 180 euro.

Not satisfied with my shopping experience in Metzingen, I decided to continue shopping in Stuttgart. The people that I were with were pretty much done shopping for the day, so I went on my own. Going places alone just gives me so much freedom. It feels quite nice. Being tired already from walking so much in Metzingen, I finished shopping in Stuttgart an hour and a half later. On my way home, I found something that I had been searching for for the past little while.

I found a place that serves Chinese Dim Sum and Hot Pot. This is like a taste of home. Looks like I’m going to have to go here soon, even if it is quite expensive for a restaurant (14 euro). Judging from the restaurant’s banner, it doesn’t look like westernized Chinese food either! Fantastic surprise for me.

Fighting the Food Coma

Lately, I ran into a little problem where I had the ultimate urge to sleep whenever I eat a meal.  Whether it was breakfast, lunch, or dinner, I’d feel like sleeping afterward.  Even though I sleep plenty every night, I couldn’t seem to fight this urge to sleep.  Luckily I found a sure-win method.  I don’t know how good it is for my health though.  I figure that if I get sleepy after I eat, it’s because my blood goes to my stomach to aid digestion, hence a blood shortage in the brain and thus giving me the urge to sleep.  By holding my head in a position tilted such that the elevation of my head is below the elevation of my heart, I can get the blood flowing to my brain.  I hold this position for about 15 to 20 seconds and I sit up straight again, feeling refreshed and awake.  Works every time for me.

TVB Drama Must Haves

There’s a stereotype that says in Asian TV, the characters always like to cry and argue and whatnot. It’s totally true. I’ve seen many TVB dramas over the years and I’ve come up with a list of things that almost every single TVB drama must have.


Conversations between characters are seen by other characters and are taken completely out of context. When the conversation is taken out of context, people get angry and then arguments happen.


After a misunderstanding, usually the angry character begins raging at somebody, not realizing that there was a misunderstanding in the first place. What’s worse, they don’t believe what other people tell them and thus, the argument continues.


Because the arguments got so intense, people start crying. Usually the characters who have felt wrongfully accused by the one is angry.

Love Triangles

This is yet another cause of crying in these dramas. In every show, there are always at least 2 girls who like the same guy. The most random one was when a guy dated his cousin (who has later revealed to have no blood relation), but his adopted sister secretly liked him too.


Although, in a way, I’m kind of saying, "Every action movie has explosions", and yes it’s true that every story has a conflict involved, but the plot devices TVB uses are the same over and over. I’d like to see a show where eavesdropping or love triangles don’t happen or something. Despite this however, there are some shows that are still very amazing to watch. The amazingness comes from the dialogue people have during the arguments. For example, in Heart of Greed and Moonlight Resonance, the arguments people made were logical and well thought out. It didn’t feel like they were arguing for the sake of arguing.

125 Years of Bosch

125 Years of Bosch

Day 63

This year, the company celebrates the 125th anniversary of the company’s founding as well as the 150th birthday of Robert Bosch. Because of this special occasion, the company created a photo book, known as Global Impressions of Bosch and in it, are 125 photographs of Bosch employees from all over the world taken at the same instant.  This book was given to every single employee, or associates as the company calls us, as an appreciation for all of our hard work.  I flipped through it, and I have to say, there are some really nice pictures.  I also found the pictures online in the form of YouTube videos (link at bottom).  I really like the idea of getting all the pictures at the same instant.  They managed done to pack as much as they could about Bosch at the exact same time.  It’s like they say, each picture is worth a thousand words.  With 125 pictures, that’s like 125000 words.

YouTube Videos:

Bosch News:

Paying for A Washroom

Day 62

Apparently, it’s common in Germany to have to pay for using a washroom.  I saw this at a train station and it surprised me.  It cost fifty cents just to use it.  Coming from a place of free washrooms, I refused to pay this fifty cents and I waited until I found a free one.  Another strange thing is that the washrooms on the train itself are free.  I don’t see the point in going to the washroom at the train station when one can go on the train.  The must washrooms must be really clean though in order to be worth fifty cents.  I wouldn’t know because I never use it.

The Porsche Museum

Day 61

People describe Stuttgart as the cradle of the automobile because of the invention of the automobile in this city. Many people also consider the city as the origin of the automotive industry. Porsche, Mercedes-Benz, and Maybach all produce their cars here in Stuttgart. Even automotive parts giant Robert Bosch Gmbh set up their headquarters in the region. Mercedes-Benz and Porsche both opened a museum in Stuttgart to show off all the cars they designed over the years. In January, I went to the Mercedes-Benz Museum, and yesterday, I visited the Porsche Museum.

The Porsche Museum differs from the Mercedes-Benz Museum in the way that Porsche displayed their sports cars and racing cars more than their other cars. The Porsche Museum is also smaller than the Benz Museum and contains less cars. I thought the cars that the Benz Museum displayed seemed much more interesting, but that has to do with my interest their pre 1950’s cars more than the new Porsche sports cars. One thing I thought was very cool about the Porsche Museum was that they had a car that everyone could sit in. I can’t think of any other time where I’d be able to sit in a Porsche! As usual, I take lots of pictures whenever I go places, but unfortunately, I left my SD card at home, so I had to take all the pictures with my phone camera.

My Picasa Album for the Porsche Museum

The Porsche Museum

An App for Periodically Vibrating A Phone with Java Micro Edition

March 12, 2011 – An App for Periodically Vibrating A Phone with Java Micro Edition

Nowadays, people probably program for Android or iOS, but I don’t have a high-tech phone that runs Android or iOS or anything. I needed an app that would make my phone vibrate every few minutes. I often find myself falling into a food coma, so I’m hoping that a phone that vibrates periodically will help keep me awake. I figured this would be a good learning opportunity for me, so I didn’t bother looking very hard to see if an app for this already exists. I went through setting up my development environment, coding the MIDlet (what they call Java apps on phones) using the J2ME libraries, testing using the emulator and packaging the app for deployment. My code is also available for download.

Setting Up the Development Environment

To develop this app, I used Eclipse combined with a plugin called EclipseME. To test the app, I used the Sun Java Wireless Toolkit for CLDC. Also, in order to program anything in Java, one must also have the JDK.

Required Programs

Download and install the programs below to set up the development environment. There are quite a few things to install here, but most of it is just download and double-click, except for the stuff that has to do with EclipseME.

  1. JDK
  2. The JDK can downloaded here

  3. Eclipse IDE
  4. Eclipse is a free IDE for different programming languages such as Java, C++ and PHP. It can be downloaded here

  5. Sun Java Wireless Toolkit
  6. This program provides all the tools for debugging the program such as the phone emulator and also allows the programmer to package the app into a usable jar file for the phone. At the time of this writing, the version for this program is 2.5.2_01. The program can be downloaded here

  7. EclipseME
  8. This is a plugin for Eclipse that adds functionality for programming apps for mobile phones. For example, it allows the programmer to code, debug, and deploy with one piece of software rather than coding elsewhere and compiling with the Wireless Toolkit. The method to install it is to use the update manager within Eclipse. Detailed instructions here

    After installation, I had to configure the virtual devices the program would use for debugging. Initially, there are no devices listed in the preferences and when I went to create a new Eclipse project, picking a device was required. The link below has instructions how to do this configuration. However, I made one slight change to it, which is the search directory. The Wireless Toolkit installed itself in “C:WTK2.5.2_01” rather than “C:Softwaretoolkitswtk22”.

    Follow the link here for instructions how to set up the virtual devices.

Once all this is done, the actual programming can begin. The next thing to do is to create a new project.

Creating A New Project

To create a new project:

  1. Go to File > New > Project (not Java Project)
  2. Expand the heading J2ME
  3. Choose J2ME MIDlet Suite
  4. Click Next
  5. Type in a name and choose the directory that it will go in
  6. Choose the Sun Java Wireless Toolkit at where it says Group, in the Devices section
  7. Choose a device under where it says Device, but it doesn’t matter which one is picked unless the phone app depends on the different phone interface
  8. This is where the device management step came in. Hopefully, the configuration was done earlier. If not, click here for instructions.

  9. Click Finish

The project is now created and we are not ready to begin writing code. But as an aside, below is a brief explanation of what MIDlets are.

What Is A MIDlet?

In short, a MIDlet is basically the app that runs on the phone. So when I’m talking about writing an app, I’m also talking about writing a MIDlet. The word app just sounds less technical.

All Java MIDlets use a class that extends the MIDlet class. So I made a class called WakeUpMIDlet that extended the MIDlet class. Also, the extended class, must define/override some of the methods that exist in the super class (MIDlet). These methods are:

  • startApp()
  • destroyApp()
  • pauseApp()

These methods assist the MIDlet in transitioning to one of its three states, which are active, paused, and destroyed. The startApp method brings the MIDlet to the active state, while destroyApp takes the MIDlet to the destroyed state, and the pauseApp method will take the MIDlet to the paused state. When the MIDlet is created, the constructor for the class and startApp are called respectively. Click here for more information about MIDlets and J2ME in general.

Building the MIDlet

Here is where the actual coding for the vibrator app begins. I am also assuming that anybody reading this already knows the basics of programming Java. I will discuss the code I used to develop the MIDlet, but for those interested in the MIDlet equivalent of a “Hello World” program, click here.

About the App

Since I don’t want to slip into a food coma, I made this app to make the phone vibrate in regular intervals. These intervals can be set by the user. In terms of the GUI, there will be a text field for the user to input the interval time, and text to show the time until the next vibration. See the picture at the top of the post to see what the app will look like.


I used these imports in my program:

import java.util.*;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

The first import is so that I can use the timer object in the program, which is for doing the countdown. The second is to be able to extend the MIDlet class since we must subclass it (see the section “What Is A MIDlet” for more information). The third import contains the GUI functionality for the MIDlets, which includes the text fields, buttons, etc.

Extending the MIDlet Class

In addition to extending the MIDlet class, the CommandListener interface must be implemented as well in order for buttons to work.

public class WakeUpMIDlet extends MIDlet implements CommandListener

The code could have been inferred from the description, but I put it up for completeness.

Class Variables and Constants

Below are the variables and constants that I defined in my class. What the variables are for is in the comments but a more detailed explanation will follow.

private static final int DEFAULT_INTERVAL = 5;
private static final int VIBRATE_DURATION = 800;

Form GUI = null;
Command cmdStart = null;
Command cmdExit = null;

TextField tfVibrateInterval = null;
StringItem strTimeToNext = null;
StringItem strTime = null;
Timer timer = null;
TimerTask timerTask = null;

int count = 0;

The first two constants are just there for me to control what the default value for the vibration interval should be and how many milliseconds to vibrate for. The rest are all GUI elements and the objects/variables for managing the countdown.


Form – acts as a container for all the GUI elements such as the buttons and text fields. Later on, I will add each GUI element to this object of the Form class.

Command – used for buttons that appear at the bottom of the window.

TextField – GUI element for the screen that displays text and has a box for users to type in

StringItem – GUI element for displaying text in the Form

Timer – provides a way to run code at fixed intervals

TimerTask – defines what code the timer will run

With these objects set to null, we can now define them in the constructor. For more information about the classes involved in building the GUI, click here or see the references for more information.

The Constructor

I use the constructor to create all the GUI elements I need and to set up the form

public WakeUpMIDlet()
GUI = new Form("Wake Up!");
cmdStart = new Command("Start", Command.OK, 0);
cmdExit = new Command("Exit", Command.EXIT, 0);
timer = new Timer();
timerTask = new TimerCountdown();


tfVibrateInterval = new TextField("Vibrate Interval (min): ", String.valueOf(DEFAULT_INTERVAL), 5, TextField.NUMERIC);
strTimeToNext = new StringItem("Time Until Next Vibration ", null);
strTime = new StringItem("n0:00", null);
strTime.setFont(Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_LARGE));


The constructor for the Form class takes one parameter, which is the name. This name gets displayed on the phone when the app is open on some phones.

The constructor for the Command class is the label that appears on the button, and what the purpose of the button is. There are a list of constants that go with this. Refer to the reference on the Command class for more information. The 0 at the end represents the priority of the button. The documentation has a really good explanation on what the priority represents.

The Timer and TimerTask objects are very straightforward as they don’t require any parameters in the constructor. However, the TimerTask object gets an object of its subclass. Subclassing the TimerTask class is required because that is where we put the code that runs at every timer interval.

The addCommand method adds the buttons to the form. In order to get button press events, we need to add a CommandListener (which is why we implemented the interface in the first place).

The next few lines are for defining what kind of text to display on the screen. The parameters there are quite straight forward except for the parameters for TextField. The first parameter for it is the text label, the second one is what appears in the input box, and the third one says what kind of data the input box accepts. By default, I set the timer to 5 minutes. Also, by setting the third parameter to TextField.NUMERIC, the program will check the input for me and make sure that the input was in fact all numbers. The documentation told me that the constant to use was TextField.NUMBER, but I think that is deprecated. The setLayout method is for just setting the GUI elements to the center of the screen.

The last three lines just tells the program to add these GUI elements to the screen. The elements will appear in the order that they’re written.

The startApp(), pauseApp(), and destroyApp() Methods

When the program starts and the constructor code finishes running, the startApp method is invoked. The code here is very easy. All it does is that tells the MIDlet what Form to use for the display.

public void startApp()

public void destroyApp(boolean unconditional)


public void pauseApp()


Each MIDlet contains its own “Display”, which is defined by the Display class. This object contains information on what form to display to the user. Although I never tried, it should be possible to switch between different Forms. For more information about the Display class, see the references.

The other two methods are empty because there is no code that I needed to have run while the program is in the paused and destroyed states. They appear because these methods must be overridden.

The commandAction() Method

This method is run when a button is pressed. This is where the commandListener comes in. When a command is invoked by the user, the commandListener will know what happened and call the commandAction method.

public void commandAction(Command c, Displayable s)
if (c == cmdExit)
else if (c == cmdStart)
if (Integer.parseInt(tfVibrateInterval.getString()) > 0)
count = Integer.parseInt(tfVibrateInterval.getString()) * 60;
timer.schedule(timerTask, 0, 1000);

When the method is invoked, the command object involved is passed to this method and we can use this to determine what to do for each button. Here I set up if statements to check that if the exit button is pressed, the program will terminate, and that if the start button is pressed, I should start the timer. More information about the timer code is below.

The Timer

Once the program starts, the timer will activate. The value to countdown from is taken from the input box (see above code). In order to get the Timer to do its work, the schedule method must be called with three parameters. One is what task to perform at each interval, how many iterations of the timer to do, and how often to run the code. To set up the task, the TimerTask class must be extended.

private class TimerCountdown extends TimerTask
public final void run()
String minutes = "";
String seconds = "";

minutes = String.valueOf(count / 60);
if (count % 60 >= 10)
seconds = String.valueOf(count % 60);
seconds = "0" + String.valueOf(count % 60);

strTime.setLabel("n" + minutes + ":" + seconds);

if (count == 0)
count = Integer.parseInt(tfVibrateInterval.getString()) * 60;


I put this code inside the class I was working with, so I ended up with a class within a class. The extended class must override the run method. This method is what defines the code that runs at every timer interval. Here, I just put code to count down the time and to write on the screen how long until the next vibration will occur. Once the count reaches zero, the vibratePhone method will be called, the timer is reset. See the references for an example program that uses a timer.

Vibrating the Phone

The actual vibrate method is included in the Display class, I couldn’t put that code with the run method. I solved that problem by putting the code in a different method and calling it.

public void vibratePhone()

The vibrate duration is in milliseconds. By default, I have mine set to 800 ms and I did not set up a way for the user to change this while running the program. The reference discussing the Display class includes information about the vibrate method.


Once all the code is in place, press the run button. If the Wireless Toolkit and the devices were set up properly, the emulator should turn on. Play around with it. Once the countdown goes to zero, a buzzing sound will play to signal that the phone vibrated.

Packaging the App

Once everything works, we need to package the program so that it can be used on the phone and not just on the computer.

Editing the JAD file

When I first tried to install the program on my phone, my phone kept complaining about how it couldn’t read the files properly. It turns out I was missing a line in my JAD file. Open the JAD file for the app with a text editor. It is located in the root directory for the project. Add a new line somewhere in the file like below:

MIDlet-1: WakeUp,,WakeUpMIDlet

The this line provides a description on the program’s name, icon, and name of the class. I was missing this before, so the program refused to work. It also helps to modify the content of the other lines to show the author and what not. For more information see Reference 18.


This is the last step in the development of the application.

  1. Go to the Project Explorer
  2. Right click the project
  3. Expand the menu for J2ME
  4. Create Package

Once that is done, a JAR and JAD file will appear in the folder called “deployed” in the project directory. Copy these files to the phone and then execute them on the phone. The app should install and be runnable. There are lots of options for packaging the app like using Antenna, obfuscation, and signing, but I’m not cover those topics here. The references will have more information. This concludes the application development process for the Java Mobile Platform.

Code Download

For this app, I registered a project on SourceForge.

Project Information:


Here are a bunch of links that I used to gather information on how to do everything I talked about here.

[1] JDK Download Page

This is for those who don’t already have the JDK installed. People who already program Java should already have this installed.

[2] Eclipse Download Page

The site to download the free IDE for Java development

[3] Sun Java Wireless Toolkit Download Page

The site to download the Sun Java Wireless Toolkit

[4] EclipseME Installation Instructions

Has information on how to obtain, install, and set up EclipseME

[5] EclipseME Device Management

Provides instructions how to set up the emulation devices for the IDE so that the programmer can perform software testing

[6] Explanation of the J2ME and MIDlets

Provides an explanation of what MIDlets and J2ME are all about. The site is also a tutorial on programming using the J2ME.

[7] Wireless Development Tutorial

A tutorial on wireless development on the Java Mobile platform. It also includes instructions on setting up a development environment (different than mine), and a sample “Hello World” program.

[8] The CommandListener Interface

The documentation for the CommandListener Interface.

[9] MIDP GUI Programming

Has a good explanation of the classes involved in programming a GUI. It also explains a lot of other GUI elements that I didn’t use in my program.

[10] The Form Class

The documentation for the Form class.

[11] The Command Class

The documentation for the Command class.

[12] The TextField Class

The documentation for the TextField class.

[13] The StringItem Class

The documentation for the StringItem class.

[14] The Timer Class

The documentation for the Timer class.

[15] The TimerTask Class

The documentation for the TimerTask class.

[16] The Display Class

The documentation for the Display class.

[17] J2ME Timer MIDlet Example

Contains an example program for how to use timers in a MIDlet

[18] Wireless Application Programming: MIDP Programming and Packaging Basics

Contains information on how to package the application and how to edit the JAD file so that the program will work on the phone.

[19] Packaging Your MIDlet Suite

Contains information on how to package the MIDlet with various methods such as using Antenna, obfuscation, and how to sign the app.

© 2017 Henry Poon's Blog

Theme by Anders NorénUp ↑