Thứ Năm, 23 tháng 2, 2012

Làm sao để trở thành lập trình ciên giỏi

Không có định nghĩa cụ thể để đánh giá đâu là lập trình viên giỏi. Nhưng một lập trình viên giỏi trước tiên phải là người hoàn thành tốt công việc và tiếp nữa, thành quả của họ là những giải pháp xuất sắc thúc đẩy sự phát triển và đóng góp cho nghành phần mềm. Những nguyên tắc dưới đây thật sự cần cho những ai đã, đang và sẽ theo đuổi nghiệp lập trình.

1. Làm việc dựa trên kiến thức nền tảng.

Trong khoa học kỹ thuật, kiến thức căn bản là tối cần thiết. Nắm vững kiến thức căn bản ta sẽ có được cơ sở vững chắc cho thành công. Nghành phần mềm cũng không phải ngoại lệ, các lý thuyết về máy tính, phần cứng, mạng, thiết bị ngoại vi, hệ điều hành, thuật toán, mô hình cơ sở dữ liệu,…là căn bản, kim chỉ nam cho các thiết kế, cài đặt trong phần mềm. Nếu còn chưa nắm vững lý thuyết căn bản về khoa học máy tính, hãy sử dụng internet. Đó là cách tiếp cận tri thức vô cùng hiệu quả do chính công nghệ thông tin mang lại.

2. Gắn các từ khóa nghi vấn (how, what,...) cho mọi mã lệnh mà mình viết ra.

Một điều tôi nhận thấy là có khoảng cách rõ ràng giữa lập trình viên giỏi và phần còn lại. Lập trình viên đó luôn ham hố hiểu biết tất cả những gì về mã lệnh khi nó được thực thi (Nó chạy như thế nào? Làm sao nó chạy?...). Bởi thế, họ sẽ không bao giờ để lại những dòng code do mình viết mà không hề biết rõ mã lệnh đó được máy tính thi hành như thế nào.

Mặc dù phần mềm được phát triển theo một lịch trình chặt chẽ nhưng đó không phải là lý do chẹp miệng cho qua. Hãy hiểu biết chính xác và lựa chọn phương pháp tốt nhất cho cài đặt của bạn trong sự cân nhắc thời hạn hoàn thành phần mềm. Hãy biến nguyên tắc này trở thành một thói quen tốt trong công việc.

3. Hãy học bằng cách giúp đỡ người khác.

Kinh nghiệm bản thân cho thấy, tôi học được rất nhiều bằng cách tìm câu trả lời cho các thành viên trên diễn đàn JavaVietnam.org. Tự xấu hổ vì đến giờ tôi không còn nhiều thời gian lẫn thích thú khi làm tiếp công việc này. Giúp người khác tìm hiểu, giải quyết vấn đề là một phương pháp tốt để học tập. Trong công ty, trong nhóm, trên cộng đồng,… hiểu biết khó khăn của người khác và đưa cho họ giải pháp khắc phục là cách để nâng cao kiến thức của chính bản thân mình.

4. Hãy viết những dòng code đơn giản, dể hiểu nhưng logic.

Giữ cho mình công thức KISS: Keep it simple and short - Đơn giản và ngắn gọn. Đừng bao giờ cho rằng mã lệnh càng phức tạp thì càng khẳng định mình giỏi. Hãy viết những dòng code hợp lý và thật đơn giản. Mã lệnh càng đơn giản thì càng ít lỗi, có thể mở rộng tốt hơn cũng đồng nghĩa với việc cộng tác nhóm tốt hơn khi chúng ta cần chuyển giao code.

Một trong những tiêu chí đánh giá khả năng này là mã lệnh đạt đến mức không cần comment (chú thích). Điều đó đồng nghĩa với việc bất cứ ai cũng có thể đọc mã lệnh của bạn. Đừng tưởng viết nhiều chú thích vào mã mà bạn trở thành chuyên nghiệp. Hãy thể hiện chúng ngay trong chính dòng mã của mình.

5. Dùng nhiều thời gian để phân tích vấn đề hơn là đi sửa lỗi.

Một lập trình viên tốt sẽ dùng nhiều thời gian cho phân tích và thiết kế code hơn là thời gian sửa lỗi sau cài đặt. Thiết kế không đồng nghĩa với việc phải ngồi vạch

vạch, vẽ vẽ ra trên giấy. Nó đơn giản chỉ là ngẩng mặt lên trời và suy nghĩ một giải pháp trong đầu bạn. Đừng vội vơ lấy bàn phím khi có được yêu cầu, hãy phân

tích, thiết kế và cài đặt từ trong tâm trí trước khi hiện hữu những dòng mã trên màn hình.

If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it. ~Richard Pattis

6. Hãy là người đầu tiên phân tích và nhìn lại mã của bạn.

Nhìn lại mã lệnh mình vừa viết là một thói quen cực tốt. Việc này có thể cải tiến được cài đặt và tránh lỗi trước khi người khác phát hiện ra. Luôn luôn nghiêm

khắc và đừng bao giờ thiên vị với thành phẩm của mình. Cũng không nên ngại ngần khi để người khác review code. Tiếp thu những phản hồi từ bên ngoài sẽ giúp

bản thân ngày càng tiến bộ hơn.

7. Đừng chạy theo công nghệ.

Hiệu ứng sính cái mới đặc biệt phổ dụng trong nghành công nghệ.

Có rất nhiều người luôn muốn tìm hiểu và đánh cược cả sự nghiệp của mình vào những công nghệ vừa mới ra đời. Thật nực cười khi cụm từ “công nghệ mới nhất”

được gắn cho những tools, APIs, frameworks,… vừa mới ra đời. Những gì tương tự vậy diễn ra hàng ngày trong thế giới công nghệ và mặc dù chúng có thể giúp

việc lập trình nhanh hơn, dễ dàng hơn nhưng đừng vội vàng theo đuổi trước khi có những đánh giá cặn kẽ. Hãy giữ nền tảng kiến thức làm kim chỉ nam và kiến

thức nền tảng có tốc độ thay đổi chậm hơn rất nhiều so với frameworks, tools hay APIs quanh nó.

Đừng dập dềnh trên những con sóng biển. Nước bề mặt luân chuyển nhanh hơn rất nhiều trong khi nước ở dưới đáy, nơi cuộc sống cá tôm thực sự

tồn tại lại ít có sự thay đổi hơn. Hãy đặt mình vào chỗ nước sâu và gần hơn với kiến thức căn bản.

Chẳng hạn, trong thế giới Java, rất nhiều những tool, frameworks tồn tại và ra đời mỗi tuần. Đừng quan tâm nhiều, những khái niệm cốt lõi như tương tác client-

server, MVC pattern, Servlets/JSP, resource bundling, XML parsing,… mới là thứ cần phải nắm chắc. Một khi đã có được chúng, việc tiếp cận công cụ hay

frameworks mới sẽ chỉ trong một sớm một chiều.

8. Các giải pháp tình thế không tồn tại được lâu

Nhiều lập trình viên đưa ra những giải pháp tình thế để giải quyết vấn đề (do thiếu thời gian, không hiểu đúng vấn đề, hoặc thiếu kinh nghiệm). Nhưng về lâu dài,

những giải pháp đó sẽ làm hỏng code, khiến nó khó mở rộng và bảo trì. Hãy luôn cố gắng thực hiện một cách tổng thể. Chỉ nên bắt đầu công việc khi đã hiểu rõ

đầu vào- đầu ra của giải pháp.

9. Đọc tài liệu.

Lập trình viên giỏi thường giữ thói quen đọc nhiều tài liệu. Tài liệu có thể là đặc tả, API documents, tutorials,… Đọc tài liệu sẽ trang bị cho chúng ta những hiểu

biết tốt nhất từ đó có được cách thức giải quyết hiệu quả nhất cho mọi vấn đề.

10. Hãy học bằng cách đọc mã của người khác.

Tìm cách tiếp cận lập trình viên giỏi để có được mã nguồn của họ. Đọc và tham khảo trực tiếp chúng trong công việc hàng ngày. Cách thức tổ chức code, thiết kế

code (factory, singleton, traversal,…), cấu trúc thuật toán,… là những thứ rất đáng để quan tâm. Trong thế giới Java, bộ mã nguồn của JDK sẽ là một tham vấn

bên cạnh thế giới nguồn mở sẽ có rất nhiều thứ cho bạn học tập và tìm tòi.

10 Drupal Modules You May Not Know About

One of the great things about Drupal is its huge community of developers. Drupal.orghosts many, many modules to extend and enhance your website or application. Most people know about popular modules such as CCK, Views2, Panels, and XML Sitemap. But there are some really great modules that fly under the radar as well.

1. Secure Site

Secure Site
When developing a website, you occasionally show the client progress. Depending on your setup, you use either an internal development address, or a subdomain like development.company.com to make it accessible outside for clients. What if you want to hide it away from prying eyes or search engines? There have been times when curious people have stumbled across sites I’ve worked on by trying subdomains, but this little module will put a stop to that. Secure Site uses HTTP authentication and prompts the user for a username and password before proceeding. It can also be used to secure RSS feeds.

2. IE6 Update

IE6 Update
There is a huge push in the design community to wipe IE6 off the face of the earth. While most believe they should not worry about IE6 compatibility, simply redirect them to Firefox, or block them from viewing the site entirely, this module offers a more reasonable solution. When enabled, anyone viewing in IE6 will have a status bar update across the top of the browser that politely says that they should consider upgrading their browser.

3. Masquerade

Masquerade lets you quickly switch between user accounts by entering their name without needing to know their password. It’s very helpful for testing the functionality of modules as different users and roles without using ‘test’ accounts. It’s also helpful to see what the user is seeing when they report issues with your site.

4. AddThis

If you have a site with lots of useful content, AddThis adds a button to the bottom of a node. When you hover on it, it will pop up with options to share the content to popular sites like Digg, Technorati, Fark, Twitter, or direct email to a friend.

5. HTML Mail

HTML Mail
By default, any email sent out of the Drupal application is plain text. As of Drupal 6, there is no setting to change this. If you ever tried sending an HTML email with Drupal, then you know that it would effectively kill any style you tried to add. HTML Mail will change the outgoing header types to text/html, and provide you with htmlmail.tpl.php so you can pretty up and personalize messages from your system.

6. ThemeKey

Have you ever had a splash page or path in your website that isn’t anything like your site theme? ThemeKey will let you load a different theme for pages or paths.

7. Username AJAX Check

Ever get tired of registering for a site only to find out the username you want is already taken? Username AJAX Check is simple: as you type in a name when registering, it will check to see if that name is available before submitting the form.

8. Views Group By

Views Group By
Views 2 is a fantastic module, however, there are some things it can’t do such as grouping using SQL on a field and using COUNT(). Suppose you had a custom view that showed how many nodes you had of each type or how many users there are of a particular role. This module will provide that functionality.

9. SMTP

This nifty module lets you send mail out through an SMTP server instead of using PHP to send mail. It works with SSL and services like Gmail. It’s great when used in conjunction with HTML Mail and other modules like Simplenews if you run newsletters on your Drupal website.

10. Job Queue

Job Queue
Job Queue provides functionality to queue up your cron jobs so they are executed in chunks instead of all at once, lessening workload on the server. If you are experiencing PHP timeouts when cron runs, or if you are having issues using Views Bulk Operations, give Job Queue a try.

Bonus module

Multiple Node Menu is a newly released and nifty module for working with multiple menu links. Please note that this this module is still experimental, so use it at your own risk.

The Ultimate Drupal SEO Module Directory

Back in 2008, when LevelTen made the official switch to only supporting the Drupal CMS, one of the primary factors in our decision making was the marketing capabilities that Drupal provided. From a purely search engine optimization standpoint, Drupal was (and still is) heads and shoulders above other open source content mangement systems. Why is Drupal so much better?
  1. Great coding.
  2. Ease of content creation.
  3. Modular functionality.
Great Coding
The core Drupal framework is notorious in its reputation for having a clean and well-coded backend. When we perform SEO audits for our clients, this is generally one of the first things we look at. A poorly coded (and performing) website can have major implications for your organic search performance, as well as your user experience. By using the Drupal framework, and by selecting and configuring the right modules, you can better capitalize on the extra business good organic SEO can bring.
Ease of Content Creation
As any good Internet marketer knows, the key to good SEO is the ability to create great content. High quality content will attract natural inbound links, traffic, and activity on social media sites. With a proper and professional Drupal installation, it becomes much easier to create high quality content, complete with images, video, and more. In many ways, this can be your secret weapon in your quest for organic domination.
Modular Functionality
Did you know that the Drupal community boasts almost 5,000 contributed modules? With contributed modules, you can add functionality from 3rd party websites like Google, Twitter, Facebook, and more. Drupal's contributed modules help extend the functionality of Drupal's core installation. The Drupal community has created many modules to help make your Drupal SEO work a bit easier.
Taking it a step further.
We've scanned the Drupal community for as many Drupal 6 SEO modules as we could find and assembled them in this guide. You'll find many different types of SEO modules, from those that help with your content (on-page) optimization, to analytics and some of the more technical aspects of SEO. If you have any Drupal SEO modules that you'd like to see added to this directory, please let us know in the comments!

Drupal Content Optimization Modules

  • Content Analysis Suite*
  • The Content Analysis module is an API designed to help modules that need to analyze content. The module enables a suite of content analyzers to provide multiple views into the content on your Drupal site or on any website. The suite is currently built with Quick SEO, Scribe SEO, Readability and W3C Analyzer components.
  • Content Optimizer*
  • The Content Optimizer module helps increase your Drupal site’s search engine (e.g. Google) rankings by improving on-page optimization factors. It provides an instant analysis of any site content as a quick and easy guide to assure optimization best practices are consistently followed. The analysis displays vital content statistics and recommendations for improving search engine rankings.
  • Automatic Node Titles
  • Automatic Node Title is a small and efficient module that allows hiding of the content title field in the form. To prevent empty content title fields one can configure it to generate the title by a given pattern. Advanced users can also provide some PHP code, that is used for automatically generating an appropriate title.
  • Taxonomy Manager
  • This module provides an powerful interface for managing a taxonomy vocabulary. A vocabulary gets displayed in a dynamic tree view, where parent terms can be expanded to list their nested child terms or can be collapsed. Taxonomy Manager has many functions and key features including: mass deleting, mass adding new terms, moving of terms in hierarchies, merging of terms, simple search interface, CSV export of terms and many more.
  • Page Title
  • This module gives you granular control over the page title. You can specify patterns for how the title should be structured and, on content creation pages, specify the page title separately to the content's title. Every piece of content in Drupal has a title, and so does every page. The page title is the one found in the HTML head inside the title tag. It is also used on SERPs (Search Engine Result Pages) and can greatly enhance your websites SEO (Search Engine Optimization).
  • Node Words
  • Nodewords is the name of both the project and the main module (nodewords.module), which implements a public API used by the other modules of the project. This project allows you to set some meta tags for each Drupal page. Giving more attention to the important metadata such as keywords and description on some of your nodes allows you to get better search engine positioning.
  • Keywords
  • The features of the Keywords module are widespread. It allows you to: Display lists of the node's keywords and their densities at tab "Keywords", display lists of keywords and their densities for all site's nodes at page "All keywords", Links to nodes where keyword was found also displayed, add a node's body text title and teaser to find more keywords, and count real density and save node's keywords as taxonomy terms to selected vocabulary, among others.
  • Topic Hubs
  • Harnessing the power of Calais tagging, administrators can create Topic Hubs based on site’s most popular tags. Topic hubs are highly configurable and contain a series of pluggable content modules, like “Most Read” content for this topic, “Most Commented” stories, most active contributors, and links to other related topics. To top it off, integration with Calais Geo allows for plotting all of your content for a Topic Hub content on a map.
  • Related Content
  • Related Content enables site maintainers to easily select on a per-node basis what nodes should be displayed along with it. Nodes that are available for selection are provided by one or more views, provided by the views module. How the nodes are displayed is configurable, as well as themeable. The module also provide a small but powerful API for advanced users.
  • More Like This
  • More Like This provides a pluggable framework for providing related content. This data is provided as blocks to be manipulated during theming. It works by first specifying your "Thumbprint" for a particular node on the node edit form. By "thumbprint" we mean you can specify the terms/words that you, as an editor, feel uniquely identifies this content item. You can either select existing taxonomy terms associated with this specific node, enter free hand terms, or have them prefilled for you with suggestions returned by the Calais Web Service.
  • Meta Tags Node Type
  • This module extends the functionality of Nodewords so that certain meta tags can be specified on a per node type basis. It supports the "robots" meta tag, "keywords" meta tag, "description" meta tag and uses the Token module to allow token replacements. This node is best used to edit any content type and look for the Meta tags node type field set and configure any default keywords, description and robots for that content type.
  • SEO Friend
  • The Drupal SEO Friend module is meant to be used along side existing Drupal SEO modules to make them more effective. This module does not replace functionality available in the SEO Checklist and SEO Compliance Checker modules. It shows a series summary reports and a list of Drupal SEO-related modules and if they have been installed and enabled.
  • SEO Checker
  • The SEO Compliance Checker checks node content on search engine optimization upon its creation or modification. Whenever a publisher creates or modifies a node, the module performs a set of checks and gives the user a feedback on the compliance of the rules. This module is supported by the UFirst Group. It introduces a hook to gather information about existing SEO checks in other modules. Upon content creation, the core module applies the found checks and collects the results in order to display them as a table to the user.
  • Open Calais
  • The Calais Collection is an integration of the Thomson Reuters' Calais web service into the Drupal platform. The Calais Web Service automatically creates rich semantic metadata for the content you submit – in well under a second. Using natural language processing, machine learning and other methods, Calais analyzes your document and finds the entities within it. But, Calais goes well beyond classic entity identification and returns the facts and events hidden within your text as well. The web service is free for commercial and non-commercial use. It requires registration to obtain an API Key.
  • Nodewords by Path
  • The Nodewords by Path module complements the Nodewords module, and allows for some advanced settings for - you guess it - paths!
  • Link Checker
  • The Link checker module extracts links from your content when saved and periodically tries to detect broken hypertext links by checking the remote sites and evaluating the HTTP response codes. It shows all broken links in the reports/logs section and on the content edit page if a link check has been failed.
  • No-Follow List
  • Allows a blacklist of sites that will have a rel="nofollow" attribute added to their link tags whenever used on your site. Originally the only page in the blacklist was Wikipedia, though it now allows an admin controlled blacklist and whitelist. Since this is a filter module, it only works on text that is passed through Drupal's filter system. The biggest example of content passed through the filters are the body of content, blocks, and cck text fields where the user specifies an input format. It will not work on several areas including menus, site footers, mission statements, and profile fields.
  • Alinks
  • Alinks is the Drupal port of the Wordpress module by the same name. The Alinks module is incredibly useful for Drupal SEO, as it allows you to easily create deep links on the fly. Alinks allows you to specify a word or phrase you want linked in your website, and Alinks will comb your database for that term. Alinks then links the term within the content body on display, which does not alter your node content. These anchor text optimized deep links will make your site more visible to the search engines, and slightly influence the terms your site can rank for.
  • Glossify Internal Links Auto SEO
  • Glossifly Internal LInks acts much like Alinks in that it allows you to easily create anchor text optimized internal links for your website. Glossify Internal Links looks for text matches between node titles and node body content, and then turns those text matches into internal links. In the future, they plan to offer taxonomy based functionality as well.
  • Search 404
  • The Search 404 module is one of our favorite Drupal modules for SEO. Search 404 is particularly useful for capturing visitors that would have hit a 404 page on your site, and left. Instead of displaying a 404 page, Search 404 takes runs a site query based on the users' search terms, and returns the most relevant page. We've used this module at LevelTen several times during complex site migration strategies, and Search 404 has performed well.
*Developed by LevelTen Interactive

Drupal Technical SEO Modules

  • Path Redirect
  • This module allows you to specify a redirect from one path to another path or an external URL, using any HTTP redirect status. To help and boost effectiveness, Global Redirect ensures that your content is only visible at the one, best URL possible.
  • Site Map
  • This module provides a site map that gives visitors an overview of your site. It can also display the RSS feeds for all blogs and categories. Drupal generates the RSS feeds automatically but few seems to be aware that they exist. The site map can display the following items: a message to be displayed above the site map, latest blogs, any books, any menus that will be displayed fully expanded, and any categories with node counts and RSS feeds.
  • XML Sitemap
  • The XML sitemap module creates a sitemap that conforms to the sitemaps.org specification. This helps search engines to more intelligently crawl a website and keep their results up to date. The sitemap created by the module can be automatically submitted to Ask, Google, Bing (formerly Windows Live Search), and Yahoo! search engines. The module also comes with several submodules that can add sitemap links for content, menu items, taxonomy terms, and user profiles.
  • W3C Validator
  • Checks to see if your site meets the standards set forth by the W3C.
  • Google News
  • The Google News module helps you create a Google News compliant sitemap for your sites content. Creating a Google News compliant sitemap is the best way to get your site's content included in Google News searches.
  • Path Auto
  • The Pathauto module automatically generates path aliases for various kinds of content (nodes, categories, users) without requiring the user to manually specify the path alias. This allows you to get aliases like /category/my-node-title.html instead of /node/123. The aliases are based upon a "pattern" system which the administrator can control.
  • HTML Purifier
  • The HTML Purifier module is great for those of us who aren't HTML coding experts! HTML Purifier for Drupal not only protects your website from malicious code (XSS), but checks to make sure the code you do write is standards compliant.
  • RobotsTxt
  • This Robots.txt module for Drupal is useful when you're running a multi-site install and want to have a different robots.txt file for each site.
  • Site Verify
  • The Site Verify module for Drupal helps you verify ownership of your website with popular websites like Google Webmaster Tools, Google Apps, Bing Webmaster Central, Yahoo! Site Explorer, Yandex.ru and other sites that use a meta tag system for verification.
  • Google Website Optimizer
  • The Google Website Optimizer module helps you to integrate the Google Website Optimizer service into your Drupal website. Google's Website Optimizer is a service that helps you run a/b and multi-variate tests with your web page layouts. This is extremely useful when trying to optimize your conversion rates.
  • Link to Us
  • The Link to Us module helps you create a page full of cool banner graphics that your websites users can use to link back to you. This can be great for community websites where people want to show off their affiliation. This is also useful as a means for gathering backlinks for your website.
  • SEO Checklist
  • This module provides a checklist of good Drupal SEO (Search Engine Optimization) best practices. Maximize the presence of your Drupal website in the major search engines like Google, Yahoo, Bing, etc. It provides a checklist that helps you keep track of what needs to be done. First, it will look to see what modules you already have installed. Then, all you have to do is go down the list of unchecked items and do them.

Analytics Modules

  • Google Analytics
  • The module allows you to selectively track certain users, roles and pages, monitor what type of links are tracked (downloads, outgoing and mailto), monitor what files are downloaded from your pages, cache the Google Analytics code on your local server for improved page loading times, and track user segmentation from Drupal profile data. It also provides Site Search support and AdSense support.
  • Click Heatmap
  • The Click Heatmap module provides integration between Drupal and the ClickHeat library. The module itself does not record any data or generate click heatmaps. Instead the module provides a limited Drupal related scope and injects the the Javascript necessary to record the click data.
  • Woopra
  • This module adds support for the Woopra web statistics and real-time tracking system. This modules includes support for: selective tracking of users based on their role, local caching of the tracking code, explicit tracking on their username, and display users' avatars and email addresses (optional) in Woopra.
  • Search Engine Referrers
  • Search Engine Referers is a simple module to view the search engine queries used by your visitors. It parses the referer URLs of popular search engines in you access log and extracts the search queries. Currently supported: Google, Yahoo!, Live.com, Yandex.ru, Rambler.ru.
  • Quantcast
  • Quantcast engages 220 million U.S. Internet users, providing detailed audience profiles for the advertising marketplace to learn more about what consumers are doing online. They also provide advertisers with a new way to evaluate their individual customer profiles against the entire U.S. Internet population, so they can identify prospective customers.
  • Omniture
  • This module integrates the Omniture Site Catalyst statistics monitoring software into a Drupal site. This module is still growing and gaining a final form. Currently the 6.x 1.0 release can be extended using an "inc" file; however, the development version is much more flexible and can be extended using a hook_omniture_variables. Be sure to check the readme.txt file for specific implementation instructions.
  • Google Analytics API
  • This module takes advantage of data available from the Google Analytics Data Export API. A basic API level exists in the module for programmatically fetching data. With this one could build anything that uses analytics data -- for logic or to display graphically.On top of this, analytics data can be accessed via an administration interface, including a block that shows statistics about the current path, and a more detailed page for paths and nodes.
  • Get Clicky
  • Get Clicky is a real time web analytics tool. It allows you see your website analytics in realtime and react to each of your users' actions immediately - not after 24 hours. You can embed your analytics stats on a site and use a free and open Developer API.