Painel de Notícias

Tecnologia

7045 posts · 26 feeds · tópicos e interesse por Jev

Filtros
dev.to

How to Practise Java Daily: A Simple Routine for Students?

Most students who struggle with Java don’t lack ability. They lack a routine. They watch a long tutorial on Sunday, feel productive, and then can’t write a loop from memory on Wednesday. Java rewards the opposite pattern: short, repeated, hands-on sessions where you type code yourself, break it, and fix it. Here is a daily routine simple enough to survive a college timetable. Why Daily Practice Beats Weekend Marathons It also helps to stop measuring progress in hours. Measure it in small, finished outputs: one small program written, one problem solved, one bug fixed, or one concept understood. A day that produces one of those counts as a productive day. The 30-Minute Daily Java Routine Block Time What to Do Warm-up 5–10 minutes Retype or revise yesterday’s code from memory, without looking Build 15–20 minutes Learn one new concept and use it in a small program Reflect 5 minutes Note what worked, what broke, and what you will do tomorrow Warm-up. Open your editor and rewrite a small piece of yesterday’s program without peeking. This is spaced repetition in practice, and it exposes gaps immediately. Build. Pick exactly one idea, such as a for loop, a method with parameters, or an ArrayList, and write a tiny program that uses it. Resist the urge to read about three topics at once. Reflect. Keep a short “Java journal” in a notes app or notebook. One or two lines are enough: what concept you touched, what error you hit, how you fixed it. Over weeks, this becomes a personal record of your own recurring mistakes, which is more useful than any generic checklist. A Weekly Plan So Practice Doesn’t Get Repetitive Day Focus Monday New concept (syntax, data types, operators) Tuesday Practice problems on Monday’s concept Wednesday Object-oriented basics (classes, objects, constructors) Thursday Practice problems or debugging exercises Friday Collections and strings Saturday Mini project (longer session, 60–90 minutes) Sunday Revision and journal review, or rest Rest days are not

Dev
Interesse
dev.to

Building a Production-Ready CRUD API in Laravel: Menu Categories for Django Developers

Building a Laravel CRUD API: Menu Categories for Django Developers As a Django developer learning Laravel, one of the first things I wanted to understand was how Laravel handles CRUD APIs. In Django REST Framework, I would normally use a model, serializer, ViewSet, and router. Laravel has similar concepts, but they are organized differently. In this article, I'll build a menu-categories API with: Create The goal is not just to make the endpoint work, but to structure it in a way that is maintainable in a production application. Django vs Laravel Coming from Django, this mapping helped me understand Laravel faster: Django REST Framework Laravel Our MenuCategory Model Suppose we already have the following model: 'boolean', 'sort_order' => 'integer', ]; public function warehouse(): BelongsTo { return $this->belongsTo(Warehouse::class); } public function kitchenSection(): BelongsTo { return $this->belongsTo(KitchenSection::class); } public function menuItems(): HasMany { return $this->hasMany(MenuItem::class); } } An important business rule here is: warehouse_id = NULL means the category can be available to all warehouses. Create the Laravel Files Instead of manually creating everything, Laravel provides Artisan commands. php artisan make:controller Api/MenuCategoryController Our structure becomes: app/ routes/ Validate Create Requests Instead of putting validation inside the controller, Laravel allows us to use Form Requests. StoreMenuCategoryRequest.php: [ 'required', 'string', 'max:255', ], 'warehouse_id' => [ 'nullable', 'integer', 'exists:warehouses,id', ], 'sort_order' => [ 'nullable', 'integer', 'min:0', ], 'kitchen_section_id' => [ 'nullable', 'integer', 'exists:kitchen_sections,id', ], 'is_active' => [ 'sometimes', 'boolean', ], ]; } } This is similar to validation in a Django REST Framework serializer. Validate Update Requests UpdateMenuCategoryRequest.php: [ 'sometimes', 'string', 'max:255', ], 'warehouse_id' => [ 'sometimes', 'nullable', 'integer', 'exists:w

Dev
Interesse
dev.to

System design for physical AI: read-only fire protection monitoring across a hundred factories

This is the engineering summary of an open reference architecture. The paper, its object model as JSON and the model register are free to reuse under CC BY 4.0: https://muhammadumar89.github.io/codeninja-research/factory-fire-monitoring-saudi-arabia/. The operator is described by class, never by name. An operator of industrial cities in Saudi Arabia has a factory estate in the thousands, a hundred of them classed high risk. Fire alarm panels, fire pumps, fire water tanks and energy meters each hold a fragment of fire readiness, and none of it reaches the operator until a periodic round or an incident. The requirement is live, read-only visibility of all four across the highest-risk factories, published into the operator's own IoT platform, with no server or GPU asked for and no write path into certified life-safety equipment. Here is how that turns into a system. Panel general alarm status comes from dry contacts. Pump run, fault and fail-to-start come from controller PLC inputs and relays. Tank level comes from submersible transmitters, energy from CT meters. Every interface is a read into certified equipment; the design never issues a command to a panel, pump or valve. Monitoring beats control where life safety is. Fourteen typed objects: high-risk factory, fire alarm control panel, fire pump, fire water tank, tank level transmitter, energy meter, LoRaWAN gateway, monitored point, safety-critical alert, audit log record, periodic monitoring round, preventive maintenance visit, technical personnel and monitoring officer. The monitored point is the focal object: it binds each reading to its source device, sampling cadence and MQTT topic. From one alert a traversal reaches the point that raised it, the device behind the point, the gateway that carried it, the factory, the officer who acknowledged it and the maintenance visit it triggered. The object model ships as JSON (ontology/objects.json, format hyper-ontology/1). Tier Runs Why Field LoRaWAN gateways with store-a

Infra
Interesse
dev.to

Garlictos 1.9: new characters, Danger levels, and the retention number I keep failing

Garlictos 1.9 is out on Google Play. It's the garlic wave survival thing I've been making alone in Godot 4, and this update is mostly about giving people a reason to come back, because that's the number I keep failing at. 3 new characters: fighter, speed demon and ranger. You upgrade them with diamonds in a temple screen. Danger levels, for when the normal run gets too easy daily login rewards quests Day-1 retention has been sitting around 8% for two weeks, and day 7 is closer to 1%. When I split it by country it gets uglier. Players from Iraq, India and Bangladesh come back about 3-4% of the time on day 1. Iran, Turkey, the Philippines and Germany are somewhere between 15% and 20%. Most of my ad traffic came from the first group, so I paused the paid campaign on Oct 5. I'd rather look at the organic players for a week and see what 1.9 actually does to them. The other thing the data showed: after the Oct 1 update the share of new players reaching wave 5 went from about a third to somewhere between 43% and 58% depending on the day. Wave 10 roughly doubled. So people play longer now, they just don't come back the next day yet. Two short interstitials (after wave 8 and when you go back to the menu after dying), an optional rewarded ad to revive, no banners. AdMob pays me a few cents a day, so this is not a business yet. Free and works offline. The graphics are AI generated, I can't draw. The code is mine, I used AI afterwards to clean it up because it had turned into spaghetti. If you try it, tell me how the Danger levels feel. That's the part I tested the least. https://play.google.com/store/apps/details?id=com.garlictos.omer

GamesMobile
Interesse
dev.to

The Real Post-Mortem: Serving Open LLMs on AWS (SageMaker vLLM vs. Bedrock Custom Models)

Running an open-source LLM on AWS sounds straightforward at first. Pick a model, deploy it, send requests, and you're done. But once you start thinking about production, things become more complicated. Where should the model run? Who manages the GPUs? How much control do you actually need? What happens when traffic increases? Two approaches that caught my attention are Amazon SageMaker with vLLM and Amazon Bedrock with custom or supported models. Both can be useful, but they solve the problem at different levels. The biggest lesson for me is that the decision isn't really about choosing between two AWS services. It's about deciding how much of the LLM infrastructure you want your team to own. With SageMaker, you can deploy an open model and use vLLM as the inference engine. This gives you much more control over the serving layer. You can choose the model, configure the inference environment, select the underlying compute, and tune the serving configuration based on your workload. The basic architecture looks like this: Application | v SageMaker Endpoint | v vLLM | v Open LLM | v GPU This approach becomes interesting when the model and inference performance are important parts of your application. For example, your application can invoke a SageMaker endpoint using boto3: import boto3 import json runtime = boto3.client("sagemaker-runtime") response = runtime.invoke_endpoint( EndpointName="my-vllm-endpoint", ContentType="application/json", Body=json.dumps({ "inputs": "Explain Apache Spark in simple terms.", "parameters": { "temperature": 0.2, "max_new_tokens": 200 } }) ) result = response["Body"].read().decode("utf-8") print(result) The application only needs to know about the endpoint. The model and GPU infrastructure are behind it. One of the reasons vLLM is interesting for LLM serving is its focus on efficient inference and request handling. Techniques such as continuous batching can help the server handle multiple requests efficiently instead of treating every requ

IAInfraDev
Interesse
dev.to

Adding page numbers to PDFs in your browser

Adding page numbers to PDFs in your browser Page numbers make a PDF easier to discuss. Instead of pointing someone to a section and asking them to search for it, you can say "see page 12". That is useful for contracts, reports, application packs, technical documents, and anything else that gets reviewed by more than one person. You can add visible page numbers without installing desktop software or sending the document to a server. The browser reads the selected PDF, adds a label to each page, and creates a new file for download. The original file stays on your computer while the work is being done. The basic steps are: Select a PDF from your device. Choose the first page number. Choose where the label should appear. Generate and download the numbered PDF. The page number is added as visible text. It does not depend on the source PDF already containing selectable text, so the same approach also works for scanned PDFs. It adds numbering only. It does not perform OCR or turn a scan into searchable text. The most common choice is the bottom centre of the page. Bottom right is useful for documents that already have centred footer content. A top position can work better when the footer contains a disclaimer, signature block, or other fixed text. The available positions are: Bottom centre Bottom right Top centre Top right You can also set the first number. For example, entering 3 produces Page 3 of 10 on the first page and continues from there. This is useful when a cover sheet or an earlier section belongs to the same document but is not part of the file you are processing. Browser processing is a good fit for one small or medium-sized PDF. The tool accepts one file up to 50 MiB and 50 pages. Larger documents can use more memory and take longer to process, so a desktop or command-line workflow may be a better choice for them. The tool does not upload or save the selected PDF. The file content stays in the browser, and the output is downloaded back to your device. This ma

Dev
Interesse
dev.to

Autonomous Agent Memory: A Restart Checklist

An autonomous agent's memory design should answer a practical question: if the process stops now, what will the next run need to continue correctly? Start with a small, inspectable record of the goal, confirmed progress, unresolved decisions, and reusable lessons. Then test whether a new session can find and use that record. This is an engineering checklist, not a ranking of memory products. The examples below are proposed application designs, not claims that a particular memory tool implements the entire workflow automatically. Use two records with different jobs: Run checkpoint: the current objective, completed steps, pending work, and evidence of external actions. Reusable memory: project conventions, corrections, and procedures that should remain useful after this run ends. For example, “the report has been uploaded; its receipt is in the job record” belongs in the checkpoint. “Reports for this project must include the source dataset” is a candidate for reusable memory. Anthropic describes structured note-taking as writing persistent notes outside the context window and loading them again later. Its context-engineering guidance also treats compaction as a separate technique, with a risk of losing important details when summaries are too aggressive. That supports using an explicit checkpoint instead of assuming a conversation summary will preserve every operational dependency. Source: Anthropic's context-engineering guide. For each completed step, preserve a pointer to something the next run can inspect: a file, commit, job identifier, or service receipt. Avoid treating “I finished the task” as sufficient evidence. Here is a deliberately small application-level checkpoint format: objective: prepare the release notes completed: - action: collect merged changes evidence: artifacts/merged-changes.json pending: - verify breaking changes with the release manifest next_action: open the manifest and compare it with the collected changes This is illustrative YAML, not a

IADev
Interesse
dev.to

Prove native focus trapping and restoration with a browser test

Test observable behavior, not a focus model A JavaScript object can simulate modal focus perfectly while the real page is broken. This fixture exports actual HTML, opens a native dialog with showModal(), and leaves keyboard containment to Chromium. The application handles one explicit edge case: when the opener is removed before closure, a close listener focuses a logical fallback. When the opener remains connected, that listener does nothing, so a restoration assertion can observe native behavior. Save this as main.mjs: export function dialogHtml({ preventCancel = false } = {}) { return ` Native dialog focus fixture Edit preferences Background link Continue to summary Preferences Close First name Last name const opener = document.getElementById('opener'); const dialog = document.getElementById('preferences'); opener.addEventListener('click', () => dialog.showModal()); document.getElementById('close').addEventListener('click', () => dialog.close()); dialog.addEventListener('close', () => { // The application chooses the next workflow target if its opener is gone. if (!opener.isConnected) document.getElementById('fallback').focus(); }); ${preventCancel ? "dialog.addEventListener('cancel', event => event.preventDefault());" : ''} `; } The full test file opens the dialog with Enter, checks :modal and the autofocus target, then sends Tab and Shift+Tab. It asserts real movement between the two inputs and rejects each background focus target. A separate programmatic focus attempt checks that the background link is inert. The boundary cases cover Escape after removing the opener, a cancel listener that prevents dismissal, and show() as a non-modal control. Preventing cancel does not remove the explicit Close button. Do not confuse a hidden-button click timeout with an exception from the dialog API. Use Node 22, run npm init -y, install playwright@1.63.0, then run npx playwright install chromium. The full article includes main.test.mjs; execute it with node --test main.test

Dev
Interesse
dev.to

Export Bans Built Biren’s Moment — Sustaining It Is a Different Challenge

Biren Technology Gains Momentum in China’s AI Chip Market U.S. restrictions on AI accelerator exports to China are creating new opportunities for domestic chipmakers, with Biren Technology emerging as one of the notable beneficiaries. The company’s revenue surged nearly 2,000% in the first half of 2026 to $183.9 million, compared with $8.7 million a year earlier. Biren reported $78.6 million in gross profit and a 42.7% gross margin, although it remains unprofitable due to heavy investment in new accelerators, rack-scale systems, optical connectivity, and its BirenSupA software platform. Despite the rapid growth, Biren still holds less than 3% of China’s AI accelerator market and faces strong competition from companies such as Huawei, Kunlunxin, and Cambricon . Manufacturing capacity, software development, and access to advanced chip production will be critical to its future growth. The broader AI infrastructure market is also moving beyond individual GPUs toward complete ecosystems involving chips, networking, software, and optical interconnects. Biren’s investments in rack-mounted systems and optical technologies reflect this shift. For Biren, the current market environment provides a significant opportunity created by geopolitical restrictions and reduced access to foreign AI chips. However, its long-term success will depend on whether it can scale production, strengthen its technology and software ecosystem, and convert its exceptional revenue growth into sustainable market share and profitability.

IAInfra
Interesse
dev.to

Your App Being “Online” Doesn’t Mean It’s Healthy

One of the easiest traps in production is assuming: “The website is responding, so everything is fine.” It isn't. An application can technically be online while quietly falling apart underneath. Your API might still respond while CPU usage sits at 95%. Your server might still accept traffic while disk space has 300 MB left. Your database might be reachable while requests are taking five seconds instead of 200 milliseconds. Your process might still be running while one important background worker died twenty minutes ago. And sometimes the first person to tell you something is wrong is a user. That's usually too late. Uptime is only one signal The simplest form of monitoring asks one question: Is the application reachable? You send a request every few seconds or minutes. If it returns successfully: everything looks green. If it stops responding: send an alert. That is useful. But it only detects one class of failure. Production systems often degrade long before they completely disappear. Imagine this: Technically, the server is alive. Operationally, you should probably be worried. Monitoring the application Application monitoring looks at what is happening inside the software. Things like: application crashes Consider an API that normally responds in: and gradually moves to: Nothing has technically crashed. But something has changed. Maybe a database query became slower. Maybe traffic increased. Maybe a dependency is struggling. Maybe memory pressure is causing garbage collection problems. Monitoring gives you a chance to investigate before the application becomes unavailable. Then there is the machine underneath it This is the part I think developers sometimes forget. Your application isn't floating in the cloud. Eventually, it is running on a machine somewhere. That machine has: And any one of those can become the actual reason your application fails. For example, your Node.js API might be perfectly written. but It doesn't matter if the VPS disk is full. Your applic

InfraDev
Interesse
dev.to

Asked in Dutch, sent to an English menu

This is a submission for the Kaggle Benchmarking Challenge. A Dutch reader asks where, in the back office, they set the colors of their app's interface, role by role: Kunt u me het menupad in de back-office geven waarmee ik het kleurenpalet van de interface per rol instel? The model gets the English edition of the article that answers it. Fourteen models on Kaggle got that exact message, and all fourteen gave the same path, thirteen of them in a Dutch sentence: Het menupad is My App > App Style > Colors. On a Dutch screen, that menu reads Mijn App > App-Stijl > Kleuren. The fact is right, the language is right, and the menu is the one from another edition. Dutch is close enough here to find your way. A Portuguese reader handed the German edition of another article gets less help: ten of the fourteen models told them, in Portuguese, to choose „Mit KI erstellen", the German edition's label. I co-founded GoodBarber, an app platform, and I run its engineering. Our blog comes in seven languages, and much of it names a back-office menu or an app's button. A retrieve-then-answer loop over these pages doesn't always return one in the reader's language. I wanted to know what happens to the label then. MTM-Bench already measures how the content's language leaks into replies, and another entry in this challenge checks Italian UI strings. This one scores the label the reader acts on, against their own edition, with controls where English is right. TL;DR The models copy the label from the page: 58.8% of 5,266 answers on localized labels named only another edition's label, all but two the page's own. Only 1.9% came back in another language. English pages are the worst case: 0.14 on average, against 0.22 to 0.35 for the other page languages. GPT-6 Astra (0.689), Claude Opus 5 (0.592), GPT-5.5 (0.499) and the open-weight Qwen3 235B (0.483, $0.10 a run) clearly beat the always-English baseline (0.32). The other ten score 0.286 to 0.405. One sentence in the system prompt, asking for

IA
Interesse
dev.to

Why Decoding a JWT Is Not Verifying It (And How Security Bugs Slip Through)

Last Tuesday, a staging auth bug had three devs stumped for half an afternoon. Nginx was spitting 401 Unauthorized. But the tester dumped their Bearer token into Chrome's DevTools console, ran JSON.parse(atob(token.split('.')[1])), and saw: { "sub": "usr_9912", "role": "admin", "exp": 1791592000 } The expiration was hours away. The role string was right. So why did the API gateway reject it? Because Base64URL decoding doesn't verify signatures. It just prints whatever text is encoded in the middle chunk. The actual signing key on the auth service had been rotated thirty minutes earlier, so every signature check was failing cold at the reverse proxy. I see this confusion constantly in backend code reviews. Developers assume that because a token decodes cleanly, it must be valid. It isn't. Decoding a token and verifying a token are completely different operations. Conflating them is how privilege escalation bugs and auth bypasses make it to production. Standard JSON Web Tokens (RFC 7519) aren't encrypted. Unless you specifically implement JWE (RFC 7516), your token is just three Base64URL strings separated by dots: header.payload.signature That middle chunk is plain text wrapped in Base64URL. You don't need private keys, certificates, or an auth server to read it. A ten-line script in Node or Python will extract the data instantly: const rawToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfOTkxMiIsInJvbGUiOiJhZG1pbiIsImV4cCI6MTc5MTU5MjAwMH0.sample_signature_hash"; // Split and decode middle chunk const base64Payload = rawToken.split('.')[1]; const decodedString = Buffer.from(base64Payload, 'base64url').toString('utf8'); console.log(JSON.parse(decodedString)); // Prints: { sub: "usr_9912", role: "admin", exp: 1791592000 } Notice what we needed to get that data: nothing. No secrets, no certificates, no cryptographic hashing. Because of that, decoding only tells you what the payload claims to say. It tells you nothing about whether: The token was actually cre

SegurançaDev
Interesse
dev.to

Scrum Master to Agile Coach: Navigating the Next Career Step

Scrum Master to Agile Coach Transitioning from a Scrum Master to an Agile Coach is a natural progression for many professionals who want to deepen their impact on teams and organizations. As the Agile landscape continues to grow worldwide, this career path is becoming increasingly attractive to Scrum Masters who aspire to work on a larger scale, shaping Agile practices beyond individual teams. In this article, we'll explore the skills, experiences, and strategies needed to make this transition, specifically focusing on how Scrum Masters can successfully elevate their careers. We'll also cover the certifications and learning paths that will set you apart in this competitive field. Why Transition from Scrum Master to Agile Coach? As a Scrum Master, your role focuses primarily on a single team, ensuring the effective implementation of Scrum practices, fostering collaboration, and removing impediments. But as an Agile Coach, your responsibilities expand to mentoring multiple teams, working closely with leadership, and driving enterprise-wide Agile transformations. The scope of influence is broader, and you’ll work at a strategic level to align Agile practices with business objectives. Globally, the demand for experienced Agile Coaches is on the rise. Many companies are adopting Agile at scale, which opens up career opportunities for those who can guide organizations through the complexities of Agile transformations. Key Skills for Making the Transition While Scrum Masters and Agile Coaches share several core skills, such as servant leadership and facilitation, moving into an Agile Coach role requires additional competencies. Here's a breakdown of the essential skills you'll need: 1. Deep Understanding of Agile Frameworks As an Agile Coach, you'll need a broader understanding of various Agile frameworks beyond Scrum. Familiarize yourself with Kanban, XP, SAFe, Nexus, and LeSS, so you can guide teams in choosing the best practices that suit their needs. Agile Coaches are

Geral
Interesse
dev.to

WildWalk AI: An Open-Source AI Companion That Gets You Off the Screen & Into the Real World

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass I built WildWalk AI, an open-source AI-powered outdoor companion designed to help people spend less time on screens and more time in the real world. Instead of using AI to keep people chatting with a screen, WildWalk uses AI to create personalized outdoor adventures and encourage users to actually go outside. A user can tell WildWalk: "I have 60 minutes free and want to go for a peaceful walk." WildWalk then creates a personalized outdoor mission based on their available time, interests, and activity level. For example: Distance: 3 km Difficulty: Easy Duration: 60 minutes Your missions: Find 3 different types of leaves Listen for 2 different bird calls Take one interesting photograph Find something you've never noticed before Spend the final 10 minutes without looking at your phone WildWalk can also help users explore nature by identifying plants, flowers, birds, and other things they discover outdoors. After completing an adventure, users can create an AI-generated Adventure Journal containing their experience, discoveries, and observations. The goal is simple: Generate the adventure. Put the phone away. Go outside. Touch grass. 🌿 The project is designed for people who want to walk, hike, run, explore nature, practice photography, go birdwatching, garden, or simply spend more intentional time outdoors. The demo will show the complete WildWalk experience: User enters their available time and preferred outdoor activity. WildWalk generates a personalized outdoor adventure. The user receives nature challenges and missions. The user goes outside and completes the adventure. The user can document their discoveries. WildWalk generates an Adventure Journal from the experience. WildWalk is built around open-weight AI, with Gemma serving as the core AI model. The project is designed so that the AI can

IAMobile
Interesse
dev.to

How I turn any handful of colours into a readable theme

Open the theme picker, choose Flatland from the base16 list, and the cards on the page lose their edges. Text and links are fine, but every border and raised surface has melted into the background. Flatland's base01 and base02 are both 1c1d19, and its background is 1c1e20. The contrast between them is 1.01 to 1, about what you'd get from two colours nobody can tell apart. Flatland was just the one I noticed. This site has 18 hand-made themes and 368 schemes from the tinted-theming catalogue. Once I wrote down what a theme has to do and measured all of them, 16 of the 18 and all 368 of the schemes failed at least one rule. Fixing them by eye was never going to last, since the next scheme added to the catalogue would bring problems of its own. So the rules became code, and next to them sits an engine that repairs any palette that breaks them, moving each colour as little as it can. Once it worked on existing themes, I gave it colours nobody had arranged at all.1 Every page on this site draws from the same small set of colour tokens: a background and a foreground, two surfaces (accent for raised cards and muted for quieter strips), a border, secondary text in muted-foreground, a gray, seven named accents from red to purple, and brand, the colour interactive things take. Components often use these at partial opacity, border-border/50 or bg-muted/20, so a colour that's a little too close to the background turns into a border you can't see. The contract is a function, harmonyIssues, that takes those tokens and returns every rule they break. The thresholds are WCAG contrast ratios: Rule Threshold Body text on the background and on both surfaces at least 4.5 Secondary text on the background at least 4.5 Secondary text on the muted surface at least 3 Body text stronger than secondary text at least 1.4 times its contrast Raised surface against the background 1.06 to 1.6 Muted surface against the background 1.15 to 2.4, and a step past the raised one Border against the backgro

Dev
Interesse
dev.to

How camouflage.nvim masks secrets in Neovim without leaking a frame

Disclosure I maintain camouflage.nvim, one of the three plugins compared here. All three were measured the same way, and the method is at the end if you want to check it. Say you're sharing your screen in a pairing session, or recording a walkthrough for the team, and you paste a new database password into values.yaml. If the mask lands one frame after the text, the password is on screen for that frame. Nobody on the call will read it. The recording keeps it, though, and anyone watching later can scrub back and pause there. I know of three Neovim plugins made to hide values in files like .env while you share your screen: cloak.nvim, shelter.nvim and camouflage.nvim. They differ in what happens while you edit, and in which files they can read at all. None of them touch the file. The plugin works out where each value sits, puts an extmark on it with virt_text_pos = "overlay", and Neovim draws the mask over the real characters. Anything that reads the buffer still gets the real text: grep, the LSP, completion, yy, any AI tool you've got attached. So these plugins protect your screen and nothing else.1 For each plugin, then, the question is whether there's ever a frame where a value is drawn without its mask. Masking a file when it opens is the easy case. Edits are harder. You type a value, paste one or put a line from a register, and Neovim redraws straight after. If the mask isn't in place by then, the value is on screen for at least a frame. Each of the three hooks in at a different point. cloak.nvim re-masks in its TextChanged and TextChangedI autocmds. Neovim fires those before the redraw, so typed text is covered. It redoes the whole buffer every time, and at the size of a normal .env that's fine. shelter.nvim attaches with nvim_buf_attach and re-masks inside on_lines, which runs as part of the change itself. It only touches the changed lines, and it wraps vim.paste so a bracketed paste is masked as it lands. When an edit changes the number of lines, though, it ha

DevSegurança
Interesse
dev.to

The outbox pattern without a relay

Work on a distributed system long enough and you'll know the particular cold sweat of the dual write. You insert an order into the database and the transaction commits. Then you have to tell something outside the database, a service over HTTP or a Kafka topic, and the connection drops before you can. The order exists and nobody downstream knows. Or it goes the other way: the message goes out first, the transaction rolls back, and a consumer is now holding an event for an order that was never created, a ghost. No amount of try/catch will make those two writes atomic. Think of paying at a restaurant. The payment is your database transaction and the receipt is the message to the outside world. Walk out without the receipt and you can't prove the meal happened. The transactional outbox pattern is the industry's answer to that gap. You don't collect the receipt at the door, you put it in your pocket the moment you pay: the message goes into an outbox table in the same transaction as the business row, so both commit or neither does. That solves the dual write, and creates the problem this post is about. Someone still has to take the receipt out of your pocket and show it to the world. In the usual design that's a relay, a separate service outside the database that polls the outbox table, delivers each row and marks it done. The relay looks small on the whiteboard and turns out large in production. It has its own deployment, configuration, connection string and alerts. It has to claim rows without two instances grabbing the same one, retry, back off, give up, and put whatever it gave up on somewhere a person can look. And since it lives outside the database, its view of the world can drift away from the database's, which is how relays end up polling a replica for hours while reporting an empty queue. I wrote ulak because I kept building that relay, and every time it was the least interesting and most fragile part of the system. ulak is a C extension for PostgreSQL 14 throu

Dev
Interesse
dev.to

Oh Dear alternative? Uptime green is not Core Web Vitals portfolio monitoring

The uptime dashboard is green, SSL is fine, and the status page is quiet, yet a client still forwards a PageSpeed Insights screenshot where mobile Largest Contentful Paint sits in Needs improvement. Nobody can explain how both truths coexist. Searching for an Oh Dear alternative feels like the next step, but that query usually returns more uptime and white-label status products, not a Core Web Vitals portfolio monitor. The gap is not that Oh Dear is weak at its job; it is treating reachability as proof that shoppers experience a fast page. Green uptime and healthy Core Web Vitals are different clocks, so conflating them is how retainers buy the wrong primary tool. The search phrase “Oh Dear alternative” then steers buyers back onto the uptime shelf when the screenshot was about experience. Oh Dear sits in a crowded agency niche: uptime checks, SSL and DNS health, broken-link crawls, status pages, and often a scheduled Lighthouse or response-time layer under one login. When agencies outgrow a free ping tool, “Oh Dear alternative” is a natural buying phrase. The search box does not know whether you meant “better status pages” or “finally watch LCP.” Open that SERP today and you mostly see other agency uptime suites: white-label status pages, client PDF uptime reports, multi-region pings, SSL and domain expiry. Those products compete on the uptime axis, and they are sensible shortlists when the failure mode is “the site returned an error” or “the certificate expired on Friday night.” That shelf is crowded for a reason: downtime still burns retainers. They are a weak answer when the failure mode is “HTTP 200, but LCP and Interaction to Next Paint are amber across the money path.” That job needs scheduled lab history, CrUX field context where Google publishes it, URL inventories that keep up with CMS churn, and budgets written in Core Web Vitals units. Uptime clones do not become that stack because the brochure says “performance,” so the buying phrase and the failure mod

InfraDev
Interesse
dev.to

Your Global Store Is a Junk Drawer. Sort State Into Four Boxes First

If everything lives in the store, nothing really lives in the store. I have watched senior engineers, people with a decade on their resume, answer "how do you structure state in a complex app" by describing one giant global store. Server data, form inputs, a sidebar toggle, a cached auth token, all of it swimming in the same tank like it is 2016 and we are still doing it for the aesthetic. It is the fastest way to turn an architecture interview, and your actual codebase, into a junk drawer. Here is the thing nobody says out loud: most of what you call "state" is not yours. Server state is someone else's database that you are temporarily babysitting. URL state is free deep-linking infrastructure you already own. Local UI state is just a variable that got ideas above its station. Once you see it that way, the architecture question answers itself: classify first, then pick the tool. The store is a destination you arrive at, not the place everything starts. This is the whole method, and it fits on an index card. For every piece of state in the app, ask: Did it come from a server? Then it is server state. It is a cache, not state you "manage". Give it a cache (query library with stale-while-revalidate), not a reducer. If you are writing setServerData by hand in 2026, you are doing the library's job badly. Would another person need it from a shared link? Then it belongs in the URL. Query params are the most underused store in frontend: free persistence across refreshes, free deep links, zero code. Search filters, selected tabs, pagination. If a page cannot be shared with a link, you have a bug, not a design choice. Is it only alive inside one component subtree? Local UI state. useState, colocated with the component that uses it. A modal open flag does not need to travel. If your store has a boolean called isOpen with no idea what it opens, I have questions. Must it survive a reload? Persisted state. localStorage or IndexedDB with a hydration plan and an expiry story. And

Dev
Interesse
dev.to

The New Scrum Master in the AI Era: AI-Powered Value Leader

Artificial Intelligence is changing software development, product management, and project delivery at an unprecedented pace. Developers are using AI coding assistants, Product Managers are leveraging AI for discovery and prioritization, and organizations are automating repetitive work across every business function. This transformation raises an important question: What is the future of the Scrum Master? The answer is simple. The Scrum Master is becoming more valuable—but only if they evolve beyond facilitating Scrum ceremonies. The organizations of tomorrow will not need people who simply schedule meetings or update Jira boards. They will need leaders who can combine Agile principles with AI, Lean thinking, systems thinking, coaching, and business strategy to accelerate value delivery. Many Scrum Masters still spend most of their time on: Scheduling Daily Scrums Facilitating Sprint Planning Running Sprint Reviews Conducting Retrospectives Updating Jira Removing simple blockers Reporting team status While these activities remain important, AI tools are increasingly capable of automating many administrative and reporting tasks. This creates both a challenge and an opportunity. The Scrum Master's value must move away from process administration toward enabling high-performing teams and organizations. The modern Scrum Master is no longer just a Scrum expert. They are an Agile transformation catalyst who understands how people, technology, AI, business strategy, and delivery systems work together. Their focus shifts from: ❌ Managing ceremonies to ✅ Enabling business outcomes. A Scrum Master doesn't need to become a machine learning engineer. However, they should understand: Generative AI AI Agents Prompt Engineering AI-assisted backlog refinement AI-enabled sprint planning AI-powered analytics AI collaboration tools Understanding how AI changes team productivity is becoming essential. Modern delivery is no longer about one Scrum Team. Teams work inside complex ecosystem

IA
Interesse
dev.to

Mengenal 9Router Proxy: Solusi Smart AI Gateway untuk Developer dan AI Assistant

Bagi developer yang aktif menggunakan AI Coding Assistant seperti Cursor IDE, Cline, Roo Code, Claude Code, atau bot AI seperti Hermes, mengelola banyak penyedia (provider) AI sering kali menjadi tantangan: Punya akun di OpenAI, Anthropic, Google Gemini, OpenRouter, xKiro, hingga CleanAPIs. Harus gonta-ganti API Key dan Base URL di setiap aplikasi. Dropdown pilihan model di IDE menjadi sangat berantakan karena menumpuknya ratusan model dari berbagai provider. Kuota token sering limit di tengah-tengah proses coding. Untuk mengatasi kekacauan tersebut, hadirlah 9Router — sebuah Self- 9Router adalah jembatan lokal (reverse proxy) yang menghubungkan seluruh tool coding Anda ke lebih dari 60 penyedia AI (providers) melalui satu endpoint standar OpenAI-compatible. Bukan sekadar proxy biasa, 9Router bertindak seperti traffic controller pintar: +-------------------------------------------------------+ | Cursor / Claude Code / Cline / Roo / Codex | +-------------------------------------------------------+ | v (http://localhost:20128/v1) +-------------------------------------------------------+ | 9ROUTER LOKAL (Atur via Web Browser) | +-------------------------------------------------------+ | | | v v v +-----------------+ +-----------------+ +-----------------+ | Tier 1: Subs | | Tier 2: Murah | | Tier 3: GRATIS | | Claude / Codex | | GLM / MiniMax | | iFlow / Qwen | +-----------------+ +-----------------+ +-----------------+ Inilah fitur terbaik 9Router. Anda tidak akan pernah terputus saat ngoding: Memaksimalkan kuota langganan berbayar Anda (Claude Code, OpenAI Codex, Google Gemini, GitHub Copilot). Jika Tier 1 limit, otomatis beralih ke provider super murah seperti GLM ($0.60 / 1M token) atau MiniMax ($0.20 / 1M token). Jika Tier 2 habis, 9Router otomatis oper ke model gratis tanpa batas (iFlow, Qwen, Kiro AI, OpenCode Free, Cloudflare AI, NVIDIA NIM). Tidak hanya Chat/LLM, satu port 9Router melayani 9 kebutuhan AI sekaligus: Chat / LLM: 60+ provider AI. Embeddings: Voya

IAInfraDev
Interesse
dev.to

I collected a list of interactive learning sites that actually force you to practice

I’ve been collecting interactive learning platforms for a while — the kind where you don’t just read, you actually click, type, break things, and learn by doing. Eventually the list got long enough that I decided to put it on GitHub: → https://github.com/hamid-moghadam/awesome-interactive-learning Some of the ones I really like: How DNS / HTTPS / DNSSEC works (super clean interactive explanations) Learn Git Branching + Oh My Git Writing an OS in Rust Deadlock Empire (concurrency puzzles) OverTheWire, pwn.college, CryptoHack CSS Grid Garden Seeing Theory + Immersive Math Play with Docker and iximiuz Labs I’m trying to keep it focused on resources that are actually interactive, not just articles or video courses. If you know any good ones I missed, feel free to open a PR or just drop them in the comments.

Dev
Interesse
dev.to

Convert PDF pages to PNG in your browser without uploading the file

Convert PDF pages to PNG in your browser without uploading the file PDFs are convenient for sharing, but they are awkward when you need an image of a page. A screenshot can be blurry, a desktop PDF application may be unavailable, and uploading a document is not always acceptable. Converting each page to PNG gives you separate image files that are easy to inspect, add to a presentation, attach to a ticket, or use in another image-based workflow. PNG is especially useful when the page contains small text, diagrams, forms, or line drawings. PNG preserves sharp edges well. Text, logos, diagrams, and screenshots usually look cleaner in PNG than in a heavily compressed image format. The tradeoff is file size. A PNG page can be larger than a JPG version of the same page, particularly when the PDF contains photographs or full-page colour backgrounds. If you need compact images for a website or a quick message, JPG may be the better choice. If you need readable text or clean line art, PNG is often worth the extra size. The basic process is simple: Open the PDF to PNG converter. Select one PDF from your device. Choose the conversion button. Wait while the browser renders each page. Download the individual PNG files you need. Each page becomes its own numbered PNG download. You can save only selected pages instead of generating a new document or exporting the entire file through a desktop application. The converter accepts one PDF up to 50 MiB and 50 pages. Large or complex documents may need more memory in the browser, so a conversion can take longer on a device with limited available memory. The converter reads the selected PDF in the browser and renders the pages on your device. Firm Beacon does not receive or save the PDF for the conversion. You do not need an account or an email address. That does not mean the page is disconnected from the internet. Loading the tool still makes the normal website requests, such as loading the page, its JavaScript and any configured anonym

Dev
Interesse
dev.to

40 Hours of Free SQL: Picking a Database on Cloudflare vs Azure as a Solo Founder

40 Hours of Free SQL: Picking a Database on Cloudflare vs Azure as a Solo Founder In my last post I priced the same small project on Cloudflare and Azure, round by round. Azure won the database round in four sentences: deeper toolbox, real PostgreSQL and SQL Server, decades of enterprise tooling. That's true. But four sentences is too short for the one decision that's hardest to undo. You can move a static site between hosts in an afternoon. You can rewrite a serverless function in a weekend. Your database, on the other hand, holds the schema, the queries, the data and every habit your code formed around them. Whatever you pick in week one is usually what you're still running in year two. So this time I asked a narrower question, the one a solo founder actually faces: I need to ship this month. Which database gets me there fastest, costs nothing until it should, and won't trap me later? All prices are public list prices in US dollars, checked in October 2026, for US regions (Azure East US). Cloud pricing changes often, so check before you plan a budget around it. Neither platform offers "a database". Each offers a shelf. Need Cloudflare Azure Relational, serverless D1 (SQLite) Azure SQL Database, serverless tier (SQL Server) Real PostgreSQL / MySQL Hyperdrive in front of any Postgres or MySQL, incl. PlanetScale billed through Cloudflare Azure Database for PostgreSQL / MySQL, Flexible Server Document / NoSQL — Cosmos DB Key-value Workers KV Table Storage, Cosmos DB Per-user or per-room state Durable Objects (each with its own SQLite) — The headline difference: Cloudflare doesn't run a Postgres server for you. Its relational answer is SQLite (D1), and for anything bigger it gives you a fast pipe (Hyperdrive) to a Postgres that lives somewhere else. Azure runs everything itself. For the rest of this post I'll mostly compare the four options a solo founder is likely to start with: D1, Azure SQL Database, Cosmos DB and Azure PostgreSQL Flexible Server. This is where "sta

InfraDev
Interesse
dev.to

How to get Xiaohongshu (RedNote) data in Python

Disclosure: I built the Xiaohongshu Scraper used in this tutorial. It's a paid Actor on Apify (pay per result), and the pricing is listed at the end. Xiaohongshu (小红书), known abroad as RedNote, is where Chinese consumers go to decide what to buy. People post reviews, "what I bought" hauls, travel guides and café lists, and other people save those notes to come back to later. For brand research, product research or a Chinese-language NLP dataset, that's very valuable data. It's also hard to get. The site is in Chinese, logged-out web access is restricted, requests are signed, and there's no public API. This tutorial skips all of that and gets Xiaohongshu data into Python in about 20 lines. A short script that: searches Xiaohongshu for a keyword, loads the results into a pandas DataFrame, ranks notes by saves (collects), pulls the public comments of the top note. You need Python 3.10+ and an Apify account. Copy your API token from Console → Settings → API & Integrations. pip install apify-client pandas export APIFY_TOKEN="your-token-here" The Actor has four modes: search, note, comments and user. We start with search. One tip before you write any code: search in Chinese. "coffee" and "咖啡" return very different results, and the Chinese keyword is what real users type. import os from decimal import Decimal from apify_client import ApifyClient client = ApifyClient(os.environ["APIFY_TOKEN"]) actor = client.actor("clover_folktale/xiaohongshu-scraper") run = actor.call( run_input={ "mode": "search", "keyword": "咖啡", # "coffee" "maxResults": 40, }, max_total_charge_usd=Decimal("0.50"), # hard spending cap for this run ) items = list(client.dataset(run.default_dataset_id).iterate_items()) print(len(items), "notes") maxResults is the total number of items for the whole run, and pagination is handled for you. max_total_charge_usd is a safety net: the run stops once that amount is spent. This uses apify-client 3.x, where call() returns a Run object. On 1.x/2.x, use run["defaultD

Dev
Interesse