0
Chưa có sách nào trong giỏ hàng

Kĩ nghệ phần mềm và khoa học máy tính

17.01.2021

Một sinh viên hỏi tôi: “Tại sao tôi cần học Kĩ nghệ phần mềm thay vì Khoa học máy tính? Sau rốt, chúng là như nhau và sau khi tốt nghiệp đằng nào chúng tôi cũng sẽ làm việc trong công nghiệp phần mềm?”

Trả lời: “Kĩ sư phần mềm và khoa học máy tính là KHÔNG như nhau. Từng lĩnh vực hội tụ vào các khía cạnh khác nhau của công nghệ tính toán và dẫn tới các nghề nghiệp khác nhau trong công nghiệp phần mềm. Trong quá khứ, phần lớn phần mềm đều nhỏ và đơn giản, cho nên hội tụ là vào “khoa học về phát triển thuật toán” hay mã hiệu quả để chạy trên máy tính. Chẳng hạn, lưu giữ thông tin hay tự động tính công thức toán học hay qui trình. Đó là lí do tại sao phần lớn các chương trình khoa học máy tính yêu cầu nhiều năm học về toán và vài ngôn ngữ lập trình. Ngày nay, phần mềm là lớn và phức tạp hơn, cho nên hội tụ là vào “kĩ nghệ quản lí qui trình” hay phát triển phần mềm hiệu quả để giải quyết vấn đề phức tạp. Chẳng hạn, một trong các nguyên lí của độ phức tạp phần mềm là: “Cứ mỗi mười phần trăm tăng lên trong độ phức tạp của vấn đề, có việc tăng một trăm phần trăm trong độ phức tạp của giải pháp phần mềm. Vấn đề càng phức tạp, giải pháp sẽ càng phức tạp hơn nhiều so với được nghĩ trước đó. Đó là lí do tại sao bạn cần “kĩ sư qui trình” để giải quyết vấn đề thay vì dựa trên “khoa học về thuật toán” để tạo ra mã hiệu quả.

Bởi vì hội tụ là vào toàn bộ qui trình phát triển, người kĩ sư phần mềm sẽ tuân theo tập các qui tắc và nguyên lí thay vì nhảy vào trong giải pháp (viết mã) nhanh chóng. Chẳng hạn một trong những nguyên nhân thông thường nhất làm cho thất bại dự án là yêu cầu không ổn định. Người kĩ sư phần mềm học về “kĩ nghệ yêu cầu” sẽ biết cách kiểm điểm, kiểm nghiệm, rồi ưu tiên hoá các yêu cầu này để đảm bảo rằng chúng được xác định tốt và đủ ổn định trước khi chuyển sang pha tiếp của thiết kế. Khi chuyển từ yêu cầu sang thiết kế, người kĩ sư phần mềm tốt đã học về “kiến trúc và thiết kế” sẽ biết rằng bên cạnh các yêu cầu được xác định, có nhiều “yêu cầu suy dẫn”. Thực ra, sẽ có nhiều “yêu cầu suy dẫn” hơn là yêu cầu nguyên thuỷ và đó là lí do tại sao pha thiết kế thường lâu hơn để đảm bảo mọi thứ được tính tới trước khi chuyển vào trong pha thực hiện.

Người kĩ sư phần mềm hiếm khi làm việc cô lập mà phần lớn trong tổ vì phát triển phần mềm bao giờ cũng là nỗ lực tổ. Tri thức và kĩ năng của từng thành viên là cốt yếu cho thành công của dự án. (Làm việc tổ bao giờ cũng được dạy trong chương trình kĩ nghệ phần mềm nhưng không được dạy trong khoa học máy tính). Bởi vì yếu tố quan trọng nhất trong giải quyết vấn đề phức tạp KHÔNG phải là công cụ, KHÔNG phải là thuật toán, KHÔNG phải là kĩ thuật mà là kĩ năng của bản thân người phát triển. Người phát triển có kĩ năng cao có thể có năng suất cao hơn (tới 30 lần tốt hơn) người phát triển thường.

Chương trình khoa học máy tính hội tụ nhiều vào viết mã hiệu quả (thuật toán) cho nên chất lượng hầu hết là về khiếm khuyết phần mềm. Tuy nhiên, chương trình kĩ nghệ phần mềm xác định chất lượng theo cách khác. Chất lượng là vấn đề thiết kế tốt chứ không chỉ là viết mã tốt. Nếu dự án yêu cầu chất lượng cao thì điều đó phải được xem xét sớm trong vòng đời phát triển phần mềm. Chất lượng là tuyển tập các thuộc tính như hiệu năng, tính dùng được, tính khả chuyển, tính tin cậy, tính hiệu quả, tính kiểm thử được, tính hiểu được và tính sửa đổi được. Kĩ nghệ phần mềm cũng tin rằng chất lượng không cùng những điều như thoả mãn của người dùng, đáp ứng yêu cầu hay đáp ứng các mục tiêu chi phí và lịch biểu mà chúng là tất cả có liên quan. Thực tại, thoả mãn của người dùng = sản phẩm chất lượng + đáp ứng yêu cầu + được chuyển giao khi cần + chi phí thích hợp.

Chương trình khoa học máy tính hội tụ vào phát hiện và loại bỏ khiếm khuyết. (Phần lớn những người phát triển dành đại thể 40 phần trăm thời gian của họ cho kiểm thử). Lập trình và kiểm thử là yếu tố quan trọng trong chương trình khoa học máy tính. Chương trình kĩ nghệ phần mềm hội tụ nhiều vào chất lượng của qui trình phát triển bởi vì họ tin rằng chất lượng của sản phẩm phần mềm tuỳ thuộc vào qui trình phát triển tạo ra sản phẩm đó. Bằng việc hội tụ nhiều vào từng pha, loại bỏ khiếm khuyết ở từng pha thì đến cuối bạn sẽ có ít khiếm khuyết phải giải quyết. Thay vì mất nhiều thời gian cho kiểm thử, kĩ sư phần mềm hội tụ nhiều vào giám định, kiểm điểm ở từng pha. (Thực ra, không có chỉ một cách tiếp cận tốt nhất tới loại bỏ  khiếm khuyết phần mềm. Tổ hợp của nhiều cách tiếp cận, như giám định, kiểm điểm, và kiểm thử là cần thiết).

Mặc dầu với cả hai chương trình sinh viên tốt nghiệp sẽ bắt đầu trong nghiệp phần mềm ở những vị trí tương tự như người lập trình, người kiểm thử, và lãnh đạo kĩ thuật. Qua thời gian, phần lớn sinh viên tốt nghiệp khoa học máy tính sẽ làm việc nhiều về phía kĩ thuật hội tụ vào các thuật toán phức tạp, phương pháp khoa học, phương pháp hình thức v.v.. Phần lớn sinh viên tốt nghiệp kĩ nghệ phần mềm sẽ làm việc ở phía quản lí hội tụ vào quản lí dự án, kiến trúc hệ thông, quản lí nhóm dự án, và cải tiến qui trình.

—-English version—-

 

Software Engineering and Computer Science

A student asked me: “Why do I need to study Software Engineering instead of Computer Science? Afterall, they are the same and after graduate, we will work in the software industry anyway?”

 

Answer: “Software Engineer and Computer Science are NOT the same. Each field focuses on different aspects of computing technology and lead to different careers in the software industry. In the past, most software are small and simple, so the focusing is on the “Science of algorithm development” or efficient code to run on computers. For example, storing information or automate a mathematic formula or process. That is why most Computer Science programs require many years of mathematics and several programming languages. Today, software are larger and more complex, so the focusing is on the “Engineering of process management” or efficient software development to solve complex issues. For example, one of the principle of software complexity is: “For every ten percent increase in problem complexity, there is an increase of one hundred percent in software solution complexity. The more complex the problem, the solution will be much more complex than previously thought. That is why you need to “Engineer the process” to solve the problem rather than relying on the “science of algorithm” to create efficient code.

Because the focus is on the entire development process, a Software Engineer will follow a set of rules and principles rather than jumps into a solution (write code) quickly. For example one of the most common causes of projects failure is unstable requirements. A Software Engineer who studies “Requirement Engineering” will know how to review, validate, then prioritize these requirements to ensure that they are well defined and stable enough before moving on to the next phase of design. When move from requirements to design, a good Software Engineer who studies “Architect and Design” will know that beside the defined requirements, there are many “derived requirements.” As a matter of fact, there will be more “derived requirements” than the original requirements and that is why the design phase is often take longer to ensure everything is taken into consideration before moving into the implementation phase.

A Software Engineer rarely works in isolation but mostly in team as software development is always a team efforts. The knowledge and skills of each team member are critical to the project success. (Teamwork is always taught in Software Engineering program but not in Computer Science). Because the most important factor in solving complex problem is NOT the tools, NOT the algorithms, NOT the techniques but rather the skills of the developers themselves. A highly skilled developers can be more productive (up to 30 times better) than a mediocre developers.

Computer science program focuses a lot on efficient code (Algorithm) so quality is mostly about software defects. However, Software Engineering program defines quality differently. Quality is a matter of good design than of good coding. If a project requires high quality then it must be considered early in the development life cycle. Quality is a collection of attributes such as performance, usability, portability, reliability, efficiency, testability, understandability, and modifiability. Software Engineering also believe that quality is not the same as satisfying users, meeting requirements, or meeting cost and schedule targets but they are all related. Actually, user satisfaction = quality product + meets requirements + delivered when needed + appropriate cost.

Computer science program focuses on detection and removal of defects. (Most developers spends roughly 40 percent of their time in testing). Programming and Testing are the important factors in the Computer Science program. Software Engineering program focuses more on the quality of the development process because they believe that the quality of the software product depends on the quality of the process that creates the product. By focusing more at each phase, remove defects at each phase then in the end you will have less defects to deal with. Instead of more time on testing, software engineers are focusing more on inspections, reviews at each phase. (In reality, there is no single best approach to software defect removal. A combination of several approaches, such as inspections, reviews, and testing, is necessary).

Although both programs graduates will start in the software industry in similar positions such as programmers, testers, and technical leaders. Over time, most Computer Science graduates will be working more on the technical side focusing on sophisticated algorithms, scientific methods, formal methods etc. Most Software Engineering graduates will be working on the management side focusing on project management, system architect, portfolio management, and process improvement.