<?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 Bahareh Adham on Medium]]></title>
        <description><![CDATA[Stories by Bahareh Adham on Medium]]></description>
        <link>https://medium.com/@BaharehAdham?source=rss-ce60e4a98373------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*EFuYVoxa19y52DVj.jpg</url>
            <title>Stories by Bahareh Adham on Medium</title>
            <link>https://medium.com/@BaharehAdham?source=rss-ce60e4a98373------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 19:37:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@BaharehAdham/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 yoga taught me during my time in coding bootcamp]]></title>
            <link>https://medium.com/@BaharehAdham/what-yoga-taught-me-during-my-time-in-coding-bootcamp-62604d957271?source=rss-ce60e4a98373------2</link>
            <guid isPermaLink="false">https://medium.com/p/62604d957271</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[codingbootcamp]]></category>
            <category><![CDATA[yoga]]></category>
            <dc:creator><![CDATA[Bahareh Adham]]></dc:creator>
            <pubDate>Wed, 19 Sep 2018 15:50:14 GMT</pubDate>
            <atom:updated>2018-09-19T15:50:14.120Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8v9NLVGa6Mnc0sCL3gigDg.jpeg" /><figcaption>This is how I work most of the time</figcaption></figure><p>I recently graduated from an almost 3-month intensive coding bootcamp. Before this, I was teaching English as well as Yoga (I actually stumbled upon my love for coding while making a page for my yoga practice and teaching). The path to becoming a front-end developer was at times very fun but also very overwhelming. During the most challenging days, I came back to the lessons I’d learned in my journey as a yoga practitioner.</p><p><strong>If you aren’t able to do something today, keep practicing and you WILL get it some day.</strong></p><p>I admit, I began my journey into the world of yoga with purely physical goals — I want to do a handstand; I want to do crazy arm balances. When I started, I couldn’t do ANYTHING! Not a push up, not a crow pose, not even anything resembling a crow pose. If you see my above picture, you’ll see that I’m quite comfortable in side crow now. What you don’t see is the literal YEARS I spent working on it. Years spent face planting, twerking my wrists, and sliding off my elbows. Even today, my poses don’t hit their mark all the time. I still face plant and slide, but a lot less frequently. A year from now, I will hopefully be able to hold even longer, stronger, and more sturdy poses.</p><p>When I started coding, I was working only with HTML and CSS. I’d struggle with floats, get my flex properties mixed up, and had no idea about how animations worked. In the first month of bootcamp, I was SO comfortable and happy with CSS, but living in what can only be described as JavaScript hell. I didn’t understand what parameters are, calling functions was a nightmare, and I had no idea what a callback is. I didn’t want to ask any of my teachers for help because I knew I’d cry as soon as I opened my mouth. On my lowest day I went home, opened Codecademy, and told myself I will NOT leave my chair until I understood every part of the functions unit. And I did. I sat and read and experimented and played with code until.. suddenly .. CLICK. It all clicked. Just like crow pose clicked.</p><p>A few weeks after JavaScript we began learning React Js — a new language, new rules, new things to be confused about. However this time I reminded myself of JavaScript. I reminded myself of crow pose. I avoided headache and stress by reminding myself that one day it will click — and a few days later, it did.</p><p><strong>The stressful times are just temporary. Learn from them and enjoy the challenge.</strong></p><p>One of the most uncomfortable positions for me in yoga is just sitting on the ground. To do it properly requires SO MUCH physical engagement and awareness. It’s easy to just slouch and chill out, but then your yoga teacher yells at you and tells you to straighten up. It’s even harder for me when I’m sitting for over a minute, back straight, core tight, and trying to meditate. Meditation is HARD for me. I think about a million different things, like “what’s for dinner”, “how can I solve this piece of code”, “I’d love to go for a swim”, and my favourite, “I’m so bored of sitting here omg”. They say that if you can’t meditate for a minute, you should be meditating for 30 minutes. When something is uncomfortable or stressful, it is a reflection of what you need to focus and what you need to improve. Every time I am uncomfortable in a seated meditation, I need to remind myself that I can leave this position at any time — however I must use the time that I AM ‘suffering’ in it to grow.</p><p>The same could be said about the hardest days of bootcamp. There was one day, right in the middle of React week, where I just thought to myself, “I could just quit now, go back to teaching elementary school, and I won’t have to face another challenge again”. But then I remembered WHY I decided to leave that career and become a developer. I remembered how well I’d done in javaScript by just sticking to it, and I remembered that only a few more days in this uncomfortable React week, and I would be able to master that too. It’s easy to let go of things that are hard to do, but growth happens when we push ourselves, not when we settle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*emuA-wtaGfE0l6KVVYAdoA.jpeg" /><figcaption>I only need one hand to code</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62604d957271" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IT STILL DOESN’T WORK — 3 more common problems we face in CSS, jQuery, and JavaScript (and their…]]></title>
            <link>https://medium.com/@BaharehAdham/it-still-doesnt-work-3-more-common-problems-we-face-in-css-jquery-and-javascript-and-their-1c68595e5f74?source=rss-ce60e4a98373------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c68595e5f74</guid>
            <category><![CDATA[politics]]></category>
            <dc:creator><![CDATA[Bahareh Adham]]></dc:creator>
            <pubDate>Tue, 28 Aug 2018 14:37:37 GMT</pubDate>
            <atom:updated>2018-08-28T14:37:37.676Z</atom:updated>
            <content:encoded><![CDATA[<h3>IT STILL DOESN’T WORK — 3 more common problems we face in CSS, jQuery, and JavaScript (and their solutions)</h3><p>A common problem with coding languages is that there is so many of them, and as soon as you finally feel comfortable with one, you get thrown eye-first into another, with its own set of idiosyncrasies. After only a few short weeks in the JavaScript vortex, I am here to provide you with 3 more problems I faced in my travels and how I solved them.</p><ol><li><strong>My CSS backgrounds don’t work when I deploy them on my phone. Should I throw out my iPhone?</strong></li></ol><p>Next time you have this problem, check the background-attachment on the image in question. The culprit might be that it is ‘fixed’, which is a state that many mobile devices don’t support. You can work around this in many ways. I chose to put in a query that changes the background-attachment to “scroll” (aka the default) when on a touch device:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XN1bk-XUiF82ukXjkXwVBQ.png" /></figure><p><strong>2.</strong> <strong>My ‘if’ statements in my script aren’t working! Are &amp;&amp; and || a total lie??</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*naYhLwXNeEOlc04Xa4NBbA.png" /></figure><p>Based on this, the answers “Trudeau”, “trudeau”, “justin trudeau”, and “Justin Trudeau” should all be correct. Let’s test it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*0JgcBn0ekKk3CUcre0CTbQ.png" /><figcaption>Tough question</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*KDHHPqYMCPmmalZVe0DQKg.png" /><figcaption>Woohoo!</figcaption></figure><p>Yay! That works perfectly. Or does it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*SzY-g-bYYx8bx9F1ypUaCQ.png" /><figcaption>Let’s try the wrong answer</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/210/1*FKS1FgY6__wG5tcwMXI8hQ.png" /><figcaption>Right again? What the??</figcaption></figure><p><strong>SOLUTION: </strong>Every time you write an &amp;&amp; or || logical operator, you need the start the next boolean expression from scratch. The correct way of writing the above code would be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*KbF-cGarAaEK3uqXsS-7NQ.png" /></figure><p>Let’s test it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*H2HhZ64TBCY-P50Q-oub4g.png" /><figcaption>The more I read it the more I can’t figure out</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*sFlXaIewXWtd8lCh5Hi2CA.png" /><figcaption>So far so good!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*0hRgej0DOUVeEsqL_c2-hw.png" /><figcaption>Drum roll please…</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/282/1*fZ8WGDsVHYaaSVn4prUkWw.png" /><figcaption>Yas!</figcaption></figure><p><strong>3. I’ve deployed my website, and some of my links just DON’T WORK on some devices! But they work on others! Am I taking crazy pills? Who invented this?</strong></p><p>On my most recent project, I used jQuery to link my index.html page to another page of my website. I used the method windows.location.replace(‘file_path”);</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*kgr_gYZ4-8dD3O4tag2GIg.png" /><figcaption>Replaces the current location with this other location. Simple, right?</figcaption></figure><p>This worked perfectly fine while I was making the website. When I deployed it, something strange happened: the link would take you to a different URL depending on the device you use! My boyfriend and mom have the updated iOS on their phones, and their safari browsers linked them to a different URL than my older iOS phone’s — they received errors but I didn’t, although I did receive an error on my macbook’s safari. How could the same link take different devices to different places?</p><p><strong>SOLUTION: </strong>The above method isn’t supported by all browsers. A better alternative would be to simply use windows.location.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*7NUh2Tss_gkYUoH6XXtjsw.png" /><figcaption>So much better</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c68595e5f74" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WHY ISN’T THIS WORKING?!]]></title>
            <link>https://medium.com/@BaharehAdham/why-isnt-this-working-42f565acd32c?source=rss-ce60e4a98373------2</link>
            <guid isPermaLink="false">https://medium.com/p/42f565acd32c</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[sass]]></category>
            <dc:creator><![CDATA[Bahareh Adham]]></dc:creator>
            <pubDate>Mon, 06 Aug 2018 21:45:26 GMT</pubDate>
            <atom:updated>2018-08-06T21:45:26.632Z</atom:updated>
            <content:encoded><![CDATA[<h3>WHY ISN’T THIS WORKING?! — common HTML/CSS problems we face when learning to code and how to fix them</h3><p>Like so many people out there, I began my coding journey learning HTML and CSS on sites that offer free lessons and take you through the basics of the various languages. However, as any developer can tell you, every CSS property has its own quirks and rules that go with it, and it’s very easy to get stuck without knowledge of all these nuances. So without further ado, here are the top 4 problems I faced when learning CSS on my own.</p><ol><li><strong>‘Margin: 0 auto’ is a big lie because I can never centre anything with it. Should I just throw away my computer?</strong></li></ol><p>We’ve all been told about the amazing margin value “0 auto”, which will put your content in the middle of the page without having to use grids, flexbox, -or worse- give padding on right and left of the element while eyeballing your work. When I first started using margin: 0 auto, IT DIDN’T WORK ANYWHERE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qWJ5eASCjTuRWP6nBPhMlQ.png" /><figcaption>Blue relaxes me when my code isn’t working</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VlvYl5E0CCxFHjRUi2RGMA.png" /><figcaption>Why don’t you work, margin: 0 auto?!</figcaption></figure><p><strong>SOLUTION:</strong> in order for margin: auto 0 to work, you need to give a specific width to the PARENT of that element, so that the child element can find it’s place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kywmNGs4VL0JJd99bDntVw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DxANEOgI_yuyxQDLM_KtUw.png" /><figcaption>ahhhhhhhh yes!! So much better.</figcaption></figure><p><strong>2. I can’t give my elements heights with percentages!! How will I ever make a responsive masterpiece?!!</strong></p><p>A responsive webpage is one which will adjust its sizes and elements depending on what device the user is on — this usually involves a lot of proportional re-sizing of elements. For this, it’s always better to use % values vs. pixel values, since the browser can calculate the percentages for you and do most of the work for you without you having to write extra code.</p><p>One big problem I encountered was that giving percentage heights didn’t always work for me. Take this example, where I want the top half of my page to be yellow, and the bottom to be green:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mmAshAHJDkN03li1UEdsdg.png" /><figcaption>I’d love it if the top half of my screen could be yellow, and the bottom half green.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0TbXhmmqLHAwBPx8X-lbEw.png" /><figcaption>There’s nothing here. Except now you can see my bookmarks (I highly recommend you check out those sites)</figcaption></figure><p><strong>SOLUTION:</strong> Just like margin 0 auto, we must give a specific height to the parent of an element (ie a pixel value or vh) before we give a % height to the child. Let’s give the wrapper a vh of 100, meaning that the wrapper will always take up 100% of the <strong>v</strong>iewport <strong>h</strong>eight.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jsFH8KcNHLAIhy6c19XI5A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aysNMuhQSkeX3V8sC08LTQ.png" /><figcaption>that’s so much better, and now I can go back to hiding my bookmarks and protecting my online privacy.</figcaption></figure><p><strong>3. My images are enormous and all over the place and I can’t afford to smash another laptop!</strong></p><p>Okay so let’s say that I want to make a website that has 2 pictures of beans, along with a caption for each picture. I want the picture and caption to be 300px wide, and I want a red border to surround each picture+caption combo. Let’s write some code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2QBfkOd2wwSpdsv38GzM8A.png" /><figcaption>this looks great!! What could possible go wrong?!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*axBAVmAg1c6biw2fExQTOQ.png" /><figcaption>AHH IT’S HIDEOUS MAKE IT STOP</figcaption></figure><p><strong>SOLUTION: </strong>the image needs to <em>also</em> be given a width so that it stays the same size as its container. The best way to do this is to give all ‘img’ tags a width of 100%. Remember, this means that the image will take up 100% of the width of its PARENT, which is in this case, a 300px wide box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N7t0R5BWIMA_XFblQNkYog.png" /><figcaption>let’s try this again</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TAeQzwQczAztHaiD5_Jm0A.png" /><figcaption>Look at that stunner</figcaption></figure><p><strong>4. My media queries aren’t working on SASS and now my boss is going to fire me.</strong></p><p>SASS or .scss is a great way to write CSS code quickly, and have a pre-processing software compile your work into full CSS format. One big problem I faced and spent hours trying to solve with the google was that, sometimes, my media queries wouldn’t work! I’d put in the query, resize my page, and nothing would respond!</p><p>In this example, I have a yellow box in a black-bordered box on a salmon background.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wFouM6Ge1peUKfRetTfk3Q.png" /><figcaption>salmon goes very well with beans</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A6gt1w39XVdPW5W2NR78Qg.png" /><figcaption>sauté those beans with some garlic, salt, and pepper</figcaption></figure><p>As you can see from the media query at the bottom of the SCSS, I want to make the yellow box in the centre of this beautiful salmon-coloured page turn blue when the screen is smaller that 1000px. However, it stays as yellow in this case, even though I made the screen 700px wide:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iT2dsztzkVLea-b-sJFFyg.png" /><figcaption>squeeze some lemon over the salmon, slice a lemon and place the pieces on the fish, season with salt and pepper</figcaption></figure><p><strong>SOLUTION:</strong></p><p>Worry not, you just need to be more specific in your media query! Look at how the CSS turns out:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aAXeBbMC1cUFKdpDmOHj6w.png" /><figcaption>bake in a 350 degree oven for about 30 min, depending on the thickness of the fish</figcaption></figure><p>The rule that makes the box yellow is for “.wrapper .box .smallBox”, whereas the media query is for “.smallBox”. The yellow box rule is much more specific than the blue box rule, so the media query can’t override the original. It’s easy to fall into this trap when writing code in SCSS because we are nesting all the time.</p><p>Let’s make the media query as specific as the original:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y_wwz8-lA6Y8Kn97E_Ah9Q.png" /><figcaption>this is also a food blog</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kFzhtAVs8DL1DQD_twPIcQ.png" /><figcaption>Oh that’s beautiful. Like a plate of succulent fish</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42f565acd32c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>