Skip to main content

Posts

Showing posts with the label Beginner

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

Learning Together: React Native (Setting up your device)

(Please bear in mind that I mean what I put on the title. I am also learning this right now and whatever I learn, I post it on this blog.) First job is to set up your device. I use a windows 10 computer. Lets assume that our computer has nothing. We have to set it up from scratch.  Firstly we need to have java installed on our computer. Go ahead, search java 8 on google. Use this link  to download java. Check your windows bit version ( This PC -> Properties . Check System Type under System section). Install it. (One noob advice, don't install java 10 😉) Next thing you need is to set up you computers environment. Go to  Control Panel -> System and Security -> System . Click on Advanced system settings . Click Environment Variables... You will see a window like this. In the system variables section, find a variable named Path, select it, click on Edit Click New, add these two location "C:\Program Files\Java\jdk1.8.0_171\bin" and "C

Learning Together: React Native (Introduction)

React Native is a very rich and well structured language which lets us build cross platform mobile app. A cross platform mobile app is such an app which can run on your smartphone regardless its operating system. It may be Android, iOS or anything else. React Native uses same design as react.js. If you know what react.js is, you know how beautiful it can be. If you don't, no worries, you are about get get to know it. Facebook, Instagram, Pinterest, Skype, Uber. These are some app who runs on react native. Becoming a react native developer is the new coolest thing now. It's smoothness lets us build mobile app easily. And moreover, its not like you are building HTML5 app. It lets you build component block and concate them together to build a real app. So be proud of yourself. Because you and I are about to become a REACT NATIVE DEVELOPER. Cheers!!

ডাটা স্ট্রাকচার- কিউ (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)। কেমন আনফেয়ার শোনায় না? সবার পরে আসবে, আবার সবার আগে চলে যাবে। অ্যাটলিস্ট আমার আনফেয়ার লেগেছিলো যখন স্ট্যাক শিখছিল

ডাটা স্ট্রাকচার- স্ট্যাক (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 হল

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

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