How I checked a rental-property spreadsheet before selling it: three bugs a clean test run missed

Iniciado por joomlamz, Ontem às 23:25

Respostas: 1   |   Visualizações: 1

Tópico anterior - Tópico seguinte

0 Membros e 1 Visitante estão a ver este tópico.

Olá, comunidade do **webmastersmz.com**!

Recentemente, deparei-me com uma análise técnica bastante pertinente sobre a validação de dados em folhas de cálculo (spreadsheets), e gostaria de trazer este tema para discussão aqui no nosso fórum, pois a integridade dos dados é o pilar de qualquer projecto web ou de gestão.

O artigo em questão aborda um cenário onde uma folha de cálculo para gestão de propriedades imobiliárias, apesar de ter passado por testes de execução (test runs), ainda continha falhas críticas que só foram detectadas através de uma auditoria manual rigorosa. Aqui estão os pontos principais para a nossa reflexão:

1.  **A ilusão do "Clean Test Run":** O autor demonstra que os testes automatizados ou as verificações superficiais muitas vezes validam apenas se o sistema "não dá erro", mas não verificam se a **lógica de negócio** está correta. No caso, fórmulas que pareciam funcionar com dados fictícios falharam miseravelmente quando expostas a cenários reais de depreciação e impostos.
2.  **Erros de Lógica vs. Erros de Sintaxe:** Um ponto técnico crucial é que uma folha de cálculo sem erros de fórmula (sintaxe) pode, ainda assim, estar a produzir resultados financeiros falsos (lógica). Em aplicações web, isto é o equivalente a um código que compila sem erros, mas que contém vulnerabilidades de segurança ou erros de cálculo de saldo.
3.  **A importância da Auditoria de Dados:** O autor destaca que, ao vender um ativo baseado em dados (como uma carteira de propriedades), a diligência deve ir além do software. É vital validar as premissas: as taxas de ocupação são reais? As fórmulas de amortização consideram a inflação?

**Para o debate:**
*   Como é que vocês, gestores e webmasters, validam os dados que sustentam os vossos serviços?
*   Já passaram por situações em que uma ferramenta "perfeita" falhou por causa de uma premissa lógica mal configurada?
*   Que técnicas usam para garantir que os vossos sistemas de gestão de dados sejam auditáveis e fiáveis?

Gostaria de ler as vossas experiências. A partilha de conhecimentos sobre estas "armadilhas" digitais é o que torna a nossa comunidade mais resiliente.

Para garantir que os vossos projetos e fóruns rodam sem falhas, convido-vos a conhecer as soluções de alojamento de alta performance da **AplicHost** em https://aplichost.com. Estamos focados em oferecer a estabilidade necessária para que os vossos dados e aplicações estejam sempre disponíveis e seguros.

How I checked a rental-property spreadsheet before selling it: three bugs a clean test run missed



Tópico: How I checked a rental-property spreadsheet before selling it: three bugs a clean test run missed
Categoria: Tutoriais | Programação & Tecnologia
Idioma Principal: Português (Conteúdo de Tecnologia)

Descrição do Conteúdo / Informações:
-------------------------------------------------------------------------
I built a rental-property calculator in Excel (long-term and short-term rentals, 8 sheets, about 2,500 formulas). The maths was right early on. The part that took six review rounds was the behaviour on bad input. Here is what the reviews found, measured on the files, and how each one is now checked.



How the maths is checked


• The workbook is recalculated in Microsoft Excel and in LibreOffice (headless).

• Every scenario's key cells (479 for the shipped example, 416 for each other scenario) are compared with a separate Python model written without reading the workbook's formulas.

• Every cell on every sheet is scanned for error values (#VALUE!, #REF!, #DIV/0!).

All of that passed in round 1. It still was not enough.



Bug 1: blank cells count as $0


A new landlord types price, down payment, interest rate and rent, and skips tax, insurance, vacancy and repairs. The sheet showed $1,182.52 a month and "Year-1 cash flow is positive". The same house with those costs filled in makes $234.76 a month, about five times less. No cell was wrong; the blanks were silently treated as zero.

Fix: every cost input is now "required, type 0 if none". A blank raises a flag, and the headline numbers show n/a until the flags are cleared. The test: the blank file with only four cells typed must show n/a, not a figure.



Bug 2: the free version was rosier than the paid one


The free quick-check sheet gave $295.86 a month for the same house where the paid file gave $234.76. It used a lighter default cost allowance and left out repairs at purchase. Fix: same house, same numbers. The test now runs nine equality checks between the two files.



Bug 3: text in one cell produced 1,359 error cells


Typing the word "abc" into the purchase price made the headline show #VALUE! and spread through the sheets: Results 5 cells, Projection 37, Sensitivity 15, Amortization 1,300 and more. My earlier note said "every cell was scanned for error values". That was true for text in the rent cell and untested for the price cell. Fix: every formula now reads a helper column that holds the typed number, or 0 when the cell is empty or holds text. The input check still flags it. New tests type text into ten different input cells and scan all 8 sheets for error values after each one.



What I would tell anyone selling a spreadsheet


• Test the blank file, not only the filled example.

• Test the wrong type in every input, not in one.

• Compare the free and paid versions on the same inputs.

• Make the checks part of the build. A test that was never seen failing proves nothing, so each fix above was first shown failing, then passing.

Limits: I tested in Excel and LibreOffice. Google Sheets, Numbers and Excel for Mac were not tested.

The calculator and a free quick-check sheet are on Gumroad: the paid calculator ($19) and the free quick check ($0+).


Joomlamz
Consultoria em Informática
-------------------------------------------------------
Especialista em Sistemas Web & Manutenção de Servidores.
A desenvolver o novo AplPortal com suporte a PHP 8.
Precisa de ajuda profissional? Contacte-me.

Tags: