<?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 Helana Nosrat on Medium]]></title>
        <description><![CDATA[Stories by Helana Nosrat on Medium]]></description>
        <link>https://medium.com/@HelanaBakhsh?source=rss-8667f9887605------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7IdiNoHorNSCty-HYWXxOQ@2x.jpeg</url>
            <title>Stories by Helana Nosrat on Medium</title>
            <link>https://medium.com/@HelanaBakhsh?source=rss-8667f9887605------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 22:08:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@HelanaBakhsh/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[A Field Guide to Apache Spark RDDs]]></title>
            <link>https://medium.com/@HelanaBakhsh/a-field-guide-to-apache-spark-rdds-22dd397a2688?source=rss-8667f9887605------2</link>
            <guid isPermaLink="false">https://medium.com/p/22dd397a2688</guid>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[distributed-computing]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Helana Nosrat]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 00:31:01 GMT</pubDate>
            <atom:updated>2026-11-13T00:31:01.771Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9_6a4XtqYutgALNlkHwb6Q.png" /></figure><p><em>Partitions, lineage, and what happens when you ask a cluster to send everything back to one machine.</em></p><p>A Spark job has finished counting units sold across millions of order lines. One executor disappears before the next step reads its output. What, exactly, has the job lost?</p><p>The answer depends on what Spark still has: the input, the intermediate results, and enough information to reproduce the missing work. That last part is where the <strong>Resilient Distributed Dataset</strong>, or <strong>RDD</strong>, gets interesting.</p><p>An RDD is an immutable collection divided into partitions. Spark can process those partitions in parallel and, when the necessary inputs remain available, reconstruct lost results from the dependencies that produced them. The same design explains several things you’ll see in practice, from why adding a filter() appears to do nothing to why a job with plenty of available cores can still spend most of its time waiting.</p><h3>Where to look for the work</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7SUSAnueo3l8XXeR6wYpaA.png" /><figcaption>Three partitions, two trays. A partition is a unit of work and can share an executor with others.</figcaption></figure><p>Suppose we want to count units sold per SKU. The input is a file of order lines, each with a SKU and a quantity. Spark divides that input into <strong>partitions</strong>, which are logical chunks of data. A task in a stage typically processes one partition, and an executor can run tasks for several partitions. A partition doesn’t come with its own machine. Even the cloud has limits on personal space.</p><p>Partitioning determines how much work can happen at once and how evenly it’s spread. If most tasks finish in seconds and one runs for minutes, look at what that last task was assigned. It may have received far more data than its neighbors. A cluster can look wonderfully parallel right up to the moment everyone is waiting for the same partition.</p><h3>What actually starts a job</h3><p>RDD transformations such as map() and filter() describe how to derive a new RDD. The parent RDD remains unchanged. Spark records those relationships as <strong>lineage</strong>, a graph of dependencies it can follow when a result is requested.</p><p>Here’s the order-line example in PySpark. Assume sc is an existing SparkContext and the file contains headerless SKU,quantity lines with integer quantities.</p><pre>from operator import add</pre><pre>def parse_line(line):<br>    sku, quantity = line.split(&quot;,&quot;)<br>    return sku, int(quantity)</pre><pre>lines = sc.textFile(&quot;orders.txt&quot;)<br>orders = lines.map(parse_line)<br>positive_orders = orders.filter(lambda order: order[1] &gt; 0)<br>units_by_sku = positive_orders.reduceByKey(add)</pre><pre>sample = units_by_sku.take(5)</pre><p>The first four RDD assignments define the computation. take(5) asks for a result and triggers execution. It returns up to five SKU totals. It also gives you no basis for calling them the five bestselling SKUs, a distinction that has rescued more than one chart title.</p><p>OperationWhat it doesmap()Transforms each input element into an output element.filter()Keeps elements that satisfy a condition.reduceByKey()Produces a new RDD with values combined per key.reduce()Combines an RDD’s elements into a single result.count()Returns the number of elements. On units_by_sku, that means SKUs.take(n)Returns up to n elements to the driver.collect()Returns every element to the driver.saveAsTextFile()Runs the computation and writes the result to storage.</p><p>reduceByKey() is a transformation. reduce() is an action. And saveAsTextFile() illustrates why an action can produce output without returning the dataset to the driver.</p><h3>The shuffle</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K2abcECx4zGbByuQRcGGPQ.png" /><figcaption>Records with the same key come together from different input partitions</figcaption></figure><p>A filter() can examine each partition independently. A total per SKU poses a different problem. Sales for the same SKU can arrive in several input partitions, so Spark has to bring their contributions together. That redistribution is a <strong>shuffle</strong>, and it can cost network traffic, disk I/O, and serialization. reduceByKey() can combine values locally before sending those partial totals across the shuffle.</p><pre>flowchart LR<br>    A[&quot;Input partition A: SKU-42 × 2 and × 1&quot;] --&gt; C[&quot;Local subtotal: 3&quot;]<br>    B[&quot;Input partition B: SKU-42 × 4&quot;] --&gt; D[&quot;Local subtotal: 4&quot;]<br>    C --&gt;|&quot;Shuffle by SKU&quot;| E[&quot;SKU-42 total: 7&quot;]<br>    D --&gt;|&quot;Shuffle by SKU&quot;| E</pre><p><em>Figure 1. Two input partitions contribute to the same SKU total. Local aggregation reduces what Spark has to transfer.</em></p><p>The shuffle and the driver are separate places to investigate. If the job slows down at reduceByKey(), inspect the shuffle and the distribution of keys. If the driver runs out of memory at collect(), inspect how much output you asked it to hold. Distributing the computation and then gathering every result on one machine is a perfectly valid plan for a small result. The machine will have opinions about the definition of <em>small</em>.</p><h3>What survives a failure</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fHLo_dEHKY9-26DB7qOdeg.png" /><figcaption>When a partition is lost, Spark can follow its lineage and recompute it from available inputs</figcaption></figure><p>Imagine a later action needs a partition Spark had already computed, but the executor holding it is gone. Spark can use the RDD’s lineage to rebuild the missing partition from the inputs and intermediate results it can still access. After a shuffle, that may require fetching contributions from several upstream partitions or regenerating missing shuffle output. The amount of work depends on what was lost and what remains available.</p><pre>flowchart TD<br>    A[&quot;Action needs an output partition&quot;] --&gt; B{&quot;Usable cached copy?&quot;}<br>    B --&gt;|&quot;Yes&quot;| C[&quot;Read the cached partition&quot;]<br>    B --&gt;|&quot;No&quot;| D[&quot;Follow lineage to required inputs&quot;]<br>    D --&gt; E[&quot;Recompute missing work&quot;]<br>    E --&gt; F[&quot;Use the rebuilt partition&quot;]</pre><p><em>Figure 2. Spark can reuse a cached partition or recompute it from lineage when the required inputs are available.</em></p><p>This is one reason I’d keep arbitrary side effects out of a transformation. If a task is retried, its function can run again. A transformation that sends an email might therefore send two, and the second one will be just as confident as the first.</p><h3>When a partition is worth keeping</h3><p>RDDs are <strong>not automatically cached in memory</strong>. Call cache() or persist() when you expect to reuse an RDD and the cost of retaining its partitions makes sense. Spark stores partitions as they’re computed, so an action that touches only part of the RDD may leave the rest uncached.</p><p>The default RDD cache level, MEMORY_ONLY, can leave partitions uncached if they don’t fit. Spark can recompute them when needed. With MEMORY_AND_DISK, Spark can retain partitions on disk when memory is insufficient. Use unpersist() when you’re finished with the cached data.</p><p>For the order-line job, I’d consider persisting units_by_sku if several outputs reuse that aggregation. For a single write, I’d start without it. The interesting question is what the next action would have to compute again, and what it would cost to keep that result around.</p><h3>When to use the RDD API</h3><p>For ordinary reporting on records with named columns, I’d start with Spark SQL or a DataFrame. Spark can inspect structured expressions and use that information to optimize execution. The typed Dataset API offers a related option in Scala and Java. The RDD API, available in Python, Scala, and Java, gives you lower-level control over operations such as custom partition processing. You can also create an RDD from a local collection with parallelize() or read data from supported storage through APIs such as textFile().</p><p>I’d write the production version of this SKU report as a DataFrame aggregation. I’d still keep the RDD version in the field guide. It gives me a way to read a slow Spark job in the order I’d investigate it: identify the action, look at the tasks and their partitions, find the shuffle, and ask whether the job is repeating work it could reuse.</p><p>Then, if the first debugging suggestion is collect(), I have one more question.</p><p>How many rows are we talking about?</p><p>#ApacheSpark #DataEngineering #DistributedComputing #PySpark</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22dd397a2688" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Data Doesn’t Care That You Rebranded]]></title>
            <link>https://medium.com/@HelanaBakhsh/your-data-doesnt-care-that-you-rebranded-ada5802ade56?source=rss-8667f9887605------2</link>
            <guid isPermaLink="false">https://medium.com/p/ada5802ade56</guid>
            <category><![CDATA[data-governance]]></category>
            <category><![CDATA[retail-analytics]]></category>
            <category><![CDATA[retail]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Helana Nosrat]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 17:38:33 GMT</pubDate>
            <atom:updated>2026-11-12T17:38:33.457Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CAv5Dud-8-a2FWAzkzWvnw.png" /></figure><p><em>On trendy product names, questionable joins, and the administrative consequences of calling beige “Champagne.”</em></p><p>At Maison Margot, a high-end boutique with killer lighting and ambitious candle prices, the autumn collection has finally arrived.</p><p>The window display is immaculate. The launch email is scheduled. Someone passing by has described a window cardigan as “an invitation to be pumpkin spice latte cozy.”</p><p>Inside the well-kept shop, the bestselling cream sweater has received a seasonal refresh.</p><p>Previously: <strong>Cream Knit Sweater</strong>.</p><p>Now: <strong>The Sunday Edit — Champagne Knit Sweater</strong>.</p><p>Same sweater. Same product code. Significantly more lifestyle.</p><p>Marketing is overly proud of themselves.</p><p>The sales report, however, appears to have lost it.</p><h3>A little makeover. A surprisingly large problem.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LDVlEmzvpusife53sIvClQ.png" /><figcaption><em>Same sweater. Significantly more lifestyle</em></figcaption></figure><p>Maison Margot has two datasets.</p><p>One records purchases. The other contains product information used to organize reporting.</p><p>Somewhere in the reporting logic, these datasets are connected using the product name.</p><p>For a while, that works.</p><p>“Cream Knit Sweater” matches “Cream Knit Sweater.”</p><p>Then the product name changes in one system while historical transactions retain the original wording.</p><p>The report tries to connect:</p><p><strong>Cream Knit Sweater</strong></p><p>with:</p><p><strong>The Sunday Edit — Champagne</strong></p><p>No match.</p><p>A human could recognize that these names refer to the same item, given enough context.</p><p>A database comparing those strings has received no such briefing.</p><p>It has also not attended the brand workshop.</p><h3>Your join has no imagination</h3><p>A join connects records according to the conditions you give it.</p><p>If the condition requires matching names, differences in spelling, punctuation, spacing, or naming conventions can matter, depending on how the comparison is implemented.</p><p>That gives a retail business plenty of opportunities for excitement.</p><p>“Mini Tote” becomes “Mini-Tote.”</p><p>“Rose Candle” becomes “Rosé Candle.”</p><p>Two entirely different products are both called “Everyday Essential,” because apparently specificity was unavailable during the naming session.</p><p>Now you have two possible problems.</p><p>Records that should connect may fail to match.</p><p>Records that should remain separate may match each other.</p><p>The first can leave information missing. The second can duplicate or misattribute it.</p><p>Both can produce a very elegant dashboard.</p><p>Presentation standards remain high throughout the incident.</p><h3>Missing from a report is different from missing from the business</h3><p>A shopper bought the sweater. The transaction exists. The boutique received the payment.</p><p>But what happens downstream depends on how the report handles the failed match.</p><p>An inner join might exclude the transaction from the result entirely.</p><p>A left join might preserve it while leaving product attributes empty. A later filter could still remove it.</p><p>Another report might place it under “Unknown.”</p><p>A deeply unglamorous category for something marketed as effortless sophistication.</p><p>This distinction matters during an investigation.</p><p>“The product didn’t sell” and “the product’s transactions didn’t match the reference data” describe very different situations.</p><p>One might lead to a promotion.</p><p>The other needs a closer look at the data.</p><p>Discounting the sweater will not repair the join, although someone may suggest it before the meeting ends.</p><h3>Give the product an identity that survives a haircut</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hXebf4iq84jPMvf2NOmOgw.png" /><figcaption><em>Names change. SW-1042 remains refreshingly unbothered.</em></figcaption></figure><p>For Maison Margot, a better connection might use a stable product identifier shared across both datasets.</p><p>For example:</p><p><strong>Product code: SW-1042</strong></p><p>The display name can change. The copy can become increasingly poetic. The sweater can spend November being Champagne and January rediscovering itself as Winter Ivory.</p><p>The identifier provides continuity.</p><p>There is a catch, naturally. We were enjoying ourselves too much.</p><p>A code is useful only if its behavior is understood.</p><p>Is it unique across the business or only within one supplier? Does it identify a product, or a particular size and color? Can it be reused? Is it present in both sources?</p><p>A code called PRODUCT_ID does not automatically deserve your trust. It has simply introduced itself confidently.</p><p>Check what it actually identifies.</p><h3>Please resist fixing everything with uppercase…</h3><p>When names don’t match, a tempting response is to standardize them.</p><p>Trim the spaces. Convert to uppercase. Remove punctuation.</p><p>These steps can help with superficial differences.</p><p>They cannot establish that “Champagne Sweater” and “Cream Knit Sweater” are the same product. They also cannot distinguish two products that legitimately share a name.</p><p>More aggressive cleanup can even erase meaningful differences.</p><p>At some point, the transformation becomes an elaborate attempt to persuade inconsistent labels to behave like identifiers.</p><p>An ambitious assignment for UPPER(TRIM()).</p><p>When a reliable, shared identifier isn’t available, a maintained mapping table may be necessary. Someone needs to own those mappings, review ambiguous cases, and handle new entries.</p><p>Yes, ownership again.</p><p>It keeps appearing in data conversations. Almost as though the spreadsheets cannot supervise themselves.</p><h3>A successful query deserves a few follow-up questions</h3><p>After changing the join, Maison Margot’s missing sweater returns to the report.</p><p>Wonderful.</p><p>Before anyone announces that the issue is resolved, there are a few things to check:</p><ul><li>How many records matched before and after the change?</li><li>Which records still fail to match?</li><li>Does each transaction match the expected number of reference records?</li><li>Did transaction counts or monetary totals change unexpectedly?</li><li>Does the approach work across other periods and product categories?</li></ul><p>The number of matches alone isn’t enough. A transaction matching three reference rows can make coverage look impressive while creating duplicate results.</p><p>We were aiming for accuracy. Multiplication was an unrequested feature.</p><p>And a successful test for one month establishes evidence for that month. Older records, retired codes, and historical naming practices may introduce different conditions.</p><p>The sweater has history. Unfortunately, so does the catalog.</p><h3>The business gets to be creative. The model needs to be clear.</h3><p>None of this means a retailer should stop renaming products.</p><p>Names help people shop. They communicate personality, seasonality, and the slightly questionable suggestion that a candle could improve your entire evening.</p><p>The data model needs to support that creativity by keeping identity clear as labels change.</p><p>That takes thoughtful keys, maintained reference data, visible exceptions, and tests that check more than whether the query completed.</p><p>It also takes a small amount of curiosity when a report looks wrong.</p><p>Before deciding that demand has collapsed, ask whether the records are still connecting.</p><p>Before rebuilding the dashboard, inspect the join.</p><p>And before matching two systems on a field called name, consider how many people have permission to give that name a makeover.</p><p>Maison Margot can keep “The Sunday Edit — Champagne.”</p><p>The reporting model would prefer SW-1042.</p><p>Quiet. Consistent. Remarkably comfortable being itself.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ada5802ade56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an E-commerce Site with Tornado, Python, and MongoDB (Part 2)]]></title>
            <link>https://medium.com/@HelanaBakhsh/building-an-e-commerce-site-with-tornado-python-and-mongodb-part-2-9cdb5ccdf6dd?source=rss-8667f9887605------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cdb5ccdf6dd</guid>
            <category><![CDATA[tornado]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Helana Nosrat]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 19:01:07 GMT</pubDate>
            <atom:updated>2026-08-04T19:24:29.851Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aTH5EwVR8ZSSVhWWtkhvfw.jpeg" /></figure><p><strong>Incase you were wondering, yes, Tornado is absolutely still relevant, but its primary use case has narrowed.</strong></p><p>Today, Tornado is still heavily utilized for highly concurrent, real-time applications that require thousands of long-lived connections, such as chat platforms, real-time dashboards, and multiplayer game servers. Because it was built from the ground up to handle asynchronous I/O and WebSocket connections without relying on standard WSGI threading, it remains a powerhouse for those specific infrastructure needs.</p><p>However, for standard RESTful APIs and basic CRUD web services, the Python community has largely migrated to <strong>FastAPI</strong>. FastAPI offers out-of-the-box features that modern developers love, like automatic data validation (via Pydantic), auto-generated OpenAPI documentation, and incredible performance running on ASGI servers like Uvicorn.</p><p><strong>But </strong>building a web service with Tornado is one of the best ways for developers to look under the hood and truly understand how Python’s event loops, non-blocking I/O, and asynchronous programming actually work — concepts that higher-level frameworks completely abstract away.</p><p>In Part 1, we successfully connected our application to MongoDB, explored basic document manipulation, and discussed how to attach our database to a Tornado application. Now, it’s time to build the actual API endpoints.</p><p>In this installment, we will dive into Tornado’s RequestHandler and write a POST method that allows us to create or modify definitions in our database.</p><h3>Understanding the RequestHandler</h3><p>In Tornado, you handle HTTP requests by creating subclasses of tornado.web.RequestHandler. Each HTTP method (GET, POST, PUT, DELETE, etc.) that you want to support is defined as a method within this class.</p><p>For our dictionary API, we want to allow clients to send a JSON payload containing a word and its definition.</p><h3>Writing the POST Request</h3><p>Let’s build out our DictionaryRequestHandler. When a POST request hits our endpoint, we need to:</p><ol><li>Parse the incoming JSON body.</li><li>Extract the word and definition fields.</li><li>Check the database to see if the word already exists.</li><li>If it exists, update the definition; if it doesn’t, create a new record.</li></ol><p>Here is what that looks like in Python:</p><p>Python</p><pre>import tornado.web<br>import json</pre><pre>class DictionaryRequestHandler(tornado.web.RequestHandler):<br>    def post(self):<br>        # 1. Parse the incoming JSON payload<br>        try:<br>            data = json.loads(self.request.body)<br>        except json.JSONDecodeError:<br>            self.set_status(400)<br>            self.write({&quot;error&quot;: &quot;Invalid JSON format.&quot;})<br>            return</pre><pre>        word = data.get(&quot;word&quot;)<br>        definition = data.get(&quot;definition&quot;)</pre><pre>        if not word or not definition:<br>            self.set_status(400)<br>            self.write({&quot;error&quot;: &quot;Both &#39;word&#39; and &#39;definition&#39; are required.&quot;})<br>            return</pre><pre>        # 2. Access the database connection we attached to the application in Part 1<br>        db = self.application.db</pre><pre>        # 3 &amp; 4. Upsert the document <br>        # (update if it exists, insert if it doesn&#39;t)<br>        db.collection_name.update_one(<br>            {&quot;word&quot;: word},<br>            {&quot;$set&quot;: {&quot;definition&quot;: definition}},<br>            upsert=True<br>        )</pre><pre>        # 5. Return a success response<br>        self.set_status(200)<br>        self.write({&quot;message&quot;: f&quot;Successfully saved the definition for &#39;{word}&#39;.&quot;})</pre><h3>Breaking Down the Code</h3><ul><li><strong>self.request.body</strong>: This property contains the raw string data sent in the request body. Since we expect JSON, we use Python&#39;s built-in json.loads() to convert it into a dictionary.</li><li><strong>self.set_status()</strong>: This method allows us to explicitly set the HTTP status code (e.g., 400 for Bad Request, 200 for OK).</li><li><strong>self.write()</strong>: This method writes a chunk of data to the output stream. As mentioned in Part 1, if you pass a dictionary to write(), Tornado is smart enough to automatically serialize it as JSON and set the Content-Type header to application/json.</li><li><strong>update_one() with </strong><strong>upsert=True</strong>: This is a powerful PyMongo feature. Instead of manually writing logic to find a document and then choosing whether to insert or update it, upsert=True tells MongoDB to find a document matching {&quot;word&quot;: word} and apply our $set update. If no matching document is found, it automatically creates a new one.</li></ul><h3>Wiring It All Together</h3><p>A RequestHandler on its own doesn&#39;t do much until we tell Tornado how to route traffic to it. We do this by mapping URL patterns to handlers in our Application object.</p><p>Python</p><pre>import tornado.ioloop<br>import pymongo</pre><pre>class Application(tornado.web.Application):<br>    def __init__(self):<br>        # Route the /dictionary URL to our handler<br>        handlers = [<br>            (r&quot;/dictionary&quot;, DictionaryRequestHandler),<br>        ]<br>        <br>        settings = dict(<br>            debug=True<br>        )<br>        <br>        super().__init__(handlers, **settings)<br>        <br>        # Attach the MongoDB connection<br>        conn = pymongo.MongoClient(&quot;localhost&quot;, 27017)<br>        self.db = conn.example_database</pre><pre>if __name__ == &quot;__main__&quot;:<br>    app = Application()<br>    app.listen(8888)<br>    print(&quot;Starting server on port 8888...&quot;)<br>    tornado.ioloop.IOLoop.current().start()</pre><p>By mapping the regex pattern r&quot;/dictionary&quot; to DictionaryRequestHandler, any POST request sent to http://localhost:8888/dictionary will be routed directly to the post method we just wrote.</p><h3>Next Steps</h3><p>Now that we have a working API endpoint for adding and updating data, the next logical step is to retrieve it! In Part 3, we will write the GET request logic to allow users to query our database and fetch the definitions we&#39;ve stored.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cdb5ccdf6dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an E-commerce Site with Tornado, Python, and MongoDB (Part 1)]]></title>
            <link>https://medium.com/@HelanaBakhsh/building-an-e-commerce-site-with-tornado-python-and-mongodb-part-1-9d712c6bf424?source=rss-8667f9887605------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d712c6bf424</guid>
            <category><![CDATA[tornado]]></category>
            <category><![CDATA[crud]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Helana Nosrat]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 18:50:10 GMT</pubDate>
            <atom:updated>2026-08-04T19:25:15.195Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K84ysWynTqpcP2wx3-zrZQ.jpeg" /></figure><p>When building a fast, scalable web service for an e-commerce platform, selecting the right backend stack is crucial. In this series, we’re going to build a simple, persistent web service using Python, the Tornado web framework, and MongoDB.</p><p>We will cover the fundamentals of setting up our database, performing basic CRUD (Create, Read, Update, Delete) operations using PyMongo, handling JSON serialization quirks, and finally, hooking our database into a Tornado application.</p><h3>Step 1: Setting Up PyMongo and Connecting to the Database</h3><p>MongoDB is a schemaless database that stores documents in a binary, JSON-like format called BSON. In Python, this is incredibly convenient because we can write and retrieve documents directly as Python dictionaries.</p><p>To get started, we need to import the pymongo library and establish a connection using MongoClient. MongoClient allows you to connect to any database on your server.</p><p>Python</p><pre>import pymongo</pre><pre># Connecting to a local instance<br>conn = pymongo.MongoClient(&quot;localhost&quot;, 27017)</pre><pre># Alternatively, connecting via a MongoDB URI<br># conn = pymongo.MongoClient(&quot;mongodb://user:password@staff.mongohq.com:10066/your_mongohq_db&quot;)</pre><p>Once connected, creating a database is as simple as assigning it:</p><p>Python</p><pre>db = conn.example_database</pre><h3>Step 2: Working with Collections and Documents</h3><p>In MongoDB, a <strong>collection</strong> is simply a place to put related documents. Most operations you perform will be on a collection object. You can access a collection using dot notation (db.collection_name) or bracket notation (db[&#39;collection_name&#39;]).</p><p><em>(Note: You can check your existing collections using </em><em>db.collection_names(), which will return a list like </em><em>[u&#39;collection_name&#39;, u&#39;system.indexes&#39;]. The </em><em>system.indexes collection is reserved for internal use.)</em></p><p>Let’s look at how to interact with our documents:</p><h3>Creating (Inserting) a Document</h3><p>When you create a new document, MongoDB automatically adds an _id field, which serves as a unique identifier.</p><p>Python</p><pre># Inserting a simple document<br>db.collection_name.insert({&quot;foo&quot;: &quot;bar&quot;}) # Returns something like ObjectId(&#39;4eadaa0b578765688&#39;)</pre><pre># A more practical example<br>db.collection_name.insert({<br>    &quot;name&quot;: &quot;helana&quot;, <br>    &quot;description&quot;: &quot;software developer&quot;, <br>    &quot;quantity&quot;: 3<br>})</pre><h3>Reading Documents</h3><p>To find a particular document, we use find_one() and pass it a dictionary containing the field name and the value we want to match. This returns a standard Python dictionary, meaning you can easily access items, iterate over key/value pairs, and modify values.</p><p>Python</p><pre>user_doc = db.collection_name.find_one({&quot;name&quot;: &quot;helana&quot;})<br><br># To get a list of all documents, iterate over the find() method<br>for doc in db.collection_name.find():<br>    print(doc)</pre><h3>Updating and Saving Changes</h3><p>It’s important to remember that changes made to your dictionary in Python are <strong>not</strong> automatically saved to the database. You must explicitly call the save method and pass in your modified dictionary.</p><p>Python</p><pre>user_doc[&#39;quantity&#39;] = 4<br>db.collection_name.save(user_doc)</pre><h3>Deleting Documents</h3><p>To remove a document, pass a dictionary argument to the remove method:</p><p>Python</p><pre>db.collection_name.remove({&quot;name&quot;: &quot;helana&quot;})</pre><h3>Step 3: The JSON Serialization Gotcha</h3><p>When building a web service, you’ll frequently need to take a Python dictionary and serialize it as a JSON object (for example, to send as a response to an AJAX request).</p><p>However, if you try to simply use json.dumps(doc), you will hit a roadblock. Python&#39;s standard json module doesn&#39;t know how to convert MongoDB&#39;s ObjectId type to JSON.</p><p>You have two options to solve this:</p><ul><li><strong>The quick fix:</strong> Delete the _id key before serializing:</li><li>del doc[&quot;_id&quot;] followed by json.dumps(doc)</li><li><strong>The robust fix:</strong> Use the json_util library provided by PyMongo, which is designed specifically to handle BSON data types.</li></ul><h3>Step 4: Hooking MongoDB into Tornado</h3><p>Now that we understand how to manipulate our data, let’s tie it into our Tornado application to create a simple persistent web service.</p><p>The best practice is to instantiate your MongoClient object directly within the __init__ method of your Tornado Application object. By creating a db attribute on the application itself, you can easily access it within any RequestHandler as self.application.db.</p><p><em>(Bonus: Tornado’s </em><em>write method will automatically serialize your dictionaries as JSON for you!)</em></p><h3>Next Steps: Writing the Dictionary API</h3><p>With our database connected and our Tornado application configured, we are ready to start handling HTTP requests. In the next part of this series, we will build out the API endpoints.</p><p>Our first task will be setting up a POST request to create and modify definitions in our database—if a record already exists, we will modify the existing definition; if it doesn&#39;t, we will create it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d712c6bf424" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Ways to Make Your Spark Jobs Stop Crying]]></title>
            <link>https://medium.com/@HelanaBakhsh/10-ways-to-make-your-spark-jobs-stop-crying-353b1f50818f?source=rss-8667f9887605------2</link>
            <guid isPermaLink="false">https://medium.com/p/353b1f50818f</guid>
            <dc:creator><![CDATA[Helana Nosrat]]></dc:creator>
            <pubDate>Sun, 28 Jun 2026 04:24:50 GMT</pubDate>
            <atom:updated>2026-06-28T04:24:50.557Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>A field guide to the slow parts that are never where you think they are.</strong></h3><p>Every data engineer has a Spark job they’re a little afraid of. The one that takes four hours, occasionally falls over, and gets babied through every run like a temperamental racehorse. You don’t optimize it because it technically works, and “technically works” is the most dangerous phrase in our entire field.</p><p>Here’s the thing about Spark: it’s a distributed engine, which means the slow parts are almost never where you think they are. The cost isn’t in your logic — it’s in the data movement your logic accidentally triggers. Master a handful of patterns and you go from “why is this taking forever” to “oh, that’s why,” which is genuinely the best feeling this job offers.</p><p>So here are ten, in roughly the order I’d actually reach for them, each with the reason it matters — because a tip you don’t understand is a tip you’ll misapply.</p><h4>1. Filter early. Like, embarrassingly early.</h4><p>Push your filters as far up the transformation chain as they’ll go. Every row you drop at the start is a row Spark doesn’t carry, shuffle, join, or spill to disk for the rest of the job. People write the filter at the end because that’s where it reads naturally in their head. Spark doesn’t care about your narrative arc. Filter first.</p><h4>2. Prune your columns.</h4><p>Load only the columns you actually need. That table has 80 columns; your job uses six. Reading all 80 is you volunteering to haul 74 columns of dead weight through every stage. Especially brutal on wide tables — column pruning can quietly cut your memory footprint by an order of magnitude before you’ve done anything clever.</p><h4>3. Minimize shuffles (the silent killer).</h4><p>This is the big one. Operations like groupBy and join trigger shuffles — Spark physically redistributing data across the network so related records land on the same machine. Shuffles mean disk I/O plus network I/O, the two slowest things a distributed system does. Most “why is this so slow” mysteries are an unnecessary shuffle wearing a trenchcoat. Restructure to avoid them whenever you can.</p><h4>4. Broadcast your small joins.</h4><p>When you join a giant DataFrame against a small one — a lookup table, a dimension — broadcast the small one. Instead of shuffling both sides across the cluster, Spark ships a full copy of the little table to every node and skips the expensive shuffle entirely. The catch is in the name: only broadcast things that are actually small, or you’ll blow up your executors and create a far more interesting problem.</p><h4>5. Cache the DataFrames you reuse.</h4><p>If you compute a DataFrame once and reference it five times, Spark will happily recompute the entire lineage all five times unless you tell it not to. Cache it and you pay for that work once. The discipline is knowing when NOT to — caching something you touch once just wastes memory you needed elsewhere.</p><h4>6. Use DataFrames, not RDDs.</h4><p>Unless you have a specific, defensible reason to drop down to RDDs, don’t. DataFrames go through Spark’s Catalyst optimizer, which rewrites your query plan to be smarter than what you’d hand-tune. RDDs make you the optimizer, and respectfully, the optimizer is better at this than you are.</p><h4>7. Stop calling collect() on big data.</h4><p>collect() yanks the entire DataFrame into the driver’s memory. On a large dataset that’s not a slow job, it’s an out-of-memory crash with your name on it. If you just need a peek, use take() or limit(). Reserve collect() for results you already know are small.</p><h4>8. Tune your parallelism.</h4><p>Partition count is a Goldilocks problem. Too few and most of your cluster sits idle while a handful of partitions do all the work. Too many and you drown in scheduling overhead, managing thousands of tiny tasks that each accomplish almost nothing. Match partitions to your data volume and cluster size — and actually look at the Spark UI to see which side of wrong you’re on.</p><h4>9. Approximate when exact doesn’t matter.</h4><p>Need a median across a billion rows for a dashboard? percentile_approx gets you there far faster than an exact computation, and nobody staring at a trend line can tell the difference between the true 50th percentile and one that’s a hair off. Spend exactness where it actually buys you something.</p><h4>10. Optimize your writes.</h4><p>The tiny-files problem is real and it compounds. Writing thousands of small files makes every future read of that dataset slower forever — you’ve pushed your cost downstream onto every job that touches the output. Repartition sensibly before writing so you’re not leaving a mess for future-you to step in.</p><h4>The actual lesson</h4><p>None of these are exotic. That’s the point. Spark performance isn’t about secret knowledge — it’s about respecting that you’re moving data across a network and refusing to make it travel more than it has to. Filter early, move less, shuffle rarely, and stop surprising your driver with the entire dataset.</p><p>Your four-hour job is probably a one-hour job wearing four hours of bad habits.</p><p>Which of these bit you the hardest the first time you learned it? Mine was collect(). We don’t need to talk about it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*rtwlI0P79ZGdjvGhVna-sQ@2x.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=353b1f50818f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Merge Strategies with Git…did you say a three-way?]]></title>
            <link>https://medium.com/@HelanaBakhsh/merge-strategies-with-git-did-you-say-a-three-way-ebedda9984dd?source=rss-8667f9887605------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebedda9984dd</guid>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[merge-strategies]]></category>
            <category><![CDATA[recursive-strategies]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Helana Nosrat]]></dc:creator>
            <pubDate>Mon, 30 Jul 2018 04:06:46 GMT</pubDate>
            <atom:updated>2019-03-08T00:37:43.676Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*BCZkmZR1_YzDZy22Vn4uUw.png" /></figure><p>Whenever I dig myself into a ditch at when coding I find myself writing out my problem and then documenting the solution to my problem in my handy-dandy developer notebook. I decided, today, that I would trade in my notebook for this new shiny thing called the internet and actually share my coding struggles along with the solutions I have found. This way, we all get to learn and what young developer doesn’t like to learn new things?</p><p>Todays dilemma…</p><h3>Merge Conflicts &amp; Merge Strategies</h3><p>Have you ever done a <em>git reflog</em>, looked through your commits and glanced over the “<em>pull: Merge made by the ‘recursive’ strategy</em>”? This is a standard thing to see in the world of git but caught my attention today (when trying to debug a commit gone all sorts of wrong) and wanted to understand the recursive strategy git uses a little further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*pUdPKeXTmZTUDh_fb5rmLg.png" /></figure><p>The first place I turn to when trying to figure where I’ve gone terribly wrong is to look at the sources docs itself before throwing myself into the never ending rabbit hole of stack overflow. Git( <a href="https://git-scm.com/docs/merge-strategies">https://git-scm.com/docs/merge-strategies</a> ) has some pretty solid and easy to understand docs compared to other version control documentation so following along with what they provide can usually get you back in the right spot.</p><p>According to the official Git documentation on Merge Strategies, whether using <em>git merge </em>or <em>git pull</em>, the user can provide the VCS with an added <em>-s</em> and then choosing either resolve or recursive. By default Git uses recursive and is usually the best way to tackle a merge but this may not always be the case. For us beginner programmers who may not know the difference between a resolve or recursive merge, all you need to know is that resolve will take two heads (your current branch and the branch you are pulling from) and then implements a 3-way merge algorithm to detect differences within the code being committed. Recursive will resolve two heads with a 3-way merge algorithm but the difference here is that it looks at whether or not there is <strong>MORE </strong>than one common ancestor. It then creates a tree of common ancestors and then uses this tree to run through the 3-way merge. It sounds kind of fancy but generally looks like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ibVlmUAbSUB8U-4WBQk1Bw.gif" /><figcaption><em>(image from </em><a href="http://www.drdobbs.com/tools/three-way-merging-a-look-under-the-hood/240164902"><em>http://www.drdobbs.com/tools/three-way-merging-a-look-under-the-hood/240164902</em></a><em>)</em></figcaption></figure><p><strong><em>**A quick side note</em></strong>: Dr. Dobbs not only provides some great diagrams but if you want to look even further into the algorithm itself, reading through this article <a href="http://www.drdobbs.com/tools/three-way-merging-a-look-under-the-hood/240164902">http://www.drdobbs.com/tools/three-way-merging-a-look-under-the-hood/240164902</a> will make you a 3-Way Merge pro.</p><p>Where the <strong>recursive merge strategy</strong> can get really complicated is with the long list of options that can be passed to the VCS, there are currently a whopping 13, all just sitting there waiting for you to put them to work.</p><p>They are as follows:</p><ul><li><strong>ours</strong>: forces conflicting hunks to be auto-resolved cleanly by favoring ‘our’ version</li><li><strong>theirs</strong>: pretty straightforward, but the opposite of ours</li><li><strong>patience</strong>: avoids mismatches that happen due to unimportant matching lines like curly braces</li><li><strong>diff-algorithm=[patience|minimal|histogram|myers]</strong>: tells ‘merge-recursive’ to use a different diff algorithm, this avoids mismerges that occur due to unimportant matching lines (braces, distinct functions, etc. etc.)</li><li><strong>ignore-space-change, ignore-all-space, ignore-space-at-eol</strong>: these are all pretty self-explanatory, they ignore any space changes, extra end of line spaces, or just spaces in general, which can be really handy for long complex css files</li><li><strong>ignore-cr-at-eol</strong>: to put it simply, in a three-way merge whitespace will be considered unchanged</li><li><strong>renormalize</strong>: useful when trying to resolve a three-way merge. Really only used in case-by-case situations and used when associated with a clean filter (for example converting all code to lowercase) or eol normalization rule</li><li><strong>no-renormalize</strong>: disables the renormalize option</li><li><strong>no-renames</strong>: turns off rename detection</li><li><strong>find-renames[=&lt;n&gt;]</strong>: turn on rename detection. This, in a general sense, is a matter of comparing hashes and is similar file detection(git mv, git rm, git add. Have files been added? Removed? Moved?). You can also set config options like limits on how many files you would like git to consider when performing the rename check, which really makes it a powerful feature. If you really want to get into the algorithms behind this feature and some of the other comparison features in Git you should check out this stack overflow article <a href="https://stackoverflow.com/questions/246961/algorithm-to-find-articles-with-similar-text">https://stackoverflow.com/questions/246961/algorithm-to-find-articles-with-similar-text</a></li><li><strong>subtree[=&lt;path&gt;]</strong>: Advanced method on guessing how two trees must be shifted to match with each other when merging. With this option, the specified path is prefixed to make the shape of the two trees match. For example if you wanted to add a subtree to entirely new branch: <em>git subtree add — prefix=&lt;subtree&gt; &lt;repository_url&gt; &lt;branch&gt;</em></li></ul><p>If that isn&#39;t enough within itself, there are even more merge strategies that can be implemented or are already implemented when Git is performing its magic. Another merge strategy Git offers is <strong>octopus </strong>which according to the documentation, “resolves cases with more than two heads, but refuses to do a complex merge that needs a manual resolution.” This is the default merge strategy for pulling or merging into one or more branch. A good example of this would be if you were merging all branches named for example “catmonster-1, catmonster-2, catmonster-3, catmonster-4” into the current branch you are on. This feature is commonly used for continuous delivery workflows since you can merge all branches together and then deploy the results to the staging server. Always keep in mind though, octopus merges are also not kept in any history lines. You can read more in-depth about octopus merges with examples here <a href="https://developer.atlassian.com/blog/2015/01/git-merge-distinct-octopus-merge/">https://developer.atlassian.com/blog/2015/01/git-merge-distinct-octopus-merge/</a> and how to revert them here <a href="https://developer.atlassian.com/blog/2015/01/reverting-an-octopus-merge/">https://developer.atlassian.com/blog/2015/01/reverting-an-octopus-merge/</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*cp7R9W6ZkMLRBFeBdAIbTg.png" /><figcaption><em>(image from </em><a href="https://developer.atlassian.com/blog/2015/01/git-merge-distinct-octopus-merge/"><em>https://developer.atlassian.com/blog/2015/01/git-merge-distinct-octopus-merge/</em></a><em>)</em></figcaption></figure><p>The Git <strong>ours </strong>merge strategy “resolves any number of heads, but the resulting tree of the merge is always that of the current branch head” and will then ignore changes from any of the other branches. So if you have some old branches you were coding on this will essentially wipe the history of those out and readjust your head if you are running into conflicts. This is commonly used and essentially allows you to keep “our” branch changes over “theirs”, so in layman’s terms, the sides are “swapped”.</p><p>The last merge strategy is <strong>subtree</strong> which can be super handy from time to time. Its useful when you are dealing with subprojects. Say you have project A and project B and project A’s subdirectory maps to projects B subdirectory. Here is also a great example of how to setup subdirectories and use a subtree merge to update all directories contained within the project <a href="https://help.github.com/articles/about-git-subtree-merges/">https://help.github.com/articles/about-git-subtree-merges/</a>.</p><p>So after doing extensive research I realized that is best to let Git do its own magic but when you’re in a tricky situation like a 4-way merge, you can manually implement an amazing merge strategy, like octopus, with one line of code and get your head and branch back where they need to be!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebedda9984dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Interview Questions To Master for HTML/CSS Front-End Designer Roles]]></title>
            <link>https://medium.com/@HelanaBakhsh/interview-questions-to-master-for-html-css-front-end-designer-roles-53cfc7ca9d3c?source=rss-8667f9887605------2</link>
            <guid isPermaLink="false">https://medium.com/p/53cfc7ca9d3c</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Helana Nosrat]]></dc:creator>
            <pubDate>Thu, 09 Mar 2017 07:15:48 GMT</pubDate>
            <atom:updated>2017-03-09T07:15:48.098Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*yuMnnnPc-0mnHyt9K6SLiQ.jpeg" /></figure><p>One of the biggest fears I have is not being prepared for an interview. In fact, I have nightmares about it on the reg. I show up to a job interview, completely naked of course, and when I go to answer the questions asked of me about semantics and syntax, I spew out complete word vomit and stare in horror as the faces across the table from me turn pale white and cringe in sheer pain. So in order to lessen the pre-anxiety and avoid any future PTSD I put together a handy list of interview questions I would use to grill candidates as a tech recruiter in the HTML/CSS space.</p><p>Any questions branded with a <strong>(Must)</strong> when answered wrong in an interview will usually automatically disqualify you from the role, questions marked with a <strong>(Should)</strong> essentially help interviewers decide between you or another a candidate, and questions marked as<strong> (Valuable)</strong> when answered correctly will help to put you on the top of any hiring teams talent list.</p><p>Feel free to use these as a guide for what to expect when entering into your first HTML/CSS interview, but remember these are just general Q&amp;A’s to help ease your mind a bit. The best way to nail an interview is to do some strong research on the company itself, google is your best friend (always), and to not sound overly scripted. Try NOT to memorize any of the responses but think of them as a resource to frame your answers. Most importantly……</p><blockquote>**<strong>BE YOURSELF**</strong></blockquote><h3>HTML Related Questions and Responses:</h3><p><strong>Q: What is “Semantic HTML?” (MUST)</strong></p><p><strong>A:</strong> <em>Semantic HTML is a coding style of using the markup to describe the meaning of the content. An example might be using the &lt;header&gt; tag to describe a document or section header, rather than using &lt;div class=`header`&gt; because a div element is only a containing element with no real semantic value.</em></p><p><strong>Q: Which of the following is considered an attribute? (SHOULD)</strong></p><p>Cite, Input, Class or Header?</p><p><strong>A: </strong><em>The correct answer is </em><strong><em>class</em></strong><em> — the class attribute specifies what CSS styles to apply to an element</em></p><p><strong>Q: Which of the following is a new sectioning element in HTML5? (SHOULD)</strong></p><p>Footer, Caption, Pre or Blockquote?</p><p><strong>A:</strong> <em>The correct answer is </em><strong><em>Footer</em></strong><em>— the footer element represents the “footer” of the document or section of a document.</em></p><p><strong>Q: One of the following Techniques is an accessibility feature. Which one is it? (VALUABLE)</strong></p><p>Implementing the &lt;b&gt; (bold) element, ARIA Landmark Roles, Using colors to give directions, or Indenting html markup with the “TAB” key?</p><p><strong>A: </strong>The correct answer is B — <strong>landmark roles</strong> define certain areas of the document to better inform a low-vision or blind user where he or she is in the document. For example, adding role=`navigation` informs a user he or she is in the navigation area.</p><h3>CSS Related Questions and Responses</h3><p><strong>Q: The Box Model is created with for properties. Which of the following is not a property of the Box Model? (MUST)</strong></p><p>Content, Position, Padding, or Border?</p><p><strong>A: </strong><em>The correct answer is </em><strong><em>Position</em></strong><em>— the fourth part of the Box Model is the margin</em></p><p><strong>Q: What is a “CSS reset” and why is it a good idea to use one? What is a popular “CSS reset?” (MUST)</strong></p><p><strong>A:</strong><em> A “CSS” reset resets the styling of all HTML elements to a consistent baseline and thus helps fix browser compatibility issues. Eric Meyer’s “reset.css” and “normalize.css” are two popular “CSS resets.”</em></p><p><strong>Q: What is the difference between “display: none:” and “visibility:hidden;”? (SHOULD)</strong></p><p><strong>A:</strong> “display: none;” removes the content completely from the document flow, whereas “visibility: hidden;” makes the content invisible but still keeps a placeholder in the document flow.</p><p><strong>Q: What is a big advantage of using an image sprite pertaining to page loading time? Please explain how this works. (SHOULD)</strong></p><p><strong>A:</strong> <em>An image sprite reduces the amount of http requests to the server. A single image sprint with eight images takes only one http request, while eight separate images would require eight different http requests.</em></p><p><strong>Q: What are the four “pillars” (or four major components) used in RWD (Responsive Web Design)?” (VALUABLE)</strong></p><p><strong>A:</strong> <em>1) Fluid Images, 2) A Grid, 3)Media Queries, 4)Dynamic Content.</em></p><p>If you are still fretting about your interview after reading and researching feel free to e-mail me at <a href="http://helanan@gmail.com/">helanan@gmail.com</a>. Im always here to help chat through any tough questions or take a look over your resume :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53cfc7ca9d3c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Burt’s Bee’s Marketing Philosophy: How to effectively promote your product while raising…]]></title>
            <link>https://medium.com/@HelanaBakhsh/the-burts-bee-s-marketing-philosophy-how-to-effectively-promote-your-product-while-raising-203b29731451?source=rss-8667f9887605------2</link>
            <guid isPermaLink="false">https://medium.com/p/203b29731451</guid>
            <category><![CDATA[burts-bees]]></category>
            <category><![CDATA[e-mail-marketing]]></category>
            <category><![CDATA[retail]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[bees]]></category>
            <dc:creator><![CDATA[Helana Nosrat]]></dc:creator>
            <pubDate>Fri, 30 Dec 2016 05:52:41 GMT</pubDate>
            <atom:updated>2016-12-30T05:57:56.231Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Burt’s Bee’s Marketing Philosophy: How to effectively promote your product while raising awareness</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HFSanRvtv9XGOnyMZl_qCg.jpeg" /></figure><p>Burt’s Bee’s, the Durham, North Carolina-based health and beauty retailer has become a common household name ever since Roxanne Quimby and Burt Shavitz created the foundation of this, literally, buzzworthy brand in 1984.</p><p>We’ve all grown to love their iconic beeswax lip balms and beauty products, but what truly makes this brand special isn’t just their nature-inspired products, but their drive to make the world a better place. My latest mission was to unlock the secret to how Burt’s Bee’s has perfected the ultimate e-mail marketing trifecta, a powerful campaign that can at the forefront promote their product but also raise awareness and overall drive action.</p><p>Lets face it, just about anyone can create a great product, but the true recipe to retail success is to build a community around your product in order to create <strong>CHANGE</strong>. By implementing some basic e-mail marketing tactics below, you too can become the next buzz brand that not only sells but also inspires.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/305/1*tzztxbDSuUtCbViACmLAxA.jpeg" /><figcaption>Burt’s Bees E-Mail Marketing at its Finest</figcaption></figure><ol><li>Burt’s Bee’s is one retailer who knows how to call attention to their best features; being the #1 all natural product line available on cosmetic shelves and their keen eye for packaging. This fine print, gets the attention of those who are text lovers and creates the urge to click. The link leads to the product page for this line of tinted lip balms , giving subscribers the option to click and buy before even getting through the first half of the email. Clever little beekeepers!</li><li>The classic, “view on browser” link. Why would I highlight such a mundane block of text? Because its surprising how many marketers out there forget to include this key piece in their emails. Giving subscribers the option to view in a browser gives those that are in need of thicker glasses another option to look at the page when not browsing on their mobile, and it also acts as a lifesaver incase the brand is having any rendering problems. Giving your subscribers different viewing options is as important as giving your subscribers different lip balm color options (not nearly as glamorous though).</li><li>The custom navigation bar placed at the top of every Burt’s Bee’s e-mails is the new fad amongst retailers and their digital newsletters. This tactic tricks the brain into thinking you are visiting a mini Burt’s Bees website made just for you! Again, playing off the theory of giving your subscribers options, you are allowing your audience to choose what interests them the most and will essentially bring them back to your site. Tinted lip balm might not be your audiences thing but maybe facial wipes or body lotion is. Give them the option to choose.</li><li>Burt’s Bees does a great job at getting to the point, the product itself. After all, the product is the star of the show or the Queen B of the beehive. This simple and clean display of their balms makes their newly repackaged product the center of attention. Notice how there is only a simple line of text below that is straight and to the point. They truly let their solid product sell itself, not fluff necessary.</li><li>A sleek, well highlighted, and clickable Call To Action is never a bad thing. This shows how spacing, margins, and padding can really help formulate flow within an e-mail, allowing the CTA to capture a readers attention without having to implement a big, shiny, eye sore of a button.</li><li>Tricked ya! This isn’t just a product email, Burt’s Bees has found yet another clever way to also promote their Natural Launchpad initiative while also highlighting a product. Newsletters don’t have to always be dedicated to one thought or action, Burt’s Bees does some great work outside of just the product they place on shelves. Their launchpad initiative helps entrepreneurs get started with their own business, and truly be part of the Burt’s Bees way of life. They use yet another great clickable CTA to easily direct subscribers back to their Natural Launchpad landing page.</li><li>While not taking away from the focal point of the newsletter, adding some color into your campaign is never a bad thing. Keeping their busiest block of information at the bottom of the email, doesn’t divert anyones attention away from the star of the show, Burt’s Bee’s newest product offering.</li></ol><p>So there you have it, taken straight from the industry thought-leaders themselves, an e-mail marketing piece of artwork, as sweet and appealing as honey (sorry for the terrible puns)!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=203b29731451" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>