Blogs

Speeding up your slow Android smart phone

Submitted by tomo on October 12, 2012 - 8:10pm

Some time after getting a new phone or after wiping and reinstalling the phone's OS (or upgrading to a new version of Android), the phone starts to bog down and feel laggy compared to before. The hardware is the same (well, maybe the phone's battery has lost some charging capacity but the memory and CPU are still as good as when they were manufactured), so it must be something software-related, right? I mean, this problem happens with Windows PCs too (but not with Linux/OpenBSD...).

Not the thousands of stored SMSs and phone call logs

At first, I thought it might be the thousands of SMSs (and hundreds of phone calls) stored on my phone, which I keep for convenience. On my old Symbian OS Nokia these SMSs would really slow the phone down and so I would have to delete messages every month. But there's no good reason a modern phone can't handle nearly unlimited messages as easily as just a handful. But I gave it a shot, deleting all SMSs (first backing the messages and call logs with SMS Backup & Restore app) and phone calls, but it had no effect.

Not task killers

So then I wondered what mobile apps might be slowing the phone down. There are various task killer apps in the app marketplace and they will help you free up memory. I kinda of wanted to see a more granular view of what resources the various apps were using, like Task Manager or Activity Monitor. So I opened up Terminal Emulator and ran 'top' which doesn't redraw the screen like it would in other terminals, but simply writes out all processes to the screen again on each refresh. So it's slightly harder to understand.

Using an automated task killer is controversial. It's possible that using an automated task killer will confuse Android's memory manager.

Not the version of Android

Upgrading Android. Right after you load a fresh ROM onto your phone it is probably going to be as fast and responsive as it ever will be. Then some months down the line it's running slowly.

Remove widgets, V6 Supercharger your memory mangement, and turn off GPS

Here are the things that do help speed up your Android phone.

1) Remove some widgets and live wallpapers.

2) Advanced users: V6 Supercharger Script

3) In the end I think turning off GPS helped the most. This is likely due to location apps polling your location nearly constantly when it's on.

The world is flat. Globalization means it's possible to get customer service from India on products made in China sold in America. But it also means you can move your wealth and yourself from high cost geographical areas to ones where labor is cheap as is the cost of living.

People are more hesitant to move to another country when they have bills to pay and they need to worry about finding a good job abroad. For retirees, a country's job market has much less value. For a retiree, it makes sense to live someplace where wages are low, opposite to the rest of the working population. American retirees are increasingly retiring abroad.

Typical foreign countries for Americans to retire to are in Spain and Latin America as well as France, although France and the rest of Old Europe are quite expensive due to the weak dollar relative to the euro. Some Latin American countries like El Salvador use the US dollar, others like Belize, peg their currencies to the dollar.

The more adventurous Americans consider retiring to Asia, especially cheap Southeast Asia. Only the wealthy consider retiring (and denouncing their American citizenship for tax purposes!) to Singapore. But the Philippines is a popular country for retirees, especially American war veterans. But why not Vietnam?

Cost

Cost of living in Vietnam is cheap. That blog post tells you all you need to know about the cost of living in Saigon. The most expensive part of Vietnam (or most of Southeast Asia) is the plane ticket there and if you're planning to stay long term, with few and infrequent trips back to North America then you could live in Saigon or Hanoi for $600/month or spend double that and live two lives. I will tell you what you need to know to find cheap housing in Vietnam. Inflation, out of control for many years, is now back to single digits. You can argue that other poor countries are cheap to live in as well, but Ho Chi Minh City is pretty inexpensive for a "city" and there are always small towns in the countryside (or Mekong Delta) which are an order of magnitude cheaper.

Healthcare

Vietnam doesn't have the best hospitals in the region but quality of healthcare is improving with newer international hospitals such as FV (Franco-Viet) Hospital. Nonetheless, healthcare is still an issue. Cost of healthcare is extremely cheap. Prescription medicines are usually generic and cost nickels. You can buy pills by the pill. Medical procedures without medical insurance are affordable. For more serious hospital needs many expats fly to Bangkok, which is a 1 hour and often under $100 flight away. However, most medical care and procedures can be done in Vietnamese hospitals now. But this is a concern for expats in all developing Southeast Asian countries. Vietnam itself is even a medical tourism receiving destination for people in Cambodia.

Things to do

Vietnam has islands, beaches, 2.5 major cities, an incredible variety of unique cafes. But perhaps more importantly, beer and liquor are really cheap. (Vietnam is neither a religiously conservative Muslim country nor a nanny state.) Bottles of popular beer are around 75 cents/ea. Pirated DVDs are $0.50/ea, and cable TV, which has American movie channels like HBO and Cinemax as well as foreign service channels from countries like Japan, Korea, Singapore, France, and Germany, is maybe $5/month. I hear it now costs an average of $23 to watch a movie in Japan. In Saigon, movie theaters are 10-15% of that cost! Watching traffic in Ho Chi Minh City from a sidewalk cafe is free, or the cost of a 50 cent coffee. Vietnam's a very foreign country - you'll find something interesting to do.

Expat community

You won't be alone, although you may be forced to rub elbows with Australians, Kiwis, Canadians, British, and other people from all over the world. You may even meet some Vietnamese people. There are a number of American-owned restaurants and bars and plenty more which serve "American" food like pizza, burgers, and tacos. Americans gather to celebrate the 4th of July and Thanksgiving where turkey is available at some restaurants and hotels in Saigon. There is also a Burger King at Tan Son Nhat Airport, Domino's delivery all over Ho Chi Minh City, and KFC's on nearly every corner.

Vietnam also has the benefit of not having of not having the reputation of being a sex tourism destination like Thailand, Cambodia, or the Philippines. You won't have to convince family and friends back home that you're not just here to buy sex.

Language

English is not one of Vietnam's or most of Asia's strong points, although Singapore, Malaysia, and the Philippines have the highest percentage of decent English speakers. However, thousands of Americans and Europeans live and work in Vietnam without speaking even basic conversational Vietnamese. I would recommend learning some Vietnamese but it's not at all necessary. Vietnamese language lessons start from $2.50 an hour. On the other hand, English teachers are in huge demand in Vietnam. You can retire in Vietnam and make $15/hour or more teaching English on the side.

Visas

Some countries around the world have retirement visas. For example, Malaysia and the Philippines both have special visas for retirees. Vietnam doesn't have one but it's easy for a retiree from the US or other Western countries to live in Vietnam indefinitely as a tourist. The cost is about $25/month until you marry a Vietnamese girl. Vietnam C2 tourist visas can be renewed indefinitely. You could also set up a business in Vietnam and get a business visa. "Set up a business."

Climate

Even within the States, Americans are preferring to retire in warmer climates - Florida, Arizona, Nevada. Vietnam has both tropical weather in the south and four seasons in the north. The temperature is warm all year round in Saigon whereas Hanoi's winters dip into the 50s, and it's not unheard of for it to actually snow in Sapa. I prefer warm to cold, but sometimes Saigon does get too hot.

Religion

Vietnam is culturally and historically a Buddhist country. According to government statistics though it's more atheist in its beliefs. But, significantly, some 1/10th of the country is Christian and there are churches everywhere. Unlike Indonesia, belonging to an organized religion is not legally required here.

Which is not to say that Vietnam is Shangri La for retiring expats but for the slightly adventurous who can stand to be away from "home" for many months at a time, who enjoy warmer weather, who appreciate value when it comes to money and don't want to sink their savings into a "retirement visa account", and who prefer being able to drink and eat as much as they want - then why not ask other expats why Vietnam isn't the place to retire?

Mass editing nodes in Drupal can be a chore. If you just want to edit some attribute and set it to a single value for many different nodes then Views Bulk Operations can help. But you may instead want to make some quick changes to the titles, bodies, and CCK fields of a bunch of nodes of a certain type. The default way would be to open each node in a browser tab, go to their edit forms, and then operate on each one individually. Can we come up with a better way?

Multi Node Edit is a module that sounds like it could help. It promises to give you a page with many node edit forms. Unfortunately, this is not the case. By itself, this module is not usable to users. If you write some code to use it like a library you might be able to create a page with many node edit forms on it.

Recommendation: This module isn't useful to most people. It might be useful if you're writing code for a custom page.

Editview (editview) is the easiest to use, you just build Views and select 'Style' of 'Editview' in one of your displays. It works on the whole display, so all fields become editable. Unfortunately, you can't control this. Some fields shouldn't be editable, and so sometimes they just don't appear at all. Other times you may want to view a field but not edit it. Unfortunately, this isn't possible, even when using Global fields. [This issue is tracked here: http://drupal.org/node/635076]

* In my case, I just wanted to get a link to edit the node. I accomplished this by adding a Node: Path field which shows the path/alias editing form.

Recommendation: Use Editview if you're comfortable with building Views. Then you can construct a view of the fields you want to edit, and make it easy to filter the nodes you want to edit.

Editable Fields (editablefields) - 6.2 doesn't integrate with Views, despite the README. 6.3 does integrate but not the way explained in the README.txt. There is no added View type to choose when creating views. The exported content types used for demonstration don't import either. Most fields aren't editable, but if they are there will be a new checkbox for editable with some options. However, the 6.3 version of the module is still quite buggy so it doesn't work at all.

Recommendation: Avoid Editablefields module for now unless you want to just edit fields in the node display.

Booking a hotel in Vietnam and the rest of Southeast Asia is a lot different from back in the States. In the US, online hotel booking is quite competitive and hotel inventory in any city is high. You can find some great deals by searching and booking hotels online. In developing countries like Vietnam it's quite different. Most hotels aren't online and can't be booked online. The ones that are online charge higher rates if booked online than if booked in person! That never happens in the US. On my first trip to Southeast Asia, I made the mistake of booking hotels online for the Philippines, Indonesia, Malaysia, etc. and either then or now I found out that I paid way too much for my rooms. I booked online because I didn't think I could just arrive in a foreign country and easily find a hotel. In the US, if I flew to another city and didn't book a hotel first, I would have a hard time finding a reasonable hotel (first I would have to rent a car) and I would surely pay more than what I would pay if booking online. Now I've traveled all over Vietnam and stayed in dozens of different hotels without reserving rooms in them first.

Finding a hotel in Vietnamese cities

Tourism is a large and important industry in Vietnam. This includes domestic tourism. This means that there are hotels everywhere, ranging from run down no-star "motels" to backpacker-friendly guesthouses to medium-sized 2 or 3 star business hotels on up to the large, branded 5-star hotels. When you arrive in a Vietnamese city, head to the center of town and you should find an area with a high concentration of hotels. For example, in Hanoi you might head to the Ho Hoan Kiem (Hoan Kiem Lake) area. In Ho Chi Minh City, you would head to the Pham Ngu Lao backpacker district, or Bui Thi Xuan Street, or the area around Ben Thanh Market. In Dalat, you would also head to the lake and main market area, or Bui Thi Xuan Street. Without knowing the names of any hotels (and not letting any touts take you to their hotels) you can quickly look at several hotels and make a choice.

I've since traveled by bus, plane, train, bicycle, and motorbike to cities from Hanoi, Hue, Hoi An, Quy Nhon, Nha Trang, Phan Thiet, Da Lat, Vung Tau, and many others and found cheap hotels using this "method". Just go to the center of town where there's a concentration of hotels competing with each other, investigate a few, negotiate the price (90k VND and up for a "nha nghi" guesthouse, 200-300k VND and up for a large room with a big bed or two and bathtub), and leave your passport with them - this is Vietnam.

When investigating rooms, here is a short checklist of things to look for:

1. Turn on the A/C. Is it blowing out cold air or is it just a fan?
2. Run the hot water. There will probably be a water heater attached, if not make sure hot water comes out. Is there a hot water tank? It may need to be turned on for awhile before there's hot water - good luck.
3. Do you smoke? Are you bothered by stale smoke?
4. Is the fridge unplugged? Is there melted ice?
5. Do you want a mosquito net?
6. WIFI - Most important. Check that it works and the signal is strong enough. This is why you should have a smartphone in order to quickly check the wifi connection in a room. Except for expensive hotels, ironically, most hotels have free wifi. Some hotels don't have any wifi, but it's rare for hotels except the luxury hotels to charge for wifi.

Drupal Links in Content

Submitted by tomo on October 11, 2012 - 3:01am

Problem: In your blog posts you have a lot of links to other pages on your site, then one day you decide to change the URL pattern for all nodes on your site, or you change the pattern and slowly update paths to nodes by editing and saving them. Unfortunately, you had hard-coded paths in your content bodies and now they are all leading to 404 pages. What to do?

1) Link checker (linkchecker) module will find the broken links. This is something you may need to use.

2) Path Finder is a module that turns your node links into permalinks with node id (slug) at the front of the URL so that any future change to title which results in a different URL still leads to the same node via the node id. Example: http://www.example.com/837/latest-news/my-descriptive-seo-friendly-url

Of course, this doesn't help you once you already have a bunch of nodes and content linking to them, but it's one strategy to start with. Then if you do change the titles or patterns of your nodes, as long as the node id / slug is still at the beginning of the url, then you won't get any 404 errors, although you'll then have multiple URLs pointing to the same content. So this isn't ideal.

3) Turn on Pathologic: "Pathologic is an input filter which can correct paths in links and images in your Drupal content in situations which would otherwise cause them to “break;” for example, if the URL of the site changes, or the content was moved to a different server. Pathologic is designed to be a simple, set-it-and-forget-it utility. You don't need to enter any special “tags,” path prefixes, or other non-content noise into your content to trigger Pathologic to work; it finds paths it can manage in your content automatically."

4) If you just need to remove a base path (like http://www.domain.com:8080) from all URLs, then URL Replace Filter (url_replace_filter) will suffice.

5) If you need to do more complicated search and replace on URLs, and want to use regular expressions, then use Search and Replace Scanner (scanner).

Finally, use Global Redirect to always have a single canonical path for each piece of content.

Dealing with Spam Comments on a Drupal Site

Submitted by tomo on October 11, 2012 - 1:26am

Drupal sites, like any content sites, naturally receive a lot of spam comments. Any blog or blog-like site which allows unauthenticated or anonymous users to comment on posts or any content is open to spam because spammers just want to have links to their websites displayed by your website for link-building purposes which is important for SEO. Spam comments used to be much more obvious as in blatant ads for penis-enhancing drugs. Nowadays, spammers are using more sophisticated scripts that are still easy to detect - by humans and usually also by spam-detection software. New spam might praise your blog or quote something you said in your blog post or just say something generic, perhaps on a related topic or perhaps not related at all. Then they will have their spam website in the URL field, if not also in the comment text. If the website has keywords which are totally unrelated to your blog, you can bet it's spam.

What can a Drupal website do about spam?

One old solution for spam, a common plugin on WordPress sites, is called Akismet. Akismet is a service and requires you to create an account and get an API key from them. Then they will help you detect spam.

Drupal has something like Akismet but improved and it was created by the Drupal creator himself. It's called Mollom, and it's also a cloud-based service, and you also create an account with them. Mollom is free to use although there are some paid services. I use Mollom on this blog. It catches hundreds of spam comments for me but also lets in a single false negative per day or so. I wouldn't have been able to turn on comments without turning on Mollom as I would immediately be deluged with spam. But I hope that Mollom continues to improve so that I don't even get 1 spam on most days.

Since I still do get some ham and spam comments, I have to process them somehow and report the spams to Mollom so they can improve their algorithms and heuristics for the future. Unfortunately, Drupal's default comments management view doesn't easily let me see if a comment is spam or not. In order to make that decision I need to see the URL and comment text that was saved. If there was no URL, it usually isn't spam, and if there was no URL in the comment text then most certainly it isn't spam. But if there was a link in the text, I need to see what site it links to, and see if the comment is at all intelligent or relevant. You can also tell by looking at any link saved in the URL field. Since Drupal's comment management page doesn't do this, I created a view, which you can import (this is Drupal 6) below.

The thing that Drupal's comment admin page offers is bulk operations. Mollom provides some operations such as report spam to Mollom and delete. This is usually what I want to do. Unfortunately, there's no way to use Mollom's actions in Views with Views Bulk Operations! So until this issue gets resolved (http://drupal.org/node/655846) I've done the next best thing which is to have links to the Mollom management page for each comment. It will still require you to open that page, select the reporting action you want, and then submit the form though. But this workflow has at least saved me some time and now I have removed all the really spammy spam from this site.

$view = new view;
$view->name = 'comments_more';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'comments';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
  'name' => array(
    'label' => 'Author',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_user' => 1,
    'exclude' => 0,
    'id' => 'name',
    'table' => 'comments',
    'field' => 'name',
    'relationship' => 'none',
  ),
  'homepage' => array(
    'label' => 'Author\'s website',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'display_as_link' => 1,
    'exclude' => 0,
    'id' => 'homepage',
    'table' => 'comments',
    'field' => 'homepage',
    'relationship' => 'none',
  ),
  'comment' => array(
    'label' => 'Body',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'exclude' => 0,
    'id' => 'comment',
    'table' => 'comments',
    'field' => 'comment',
    'relationship' => 'none',
  ),
  'delete_comment' => array(
    'label' => 'Delete link',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'text' => '',
    'exclude' => 0,
    'id' => 'delete_comment',
    'table' => 'comments',
    'field' => 'delete_comment',
    'relationship' => 'none',
  ),
  'edit_comment' => array(
    'label' => 'Edit link',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'text' => '',
    'exclude' => 0,
    'id' => 'edit_comment',
    'table' => 'comments',
    'field' => 'edit_comment',
    'relationship' => 'none',
  ),
  'hostname' => array(
    'label' => 'Hostname',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'exclude' => 0,
    'id' => 'hostname',
    'table' => 'comments',
    'field' => 'hostname',
    'relationship' => 'none',
  ),
  'status' => array(
    'label' => 'In moderation',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'type' => 'yes-no',
    'not' => 0,
    'exclude' => 0,
    'id' => 'status',
    'table' => 'comments',
    'field' => 'status',
    'relationship' => 'none',
  ),
  'timestamp' => array(
    'label' => 'Post date',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'date_format' => 'small',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'timestamp',
    'table' => 'comments',
    'field' => 'timestamp',
    'relationship' => 'none',
  ),
  'view_comment' => array(
    'label' => 'View link',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'text' => '',
    'exclude' => 0,
    'id' => 'view_comment',
    'table' => 'comments',
    'field' => 'view_comment',
    'relationship' => 'none',
  ),
  'cid' => array(
    'label' => 'Mollom',
    'alter' => array(
      'alter_text' => 1,
      'text' => '<a href="/mollom/report/comment/[cid]">Report to Mollom</a>',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_comment' => 0,
    'exclude' => 0,
    'id' => 'cid',
    'table' => 'comments',
    'field' => 'cid',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('css_class', 'view-comments-more');
$handler->override_option('header', '<style>
.view-comments-more table {
background: white;
position: relative;
z-index: 100;
}
</style>');
$handler->override_option('header_format', '2');
$handler->override_option('header_empty', 0);
$handler->override_option('items_per_page', 30);
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 0,
  'order' => 'desc',
  'columns' => array(
    'name' => 'name',
    'homepage' => 'homepage',
    'comment' => 'comment',
    'delete_comment' => 'delete_comment',
    'edit_comment' => 'edit_comment',
    'hostname' => 'hostname',
    'status' => 'status',
    'timestamp' => 'timestamp',
    'view_comment' => 'view_comment',
  ),
  'info' => array(
    'name' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'homepage' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'comment' => array(
      'separator' => '',
    ),
    'delete_comment' => array(
      'separator' => '',
    ),
    'edit_comment' => array(
      'separator' => '',
    ),
    'hostname' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'status' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'timestamp' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'view_comment' => array(
      'separator' => '',
    ),
  ),
  'default' => 'timestamp',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'views/comments_more');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));

Clubbing and nightlife in Saigon and Vietnam

Submitted by tomo on October 10, 2012 - 2:47am

Nightlife in Vietnam can be split into three different types: the local scene, the expat and tourist scene, and a hybrid scene for modern urban Vietnamese including some expats.

For locals, gathering at cafes, singing karaoke (or hugging karaoke om girls), "nhau"-ing at big outdoor "quan nhau", or just driving around and hanging out outside are common nightlife activities.

When it comes to clubbing, it's hard to tell how many nightclubs exist in Vietnam. This is because most of them are part of the local scene and don't receive many foreign customers and don't make themselves attractive to foreigners anyways.

A typical Vietnamese club is open every day of the week, opens in the evening, and closes at midnight. Customers are mostly Vietnamese males who come in groups and then stand around a table while female staff pour drinks from a bottle of liquor which the group has ordered. If they don't finish drinking the bottle that night they can check the bottle and receive a card to retrieve their bottle later. Sometimes, the bottle will be marked so the customer trusts that it is his bottle and that nobody else has drunk from it before he returns. But this doesn't ensure that the alcohol inside is not counterfeit. Counterfeit name brand liquor is a huge problem here, creating a secondary market for used bottles of vodka, whiskey, etc. It is also possible to order beer at clubs, although they may only have Heineken, which will be brought to your table in bulk, but drinking bottles of liquor is more common. Ordering single mixed drinks or wine is rare and discouraged at these places.

Nightclubs (disco, vu truong) in Vietnam can also be split into purely local, Western, and mixed.

There are many clubs in the suburbs with cheaper prices and catering exclusively to locals. In District 1 of Saigon you will find some clubs which are better for showing off and taking girls to or finding an attractive PR girl to try to take home. Some popular clubs in Saigon: 030, Gossip, Lavish.

In District 1 you will also find the few clubs in Vietnam that resemble clubs outside of Asia, such as Lush or Vasco's. Apocalypse Now (Apo) is another bar/club in downtown Saigon and it caters mostly to foreigners (a mix of tourists and expats), prostitutes, and gays, making for an interesting atmosphere.

Pickup Scene

In Vietnam, totally unlike in the West, bars and clubs are not the place to go to pick up girls, unless you are trying to pick up the staff (PR girls). Many Vietnamse men will go to Vietnamese clubs expressly to pick up PR girls. But if you are a foreigner you can meet certain Vietnamese girls who are available to foreigners at places like Apocalypse Now. They may be prostitutes.

Tipping

At Vietnamese clubs, you are expected to tip graciously. Each PR girl who spends significant time at your table should get a tip, something like 100k per hour. Then you will find that the bus boys, security guards, and perhaps even the manager will come to you hoping for tips, although they don't need such big tips. Once you are outside, if you didn't take a taxi, you may find that you are forced to tip the parking attendant through illegal overcharging.

Music

The music at most Vietnamese clubs is the same - some kind of hard Vietnamese trance completely out of touch with the electronic dance music being played elsewhere around the world. DJs here stay truly nameless. There are no famous DJs in Vietnam and when big name DJs from the US or Europe do come to Vietnamese clubs, they mostly only get patronage from the expats. Unfortunately, there is little appreciation for electronic dance music in Vietnam compared to the rest of the world, even other southeast Asian countries like Singapore, Thailand, or the Philippines.

Difference between Saigon and Hanoi

Saigon has the most clubs while Hanoi does have clubs, but like all things fun in Vietnam, the government clamps down harder on establishments in Hanoi. Places close earlier there and clubs may be a lot smaller. In Hanoi's winter, the young people go out less at night, preferring to stay in.

Outside of the two big cities, there are a handful of clubs in Da Nang (Phuong Dong, Vegas, etc.), while the smaller cities like Buon Me Thuot or Dalat can support one or so bar each. Beach resort towns like Nha Trang, Mui Ne, and Vung Tau, have clubs for both foreign and domestic tourists.

Foreigners will probably hate Vietnamese clubs and so I wouldn't recommend going to them unless you like spending obscene amounts of money on counterfeit alcoholic drinks while listening to bad "techno" music that is at tinnitus-inducing volumes in order to communicate by yelling with girls who are paid to entertain you.

Are there strip clubs in Vietnam?

Drupal has many SEO features built in and available as contributed modules. One main one being Clean URLs. But it's often said that Drupal gives you "just enough rope to hang yourself".

Drupal has a powerful module called Pathauto that lets you create powerful URL patterns based on Tokens. Any number of modules can provides tokens via the Token API for you to use to construct URLs and you can easily create your own tokens with a bit of PHP code. With Path Auto you can also easily change the URLs for all your nodes, users, and taxonomy terms at once. This is the rope.

A big part of SEO is the link building you do outside of your site to get other sites to link to your site and your inner pages within the site. The problem is when you've done all this and have thousands of links to hundreds of your pages and then you decide to change all of your URLs. Suddenly, visitors to your pages are seeing 404 error pages and Google also no longer thinks you have any linked to pages.

So what can you do if you ever want to change the path of a node after you've already created the node and saved the URL? What can you do once you rebuild your paths from a new pattern? What if your maximum URL length limit was too short and now you need to fix all the long node URLs.

Fortunately, new versions of Path Auto integrate with Path Redirect, which is a module for managing lists of 301 URL redirects. So by hand, you could manually create 301 redirects from the previous alias to a new alias, but luckily you can also do this automatically now. A new option was added to Path Auto to "Create a new alias. Redirect from old alias." Choose this instead of just deleting old aliases and your new node paths should have old paths pointing to them, managed by Path Redirect.

Just remember that bulk update from within Path Auto isn't the only way to update URLs. You can also bulk update selected nodes from the default content management page and also edit the URL from each node's edit page.

To use this, just install both Path Auth and Path Redirect.

Related Issues: http://drupal.org/project/issues/pathauto?text=redirect+from+old+alias&status=All

When manually changing titles and thus URLs make sure to check "Automatically create redirects when URL aliases are changed." in Path Redirect's settings.

Regarding Path Redirect's fixes and Path Auto's fixes:

http://drupal.org/node/629742#comment-4336624


In short: the two work independently.

The option "Automatically create redirect" (on the Path Redirect admin screen) only governs situations where you manually change a path setting. Whether pathauto is or isn't installed, does not change this behavior.

Detail: when saving a node from the edit screen, the Path Redirect code executes before Pathauto does. It has no knowledge of whether Pathauto will or will not change the path alias, later on.

If pathauto runs afterwards and decides that the path needs changing, it will look only at its own "Update action" to determine what to do. If that is "Delete the old alias", it will indeed get deleted, and no redirect will be created (regardless of the "Automatically create redirect" option in the Path Redirect admin screen).

Drupal URLs can be pretty long. But practically, there's a limit in the database of 128 characters, even though browsers and web servers can support much longer URLs. With new versions of Path Auto, the schema is checked for alias column size. Then aliases longer than 128 characters are supported. This requires no hacking!

To change this, without just manually altering the length of the column in your database, you can use the following code in your own module:

/**
* Implementation of hook_schema_alter().
*/
function yourmodulename_schema_alter(&$schema) {
  $schema['url_alias']['fields']['dst']['length'] = 255;
}

Long URLs aren't very human friendly but even the oldest browsers can support URLs more than 2048 characters in length. Browsers support long paths, web servers support them, proxies support them, and mail clients either support them or break around 80 characters anyways. This doesn't mean you should carelessly throw around long URLs, but if you're generating them automatically then you don't need to cut them at an artificially low limit anymore.

Sometimes I get asked this: Are there any strip clubs in Vietnam? If you're Vietnamese, you would probably answer "no" or "what is a strip club?" In the West, we're used to there being places where girls are paid to take their clothes off and dance on stage in front of strangers. In Vietnam, girls wear tshirts and jeans in the water at the beach because they are shy.

AFAIK, there are no strip joints or nudie bars in Vietnam. Point one out if I'm wrong. I've heard rumors of a private dancer club oh Phu Quoc island which is only open to foreigners, but this could be something more like I'll explain below.

Strip clubs, even videos of what you might see inside a strip club, are illegal in Vietnam. Pornography in Vietnam is illegal and you should not try bringing girly magazines into the country. But you will still find guys peddling illegal porn on DVDs on the back of their bikes. And at least one men's magazine, belonging to a friend, has a license to show bare nipples - if done tastefully. In the movie theaters the foreign films with nudity are censored.

So where do older men go to entertain themselves and their business associates? Answer: Karaoke

But not just ordinary karaoke where you go with your friends to sing songs to a badly-rendered MIDI sondtrack. The Vietnamese call it "karaoke om" and where "xe om" literally means a vehicle you hug because you hold on to the driver, here "karaoke om" means a place where you can hug girls. But at some of these karaoke oms, you don't just get to put your arms around the girls. Some of these karaoke joints can get pretty wild with girls taking off their girls and dancing on top of tables while the patrons drink expensive alcohol. Sound familiar?

Perhaps the difference is in how public a strip club is and how private a karaoke om is. There are no signs outside of a karaoke om advertising what services it provides. No red lights or images of girls.

I'm not sure what other countries are like this. Are there strip clubs in Communist China? I think Cambodia is the same as Vietnam and I assume Laos is as well, whereas Thailand is totally the opposite.

Syndicate content
© 2010-2014 Saigonist.