Development

Understanding Thai locale and Buddhist calendar

I am a Thai leaving in Thailand. However, I usually work on English locale. Only few times I worked with Thai locale and rarely involving in buddhist calendar. The time has come. I have to understand what Thai locale is and how to use it efficiently. I found a good document written by IBM and another one by Sun.

How to setup local Tomcat for Eclipse

Usually, Eclipse supports Tomcat by default. However, you need to tweak some settings of Tomcat manually to make everything work as expect. The most common thing that does not work correctly is manager. After starting Tomcat, you are able to access the manager at http://localhost:8080/manager/html. However, you may get message as follow.

access to the requested resource has been denied.

The status code is 403 which indicates forbidden access. If you don't use manager, it's fine. Anyway, you might want to use manager to undeploy or deploy web applications.

Performance improvement of Drupal 5 against 4.7

Drupal 5 has been released for a while. It comes with lots of changes in APIs as well as in the core engine. One of the reason to drive changing the core engine of Drupal is performance. If you remember the performance comparision of Ruby on Rails, Django and Symfony (read here) last year, the performance result was Django, Ruby on Rails and Symfopy, respectively. Django was outperformed because Python is generally run faster than the rest. Moreover, PHP is always the slowest one even with any kind of accelerator.

Anyway, Drupal may break above results. It's just a matter of time. Drupal 6 is one of the promising CMS I imagine.

Old theme and new layout

If you notice some weird in this site, there are something wrong since I used this theme. This theme is bluebreeze. It is nearly perfect especially for SEO except only one big problem regarding anchor (see issue). Well, it is also beautiful at least for me. The theme is good but the layout is too advanced for standard CSS. I found another good layout in Aberdeen. Anyway, the theme is not for me at all. So my solution is to use Aberdeen's layout with the bluebreeze's theme.

What is Pythonic?

วันนี้ลองมาอธิบายคำว่า Pythonic กันดีกว่า พอดีมีคนถามที่Codenone แล้วตอนนั้นก็ตอบแบบสั้นๆ ช่วงนี้พอมีเวลาเลยลองมาศึกษาให้ถ่องแท้ดีกว่า ผมเองก็ไม่รู้จะอธิบายยังไงเหมือนกัน คล้ายกับว่า Pythonic เป็นปรัชญาชนิดหนึ่ง เรียบง่าย ตรงไปตรงมา เข้าใจอย่างไรก็เป็นแบบนั้น ไม่มีความซับซ้อน บางคนก็บอกว่ามันคือ pseudocode ที่ทำงานได้จริงๆ ผมเคยลองเขียน pseudocode ด้วย Python มันก็ดูสะอาดดี แต่ก็มีหลายคนไม่ชอบ เพราะไม่มีปีกกา {} หรือ begin end แล้วไม่สบายใจ เหมือนชีวิตขาดอะไรไป โชคดีที่ผมไม่ใช่คนแรกที่สงสัย มีคนพยายามตอบหลายครั้ง ผมชอบคำอธิบายที่ Python Secret Weblog มากที่สุด เพราะมีตัวอย่างชัดเจน อย่างน้อยก็เห็นแล้วร้อง อ๋อ ไม่ต้องเสียเวลาจินตนาการ

How to edit resource bundle in Eclipse

All professional Java programmer knows how to deal with i18n. Unfortunately, I am not a professional programmer in Java. I still feel like character encoding and character set in Java is a kind of messy setting. It is as simple as I get in other language like C, Python, PHP or etc. For example, developing a JSP involves character encoding in many factors, e.g., the source of JSP itself, the virtual machine, the external files, the database, the content in database, the application server, resource bundle, message bundle and many more. This post will focus on resource bundles and message bundle for i18n support in JSP and other kind of Java application including JSF and Struts.