Categories
Computer Science Discovery Innovation Invention Learning Science Science and Technology Technology

Hello Everyone! Welcome to StellarRimz, the Science and Tech Hub

Welcome all to the new era of Science and Technology. There have been a lot of advancements in Science and Technology till now. So, we are here to get updated with all latest technologies and innovations. It’s going to be an interesting journey with you all!

Science and technology

Learning Sciences (LS) is an interdisciplinary field that works to further scientific, humanistic and critical theoretical understanding of learning as well as get involved in the design and implementation of innovations, and the improvement of instructional methods. Research in the learning sciences basically focuses on cognitive-psychological, social-psychological, cultural-psychological and critical theoretical foundations of human learning, as well as on designing of learning environments. Major contributing fields include cognitive science,  educational psychology,  computer science, applied linguistics and anthropology . Over the past decade, researchers have also expanded their concentrate to the design of curricula, informal learning environments, instructional methods, and policy innovations.

Why to Learn Science and get in touch with latest technologies?

Science and technology are closely related with our lives. They are closely linked aspects of society and the studies and developments in both these fields are very essential for the overall progress of mankind and humanity.

Scientific research mainly comprises of a wide variety of fields ranging from the study of different branches of science to relatively advanced fields like space exploration, Artificial Intelligence, Machine Learning, human genetics, and cloning. Scientific study attempts to explore and understand and innovate the working of the physical world. It tries to analyze and the occurrences in nature and gain knowledge about nature through experimentation. As scientific research targets at acquiring knowledge of the complexities in nature and finding solutions to unsolved problems, it is important for the progress of mankind. The seemingly impossible feats have been made possible, pay credit to scientific research and innovations in Technology.

Science and Technology

Types of Science studies:

  1. Natural Sciences.
  2. Artificial Sciences.

Natural sciences are concerned with the study of nature and human life. The Artificial Sciences deal with developing and inventing the new devices, scientific products, medicines, artificial technologies machines and infrastructure. The studies of natural and artificial sciences reveal the relationships between nature and human life. Research in science has paved a path to many brilliant inventions and discoveries.

The importance of technology resides in its manifold benefits to society. There are many positive effects of technology . The advancement in this area has revolutionized human life. It has provided an impetus to the computer and the telecommunication industry. The developments in communication technology have made the world a smaller place connecting every corner of the world. The Internet serving as an excellent communication platform has made the world flat and an easier to live place.

The World Wide Web has proved to be an enormous information network foundation, from which information can be retrieved by the means of search engines. Information from all around the world is clubbed and hosted on the web. Pay credits to development of web technology, the information can be stored in an organized manner and relevant information can be retrieved on supplying search strings to web search engines.

Digitization of information has been a major breakthrough in the world of information technology. It has made possible the compact storing of information, which in turn allows efficient information storage.

The most important benefit of science has been the luxury it has brought to daily life. The automation and machine advancement of industrial processes has reduced human efforts. Household appliances and and innovative products that are in daily use of the common man are a result of developments in science. Machines can do monotonous and risk-bearing tasks and hence protecting man from monotonous as well as dangerous but yet important tasks . Scientific discoveries have made human life easy and luxurious.

Without Science and Technology human life is almost unstable and meaningless.

Hope you enjoy the post! please drop your comments in below comments section. 🙂 Thank you for reading!

Categories
ecosystem environment Recycling sustainability

Plastic Recycling Practices: Dos and Don’ts

While surfing the web and social media, I came across how people are spreading awareness about plastic pollution, and also promoting eco-friendly products, recycling options, and solutions. This is a great advancement that people are at least aware of and taking possible steps and thinking about ways to avoid such pollution disasters.

While it is good that such kind of awareness is spread, there is a concern I wanted to elaborate on. Practices like eco‑bricks (plastic bricks), house-construction foams, plastic roads, benches, fences, and doors made from waste plastics are often promoted as “recycling,” but in reality, they are ill-suited practices because they don’t neutralize plastic at all. They simply delay pollution.

The foam used in home construction (like polyurethane foam, polystyrene foam, or spray insulation foams) is also harmful when looked at through the same lens as plastics.

🏠 Why Construction Foam or Plastic Is Harmful
  • Chemical Off‑gassing: Foams release volatile organic compounds (VOCs) during installation and slowly over time, contributing to indoor air pollution.
  • Microplastic Shedding: As foam panels or spray layers age, they crumble into fine particles that enter dust, soil, and water.
  • Non‑biodegradable: Like other plastics, foams persist for centuries, breaking into microplastics rather than decomposing.
  • Fire Risk & Toxic Smoke: When burned, foam releases highly toxic fumes (cyanide, dioxins, styrene), far more toxic than those from wood or other natural materials.
  • Groundwater Pollution: Outdoor foam (used in walls, roofs, or packaging) weathers and leaches chemicals into soil and water.
🌍 Why It’s “Delayed Pollution”
  • Heat & Sunlight Exposure Plastic in open structures (roads, benches, fences) is constantly exposed to UV radiation and heat. This accelerates photodegradation, breaking plastics into microplastics that leach into soil and air.
  • Weathering & Abrasion Rain, wind, and mechanical wear (vehicles on roads, people using benches) grind the plastic surfaces, releasing tiny fragments into the environment.
  • Chemical Leaching Additives in plastics (plasticizers, stabilizers, flame retardants) slowly leach out into the surrounding soil and groundwater. Even if the plastic looks “locked in,” toxins seep over time.
  • Fume Release Under high heat (roads in summer, direct sunlight), plastics can release volatile organic compounds (VOCs) and fumes, contributing to air pollution.
  • False Sense of Solution. These applications make people feel plastics are “reused,” but in reality, they just shift the pollution timeline — instead of immediate disposal, the release happens gradually in the environment.
⚖️ The Core Problem
  • Eco‑bricks and plastic fillers don’t neutralize plastics; they just store them in public spaces.
  • Eventually, those plastics return to the environment as microplastics, fumes, or leachates.
  • True solutions require closed‑loop recycling (chemical recycling, pyrolysis, or safe reuse in controlled environments) or biodegradable alternatives.
Some Do’s and Don’ts while handling recyclable plastic
Do’s❌ Don’ts
Use DIY sand + biochar filters for awareness and small‑scale water cleaning.Rely only on household filters as a permanent solution.
Focus on source control: intercept plastics at rivers, drains, and industrial discharge.Ignore upstream pollution and expect filters to solve everything.
Promote closed‑loop recycling (chemical recycling, pyrolysis, controlled reuse).Make eco‑bricks, plastic roads, benches, or fences that weather outdoors.
Encourage biodegradable alternatives and reduction of single‑use plastics.Treat plastic “reuse” projects as safe without considering long‑term leaching.
Collect trapped microplastics from filters for safe storage or controlled repurposing.Leave filters clogged or dispose of them carelessly, re‑releasing plastics.
Use community awareness projects to show visible pollution capture.Create a false sense of solution by embedding plastics in public structures.

I welcome any suggestions, views, and thoughts on these issues / serious issues.

“Stay Safe, Stay Healthy!”♻️

Thank you for reading!

Categories
Computer Science

Software Development Life Cycle (SDLC)

The Software Development Life Cycle (SDLC) is a structured framework that directs the process of planning, creating, testing, deploying, and maintaining software. Its prime goal is to deliver superior, profitable, and maintainable software that meets user requirements within defined timelines and resources.

Core Phases of SDLC

Planning & Requirement Analysis – Define project scope, gather requirements from stakeholders, and assess feasibility. This stage produces the Software Requirement Specification (SRS) document.

Defining Requirements – Finalize and document functional and non-functional requirements with stakeholder approval.

Design – Create High-Level Design (HLD) and Low-Level Design (LLD) documents, outlining architecture, modules, interfaces, and database structures.

Development (Coding) – Implement the design using chosen programming languages and tools, following coding standards.

Testing & Integration – Conduct unit, integration, system, and acceptance testing to ensure the product meets SRS specifications.

Deployment – Release the software in phases (beta, full release) and ensure smooth integration into the production environment.

Maintenance – Apply updates, fix bugs, and enhance features to keep the software relevant and secure.

Categories
Coding Computer Science Python

Solving Problem: Maximize It!

Refer: Maximize It! | HackerRank

maximize.py
Python
import itertools
def f(x):
return x**2
def maximized(K,M):
S = []
li1 = []
for i in range(K):
inp1 = list(map(int,input().split()))
li = inp1[1:]
li1.append(li)
combinations = list(itertools.product(*li1))
for i in combinations:
Si = sum([f(x) for x in list(i)])%M
S.append(Si)
return max(S)
if __name__== "__main__":
inp = list(map(int,input().split()))
K, M = inp[0], inp[1]
print(maximized(K, M))

All tests passed!

Please feel free to drop any suggestions or input.

Happy coding!!!

Categories
Artificial Intelligence Computer Science

Retrieval Augmented Generation (RAG)

There is a trending term that is floating around in the Artificial Intelligence (AI) field, i.e., “RAG”. So, to satisfy the curiosity, let’s get to know what RAG is. Before that, let us have a brief idea of Generative AI.

Generative AI is an Artificial Intelligence system capable of creating new and original content in the form of text, code, images, audio, and video by learning patterns from large datasets or Large Language Models (LLMs) and analyzing and applying them to produce contextually relevant outputs.

How does it work?

Training: Deep Learning models are trained on large datasets to learn patterns and relationships.

Tuning: Fine-tuning the AI model with LoRA/QLoRA ranking techniques or Reinforcement Learning from Human Feedback (RLHF).

Generation: The AI responds to user queries and prompts by generating text, images, audio, or video based on up-to-date, factual data.

The generative models use “Transformers” to predict the next tokens based on context and produce logical text.

Below is an example of a code snippet that uses transformers to generate the response to a user query:

transformer.py
Python
from transformers import pipeline
# Load a pre-trained text generation pipeline
generator = pipeline("text-generation", model="gpt5")
# Generate text based on a prompt
prompt = "In the future, AI will"
result = generator(prompt, max_length=50, num_return_sequences=1)
print(result[0]['generated_text'])
Types of models:

Transformers: Text/code generation based on LLMs and uses self-attention for context capture.

Diffusion models: Generate high-quality images/audio by iterative denoising.

GANs and VAEs: Image synthesis, style transfer, data augmentation

Encoder-Decoder: Translation, Summarization, and Multimodal tasks.

Generative AI Applications:

Text-generation (chatbots, summarization, and code generation), Image-generation (Art, medical images), Audio-generation (voice synthesis, music creation), Video-generation (animation, simulation).

Limitations of Generative AI
  • Generative AI models are prone to hallucinations and thus are less accurate.
  • Generative AI is not real-time. It is limited to its training cut-off, i.e., it does not access updated information until it is retrained.
  • It lacks access to the internal and proprietary data (For example, company reports, release notes, etc.).
  • It works with Large models and datasets. So it is resource-intensive with respect to compute and storage. So, fine-tuning becomes difficult.

These limitations make the urge to think about an improved methodology and architecture. Here is where “RAG” comes into the picture.

Retrieval Augmented Generation (RAG) is a technique that adds relevant context to AI, resulting in improved and accurate responses.

RAG Architecture
Generative AI vs RAG Comparison:
AspectGenAIRAG
AccuracyProne to hallucinationsGrounded in retrieved sources
Knowledge FreshnessStatic, limited to training cutoffDynamic, can access real-time data
Domain AdaptabilityWeak with proprietary/internal dataStrong, integrates custom datasets
Resource NeedsHigh (training/fine-tuning)Lower (retrieval pipeline setup)
CreativityStrong (novel, diverse outputs)Moderate (depends on retrieved context)
TraceabilityLimited (no source attribution)High (answers linked to documents)

Knowledge Index – An external knowledge source is a foundation for a RAG system. The knowledge source can be any domain-specific custom dataset, documents, databases, APIs, or structured tables.

Document Loader – The document loader standardizes and normalizes the documents from knowledge index data sources such as local files, web pages, cloud storage, or databases. The text splitter extracts the text, splits the text into chunks, and enriches it with metadata for the embedding phase.

Embedding – The text chunks are converted into numerical vectors using embedding models and capturing semantic meaning.

Vector Store – The embeddings are stored in a vector database or vector store. The vector database enables fast similarity searches and retrieves relevant context based on the user’s query.

Retriever – The query encoder converts the user input into a vector representation. The retriever then searches the vector database using semantic similarity or other search techniques to fetch the most relevant chunks of information.

Ranker – The ranker will carry out duplication, relevance ranking, and context enrichment on the vector embeddings. The retrieved and ranked chunks are then combined with the user query to generate a better and more accurate response.

Generator – The generator is the large language model (LLM) that synthesizes the retrieved context and user query to produce a grounded response. The modern RAG systems may use generators for query rewriting, self-evaluation, and corrective re-retrieval.

Output response – Output response is a formatted final response that is sent to the user.

Updator (Optional) – Some RAG systems use an updator to refresh and re-embed the data to ensure the knowledge base remains current and updated. The updator can be equipped with an agentic framework for automated refreshment of knowledge base.

RAG stands for Retrieval Augmented Generation.

  • Retrieval – Find relevant information.
  • Augmentation – Add data to AI’s knowledge.
  • Generation – Generate a better and more accurate response.

The purpose of RAG is to add relevant context to AI and generate an accurate response.

Categories
ecosystem environment sustainability

Bioplastic vs Plastic

A bioplastic is a material that is derived from renewable biological sources.

Key Properties

Biodegradability: Many bioplastics can decompose naturally through microbial action, turning into water, carbon dioxide, and biomass. This property helps mitigate plastic pollution.

Mechanical Properties: Bioplastics exhibit a range of mechanical properties, including flexibility, strength, and durability. Polylactic acid (PLA) is known for its rigidity, while polyhydroxyalkanoates (PHA) offer flexibility and toughness.

Thermal Properties: Bioplastics can have varying heat resistance, which affects their processing and application. Some bioplastics, such as PLA, have lower melting points, making them suitable for certain applications but limiting their use in high-temperature environments.

Barrier Properties: Certain bioplastics provide excellent barrier properties against gases and moisture, making them suitable for food packaging and other applications where preservation is crucial.

Sustainability: By utilizing renewable resources and often requiring less energy to produce than conventional plastics, bioplastics can contribute to a lower carbon footprint. They can also be produced from waste materials, further enhancing their sustainability.

PropertyBioplasticPlastic
DurabilityLess DurableMore Durable
BiodegradabilityBio-degradableNon-biodegradable
CompositionMade of renewable biomass sources like corn starch, sugarcane, potato starch, algae, vegetable oils etc.Made of fossil fuels such as crude oil and natural gas
Production processFermentation, enzymatic reactions, chemical synthesis from biomassPolymerization of petrochemicals
Environmental impactLower carbon footprint, potential soil benefitsHigh pollution, long lasting waste harmful for land and waterbodies
CostHigher (2x -3x)Low
ApplicationsSustainable packaging, eco-friendly products and disposable items Packaging, consumer goods, and automotive

Although traditional plastics are widely used in day-to-day products, it is very harmful to the nature – land, soil, waterbodies, plants, and animals if disposed of carelessly.

Moreover, there is no awareness among people about how a simple polyethene bag or packet of chips thrown on the streets will create a nuisance in the surroundings. Stray animals on the streets and in the surrounding areas are unaware of the toxic material, and they can consume it, causing a serious health hazard. People should take responsibility for their own actions and the nature in which they live.

Plastic pollution is a serious issue as it takes about 500 years for plastic to decompose. Moreover, it releases toxic chemicals and also microplastics during decomposition. The rivers, the oceans, the forests, and the public places are getting clogged with plastic waste. There are mountains of waste forming in landfills, which, if untreated, cause groundwater pollution and, if openly incinerated, cause air pollution – all because of poor waste management, ignorance, lack of knowledge, and awareness.

It is time to stop producing additional plastic and start recycling and treating existing plastic. It is time to switch to more sustainable materials and products – for our own good and the future of humanity.

I hope everyone understands the seriousness of pollution and starts adapting to eco-friendly products and a lifestyle.

Categories
Computer Science

Solving Problem: Count Elements Greater Than the Previous Average

Given an array of positive integers, return the number of elements that are strictly greater than the average of all previous elements. Skip the first element.

Example

Input

responseTimes = [100, 200, 150,300]

Output

2
responsetimes_regressions.py
Python
def countResponseTimeRegressions(responseTimes):
# Write your code here
count = 0
for i in range(1, len(responseTimes)):
if responseTimes[i] > sum(responseTimes[:i])/i:
count += 1
return count
if __name__ == '__main__':
responseTimes_count = int(input().strip())
responseTimes = []
for _ in range(responseTimes_count):
responseTimes_item = int(input().strip())
responseTimes.append(responseTimes_item)
result = countResponseTimeRegressions(responseTimes)
print(result)

Compiler Message

Success

Input (stdin)

1

100

Output (stdout)

0

Expected Output

0

Count Elements Greater Than Previous Average | HackerRank

Categories
Coding Computer Science Python

Solving Problem: Sum of Multiples

The sum of multiples of k below n is:

Formula:

Sk=km(m+1)2

where m=n1k.

Find the sum of multiples of 3 or 5 below N.

For example:

If we list all the natural numbers below that are multiples of  3 or 5, we get 3, 5, 6, and 9. The sum of these multiples is 23.

Input Format

The first line contains  T, which denotes the number of test cases. This is followed by T lines, each containing an integer, N.

Constraints

  • 1 <= T <= 10^5
  • 1 <= N <= 10^9

Output Format

For each test case, print an integer denoting the sum of all the multiples of 3 or 5 below N.

Sample Input 0

2
10
100

Sample Output 0

23
2318

Explanation 0

For if we list all the natural numbers below 10 that are multiples of  3 or 5, we get 3, 5, 6, and 9. The sum of these multiples is 23.

Similarly, for N=100, we get 2318.

sum_of_multiples.py
Python
#!/bin/python3
import sys
t = int(input().strip())
if 1 <= t <= pow(10,5):
def sum_of_multiples(k, limit):
m = (limit - 1) // k
return k * m * (m+1) // 2
for a0 in range(t):
n = int(input().strip())
s3 = sum_of_multiples(3, n)
s5 = sum_of_multiples(5, n)
s15 = sum_of_multiples(15, n)
total = s3 + s5 - s15
print(total)

Input (stdin)

  • 2
  • 10
  • 100

Your Output (stdout)

  • 23
  • 2318

Expected Output

  • 23
  • 2318
sum_of_multiples1.py
Python
import sys
t = int(input().strip())
if 1 <= t <= pow(10,5):
for a0 in range(t):
n = int(input().strip())
total = 0
# print("n = ", n)
if 1 <= n <= pow(10,9):
if n == 1:
total = n
li = [i for i in range(1, n) if (i%3 == 0 or i%5 == 0)]
total = sum(li)
print(total)

The above code has O(n) complexity; however, it fails under memory constraints. When used with the arithmetic formula, the time complexity becomes O(1).

Contests | HackerRank

Categories
Coding Computer Science Python

Solving Problem: Incorrect Regex

(Python)

You are given a string S.
Your task is to check whether S is a valid regex.

Input Format

The first line contains an integer T, the number of test cases.
The next T line contains the string S.

Constraints

0 < T < 100

Output Format

Print “True” or “False” for each test case without quotes.

Sample Input

2
.*\+
.*+

Sample Output

True
False

Explanation

.*\+ : Valid regex.
.*+: Has the error multiple repeat. Hence, it is invalid.

validate_regex.py
Python
import re
# validate regex
def is_valid_regex(T, patterns):
for i in range(0, T):
S = str(raw_input())
try:
re.compile(S)
print(True)
except:
print(False)
if __name__ == "__main__":
# User input
T = int(input())
patterns = [r".*\+"]
output = is_valid_regex(T, patterns)

Incorrect Regex | HackerRank

Categories
Coding Computer Science Python

Solving Problem: Combinations

(Python)

You are given a string S.
Your task is to print all possible combinations, up to size, of the string in lexicographically sorted order.

A single line containing the string and integer value separated by a space.

0 < k <= len(S)


The string contains only UPPERCASE characters.

Print the different combinations of the string on separate lines.

HACK 2

Sample Output

A
C
H
K
AC
AH
AK
CH
CK
HK
combinations.py
Python
from itertools import combinations
# Input from user
inp = input().split()
S = inp[0]
k = int(inp[1])
li1 = []
# Create a list with combinations
for i in range(1, k+1):
li1.extend(list(combinations(S, i)))
# Sort the list lexicographically
for i in range(0, len(li1)):
li1[i] = str(''.join(sorted(list(li1[i]))))
li1 = sorted(li1, key=lambda s: (len(s), s.lower())) # sort the list alphabetically ascending
# print the string
for i in range(0, len(li1)):
print(li1[i])

itertools.combinations() | HackerRank

Categories
Computer Science

BFS and DFS

(DSA – Tree Traversal)

BFSDFS
(Breadth First Search)(Depth First Search)
ParameterBFSDFS
Full FormBreadth First SearchDepth First Search
DefinitionBFS (Breadth First Search) is a graph traversal concept where nodes are traversed on same level before moving to next level.DFS (Depth First Search) is a graph traversal concept where nodes are traversed to depth until a node is reached with no unvisited neighbours.
Data StructureQueueStack
ConceptTree builds level by level.Tree builds sub-tree by sub-tree.
ApproachFirst In First Out (FIFO)Last In First Out (LIFO)
SourceBetter when target is closer to given source.Better when target is farther from given source.
ApplicationsBipartite Graphs, Shortest Path etc.Acyclic Graphs, Find Strongly Connected Components etc.
Python
#DFS and BFS
from collections import deque
# Define the graph
graph = {
'A': ['B', 'C'],
'B': ['A', 'D', 'E'],
'C': ['A', 'F'],
'D': ['B'],
'E': ['B', 'F'],
'F': ['C', 'E']
}
# BFS - Breadth First Search
def bfs(graph, start):
visited = {start}
queue = deque([start]) # FIFO: First In First Out
while queue:
node = queue.popleft() # return leftmost element
print(node, end=' ')
for neighbour in graph[node]:
if neighbour not in visited:
visited.add(neighbour)
queue.append(neighbour)
# DFS - Depth First Search
def dfs(graph, start):
visited = set()
stack = [start] # LIFO: Last In First Out
while stack:
node = stack.pop() # return rightmost element
if node not in visited:
print(node, end= ' ')
visited.add(node)
stack.extend(reversed(graph[node]))
print("BFS Traversal:")
bfs(graph, 'A') # Output: A B C D E F
print("\nDFS Traversal:")
dfs(graph, 'A') # Output: A B D E F C

V = number of vertices (nodes)

E = number of edges

Time and Space Complexity:

  • BFS: Complete, finds the shortest path in unweighted graphs, O(V+E) time, O(V) space due to the queue.
  • DFS: Not always complete without safeguards, may not find the shortest path, O(V+E) time, space O(h) for recursion depth or O(V) for iterative stack.
  • BFS is slower and requires more memory space than DFS.
  • Choice depends on graph size, depth, and whether shortest path or memory efficiency is the priority.