Should you file for a patent to protect your application or maintain trade secret and risk reverse engineering?

A patent excludes others from practicing the invention for a period of time in the jurisdiction that the patent is awarded. In return, the patent owner is required to publish sufficient information so that others may practice the invention. So filing for a patent gives free information to your competitors.
Trade secret information that is not known to the public, confers an economic benefit on its holder assuming reasonable efforts are used to maintain secrecy of the information.

A start-up company in “stealth mode” or an established company about to launch a new product generally keeps all information secret with respect to the new product development.

What happens just before the product is launched? Then it is important to analyze all the product features/modules and determine if the features/modules are most suitable for either trade secret protection or for patent protection.

Trade secret protection is best for underlying complex algorithms or electronics buried deep in integrated circuits which are virtually impossible to reverse engineer.

Patent protection is best for user interfaces or system level design, for which the information will become public when the product is launched.

Complex algorithms and circuits and information not easily reverse engineered are best kept trade secret. Also the same complex algorithms and circuits may not make the best patent applications. Such patent applications are costly to draft and prosecute and can generally be worked around with slight variations.

Your invention disclosure to your patent practitioner should not disclose all the features of product or process but mostly new features which have a chance to be patentable and not the information best kept trade secret.