Archive for August, 2007
BUGS LIST:Chia sẻ nỗi đau!
Hello All,
Đời fix bugs nhiều, đắng cay nhiều, mong mọi người mỗi ngày góp ít bugs củ đậu của mình lên.
Nên ưu tiên những bug mất thời gian nhất của bạn.
Mất một chút thời gian để post bài để tiết kiệm rất nhiều thời gian cho các TVser khác. Nào chú trọng update mục này cái nha.
Nhân viết cái này vì hôm nay gặp cái bugs tức tưởi quá.
1. Xử lý 1 xâu cơ sở dữ liệu cho một câu query khác, remove “limit..” nếu có, mình strtolower() để tìm “limit”, phần lớn thì ok, chỉ có một report nhỏ bị lỗi, hóa ra vì trong xâu sql đó có hàm date_format(r.datesold,”%m %Y”) (ham` cua Mysql đó, hay ko :) ) và sai format thì so sánh không ra rùi.
Log timesheet va daily report
Hai việc này vô cùng quan trọng cho việc quản lý effort, resource.
Nhưng chắc chắn là chúng ta làm chưa tốt.
Em thi` thấy chuối ở chỗ việc của mình nó linh tinh, khi mình đi làm muộn, thực ra mình cũng có ý thức tối ngồi làm, dự án bận mình cũng thức đêm, thường thì khi làm xong mới muốn log dailly report.
Nhưng daily report lại giới hạn thời gian nên không log được.
Ý thức vẫn bị đánh giá là yếu, công việc vẫn ko đc công nhận, làm vẫn mệt mỏi.
Yêu cầu sửa daily report linh động hơn, có thể fix thời gian với Thành, Nhân, và Phương trần, nhưng có cơ chế linh động cho mấy thằng bờm.
Mọi người cũng có ý thức log timesheet nhưng việc log daily report lại thiếu, thật là thiếu sót. Vì bản thân emđánh giá daily report cao hơn working time rất nhiều.
Tool này cần cải tiến cho người quản lý quyền open quyền ghi, ví dụ sau hai ngày em nhìn vào daily report của mấy đại ca thiếu, em sẽ nhắc nhở và open quyền logđể các đại ca ghi vào.
Vài lần(vài chục lần thì mọi người cũng nhớ ).
Nhân đây nhắc nhở Nhânpt về thời gian làm việc. Nên cố gắng giữ đúng working time. Có việc gì chạy lăng xăng cả buổi chiều cũng nói một câu, bác chạy đi làm cũng ko biết rồi bác có đi chơi cũng không hay, em chỉ thấy công việc chưa hoàn thành là em nhắc đó. :)
GIAO DIEN TUVINH.COM
Cực xấu..
Cực thiếu chuyên nghiệp..
;((
Giới thiệu với bạn cty mình đứa nào cũng bảo, sao trang chủ của chúng mày xấu thế :-<
Đề nghị anh em ai có tgian suy nghĩ về cái mẹt của mình nha, từ giờ đến cuối năm đó.
Ước gì, có lúc nào rỗi rỗi, tổ chức cuộc thi sáng tác giao diện logo..
SQL Injection
Nói ra thì thật xấu hổ, nhưng chả dấu dốt làm gì.
Mình đã làm hơn hai năm mà kiến thức về bảo mật của mình thật đuối.
Lang thang đến với SQL Injection giật mình. Tự nhiên mình hiểu tại sao sử dụng open source lại nguy hiểm như thế. Tại sao một trang web thông thường tấn công lại dễ đến thế.
Mình vốn nghĩ, lập trình thật là dễ, nhưng rõ ràng có những khoảng cách và đẳng cấp trong lập trình.
Hình như không trở thành một Harker tàng tàng thì không thể coi là một lập trình viên giỏi :D. Không biết mình bao nhiêu thời gian nữa?
Mọi người ai có hiểu biết về bảo mật chia sẻ đi. Đừng copy một đống bài từ vietharker về nhé :)
Dieu chinh GMT time server
Chửi nhau với khách hàng mấy ngày. Học được dòng code này hay lắm, chia sẻ cùng mọi người.
Problem:
Hệ thống của bạn chạy ở thị trường Việt nam, nhưng server đặt bên Mỹ. Như thế các transaction date, khi lấy giờ bằng hàm php : date(‘Y-m-d H:i:s’) sẽ lấy giờ trên server, và đó là giờ của Mỹ.
V iệc làm report.. có thể dẫn đến sai lệch nếu ko care.
Solution:
Mình tính viết một hàm tgian riêng, lấy tgian hiện tại điều chỉnh theo GMT, ví dụ mỹ cách mình 12 tiếng thì cộng với 12 chẳng hạn.
Nhưng điều này rất dở(..). Một dòng lệnh sau sẽ giải quyết vấnđề này.
Mọi người đặt dong` này vào file config.php( dc load đầu tiên). Và điều chỉnh gmt phù hợp.
Tất cả các hàm datetime sẽ được tự động điều chỉnh.
//Change Time zoon to GMT+10 By Arif arif@mayalogic.com 27/07/07
putenv(“TZ=GMT-10″);
Improve your technique skills
Hi Tvs guys,
Dự án của chúng ta ngày một lớn hơn, khách hàng ngày một khắt khe hơn trong vấn đề chất lượng sản phẩm.
Để đáp ứng yêu cầu của thị trường, tôi đề nghị mọi người cùng góp ý để cùng nhau tăng cường về chuyên môn chung cho cả công ty. Nghĩa là chúng ta nên đem vào một số chuẩn mới trong công nghệ phát triển.
Những kỹ năng kiến thức mới, đòi hỏi thời gian học hỏi, tìm hiểu,tiếp thu.
Vì số lượng của chúng ta khá ít không thích hợp với các hình thức training tập thể. Tôi đề nghị mỗi người nên tự trainning cho mình. Tôi đề xuất những kiến thức sau là cấp bách:
-xhtml/css: cố gắng học tập và ứng dụng càng sớm càng tốt việc sử dụng div/css cho phát triển dự án.
Hạn chế dùng table tối đa, trước khi chúng ta chuẩn hóa đc tool và thư viện phát triển( như Phuongtd nói
có thể tìm hiểu dc rất nhiều từ interactionchat)
-Co’ kiến thức và hiểu biết về ajax,dynamic element khả năng xử lý cho những ứng dụng đơn giản. Cũng lưu ý rằng AJAX làm hạn chế việc tìm kiếm thông tin. Nên với khối lượng thông tin public, nhiều hạn chế dùng ajax. Nhưng những xử lý như: check input mail đã có trong csdl chưa, rất đơn giản, thiết thực và hiệu quả.
Bên cạnh đó có một kỹ năng đơn giản hơn là sử dụng style + div cho việc ẩn hiện thông tin, kỹ thuật này rất hiệu quả với lượng thông tin khá ít, không động lắm dùng cho các tab..
-Sau khi khá vững về ajax, mọi người cần tìm hiểu về một thư viện ajax như XAJAX. trong tương lai gần, xajax sẽ được dùng mandatory như xtemplate.
Mong mọi người cùng đóng góp ý kiến để chúng ta cùng ngày một tiến bộ.
Thu vien giao’ trinh`, ebook..
1.Co’ nhiều tài liệu giảng dạy chính thống ở các trường đại học thuộc nhiều chuyên nghành khác nhau.
Mời mọi người tham khảo
http://ebook.edu.net.vn/?page=1.3&page_num=1&namxly=
2.Mới biết đến trang này, có quá nhiều tài liệu quí, lúc rỗi nên bỏ thời gian mà gom (minh` so no’ se ko cho download free nua dau neu’ qua nhieu` nguo`i biet’ den’) :)
http://www.youtemplates.com/
jQuery – Thư viện Javascript
jQuery là 1 thư viện javascript với rất nhiều functions và classes được dựng sẵn. Và điều đáng nể nhất ở jQuery là khả năng làm việc với API.
MVC Design Pattern
Model-view-controller
Model-view-controller (MVC) is an architectural pattern used in software engineering. In complex computer applications that present a large amount of data to the user, a developer often wishes to separate data (model) and user interface (View) concerns, so that changes to the user interface will not affect data handling, and that the data can be reorganized without changing the user interface. The model-view-controller solves this problem by decoupling data access and business logic from data presentation and user interaction, by introducing an intermediate component: the controller.
Pattern description
It is common to split an application into separate layers: presentation (UI), domain, and data access. In MVC the presentation layer is further separated into view and controller. MVC encompasses more of the architecture of an application than is typical for a design pattern.
Model
The domain-specific representation of the information on which the application operates. It is a common misconception that the model is another name for the domain layer. Domain logic adds meaning to raw data (e.g., calculating if today is the user’s birthday, or the totals, taxes and shipping charges for shopping cart items).
Many applications use a persistent storage mechanism (such as a database) to store data. MVC does not specifically mention the data access layer because it is understood to be underneath or encapsulated by the Model.
View
Renders the model into a form suitable for interaction, typically a user interface element.
Controller
Processes and responds to events, typically user actions, and may invoke changes on the model.
MVC is often seen in web applications, where the view is the actual HTML page, and the controller is the code which gathers dynamic data and generates the content within the HTML. Finally the model is represented by the actual content, usually stored in a database or XML files.
Though MVC comes in different flavors, control flow generally works as follows:
1. The user interacts with the user interface in some way (e.g., user presses a button)
2. A controller handles the input event from the user interface, often via a registered handler or callback.
3. The controller accesses the model, possibly updating it in a way appropriate to the user’s action (e.g., controller updates user’s shopping cart).
4. A view uses the model to generate an appropriate user interface (e.g., view produces a screen listing the shopping cart contents). The view gets its own data from the model. The model has no direct knowledge of the view.
5. The user interface waits for further user interactions, which begins the cycle anew.
Secure Php Programming
SQL Injection
Quick solutions:
- Use appropriate field types
- use a security class for user input import
- Be careful when you use a string out of the database for comparison
only quoting all user input is not enough
Direct call of included file
Quick solutions: There are many solutions.
I prefer this: put the code in the included file in a function and call it from the main file.
Output of unchecked user input, XSS (Cross-Site-Scripting)
Quick solutions: Use htmlentities() on all user input before output of user vars (except if the output goes into a textarea)
The name of an included file does not end with .php
Quick solutions: Always give your included files a name which ends with .php
Unchecked extension on an uploaded file
Quick solutions: Never let users upload any files. Make sure that they can only upload files with extensions they need.
Access Rights
Quick solutions: Access rights for
- directories: 710 (or 711 if needed)
- upload directories: 770 (or 777 if needed)
- files: 640 (or 644 if needed)
- user manegable files: 660 (or 666 if needed)
Always set the rights as restricive as possible
Login data (username and password) is saved in cookies
Quick solutions: Never save username and password in a cookie.
Always use a session id in the cookie and store username and password as a session variable.
Error messages reveal starting point for an attack
Quick solutions: Set error_reporting(0) or provide your own error handler.
A misconfigured server gives away information about your project’s file organization
Quick solutions: Put a dummy index.html and index.php in every directory
Login form uses GET method
Quick solutions: Always submit a username and password with the POST method.
The file name for a file is constructed from user input and executed (Remote File Inclusion)
Quick solution: Only include predefined files



