<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Surbhi Singh on Medium]]></title>
        <description><![CDATA[Stories by Surbhi Singh on Medium]]></description>
        <link>https://medium.com/@singh.surbhicse?source=rss-1a7205c5bccf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9L9SGgSk7n8CSQEPAKpN8A.png</url>
            <title>Stories by Surbhi Singh on Medium</title>
            <link>https://medium.com/@singh.surbhicse?source=rss-1a7205c5bccf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 11:08:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@singh.surbhicse/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What if I told you there is no right way?]]></title>
            <link>https://medium.com/@singh.surbhicse/what-if-i-told-you-there-is-no-right-way-9d2e08c2c542?source=rss-1a7205c5bccf------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d2e08c2c542</guid>
            <category><![CDATA[obedience]]></category>
            <category><![CDATA[right]]></category>
            <category><![CDATA[system]]></category>
            <category><![CDATA[slavery]]></category>
            <category><![CDATA[society-politics]]></category>
            <dc:creator><![CDATA[Surbhi Singh]]></dc:creator>
            <pubDate>Wed, 14 Oct 2020 10:04:35 GMT</pubDate>
            <atom:updated>2020-10-14T10:30:13.387Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*HnXpbGLEyCZ2YRGDXlorpw.png" /><figcaption><a href="https://pin.it/6KawY8I">https://pin.it/6KawY8I</a></figcaption></figure><p><em>“Disobedience is the true foundation of liberty. The obedient must be slaves.”<br>― Henry David Thoreau</em></p><p>The literal meaning of “<em>disobedience</em>” is refusal or neglect to obey. OBEY, you see, obey who? And how do we know the one we are obeying is correct. How do we know this is the <strong>only right way or if at all it is indeed the right way?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*fXWsp11GfUjtG4vVkPTI4Q.png" /><figcaption><a href="https://www.youtube.com/watch?v=aR0bdGq1qfs">https://www.youtube.com/watch?v=aR0bdGq1qfs</a></figcaption></figure><p><a href="https://www.youtube.com/watch?v=aR0bdGq1qfs">Here’s a video of Nas Daily</a> explaining why do some things stay with us on a subconscious level and no matter how evolved we become doing them will never feel RIGHT. Now coming to the main point, we humans love the idea of moral policing, and always segregating things “right” or “wrong”.</p><blockquote>But Why? Why Is right, Right? Why is wrong, Wrong?</blockquote><p>Let us consider the great age-old tale of Robin Hood, some consider him to be a saviour robbing money from the rich and giving them back to the poor. Uhh righttt, but wasn’t robbing or stealing considered wrong?</p><p>We are humans, we love to see things going our way. All the laws, all the morals were ultimately built by some human, how are we sure that it was not in fact for the benefit of a particular section of the society. How are we sure that these so-called “rules” that were fed to us since the very first day of our existence, were actually for our own benefit and not some sort of manipulation just to adapt to our age-old system benefitting that same section and those who were declared “dis-obedient” were, in fact, the rebels who decided to question the system.</p><p>Society HATES a curious mind and that’s the exact reason why there are very few people who have actually made it large. Society loves feeding the idea of slavery into our minds.</p><p>The only person <a href="https://www.youtube.com/watch?v=sBdQhLXTvNM&amp;feature=youtu.be">defining “right” and “wrong”</a> for yourself should be you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d2e08c2c542" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Things we’re doing wrong as a feminist]]></title>
            <link>https://medium.com/@singh.surbhicse/things-were-doing-wrong-as-a-feminist-b50131719913?source=rss-1a7205c5bccf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b50131719913</guid>
            <category><![CDATA[equality]]></category>
            <category><![CDATA[feminist]]></category>
            <category><![CDATA[gender-equality]]></category>
            <category><![CDATA[equal-rights]]></category>
            <category><![CDATA[feminism]]></category>
            <dc:creator><![CDATA[Surbhi Singh]]></dc:creator>
            <pubDate>Sat, 26 Sep 2020 13:50:11 GMT</pubDate>
            <atom:updated>2020-09-27T06:17:10.143Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Google defines the word “feminism” as the advocacy of women’s rights on the ground of <strong>the equality of the sexes.</strong> Sounds pretty straight-forward, right?</blockquote><p>Yet, how many times have we felt <a href="https://www.quora.com/Why-is-it-that-men-so-often-feel-attacked-by-feminism">attacked for categorizing ourselves as a “feminist”</a>. So where exactly did we go wrong? How did something so basic become one of the most controversial topic of twenty-first century? As attacking as it sounds, it’s only us, ladies that are to be blamed. I have a question for you, how many of us have shared an article about females not being able to live as freely as men? But on the hind-side How many of us have attacked our mothers, sisters, sisters-in-law for not being able to do their <strong>“<em>job</em>”</strong> properly as the same. Are they not females too? Or How many of us have labeled another female outperforming in a job or is just out-going as <em>slut or attention-seeker.</em></p><p>It’s 2020 already and here is the list of things that we should stop already,</p><blockquote><a href="https://thequahs.com/mothers-are-humans-too/"><strong><em>Stop attacking your mom for not being “mom” enough.</em></strong></a></blockquote><blockquote>Like you, your mother is a human too. And that’s what we humans are, flawed, NOT PERFECT and constantly learning and evolving.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cT-tKFRovMgVDz34BvPrmA.png" /><figcaption><em>Image source</em>: <a href="https://www.boredpanda.com/mother-with-sign-poonam-sapra/?utm_source=google&amp;utm_medium=organic&amp;utm_campaign=organic">https://www.boredpanda.com/mother-with-sign-poonam-sapra/utm_source=google&amp;utm_medium=organic&amp;utm_campaign=organic</a></figcaption></figure><blockquote><strong><em>Don’t shy away from calling out the wrong, even if the person is a female.</em></strong></blockquote><blockquote>As absurd as it sounds this is something that is so common and yet never catches our eye. How many times have we quoted, “oh it’s a girl driving that’s why”, and if confronted with but you’re a female driver too and drive just fine we’re told, “Yeah, but I’m different”. NO, you’re not different there are people good and bad at things(like coding, art, driving). STOP GENERALIZING YOUR OWN GENDER. Just because one is good at something does not make them “manly”.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*wesV1gdisCbm4IIracroLQ.png" /></figure><blockquote><a href="https://www.theindianwire.com/editorial/are-indians-selectively-feminist-58882/"><strong>Can we stop with all the selective feminism already</strong></a><strong>?</strong></blockquote><blockquote>There are no shades of grey in gender equality. Ladies, it’s high time we make up our minds, either we want to be treated as equals or not. I know we as humans love convenience, but doing so we’re making “feminism” look bad in front of the world and there are people who actually need it and have spent their lives fighting for it and proving their worth.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*djmFludc1osNyM2k5S9xxw.png" /><figcaption>Image source: <a href="https://www.epw.in/engage/article/womens-day-feminism-in-the-last-decade">https://www.epw.in/engage/article/womens-day-feminism-in-the-last-decade</a></figcaption></figure><blockquote><strong>FEMINISM is about giving women a choice. NO MORE NO LESS. Period.</strong></blockquote><blockquote>Ladies, hear me out, feminism is about giving women a choice. Just as Feminism is about telling women that it is okay to choose your career over having kids so is it also about telling them that<strong> it is okay to choose your family over your career.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*8AhxIAcegPnsv2VTwkaXjA.png" /><figcaption>Image source: <a href="https://muslimgirl.com/western-feminism-and-free-will/">https://muslimgirl.com/western-feminism-and-free-will/</a></figcaption></figure><blockquote><strong>Feminism is definitely not about “men-hating”</strong></blockquote><blockquote>Calling out someone for doing something wrong who happens to be a male, is not man-hating and no we don’t need to hate men to be a feminist.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*xI-5R9NotriBjdRULp4ARA.png" /><figcaption>Image source: <a href="https://www.cidse.org/2020/03/04/what-is-the-role-of-men-in-feminism/">https://www.cidse.org/2020/03/04/what-is-the-role-of-men-in-feminism/</a></figcaption></figure><p>We NEED feminism more than ever. We need it for the kid being told to stop acting “like a girl” or “so manly”. We need it for the teenage girls appreciating men for doing the bare minimum. We need it for the teenage boys who are mocked for not being “manly enough”. We need it for our mothers who are continuously in the grind and yet are mocked for the slightest of the human flaw they project. We need it for the man who is mocked for supporting or standing up for a female.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b50131719913" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An introvert’s guide to trying.]]></title>
            <link>https://medium.com/@singh.surbhicse/an-introverts-guide-to-trying-c0d3c41423b7?source=rss-1a7205c5bccf------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0d3c41423b7</guid>
            <category><![CDATA[life]]></category>
            <category><![CDATA[trying]]></category>
            <category><![CDATA[introvert]]></category>
            <dc:creator><![CDATA[Surbhi Singh]]></dc:creator>
            <pubDate>Thu, 24 Sep 2020 05:34:40 GMT</pubDate>
            <atom:updated>2020-09-24T06:04:21.245Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>by trying I don’t mean giving in, you’re just getting the best of both worlds.</blockquote><p>It’s tough being as introvert in a world full of “<a href="https://www.health.harvard.edu/staying-healthy/an-introverts-guide-to-healthy-social-engagement">social animals</a>”.</p><p>I was 20 when I took my first solo trip, not because I wanted to but because nobody else in my friend circle was granted permission. I was too scared going out then but when I look at it now, if it hadn’t been for these random trips I wouldn’t have been the person I am now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4vm9YI6fp4rQeuZkOPsd-Q.png" /></figure><p>I have always been a shy, introverted person who finds it hard talking to random strangers. For the exact same same reason I tried joining a lot of clubs back in college. From joining ENACTUS, which involved a lot of travelling to several new areas with a bunch new people, talking to random strangers, asking for donations, surveys. And dare I say it, it killed me, but that’s the beauty of life, right outside your comfort zone lies the real world and no it isn’t that scary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZuO6H4qhAlj3JdseMCIkPw.png" /></figure><p>I also tried my hands at drama and even travelled to Kolkata for the same. I’d admit, I was petrified practicing it on the streets where random strangers would gather to see you practice. I still did it and in the process of doing so I realized how liberated I felt.</p><p>Trust me, facing your own fears is addictive, once you start doing so there’s no going back. It amused me how easy things become after <em>just that one push</em>. And these are the moments you infact cherish looking back. It’s only when you are the most scared, you do it. As preachy as it sounded growing up, I actually realized how true this was. I also attended an MUN(to be honest I wasn’t even aware what that was till I actually attended it) and spoke absolutely nothing. From getting hatred from my own college-mates(asking me how much lobbying I did to get into this and that how can someone like me get into things like this, yeah people are bitchy but we are trying to focus on ourselves here). But then this experience made me realize how different and broad the world actually is and how diversified people are.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nCUCUrt51ICmwrFekIachg.png" /></figure><p>These mini-dares that I created for myself helped me grow up as a person. Nothing looks easy in the beginning and that’s exactly why you should do it and it wouldn’t get any easier either but the next time you’ll be experienced.</p><p>For all I know failing is still okay than not giving it a try. You don’t see it now but it all makes sense later.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0d3c41423b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating audit table to log insert, update and delete changes in Flask SQLAlchemy]]></title>
            <link>https://medium.com/@singh.surbhicse/creating-audit-table-to-log-insert-update-and-delete-changes-in-flask-sqlalchemy-f2ca53f7b02f?source=rss-1a7205c5bccf------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2ca53f7b02f</guid>
            <category><![CDATA[sqlalchemy]]></category>
            <category><![CDATA[events]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[audit]]></category>
            <category><![CDATA[flask]]></category>
            <dc:creator><![CDATA[Surbhi Singh]]></dc:creator>
            <pubDate>Tue, 22 Sep 2020 10:57:41 GMT</pubDate>
            <atom:updated>2020-09-24T04:04:44.251Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Creating audit table to log insert, update and delete changes in SQLAlchemy using event</strong></h3><p>After struggling for about 3 days and reading thousands of topics I realized there are not enough straight forward explanations available on how to create and log all the insert, update and delete changes on a table using events. So here it goes,</p><p>I will keep it short and to the point,</p><p>In case you’re curious <a href="https://docs.sqlalchemy.org/en/13/orm/events.html">https://docs.sqlalchemy.org/en/13/orm/events.html</a> is the link to the official page explaining ORM events in detail. For now all we have to understand is, subscribing to an event occurs through a single API point, the <a href="https://docs.sqlalchemy.org/en/13/core/event.html#sqlalchemy.event.listen">listen()</a> function, or alternatively the <a href="https://docs.sqlalchemy.org/en/13/core/event.html#sqlalchemy.event.listens_for">listens_for()</a> decorator. This function accepts a target, a string identifier which identifies the event to be intercepted, and a user-defined listening function. Like,</p><p><em>from sqlalchemy import event</em></p><blockquote>@event.listens_for(User, “after_insert”)</blockquote><p>where “User” is our main table on which logging needs to be defined and “after_insert” receives an object instance after an INSERT statement is emitted corresponding to that instance(in our case when we perform an insert on User table via db session).</p><p><em>method </em><a href="https://docs.sqlalchemy.org/en/13/orm/events.html#sqlalchemy.orm.events.MapperEvents">sqlalchemy.orm.events.MapperEvents.</a><strong>after_insert</strong>(<em>mapper</em>, <em>connection</em>, <em>target</em>)</p><p>Below is the schema for our main table(User),</p><blockquote>app = Flask(__name__)</blockquote><blockquote>app.config[‘SQLALCHEMY_DATABASE_URI’]=’sqlite:////&lt;path_to_db_file&gt;’</blockquote><blockquote>db = SQLAlchemy(app)</blockquote><blockquote>class User(db.Model):</blockquote><blockquote>__tablename__ = “user”</blockquote><blockquote>id = db.Column(db.Integer, primary_key=True, autoincrement=True)</blockquote><blockquote>email = db.Column(db.String(64), index=True)</blockquote><blockquote>username = db.Column(db.String(64), index=True)</blockquote><blockquote>password_hash = db.Column(db.String(128))</blockquote><blockquote>log_id = db.relationship(‘User_log’, backref=”user_log”, lazy=True)</blockquote><p>“Id” column acts as a foreign key for our user log table,</p><blockquote>class User_log(db.Model):</blockquote><blockquote>__tablename__ = “user_log”</blockquote><blockquote>id = db.Column(db.Integer, primary_key=True)</blockquote><blockquote>user_id = db.Column(db.Integer, db.ForeignKey(‘user.id’))</blockquote><blockquote>modified_on=db.Column(db.DateTime, default=datetime.utcnow)</blockquote><blockquote>action = db.Column(db.String(100))</blockquote><p>User_log table has four columns namely,</p><p>id : It’s own primary key</p><p>user_id : Referencing foreign key “id” from User table</p><p>modified_on : Datetime at which the action was performed[default is current datetime]</p><p>action : specifying the type of action being performed namely, “Insert”, “Update”, “Delete” on user table</p><p>Please refer below a sample user defined function saving the type of action and User table id for the same.</p><blockquote>def insert_user_log(mapper, connection, target):</blockquote><blockquote>po = User_log.__table__</blockquote><blockquote>connection.execute(po.insert().values(user_id=target.id, action=’insert’))</blockquote><p>“<em>insert_user_log</em>” is the user defined function that we have defined stating what needs to be done after an INSERT is done on the User table and takes three parameters:</p><blockquote>Parameters:</blockquote><ul><li><strong>mapper</strong> — the Mapper which is the target of this event.</li><li><strong>connection</strong> — the <a href="https://www.kite.com/python/docs/sqlalchemy.engine.Connection">Connection</a> being used to emit UPDATE statements for this instance. This provides a handle into the current transaction on the target database specific to this instance.</li><li><strong>target</strong> — the mapped instance being persisted. If the event is configured with raw=True, this will instead be the <a href="https://www.kite.com/python/docs/sqlalchemy.orm.state.InstanceState">InstanceState</a> state-management object associated with the instance</li></ul><p>Please refer : <a href="https://www.kite.com/python/docs/sqlalchemy.orm.events.MapperEvents.after_update">https://www.kite.com/python/docs/sqlalchemy.orm.events.MapperEvents.after_update</a> for a better understanding on this.</p><p>Similarly we can define decorators for update(after_update) and delete(before_delete).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*kDvFnhBLDjyoYlkXVAOT7g.png" /><figcaption><strong>Code snippet</strong></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2ca53f7b02f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>