lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


In my experience, the most important best practices for programming at scale are source control, modularity, and automated testing.

 

Source control should need no explanation, but it needs to be said, because many programmers get started without using source control and never get around to using it. Also, the quality and affordability of source control systems has improved dramatically in recent years. There are multiple competing cloud hosted Git services with pull request workflows that are essentially free for most projects. There is no excuse not to be using source control.

 

The Lua module system is perfect for modularity. Modules abstract dependencies. The Lua module system enables service-oriented architecture, dependency injection, and programming by composition. It may be hard for people to appreciate how powerful and useful the module system is, because it is so simple.

 

Automated unit testing requires modularity. The code under test is isolated by replacing its dependencies with stubs or mocks. A unit test framework and a mock framework are helpful. If you don’t use an off the shelf framework, be aware that you may end up writing one. The main thing is to write automated unit tests at the same time as the code, or earlier if possible (Test Driven Development). Code coverage of 100% is achievable. If a line of code cannot be unit tested, it should be considered unreachable and deleted.

 

Automated integration testing is a huge area. Techniques include simulation, instrumentation, fault injection, fuzzing, and A/B testing.

 

HTH,

 

Tom

 

 

From: Joao Von <joao_carlos.geo@yahoo.com>
Sent: Wednesday, August 19, 2020 2:29 PM
To: lua-l@lists.lua.org
Subject: Lua application programming (Big message)

 

Hello folks. Is everything okay with you? I hope everything fine.

I want to obtain a Lua community help about serious Lua application programming.

I watched Hisham´s lectures on programming Lua applications on Youtube (LuaConf 2017), which led me to try to get some help on this subject. I found very interesting his vision of how to program Lua in the form of libraries, but I still have a certain difficulty in translate this into my projects (and find LOA references in internet).

*******************************************************************
IMPORTANT MESSAGE FOR RECIPIENTS IN THE U.S.A.:
This message may constitute an advertisement of a BD group's products or services or a solicitation of interest in them. If this is such a message and you would like to opt out of receiving future advertisements or solicitations from this BD group, please forward this e-mail to optoutbygroup@bd.com. [BD.v1.0]
*******************************************************************
This message (which includes any attachments) is intended only for the designated recipient(s). It may contain confidential or proprietary information and may be subject to the attorney-client privilege or other confidentiality protections. If you are not a designated recipient, you may not review, use, copy or distribute this message. If you received this in error, please notify the sender by reply e-mail and delete this message. Thank you.
*******************************************************************
Corporate Headquarters Mailing Address: BD (Becton, Dickinson and Company) 1 Becton Drive Franklin Lakes, NJ 07417 U.S.A.