<?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 Ibrahim Tareq on Medium]]></title>
        <description><![CDATA[Stories by Ibrahim Tareq on Medium]]></description>
        <link>https://medium.com/@ibrahimtareq?source=rss-69cbd8c3eb16------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*o87p79Xc7xptmjecM081ow.jpeg</url>
            <title>Stories by Ibrahim Tareq on Medium</title>
            <link>https://medium.com/@ibrahimtareq?source=rss-69cbd8c3eb16------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 08:42:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ibrahimtareq/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[AWS Fundamentals — Part I]]></title>
            <link>https://medium.com/@ibrahimtareq/aws-fundamentals-part-i-2d8006534c48?source=rss-69cbd8c3eb16------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d8006534c48</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-iam]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[ec2]]></category>
            <dc:creator><![CDATA[Ibrahim Tareq]]></dc:creator>
            <pubDate>Sun, 06 Jan 2019 22:54:38 GMT</pubDate>
            <atom:updated>2019-01-07T22:37:11.840Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kLxGwQM5jEi8qGapSqcIxA.png" /></figure><h3>AWS Fundamentals — Part I</h3><p>AWS is a cloud platform offering compute power, data storage, and a wide array of other solutions for modern organizations. Elastic Compute Cloud (more commonly known as EC2) one of the most powerful services offered by AWS was also one of the first released in 2006. It has since released hundreds of other services, some of them bleed into each other while many of them also have a lot of variety within them. It has grown into one of the most popular cloud platforms currently available. Due to vast variety of services, it can be quite challenging to understand what the true power of AWS is. And so, I decided to write a series of blog posts explaining the main services in enough detail to capture the essence but not get overwhelmed with the depth of information. In this blog post, I’ll be covering AWS regions, IAM and EC2.</p><h3><strong>AWS Regions</strong></h3><p>AWS has regions all around the world. For instance, us-east-1 is the name of one of its regions in the United States. Each region has availability zones, for example, us-east-<strong>1a </strong>and us-east-<strong>1b</strong>. Each availability zone is a physical data centre in the region but separate from the other ones so that they’re isolated from failures and disasters. By deploying your application across multiple availability zones, you’re prepared for unexpected outages. So, if there was ever an outage with a particular availability zone, AWS can assure you that your application will stay online. AWS Consoles are region scoped (except IAM, S3 &amp; Route53) and what this means is when you make a change in a service, the change will take place in the respective region. To find out if a service is available in a particular regions see <a href="http://aws.amazon.com/about-aws/globalinfrastructure/regional-product-services/">http://aws.amazon.com/about-aws/globalinfrastructure/regional-product-services/</a>. It’s generally a good idea to deploy your application closest to you. For example, if you are based in Melbourne it would be best to use the AU region. Other things to keep in mind are legal requirements and costs as not all the regions are priced the same.</p><h3><strong>IAM</strong></h3><p>IAM (Identity and Access Management) is the hub of your AWS security. It consists of users, groups and roles. In simple terms, users are the end users of the services, a group is a bunch of users with the same policies and a role is a pre-set of policies for service(s). Keep in mind, you can assign roles to services NOT to user(s). Some of the key features of IAM are:</p><p>§ Granular permissions<br>Using this you are able to grant the permissions for different users according to their resources. For instance, the TSS team will have full access to Amazon EC2 and the other services whereas the rest of the team will only have access to Amazon EC2. It’s considered good practice to give users the minimal amount of permissions required to perform their job.</p><p>§ Secured access to AWS sources<br>IAM will be used to secure all the login credentials which can successfully on the EC2 instances. Permissions can also be granted to users to access your application.</p><p>§ Identity information for assurance<br>Actions taken by a user, role or AWS service are recorded by an AWS service called CloudTrail. These log records can be used for risk-auditing and governance purposes.</p><p>IAM is at the centre of AWS and every AWS service is going to be depending on IAM for security and access control.</p><h3><strong>EC2</strong></h3><p>EC2 (Elastic Cloud Compute) is one of most popular and powerful of AWS offering. It mainly consists in the capability of:</p><p>§ Renting virtual machines (<a href="https://aws.amazon.com/ec2/">EC2</a>)<br>§ Storing data on virtual drives (<a href="https://aws.amazon.com/ebs/">EBS</a>)<br>§ Distributing load across machines (<a href="https://aws.amazon.com/elasticloadbalancing/">ELB</a>)<br>§ Scaling the services using an auto-scaling group (<a href="https://aws.amazon.com/autoscaling/">ASG</a>)</p><p>EC2 aims to make a developer’s life easy by eliminating the need to invest in hardware up and by providing secure, re-sizable compute capacity in the cloud. It provides users with the opportunity to choose among several variations of OS, RAMs and CPUs.</p><p>Some of the features include:</p><p>§ Simple to scale up or down<br>§ Easy to integrate with other services<br>§ Pay only for how much you use (billed by the second, with a minimum 60 seconds)</p><p>Understanding EC2 and how it works is crucial to understanding how the Cloud works. I won’t be diving deeper on how EC2 works as I’d like to keep the topic simple and lean. Here’s a <a href="https://www.youtube.com/watch?v=lZMkgOMYYIg">helpful tutorial</a> on how EC2 works that I’ve used multiple times in the past. Let’s now focus on two concepts that are crucial to the working of an EC2 instance.</p><h3><strong>Security Groups</strong></h3><p>Security Groups are the fundamentals of network security in AWS. Think of security groups as a “firewall” on the EC2 instances. They regulate access to ports and control inbound network and outbound network traffic to and from our EC2 instances. For instance, if you would like to accept all incoming traffic from your server on port 80 then you can create a security group for that. This security can then be attached to multiple instances. By default, all inbound traffic is blocked, and all outbound traffic is authorised by default. A security group is decoupled from your EC2 instance meaning if traffic is blocked, then the EC2 instance won’t see it. A hot tip — if your application is not accessible and is throwing a time-out error, then it’s definitely a security group issue.</p><h3><strong>Private vs Public vs Elastic IPs</strong></h3><p>Private IP means the EC2 instance can only be identified on a private network. The IP must be unique across the private network. However, two different private networks (aka two different organisations) can have the same IPs. EC2 instances on a private IP can connect to the internet using an internet gateway aka a proxy.</p><p>Public IP means the EC2 instance can be identified on the internet. It must be unique across the whole web meaning no two EC2 instances can have the same public IP. A Public IP is attached to the EC2 instance automatically upon creation from the AWS’s pool of IP addresses. When you stop the instance, the IP would be returned to the pool and when the instance is restarted, a random IP will be allotted to the instance.</p><p>If you need to have a static public IP for your instance, you need an Elastic IP. An Elastic IP is a public IP you own as long as you don’t delete it. You can attach it to one instance at a time and it will remain the same even if you restart the instance. With an Elastic IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account. By default, all AWS account can only have 5 Elastic IPs.</p><p>That’s all I have for you for now. To recap, we’ve covered AWS regions and one of the most renowned AWS services — EC2 and understood what it is. We’ve touched on security groups and discussed the differences between the various IP types and when you might need an Elastic IP. AWS currently has a lot of services to offer and for a beginner, it can be a daunting task to get started. I hope this blog post has helped you understand at least a few of the concepts if not all. Stay tuned for part 2 of the series where I’ll be covering load balancing, auto-scaling groups and EBS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d8006534c48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Origins]]></title>
            <link>https://medium.com/@ibrahimtareq/javascript-origins-f6a0bf7f3414?source=rss-69cbd8c3eb16------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6a0bf7f3414</guid>
            <category><![CDATA[e]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Ibrahim Tareq]]></dc:creator>
            <pubDate>Mon, 25 Jun 2018 06:04:08 GMT</pubDate>
            <atom:updated>2018-06-25T06:04:08.487Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*9LNlhPXnxkZrIYv9svSHxg.png" /><figcaption><a href="https://code.tutsplus.com/articles/Object-Oriented-Programming-JavaScript--cms-29256">https://code.tutsplus.com/articles/Object-Oriented-Programming-JavaScript--cms-29256</a></figcaption></figure><p>Fun fact: JavaScript, the unchallenged king of the client, was written in 10 days by a single programmer. Of course, it did not have all the features of the JavaScript that we know and love today (you do love it, don’t you?).</p><p>JavaScript is now being used by over <a href="https://insights.stackoverflow.com/survey/2018#technologies-and-occupations">69% of developers</a> and <a href="https://w3techs.com/technologies/details/cp-javascript/all/all">94% of all websites</a> use it to build out their dynamic application logic. It’s come a long way since its inception in the mid-90s but let’s talk about how it all started off.</p><h4><strong>A quick walk down memory lane</strong></h4><p>The year was 1995. Batman Forever was in theatres, eBay had just started their online shopping website and Netscape was the most popular browser. This was during the time of the browser wars which was between Netscape’s Netscape Navigator and Microsoft’s Internet Explorer. Java was a lot more popular back then. It was the rich client application model of those days where you could create applets and have rich client experience with the browser.</p><p>Netscape’s goal at that time was to bring in a scripting language that was basic enough for designers and amateurs to use and Java wasn’t the answer as it was considered a ‘professional’ language for advanced developers. That’s when Netscape decided to hire Brenden Eich who was tasked with writing a scripting language for Netscape Navigator. It took Brenden 10 days (and 10 sleepless nights) to write the first iteration of JavaScript which was called Mocha. This name was short-lived and was soon changed to LiveScript. It wasn’t long before LiveScript was changed to its final name — JavaScript. Even though, JavaScript has almost zero resemblance with Java, it was given this name as a marketing ploy as Java was gaining a lot of momentum back then.</p><h4><strong>ES what now?</strong></h4><p>Now if you’ve been using JavaScript for a few years, you’ve surely come across the term ES5, ES6.. ESX. People say it is a version or standard of JavaScript but what the heck do they mean by that? To clarify this, let’s go back to the 90s.</p><p>Microsoft was busy working on Internet Explorer and since JavaScript did not conform to any standards, they came up with their implementation and called it JScript. This lead to a major issue. Different implementations meant that a website built using Microsoft’s JScript would not work in Netscape Navigator and vice versa. To resolve this issue, Netscape submitted JavaScript to ECMA International for standardization. ECMA International is an organization that is responsible for creating standards for technologies. The initial standardized product was called ECMAScript or ES1 and that’s how the ES-naming started. Every time you see ES followed by a number, it is referencing an edition of ECMAScript.</p><p>Put simply, ECMAScript is a specification for what a scripting language could look like. Think of it as a blueprint or concept of some sort. JavaScript is the actual implementation of that blueprint.</p><h4><strong>Conclusion</strong></h4><p>JavaScript has quite a fascinating history and even though it’s considered to be one of the most disliked languages in the tech world, it has evolved substantially over the last decade. Some of the most widely-used frameworks are built using JavaScript such as React and Node.js. and with more and more tech giants (eg: <a href="https://github.com/facebook/react/wiki/Sites-Using-React">Atlassian, Facebook, Uber</a>, <a href="http://www.tothenew.com/blog/how-are-10-global-companies-using-node-js-in-production/">Netflix, eBay</a>) adopting these technologies every day, I doubt we’ll see JavaScript drop in popularity anytime soon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6a0bf7f3414" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Train an image classifier using TensorFlow]]></title>
            <link>https://medium.com/@ibrahimtareq/train-an-image-classifier-using-tensorflow-11c1bede3747?source=rss-69cbd8c3eb16------2</link>
            <guid isPermaLink="false">https://medium.com/p/11c1bede3747</guid>
            <category><![CDATA[google]]></category>
            <category><![CDATA[image-recognition]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Ibrahim Tareq]]></dc:creator>
            <pubDate>Mon, 14 May 2018 04:30:27 GMT</pubDate>
            <atom:updated>2018-05-14T04:44:21.456Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i384H_6SMsFYMMH4aPrZfw.jpeg" /></figure><p>You may have stumbled across a video of the Google assistant placing a call to a hair salon and having an unnaturally natural conversation with the receptionist. If you haven’t, take a look:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FpKVppdt_-B4%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpKVppdt_-B4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FpKVppdt_-B4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5e60af3e071a660a00c3623f237b4d71/href">https://medium.com/media/5e60af3e071a660a00c3623f237b4d71/href</a></iframe><p>Notice how it dropped in a super casual “mmhmmm” early in the conversation. Sounds eerie, doesn’t it?</p><p>The technology that enabled this jaw-dropping new capability is called Google Duplex. It really feels like next-level AI stuff so let’s take a sneak-peek at what’s happening behind the scenes.</p><p>Google Duplex employs a machine learning platform called TensorFlow extended. What the heck is TensorFlow? TensorFlow is an open source framework that was released by Google. It makes it easier for developers to design, build, and train deep learning models. Simply put, deep learning is an approach to machine learning where it facilitates in the learning process of the machine. Deep learning imitates the function of the brain; to be specific, it mimics the neural system. Sounds super cool, doesn’t it?</p><p>Well, over the weekend, I built myself an image classifier using the same technology that Google Duplex uses and I’d like to show you guys how it’s done so we can all have a better understanding of how machine learning actually works and ofcourse to feel cool.</p><p>Before we jump right in, let’s understand what we’re actually going to create. We’re going to train a simple classifier to classify image of any breed of cat (yes, any) with insanely high probabilities but for the sake of making this tutorial simple, we’ll be using selected breeds. To keep it short and sweet, we’ll be using use a model that is already trained on the <a href="http://image-net.org/">ImageNet</a> Large Visual Recognition Challenge <a href="http://www.image-net.org/challenges/LSVRC/2012/">dataset</a> and some pre-written scripts courtesy of the awesome developers at Google.</p><h3>Step 1 — Install Python</h3><ul><li>For Windows, choose either <a href="https://www.python.org/downloads/release/python-352/">Python 3.5.x 64-bit</a> or <a href="https://www.python.org/downloads/release/python-362/">Python 3.6.x 64-bit</a></li><li>For MacOS, choose either <a href="https://www.python.org/downloads/">Python 2.7.x</a> or <a href="https://www.python.org/downloads/release/python-362/">Python 3.6.x</a></li></ul><h3>Step 2 — Install TensorFlow</h3><p>Fire up the command line and run the command:</p><ul><li>For Windows — pip3 install --upgrade tensorflow</li><li>For MacOS — pip install tensorflow</li></ul><p>If that didn’t work, reference the installation page <a href="https://www.tensorflow.org/install">here</a>.</p><h3>Step 3 — Clone the repository</h3><p>All the code used is contained in this git repository. Clone the repository and cd into it. This is where we will be working.</p><pre>git clone https://github.com/IbrahimTareq/tensorflow-for-poets-2.git<br>cd tensorflow-for-poets-2</pre><h3>Step 5 — Add the training data</h3><p>Before you start any training, you’ll need a set of images to teach the model about the new classes you want to recognize. I’ve created an archive of photos of different breeds of cats to use. You can download it from <a href="https://www.dropbox.com/sh/48x1s8bqslmmsd4/AAC9m_RLqxgqTDvME39gVoF7a?dl=0">here</a>. Once downloaded, extract it and copy-paste the folder inside the tf_files folder. You can create and add your own collection, just make sure they are separated by folders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*sSEeWXaNSU_hB1XzEVw1HA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*IYa_vj7D9CAYEC9WYRpqSQ.png" /><figcaption>Your images (training data) will be inside each folder</figcaption></figure><h3>Step 6 — Run the training</h3><p>First, we’re going to add some configuration changes to the network and then we’re going to run the training script. Fire up the command line <strong>from the root directory of your project</strong> and run the commands:</p><p>For Windows:</p><pre>set IMAGE_SIZE=224<br>set ARCHITECTURE=”mobilenet_0.50_%IMAGE_SIZE%”</pre><p>And then:</p><pre>python -m scripts.retrain --bottleneck_dir=tf_files/bottlenecks --model_dir=tf_files/models/&quot;%ARCHITECTURE%&quot; --summaries_dir=tf_files/training_summaries/&quot;%ARCHITECTURE%&quot; --output_graph=tf_files/retrained_graph.pb --output_labels=tf_files/retrained_labels.txt --architecture=&quot;%ARCHITECTURE%&quot; --image_dir=tf_files/<strong>xyz</strong></pre><p>Replace the <strong>xyz</strong> with the name of the training images data folder.</p><p>For MacOS:</p><pre>IMAGE_SIZE=224<br>ARCHITECTURE=&quot;mobilenet_0.50_${IMAGE_SIZE}&quot;</pre><p>And then:</p><pre>python -m scripts.retrain \<br> --bottleneck_dir=tf_files/bottlenecks \<br> --model_dir=tf_files/models/”${ARCHITECTURE}” \<br> --summaries_dir=tf_files/training_summaries/”${ARCHITECTURE}” \<br> --output_graph=tf_files/retrained_graph.pb \<br> --output_labels=tf_files/retrained_labels.txt \<br> --architecture=”${ARCHITECTURE}” \<br> --image_dir=tf_files/<strong>xyz</strong></pre><p>Replace the <strong>xyz</strong> with the name of the training images data folder.</p><p>Bear in my mind that this step will take a while. The script will download the pre-trained model, adds a new final layer, and trains that layer on the photos you’ve added.</p><h3>Step 7 — Using the re-trained model</h3><p>Once the training is complete, we can test it out to see how well it performs. Download a photo of a cat and save it on your desktop. Run the following command <strong>from the root directory of your project</strong> to find out what breed the cat belongs to:</p><p>For Windows:</p><pre>python -m scripts.label_image --graph=tf_files/retrained_graph.pb --image=<strong>PATH_TO_IMAGE</strong></pre><p>For MacOS:</p><pre>python -m scripts.label_image \    --graph=tf_files/retrained_graph.pb  \    --<br>image=<strong>PATH_TO_IMAGE</strong></pre><p>Replace <strong>PATH_TO_IMAGE</strong> with the name of the image you downloaded. For me, this was <strong>C:\Users\IbrahimTareq\Desktop\cat.jpg</strong></p><h3>Step 8 — Results</h3><p>These are some of the pictures I used along with the results spat out by the image classifier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XN6QHCB3KKuymfyXCaVRrA.jpeg" /><figcaption>Test Run 1 — Bengal Cat</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*9pPlyOtWP7_nENUf7Ma-Ew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*JUgb4iQzAe-xL_YoQxHcsQ.jpeg" /><figcaption>Test Run 2 — Persian Cat</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*x_9I70002z3ndMlNsrwaPw.png" /></figure><h3>Wrapping Up</h3><p>Well done — you’ve managed to build an image classifier, and all it took was some reading and the installation of a few dependencies. You can take a look at the code over <a href="https://github.com/googlecodelabs/tensorflow-for-poets-2">here</a>. Play around with it and perhaps, you can try and build something awesome as a side-project. Thanks for reading!</p><p><em>I hope you enjoyed reading this and learnt something new.</em> <em>If you liked it, hit the</em> <strong>clap</strong> <em>below so other people will see this here on Medium.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11c1bede3747" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What everyone ought to know about Meteor.js]]></title>
            <link>https://medium.com/@ibrahimtareq/what-everyone-ought-to-know-about-meteor-js-4915c2be2d0b?source=rss-69cbd8c3eb16------2</link>
            <guid isPermaLink="false">https://medium.com/p/4915c2be2d0b</guid>
            <category><![CDATA[javascript-frameworks]]></category>
            <category><![CDATA[isomorphic]]></category>
            <category><![CDATA[meteor]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Ibrahim Tareq]]></dc:creator>
            <pubDate>Fri, 11 May 2018 05:13:07 GMT</pubDate>
            <atom:updated>2018-05-11T05:13:07.724Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*PDKTlhO8JrUci9XpAatT1A.jpeg" /></figure><p>Choosing an apt JavaScript framework is one of the vital steps towards making your web project a success. Whether you are working on a small project or a large one, whether you are working solo or in a team, each of these details plays a critical role in determining which framework is best-suited for your project. A great many people I met haven’t heard of Meteor and majority of those who have aren’t completely convinced at how powerful it is. This was surprising to me since it’s a 6-year old framework and it is quite widely used (<a href="https://github.com/search?l=JavaScript&amp;p=2&amp;q=stars%3A%3E1&amp;s=stars&amp;type=Repositories">16th most starred Javascript repository on Github</a>). I thought it would be a good idea to share my thoughts on the topic and to take a closer look at why so many developers are looking to this full-stack, MVC-style framework for fast development of responsive, real-time applications.</p><h3>Meteor Basics</h3><p>I first encountered Meteor during an internship in my last year of university. The team had decided to use it over Rails to build our web app MVP and I did not have the slightest clue what Meteor was until our Tech head gave me a demo. I was blown away by the capabilities of this framework and the number of things that can be achieved in such a short time span. The simplest way to put it is Meteor is basically a full stack JavaScript development platform for the modern web and mobile applications development. Yes, you read that right. You can develop mobile applications with it as well. Before Meteor what once took weeks, even with the best tools now takes hours with it. This is subjective to the size of the project, but the point is that development with Meteor is pretty fast. One of the key features of the framework is that it lets you develop isomorphic JavaScript apps. For my non-technical friends, isomorphic Javascript apps are Javascript applications that can run on both client side and server side. The backend and the frontend share the same code, so it becomes to see results in real time. We’ll talk more about its core characteristics in a bit.</p><h3>MEAN vs Meteor</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/0*ByrjWZbfqMJdczNc." /></figure><p>The <a href="http://mean.io/">MEAN</a> stack is just <strong>M</strong>ongoDB, <strong>E</strong>xpress, <strong>A</strong>ngular and <strong>N</strong>ode.js bundled together, but there’s not much that is seamless about it. For starters, you need to install all the technologies separately and do all the wiring-up yourself between MongoDB and Node.js, between Express and Angular just to get a basic web app going. Alternatively, you can install a single framework i.e. Meteor. The frontend and backend data updates seamlessly and automatically without refreshing the page in Meteor. It’s worth mentioning that it strongly focuses on ease of use and one could easily learn the basics in a couple of hours. On the other hand, it is difficult to understand MEAN as it requires multiple pieces of which you will need to get used to (I’m looking at you Angular.js). That being said, MEAN stack is comparatively more flexible because the developer has to put all the technology together, so she/he can decide which technology to use. You can also swap technologies in Meteor as well, although it might take some extra time and effort and so it is more suited but not restricted to fast creation of small real-time applications.</p><h3>Jewels in the Crown</h3><h3>Reactivity</h3><p>Let’s start by talking about the key idea that encircles the Meteor.js platform — Reactivity. What does it mean that the app is reactive? It means that every change of data in the database is instantly mirrored by a change happening on the user’s screen, with no refresh needed. Let’s say that our application displays a list of posts. When a new post is added into the database, the list is automatically repopulated with the new post included. So, all active users see the data changes simultaneously, even if there are thousands of them, it is happening live. This makes Meteor a perfect use-case for real-time collaboration. Pretty cool eh?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fz9MjiPcGPUufS%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fz9MjiPcGPUufS%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fz9MjiPcGPUufS%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="331" frameborder="0" scrolling="no"><a href="https://medium.com/media/2e53f39807d3e44112925841b5ffd527/href">https://medium.com/media/2e53f39807d3e44112925841b5ffd527/href</a></iframe><h3>Javascript for the win</h3><p>Another nifty feature of the framework is that it allows developers to develop with just one language. Every developer knows how frustrating it is to spend time thinking about what to use for the front-end, the back-end, and the database. Meteor simplifies this process by allowing you to build and manage the stack in nothing but Javascript. Aside from rapid development, JS on the server and client has other benefits — like less <a href="https://en.wikipedia.org/wiki/Context_switch">context switching</a>.</p><h3>Smart packages</h3><p>Every major website requires authentication so say you want to create a user accounts system within a Meteor project. How would you go about that? If your initial thought was, “Well, I’d start off by creating a collection for the user’s data,” then you’re already thinking too hard.</p><p>In Meteor, this is how we create an accounts system:</p><pre>meteor add accounts-password</pre><p>But what if we wanted to let users sign up with their Google account? Then we could write:</p><pre>meteor add accounts-google</pre><p>Or, Facebook:</p><pre>meteor add accounts-facebook</pre><p>Think of how much time you can save by avoiding the exhausting authentication creation process and by using those smart packages instead.</p><h3>Creating mobile applications</h3><p>I believe this is one of those nice-to-have features as there are definitely better frameworks out there to serve this purpose but it might be handy for someone who wants to build a web and a mobile app simultaneously. Meteor makes it simple to turn your web app into a smartphone app with Cordova. Cordova is a platform to build native smartphone applications using HTML, CSS, and JavaScript. It has a set of APIs that allow you to access native device functions, like the camera, with JavaScript. And the best part is that Meteor comes out of the box with Cordova.</p><h3>Active and Supportive community</h3><p>Let’s be honest, the size of a developer community certainly counts. It’s one of the first things I look into when choosing a framework as it contributes to a thriving open source environment, and makes it easier to find help on Stack Overflow. Meteor’s ecosystem is thriving, and its community is already one of its greatest assets. It’s <a href="https://www.youtube.com/user/MeteorVideos">YouTube channel</a> has heaps of tutorials and has a range of talks from Meteor meetups. There is also a large, and constantly growing in-person community. There are Meteor Meetups in over 75 countries around the world, and in 217 cities. Odds are there is a Meteor Meetup being hosted near you!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3ohs4fCJZNyUTABSNi%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3ohs4fCJZNyUTABSNi%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3ohs4fCJZNyUTABSNi%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="217" frameborder="0" scrolling="no"><a href="https://medium.com/media/737620990d3b7529f9afefc232d6eb37/href">https://medium.com/media/737620990d3b7529f9afefc232d6eb37/href</a></iframe><h3>Criticism</h3><p>Like every technology choice, it’s not about what’s “hot,” but more about identifying trade-offs and finding the tool for the problem at hand. There is no one-size-fits-all with frameworks. One of the criticisms of Meteor was that you’re stuck with MongoDB and this is a totally valid as not everyone is a fan of it. The good news is Meteor Development Group has been working on a big project called <a href="https://www.apollographql.com/">Apollo</a>. This is a new and better solution for transporting data between your client app and the backend services it depends on. What does this mean? It means you are not stuck with mongoDB anymore. Matter of fact, Apollo is service agnostic. It will work with any backend service — whether it’s a REST API, or even a SQL database.</p><p>A lot of people complain about Meteor having scaling issues. This is not necessarily true. Scaling a meteor application can be difficult if you have a ton of collections that are all real time and you are having to deal with all these real-time collections, you’re not using indexes and essentially, you’re not writing good code. However, if you follow best practices, a meteor app is just about as scalable as anything else.</p><p>Testing was something that Meteorites (what the Meteor users like to call themselves) were not happy about especially when compared to other JS frameworks. It has improved a lot over the past years and now it’s got its own testing tool called Velocity. In addition to its core functions, Velocity enables integration with Mocha or Jasmine syntax. There’s also an IDE called Webstorm which supports both client and server-side debugging.</p><h3>Conclusion</h3><p>It’s obvious that Meteor is not the right tool for every job. But is there any? Every tool has to meet a specific engineering requirement for the app. Most often, they’re striking a balance between speed of development and flexibility. And even if it’s not perfect, it’s community-based, open source and definitely worth giving a shot. It will be interesting to see how long Meteor will continue to exist in its current state as it continues to move closer and closer to a grouping of various packages that work together to produce something that is easy to produce sites. I hope my thoughts and views on one of the most interesting Javascript frameworks will encourage you to try Meteor in the real world, which will hopefully make it clear what it actually is.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4915c2be2d0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a Slackbot in under 10 minutes using Node.js]]></title>
            <link>https://medium.com/@ibrahimtareq/create-a-slackbot-in-under-10-minutes-using-node-js-7db0edfaa1fa?source=rss-69cbd8c3eb16------2</link>
            <guid isPermaLink="false">https://medium.com/p/7db0edfaa1fa</guid>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[slackbot]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Ibrahim Tareq]]></dc:creator>
            <pubDate>Fri, 04 May 2018 01:17:38 GMT</pubDate>
            <atom:updated>2018-05-13T03:20:36.135Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GUzExY_rdzsppKwaA1wcnw.jpeg" /></figure><p>Chatbots — they’re cool, fun and useful virtual assistants to have. In this tutorial, we’ll build a basic ChatBot that can reply to queries via Slack. We’ll be running this on our local machine and to make it even simpler, we’ll be leveraging an awesome tool called <a href="https://botkit.ai/">Botkit</a> which will do most of the heavy-lifting for us.</p><h3>Prerequisites</h3><ul><li><a href="https://nodejs.org/en/">Node</a></li><li>Slack App</li><li>10 Minutes</li></ul><h3>Setting Up</h3><p>Create an empty folder for your project, let’s name it testApp.</p><p>Run the code — <strong>npm init -y</strong><br> This command quickly generates a package.json file.</p><p>Once that’s created, run the following commands — <strong>npm install dotenv<br> </strong>and<strong> npm install botkit<br> </strong>The first package adds support for environmental variables in your Node project and the second package adds the botkit tool to your project.</p><h3>Adding Bots to Slack app</h3><ul><li><a href="https://slack.com/signin">Sign in</a> to your workspace</li><li>Once signed in, you need to go the App manager screen. This can be found at <a href="https://xyz.slack.com/apps/manage">https://xyz.slack.com/apps/manage</a> (Replace xyz with the name of your workspace)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zd4l9s06VGz90deb.png" /></figure><ul><li>Now click on App Directory at the very top and in the search bar that appears, search for “Bots”</li><li>Select the first one that says “Connect a bot to the Slack Real Time Messaging API”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ITdA_GNg4UTIJrhR.png" /></figure><ul><li>Click on the “Add configuration” button</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F-bvLkLbAKY3JrnI.png" /></figure><ul><li>Once you’ve named your bot, you should be redirected to a page that displays an API Token</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sk1m_BInj_3qjlpx.png" /></figure><ul><li>Make note of this API token as we’ll be using this in the next section</li></ul><h3>Coding the SlackBot</h3><p>Create a .env file inside the “testApp” folder created earlier, open it up in your editor and add your API token in it. My file looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/0*CiPTJFWsvMWNOjHs.png" /></figure><p>Create an index.js file inside the same folder and open it up in your editor. Write down the following code. I’ve commented it so you can understand what’s going on with each line:</p><pre>// Add support for environmental variables<br>require(&#39;dotenv/config&#39;);</pre><pre>// Import botkit package<br>var Botkit = require(&#39;botkit&#39;);</pre><pre>// Create a controller for the Slackbot<br>var controller = Botkit.slackbot({<br>  debug: false<br>});</pre><pre>// Use the token to connect the bot to your Slack app<br>controller.spawn({<br>  token: process.env.TOKEN<br>}).startRTM();</pre><pre>// Determine behaviour of the Slackbot<br>controller.hears([&#39;hello&#39;, &#39;hi&#39;], [&#39;ambient&#39;, &#39;direct_mention&#39;, &#39;mention&#39;], function (bot, message) {<br>  bot.reply(message, &quot;Hello.&quot;);<br>});</pre><p>Let’s try and decode the last bit of code. FYI, this is where all the magic happens. We’ll breakdown the function <em>hears</em> into 3 parts:</p><ul><li>Trigger: [‘hello’, ‘hi’]</li><li>Context: [‘ambient’, ‘direct_mention’, ‘mention’]</li><li>Callback — What is the bot supposed to do?</li></ul><p>The triggers aren’t exact matches, so if the combination of letters occurs, the bot will fire the function. You can use regex if you’d like exact matches.</p><p>The context basically means where the bot heard the message. Was the bot mentioned or did someone send the message in a channel? The list of options to choose from are:</p><ul><li><strong>ambient</strong>: message came from a channel</li><li><strong>direct_mention</strong>: the bot was mentioned in the message (@bot)</li><li><strong>mention</strong>: the bot was mentioned by name</li><li><strong>direct_message</strong>: message received directly via private chat</li></ul><p>Are you excited to see your Slackbot in action? Let’s find out together.</p><h3>Lights, camera, Slackbot</h3><p>If everything went well, you should see it online in the sidebar under Apps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*hlY0OYz8tA9zC-8c.png" /></figure><p>Bots are shy, so you need to invite them your channel. Try inviting your bot to the general channel with the /invite command in Slack. In my case I had to write: /invite @robobot</p><p>Now fire up your command line and run the node app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/0*H9WjZ_iE0dELsvfs.png" /></figure><p>Let’s send a “Hi” message in the general channel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DDXP_ysPNRaok9PC.png" /></figure><h3>Conclusion</h3><p>Well done — you’ve successfully built a Slackbot that’s capable of replying to certain trigger words. Now you can add more complex logic to the bot and get it to do much more than just saying Hello. The possibilities are endless. Thank you for reading!</p><h3>Get the code</h3><p>All the code for this tutorial is available in the <a href="https://github.com/messagemedia/slackbot-nodejs-tutorial">Slack Node.js Tutorial Github repo</a></p><h3>Resources</h3><ul><li><a href="https://github.com/howdyai/botkit">Botkit Github repo</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7db0edfaa1fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Lambda — Serverless Superhero]]></title>
            <link>https://medium.com/@ibrahimtareq/aws-lambda-serverless-superhero-918e07a4e986?source=rss-69cbd8c3eb16------2</link>
            <guid isPermaLink="false">https://medium.com/p/918e07a4e986</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[event-driven-systems]]></category>
            <dc:creator><![CDATA[Ibrahim Tareq]]></dc:creator>
            <pubDate>Tue, 01 May 2018 01:57:50 GMT</pubDate>
            <atom:updated>2018-05-11T05:14:53.701Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h-t6p69BsK65qCat9Gjcaw.jpeg" /></figure><p>Serverless computing is a topic that has been brewing quite a lot of buzz in the industry. But something extraordinary happened when Serverless computing met Event-driven computing. It led to the birth of Lambda. Now wait a second. What are all these buzzwords? What the heck do they even mean?</p><h3>Basics</h3><p>To understand Lambdas, it’s important to know more about its foundations so let’s start off with Serverless computing. Contrary to what the term might imply, technically, the servers are still there. The server suddenly appears when you need it, then disappears when you’re done with it. You just don’t need to manage them anymore. You’re only bothered about the functionality. You don’t have to care about code backup, downtime, spinning up servers, server maintenance, security updates or anything else. AWS (Amazon Web Services) does all of that for you. In event-driven computing, the application is programmed to respond to actions generated by the user or the system. These actions can range from mouse-clicks and key-presses to reacting to sensor outputs or messages sent from other programs.</p><h3>So, what is it again?</h3><p>Simply put, Lambda is a compute service that executes code in response to events and automatically manages other resources required by your code. Instead of having a provisioned EC2 instance (a virtual server capable of running applications on the AWS infrastructure) configured to run a few functions, we can simply upload only the code we want to execute without having to worry about any of the resources.</p><h3>Okay, why should I care?</h3><p>For starters, it’s very easy to deploy and administer functions as you do not need to worry about selecting or configuring EC2 instances to run your code. This is, in my opinion, one of its biggest advantages as it takes the burden of server management away from the developer. Amazon manages the servers for you allowing you to focus more on writing code rather than spending time on the infrastructure. In addition to this, it also limits cost to execution unlike EC2 instances where you would still get charged for idle resources. Lambdas are ideal for infrequent, quick operations that do not require constant run time. An example of this would be building a simple RESTful API — just create a Lambda function and expose it via the AWS API gateway. No need to create any fancy EC2 instance or Elastic Beanstalk applications.</p><h3>Pricing</h3><p>Lambdas are available to both new and existing accounts. Now here’s the awesome bit — the 1st million requests are free, and you can get up to 3.2 million seconds per month depending on memory allocation. At the maximum memory of 1GB, the free tier allows 400,000 seconds per month or alternatively, you can get 3.2 million seconds using the lowest memory setting of 128MB. That’s a heck of a lot processing that can be done before you get charged anything. You can find out more about pricing over <a href="https://aws.amazon.com/lambda/pricing/">here</a>.</p><h3>Can I use it in..?</h3><p>Lambdas are not designed for all workloads, some are better suited than others. You’re better off with not using Lambdas if your application requires a lot of heavy and complex processing and would be running quite frequently as these sorts of requirements are more suited for EC2 instances. Lambdas make sense when we have no desire to manage compute resources. Perhaps even writing code that does not require human interaction can be considered as a prime example of when Lambda can be used. The current languages supported by it are Node.js (JavaScript), Python, Java (Java 8 compatible), and C# (.NET Core).</p><h3>The flipside</h3><p>The obvious trade-off for having ease of execution and reduction in cost, is that you need to give up control of your environment. If your code has additional OS needs, it may need to be adapted or hosted with a different service. There are also known issues with cold starts affecting latency of requests, though there have been large improvements in reducing both the time and frequency of cold starts.</p><h3>Conclusion</h3><p>AWS Lambda offers an easy way to accomplish many activities in the cloud. AWS Lambda is about getting the job done with least effort — and little cost. If laziness is a habit of a great developer, then AWS Lambda is like a pot of gold for the developer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=918e07a4e986" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Different Faces of Web Development]]></title>
            <link>https://medium.com/@ibrahimtareq/the-different-faces-of-web-development-c462b8367588?source=rss-69cbd8c3eb16------2</link>
            <guid isPermaLink="false">https://medium.com/p/c462b8367588</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[full-stack]]></category>
            <category><![CDATA[backend]]></category>
            <dc:creator><![CDATA[Ibrahim Tareq]]></dc:creator>
            <pubDate>Tue, 24 Apr 2018 13:11:58 GMT</pubDate>
            <atom:updated>2018-05-11T05:14:37.152Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xTDJ8nlDMTk7CSBbvMQXUQ.jpeg" /></figure><p>According to US Bureau of Labour Statistics, web development field is expected to grow more than 20% in the next 10 years. Trends in the web industry are always changing and what worked yesterday may not work today. This can make being a developer pretty challenging. Wait a sec.. did you mean front-end developer or back-end developer? Or a full-stack developer? What the heck do you mean?</p><h4>Two sides of a coin</h4><p>Generally, there are two parts to any web application, the front-end or client side of the web app is everything you see and interact with in the browser as a user of application. Then there is the back-end or the server side of the web application, where the application data is saved, updated, manipulated and sent back to the client side. Think of your favorite video site; when you click on that video of dancing cats, the video is retrieved from a database and served to you via a server — that is the back-end. The video is displayed in the browser by the front-end and it allows you to interact with it by providing buttons to perform various actions like full screen the video, pause, rewind or share it with your best friend.</p><h4>I make things look pretty</h4><p>I would like to share an interesting chat that I had with someone I met at a meetup. When I asked him about his role, this is what he said — “I used to be confused about whether I should introduce myself as a front-end developer, or as a designer. I would switch back and forth based on the situation and whom I was talking to. Applying to a design studio? I better call myself a web designer. Being interviewed by a software architect? Hi, I am a front-end developer!”</p><p>The lines are getting blurred between the two roles and it’s common to get confused between them. Let me explain it to you. A designer creates a complete visual branding and online presence for a client, including websites, logos, print and online media, advertising, swag, and more. S/he thinks about the user experience, but from a visual perspective and their tools include Photoshop and Illustrator. The front-end developer is someone who takes this design, chops it up and translates it into code using HTML, CSS and JS. In a nutshell, as a front-end developer, you are responsible for the feel, look and essentially design of the site. As mentioned earlier, more and more designers and front-end developers are gradually merging into the same profession. Sometimes they don’t overlap skill sets at all. Ideally though, they overlap skill sets a lot. Consequently, you will usually find a front-end developer doing the designing and the coding for what you see in the browser.</p><h4>Fleshing out the website</h4><p>Anything you can’t see easily with the eye such as databases and servers is the work of a back-end developer. Back-end developers are also commonly referred to as programmers or web developers. They build behind the scenes functionality of a website such as storing and retrieving user data or securely accepting and storing credit card numbers by using languages like PHP, Ruby, Java or Python. To make them even simpler to use they’re usually enhanced by frameworks like Ruby on Rails, Laravel, Django and they all make development faster and easier to collaborate on. A simple way to remember this is if it’s got something to do with a database, then it’s definitely back-end related.</p><h4>The Myth of the Full-Stack</h4><p>“I can work on both the front-end and the back-end.” A popular claim made by lots of full-stack developers. Although it is true, in reality, there’s a lot more to it than just the front and back-end aspect, but to truly understand the essence of the role, let’s see where it got its name from. Full-stack refers to the ‘stack’ basically everything from low-level programming such as system-administration to the higher level such as front-end web-development. There is a lot more in-between, but the idea is that if you are a full-stack developer then you are comfortable and proficient at working on all the web stacks. Full-stack developers are jack-of-all-trades and master-of-some. They are the full-package and have the ability to cross functionally work on an entire tech stack for an organisation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*WrKXOoaMZeFHJGsjX8gj8g.png" /></figure><h4>Conclusion</h4><p>In an ever-changing industry, there are always newly discovered roles and in order for everyone to carry on great discussions and to collaborate, it’s important that we’re clear on what each role is responsible for and how they fit into the web development puzzle. I hope I managed to help clarify the most common roles in the web space. What are your thoughts on design and development, and the front-end versus the back-end? Please join the conversation by commenting below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c462b8367588" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>