Is a well-written code useful to the company?

This is a common dilemma among IT staff: “Should I spend more time writing code, or should I simply get it done quickly?” Although everyone wants to take time to write code for every function, it is difficult to do so. The never-ending shortage of development time and pressure from the boss often forces IT staff to give up the pursuit in the quality of coding to produce new features/new products, finishing at a barely pass standard and pick-up the mess later. However, programmers are just human, and it’s hard to defy the law of “later means never”. You can not get both, and we generally opt for saving development time and cost.

Even though we know we should spend time in writing code better at the beginning, how can we convince ourselves, our bosses, and even our bosses to write better right from the start? What is the importance of quality coding? Martin Fowler recently wrote an article titled “Is High Quality Software Worth the Cost?” which provides us with a clear answer to the question on what software quality is really about in various aspects.

External quality and internal quality are the most important aspects of software quality.

Martin Fowler first distinguished between external and internal software quality. External quality refers to what is visible to the user, such as the UI and program flaws, while internal quality refers to what is difficult to distinguish between good and bad, such as the software architecture.

Nowadays, many companies focus on the UI and UX design, because it is easy for users to get frustrated, complain or even give up because it is not smooth to use! use. Of course, programmatic flaws should be avoided as much as possible, because they directly affect the user’s experience. Relatively speaking, the quality of the coding structure is hidden behind the fancy UI, and it is difficult for the user to know how well the software is coded. For example, Martin Fowler said that the UI of both software is equally good, and there are not too many programming flaws. The internal code is neat and orderly and sells for $10, while the other internal code is a mess and sells for $6. Since you can’t even see the internal code, and the code seems to work fine, who would pay $4 more for it? The former? Why do software companies have to spend resources on the internal quality of their software?

Internal quality and continuous software development

As a programmer, the most time-consuming task should be to process and modify code, even for new software development. You still need to write the source code based on the completed program. To add a new feature, you need to know how to fit the new feature into the flow of the original program, then change the existing flow and place the new feature into the source code. function. The programmer has to understand how the program is written because he/she usually comes across/uses the original code.

The problem arises when the internal quality of the original program is extremely poor, the logic is confusing, and the data is hard to follow. Understanding and using the original program. The difference between the program’s current state and its supposed state is what Martin Fowler calls the cruft, a kind of programmatic redundancy. He refers to another famous programmer, Ward Cunningham’s suggestion of cruft as a kind of Metaphorically, Technical Debt is a technical debt because when a programmer ignores internal for whatever reason. The resulting technical debt will cause all future programmers involved in the source code to spend more time on the process. These additional hours may be considered as interest on the technical debt.

Although users do not have direct access to the internal quality of the software, they do care about the time it takes to develop new features, which is directly related to the time it takes to develop the software. The impact on internal quality. As there is a large amount of technical debt, every new feature added will carry a corresponding interest rate, which means that the development time will increase and users will have to pay more for the new features. Waiting the same amount of time for new features to be available. In this case, software with less technical debt will release new features faster than software with more debt, and users are relatively likely to Switch to a similar software that is more expensive but has more features. A software with a lot of technical debt may be able to run quickly, but it often loses out on staying power.

Martin Fowler points out that even the best development teams inevitably incur technical debt, because the development process is often in a state of uncertainty, and developers only have a rough idea of what the software needs, and can only see steps, the later the fog will clear.

We made good decisions, but only now do we understand how we should have built it.

A successful development team will be able to build the platform by writing automated tests, reconfiguring the building, and building materials. refactoring), continuous integration. This means that the development time for new features can be reduced by actively eliminating sufficient redundancy. In this sense, software with high internal quality may have a higher initial development cost. In the long run, however, software with high internal quality will be cheaper to develop.

Therefore, you programmers should know how to explain the importance of software quality to your bosses, and your bosses should also know how to allocate their time and resources for software development, right?

We are ONEs Software Limited, a Hong Kong based software development company dedicated to the provision of the best software solutions tailor-made for your business with our expertise and professional technology. If you are interested in bringing new impetus into your business, or looking for software to support your business growth, or for inquiries, please feel free to contact us.


Website: https://ones.software/
Email: hello@ones.software
Tel: (+852) 5538 3410


]]>

Why you should develop your own software for your business now?

In today’s business world, software is an indispensable part of business operations. Deciding whether your business should buy off-the-shelf software or develop your own can be a difficult decision.

Do it yourself! Developing a software is relatively expensive, but off-the-shelf software is inflexible. But why do companies still develop their own software? This article will give you some insight by comparing off-the-shelf software and home-grown software in seven aspects.

1. Suitability:

The most important benefit of developing a set of software for enterprises, is that it is tailored by the developers according to your needs and requirements. It is the best way to meet your business needs. It is common for companies to purchase off-the-shelf software from a software vendor and soon discover that the software is simply not fit for their business, and businesses are often forced to use the unfit software just not to waste resources. With home-grown software, you can be sure that the software is tailored to your business needs during the time of software development. 

2. Scalability:

Home-grown software is more scalable than off-the-shelf packages. For home-grown software, the developer designs the software according to the basic operational and business logic of the business. The developer will be able to maintain and extend the functionality of the software as the business expands. However, for using off-the-shelf software, companies often encounter maintenance problems when part of their business needs change due to their changes in business scope. As the changes are not covered by the off-the-shelf  software, the business may end up needing to purchase another off-the-shelf software to remedy the situation. Home-grown business software can meet your business needs while allowing your business to continue growing without being bound by software limitations.

3. Security:

Home-grown software can help protect your business from external threats. Hackers to enterprise software mostly exploit known vulnerabilities in commonly used software. For hackers, home-grown enterprise software is not a vulnerable target because it takes relatively more time and effort in hacking. The software developer can tailor hacker protection for the business, making it much more secure than off-the-shelf software.

4. Enterprise productivity:

Using the right software can have a huge positive impact on productivity. Self-developed enterprise software can simplify the operations according to the enterprise’s operation mode to increase enterprise productivity. Developers can also tailor the job analysis reports to display the work performance graphically based on the data. The management team will have a clear understanding of the company’s operations. In this sense, you can set the direction for your business more efficiently.

There are only a few off-the-shelf software that can share data easily, and since off-the-shelf software isn’t tailored to your business operations, you will not be able to share your data more efficiently. This may result in a decrease in the overall productivity as employees have to adapt using the software. For off-the-shelf software to analyse the work data, they often need to integrate data from different softwares, which may be more prone to errors and not able to get the job done effectively. While self-developed enterprise software can avoid this kind of integration problems because it is designed to fit in your business operations.

5. Maintenance efficiency:

Self-developed enterprise software can be properly maintained as required. When using off-the-shelf software, a business customer is only one of those thousand customers using the software, the software developer can only provide limited support for each case. As the initiative of supporting software fixes is taken by the software developer, as a business customer, you have no control on the problems you encountered and finding a way to fix them. Software developers take the control and you could only depend on them providing the fixes. If the software developer decided not to maintain the software, there is a chance your business may need to source and replace the software immediately, and costs your business additional time, effort and money. There is also a chance that there will be a window of time when the software does not work properly. 

There is no doubt that self-developed enterprise software has the leading edge in maintenance, software development companies provide one-to-one maintenance services for their customers. You can be sure that your business and fixes you need is properly taken care of with prompt and tailored maintenance services.

6. Additional costs:

Home-grown enterprise software can help you save money on hardware purchases. Off-the-shelf software often has specific hardware requirements, which means that your business may need to purchase additional hardware to run the software effectively. Home-grown enterprise software works the opposite way, the software can be programmed to work with the existing hardware and functionality in your business, saving your money from procuring additional hardware just to meet the compatibility requirement in running the off-the-shelf software.

7. Intellectual Property:

The intellectual property of self-developed enterprise software can be fully owned by the enterprise. With home-grown software, there is no need to work with any particular vendor, as you are the legal owner of the product. For off-the-shelf software, you will be required to pay a recurring fee for each user license to obtain access to the software.

Conclusion

Self-developed enterprise software may seem to be more expensive than off-the-shelf software on the surface, however when considering the additional cost in hardware procurement, or the risk of software developers stop providing maintenance for the software, self-developed enterprise software is definitely a more secured and wise choice for enterprise customers. 

It is also worth noting that, for self-developed software, software development and maintenance can be carried out in phase according to the development of the enterprise in terms of scalability. In general, self-developed enterprise software can provide a solid software foundation for your business and support the continued software needs during your growth.


Website: https://ones.software/
Email: hello@ones.software
Tel: (+852) 5538 3410


軟件兩種價值的爭持

軟件工程師應該堅守的價值

Photo by Austin Distel on Unsplash

Code 寫得好對公司有用嗎?」這一篇我們談到Martin Fowler如何分析軟件質素和開發時間的兩難,這次就讓我們看看Robert C. Martin 在其近作《Clean Architecture: A Craftsman’s Guide to Software Structure and Design》對於軟件開發時,軟件工程師所面對的難題。

還原基本步,軟件本身究竟對於軟件的持份者有何價值?Robert C. Martin認為主要有兩種:行為價值(Behavior)和結構價值(Structure)。

行為價值,意思即是軟件本身的用途。首先軟件會被設計成使得某個機器以指定的方式運作,並因而可以幫助開發方創造或提高利潤。而軟件工程師則是負責幫助系統的使用者建立一套對於這個軟件系統的功能定義(functional specification),或者是其需求文檔(requirements document),然後編寫相應的程式使得機器能夠符合這些要求、定義。而當程式的運作不符要求,軟件工程師就要負責除錯,並解決問題。

結構價值,意思即是軟件的靈活度。軟件之所為「軟」件,皆因其柔軟,保持靈活,容易被改變,否則就和硬件無異。軟件本身用意在於能夠通過一種方式,輕易轉變機器的行為。

改變的實行

很多時軟件工程師以為自己只需要應付行為價值,按照需求編寫程式,並持續改錯才可以,但現實並非如此。

對於軟件的持份者來說,他們所提出的一系列改變的範圍都是大概類似的。但在軟件工程師來說,處理持份者的改變就如要持續將一堆拼圖塊,拼到同一個愈變複雜的拼圖裏。Robert C. Martin比喻為將方形的螺絲擰進圓形的螺絲孔裏,因為現有的系統的「形狀」(shape)不會和要求的「形狀」相同。

改變的範圍和「形狀」之間的分別,很多時就成為影響軟件成本的關鍵。有時改變的成本比例會遠遠大於所需改變的大小,亦令開發成本年年遞增。

改變的難度理應只與改變的範圍(scope)有關,而非與改變的「形狀」有關,而這牽涉到系統的架構設計。因為只要架構設計傾向一種「形狀」,那麼新的要求就更難得以實施。

兩種價值的爭持

那麼,這兩種價值如何取捨?系統能夠運作重要,還是系統能夠輕易改變重要?

如果問一個業務部經理,答案自不然是前者,並認為現時的功能比起往後的靈活度重要,而不少開發者亦會跟隨這種說法。不過,Robert C. Martin認為後者比前者來得重要,他舉例說:

  1. 如果一個程式能夠正常運作,但完全無法改變的話,那麼當需求改變,程式就不能夠運作,而開發者亦無從將之改變。程式就等同垃圾。
  2. 如果一個程式目前未能正常運作,但容易改變的話,開發者就能使其運作正常,便可以隨著需求改變加以修改。程式就能夠持續有用。

當然,有些系統因為一些功能、定義,的確無法改變,因為其改變的成本超出改變所帶來的利潤。而這時,業務部經理就會因為你任由該系統到達一個無法改變的程度憤而大怒。

緊急和重要的分歧

The Eisenhower Matrix

Robert C. Martin 提到一個分析難題的方法: The Eisenhower Matrix。

難題通常有兩種,緊急的和重要的。通常緊急的都不特別重要,而重要的都不特別緊急。而系統的功能就是前者,而系統的架構就落入後者。而在The Eisenhower Matrix裡頭,就分為四種:

  1. 緊急而重要的;
  2. 不緊急但重要的;
  3. 緊急但不重要的;
  4. 不緊急又不重要的;

業務部門和開發者通常就是將緊急但不重要的事,優先於緊急而重要的。他們沒有將重要的和不重要的分開,而導致真正重要的事情被忽略,重要的系統架構就被不重要的功能所覆蓋。

Robert C. Martin指出,分析事情重不重要,責任不在業務部門,因為他們沒有能力去分別。所以開發者為了公司長遠利益,應該有責任去指出事情的優次為何,而和各部門的作出持續掙扎,其他的部門亦應如此。

開發者作為開發軟件的一員,應該清楚這種和各部門之間掙扎,堅持系統的靈活度,以維護系統架構,這也是職責的一部分。



Website: https://ones.software/
Email: hello@ones.software
Tel: (+852) 5538 3410

更多資訊可以留意 ONES Publication 定期發佈的文章,亦可以聯絡我們,我們的網址是: https://ones.software

]]>

如何推動有效在家工作?(公司篇)

Photo by manny PANTOJA on Unsplash

上一篇我們探討過有關員工如何能夠適應突如其來的在家工作模式,今次就以在公司管理層角度,看看如何推動有效的在家工作。雖然事先制定明確的遠端工作政策和培訓固然比較好,但在突然出現的變化下,這種程度的準備是並不可行,那麼,管理層要如何面對在家工作的挑戰?

首先,管理層需要了解清楚遠端工作的要求,否則,在缺乏準備和培訓的情況下,即使是平時表現出色的員工,在參與遠端工作時其工作效能和參與度很有可能變差。我們不妨先從探討員工所面對的問題開始:

1. 缺乏互相接觸,難以獨自處理工作

有些員工渴望辦公室環境裡頭的互動,或者是慣於坐在辦公桌前,被同樣在工作的同事包圍的感覺。缺乏面對面的接觸使得管理層難以監察進度之餘,亦令員工覺得管理層和同事間無法適切回應他們工作上的需求和疑問。

2. 無法掌握工作時間,導致壓力過大

在某些情況下,在家工作的員工未能清楚掌握工作時間,不知道何時應停下來,導致自己、其同事以至下屬都受到影響,特別是在全球工作環境下,其他同儕可能全日都在線,並隨時要求支援。這時,員工們就更難以分清何時應該下班。

3. 疏離感大增

孤獨是關於遠端工作的最常見的抱怨之一,因為員工缺少辦公室環境中的各種社交互動。性格較外向的人更容易在短期內受到孤獨感所影響,尤其是當他們在較長期遠端工作環境中,未有機會與他人交流,影響就會更大。而長期來看,孤獨感亦會容易使員工對公司的歸屬感降低,甚至增加員工日後選擇離開公司的機會。

4. 工作環境周圍的騷擾

不少員工因為家中環境比起工作環境嘈吵的關係,會變得變得心不在焉而感到沮喪。近來不斷看到一些片段顯示人們在家中經常受到如自己的小孩、寵物的煩擾,這些絕對是現時員工面對著的問題。突然轉換為在家工作,往往難以找到合適的工作環境。而要同時處理家庭和工作之間的問題,亦是員工經常要面對,這些都會令到員工無法發揮應有水準。

Photo by kyryll ushakov on Unsplash

那麼,管理層如何為遠程員工提供相應快捷的支持?以下列舉幾項例子:

1. 訂定針對遠端工作的模式

為員工訂定適合他們的新工作模式,有助他們適應遠端工作。例如透過每日定期的電話聯繫,作出工作匯報。不論是一對一的通話,還是採取團隊通話會議,都能夠成為表達訴求和問題的渠道,令他們明白公司樂意提供遠端工作的協助,減少因為溝通不善而導致工作進度減慢。

彈性工作時間亦是一個不錯的選擇。有些作為父母的員工認為,在傳統的辦公時間之外工作,他們的工作效率會更高。有些公司甚至考慮通過提供兒童保育員津貼來幫助員工。與他們清楚訂立工作時間,有助令他們保留足夠的休息時間,才能使其工作態度維持應有的水平。

2. 提供有效的線上通信軟件

僅僅只是利用電子郵件溝通是遠遠不夠的,近來各種針對視像會議的通信軟件一炮而紅,例如 Slack, Zoom, Microsoft Teams等等。這些軟件可以提供許多很多面對面對話的機會,尤其是針於較小的工作團體。視像會議能夠增加各自在家的同事互相了解之餘,也有助於減少員工因為遠端工作而產生的孤獨感。

當然,要留意有關這些通信軟件有沒有做好數據安全的措施,以免因為誤用一些未達安全標準的軟件,而導致公司資訊意外流出。

3. 增加員工社交機會,加強精神支援與鼓勵

即使是遠端工作,也能透過各種虛擬活動來增加員工的日常交流,例如進行線上午餐,甚至是一同進行短暫的撐舉運動,或是朝會前幾分鐘的閒談,也能補充因為遠端工作而缺少的正常交流,減少孤獨感。

加強精神支援,聆聽員工的訴求,也是不可缺乏的要項,建立渠道的同時,更重要是積極的鼓勵與詢問。有時只需要一句問候,就能為員工創造訴說自身面對何種難題的機會,有助認知他們的壓力與不安來源,並提供相對應的支援和鼓勵。

總結

雖然因為疫情的關係,很多工作進度都被打亂。但我們相信不少企業都能夠趁著這次無可避免的變動,化危為機,透過利用各種數碼科技的應用,將工作流程、環境進一步數碼化,就能夠減少影響,亦對往後企業運作有所得益。希望以上的資訊能夠為企業帶來一點提示,一同渡過這個逆境。


如何能夠將辦公室數碼化,迎接數碼時代的來臨?可以了解一下 Bookings ONE如何能夠提供嶄新的智能辦公室體驗。不論是管理層還是員工的需求,都能一一滿足。

有助提升公司形象之餘,各類企業資源管理、數據分析亦能夠透過同一平台進行,整體工作效率藉以大幅提高。


聯絡我們:
主頁: https://ones.software/hk/
電郵地址: hello@ones.software
電話號碼: (+852) 5538 3410
Contact us:
Homepage: https://ones.software/
Email address: hello@ones.software
Phone number: (+852) 5538 3410

更多資訊可以留意 ONES Publication 定期發佈的文章,亦可以聯絡我們,我們的網址是: https://ones.software

]]>

在數碼時代,企業如何提升效能?

智能辦公室為當代企業提供的各種效能指標
Photo by Brooke Cagle on Unsplash

近年科技的創新,大大改變了我們彼此互動的方式,而這些改變正在影響企業裏各人的角色。我們能夠看到,數碼設施與傳統工作環境已經漸漸融合,針對設施使用率、生產力和工作空間等等的管理工具日漸普及,企業能夠透過這類數碼平台,善用新的途徑得到往時無法輕易得到的工作數據。

這種結合線上線下的企業模式,不單止為企業管理如照明、網絡等日常環境的操作,也能夠提供有關各類設施的管理資訊,以助企業管理者訂立一些新的效能指標,促進整體工作效率。相比起以前要運用不少人力資源去記錄數據,每年列印數百份問卷去詢問每位員工對於公司設施的滿意度,數碼化的智能工作空間可謂大大減輕這裡繁瑣的工作,並能提供及時且客觀的數據分析。

那麼,有哪些指標是能夠幫助企業提升效能呢?

設施使用率

設施使用的數據不僅在工作空間使用初期有所幫助,亦能理解員工的日常行為和工作流程。 收集會議室使用率的數據,可以幫助企業以確保員工能夠充分利用所提供的空間,並在設施上進行相應的修改。 這不僅可以提高員工的工作體驗,還可以確保企業盡量將設施用得其所。

哪些日子最多人使用某些設施? 哪些工作空間過於繁忙? 而哪些工作空間沒員工肯利用?這些問題都能輕易用數據回答,省卻以往要處理大量的文書工作。

生產力管理

Photo by Scott Webb on Unsplash

現在很多公司都會使用Slack這類的即時通訊軟件,以作內部溝通之用。而這些軟件不但加強員工之間的溝通,提供如與日曆系統整合、工作活動提示、開支批核等等的流程管理,更能給予實質數據,供管理人員以作分析,清楚理解員工能否善用通訊軟件溝通,以及掌握其工作流程和進度。

工作空間管理

現在辦公室的租金飛騰,會議室的空間附帶著很多直接和間接的成本。工作空間管理工具則能夠為管理者提供數碼管理平台,有效為員工進行會議室的預約程序,並且結合日曆系統從而妥善安排往後的會議排程。

配合圖像化的數據分析,亦能為企業管理者理解各個時段的會議室使用率、各人的使用時間、 因失約導致房間空置的次數等等,從而讓企業更了解公司會議室有否被充分利用,並更有效運用、分配公司的空間資源,為員工提供更合適的工作環境。

小結

隨著企業環境不斷與時代變遷,透過智能化工具有助企業增強設施管理,以實質、客觀的數據作為效能指標,以助企業各部門之間的合作,加強管理水準。智能化除了協助企業與時並進,提升公司形象之餘,更能作出質素上的改變,當然重要的是清楚明白企業當前真正需要的智能化工具。

聯絡我們:
主頁: https://ones.software/hk/
電郵地址: hello@ones.software
電話號碼: (+852) 5538 3410
Contact us:
Homepage: https://ones.software/
Email address: hello@ones.software
Phone number: (+852) 5538 3410

]]>

智能工作空間的真正吸引力

Photo by bantersnaps on Unsplash

金融時報最近一篇關於共享工作空間的文章:《The dark side of hip office design》,提到現存的共享辦公室的確提供各類型的設施,例如開放的工作空間、遊戲機、小食區,提供遊戲、小食、啤酒、咖啡等等,給予員工一個寓工作於娛樂的環境。但不少在這些地方工作的人反映,這些設施反而令他們無法好好工作:

「你面前會有相當多的干擾。咖啡師在所有工作桌之間,而拿咖啡的人龍一直存在。」

「星期五,很多人會帶他們的孩子來,所以你將坐在辦公桌,而在旁邊則是一個手持電子遊戲的小孩。」

「本來應該是未來的工作模式,但對我來說卻是反工作。 。 。我不得不將自己關進電話室裡頭,才能完成工作。」

比起純粹提供遊樂設施,使得工作空間更為方便,反而較有效提升工作效率,又能使得員工能夠有一個更舒適的工作空間,而智能辦公室 (Smart Office)自然是其中一個選擇。而要將一個普通的辦公室智能化並不難,通常企業會配備以下的常用設施:

  1. IoT裝置
  2. 智能會議室(Smart Conference Room)
  3. 智能辦公桌(Smart Desk)
  4. 室內地圖(Indoor Map)

IoT裝置

Photo by BENCE BOROS on Unsplash

IoT,即是物聯網 (Internet of Things),主要是指將所有物品通過RFID、紅外線等信息感測設備,與互聯網連結起來,實現智能化的識別和管理。套用在辦公室的話,就是把所有辦公室常用裝置,如燈光、音響、門鎖等等連結起來。IoT可以將各種辦公室裝置所提供的數據,集中在同一個平台上,員工就能夠透過整合好的數據進行分析,亦可以在平台上直接控制各個裝置,提升能源效益之餘,亦能減省管理成本。

智能會議室/辦公桌

不論是一般辦公室,還是共享工作空間,最多人使用的公司資源,莫過於會議室和辦公桌。通常為了預留地方開會議,員工都會爭相預約會議室。傳統會議室會由人手為各部門的會議排程,而很多時就會大量浪費人力資源在記錄、翻查、管理會議排程,智能會議室/辦公桌就能夠節省這些資源。

只要安裝好電子標牌在會議室的門前,或者是辦公桌上面,利用相對應的預約系統,就能夠輕易即時預約之餘,又能在不同平台、界面上處理會議排程,毋須每一次都要透過電話或人手去處理預約。管理者亦能同時透過系統得知過往工作空間的使用量,從而作出資源分配, 節約能源

這些系統通常亦能結合IoT裝置的使用, 如調整會議室的照明和溫度,將管理系統一體化, 簡化一些行政流程,從而達致工作效率的大幅提升。

室內地圖

地圖是我們日常生活的重要組成部分。 實際上,我們大多數人甚至都沒有意識到我們正在使用它。例如在機場或購物商場中,地圖在我們的用戶體驗中都發揮著重要作用,幫助我們導航到應到之處。

同樣對於一些辦公室大樓,當一些客人第一次到達會議的場地,他們第一眼看到的可以是一個辦公室的室內地圖,上面標誌著他們即將要出席的會議,以及地點,輕易就能掌握辦公室的梗概,從而知悉到達會議地方的路線。

小結

無論是一個全新的開放式辦公室,還是想將現有的辦公室改頭換面,增添如智能標牌和尋路提示等等的智能配置,不單止能令您的辦公室格調提升,更能夠帶來極高的投資回報。 

透過辦公室智能化,您的員工將會受到更少的額外干擾,更能專注工作更多的客人亦可以體驗您的全新智能辦公室空間。

如何能夠令到辦公室煥然一新,迎接數碼時代的來臨?可以了解一下 Bookings ONE如何能夠提供嶄新的智能辦公室體驗。不論是管理層還是員工的需求,都能一一滿足,提升公司形象之餘,員工整體工作效率亦會大幅提高。


聯絡我們:
主頁: https://ones.software/hk/
電郵地址: hello@ones.software
電話號碼: (+852) 5538 3410
Contact us:
Homepage: https://ones.software/
Email address: hello@ones.software
Phone number: (+852) 5538 3410

更多資訊可以留意 ONES Publication 定期發佈的文章,亦可以聯絡我們,我們的網址是: https://ones.software

]]>

好的軟件少不了測試?

tl;dr, 沒有測試談不上好軟件!

Photo by Adam Wilson on Unsplash

軟件編碼的質素和一間公司發展的關係,在之前的文章《Code 寫得好對公司有用嗎?》已有討論,那麼有什麼因素會左右編碼的質素?其中一樣就是軟件測試。

軟件測試(Software testing),指的是透過測試以作鑑定軟件的品質,及早找出軟件中的程式錯漏,並驗證軟件是否適合使用。軟件測試主要以運行軟件的某部分元件,評估該部分是否正常運作或合乎一些基本標準,如:

- 符合軟件設計及開發要求;
- 正確地回應各類型的輸入;
- 在可接受的時間內執行所需功能;
- 軟件功能可使用度高;
- 可以在預期的環境中安裝和運行;
- 可以達到持份者期望的總體結果;

每一個軟件中的元件,理論上都可以有無窮盡可行的測試,但資源並非無限.。所以實際上,軟件測試會傾向有策略地利用現有的時間及資源,去選擇一些比較有價值的可行測試,從而去嘗試運行該軟件並找出程式的錯漏。

不少軟件公司都會聘請專責品質保證 (Quality Assurance,縮寫為 QA) 的員工,在軟件推出之前進行一系列的人手測試。不過,這種比較傳統的測試方法往往有不少問題。

一是若果軟件本身規模大的時候,開發一方就要投放比較多的人力資源,以作出較快而全面的測試;而當每一個程式錯漏出現,品質保證人員和開發人員都必須一一檢視。

二是因為每一次重大的軟件更新,都必須經過全面的測試,才能確保軟件沒有因為更新期間編碼上的改動而產生紕漏,結果往往花費很多時間才能將新的版本推出。

近年DevOps的出現,就嘗試解決QA的工序冗長問題。在DevOps的環境下,開發人員 (Dev)、技術運營(Ops)和品質保證並非各自運行,而是傾向在每一次程式發布都有緊密合作。DevOps 希望藉著採用敏捷(Agile)般的開發方式,減少每一次編碼的變更範圍,使得每次部署不會對軟件生產系統造成巨大影響,軟件得以平滑的速率逐漸生長。開發人員亦使用各種自動化的測試,配合持續交付( Continuous delivery,縮寫為 CD)和持續整合( Continuous integration,縮寫為 CI),確保軟件本身不受編碼改動影響之餘,亦能將QA繁瑣重複的工作分攤, 減少每次部署出錯。

與傳統開發方法那種大規模的、不頻繁的發布(通常以「季度」或「年」為單位)相比,敏捷方法大大提升了發布頻率(通常以「天」或「周」為單位)

以下三種測試是軟件開發中經常利用到的自動測試模式,包括:

  1. 單元測試 Unit test,是針對軟件組成的元件進行測試,其目的在於檢驗軟件基本組成單位是否正常運作。
  2. 整合測試 Integration test,是將程式模組採用適當的整合組裝,並對系統的介面及整合後的功能進行測試,其目的在於檢查軟件單位之間的介面是否運作正常。
  3. 功能測試 Functional test,是針對軟件功能進行測試,其目的在於檢驗軟件是否正常運作,並是否實現業務上的要求。

單元測試的好處在於能在很早期的開發階段就能夠發現問題。它能夠將其所針對的元件中從整個軟件架構分離,並提供嚴謹的測試以確保該元件運作正常。開發人員能夠利用單元測試,在編碼的層面上自動測試每個單元最基本的功能,而毋須品質保證的人員親自檢驗。

而基於這種由下而上的結構,各個元件已經經過單元測試,而系統就能夠透過整合測試去專注檢驗元件之間是否正常運作,而功能測試則能在各部件間得以確保有效整合之下,集中在用家的層面測試軟件是否符合原有的軟件設計。

這三種測試在開發的不同時段都各有需求:

  1. 當軟件進行開發時,測試主要為了配合開發人員工作,盡快從系統得到回饋,所以多以單元測試為主;
  2. 在預備環境,這階段主要偵測問題,如問題發生,則停止軟件部署。通常所有測試皆符合此階段;
  3. 在生產環境,主要會運行如冒煙測試(smoke test)等比較快速的功能測試,在有限的時間內廣泛涵蓋測試軟件的主要功能。

所以我們可以說,雖然編寫測試所花費的時間不短,但對於持續開發來說,確是能夠透過預防因為編碼改動而產生的問題,來減輕長遠的技術債項,加快開發的速度,大大減輕開發的成本。


我們 ONEs Software 是一家香港的軟件開發公司,致力於通過我們專業的技術,為企業設計出最合適的軟件。如果您有興趣,歡迎與我們聯繫一起探討,為您的企業成長注入新的源動力。 更多資訊可以留意 ONES Publication 定期發佈的文章,亦可以聯絡我們,我們的網址是: https://ones.software

ONES Publication
We share what we have learned about app and web development. Find us in ones.software. Email: hello@ones.software



Reference:

https://www.sitepoint.com/javascript-testing-unit-functional-integration/

https://juejin.im/entry/584ab2dc128fe1006c7cdc11

How DevOps is Killing QA

https://medium.com/@frozenfung/unit-test-%E8%88%87-integration-test-%E6%A6%82%E8%AB%96-41b39f0f823

https://zh.wikipedia.org/wiki/%E5%86%92%E7%83%9F%E6%B5%8B%E8%AF%95_(%E8%BD%AF%E4%BB%B6)

]]>