Coding Chica

Coding Chica

    • About
    • Available Downloads
    • Jargon Buster
      • A
      • B
      • C
      • D
      • E
      • F
      • G
      • I
      • J
      • L
      • M
      • N
      • O
      • P
      • Q
      • R
      • S
      • T
      • X
    • Topics
      • Getting Started
      • Git 101
      • Java 101
      • Maven Builds
      • Test Driven Development (TDD)
    • Site Map
  • First Things First – Getting Started

    Need help figuring out where to start? Check out the getting started page. 💚 Read more…

    2023-07-03
  • Learning from Other’s Mistakes! The OWASP Top 10

    The Open Worldwide Application Security Project (OWASP) foundation compiles a list of the top 10 web application security issues, updated every few years, to help developers understand potential pitfalls in programming. This ‘OWASP Top-10’ is an essential resource for both novice and experienced developers. As well as detailing each issue, it also provides prevention tips… Read more…

    2023-11-20
  • Reading the Tea Leaves! Understanding Java Stack Traces for Exception Troubleshooting

    Understanding a Java stack trace is often useful while troubleshooting issues. Stack traces contain both information about the exception thrown and the incomplete method call(s) to reach the line of code where the exception was thrown. Exception handling can also cause changes to the stack trace. Read more…

    2023-11-16
  • Avoid Reinventing the Wheel! Java Method References

    This article discusses how Java method references can replace lambda expressions in certain situations, simplifying the code and increasing its clarity. Method references, indicated by a double colon (::), can be used for constructors, static methods, or instance methods and are particularly useful in Java stream pipelines. However, their usage and consumption may vary depending… Read more…

    2023-11-13
  • A Trickle or a Flood! Java Stream Basics

    Java streams, which is a feature for processing arrays, collections, or ranges of objects. Streams don’t store data and are recreated for each computation or pipeline. This guide covers multiple operations including creating basic streams, lazy intermediate operations, stateless/stateful operations, side effects, filtering, reducing to a single item, and mapping. Read more…

    2023-11-09
  • Inline, Unnamed Methods! Lambda Expressions

    Java’s lambda expressions, introduced in Java 8, are unnamed functions defined in-line within code. They have explicit inputs often sourced from Java streams and implicit inputs from variables within the scope, which must be final or effectively final. They contribute to separate, unnamed functions in JaCoCo code coverage reports. These expressions require varying syntax based… Read more…

    2023-11-06
  • Building As We Go! Java’s StringBuffer for Multi-Threaded Use Cases

    When your use case requires multiple threads to be able to construct a String in parallel, then Java’s StringBuffer may be what you need. However, additional synchronization logic may still be needed in the calling code. Read more…

    2023-11-02
  • Building As I Go! Using Java’s String Builder for Single Threads

    When building Java Strings, we can significantly improve performance by using a StringBuilder for single threaded use cases. Read more…

    2023-10-30
  • The Immutable Java String! Constructing a String When All Variables Known

    Although we touched upon this in a prior post, talking about how Java Strings are immutable (unchanging) and why using concatenation can lead to performance and garbage collection issues, as well as an alternative approach if all values are known at the time of String construction. Read more…

    2023-10-26
  • Troubleshooting Tip! Looking with Fresh Eyes

    Powering through may not be the best way to make forward progress when you feel stuck while troubleshooting an issue. Instead, you may benefit from trying to find a way to look with fresh eyes, either your own or those of a teammate. Read more…

    2023-10-23
  • Automating Parts of the Peer Review – Part 2! Adding Maven PMD Plugin

    Different static code analysis plugins will catch different issues. As long as we are now slowing down the build too much, we may still benefit from also adding the maven-pmd-plugin to the build as an additional quality gate. Read more…

    2023-10-19
  • Automating Parts of the Peer Review – Part 1! Adding SpotBugs Maven Plugin for Static Code Analysis

    A static code analysis tool, like spotbugs-maven-plugin will not replace an actual peer review, but it may help reduce the load that peer reviewers carry in the analysis. Anyone can make a mistake and it may help engineers write better code in the future. Read more…

    2023-10-16
  • Show Me the Source! Java Sources Cross Referencing Reports

    By generating Java Cross Reference (JXR) reports in our Maven site, we enable deep links in other reports, such as static code analysis plugin reports. Read more…

    2023-10-12
  • Isn’t Unit Testing Enough? A Testing Pyramid Intro – The Build Steps

    Delivering high-quality, reliable code as quickly as possible requires a layered testing strategy. We want to find issues as early as possible, so they are cheaper and faster to fix. Let’s discuss the build’s testing efforts and quality gates as we move a few layers up the microService (mS) testing pyramid. Read more…

    2023-10-09
  • Regular Expressions Basics

    Regular expressions can help validate or parse String based inputs. Read more…

    2023-10-05
  • Adding JaCoCo Quality Gate to an existing code base

    We can add a unit test code coverage quality gate to an existing Java project’s Maven build, but we have a few extra steps to ensure that the build does not break. Read more…

    2023-10-02
  • Skipping A Flaky or Broken Test! JUnit’s Disabled Annotation

    JUnit tests can be disabled one-at-a-time or class-by-class if the need arises. That way, we don’t lose the existing code base, but we can skip them during test executions if they cause build failures. Comments and/or documentation in the annotation itself can aid us in the investigation to re-enable. Read more…

    2023-09-28
  • Project Reports! Generating a Simple Maven Site in the Build

    By adding the site goal to our Maven build command, we can quickly start generating basic project reports. Read more…

    2023-09-25
  • Maven Dependency Scopes

    Maven build dependencies usage can be controlled using the scope element, whether that dependency should be used in compilation, test, runtime or as a transitive dependency. Read more…

    2023-09-21
  • Global State of the Server! Java Environment Variables

    Environment variables are good for storing global state information about a server that should be shared with all processes on that server, can be easily represented as simple String values, and are not sensitive. Read more…

    2023-09-18
  • Carriage Returns, Line Feeds, and New Lines, Oh My! Java System Properties

    Using Java’s system properties, we can often avoid operating system (OS) specific logic in backend Java code. Read more…

    2023-09-14
1 2 3 4
Next Page

YOU CAN DO THIS. Have faith in yourself. You don’t need to be perfect and you don’t need to get it all right on the first try. Make mistakes. Learn from them. Move forward. Grow.

© Coding Chica 2023

  • Subscribe Subscribed
    • Coding Chica
    • Already have a WordPress.com account? Log in now.
    • Coding Chica
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar