Here’s my attempt in explaining the difference between the three! RUN RUN executes during the container build ie. RUN apt-get install mysql-server CMD CMD is when you want to execute something AFTER container has been built. ie. CMD [“app.py”, “start”]. Make this clear for yourself, any command, server, or service that must run AFTER the… Continue reading Let me explain the difference between Docker RUN, CMD and ENTRYPOINT
Author: Sami samiuddin
Tips for finding a remote job
Finding a remote job is not easy, but here is a couple of things that are going to help you. The first and most important thing is basically the groundwork before you do anything else. That is to actually have the skills. At the end of the day the question is do you have the… Continue reading Tips for finding a remote job
Docker how to read values from an .env file
There’s an easy way to read info from env file. It’s quite useful when you don’t want to pass info via CLI or hard code the it in Dockerfile or compose.yaml. Basically create an .env file in root of your project near compose.yaml Example of .env: And finally within compose.yaml you can read the value… Continue reading Docker how to read values from an .env file
Random notes #1
5 ways to use serverless lambda function.
Serverless can be cool so here’s some ways I’ve used lambda function for in past.. you don’t always need to use it plus there’s an overhead involved but here we go.. First one if processing large files..Imagine a big media file sitting in S3 bucket in need of processing (Decoding/encoding/cutting/removing portions/trimming etc.., anything!) You’d be… Continue reading 5 ways to use serverless lambda function.
Quick note on setting Return Types.
I’m also on Twitter and Linkedin. I had a “getLineTotalForSummary” function which returned subtotal, normally used inside a loop. (Basically a user can add multiple line items to an invoice and this function returns the total for each line taking into account few other values). The function worked fine with dummy data but as we… Continue reading Quick note on setting Return Types.
How I processed 40,000 URLs using Laravel Queues
I’m also on Twitter and Linkedin. Some context – what really happened So a week ago I had a P1 task from SEO team with concerns that Google hadn’t been happy about some redirects on the site, not only Google but also some users. So to temporarily solve this issue we decided to deactivate all… Continue reading How I processed 40,000 URLs using Laravel Queues
This is how the AI will impact the tech market
How far can the AI go? I’m going to use two people in this post to explain how things with AI might play out. A User = Average user/consumer/business owner. A Techie = Someone with a bit of technical background. Lets talk about User first.. A User will be able to go to an AI-Builder… Continue reading This is how the AI will impact the tech market
How to avoid data anomaly when more than one system is involved
One of the most deadly errors a developer can make is to think that two different systems have same priority or they both are sources of truth with their own thinking/logic. This is one of the biggest reasons of data anomaly IMO, especially in data heavy systems. For example, when you’re manipulating data in one… Continue reading How to avoid data anomaly when more than one system is involved
12 tips to grow as a developer
1. Work on open source (minimum 6 months per project). 2. Have mentors/people to learn from (or be friends with people who’ve been in field longer than you). 3. Help developers on Stackoverflow. (Pay special attention to questions than the answers, you can learn a lot). 4. Start on your own or work on companies… Continue reading 12 tips to grow as a developer
Always validate 3rd API data. Here’s why.
Download a free copy This is what I think, hear me out. Just because the data is coming from a TRUSTED 3rd party API doesn’t mean you blindly trust, store, and let your users consume it. This is because even though the APIs generally return predictable responses there’s a possibility they mess up (even if… Continue reading Always validate 3rd API data. Here’s why.
Real Password Bruteforce example | Easier than you think
Most people don’t realize but it’s very easy to Bruteforce login pages and find the correct password. Dictionaries are freely available online, VPS are cheap. Anyone with some coding knowledge can write a program and attack your websites endpoints. What can you do about it? If you’re not using Recaptcha or invalid login rate limiting… Continue reading Real Password Bruteforce example | Easier than you think
Surprising benefits of cardio as a programmer
So, I’m quite an active person (love running!), but as of late I had too much on my plate so started focusing more and more on work, ignoring any physical activity. Winter weather doesn’t help obviously! As the weather got better here in UK and I had itch to go out for run once again..… Continue reading Surprising benefits of cardio as a programmer
How not to ruin your data after downtime
Sometimes it’s best to create a nice interface for the users and let them fix the state of data instead of “assuming” things and try fixing it yourself after a downtime. For example, let’s say there’s a system running background process which stopped temporarily due to server downtime. 2 days later… The system is back up and… Continue reading How not to ruin your data after downtime
“Project Insights” are a blessing for new Devs..
But Jira isn’t where you should keep it all.. Once tickets are closed, moved, changed, edited, reassigned, tied to different story it becomes impossible for someone new to extract insights off them. From what I’ve seen most projects don’t really have a central place to keep insights, if they do, they get outdated very, very… Continue reading “Project Insights” are a blessing for new Devs..
Git rebase – How to clean merge history log and squash commits
Cleaning up merge mess I have people working on different branches. Each person has made several commits. They’ve then merged their work into master branch. Leaving the master branch with several merge messages along with commits and a confusing graph. When you look at the commit history after merging, it looks like below. Change 1,… Continue reading Git rebase – How to clean merge history log and squash commits
Quick intro to AWS Relational Database Service (RDS)
This is yet another service that most of us have used. Pretty much every site is powered by a database, whether it’d be relational or non relational. The only difference here is that AWS has taken the database and put it in a separate server for you (they install all the software that’s needed to… Continue reading Quick intro to AWS Relational Database Service (RDS)
Quick AWS S3 Bucket Intro
S3 bucket is a simply a content/media/files storage. Instead of calling them disks which sounds boring AWS calls them buckets! You can upload data manually, via AWS SDK or CLI. You can also access the data from your application via AWS SDK. An important thing to note is that not all SDKs are same. I’ve… Continue reading Quick AWS S3 Bucket Intro
AWS EC2 Server Simplified!
If you haven’t used EC2 server before this post may be helpful. Let me give you a very quick overview! AWS EC2 is nothing special, it’s a simple server okay? nothing crazy about it but it can get interesting.. If you’ve ever got a site up and running you’ve already been involved with servers. Now… Continue reading AWS EC2 Server Simplified!
How I avoid bugs when dealing with Percentage (%) values
The idea is that if we have a proper understanding between frontend and the backend then many serious bugs can be avoided. Let’s take VAT Rate as an example. We have an application that displays percentage on frontend, for example 10%, 20%, 19.5%, 2%, 0.5% VAT etc. Our job is to make sure there’s a… Continue reading How I avoid bugs when dealing with Percentage (%) values
Distractions aren’t bad if you can control when you’re distracted!
You think you’re doing great after a distraction but you’re not. I thought I was! I couldn’t spot the difference in my thoughts before or after the distraction so I started taking notes right before I knew I was about to distract myself or there was a meeting coming up. When I came back to… Continue reading Distractions aren’t bad if you can control when you’re distracted!
Stripe Connect Platform – Taking payments & issuing Refunds
What we’ll cover: Overview Enabling Stripe-Connect account The On-boarding Process Generating On-boarding Link On-boarding verification Taking Payments Verifying Payments Creating a Refund Listening to Refund events Download a free copy Overview In this post I’m going to go over utilizing Stripe’s-Connect. By the end of this post you’ll have a basic understand of how things… Continue reading Stripe Connect Platform – Taking payments & issuing Refunds
Why I don’t buy into “Self explanatory code”
I think most people would be blown away once they see how heavily complex codebases are commented. I don’t buy into “Your code should be self explanatory” and the reasoning for that is once we start adding business insights into codebase, it loses half its meaning. The code can’t talk back to us and tell… Continue reading Why I don’t buy into “Self explanatory code”
Sharing some personal wisdom..
Websites vs Products The difference between a proper application/software/product and a website has been blurred over the years. Most websites have no product to offer, they’re simple websites that run on CRUD operations behind the scene. For example a personal blog with contact us page and some articles. Then there’s actual products, these are complex… Continue reading Sharing some personal wisdom..
AWS Lambda Function – Watermarking a PDF via S3 Trigger in Python
I’m also on Twitter 🙂 In the previous chapter I talked about the process of watermarking a PDF by sending it to Lambda function in a POST request. In this lesson we’ll automatically Trigger Lambda function when a PDF is uploaded to a S3 bucket and watermark it, then we’ll upload it to a different… Continue reading AWS Lambda Function – Watermarking a PDF via S3 Trigger in Python