computer_science_and_programming | Unsorted

Telegram-канал computer_science_and_programming - Computer Science and Programming

159623

Channel specialized for advanced topics of: * Artificial intelligence, * Machine Learning, * Deep Learning, * Computer Vision, * Data Science * Python For Ads: @otchebuch & @cobbl, https://telega.io/c/computer_science_and_programming

Subscribe to a channel

Computer Science and Programming

Public Static Void Main(String[] args) Explained.

public: An access modifier keyword that indicates the class (MainClass) is accessible from outside the package.

class: A keyword used to declare a class in Java.
MainClass: The name of the class. It follows the naming conventions for classes in Java.

{ and }: Curly braces define a block of code. In this case, they enclose the body of the class.

public: An access modifier keyword indicating that the main method can be called from outside the class.

static: A keyword indicating that the main method belongs to the class itself rather than to an instance of the class.

void: A keyword indicating that the main method does not return any value.

main: The name of the method. It is the entry point for the Java program.

(String[] args): The method parameter list. String[] args is an array of strings that can be used to pass command-line arguments to the program.

System.out.println("Hello, World!");: A statement that prints the string "Hello, World!" to the console. System.out is an object representing the console output, and println is a method to print a line.

Читать полностью…

Computer Science and Programming

6 Software ARCHITECTURAL PATTERNS

- Event Driven
- Layered
- Monolithic
- Microservice
- MVC
- Master Slave

Читать полностью…

Computer Science and Programming

12 Most Common git Commands YOU MUST KNOW

- init
- clone
- status
- add
- commit
- push
- pull
- branch
- checkout / switch
- merge
- diff
- log

Читать полностью…

Computer Science and Programming

GridFormer: Point-Grid Transformer for Surface Reconstruction

Paper:
https://arxiv.org/pdf/2401.02292.pdf

GitHub:
https://github.com/list17/GridFormer

🔗@computer_science_and_programming

Читать полностью…

Computer Science and Programming

Top 4 Forms of Authentication Mechanisms

1. SSH Keys - Cryptographic keys are used to access remote systems and servers securely

2. OAuth Tokens - Tokens that provide limited access to user data on third-party applications

3. SSL Certificates - Digital certificates ensure secure and encrypted communication between servers and clients

4. Credentials - User authentication information is used to verify and grant access to various systems and services

Читать полностью…

Computer Science and Programming

❗️Java vs. Python❗️

➡️ Python and Java are both popular and powerful programming languages, each with its own unique strengths. Python is known for its simplicity and readability, making it an excellent choice for beginners and rapid development. Its concise syntax allows developers to express concepts with fewer lines of code, promoting faster iteration and prototyping. Python's extensive library ecosystem empowers developers to access a wide range of pre-built tools for various tasks.

➡️ On the other hand, Java is recognized for its platform independence and robustness. It's a statically-typed language, which means errors can be caught at compile time, enhancing code reliability. Java's "write once, run anywhere" philosophy enables applications to run on different platforms without modification, thanks to the Java Virtual Machine (JVM). This also makes Java well-suited for building large-scale, performance-critical applications.

➡️ In summary, Python emphasizes simplicity, readability, and rapid development, while Java prioritizes platform independence, robustness, and performance. The choice between the two largely depends on the project's requirements and the developer's preferences.

Читать полностью…

Computer Science and Programming

CI/CD example for API written in Java/Spring Boot.

👉 CI/CD stands for Continuous Integration/Continuous Deployment. It is a software development process that involves automating the building, testing, and deployment of code changes.

🏭 The CI/CD pipeline can be thought of as a factory assembly line, where each step is automated to ensure the code is high quality and ready for deployment.

🛠 The pipeline starts with Continuous Integration, where code changes are automatically built, tested, and merged into a shared repository. This step helps catch errors early and ensures the code is stable and functioning correctly.

📦 Once the code has passed the integration tests, it moves on to Continuous Deployment. This step involves automatically packaging and deploying the code changes to a staging or production environment.

👀 Automated testing is performed at each stage of the pipeline to ensure that the code meets the required standards and that the new changes do not break any existing functionality.

🚀 The ultimate goal of a CI/CD pipeline is to speed up the software development process, reduce errors, and quickly deliver new features and improvements to users.

Читать полностью…

Computer Science and Programming

12 Microservices Best Practices You Should Know

1 - Single Responsibility
2 - Containers
3 - Orchestration
4 - Resilience and Fault Tolerance
5 - Scalability
6 - CI/CD
7 - Observability
8 - Security
9 - API Gateway
10 - Stateless
11 - DB Per Service
12 - Event Driven Architecture

Читать полностью…

Computer Science and Programming

Make sure you're using a premium VPN!!

Download and use OrcaVPN and get:

🗺 VPN split tunnelling
⚡️ Speed test
⭐ IP Checker
👑 Ad blocker
✅ High speed and low ping
✔️ Access restricted Apps 🎮📱📱

1 month
free with CODE: SECRET. Then only $4.99 $0.99 👀😎

⏬️⏬️⏬️⏬️⏬️⏬️⏬️
https://7etap.app.link/OrcaVPN

Читать полностью…

Computer Science and Programming

How do companies ship code to production?

Step 1: The process starts with a product owner creating user stories based on requirements.

Step 2: The dev team picks up the user stories from the backlog and puts them into a sprint for a two-week dev cycle.

Step 3: The developers commit source code into the code repository Git.

Step 4: A build is triggered in Jenkins. The source code must pass unit tests, code coverage threshold, and gates in SonarQube.

Step 5: Once the build is successful, the build is stored in artifactory. Then the build is deployed into the dev environment.

Step 6: There might be multiple dev teams working on different features. The features need to be tested independently, so they are deployed to QA1 and QA2.

Step 7: The QA team picks up the new QA environments and performs QA testing, regression testing, and performance testing.

Steps 8: Once the QA builds pass the QA team’s verification, they are deployed to the UAT environment.

Step 9: If the UAT testing is successful, the builds become release candidates and will be deployed to the production environment on schedule.

Step 10: SRE (Site Reliability Engineering) team is responsible for prod monitoring.

Читать полностью…

Computer Science and Programming

In the world of software development and system integration, the methods by which one system communicates with another can have a significant impact on the efficiency and responsiveness of the overall process. Two common approaches to this communication are polling and webhooks.

In the context of software, webhooks are HTTP callbacks that allow one system to notify another system of an event as soon as it happens. In the VCS and CI/CD scenario:

1. The VCS, such as GitHub, Bitbucket, or GitLab, has a webhook feature.
2. Whenever a code push occurs, the VCS sends an immediate HTTP POST request to the CI/CD server, saying, "Hey, new code just arrived!"
3. The CI/CD server responds instantly, starting the build and deployment process without wasting time checking repeatedly.

Here is a simplified example

🔄 Polling:
Imagine you're waiting for an important text message from a friend. To check if the message has arrived, you periodically take out your phone, unlock it, and open the messaging app to see if there's a new message. You keep doing this every few minutes until you finally see the message. This process is similar to polling in the context of software systems.

In software, polling is a method where a system (e.g., a Continuous Integration/Continuous Deployment server) repeatedly checks another system (e.g., a Version Control System) for updates. In your VCS and CI/CD scenario, it works like this:

1. CI/CD server regularly checks the VCS repository for code changes.
2. It repeatedly asks, "Is there new code? Is there new code?"
3. When it detects new code, it triggers the build and deployment process.

🎣 Webhooks:
Now, imagine you have a special notification setup with your friend. Instead of repeatedly checking your phone, your friend promises to send you a message as soon as anything important happens. So, you can put your phone aside and carry on with other tasks, only looking at it when you receive a notification. This is analogous to webhooks.

Читать полностью…

Computer Science and Programming

5 books for Software Engineers

1. Clean Architecture (Martin)
2. Building Microservices (Newman)
3. Unit Testing (Khorikov)
4. Domain Driven Design (Evans)
5. Head First Design Patterns (Freeman & Robson)

What is your favourite? Comment bellow.

Читать полностью…

Computer Science and Programming

6 Database Types You Must Know

1. Relational Database 💼
- Data Model: Organizes data into tables with rows and columns.
- Examples: MySQL, PostgreSQL, Oracle, SQL Server.
- Key Features: ACID compliance, strong data consistency, structured data storage, support for SQL queries, well-suited for complex transactions and reporting.

2. Document Database 📄
- Data Model: Stores data in semi-structured or JSON-like documents.
- Examples: MongoDB, CouchDB, Firebase Firestore.
- Key Features: Flexible schema, horizontal scalability, support for semi-structured data, well-suited for content management systems and real-time applications.

3. In-Memory Database 🚀
- Data Model: Stores data entirely in the system's main memory (RAM).
- Examples: Redis, Memcached, Apache Ignite.
- Key Features: Ultra-fast data retrieval, low-latency, suitable for caching, session management, and real-time analytics.

4. Graph Database 🌐
- Data Model: Represents data as nodes and edges to model relationships.
- Examples: Neo4j, Amazon Neptune, ArangoDB.
- Key Features: Efficient querying of complex relationships, graph traversal, suitable for social networks, recommendation systems, and fraud detection.

5. Time-Series Database 📈
- Data Model: Optimized for time-ordered data points, like sensor readings or log files.
- Examples: InfluxDB, Prometheus, TimescaleDB.
- Key Features: Efficient storage and retrieval of time-series data, aggregations, retention policies, ideal for monitoring, IoT, and event data.

6. Spatial Database 🌍
- Data Model: Designed for storing and querying spatial or geographic data.
- Examples: PostGIS (extension for PostgreSQL), MongoDB Geospatial, Microsoft SQL Server Spatial.
- Key Features: Geospatial indexing, support for spatial data types (points, polygons, lines), useful for location-based services, GIS (Geographic Information Systems), and map applications.

Читать полностью…

Computer Science and Programming

🔵 REST vs 🟣 GraphQL

🔵 REST:
👉 Stands for Representational State Transfer
👉 Well-established and widely adopted
👉 Uses predefined endpoints for data retrieval
👉 Great for simple, stateless operations

🟣 GraphQL:
👉 A modern query language for APIs
👉 Allows clients to request exactly what they need
👉 Reduces over-fetching and under-fetching of data
👉 Empowers front-end developers with data control

Which one is right for your project? 🤔

Use 🔵 REST if:

Simplicity and Convention: REST is straightforward and relies on a set of conventions. If you have a simple API with well-defined endpoints and actions, REST might be a good choice.

Caching: RESTful APIs are typically easier to cache because the URLs for resources remain consistent. This can lead to better performance in scenarios where caching is crucial.

Existing Ecosystem: If you're working with legacy systems or integrating with third-party APIs that follow REST principles, it may make sense to stick with REST for consistency.

Use 🟣 GraphQL if:

Flexibility: GraphQL allows clients to request exactly the data they need, which can lead to reduced over-fetching and under-fetching of data. This flexibility is especially beneficial for complex applications with varying data requirements.

Efficiency: With GraphQL, you can often make a single request to fetch related
data, reducing the number of API calls required compared to REST, which might require multiple requests to different endpoints.

Real-time Data: If you need real-time updates and subscriptions, GraphQL's ability to provide live data can be a significant advantage.

Team Expertise: If your development team is comfortable with GraphQL and prefers its query language, it might lead to faster development and easier maintenance.

Читать полностью…

Computer Science and Programming

Is AI making a real impact in the way you work or is it all hype? Stack Overflow recaps some of the top insights from their 2023 Developer Survey.💡

Explore what developers are thinking about the benefits, accuracy, and use cases for GenAI here.

Читать полностью…

Computer Science and Programming

Explore Human Parsing Modality for Action Recognition

📄 https://arxiv.org/pdf/2401.02138.pdf

💻 https://github.com/liujf69/EPP-Net-Action

Читать полностью…

Computer Science and Programming

NoSQL vs SQL

NoSQL databases provide flexible data models ideal for diverse data structures and scalability.

1. Key-Value: Simple, uses key-value pairs (e.g., Redis).
2. Document: Stores data in JSON/BSON documents (e.g., MongoDB).
3. Graph: Manages complex relationships with nodes and edges (e.g., Neo4j).
4. Column Store: Optimized for analytics, organizes data by columns (e.g., Cassandra).

SQL databases, like RDBMS and OLAP, provide structured, relational storage for traditional and analytical needs

1. RDBMS: Traditional relational databases with tables (e.g., PostgreSQL & MySQL).
2. OLAP: Designed for complex analysis and multidimensional data (e.g., SQL Server Analysis Services).

Читать полностью…

Computer Science and Programming

Instagram System Design Overview

- Clients (iOS, Android, Web).
- Microservices for varied functionalities.
- Databases: MySQL, Cassandra, Redis.
- Object storage (Amazon S3) & CDN for media.
- Caching with Memcached/Redis
- Scaling, load balancing, auto-scaling.
- Asynchronous processing with queues
- Secure authentication (OAuth), RBAC.
- Monitoring (Prometheus, Grafana) & analytics.
- Push notifications for real-time updates.

Читать полностью…

Computer Science and Programming

Here’s description of 9 types of API testing:

➡️ 1. Unit Testing: Involves testing individual components or functions of an API in isolation to ensure they function correctly and produce the expected output.

➡️ 2. Functional Testing: Focuses on testing the overall functionality of the API, verifying that it performs as intended and produces accurate results.

➡️ 3. Integration Testing: Tests interactions between different components or services within an API to ensure they work together seamlessly and communicate effectively.

➡️ 4. Load Testing: Evaluates the API's performance under heavy load by simulating a large number of concurrent requests to identify potential bottlenecks and optimize resource usage.

➡️ 5. Security Testing: Aims to identify vulnerabilities in the API by testing for potential security risks, such as unauthorized access, data leakage, or injection attacks.

➡️ 6. Stress Testing: Pushes the API beyond its limits by applying extreme conditions, such as high traffic or limited resources, to determine how well it can handle such scenarios.

➡️ 7. Negative Testing: Involves deliberately sending invalid or incorrect inputs to the API to verify that it responds appropriately with error messages or other expected behaviors.

➡️ 8. Boundary Testing: Focuses on testing the limits of the API's inputs, such as minimum and maximum values, to ensure it handles these boundaries correctly.

➡️ 9. Usability Testing: Evaluates the user-friendliness of the API by assessing how easily developers can understand its documentation, endpoints, and responses, ultimately enhancing the developer experience.

Читать полностью…

Computer Science and Programming

5 Principles of Object Oriented Design (SOLID)

Читать полностью…

Computer Science and Programming

🌟 Why Clean Architecture?

✅ Maintainability: Changes in one layer won't lead to a domino effect of changes throughout the codebase. 🔄🚫

✅ Testability: Each layer is testable in isolation, making it easier to ensure your code works as expected. ✔️🧪

✅ Scalability: You can swap out components without disrupting the entire system. It grows with your project! 📈🔄

✅ Adaptability: Technology evolves, but your core business logic remains intact. Upgrades are smoother and less painful. ⚙️🔧

📚 Layers of Clean Architecture:

- Entity Layer: The core business logic lives here. It represents the heart of your application. ❤️🧠
- Use Case Layer: This layer holds application-specific use cases and business rules. It orchestrates interactions between entities and ensures they stay clean and focused. 🤝📋

- Interface Adapters: These adapters bridge the gap between the use cases and the external world, like user interfaces and databases. They keep things flexible and adaptable. 🌐🔌

- Frameworks & Drivers: The outermost layer deals with frameworks, tools, and external systems. It's where you connect to databases, APIs, and UI frameworks. 🖥🔗

Читать полностью…

Computer Science and Programming

Top Programming Languages of All Times

Читать полностью…

Computer Science and Programming

7 Popular Network Protocols

1- HTTPS: Secure version of HTTP, used for secure communication over a computer network.

2 - Web Socket: Provides full-duplex communication channels over a single TCP connection.

3 - TCP: Provides reliable, ordered, and error-checked delivery of a stream of bytes.

4 - HTTP: Foundation of any data exchange on the Web, a protocol used for transmitting hypertext.

5 - FTP: Used for the transfer of computer files between a client and server on a computer network.

6 - UDP: Allows computer applications to send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network.

7 - SMTP: Internet standard for email transmission across Internet Protocol (IP) networks.

Читать полностью…

Computer Science and Programming

Sharing the tool that will make working with text easier!

CMD+ helps to make your day-to-day tasks easier and faster while providing you with customization options so that you can tailor the interface to fit your needs. With just a few simple commands, you can easily take care of various tasks such as text writing, translation, Excel promts, and rephrasing, eliminating the hassle of manually doing those activities. By automating these time-consuming processes, CMD+ saves you time and energy, allowing you to focus on more important tasks.

Download:
https://cmdplus.page.link/H3Ed

Читать полностью…

Computer Science and Programming

The 12 Factor App is a methodology for building scalable and maintainable web applications. It provides a set of guidelines for developing modern, cloud-native, and containerized applications. Here are the 12 factors explained in bullet points:

1. Codebase:
- One codebase per application.
- Use version control to manage code changes.

2. Dependencies:
- Explicitly declare and isolate dependencies.
- Avoid relying on system-wide packages.

3. Config:
- Store configuration in environment variables.
- Keep configuration separate from code.

4. Backing Services:
- Treat external services (databases, caches, etc.) as attached resources.
- Connect to them via URLs or environment variables.

5. Build, Release, Run:
- Strictly separate the build, release, and run stages of the application.
- Use consistent and repeatable build processes.

6. Processes:
- Execute the application as stateless processes.
- Avoid storing session data locally; use external services.

7. Port Binding:
- Export services via a port and communicate over the network.
- Web applications should bind to a port defined by the environment.

8. Concurrency:
- Scale out via the process model.
- Utilize multiple stateless processes to handle requests.

9. Disposability:
- Maximize robustness with fast startup and graceful shutdown.
- Terminate unneeded processes without impact.

10. Dev/Prod Parity:
- Keep development, staging, and production environments as similar as possible.
- Use the same dependencies and configuration.

11. Logs:
- Treat logs as event streams.
- Write application logs to standard output and allow log aggregation.

12. Admin Processes:
- Run administrative tasks as one-off processes.
- Use the same codebase and environment for administrative tasks.

Adhering to these 12 factors helps create applications that are easier to develop, deploy, and maintain, making them well-suited for cloud-native and containerized environments.

Читать полностью…

Computer Science and Programming

12 Design Patterns You Must Know

1. Factory Pattern 🏭
Imagine a factory that produces different products. Similarly, this pattern creates objects without specifying their exact class, making code flexible and extendable. 🧩

2. Observer Pattern 🔍
Like subscribing to updates! Objects (observers) register to watch changes in a subject. When the subject changes, observers are notified automatically. 📡🔔

3. Singleton Pattern 🕊
Ensures a class has only one instance globally accessible. Useful for managing shared resources like databases. 🌐🔒

4. Builder Pattern 🛠
Building complex objects step by step. Think of it as assembling Lego bricks to create something intricate without the mess! 🧱🏗

5. Adapter Pattern 🌉
Converts the interface of one class into another interface clients expect. Makes incompatible components work together. 🔌🔌

6. Decorator Pattern 🎈
Like adding toppings to your pizza! Dynamically adds responsibilities to objects without changing their code. A flexible alternative to subclassing. 🍕✨

7. Proxy Pattern 🕶
Controls access to an object, acting as a stand-in with additional functionality, like lazy loading. 🔒🔍

8. Strategy Pattern 🎯
Switching strategies seamlessly! Allows selecting algorithms during runtime. Useful when you want to provide multiple ways to accomplish a task. 🎮🔄

9. Command Pattern ⌨️
Encapsulates requests as objects, allowing parameterization of clients with different requests and queuing of requests. Think of it as a to-do list for your program. 📋📌

10. Template Pattern 📄
Standardized process steps! Defines the structure of an algorithm, letting subclasses override specific steps. Ideal for reusable workflows. 📊📈

11. Iterator Pattern 🔄
Tour guide for collections! Provides a way to access elements of a collection without exposing its underlying representation. 🚶‍♂️🗺

12. State Pattern 🚦
Like a traffic light! Allows an object to change its behavior when its internal state changes. Keeps your code organized as states pile up. 🚥🔄

Читать полностью…

Computer Science and Programming

6 API Architectural designs You Must Know

1. REST 🌐
Representational State Transfer - REST is like a classic library where you request specific books and receive them as they are. It's simple and widely used for web APIs, like ordering a la carte from a menu 🍽.

2. GraphQL 🚀
GraphQL is like a customizable buffet 🍴 where you ask for exactly what you want and get a tailored plate. It allows clients to request only the data they need, reducing over-fetching.

3. SOAP 🧼
SOAP (Simple Object Access Protocol) is like sending a letter 💌 with detailed instructions, complete with a table of contents. It's more structured but can be heavier than REST or GraphQL.

4. gRPC 🚄:
gRPC is like a high-speed train 🚄 for communication between services. It uses Protocol Buffers for efficient data exchange and supports streaming and bidirectional communication.

5. WebSockets 🌐💬
WebSockets are like real-time phone calls ☎️ for the web. They enable two-way communication, perfect for chat apps and live updates.

6. MQTT 📡
MQTT (Message Queuing Telemetry Transport) is like a radio broadcast 📻, designed for low-bandwidth, high-latency, or unreliable networks. Ideal for IoT devices and sensor data.

Читать полностью…

Computer Science and Programming

HTTP status codes are three-digit numbers that are returned by a web server in response to a client's request made to the server via HTTP (Hypertext Transfer Protocol).

These status codes provide information about the outcome of the request, indicating whether it was successful, encountered an error, or needs further action. They are an essential part of the HTTP protocol, helping both clients (e.g., web browsers) and servers communicate effectively.

Читать полностью…

Computer Science and Programming

Prod Software Release

1. Planning:
- Identify the goals and features for the upcoming release.
- Prioritize tasks based on importance and dependencies.
- Define timelines and allocate resources accordingly.

2. Development:
- Programmers start coding based on the planned features.
- Regular code reviews and collaboration to maintain code quality.
- Version control systems track changes for better collaboration.

3. Building Artifact:
- Compile the source code into executable or deployable artifacts.
- Generate documentation and other necessary files.
- Automation tools can be used to streamline this process.

4. Testing:
- Conduct various levels of testing (unit, integration, system, etc.).
- Identify and fix bugs or issues.
- Ensure compatibility with different platforms and configurations.

5. Release:
- Once testing is successful, prepare for the release.
- Generate release notes documenting changes and updates.
- Coordinate with other teams for a smooth rollout.

Environments:
- Set up different environments for development, testing, and production.
- Ensure consistency across environments to minimize deployment issues.
- Monitor and troubleshoot any discrepancies between environments.

Читать полностью…

Computer Science and Programming

Angular 17 and the new angular.dev site has been officially released.

Here's a summary of what's new.

Читать полностью…
Subscribe to a channel