reddit_programming | Technologies

Telegram-канал reddit_programming - Reddit Programming

212

I will send you newest post from subreddit /r/programming

Subscribe to a channel

Reddit Programming

Many Hard Leetcode Problems are Easy Constraint Problems
https://www.reddit.com/r/programming/comments/1nf8hyo/many_hard_leetcode_problems_are_easy_constraint/

submitted by /u/iamkeyur (https://www.reddit.com/user/iamkeyur)
[link] (https://buttondown.com/hillelwayne/archive/many-hard-leetcode-problems-are-easy-constraint/) [comments] (https://www.reddit.com/r/programming/comments/1nf8hyo/many_hard_leetcode_problems_are_easy_constraint/)

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

Reddit Programming

“I Got Pwned”: npm maintainer of Chalk & Debug speaks on the massive supply-chain attack
https://www.reddit.com/r/programming/comments/1nf6df3/i_got_pwned_npm_maintainer_of_chalk_debug_speaks/

<!-- SC_OFF -->Hey Everyone,
This week I posted our discovery of finding that a popular open-source projects, including debug and chalk had been breached. I'm happy to say the Josh (Qix) the maintainer that was compromised agreed to sit down with me and discuss his experience, it was a very candid conversation but one I think was important to have. Below are some of the highlight and takeaways from the conversation, since the “how could this happen?” question is still circulating. Was MFA on the account? “There was definitely MFA… but timed one-time passwords are not phishing resistant. They can be man in the middle. There’s no cryptographic checks, no domain association, nothing like U2F would have.” The attackers used a fake NPM login flow and captured his TOTP, allowing them to fully impersonate him. Josh called out not enabling phishing-resistant MFA (FIDO2/U2F) as his biggest technical mistake. The scale of the blast radius Charlie (our researcher) spotted the issue while triaging suspicious packages: “First I saw the debug package… then I saw chalk and error-ex… and I knew a significant portion of the JS ecosystem would be impacted.” Wiz later reported that 99% of cloud environments used at least one affected package. “The fact it didn’t do anything was the bullet we dodged. It ran in CI/CD, on laptops, servers, enterprise machines. It could have done anything.” Wiz also reported that 10% of cloud environments they analyzed had the malware inside them. There were some 'hot takes' on the internet that, in fact this was not a big deal and some said it was a win for security. Josh shared that this was not a win and the only reason we got away with it was because how ineffective the attackers were. The malicious packages were downloaded 2.5 million times in the 2 hour window they were live. Ecosystem-level shortcomings Josh was frank about registry response times and missing safeguards: “There was a huge process breakdown during this attack with NPM. Extremely slow to respond. No preemptive ‘switch to U2F’ push despite billions of downloads. I had no recourse except filing a ticket through their public form." Josh also gave some advice for anyone going through this in the future which is to be open and transparent, the internet largely agreed Josh handled this in the best way possible (short of not getting phished in the first place ) “If you screw up, own it. In open source, being transparent and immediate saves a lot of people’s time and money. Vulnerability (the human kind) goes a long way.” <!-- SC_ON --> submitted by /u/Advocatemack (https://www.reddit.com/user/Advocatemack)
[link] (https://www.youtube.com/watch?v=fdUKJ-4y2zo) [comments] (https://www.reddit.com/r/programming/comments/1nf6df3/i_got_pwned_npm_maintainer_of_chalk_debug_speaks/)

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

Reddit Programming

Shielding High-Demand Systems from Fraud
https://www.reddit.com/r/programming/comments/1ney0wh/shielding_highdemand_systems_from_fraud/

<!-- SC_OFF -->Some strategies to combat bots <!-- SC_ON --> submitted by /u/fR0DDY (https://www.reddit.com/user/fR0DDY)
[link] (https://ipsator.com/blog/shielding-high-demand-systems-from-fraud) [comments] (https://www.reddit.com/r/programming/comments/1ney0wh/shielding_highdemand_systems_from_fraud/)

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

Reddit Programming

A Rant About Multiprocessing
https://www.reddit.com/r/programming/comments/1ndpv4f/a_rant_about_multiprocessing/

<!-- SC_OFF -->The simplest system architecture is a single, monolithic process. This is the gold standard of all possible architectures. Why is it a thing worthy of reverence? Because it involves a single programming language and no interprocess communication, i.e. a messaging library. Software development doesn’t get more carefree than life within the safe confines of a single process. In the age of websites and cloud computing, instances of monolithic implementations are rare. Even an HTTP server presenting queries to a database server is technically two processes and a client library. There are other factors that push system design to multiprocessing, like functional separation, physical distribution and concurrency. So realistically, the typical architecture is a multiprocessing architecture. What is it about multiprocessing that bumps an architecture off the top of the list of places-I’d-rather-be? At the architectural level, the responsibility for starting and managing processes may be carried by a third-party such as Kubernetes - making it something of a non-issue. No, the real problems with multiprocessing start when the processes start communicating with each other. Consider that HTTP server paired with a database server. A single call to the HTTP server involves 5 type systems and 4 encoding/decoding operations. That’s kinda crazy. Every item of data - such as a floating-point value - exists at different times in 5 different forms, and very specific code fragments are involved in transformations between runtime variables (e.g. Javascript, Python and C++) and portable representations (e.g. JSON and protobuf). It’s popular to refer to architectures like these as layered, or as a software stack. If a Javascript application is at the top level of a stack and a database query language is at the lowest level, then all the type capability within the different type systems, must align, i.e. floats, datetimes and user-defined types (e.g. Person) must move up and down the stack without loss of integrity. Basic types such as booleans, integers and strings are fairly well supported (averting the engineers gaze from 32-bit vs 64-bit integers and floats), but support gets rocky with types often referred to as generics, e.g. vectors/lists, arrays and maps/dicts. The chances of a map of Person objects, indexed on a UUID, passing seamlessly from Javascript application to database client library are extremely low. Custom transformations invariably take up residence in your codebase. Due diligence on your stack involves detailed research, prototyping and unit tests. Edge cases can be nasty, such as when a 64-bit serial id is passed into a type system that only supports 32-bits. Datetime values are particularly fraught. Bugs associated with these cases can surface after months of fault-free operation. The presence of unit tests at all levels drags your development velocity down. Next up is the style of interaction that a client has with the system, e.g. with the HTTP server. The modern software stack has evolved to handle CRUD-like requests over a database model. This is a blocking, request-response interaction and it has been incredibly effective. It is less effective at delivering services that do not fit this mold. What if your Javascript client wants to open a window that displays a stream of monitoring device events? How does your system propagate operational errors up to the appropriate administrator? Together, HTTP and Javascript now provide a range of options in this space, such as the Push API, Server-side Events, HTTP/2 Server Push and Websockets, with possibly the latter providing the cleanest basis for universal two-way, asynchronous messaging. Sadly, that still leaves a lot of work to do - what encoding is to be used, what type system is available (e.g. the JSON encoding has no datetime) and how are multiple

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

Reddit Programming

Many Hard Leetcode Problems are Easy Constraint Problems
https://www.reddit.com/r/programming/comments/1ndjw6y/many_hard_leetcode_problems_are_easy_constraint/

submitted by /u/avinassh (https://www.reddit.com/user/avinassh)
[link] (https://buttondown.com/hillelwayne/archive/many-hard-leetcode-problems-are-easy-constraint/) [comments] (https://www.reddit.com/r/programming/comments/1ndjw6y/many_hard_leetcode_problems_are_easy_constraint/)

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

Reddit Programming

C++ DataFrame new version (3.6.0) is out
https://www.reddit.com/r/programming/comments/1ndeyjx/c_dataframe_new_version_360_is_out/

<!-- SC_OFF -->C++ DataFrame (https://github.com/hosseinmoein/DataFrame) new version includes a bunch of new analytical and data-wrangling routines. But the big news is a significant rework of documentations both in terms of visuals and content. Your feedback is appreciated. <!-- SC_ON --> submitted by /u/hmoein (https://www.reddit.com/user/hmoein)
[link] (https://github.com/hosseinmoein/DataFrame) [comments] (https://www.reddit.com/r/programming/comments/1ndeyjx/c_dataframe_new_version_360_is_out/)

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

Reddit Programming

We messed up our query builder for years. Here's the story of how we fixed it and the lessons we earned along the way.
https://www.reddit.com/r/programming/comments/1nddp6e/we_messed_up_our_query_builder_for_years_heres/

<!-- SC_OFF -->I want to share a story from our team at SigNoz. For a long time, our platform had a mildy-frustrating query builder. In the early days, we had separate interfaces for logs, traces, and metrics, which led to a fragmented experience. Our next attempt to unify it with a SQL-based UI was fundamentally flawed, especially for logs, as it couldn't handle complex boolean logic or parentheses. After 2 years of accumulating issues and user feedback, we realized we had to completely overhaul our approach. A key lesson for us was that no matter how technically "obvious" a feature seems, if it isn't discoverable, it's useless. We also learned not to make assumptions on behalf of users, as it only leads to a frustrating and surprising experience. This led to Query Builder V5, a full architectural rewrite that not only fixed the core issues but also allowed us to pay off a lot of UX debt. It was a humbling journey, but the result is a tool that allows for complex searching and is so intuitive that some users have voluntarily replaced their raw ClickHouse SQL queries with it :) yay <!-- SC_ON --> submitted by /u/ExcitingThought2794 (https://www.reddit.com/user/ExcitingThought2794)
[link] (http://signoz.io/blog/query-builder-v5/) [comments] (https://www.reddit.com/r/programming/comments/1nddp6e/we_messed_up_our_query_builder_for_years_heres/)

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

Reddit Programming

Comparing Virtual Threads vs Platform Threads in Spring Boot using JMeter Load Test
https://www.reddit.com/r/programming/comments/1nd95t0/comparing_virtual_threads_vs_platform_threads_in/

<!-- SC_OFF -->I have created one video lesson on Spring Boot Virtual Threads vs Platform Threads Performance with JMeter Load Testing . Link: https://youtu.be/LDgriPNWCjY Here I checked how Virtual Threads actually perform compared to Platform Threads in a real Spring Boot app in case of IO Based Operations .
For the setup , I ran two instances of the same application: First one - with Virtual Threads enabled Second one - Same application with the default Tomcat thread pool (Platform Threads) running on different port Then I used JMeter to hit both application with increasing load (starting around 200 users/sec, then pushing up to 1000+). I have also captured the side-by-side results ( like the graphs, throughput, response times) . Observations: With Platform Threads, once Tomcat hit its around 200 thread pool limit, response times started getting worse gradually With Virtual Threads, the application did scale pretty well - throughput was much higher and the average response timesremained low. The difference became more more distinct when I was running longer tests with heavier load. One caveat: this benefit really shows up with I/O-heavy requests (I even added a Thread.sleep to simulate work). As expected ,for CPU-heavy stuff, Virtual Threads don’t give the same advantage. <!-- SC_ON --> submitted by /u/mrayandutta (https://www.reddit.com/user/mrayandutta)
[link] (https://youtu.be/LDgriPNWCjY) [comments] (https://www.reddit.com/r/programming/comments/1nd95t0/comparing_virtual_threads_vs_platform_threads_in/)

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

Reddit Programming

Git Notes: git's coolest, most unloved­ feature
https://www.reddit.com/r/programming/comments/1nd8nsi/git_notes_gits_coolest_most_unloved_feature/

<!-- SC_OFF -->Did YOU know...? And if you did, what do you use it for? <!-- SC_ON --> submitted by /u/esiy0676 (https://www.reddit.com/user/esiy0676)
[link] (https://tylercipriani.com/blog/2022/11/19/git-notes-gits-coolest-most-unloved-feature/) [comments] (https://www.reddit.com/r/programming/comments/1nd8nsi/git_notes_gits_coolest_most_unloved_feature/)

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

Reddit Programming

Beyond the Code: Lessons That Make You Senior Software Engineer
https://www.reddit.com/r/programming/comments/1ncx9gw/beyond_the_code_lessons_that_make_you_senior/

submitted by /u/_zeynel (https://www.reddit.com/user/_zeynel)
[link] (ozdemir.zynl/beyond-the-code-lessons-that-make-you-senior-1ba44469aa42?source=friends_link&amp;sk=b26d67b2b81fe10a800da07bd3415931" rel="nofollow">https://medium.com/@ozdemir.zynl/beyond-the-code-lessons-that-make-you-senior-1ba44469aa42?source=friends_link&amp;sk=b26d67b2b81fe10a800da07bd3415931) [comments] (https://www.reddit.com/r/programming/comments/1ncx9gw/beyond_the_code_lessons_that_make_you_senior/)

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

Reddit Programming

Let's make a game! 324: Swapping and rearranging variables
https://www.reddit.com/r/programming/comments/1ncmp2z/lets_make_a_game_324_swapping_and_rearranging/

submitted by /u/apeloverage (https://www.reddit.com/user/apeloverage)
[link] (https://www.youtube.com/watch?v=iNN-TvUJjYE) [comments] (https://www.reddit.com/r/programming/comments/1ncmp2z/lets_make_a_game_324_swapping_and_rearranging/)

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

Reddit Programming

A Warm Welcome to ASN.1 and DER
https://www.reddit.com/r/programming/comments/1nclsok/a_warm_welcome_to_asn1_and_der/

submitted by /u/Perfect-Praline3232 (https://www.reddit.com/user/Perfect-Praline3232)
[link] (https://letsencrypt.org/docs/a-warm-welcome-to-asn1-and-der/) [comments] (https://www.reddit.com/r/programming/comments/1nclsok/a_warm_welcome_to_asn1_and_der/)

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

Reddit Programming

My 18-Month Journey Building a SaaS App
https://www.reddit.com/r/programming/comments/1ncl45v/my_18month_journey_building_a_saas_app/

<!-- SC_OFF -->I spent 18 months building RekoSearch, a SaaS that lets you semantically search photos, videos, documents, and audio. A project I had initially planned to take only 3-4 months, but here we are, 18 months and 60,000 LOC later... Building it taught me more than any desktop project could. I learned a ton about infrastructure, scalability, web development, Kubernetes and AWS, in particular. For those more interested in the technical details, including extensive handmade Excalidraw diagrams, here’s the repository: https://github.com/Obscurely/RekoSearch-Public <!-- SC_ON --> submitted by /u/CrismarucAdrian (https://www.reddit.com/user/CrismarucAdrian)
[link] (https://www.adriancrismaruc.com/blog/building-rekosearch-journey) [comments] (https://www.reddit.com/r/programming/comments/1ncl45v/my_18month_journey_building_a_saas_app/)

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

Reddit Programming

Generic Constraints and Mapped Types in Large-Scale Applications
https://www.reddit.com/r/programming/comments/1ncj2as/generic_constraints_and_mapped_types_in/

submitted by /u/FrequentBid2476 (https://www.reddit.com/user/FrequentBid2476)
[link] (https://auslake.vercel.app/blog/generic-constraints-and-mapped-types) [comments] (https://www.reddit.com/r/programming/comments/1ncj2as/generic_constraints_and_mapped_types_in/)

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

Reddit Programming

I built an ultra-fast, open-source Go web service for generating PDFs from HTML/JSON templates.
https://www.reddit.com/r/programming/comments/1ncd899/i_built_an_ultrafast_opensource_go_web_service/

<!-- SC_OFF -->I'm excited to share a project I've been working on: GoPdfSuit, a high-performance Go web service designed for creating PDF documents from HTML and JSON templates. It's built on Go 1.23+ and the Gin framework, and it's completely open source under the MIT license. I created this because I was tired of slow, clunky, and expensive commercial PDF solutions. GoPdfSuit is designed to be a fast, simple, and flexible microservice that you can drop into any project. Key Features: Ultra-Fast Performance: It can generate PDFs with sub-millisecond to low-millisecond response times, making it incredibly efficient for high-load applications. Template-Driven: It uses a JSON-driven template system, which means you can generate complex, data-rich PDFs without writing any code. It also has a built-in web interface for real-time preview and editing. HTML to PDF/Image Conversion: Easily convert entire web pages or HTML snippets into PDFs or images. Interactive Forms: Supports AcroForm and XFDF data for filling out interactive forms. Easy Deployment: It's deployed as a single binary, making it simple to get up and running. Language Agnostic: Since it uses a REST API, you can use it with any programming language. GoPdfSuit is a more flexible and cost-effective alternative to many existing solutions. If you work with PDFs, I'd love for you to check it out and let me know what you think! GitHub Repository: https://github.com/chinmay-sawant/gopdfsuit Project Page: https://chinmay-sawant.github.io/gopdfsuit/ Feel free to ask me any questions in the comments! <!-- SC_ON --> submitted by /u/chinmay06 (https://www.reddit.com/user/chinmay06)
[link] (https://github.com/chinmay-sawant/gopdfsuit) [comments] (https://www.reddit.com/r/programming/comments/1ncd899/i_built_an_ultrafast_opensource_go_web_service/)

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

Reddit Programming

Everything Wrong With Developer Productivity Metrics
https://www.reddit.com/r/programming/comments/1nf85j7/everything_wrong_with_developer_productivity/

<!-- SC_OFF -->The DORA Four were meant as feedback mechanisms for teams to improve, not as a way to compare performance across an entire org. Somewhere along the way, we lost that thread and started chasing “productivity metrics” instead. Martin Fowler said it best: you can’t measure individual developer productivity. That’s a fool’s errand. And even the official DORA site emphasizes these aren’t productivity metrics, they’re software delivery performance metrics. There’s definitely an industry now. Tools that plug into your repos and issue trackers and spit out dashboards of 40+ metrics. Some of these are useful. Others are actively harmful by design. The problem is, code is a lossy representation of the real work. Writing code is often less than half of what engineers actually do. Problem solving, exploring tradeoffs, and system design aren’t captured in a commit log. Folks like Kent Beck and Rich Hickey have even argued that the most valuable part of development is the thinking, not the typing. And you can’t really capture that in a metric. <!-- SC_ON --> submitted by /u/aviator_co (https://www.reddit.com/user/aviator_co)
[link] (https://youtu.be/_xta9YyNmEw?si=_HzwJtK9Kp3SHHuF) [comments] (https://www.reddit.com/r/programming/comments/1nf85j7/everything_wrong_with_developer_productivity/)

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

Reddit Programming

Graph rag pipeline that runs entirely locally with ollama and has full source attribution
https://www.reddit.com/r/programming/comments/1nf08e5/graph_rag_pipeline_that_runs_entirely_locally/

<!-- SC_OFF -->Hey , I've been deep in the world of local RAG and wanted to share a project I built, VeritasGraph, that's designed from the ground up for private, on-premise use with tools we all love. My setup uses Ollama with llama3.1 for generation and nomic-embed-text for embeddings. The whole thing runs on my machine without hitting any external APIs. The main goal was to solve two big problems: Multi-Hop Reasoning: Standard vector RAG fails when you need to connect facts from different documents. VeritasGraph builds a knowledge graph to traverse these relationships. Trust & Verification: It provides full source attribution for every generated statement, so you can see exactly which part of your source documents was used to construct the answer. One of the key challenges I ran into (and solved) was the default context length in Ollama. I found that the default of 2048 was truncating the context and leading to bad results. The repo includes a Modelfile to build a version of llama3.1 with a 12k context window, which fixed the issue completely. The project includes: The full Graph RAG pipeline. A Gradio UI for an interactive chat experience. A guide for setting everything up, from installing dependencies to running the indexing process. GitHub Repo with all the code and instructions: https://github.com/bibinprathap/VeritasGraph I'd be really interested to hear your thoughts, especially on the local LLM implementation and prompt tuning. I'm sure there are ways to optimize it further. Thanks! <!-- SC_ON --> submitted by /u/BitterHouse8234 (https://www.reddit.com/user/BitterHouse8234)
[link] (https://github.com/bibinprathap/VeritasGraph) [comments] (https://www.reddit.com/r/programming/comments/1nf08e5/graph_rag_pipeline_that_runs_entirely_locally/)

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

Reddit Programming

conversations multiplexed over the single websocket connection? Who or what are the entities engaged in these conversations, because there must be someone or something - right? The ability to multiplex multiple conversations influences the internal architecture of your processes. Without matching sophistication in the communicating parties, a multi-lane freeway is a high-volume transport to the same old choke points. Does anyone know a good software entity framework? There are further demands on the capabilities of the messaging facility. Processes such as the HTTP server are a point of access for external processes. Optimal support for a complex, multi-view client would have multiple entry points available providing direct access to the relevant processes. Concerns about security may force the merging of the multiple points into a single point. That point of access would need to make the necessary internal connections and provide the ongoing routing of message streams to their ultimate destinations. Lastly, the adoption of multiple programming languages not only requires the matching linguistic skills but also breaks the homogeneous nature of your system. Consider a simple bubble diagram where each bubble is a process and each arrow represents a connection from one process to the other. The ability to add arrows anywhere assumes the availability of the same messaging system in every process, and therefore, every language. Multiprocessing with a multiplexing communications framework can deliver the systems environment that we might subconsciously lust after. But where is that framework and what would it even look like? Well, the link in the post takes you to the docs for my best attempt. <!-- SC_ON --> submitted by /u/Public_Being3163 (https://www.reddit.com/user/Public_Being3163)
[link] (https://kipjak-manual.s3.ap-southeast-2.amazonaws.com/1.0.0/index.html) [comments] (https://www.reddit.com/r/programming/comments/1ndpv4f/a_rant_about_multiprocessing/)

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

Reddit Programming

A Git like Database
https://www.reddit.com/r/programming/comments/1ndnjho/a_git_like_database/

<!-- SC_OFF -->I just came across a database called DoltDB , which presented itself as an Agent Database at the AI Agent Builder Summit. I looked into their documentation to understand what they mean by git-like. It essentially wraps the command line with a dolt CLI, so you can run commands like dolt diff, dolt merge, and dolt checkout. That’s an interesting concept. I’m still trying to figure out the real killer use case for this feature, but so far I haven’t found any clear documentation that explains it. docs $ dolt sql -q "insert into docs values (10,10)" Query OK, 1 row affected docs $ dolt diff diff --dolt a/docs b/docs --- a/docs @ 2lcu9e49ia08icjonmt3l0s7ph2cdb5s +++ b/docs @ vpl1rk08eccdfap89kkrff1pk3r8519j +-----+----+----+ | | pk | c1 | +-----+----+----+ | + | 10 | 10 | +-----+----+----+ docs $ dolt commit -am "Added a row on a branch" commit ijrrpul05o5j0kgsk1euds9pt5n5ddh0 Author: Tim Sehn Date: Mon Dec 06 15:06:39 -0800 2021 Added a row on a branch docs $ dolt checkout main Switched to branch 'main' docs $ dolt sql -q "select * from docs" +----+----+ | pk | c1 | +----+----+ | 1 | 1 | | 2 | 1 | +----+----+ docs $ dolt merge check-out-new-branch Updating f0ga78jrh4llc0uus8h2refopp6n870m..ijrrpul05o5j0kgsk1euds9pt5n5ddh0 Fast-forward docs $ dolt sql -q "select * from docs" +----+----+ | pk | c1 | +----+----+ | 1 | 1 | | 2 | 1 | | 10 | 10 | +----+----+ <!-- SC_ON --> submitted by /u/No_Lock7126 (https://www.reddit.com/user/No_Lock7126)
[link] (https://docs.dolthub.com/concepts/dolt/git/merge) [comments] (https://www.reddit.com/r/programming/comments/1ndnjho/a_git_like_database/)

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

Reddit Programming

AI Assistance for Software Teams: The State of Play • Birgitta Böckeler
https://www.reddit.com/r/programming/comments/1ndfkxu/ai_assistance_for_software_teams_the_state_of/

submitted by /u/goto-con (https://www.reddit.com/user/goto-con)
[link] (https://youtu.be/pzlqeX9nh1g) [comments] (https://www.reddit.com/r/programming/comments/1ndfkxu/ai_assistance_for_software_teams_the_state_of/)

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

Reddit Programming

Performance Improvements in .NET 10
https://www.reddit.com/r/programming/comments/1ndemk4/performance_improvements_in_net_10/

submitted by /u/ben_a_adams (https://www.reddit.com/user/ben_a_adams)
[link] (https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-10/) [comments] (https://www.reddit.com/r/programming/comments/1ndemk4/performance_improvements_in_net_10/)

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

Reddit Programming

What Is a Modular Monolith And Why You Should Care? 🔥
https://www.reddit.com/r/programming/comments/1nda6tp/what_is_a_modular_monolith_and_why_you_should_care/

submitted by /u/pepincho (https://www.reddit.com/user/pepincho)
[link] (https://thetshaped.dev/p/what-is-a-modular-monolith-benefits-and-microservices-challenges) [comments] (https://www.reddit.com/r/programming/comments/1nda6tp/what_is_a_modular_monolith_and_why_you_should_care/)

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

Reddit Programming

JEP 401: Value classes and Objects (Preview) has just been submitted!
https://www.reddit.com/r/programming/comments/1nd8vob/jep_401_value_classes_and_objects_preview_has/

<!-- SC_OFF -->The JDK it is coming out in is still not known. However, this is a major milestone to have crossed. Plus, a new Early Access build of Valhalla (up-to-date with the current JDK, presumably) will go live soon too. Details in the linked post. And for those unfamiliar, u/brian_goetz (https://www.reddit.com/u/brian_goetz) is the person leading the Project Valhalla effort. So, comments by him in the linked post can help you separate between assumptions by your average user vs the official words from the Open JDK Team themselves. u/pron98 (https://www.reddit.com/u/pron98) is another OpenJDK Team member commenting in the linked post. <!-- SC_ON --> submitted by /u/davidalayachew (https://www.reddit.com/user/davidalayachew)
[link] (https://www.reddit.com/r/java/comments/1nckdwr/jep_401_value_classes_and_objects_preview_has/) [comments] (https://www.reddit.com/r/programming/comments/1nd8vob/jep_401_value_classes_and_objects_preview_has/)

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

Reddit Programming

The unreasonable effectiveness of modern sort algorithms
https://www.reddit.com/r/programming/comments/1nd7bby/the_unreasonable_effectiveness_of_modern_sort/

submitted by /u/Voultapher (https://www.reddit.com/user/Voultapher)
[link] (https://github.com/Voultapher/sort-research-rs/blob/main/writeup/unreasonable/text.md) [comments] (https://www.reddit.com/r/programming/comments/1nd7bby/the_unreasonable_effectiveness_of_modern_sort/)

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

Reddit Programming

Isn’t Kubernetes enough?
https://www.reddit.com/r/programming/comments/1ncndp2/isnt_kubernetes_enough/

<!-- SC_OFF -->Many devs ask me: ‘Isn’t Kubernetes enough?’ I have done the research to and have put my thoughts below and thought of sharing here for everyone's benefit and Would love your thoughts! This 5-min visual explainer https://youtu.be/HklwECGXoHw showing why we still need API Gateways + Istio — using a fun airport analogy. Read More at:
https://faun.pub/how-api-gateways-and-istio-service-mesh-work-together-for-serving-microservices-hosted-on-a-k8s-8dad951d2d0c https://medium.com/faun/why-kubernetes-alone-isnt-enough-the-case-for-api-gateways-and-service-meshes-2ee856ce53a4 <!-- SC_ON --> submitted by /u/mmk4mmk_simplifies (https://www.reddit.com/user/mmk4mmk_simplifies)
[link] (https://youtu.be/HklwECGXoHw) [comments] (https://www.reddit.com/r/programming/comments/1ncndp2/isnt_kubernetes_enough/)

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

Reddit Programming

A Short Summary of the Last Decades of Data Management • Hannes Mühleisen
https://www.reddit.com/r/programming/comments/1ncmnj2/a_short_summary_of_the_last_decades_of_data/

submitted by /u/goto-con (https://www.reddit.com/user/goto-con)
[link] (https://youtu.be/-wCzn9gKoUk) [comments] (https://www.reddit.com/r/programming/comments/1ncmnj2/a_short_summary_of_the_last_decades_of_data/)

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

Reddit Programming

Engineering a High-Performance Go PDF Microservice
https://www.reddit.com/r/programming/comments/1ncl9ws/engineering_a_highperformance_go_pdf_microservice/

<!-- SC_OFF -->I built GoPdfSuit, an open-source web service for generating PDFs, and wanted to share the technical design that makes it exceptionally fast and efficient. My goal was to create a lean alternative to traditional, resource-heavy PDF solutions. Core Technical Design The core of the service is built on Go 1.23+ and the Gin framework for their high performance and concurrency capabilities. Unlike many other services that rely on disk-based processing, GoPdfSuit is a high-performance in-memory PDF generator. This approach is crucial to its speed, as it completely bypasses slow disk I/O operations, leading to ultra-fast response times of sub-millisecond to low-millisecond. For the actual HTML-to-PDF and HTML-to-image conversions, the service leverages the power of wkhtmltopdf and wkhtmltoimage. This allows it to accurately render web pages and HTML snippets into high-quality PDFs and images. The project demonstrates how intelligently integrating and managing a powerful external tool like wkhtmltopdf can lead to a highly optimized and performant solution. Key Features and Implementation Details Template-Driven System: GoPdfSuit utilizes a JSON-driven templating system. This design separates data from presentation, making it simple to generate complex, dynamic PDFs by just sending a JSON payload to the REST API. Flexible PDF Generation: The service supports multi-page documents with automatic page breaks and custom page sizes, giving developers a high degree of control over the output. It also includes support for AcroForm and XFDF data, enabling the filling out of interactive forms programmatically. Deployment: It's deployed as a single, statically compiled binary, making it extremely easy to get up and running in any environment, from a local machine to a containerized cloud deployment. I'm happy to discuss the implementation details, the challenges of orchestrating wkhtmltopdf in a high-concurrency environment, or the design of the in-memory processing pipeline. GitHub: https://github.com/chinmay-sawant/gopdfsuit Project Page: https://chinmay-sawant.github.io/gopdfsuit/ <!-- SC_ON --> submitted by /u/chinmay06 (https://www.reddit.com/user/chinmay06)
[link] (https://chinmay-sawant.github.io/gopdfsuit/) [comments] (https://www.reddit.com/r/programming/comments/1ncl9ws/engineering_a_highperformance_go_pdf_microservice/)

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

Reddit Programming

A clickable visual guide to the Rust type system
https://www.reddit.com/r/programming/comments/1ncjtrp/a_clickable_visual_guide_to_the_rust_type_system/

submitted by /u/mmaksimovic (https://www.reddit.com/user/mmaksimovic)
[link] (https://rustcurious.com/elements/) [comments] (https://www.reddit.com/r/programming/comments/1ncjtrp/a_clickable_visual_guide_to_the_rust_type_system/)

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

Reddit Programming

I love UUID, I hate UUID
https://www.reddit.com/r/programming/comments/1ncht77/i_love_uuid_i_hate_uuid/

submitted by /u/bobbymk10 (https://www.reddit.com/user/bobbymk10)
[link] (https://blog.epsiolabs.com/i-love-uuid-i-hate-uuid) [comments] (https://www.reddit.com/r/programming/comments/1ncht77/i_love_uuid_i_hate_uuid/)

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

Reddit Programming

From Modular to Utility-First tailwind migration
https://www.reddit.com/r/programming/comments/1ncd7dh/from_modular_to_utilityfirst_tailwind_migration/

submitted by /u/FrequentBid2476 (https://www.reddit.com/user/FrequentBid2476)
[link] (https://auslake.vercel.app/blog/migration-tailwindcss) [comments] (https://www.reddit.com/r/programming/comments/1ncd7dh/from_modular_to_utilityfirst_tailwind_migration/)

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