This document identifies common JavaScript code pitfalls, such as inefficient array methods and complex conditionals, and provides best practices for improving code readability and maintainability through modern JavaScript techniques and tools.
This article presents sixteen practical Java coding best‑practice guidelines—including avoiding ‘where 1=1’ in MyBatis, using entrySet for map iteration, preferring Collection.isEmpty(), pre‑sizing collections, employing StringBuilder, leveraging Set for contains checks, static initialization blocks, and other tips—to improve performance, readability, and safety of backend applications.
This article explains how to improve the readability, extensibility, and maintainability of front‑end JavaScript and React JSX code by reducing nested if‑else statements, using switch cases, leveraging object maps, array helpers, default parameters, destructuring, and the strategy pattern, while providing concrete code examples.
The author recounts a massive SAP cloud application that suffered severe slowness due to a forgotten 20‑second wait statement, and shares a comprehensive, ten‑step guide on when and how to safely optimize code, emphasizing analysis, clear goals, and disciplined review.
Best Practicescode optimizationsoftware engineering
This article presents comprehensive Java code optimization techniques, emphasizing error avoidance, reduced code size, and improved execution efficiency through practices such as using final modifiers, object reuse, local variables, proper resource handling, appropriate data structures, bitwise operations, and careful use of collections and concurrency utilities.
This weekly roundup shares practical front‑end knowledge, detailing step‑by‑step large file upload slicing with MD5 checks, strategies to replace bulky if‑else chains such as table‑driven maps and chain‑of‑responsibility, and concise overviews of HTTP/3’s QUIC origins and Deno 1.0’s Rust‑based runtime.
This article examines Python execution speed by benchmarking simple arithmetic, logical checks, built‑in functions like max, and three class‑based point‑in‑rectangle implementations, revealing that straightforward if‑statements are often fastest while highlighting practical tips for writing performant Python code.
This article presents 30 practical Java code optimization techniques—from using final modifiers and reusing objects to lazy loading, efficient looping, proper resource handling, and optimal collection usage—explaining why each improves runtime speed, memory usage, and overall application performance.
The article recounts a real SAP project where a stray 20‑second wait statement crippled performance, then outlines five actionable principles—including setting clear goals, using profilers, enabling compiler optimizations, targeted code adjustments, and mandatory code reviews—to ensure optimization improves speed without sacrificing quality.
A massive SAP cloud application suffered a 20‑second pause due to an accidental wait statement, revealing how careless code can cripple performance and illustrating practical, step‑by‑step guidelines for effective, measured code optimization.
This article presents a comprehensive list of Java code optimization techniques—from using final modifiers and reusing objects to pre‑sizing collections and avoiding unnecessary exceptions—explaining how each practice reduces code size, improves execution efficiency, and prevents memory leaks.
This article presents a comprehensive collection of Java code optimization techniques, covering topics such as using final modifiers, object reuse, local variables, proper resource management, loop improvements, lazy loading, exception handling, collection sizing, and efficient map traversal to enhance performance and reduce memory usage.
This article presents a comprehensive collection of Java performance best practices, covering topics such as using final modifiers, object reuse, local variables, stream handling, avoiding repeated calculations, lazy loading, exception handling, collection sizing, bit‑shifts, loop optimizations, reflection avoidance, resource pooling, buffered I/O, and proper map traversal, all aimed at reducing code size and boosting runtime efficiency.
This article examines a Java utility for generating unique transaction order numbers, identifies performance inefficiencies caused by repeatedly creating SimpleDateFormat instances, proposes a static formatter optimization, presents benchmark code and results, and discusses alternative string concatenation methods for random code generation.
This article shares JD's front‑end team's experience engineering large‑scale mini programs, covering standards, single‑page extraction, code duplication removal, automated testing with a sandbox, package‑size optimization, smart splitting, conditional compilation, and a continuous‑integration pipeline that together address the challenges of rapid growth and release complexity.
This article presents sixteen practical Java coding guidelines—ranging from avoiding "where 1=1" in MyBatis to using static blocks for collection initialization, preferring Set over List for contains checks, and returning empty collections instead of null—to help developers write more efficient, readable, and safe backend code.
This article presents a comprehensive guide to Java code optimization, covering goals such as reducing code size and improving runtime efficiency, and detailing 30 practical techniques ranging from using final modifiers and reusing objects to efficient loop constructs, proper resource handling, and optimal collection usage.
This article shares practical experiences on diagnosing PHP interface performance bottlenecks using ThinkPHP's G function and profiling tools like Xhprof, then presents concrete code‑level, database‑level, and hardware‑level optimization techniques to improve execution speed and reduce resource consumption.
This article explains why JavaScript developers often avoid bitwise operators, highlights the specific scenarios where they provide performance and code‑size benefits—such as fast integer conversion with x|0, using ~ for -1 checks, creating bit fields, and leveraging them in databases and BigInt.
Booster is a lightweight, scalable framework for mobile apps that improves performance, stability, and reduces APK size by using dynamic module loading, third‑party library injection, static‑analysis detection, bytecode‑based thread optimization, SharedPreferences tweaks, and resource compression, delivering over 10 MB size cuts, better crash detection, and non‑intrusive global optimization with full documentation.
In this presentation, a veteran participant of the Tencent Advertising Algorithm Competition shares practical advice on building simple, efficient models, optimizing code performance, managing version control with Git, and maintaining clean coding practices to improve competition outcomes and foster better engineering habits.
During a client’s upgrade test, a database’s compressed tables exhibited severe slowdown under concurrent full‑table scans, which we traced to CPU cache line false sharing in the decompression code; using Linux perf tools we identified the hotspot, aligned memory, and restored performance.
This article walks through what makes code Pythonic, offering clear examples and better alternatives for loops, collections, dictionaries, unpacking, context managers, decorators, and other common patterns to help developers write more readable, efficient, and idiomatic Python.
The article examines Kotlin’s hidden runtime overheads—such as companion‑object constants, default synchronized lazy delegates, boxing‑prone array types, and temporary progression objects in loops—and describes how the author built a custom Android Lint plugin (KLint) that parses Kotlin files, defines detectors, integrates with Gradle and IDE, and enforces performance‑aware coding standards through CI checks.
This article presents a comprehensive collection of Java code‑optimization techniques—from using final modifiers and reusing objects to proper collection sizing and avoiding unnecessary exceptions—aimed at reducing code size, improving runtime efficiency, and preventing hard‑to‑detect production errors.
The article examines why short‑video list pages drain far more battery than detail pages, explains Android power‑profile calculations and testing with Battery Historian, and demonstrates code‑level fixes—replacing heavy layout animations with ValueAnimator—to dramatically reduce CPU‑intensive rendering and improve app battery efficiency.
This article challenges the habit of writing for loops in Python, explains the intuition behind them, outlines the benefits of avoiding them, and demonstrates practical alternatives such as list comprehensions, generator expressions, map, reduce, functions, and itertools with clear code examples.
The article explains how iOS engineers keep the __TEXT segment under Apple’s strict size limits by removing unused code, using Link Map analysis, applying a custom SizeLine metric, and adopting coding practices such as limiting blocks, macros, and hard‑coded strings, all supported by automated monitoring and feedback.
This article presents comprehensive Java code optimization best practices, covering techniques such as using final modifiers, object reuse, local variables, proper resource handling, loop efficiency, collection sizing, avoiding reflection, and effective map traversal to significantly improve performance and reduce memory consumption.
The article reveals four common programming pitfalls—premature or late optimization, over‑complex abstractions, misuse of tools, and misguided cross‑platform efforts—and provides practical patches to keep developers from sinking into endless deadlines and frustration.
This article explains the JavaScript with statement, its syntax and intended convenience, then details why it is discouraged by highlighting severe performance degradation, ambiguous scope resolution, debugging difficulties, and potential bugs illustrated through multiple code examples and analysis.
After reading 'High-Performance JavaScript', I tested the speed of a switch statement versus a lookup table over 50,000 iterations, finding the switch slightly faster contrary to the book’s claim, and reflecting on the practical benefits of lookup tables such as clearer code and easier maintenance.
This article explains the core concepts of system performance, defines throughput and latency, describes how to measure them, and provides detailed, code‑level techniques for locating and eliminating common performance bottlenecks across operating systems, networks, databases, and application code.