Один из самых удобных способов записать данные это использование готовых форматов, такие как JSON или YAML.
Из плюсов такого подхода стоит отметить вот что:
🔸 готовый, повсеместно используемый и поддерживаемый формат
🔸 простой и понятный файл, удобочитаемый для человека
🔸 можно легко редактировать в любом текстовом редакторе без специальных программ и библиотек
Но есть и минусы
🔹 затраты времени при записи файла (кодирование данных в нужный формат строки)
🔹 затраты времени при чтении файла (декодирование данных в Python объекты)
🔹 размер файла увеличивается из-за разметки данных (скобки, запятые, переносы, отступы...)
🔹 перед записью все данные должны быть помещены в память в полном объёме (не всегда)
🔹 при чтении необходимо считать весь файл в память и только потом декодировать данные
Если нужно писать немного данных в несколько файлов, то затраты по времени не ощутимы. Обычно это файлы конфига или какие-либо метаданные. Это отличный вариант под такие задачи.
Есть и другой поход к записи файлов - это бинарные файлы. Используется, когда данных достаточно много и никто их не собирается читать глазками😳.
🔸 очень быстрая запись
🔸 чтение значительно быстрей чем JSON, YAML итд
🔸 размер файла значительно меньше, так как нет разметки
🔸 можно записывать данные по мере поступления не загружая всё в память
🔸 можно извлечь любую часть данных независимо
Из минусов
🔹 нужно определить свой формат записи данных (если не используете готовую спецификацию определённого формата)
🔹 не получится открыть файл и визуально понять что там записано, а для чтения файла потребуется знать его спецификацию.
🔹 не так-то просто создать такой файл без специальной библиотеки
В таком виде удобно записывать большой массив любых однородных данных. Например, мониторинг валютной биржи или кэшированная анимация 3D геометрии.
(Это не означает что нельзя записать данные разного типа, просто это будет не так удобно)
Представьте себе JPG-картинку. По сути это немного мета-информации и большой массив пикселей. Тоже самое со звуком или видео файлом. Поэтому, если вы попробуете открыть картинку в текстовом редакторе вы увидите что-то вроде такого
f15d cd29 a564 4578 ...
09e2 9bc4 a696 1253 ...
84e9 4de1 3b23 c24a ...
2534 5161 28e0 709d ...
...
Это и есть записанные байтики. И для их чтения требуется определённый софт который знает что с ними делать. Под каждый тип файла.
К чему это я? Читайте в следующем посте...
#tricks#basic
#TaxCrimes On 17 March 2026, tax investigators from IRAS conducted island-wide raids at over 20 business premises and residential locations, as part of investigations into several suspected Goods and Services Tax (GST) refund fraud cases.
The operation led to the arrest of one female suspect, aged 56, for one of the cases. Accounting records, electronic devices, and other evidence linked to the alleged offences were seized, including 179 luxury watches estimated to be worth more than $1 million.
In 2025, more than 1,300 businesses making GST refund claims were audited, resulting in a recovery of over $100 million in taxes and penalties.
💼 Businesses and individuals are encouraged to report any suspected tax malpractices or disclose any past tax mistakes. Refer to go.gov.sg/iras-voluntary-disclosure for more information on voluntary disclosure.
🔗 Read the media release: go.gov.sg/iras-island-wide-raids
#TaxCrimes Ng Kim Kia, Gary, a 36-year-old product sales distributor, has been charged for having made false entries in his Individual Income Tax returns, resulting in tax undercharged amounting to $323,631.
Between 2020 and 2025, IRAS audited and investigated some 32 multi-level marketing (“MLM”) agents for anomalies in their tax reporting. By 2025, IRAS completed the review of 16 such cases and recovered $1.66 million in taxes and penalties.
🔗 Read the media release: go.gov.sg/taxcrime-salesdistributor
#TaxCrimes Joanne Chua Sze Wang (“Chua”), a 60-year-old businesswoman, has been convicted of the following offences:
(1) Failed to exercise the required diligence as the finance manager of Mandarin Communications Pte Ltd and director of Esteris Pte Ltd, leading to the companies unlawfully collecting a total of $463,052 in GST without being GST-registered
(2) Evaded $5,245 in taxes by omitting her income from her sole proprietorship, Wang Design Station, for Years of Assessment 2014 and 2019
Chua has been ordered to pay a fine of $59,000 and a penalty of $1,404,893.
#TaxCrimes Peh Eng Chen, a 48-year-old director of Swift Garage Pte Ltd (“Swift Garage”) and Xing Heng Projects Pte Ltd (“Xing Heng”), has been convicted of
(1) under-reporting Swift Garage’s Goods and Services Tax (GST) return;
(2) deliberately concealing Xing Heng’s liability to be registered for GST; and
(3) providing a false reply to IRAS during a GST audit.
The total amount of GST undercharged was $300,350.
He was sentenced to 66 weeks’ imprisonment and ordered to pay a penalty of $901,051.
#TaxCrimes Sufandi Bin Ahmad, a 45-year-old former conveyancing clerk, has been convicted of forging a stamp certificate. He knowingly used a counterfeit stamp certificate with the intent to deceive a bank into disbursing a property purchase loan.
For this offence, Ahmad has been sentenced to 4 weeks’ imprisonment.
#TaxCrimes Rickey Tan Yao Rong, a 54-year-old former car trader, has been convicted of Income Tax and Goods and Services Tax (“GST”) offences.
Tan was convicted of:
- 2 counts of making false entries in his personal income tax returns for the years of assessment (“YAs”) 2018 and 2019, resulting in $260,773 in tax undercharged
- 1 count of failing to notify the Comptroller of GST of his liability to be registered as a taxable person, leading to $245,420 of GST due
Tan was sentenced to:
- 12 months and 2 weeks’ imprisonment;
- Penalty of $806,861; and
- Fine of $3,500
#TaxCrimes Lim Yen Ei, a 48-year-old Taoist priest and sole proprietor of San Jie Hun Xuan Dao Tan, has been convicted of under-reporting his trade income, resulting in $41,987 in taxes undercharged.
He was sentenced to 11 weeks’ imprisonment and ordered to pay penalties of $125,962.20.
Read the full media release at www.iras.gov.sg/news-events/newsroom/taoist-priest-convicted-of-income-tax-evasion.
#TaxCrimes Tan Kian Peng, a 38-year-old director of Hoe Ming Renovation Pte Ltd, Orangree Renovation Pte Ltd, XP Renovation Contractor Pte Ltd, and GTY Renovation Contractor Pte Ltd, and sole proprietor of Homescape Renovation, has been convicted for tax and money laundering offences.
Tan’s offences include: (1) making false entries in GST returns, resulting in $662,657 in taxes undercharged; (2) hindering IRAS officers in carrying out their duties; (3) transferring property representing her benefits of criminal conduct.
For tax offences, Tan Kian Peng has been sentenced to 74 weeks’ of imprisonment and ordered by the Court to pay $1,987,971.72 in penalties and $1,000 in fine. For money laundering offences, she has been sentenced to 10 months’ imprisonment.
#TaxCrimes Chong Jia Ling, Genevieve, a 27-year-old businesswoman who distributed and sold products during the years 2020 and 2021, has been charged for income tax offences. Chong faces the following charges:
(1) making false entries in her individual income tax returns, resulting in tax undercharged amounting to $371,859, and
(2) providing false documents to the Comptroller of Income Tax to support fraudulent expense claims amounting to $149,453 for Years of Assessment 2021 and $45,190 for Years of Assessment 2022.
#TaxCrimes Kang Yang Pang, a 53-year-old director of Qiann Xii Pte Ltd (“QXPL”) selling geomancy-related products, has been convicted of (1) under-reporting the income of QXPL resulting in $74,547 in taxes undercharged; (2) failing to register the business for Goods & Services Tax (GST) resulting in $218,880 in GST undercharged; (3) failing to keep and retain records required under the Income Tax Act; and (4) failing to preserve business and accounting records required under the GST Act.
He was fined $11,000 and ordered to pay a penalty of $170,982.
#taxcrimesTeo Ah Moy, 50-year old sole director and principal decision-maker of two companies - Matrix Ingredients Pte Ltd (“Matrix”) and Maxim Ingredients International Pte Ltd (“Maxim”), convicted of:
- 3 charges of giving incorrect information in relation to Matrix’s Income Tax returns (Form C) for YA 2011, 2013 and 2014, resulting in $516,899.11 in taxes undercharged; and
- 29 charges of giving incorrect information in relation to Matrix’s and Maxim’s GST returns, resulting in $1,211,981.16 in taxes undercharged.
She has been ordered by the Court to pay $3,588,760.54 in fine and penalty.
IRAS runs regular audit programmes across various industries to ensure tax compliance among individuals, businesses and the self-employed. Using data analytics and advanced statistical tools, IRAS is able to cross-check data and detect anomalies. This case was uncovered through one such audit programme.
https://www.channelnewsasia.com/singapore/gst-claims-iras-police-charge-missing-trader-fraud-5275841
#taxcrimes Two men, aged 40 and 73, have been charged in court for their suspected involvement in a Goods and Services Tax (GST) Missing Trader Fraud (MTF) involving approximately $181 million in fictitious sales. MTF is a fraudulent scheme targeting the GST system, typically involving fictitious transactions orchestrated by a network of individuals and businesses designed to illicitly claim GST refunds or avoid tax obligations.
IRAS takes a serious stance against GST MTF and will take stern enforcement action against perpetrators of such fraudulent arrangements. 🔗More on this case here