<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Omar Hussain</title>
    <description>The latest articles on DEV Community by Omar Hussain (@satansly).</description>
    <link>https://dev.to/satansly</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F76489%2Fe8df1b8a-b019-4650-89b4-3981a56bd08c.jpeg</url>
      <title>DEV Community: Omar Hussain</title>
      <link>https://dev.to/satansly</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/satansly"/>
    <language>en</language>
    <item>
      <title>Optimize Mongodb aggregates</title>
      <dc:creator>Omar Hussain</dc:creator>
      <pubDate>Tue, 21 Dec 2021 19:53:51 +0000</pubDate>
      <link>https://dev.to/satansly/optimize-mongodb-aggregates-13g8</link>
      <guid>https://dev.to/satansly/optimize-mongodb-aggregates-13g8</guid>
      <description>&lt;p&gt;NoSql queries can quickly become time consuming if queries rely on relating data across collections with large datasets.&lt;/p&gt;

&lt;p&gt;You may be running into query time outs trying to generate a report on data.&lt;/p&gt;

&lt;p&gt;In order to minimize the data query has to look through(hence time) do these two steps(if applicable) on every stage&lt;/p&gt;

&lt;h2&gt;
  
  
  $project
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;$project&lt;/code&gt; only fields that will be needed in proceeding stages.&lt;/p&gt;

&lt;h2&gt;
  
  
  $match
&lt;/h2&gt;

&lt;p&gt;Narrow down data before &lt;code&gt;$lookup&lt;/code&gt; and &lt;code&gt;$group&lt;/code&gt; or after &lt;code&gt;$unwind&lt;/code&gt; using &lt;code&gt;$match&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Yep thats it. If there is anything you do to optimize your aggregate piplines or know of a better way. Teach me!&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>aggregate</category>
      <category>pipeline</category>
      <category>optimization</category>
    </item>
    <item>
      <title>Rage Against the Routine</title>
      <dc:creator>Omar Hussain</dc:creator>
      <pubDate>Sat, 30 Jun 2018 23:19:27 +0000</pubDate>
      <link>https://dev.to/satansly/rage-against-the-routine-b73</link>
      <guid>https://dev.to/satansly/rage-against-the-routine-b73</guid>
      <description>&lt;p&gt;If you are a remote worker, and a freelancer. You may have found yourself struggling with finding the perfect routine that works for you. This is not a post that will lay out the magic ingredients for a healthy work life balance and the meaning of life. After almost 8 years of freelancing I still struggle with getting in a routine! &lt;/p&gt;

&lt;p&gt;I have found as a developer my most productive hours start after 2 am. When there is no noise or distraction, which is a price for working from home, that is not always mentioned as a side note, with the 'Work from Home' label. If you do not have an isolated workplace at home, then probably like me you struggle for privacy during the day and try your best to concentrate in a client's meeting with all the background noise.&lt;/p&gt;

&lt;p&gt;Human body is not meant to be awake late night, catching up on sleep in the day does not mean a good night's sleep. It takes toll. After trying numerous times to start a morning routine, I have still fallen back to a night routine. Which makes me curious to know about other work from home freelancers like myself, who have young kids at home, What works for you and what doesn't. What does routine really mean for you? Please post in comments your tips, thoughts.&lt;/p&gt;

</description>
      <category>remote</category>
      <category>freelance</category>
      <category>routine</category>
      <category>schedule</category>
    </item>
    <item>
      <title>Startups and freelancing</title>
      <dc:creator>Omar Hussain</dc:creator>
      <pubDate>Wed, 13 Jun 2018 14:07:45 +0000</pubDate>
      <link>https://dev.to/satansly/startups-and-freelancing-5gg0</link>
      <guid>https://dev.to/satansly/startups-and-freelancing-5gg0</guid>
      <description>&lt;p&gt;If you have joined a startup or thinking of joining one and don't know much about the startup world, then this little advice is for you. Beware co-founders... :) This is for start-up employees strictly.&lt;br&gt;
We hear all the time on internet news about startups that got funded in millions. What we don't hear are the hundreds of startups that tried and did not quite make it. There are many reasons for a startup for fail. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;An idea that does not solve a real world problem.&lt;/li&gt;
&lt;li&gt;An idea that has a temporary value.&lt;/li&gt;
&lt;li&gt;A team incapable of executing the idea.&lt;/li&gt;
&lt;li&gt;Incorrect approach to solving a problem.&lt;/li&gt;
&lt;li&gt;Overspending&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;and the list goes on...&lt;/p&gt;

&lt;p&gt;Chances are that you are joining a startup because of an incentive either in form of better salary or an equity. There is a higher risk involved and it makes sense to be compensated better than a similar position at an established organization.&lt;/p&gt;

&lt;p&gt;So, I learned this the hard way, when I joined a startup for a good compensation and dropped all side projects, part-time work because I thought now I didn't need to. Six months into the job, the startup burnt all the cash and I was without work and money. The idea isn't to do lesser at your full-time job, but it is of having a side income, in case things don't work out well for the startup. Do the following in order to make your finances safe:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Stay in touch with old employers, clients at good terms.&lt;/li&gt;
&lt;li&gt;Keep working on small side project and maintain a steady pipeline of work.&lt;/li&gt;
&lt;li&gt;Keep learning.&lt;/li&gt;
&lt;li&gt;Know your capacity.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>startup</category>
      <category>freelance</category>
      <category>parttime</category>
    </item>
    <item>
      <title>Apps Apps Everywhere!</title>
      <dc:creator>Omar Hussain</dc:creator>
      <pubDate>Tue, 12 Jun 2018 01:49:37 +0000</pubDate>
      <link>https://dev.to/satansly/apps-apps-everywhere-3kp0</link>
      <guid>https://dev.to/satansly/apps-apps-everywhere-3kp0</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nm15necQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ao36ym8eeo3muxhila24.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nm15necQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ao36ym8eeo3muxhila24.png" alt="Apps Meme"&gt;&lt;/a&gt;&lt;br&gt;
With start ups popping everywhere around the world and most of them with fancy websites and apps. The question one should be asking themselves when they think they have come up with an idea that will change the world is that, do I need an app or even a website to validate this idea? &lt;/p&gt;

&lt;p&gt;It is common to think of an idea in terms of technology and a beautifully designed UX to attract users (customers). But that leads to several hours of planning, designing, building, testing and then at the end of the day, maybe failing. There is a possibility that a startup idea based on one's own assumptions and intuitions is probably not an idea that will sell, and is local to a single person or group of persons. The idea needs validation and fast.&lt;/p&gt;

&lt;p&gt;In order to validate an idea it needs to be tested with a small group of people, as early as possible, and do you need an app for it you ask? May be not. If your startup idea's core does not rely on technology at its heart (e.g. a service that uses p2p networking or video calling) and it can be tested without building anything, test the idea first.&lt;/p&gt;

&lt;p&gt;If you are working on an idea to revolutionize delivery of items to customers, at a small scale you don't need an app. All you need to do is market your services via a suitable channel (pamphlets, social media, word of mouth) and take your bookings on phone and make deliveries. If you can get even a few genuine customers (not friends and family) to pay for your service and receive a positive feedback, you have a good idea at hand. Now you can start thinking of scaling and automating the most mundane tasks of your business.&lt;/p&gt;

&lt;p&gt;Once an idea has been validated, build your first MVP. MVP needs to focus on only solving one problem initially. The problem you first set out to solve with your idea. You still probably don't need an app for that. You only need an app if it requires features specific to mobile devices. A web app has a greater outreach and the ease of use on a computer outdoes the experience of using a service on a mobile device. A lot of useful info can be placed on a single web page and lots of navigational taps can be reduced.&lt;/p&gt;

&lt;p&gt;Concluding this little declaim and summarizing, focus on validating an idea with minimum energies spent and build a website or an app only when you have initial traction and are ready to scale.&lt;/p&gt;

</description>
      <category>startup</category>
      <category>validation</category>
      <category>technology</category>
    </item>
  </channel>
</rss>
