<?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 Amree Zaid on Medium]]></title>
        <description><![CDATA[Stories by Amree Zaid on Medium]]></description>
        <link>https://medium.com/@amree?source=rss-5932e35135f8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OsIB7exOsHht8T3Z_h7g8Q.jpeg</url>
            <title>Stories by Amree Zaid on Medium</title>
            <link>https://medium.com/@amree?source=rss-5932e35135f8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 13:16:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amree/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[CoinGecko’s Interview Process for Level 1 to Level 3 Engineers]]></title>
            <link>https://amree.medium.com/coingeckos-interview-process-for-level-1-to-level-3-engineers-7cb2e84141b2?source=rss-5932e35135f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cb2e84141b2</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Amree Zaid]]></dc:creator>
            <pubDate>Mon, 03 Jul 2023 01:51:01 GMT</pubDate>
            <atom:updated>2023-07-03T01:51:01.728Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been talking to a prospective candidate who has been inquiring about the best way to prepare for the interview. I was surprised to see that his first email was sent in May 2022. His most recent question pertained to the interview process, and this was my response (with some additions):</p><p>Disclaimer: Much of this work is handled by our Engineering Manager (EM) and HR department as they are the leads in this process. My response is based on what I recall.</p><p>Our interview format varies depending on the level of the position. Occasionally, we may modify the process to suit a particular candidate, though this is rare.</p><p>Generally, there are there four stages:</p><p>1. Discovery call</p><p>2. Skills Assessment</p><p>3. First Interview</p><p>4. Second Interview</p><p>To keep things simple, let’s outline the procedure for Level 1 to Level 3 positions. Please note that this is based on my recollection and there may be slight inaccuracies:</p><p>1. Apply through jobs.lever.co/coingecko</p><p>We’ll ask you a series of questions, including some technical ones to gauge your basic knowledge of web development. It’s not uncommon for candidates to be disqualified at this stage, so be sure to answer each question thoroughly. If you don’t know the answer, invest some time in research instead of responding, “I don’t know.” Your efforts here could make all the difference.</p><p>2. An HR representative will call you to ask a few general questions and get to know you better. We call this discovery call and I’ve seen the Engineer Manager (EM) call the candidate instead of the HR. This is more on get to know you better.</p><p>3. Based on your application and HR interview, our EM will decide whether to proceed with an assignment. At times, other engineers may also provide feedback. If these engineers become involved, they’ll typically stay on your panel throughout the interview stages.</p><p>If approved, you’ll be assigned a task to complete within two weeks. I cannot emphasize enough the importance of doing well on this assignment.</p><p>4. After submitting your assignment, we’ll review it and note our feedback internally to prepare for a video interview. Given the effort candidates put into this stage, we rarely reject anyone here.</p><p>5. The video call will involve discussing your assignment and answering numerous technical questions. Usually, the panel will consist of four engineers, including the EM, one Lead/Principal, and two Engineers of varying levels.</p><p>This interview will last about two hours. The first hour will focus on your assignment and technical knowledge, while the next 45 minutes will delve into your current work and past experiences. You’ll have an opportunity to ask us any questions in the final 15 minutes. Live coding will not be required.</p><p>6. After the interview, we’ll debrief and make a decision based on our established guidelines. The possible outcomes are: 1) Strong no hire 2) No hire 3) Hire 4) Strong hire. As you can see, the decision is binary; we either proceed or we don’t. If we decide to hire you, we’ll also discuss some of the onboarding plans and which team you will be in.</p><p>7. Should we decide to proceed, you’ll engage in a conversation with one of our founders. This stage will not involve any technical questions. From my experience, there has been only one instance where a candidate was rejected at this juncture, making it a rare occurrence.</p><p>8. Once he gives the go-ahead, HR will conduct their due diligence, such as reference checks. After these are completed, you’ll receive your offer letter.</p><p>By the way, all proceedings are documented in our Lever application. Thus, once onboard, the candidate can access all previous feedback.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cb2e84141b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I used chained branches to help with the major upgrade]]></title>
            <link>https://amree.medium.com/how-i-am-using-chained-branches-to-help-with-the-major-upgrade-de31802ec9e4?source=rss-5932e35135f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/de31802ec9e4</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Amree Zaid]]></dc:creator>
            <pubDate>Fri, 18 Nov 2022 08:49:30 GMT</pubDate>
            <atom:updated>2023-05-07T05:07:11.706Z</atom:updated>
            <content:encoded><![CDATA[<p>I want to share how I manage multiple library/gem/package updates simultaneously while doing big upgrades. But before we start, it’s important to know why.</p><p>Significant upgrades require a more considerable change of files. The number of files you need to change can get out of hand. You may have to replace some code due to the deprecations, or you may have to deploy in multiple stages to avoid breaking the production.</p><p>This is why I strive to have more minor changes that can help reduce the final changes. In the end, the last Pull Request (PR) will only have small changes that would help your colleagues to review them safely. Yeah, no one is going to review 50+ changed files.</p><p>It’s common for me to have more than 30 PR opened (not at the same time) for one upgrade project. It’s not weird to have 10+ PR(s) opened and waiting for approval or deployment. So, it can be very confusing to maintain all those PR(s) and branches.</p><p>It’s not just about having small changes. It’s also about getting into the future, where you are in a state where you have everything merged so that you can work on the future upgrade simultaneously.</p><p>In my case, I was working on upgrading v5.2.7 -&gt; v5.2.8 -&gt; v6.1.7 -&gt; v7.0.4 (I’m also upgrading Ruby at the same time, but I won’t go into that to simplify the explanation). The good thing is that I don’t have to wait for everything to be ready before even working on the next upgrade. When I was working on v5.2.8, I have already started to work on v7.0.4 at the same time while waiting for code review and deployments. To me, that’s a BIG ADVANTAGE.</p><p>Let’s talk about how I’m doing it. Pretty sure someone else has done this before. It doesn’t require tools (you can create a script if you want to); you need some basic git commands and small notes. It’s hard to explain this without a visualization, so I’ve created one. You guys can see it in the attachment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rEke746SmLWFB--LZraykg.png" /></figure><p>1. Every PR must be based on the master (master &lt;- pkg-upgrade-1 )</p><p>This means you can ensure you won’t break production with this particular change and always rebase from the master whenever needed. If things went wrong when you deployed, you would immediately know the problem compared to having multiple upgrades in one PR. If you have one PR with various upgrades, you’d have to hunt down the part that is causing the problem.</p><p>2. If the change requires another change, use a different base (master &lt;- pkg-upgrade-1 &lt;- pkg-upgrade-2)</p><p>The world is always complex, and there’s always a chance that you’d have to depend on a different package before you can work on another upgrade. You can wait for the changes to be deployed, but why should you?</p><p>3. Use a ‘before’ branch before the big upgrade (master &lt;- before-big-upgrade (upgrade1, upgrade2, ..) &lt;- the-big-upgrade)</p><p>The big upgrades usually require multiple changes. We can’t use 2nd technique here as that is only suitable for one or two upgrades. We handle this by creating a branch that will combine every small changes that haven’t been merged to the master.</p><p>That ‘before’ branch will be used as the base for the big/last upgrade PR. This is HOW WE TRAVEL INTO THE FUTURE. You can even see if your final changes here. The final branch/PR should pass your CI and work locally/staging. If you found any problem, then you can always create small branch to fix it before we merge the final branch.</p><p>4. Use the combination of those techniques to work on another major upgrade</p><p>We can combine them, and the result would look like this: master &lt;- major-upgrade-1 &lt;- major-upgrade-2 &lt;- major-upgrade-3.</p><p>It may look simple, but ‘major-upgrade-1’ PR combines techniques from 1 to 3. It’s a bit hard to wrap your mind when you read it for the first time, but you can look at the image for that. Hopefully, it will help.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*o9ipXRwECVut5C61hNaNIA.png" /></figure><p>What kind of git command that I need to use?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lV9pNFdL4CIAivW99xrdXg.png" /></figure><p>Is this the best way to do this? It helped me keep working without being blocked by pending PR or deployments. Remember, I don’t deploy immediately to ensure I can monitor for regressions. Usually, I’d put some gaps between deployments.</p><p>Thanks for reading if you managed to get this far. I’m planning to do a presentation on this in the future, and writing this will help me explain the method better.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de31802ec9e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrate TradingView’s HTML5 Charting Library with Ruby on Rails v6]]></title>
            <link>https://amree.medium.com/integrate-tradingviews-html5-charting-library-with-ruby-on-rails-v6-56b072fb5ba5?source=rss-5932e35135f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/56b072fb5ba5</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[tradingview]]></category>
            <dc:creator><![CDATA[Amree Zaid]]></dc:creator>
            <pubDate>Mon, 23 Nov 2020 00:00:02 GMT</pubDate>
            <atom:updated>2024-09-23T01:37:59.469Z</atom:updated>
            <content:encoded><![CDATA[<p>As you probably know, the charting library is not accessible publicly. You need to request access from them. So, I can’t really give a complete repo as an example. I did however open a PR at <a href="https://github.com/tradingview/charting-library-examples/pull/197">https://github.com/tradingview/charting-library-examples/pull/197</a>, but I’m not sure if it’s going to be accepted.</p><p>Anyway, the given example is using asset pipeline and the modern Ruby on Rails application is using webpacker. So after trying out a few times, I figured a working way to load the sample chart.</p><p>It’s not straight forward for me, so maybe this will help someone else in the future. However, I’m not sure if it’s the best way to load it, however, it works 😁</p><p>I’m going to assume you’re using the Ruby on Rails v6.0.3.4. Once you’ve cloned the library into charting_library directory, you can do these steps:</p><ul><li>Copy charting_library/charting_library.js into app/javascript/packs/charting_library/charting_library.js</li><li>Copy datafeeds/udf/dist/*.js into app/javascript/packs/datafeeds/</li><li>Copy charting_library/*.html into public/charting_library/</li><li>Copy charting_library/bundles into public/charting_library/bundles</li></ul><p>Don’t worry about serving outdated files just because you put it in the public directory as the charting library will use a new hash on the files every time there’s a new update.</p><p>Once we got the files in the correct places, we can use this code to load the sample:</p><pre>// app/javascript/packs/application.js<br>require(&quot;@rails/ujs&quot;).start()<br>require(&quot;turbolinks&quot;).start()<br>require(&quot;channels&quot;)<br>require(&quot;packs/datafeeds/polyfills&quot;)<br><br>const Datafeeds = require(&quot;packs/datafeeds/bundle&quot;)<br>const TradingView = require(&quot;packs/charting_library/charting_library&quot;)<br><br>function getLanguageFromURL() {<br>  const regex = new RegExp(&#39;[\\?&amp;]lang=([^&amp;#]*)&#39;);<br>  const results = regex.exec(location.search);<br><br>  return results === null ? null : decodeURIComponent(results[1].replace(/\+/g, &#39; &#39;));<br>}<br><br>function initOnReady() {<br>  var widget = window.tvWidget = new TradingView.widget({<br>    symbol: &#39;AAPL&#39;,<br>    datafeed: new Datafeeds.UDFCompatibleDatafeed(&#39;https://demo_feed.tradingview.com&#39;),<br>    interval: &#39;D&#39;,<br>    container_id: &#39;tv_chart_container&#39;,<br>    library_path: &#39;/charting_library/&#39;,<br><br>    locale: getLanguageFromURL() || &#39;en&#39;,<br>    disabled_features: [&#39;use_localstorage_for_settings&#39;],<br>    enabled_features: [&#39;study_templates&#39;],<br>    charts_storage_url: &#39;https://saveload.tradingview.com&#39;,<br>    charts_storage_api_version: &#39;1.1&#39;,<br>    client_id: &#39;tradingview.com&#39;,<br>    user_id: &#39;public_user_id&#39;,<br>    fullscreen: false,<br>    autosize: true,<br>    studies_overrides: {},<br>  });<br><br>  widget.onChartReady(() =&gt; {<br>    widget.headerReady().then(() =&gt; {<br>      const button = widget.createButton();<br><br>      button.setAttribute(&#39;title&#39;, &#39;Click to show a notification popup&#39;);<br>      button.classList.add(&#39;apply-common-tooltip&#39;);<br><br>      button.addEventListener(&#39;click&#39;, () =&gt; widget.showNoticeDialog({<br>        title: &#39;Notification&#39;,<br>        body: &#39;TradingView Charting Library API works correctly&#39;,<br>        callback: () =&gt; {<br>          console.log(&#39;Noticed!&#39;);<br>        },<br>      }));<br><br>      button.innerHTML = &#39;Check API&#39;;<br>    });<br>  });<br>};<br><br>window.addEventListener(&#39;DOMContentLoaded&#39;, initOnReady, false);</pre><p>The code is actually coming from the sample with slight modifications.</p><p>Create a view and put this HTML in:</p><pre>&lt;div class=&quot;page-tv-chart-container&quot; id=&quot;tv_chart_container&quot;&gt;&lt;/div&gt;</pre><p>TradingView will use that ID to load the chart.</p><p>Just start your server and that’s it. You should have a working TradingView chart by now 👍</p><p><em>Originally published at </em><a href="https://amree.dev/2020/11/23/integrate-tradingviews-html5-charting-library-with-ruby-on-rails-v6/"><em>https://amree.dev</em></a><em> on November 23, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56b072fb5ba5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Printing to Zebra S4M Using Java]]></title>
            <link>https://amree.medium.com/printing-to-zebra-s4m-using-java-afab5acf6fb0?source=rss-5932e35135f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/afab5acf6fb0</guid>
            <category><![CDATA[zebra]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Amree Zaid]]></dc:creator>
            <pubDate>Sun, 11 May 2008 00:00:38 GMT</pubDate>
            <atom:updated>2024-09-24T13:24:53.176Z</atom:updated>
            <content:encoded><![CDATA[<p>Apparently there’re some codes scattered on the net telling people that you can print to a Zebra printer by sending ZPL II codes using PrintService. But the problem is, it&#39;s not working, I don&#39;t know why, maybe because of a different version of printer or model but I&#39;m pretty sure the thing that came out from the printer are just ordinary texts not barcode which is what the code was supposed to output.</p><h4>Updated version</h4><p>Thanks to Oleg (one of the commentators) for pointing out on how to print using Zebra S4M connected either via USB or network.</p><p>The solution is pretty simple, all you have to do is do not install Zebra S4M as a Zebra S4M (sounds weird, I know), instead, just install it as a local raw printer (Linux) or generic text printer (Windows).</p><p>For CUPS user in Linux, this is the example for the correct configurations:</p><pre>/etc/cups/printers.conf<br><br>&lt;Printer Zebra&gt;<br>  Info<br>  Location<br>  DeviceURI socket://10.1.1.5:9100<br>  State Idle<br>  StateTime 1223445299<br>  Accepting Yes<br>  Shared Yes<br>  JobSheets none none<br>  QuotaPeriod 0<br>  PageLimit 0<br>  KLimit 0<br>  OpPolicy default<br>  ErrorPolicy stop-printer<br>  Option orientation-requested 3<br>&lt;/Printer&gt;</pre><p>You can always add the printer using the web interface, just make sure you choose RAW as the Make/Manufacturer and Model/Driver.</p><p>Test this Java code, it should print out a barcode:</p><pre>import javax.print.Doc;<br>import javax.print.DocFlavor;<br>import javax.print.DocPrintJob;<br>import javax.print.PrintException;<br>import javax.print.PrintService;<br>import javax.print.PrintServiceLookup;<br>import javax.print.SimpleDoc;<br>import javax.print.attribute.PrintServiceAttribute;<br>import javax.print.attribute.standard.PrinterName;<br><br>public class SimplePrint {<br><br>   public static void main(String[] args) {<br><br>       try {<br><br>           PrintService psZebra = null;<br>           String sPrinterName = null;<br>           PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);<br><br>           for (int i = 0; i &lt; services.length; i++) {<br><br>               PrintServiceAttribute attr = services[i].getAttribute(PrinterName.class);<br>               sPrinterName = ((PrinterName) attr).getValue();<br><br>               if (sPrinterName.toLowerCase().indexOf(&quot;zebra&quot;) &gt;= 0) {<br>                   psZebra = services[i];<br>                   break;<br>               }<br>           }<br><br>           if (psZebra == null) {<br>               System.out.println(&quot;Zebra printer is not found.&quot;);<br>               return;<br>           }<br>           DocPrintJob job = psZebra.createPrintJob();<br><br>           String s = &quot;^XA^FO100,40^BY3^B3,,30^FD123ABC^XZ&quot;;<br><br>           byte[] by = s.getBytes();<br>           DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;<br>           Doc doc = new SimpleDoc(by, flavor, null);<br>           job.print(doc, null);<br><br>       } catch (PrintException e) {<br>           e.printStackTrace();<br>       }<br>   }<br>}</pre><p>Print using FTP:</p><pre>import java.io.FileInputStream;<br>import org.apache.commons.net.ftp.FTP;<br>import org.apache.commons.net.ftp.FTPClient;<br><br>public class FtpPrint {<br><br>   public static void main(String[] args) {<br><br>       try {<br><br>           FTPClient f = new FTPClient();<br><br>           f.connect(&quot;10.1.127.3&quot;);<br>           f.login(&quot;anonymous&quot;, &quot;&quot;);<br>           f.setFileType(FTP.ASCII_FILE_TYPE);<br><br>           FileInputStream in = new FileInputStream(&quot;/path/to/file&quot;);<br>           if (f.storeFile(&quot;filename&quot;, in)) {<br>               System.out.println(&quot;Upload ok&quot;);<br>           }<br><br>           f.logout();<br>           f.disconnect();<br><br>       } catch (Exception e) {<br>           e.printStackTrace();<br>       }<br>   }<br>}</pre><p>Print using socket:</p><pre>import java.io.DataOutputStream;<br>import java.net.Socket;<br><br>public class SocketPrint {<br><br>   public static void main(String argv[]) throws Exception {<br><br>       for (int i = 0; i &amp;lt; 10; i++) {<br>           Socket clientSocket = new Socket(&quot;10.1.127.3&quot;, 9100);<br>           DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream());<br>           outToServer.writeBytes(&quot;^XA^FO100,40^BY3^B3,,30^FD123ABC^XZ&quot;);<br>           clientSocket.close();<br>       }<br>   }<br>}</pre><p>(I got it from <a href="https://support.zebra.com/">Zebra’s website</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afab5acf6fb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automatically Sign JARs Using Ant and Bash]]></title>
            <link>https://amree.medium.com/automatically-sign-jars-using-ant-and-bash-65430e4830b0?source=rss-5932e35135f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/65430e4830b0</guid>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Amree Zaid]]></dc:creator>
            <pubDate>Mon, 14 Apr 2008 00:00:04 GMT</pubDate>
            <atom:updated>2024-09-24T13:19:44.437Z</atom:updated>
            <content:encoded><![CDATA[<p>This guide is more towards Netbeans project, but it can be used as a reference for you to customize the script to suit your needs.</p><pre>#!/bin/bash<br># signer.bash<br>find . -name &quot;*.jar&quot; -exec jarsigner -keystore /path/to/your/key -storepass yourpassword &#39;{}&#39; yourkeystorename \;<br>echo &#39;JARs signed&#39;;<br>exit 0</pre><p>This script <strong>will search all files ending with .jar</strong> from the current directory recursively and <strong>then sign it</strong>. This means, it can be used separately without ant script. Just make it executable and run it.</p><p>Put this in the last line of your build.xml but it must before the closing tag of the &quot;project&quot; ( build.xml can be found in your main project directory)</p><pre>&lt;!-- build.xml --&gt;<br>&lt;project&gt;<br>  .<br>  .<br>  .<br>  &lt;target name=&quot;-post-jar&quot;&gt;<br>    &lt;exec dir=&quot;${dist.dir}&quot; executable=&quot;/path/to/your/signer.bash&quot; os=&quot;Linux&quot; /&gt;<br>  &lt;/target&gt;<br>&lt;/project&gt;</pre><p>This script will basically sign the jars after all the jars has been build. Please note that it’d better if you set all the path using absolute path.</p><p>After this, you just have to use <strong>Clean and Build</strong> to generate the jars and also automatically sign it. This script will also sign all of your included libraries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65430e4830b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>