Programming

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.

Compiling C++ applications for mipsel platform

In the past, I usually posted about my success of doing something but not this post. I have been encountering big problem that is not solved yet. It is more than 7 days from the beginning. Generally, I will leave tabs relating to my current interesting in Firefox until all problems are solved. Then I will post what I did here or somewhere else. In my opinion, 7 days are too long for such a problem. I should suspend this topic for next chance. So I will post everything involved to this topic here as the checkpoint.

The problem is about running a C++ applications on mipsel platform. In particular, the applications are all examples of libtorrent and the mipsel platform is Asus WL-500g Premium. libtorrent is written in C++. That is not exactly the cause of this problem. The real problem is it relies on Boost library and this library uses many C++ features that are not available in uClibc++.