Skip to main content

Posts

Showing posts with the label Programming

Top 10 Real-Life System Design Questions Asked in FAANG Interviews

Introduction: FAANG companies (Facebook, Amazon, Apple, Netflix, and Google) are renowned for their rigorous software engineering interviews, with system design questions playing a crucial role. These questions assess your ability to design large-scale, scalable, and maintainable systems. In this blog post, we present 10 real-life system design questions that you may encounter during FAANG interviews, along with the type of system architecture each question represents and a brief description of aspects to consider while designing the system. Design a system like Twitter (Social Media Platform) In this question, you will be asked to design a social media platform that can handle massive amounts of data and scale to accommodate millions or billions of users. Focus on aspects like data modeling, data storage, feed generation, and search functionality. This will demonstrate your understanding of distributed systems, databases, and caching strategies. Design a URL shortening service like bi

Chapter 1.5: Introduction to C# and the .NET Framework: Understanding Arrays and Collections in C#

 Introduction: In the previous post , we explored control structures in C#, including if/else statements, switch statements, and various looping constructs (for, while, and do/while). In this post, we'll delve into arrays and collections, which are essential data structures for storing and manipulating groups of related data items. After this article, we'll move on to the next chapter: "Object-Oriented Programming with C#." Arrays: An array is a fixed-size, ordered collection of elements of the same data type. The elements in an array can be accessed by their index, which starts from zero. Creating and Initializing Arrays: There are multiple ways to create and initialize arrays in C#. Here are some common examples: Declare an array with a specified size: int [] numbers = new int [5]; Declare and initialize an array with specific values: int [] numbers = { 1, 2, 3, 4, 5 };

Chapter 1.4: Introduction to C# and the .NET Framework: Understanding Control Structures in C# (if/else, switch, for, while, do/while)

 Introduction: In the previous post , we explored the fundamentals of data types, variables, and operators in C#. In this post, we'll dive into control structures, which allow us to control the flow of our program's execution. We will also discuss arrays and collections in the next article. Control Structures: Control structures enable us to make decisions, repeat operations, and perform different actions based on specific conditions. The most common control structures in C# are if/else, switch, for, while, and do/while. if/else: The if/else statement allows us to execute a block of code if a specified condition is true and another block of code if the condition is false. Syntax: if (condition) { // Code to execute if condition is true } else { // Code to execute if condition is false } Example: int age = 18; if (age >= 18) { Console.WriteLine( "You are eligible to vote." ); } else { Console.WriteLine(

Chapter 1.3: Introduction to C# and the .NET Framework: Understanding Data Types, Variables, and Operators in C#

 Introduction: In the previous post, we set up a development environment for C# programming using Notepad++, the .NET Core SDK, and batch files . In this post, we'll explore the fundamentals of data types, variables, and operators in C#. We will also discuss control structures (if/else, switch, for, while, do/while) in the next article. Data Types: Data types define the type of data a variable can store. In C#, there are two main categories of data types: Value Types: Store the actual data. Examples include int, float, double, char, and bool. Reference Types: Store the memory address where the data is located. Examples include string, object, and arrays. Commonly used data types in C#: int: Represents a 32-bit integer. float: Represents a single-precision floating-point number. double: Represents a double-precision floating-point number. char: Represents a single Unicode character. bool: Represents a boolean value (true or false). string:

Chapter 1.2: Introduction to C# and the .NET Framework: Setting up the Development Environment for C# with Notepad++

Introduction In the previous post, we covered the fundamentals of C# and the .NET framework . Now, we'll set up a lightweight development environment for C# programming using Notepad++ as our code editor, the .NET Core SDK for compilation and execution, and batch files to streamline the process. Setting Up the Development Environment: Follow the steps mentioned in the previous post to set up a C# development environment using Notepad++ and the .NET Core SDK. Creating Your First C# Program: Open Notepad++ and create a new file. Save the file with a ".cs" extension, indicating that it's a C# source file. Type the following code: using System; class HelloWorld { static void Main() { Console.WriteLine( "Hello, World!" ); } }

Chapter 1.1: Introduction to C# and the .NET Framework: Overview of C# and .NET

 Introduction Welcome to the first post in our C# Basics series! In this post, we'll explore the fundamentals of C# and the .NET framework, providing you with a solid foundation for diving into C# programming. Throughout this series, we'll be using Notepad++ as our code editor, focusing on understanding the concepts rather than relying on complex development environments. What is C#? C# (pronounced "C Sharp") is a modern, object-oriented programming language developed by Microsoft. Designed for the .NET framework, C# is versatile and powerful, making it ideal for various applications, including web, desktop, mobile, and gaming development. What is .NET? .NET is a software framework developed by Microsoft, providing a runtime environment and a large class library for building, deploying, and running applications. It supports multiple programming languages, including C#, VB.NET, and F#. With .NET, you can create Windows applications, web applications, and service

ডাটা স্ট্রাকচার- কিউ (Queue)

Programming is all about data manipulation. Data structure is way of storing data for further manipulation. ডাটা স্ট্রাকচার আমাদেরকে বিভিন্ন ডাটা সাজিয়ে রাখার ব্যবস্থা করে দেয়। ডাটা সাজিয়ে রাখার অনেক গুলো "তরিকা" আছে। কোনকিছু আমরা কেন সাজিয়ে রাখি? যেন পরে নির্দিষ্ট একটা ডাটা সহজে খুঁজে পেতে পারি। "তরিকা" গুলোর নাম Array, Stack, Queue, Linked List, Tree, Graph. এগুলা শ খানেক ডাটা স্ট্রাকচারের মধ্যে কিছুর নাম, যেগুলো অনেক বেশি ব্যবহার হয়। এই পোস্টটা কিউ বুঝানোর জন্য। কিউ জিনিসটার সাথে আমরা সবাই পরিচিত। জীবনে আমরা সবাই কখনো না কখনো লাইনে দাঁড়ায়ছি। কিউ এর বেসিক ক্যারেক্টারিস্টিকসের সাথে মিলিয়েই প্রোগ্রামিং এ কিউ এর কনসেপ্ট। বাস্তব জীবনে একটা কিউ তে কি হয়? সবাই লাইন ধরে দাঁড়ায় কিছু একটা কারনে। যে সবার আগে দাঁড়ায় সেই সবার আগে কার্জসিদ্ধি করে। সবার পরের জন সবার পরে। স্ট্যাকের ক্ষেত্রে আমরা পড়েছিলাম Last In First Out (LIFO) or First In Last Out (FILO)। কেমন আনফেয়ার শোনায় না? সবার পরে আসবে, আবার সবার আগে চলে যাবে। অ্যাটলিস্ট আমার আনফেয়ার লেগেছিলো যখন স্ট্যাক শিখছিল

জ্যামরিন- A cross platform mobile application builder

জ্যামরিনের নাম শুনেছি প্রায় বছর খানেক আগে যখন C# শিখছিলাম তখন। বন্ধু তুহিন এটার নাম মেনশন করে প্রথম। ওই যতটুকু আইডিয়া পেয়েছিলো ততটুকুই বলেছিলো। একটা ফ্রেমওয়ার্ক, মোবাইল অ্যাপ রিলেটেড। কিন্তু ভিজুয়াল স্টুডিও দিয়ে। খুব বেশী আগ্রহ পাইনি তখন। আগ্রহটা জন্মালো এই কিছুদিন আগে। আগ্রহ নিয়েই জ্যামরিনের সম্পর্কে খোঁজ নেয়া শুরু করলাম। কিছু ধারনা পেয়েছি। এই পোস্টটা আমার সেই ক্ষুদ্র ধারনা নিয়েই। কিছু ইনট্রোঃ মাইক্রোসফট হলো সবচেয়ে বড় টেক জায়ান্টদের মধ্যে একটা। Unlike any other tech giants, Microsoft buys innovative startups and stuff. জ্যামরিনও মাইক্রোসফটের এরকম একটা সাবসিডিয়ারি। জ্যামরিনের শুরু বেশ আগে, ২০১৩ এর দিকে। মাইক্রোসফটের সাথে এর যাত্রা ২০১৬ থেকে। C# ল্যাঙ্গুয়েজটা মাইক্রোসফটের একপ্রকার নিজের ঘরের। উইন্ডোজ বেজড যেকোনও অ্যাপ্লিকেশন তৈরিতে C# এর জুড়ি নাই। অথচ অন্য প্লাটফর্মে এই ল্যাঙ্গুয়েজের অবস্থা টালমাটাল। একটা সময় মোবাইল ডিভাইসের অ্যাপ্লিকেশন গুলো তৈরি করার জন্য নির্দিষ্ট ল্যাঙ্গুয়েজই ছিলো। যেমন অ্যান্ড্রয়েডের জন্য জাভা। iOS এর জন্য সুইফট বা অবজেক্টিভ-সি। জ্যামরিনের ফাউন্ডাররা চ

ডাটা স্ট্রাকচার- স্ট্যাক (Stack)

Programming is all about data manipulation. Data structure is way of storing data for further manipulation. ডাটা স্ট্রাকচার আমাদেরকে বিভিন্ন ডাটা সাজিয়ে রাখার ব্যবস্থা করে দেয়। ডাটা সাজিয়ে রাখার অনেক গুলো "তরিকা" আছে। কোনকিছু আমরা কেন সাজিয়ে রাখি? যেন পরে নির্দিষ্ট একটা ডাটা সহজে খুঁজে পেতে পারি। "তরিকা" গুলোর নাম Array, Stack, Queue, Linked List, Tree, Graph. এগুলা শ খানেক ডাটা স্ট্রাকচারের মধ্যে কিছুর নাম, যেগুলো অনেক বেশি ব্যবহার হয়। এই পোস্টটা স্ট্যাক বুঝানোর জন্য। স্ট্যাক খুবই ইন্টেরেস্টিং একটা ডাটা স্ট্রাকচার। অনেক কারনেই এটা ব্যাবহার হয়। আগে স্ট্যাক কনসেপ্টটা নিয়ে আলোচনা করা যাক। স্ট্যাক বলতে বোঝায় একটার উপর একটা সাজায়ে রাখা। বিয়ের বাড়িতে আগে মেলামাইনের গ্লাস দেখা যেত একটার ভেতর আরেকটা ঢুকায়ে লম্বা একটা পাইল তৈরি করে একসাথে ক্যারি করা হচ্ছে। এটা একটা স্ট্যাক। প্রোগ্রামিং এর ভাষায় স্ট্যাক এক্সাক্টলি সেইম জিনিসই। তবে একটু ঘষামাজা আছে। আরেকটা উদাহরণ দেয়া যেতে পারে। বয়ামের ভেতর একটার পর আরেকটা বিস্কিট ঢুকিয়ে রাখা হয়। হ্যা, এইটা পারফেক্ট উদাহরণ হয়েছে। এই

ডাটা স্ট্রাকচার- অ্যারে (Array)

Programming is all about data manipulation. Data structure is way of storing data for further manipulation. ডাটা স্ট্রাকচার আমাদেরকে বিভিন্ন ডাটা সাজিয়ে রাখার ব্যবস্থা করে দেয়। ডাটা সাজিয়ে রাখার অনেক গুলো "তরিকা" আছে। কোনকিছু আমরা কেন সাজিয়ে রাখি? যেন পরে নির্দিষ্ট একটা ডাটা সহজে খুঁজে পেতে পারি। "তরিকা" গুলোর নাম Array, Stack, Queue, Linked List, Tree, Graph. এগুলা শ খানেক ডাটা স্ট্রাকচারের মধ্যে কিছুর নাম, যেগুলো অনেক বেশি ব্যবহার হয়। এই পোস্টের উদ্দেশ্য Array নিয়ে আলোচনা। Array সম্ভবত সবচেয়ে বেশী ব্যবহৃত ডাটা স্ট্রাকচার। Array শব্দটার অর্থ হলো একই ধরনের কিছু জিনিসের সমাবেশ ( বা সমষ্ঠি )। Array দিয়ে আমরা একই ধরনের ডাটার কালেকশন রাখি। এই কালেকশনটা হতে পারে int Type এর ডাটার বা String Type এর ডাটার বা যেকোন ডাটাটাইপের। 5 2 10 0 122 উপরের এটা একটা সংখ্যার কালেকশন। এইটাই একটা Array। আপাতত মনে একটা প্রশ্ন জাগতে পারে যে এখানে সাজিয়ে রাখার কি হলো? আসলে এটাই সাজিয়ে রাখা। পুরো কালকেশনকে ধরে একটা Variable এ রেখে দ

প্রোগ্রামিং এর বেসিক

ঘুরেফিরে সব প্রোগ্রামিং ল্যাংগুয়েজই একই।একটা স্ট্রাকচার ভালোভাবে শিখে ফেললেই বাকিগুলো শিখতে খুব বেশী কষ্ট করতে হয়না। এই পোস্টে চেষ্টা করবো প্রোগ্রামিং এ একেবারেই নতুন বা না জানাদেরকে বেসিক দেখায় দেয়ার। কিছু কিছু জায়গায় স্যাম্পল কোড ব্যাবহার করতে হলে রেফারেন্স হিসেবে C++ ব্যাবহার করবো। প্রথমে যেটা সম্পর্কে জানাবো সেটা হলো Data Type । একটা জিনিস আগে মাথায় ঢুকিয়ে দেয়া যাক। প্রোগ্রামিং এর মুল লক্ষ হলো কিছু ডাটা নিয়ে সেটাকে কিছু কাটাছেড়া করে সেটার ফলাফল নিয়ে আসা। এইজে ডাটার কথা বললাম, ডাটা তো অনেক ধরনের হতে পারে। যেমন ২, ৫.৫, হাতি, মশা, হাতির কানে মশা। এগুলা সবই ডাটা। কিন্তু ডাটা গুলো আলাদা না? কোনোটা সংখ্যা, কোনোটা শব্দ, কোনোটা বাক্য। সংখ্যার মধ্যেও আবার দশমিকযুক্ত সংখ্যা আছে, নরমাল সংখ্যা আছে। সব দজরনের ডাটাকে তো একভাবে কাটাছেড়া করা যায়না। আমরা নাহয় বুদ্ধিমান, কম্পিউটার তো আর বুদ্ধিমান না। সেজন্য বানানো হয়েছে Data Type। বিভিন্ন ধরনের ডাটাকে বিভিন্ন ক্যাটাগরিতে ভাগ করা হয়েছে। প্রথমে একনাগাড়ে সবগুলোর নাম বলে যাই। int, short, long, double, float, char, bool, string ইত্যাদি। int হল

প্রোগ্রামিং এর সংগে ঠাট্টা

প্রথমে কিছু কাটখোট্টা সেশন দিয়ে শুরু করা যাক। কিছু কমন প্রশ্ন এবং এই গোবেচারার কিছু উত্তর। ১ . প্রোগ্রামিং কি? খায় না মাথায় দেয়?        সোজা বাংলায় বলতে গেলে প্রোগ্রামিং হলো কম্পিউটারকে আদেশ দিয়ে কিছু কাজ করানো। মানে কি?     মানে হলো কম্পিউটার হলো একটা বোকা বাক্স। ক্ষেত্রবিশেষে এদের ক্ষমতা মানুষের চেয়েও বেশী থাকলেও এর অনেক বড় সীমাবধ্যতা হলো এরা নিজে থেকে কিছু করতে পারেনা। এই দাস তাই করবে যা তার মনিব তাকে আদেশ দিবে। সমস্যা হলো কম্পিউটার মানুষের ভাষা বুঝেনা। এই সমস্যার সমাধান হলো প্রোগ্রামিং। মানুষ তার নিজের ভাষায় কম্পিউটারের জন্য কিছু আদেশ লিখে দিবে, কম্পিউটার সেটাকে কোন এক ভাবে নিজের ভাষায় ট্রান্সলেট করে নিবে। ব্যাস...কাজ শেষ। কম্পিউটার সেই আদশ পুরন করে ফেলবে। ২. প্রোগ্রামিং করে লাভ কি? কম্পিউটারকে কতটুকু নিয়ন্ত্রণ করা যায়?     যেমনটা আগেই বলা হয়েছে। কম্পিউটারকে আদেশ না দিলে কিছুই করতে পারবেনা। তাই এতটুকু বুঝতেই পারছেন যে একটা প্রোগ্রাম বানিয়ে আপনি পুরো কম্পিউটারটাকেই নিয়ন্ত্রণ করতে পারবেন। আসলে আপনি কম্পিউটারে যা কিছু দেখছেন( গেমস, ওয়েব ব্রাউজার, মিডিয়া প্লেয়ার ইত্যাদি ),