SShortSingh.

Programming

0
ProgrammingDEV Community ·

DEV Community Article Details Shipping Cutoff Rules for Warehouses

A DEV Community article presents a function designed to calculate whether same-day shipping is possible from a warehouse. The function checks local time against cutoffs, considers holidays, blackout carriers, weekends, and VIP service extensions. It is explicitly labeled as a teaching example, not code from a live production system. The article includes a table of twelve test cases to verify the function's behavior under different time zones and conditions.

0
ProgrammingDEV Community ·

WANDER App Uses Local AI to Generate Personalized Outdoor Missions

The WANDER app is an offline-first AI companion designed to encourage users to explore their surroundings. It uses Google's Gemma 3 4B model running locally via Ollama to generate three personalized outdoor missions based on user mood, available time, and weather. The app operates with a privacy-first approach, storing user journals and activity history locally on the device using SQLite. After selecting a mission, users are prompted to put their phones away and engage with their environment. The project was submitted for the Hacktoberfest Open-Source AI Challenge and is currently in early development stages.

0
ProgrammingDEV Community ·

Algorithm solves 'celebrity problem' efficiently with linear time

The celebrity problem asks to identify a person in a group whom everyone knows but who knows no one else. It is typically represented by an n x n matrix where entries indicate whether one person knows another. A naive brute-force solution requires O(n²) time to check all relationships. However, a more efficient algorithm can find a potential candidate in O(n) time using a single pass, then verify the candidate with a second pass. This optimized approach uses constant extra memory, improving on earlier stack-based linear-time methods.

0
ProgrammingDEV Community ·

Using SSH AllowUsers directive requires careful configuration to avoid lockouts

The OpenSSH AllowUsers directive provides server-side access control by specifying which user accounts can connect via SSH. This setting must be placed in the active SSH server configuration, not in client-side configuration files. Administrators must ensure all necessary accounts including administrators, automation, and recovery logins are included before applying the rule. A typo or incomplete list in the AllowUsers directive can lock out authorized users even with valid credentials. Testing configuration syntax and maintaining existing connections during changes is recommended to prevent accidental lockouts.

0
ProgrammingDEV Community ·

Verdantra: Open-source AI field journal encourages outdoor exploration

A developer has created Verdantra, an open-source AI-powered botanical field journal. The application allows users to take photos of outdoor subjects like plants and rocks for AI-assisted analysis. It offers both online and offline modes, using Google's Gemini API or a local Gemma model. The tool is designed to guide real-world observation rather than replace it, emphasizing uncertainty and safety. The project is currently available to run locally from its GitHub repository.

0
ProgrammingDEV Community ·

Poloniex Gas Audit Finds Inefficiencies Costing Millions Quarterly

A gas optimization audit of the Poloniex exchange's on-chain contracts was completed on October 11, 2026. The audit examined the gas costs of core functions managing approximately $1.65 billion in assets. It identified 28 inefficiency patterns increasing average user transaction costs by about 12%. These patterns are estimated to result in $3-5 million in excess gas fees per quarter. The report provides remediation steps, with the top five fixes potentially saving $1.2 million quarterly.

0
ProgrammingDEV Community ·

OAuth 'Sign in with Google' round trip prevents password sharing, enhances security

The OAuth protocol's redirect process for services like 'Sign in with Google' exists to prevent users from sharing passwords with third-party sites. Instead, the site redirects you to Google, where you authenticate and approve specific permissions. The site then receives a time-limited, scoped access token, not your password. This system allows users to revoke access later and protects against compromised passwords, though users must still be cautious about approving malicious apps at the consent screen.

0
ProgrammingDEV Community ·

Diagnose SSH connection resets before changing server configuration

An SSH connection reset occurs after the TCP connection is established but before authentication begins. To diagnose, first run the SSH client in verbose mode to see where the connection stops. Next, verify basic TCP connectivity to the SSH port using tools like netcat. Then, check the server's SSH service status and logs for clues. Finally, before altering configuration, confirm if a security tool like Fail2ban has blocked the client's IP address.

0
ProgrammingDEV Community ·

Developer Creates AI App 'Look First' to Encourage Nature Observation Over Screen Time

A developer has created an AI application called Look First for the DEV Hacktoberfest Open-Source AI Challenge. The app is designed to reduce phone use during outdoor walks by prompting users to perform small observational tasks before providing any identifications. It operates entirely within a web browser using Google's open-weight Gemma model, requiring no installation or API keys. The developer built the tool to invert typical engagement metrics, aiming for minimal usage time as a measure of success.

0
ProgrammingDEV Community ·

Linux services can appear active while applications are unresponsive

Systemd, the Linux process supervisor, reports a service as active simply because its main process ID exists in the kernel's task list. It does not monitor whether the application is actually ready to handle network traffic or is healthy internally. This can lead to situations where a service shows a green, running status but is frozen, deadlocked, or otherwise unable to accept connections. The disconnect occurs because systemd's role is process supervision, not application health inspection.

0
ProgrammingDEV Community ·

Algorithm solves celebrity identification problem with linear time, constant space.

The 'Celebrity Problem' involves identifying a single person in a group who is known by everyone but knows no one else. It can be solved by checking relationships represented as a square matrix. A naive brute-force method requires checking all pairs, making it slow. An optimized algorithm uses a two-phase approach to find a candidate in linear time and verify it with constant memory.

0
ProgrammingDEV Community ·

Node.js retrieval architecture for restaurant menu assistants requires staged design with deletion semantics

A staged retrieval architecture is recommended for Node.js restaurant menu assistants to manage data lifecycle, not just user interface actions. When a dish is removed from point-of-sale systems, it must become ineligible for retrieval while remaining accessible for audit purposes to explain past answers. The core challenge is preventing outdated, semantically similar menu items from surfacing in queries due to unchecked retention of historical data in active collections. This requires procedural fixes: assigning canonical identities, marking tombstones for deletion, and validating query hits for active status before presenting results to users.

0
ProgrammingDEV Community ·

FitQuest AI App Uses Local AI to Gamify Outdoor Fitness Activities

FitQuest AI is a new open-source fitness application that transforms outdoor movement into gamified quests. The app uses a local AI model to generate personalized outdoor challenges for activities like walking, running, and cycling. It encourages users to spend less screen time by planning activities through AI before putting their phones away. The project was developed as part of the Hacktoberfest Open-Source AI Challenge's 'Touch Grass' week. Developers designed the privacy-focused app to help desk workers incorporate more outdoor activity into their routines.

0
ProgrammingDEV Community ·

Meta releases Llama 4 Scout, an open-source AI model with 1 million token context

Meta's FAIR team has released Llama 4 Scout, an open-source AI model. It uses a Mixture-of-Depths architecture to dynamically allocate computing power, making it more efficient. The model natively supports a context window of one million tokens, allowing it to process very long documents. It shows competitive performance on coding, math, and reasoning benchmarks compared to leading proprietary models. The model is available for download and can run on enterprise-grade hardware.

0
ProgrammingDEV Community ·

Google Quantum AI achieves verifiable quantum advantage with 105-qubit Willow processor

Google Quantum AI has demonstrated verifiable quantum computational advantage using its new 105-qubit Willow processor. The processor solved ground-state electronic structure calculations for industrial transition-metal complexes in under five minutes. Google claims this same calculation would require approximately 4,200 years on the world's fastest classical supercomputer. The benchmark focused on the nitrogenase iron-molybdenum cofactor, a complex important for biological nitrogen fixation. This marks a shift from previous quantum demonstrations by solving real-world molecular chemistry problems rather than synthetic benchmarks.

0
ProgrammingDEV Community ·

Florida developer secures Netlify home server webhooks with HMAC and timestamps

A Florida-based developer has detailed a method for securing webhooks sent from Netlify to a home server. The setup addresses security risks like spoofing and replay attacks. The solution uses HMAC-SHA256 signatures and timestamp validation on HTTP POST requests. The sending function signs each payload with a shared secret, and the home server verifies the signature and timestamp. This prevents unauthorized or repeated requests from being processed.

0
ProgrammingDEV Community ·

Docker Compose depends_on does not wait for database readiness, causing flaky tests

A developer discovered that Docker Compose's depends_on directive in its short form only waits for a container to start, not for the service within it to become ready. This caused 11 out of 50 test runs to fail because the application attempted to connect to Postgres before it was accepting connections. The failure rate of 22% was especially problematic in fresh CI environments where database initialization takes longer. The article explains that the correct solution is to use the long form of depends_on with a healthcheck condition and to configure a specific TCP-based healthcheck command for Postgres.

0
ProgrammingDEV Community ·

AI game REALITY.EXE encourages players to explore physical world

REALITY.EXE is a scavenger-hunt game developed for Hacktoberfest's AI Challenge that uses the physical world as its environment. Players receive AI-generated missions requiring them to leave screens behind and search their surroundings for objects matching clues. Evidence is submitted as photographs, which are analyzed by a vision-language model to verify completion. The open-source project runs locally using models like Gemma3 via Ollama, allowing development without paid cloud APIs. The game aims to use AI to promote real-world interaction rather than increased screen consumption.

0
ProgrammingDEV Community ·

TrailQuest open-weight AI app builds walking quests, then prompts users to put phones away

TrailQuest is an open-source fitness app that generates personalized walking quests based on a user's mood, energy, and available time. It then displays a simple timer instructing users to put their phones away and complete the walk. The app uses the Gemma AI model via Ollama to create quests, but a rules-based backup system ensures a safe workout is always provided if the AI fails. Developed for Hacktoberfest, the project emphasizes user privacy by running the AI locally and is built with React, FastAPI, and SQLite.

0
ProgrammingDEV Community ·

Compressed 27B AI model outperforms full version on function calling benchmark

Underdog Research released a 7.89 GB compressed version of the Qwen3.8-27B AI model called Saluki 27B. The compressed model scored 88 out of 120 on the team's proprietary function calling test suite in October 2026, while the original 54 GB model scored 84. Saluki uses a mixed 2-bit quantization technique and runs on standard llama.cpp without special builds. The creators note that while Saluki excels in single and multi-choice function selection, its mathematical performance declined by 15-18%.

← NewerPage 525 of 3136Older →