Table of Contents The scenario: The complex objectThe traditional approach: Telescoping constructorsFavor Static Factory Methods over Class ConstructorsMany parameters? Use the Builder patternRestricts the order of method calls in the Builder patternConclusionKey TakeawaysFinal Thoughts We often hear the phrase: “Make …
-
AI-powered Chat Application using IBM watsonx.ai and Spring AI
Table of Contents PricingIBM watsonx.aiCreating IBM watsonx.ai Chat-based ApplicationPrerequisitesConfigurationsChatbotChat ApplicationBasic ChatStreaming Chat Generative Artificial Intelligence (Gen AI) disrupted enterprises with the introduction of GPT-4 foundation model by Open AI in the late 2022 to early 2023 triggering big tech to …
-
Front End Debugging Part 2: Console.log() to the Max
Table of Contents Understanding Front-End Logging vs. Back-End LoggingLeveraging Console Log LevelsCustomizing Console Output with CSSStack Tracing with console.trace()Assertions for Design-by-ContractPrinting Tables for Clearer Data VisualizationCopying Objects to the ClipboardInspecting with console.dir() and dirxml()Counting Function CallsOrganizing Logs with GroupsChrome-Specific Debugging …
-
strace Revisited: Simple is Beautiful
Table of Contents In the realm of system debugging, particularly on Linux platforms, strace stands out as a powerful and indispensable tool. Its simplicity and efficacy make it the go-to solution for diagnosing and understanding system-level operations, especially when working …
-
Langchain4J Musings
Table of Contents Choosing a LLMQuick introduction to LangChain4J and OllamaGetting our feet wetThe LangChain4j appThe Ollama infrastructureEnhancing with streamingRemembering historyAdding Retrieval-Augmented GenerationConclusion I’m coming relatively late to the LLM party, but I rarely come very early in the hype …
-
Spring Boot: Java Template Engine (JTE)
Table of Contents Hello to all Java and Spring enthusiasts. I am the Java Template Engine, a fresh newcomer to the Spring Initializer Ecosystem. Hello to all Java and Spring enthusiasts. I am the Java Template Engine, a fresh newcomer …
-
Front End Debugging Part 1: Not just Console Log
Table of Contents Instant Debugging with the debugger KeywordTriggering Debugging from the ConsoleDOM Breakpoints: Monitoring DOM ChangesXHR Breakpoints: Uncovering Hidden Network CallsSimulating Environments for DebuggingDebugging Layout and Style IssuesFinal Word Instant Debugging with the debugger Keyword Triggering Debugging from the …
-
The Art of Full Stack Debugging
Table of Contents Full stack development is often likened to an intricate balancing act, where developers are expected to juggle multiple responsibilities across the frontend, backend, database, and beyond. As the definition of full stack development continues to evolve, so …
-
Book Review: Mastering the Java Virtual Machine
Table of Contents Part 1: Understanding the JVMPart 2: Memory Management and ExecutionPart 3: Alternative JVMsPart 4: Advanced Java TopicsConclusionRecommendation Otávio Santana’s “Mastering the Java Virtual Machine” takes readers on an insightful journey through the inner workings of the JVM. …
-
Deep dive into bits, bytes, shorts, ints, longs, signed, and unsigned with Java
Table of Contents The Basics: BitsBits to ByteValue Ranges in JavaDifference between Byte, Short, Integer and LongMinimum and maximum values in JavaSigned versus UnsignedUsing MasksUsing Helper MethodsSame Approach for ShortExample use of BitsConclusionRemark On the Pi4J discussion list, someone recently …
-
Unleashing the Power of Git Bisect
Table of Contents The Essence of Debugging with GitSetting the Stage for DebuggingInitiating Bisect ModeMarking the Known Good RevisionMarking the Known Bad RevisionBisecting to Find the CulpritExpected OutputReset and AnalysisAdvanced Usage and TipsScript Automation for Precision and EfficiencyHandling Flaky Tests …