<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Refactoring on felladog</title><link>https://utsavdarlami.github.io/blogs/tags/refactoring/</link><description>Recent content in Refactoring on felladog</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Wed, 29 May 2024 07:02:59 +0545</lastBuildDate><atom:link href="https://utsavdarlami.github.io/blogs/tags/refactoring/index.xml" rel="self" type="application/rss+xml"/><item><title>refactoring with singleton</title><link>https://utsavdarlami.github.io/blogs/posts/20240521115848-refactoring_with_singleton/</link><pubDate>Tue, 21 May 2024 11:58:00 +0545</pubDate><guid>https://utsavdarlami.github.io/blogs/posts/20240521115848-refactoring_with_singleton/</guid><description>References : https://refactoring.guru/design-patterns/singleton https://python-patterns.guide/gang-of-four/singleton/ Questions : Notes: Welcome to tale of me writing a bad code and refactoring it with new learned knowledge to write not so bad code.
I was watching a conference video 1 on metaclasses, which introduced me to singleton. I realized that i could use this creational design pattern 1.1 for one of my project.
Previous Logic in my project There is a factory which processes list of Box object to form a final Box.</description></item></channel></rss>