tag:blogger.com,1999:blog-87622747038125767732024-02-24T00:50:22.651-08:00Software NinjaWelcome to Software Ninja blog - your ultimate destination for mastering software development and data manipulation. Explore cutting-edge techniques and expert tips to sharpen your coding skills and become a data virtuoso. Let's embark on a journey of discovery together!Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.comBlogger127125tag:blogger.com,1999:blog-8762274703812576773.post-61514529636264476132024-01-27T07:57:00.000-08:002024-01-30T06:22:38.630-08:00Default Constructors in Java<p> </p><ol style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-reset: list-number 0; display: flex; flex-direction: column; list-style: none; margin: 0px 0px 1.25em; padding: 0px;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px 0px 1.25em;"><i>Code is like a breath of life for the machine, and understanding it is the first step in mastering the art of bringing your ideas to life. Begin your journey with a curious mind and the courage to transform challenges into stepping stones.</i></p></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px 0px 1.25em;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn6Jv_AkAK3BawxL3-5hEaY5r58mxzFZbasZV4aGYZnWyRRus9fA1DqNbzILSO3_d-qeF9YnGl4DYKURq4YMRnH3SJj3VSOyM9AnzHosIsbuNXSqlxHgLGilF-6Hd0tBN04sRDtYHljHqxE21IyW9mcY8mTdD4z9K7usOh8VelD1ugSoHGDIuriQ3YKw/s5655/pexels-pixabay-159298.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="3775" data-original-width="5655" height="429" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn6Jv_AkAK3BawxL3-5hEaY5r58mxzFZbasZV4aGYZnWyRRus9fA1DqNbzILSO3_d-qeF9YnGl4DYKURq4YMRnH3SJj3VSOyM9AnzHosIsbuNXSqlxHgLGilF-6Hd0tBN04sRDtYHljHqxE21IyW9mcY8mTdD4z9K7usOh8VelD1ugSoHGDIuriQ3YKw/w640-h429/pexels-pixabay-159298.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: PlusJakartaSans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Cantarell, "Helvetica Neue", Ubuntu, sans-serif; font-size: 14px; text-align: start; white-space: pre;">Photo by <a href=" https://www.pexels.com/photo/gray-scale-photo-of-gears-159298/" target="_blank">Pixabay</a></span></td></tr></tbody></table><br /><i><br /></i></p></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px 0px 1.25em;"><i><br /></i></p></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px 0px 1.25em;">Welcome to the vibrant world of Java programming! If you're embarking on this exciting journey as a new Java developer, you're in for an adventure filled with endless possibilities and learning opportunities. One of the fundamental stepping stones in mastering Java is understanding its constructors, especially the "default constructor", a concept that might seem simple at first glance but holds significant power in your coding arsenal.</p><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 1.25em 0px;">As you dive into the depths of Java, you'll realize that constructors are not just a mere part of the language; they are the very heartbeat of your objects, bringing them to life. The default constructor, in particular, is like a silent partner, working behind the scenes to ensure that your objects are initialized safely, even when you haven't explicitly told Java how to do it.</p><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 1.25em 0px;">This blog post is designed to demystify the concept of default constructors in Java. Whether you're building your first app or trying to understand the intricacies of Java object creation, understanding default constructors is crucial. They ensure your objects are always ready to leap into action, equipped with the necessary initial settings.</p><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 1.25em 0px;">So, gear up for an insightful journey through the world of Java constructors. We promise it's not just about learning; it's about empowering you to write more efficient, effective, and elegant Java code. Let's turn the page and start this chapter in your Java development story, where every line of code you write brings you one step closer to becoming the Java expert you're destined to be!</p></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 1.25em 0px;"><br /></p></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;"><span color="var(--tw-prose-bold)" style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; font-weight: 600;">Understanding Constructors in Java</span></p><ul style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: flex; flex-direction: column; list-style: disc; margin: 0px 0px 0px 1rem; padding: 0px;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Definition of a constructor.</li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Role of constructors in object creation.</li></ul></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;"><span color="var(--tw-prose-bold)" style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; font-weight: 600;">What is a Default Constructor?</span></p><ul style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: flex; flex-direction: column; list-style: disc; margin: 0px 0px 0px 1rem; padding: 0px;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Definition and characteristics of a default constructor.</li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Automatic generation of default constructors by Java.</li></ul></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;"><span color="var(--tw-prose-bold)" style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; font-weight: 600;">Default Constructor vs. No-Argument Constructor</span></p><ul style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: flex; flex-direction: column; list-style: disc; margin: 0px 0px 0px 1rem; padding: 0px;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Clarifying the difference.</li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">When and why to use each.</li></ul></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;"><span color="var(--tw-prose-bold)" style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; font-weight: 600;">How Default Constructors Work</span></p><ul style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: flex; flex-direction: column; list-style: disc; margin: 0px 0px 0px 1rem; padding: 0px;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Detailed explanation of the internal workings.</li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Java’s behavior when no constructor is explicitly defined.</li></ul></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;"><span color="var(--tw-prose-bold)" style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; font-weight: 600;">Examples of Default Constructors in Action</span></p><ul style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: flex; flex-direction: column; list-style: disc; margin: 0px 0px 0px 1rem; padding: 0px;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Simple Java code examples.</li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Explanation of each example to demonstrate default constructor usage.</li></ul></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;"><span color="var(--tw-prose-bold)" style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; font-weight: 600;">Limitations and Considerations of Default Constructors</span></p><ul style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: flex; flex-direction: column; list-style: disc; margin: 0px 0px 0px 1rem; padding: 0px;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Scenarios where default constructors are not ideal.</li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Impact of defining custom constructors on the default constructor.</li></ul></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;"><span color="var(--tw-prose-bold)" style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; font-weight: 600;">Best Practices in Using Constructors</span></p><ul style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: flex; flex-direction: column; list-style: disc; margin: 0px 0px 0px 1rem; padding: 0px;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Guidelines for effective constructor usage in Java.</li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">When to define your own constructors.</li></ul></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;"><span color="var(--tw-prose-bold)" style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; font-weight: 600;">Advanced Topics (Optional)</span></p><ul style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: flex; flex-direction: column; list-style: disc; margin: 0px 0px 0px 1rem; padding: 0px;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Overloading constructors in Java.</li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Interaction between constructors and inheritance.</li></ul></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;"><span color="var(--tw-prose-bold)" style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; font-weight: 600;">Conclusion</span></p><ul style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: flex; flex-direction: column; list-style: disc; margin: 0px 0px 0px 1rem; padding: 0px;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Recap of the key points.</li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">The significance of understanding default constructors in Java development.</li></ul></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-increment: list-number 1; display: block; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em; white-space-collapse: preserve;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;"><span color="var(--tw-prose-bold)" style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; font-weight: 600;">Further Reading and Resources</span></p><ul style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: flex; flex-direction: column; list-style: disc; margin: 0px 0px 0px 1rem; padding: 0px;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Links to official Java documentation.</li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;">Recommended books or tutorials for deeper understanding.</li></ul></li></ol>Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-11808859039403377822023-12-29T10:23:00.000-08:002023-12-29T10:23:32.260-08:00Effective Java (3rd Edition) by Joshua Bloch<h1 style="text-align: left;"><span class="book-title">Effective Java (3rd Edition) by Joshua Bloch</span></h1><div class="book-details"><span class="book-title"><br /></span></div><div class="book-details">
<span class="book-title"><div class="separator" style="clear: both; text-align: center;"><a href="https://m.media-amazon.com/images/W/MEDIAX_792452-T2/images/I/7167aaVxs3L._SL1500_.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="800" data-original-width="647" height="200" src="https://m.media-amazon.com/images/W/MEDIAX_792452-T2/images/I/7167aaVxs3L._SL1500_.jpg" width="162" /></a></div><br />ISBN:</span> 978-0134685991<br />
<span class="book-title">Publication Date:</span> December 27, 2017<br />
<span class="book-title">Price:</span> $43.99 (<a href="https://amzn.to/41DwZyE" target="_blank">Amazon</a>)
</div>
<div class="overview"><span class="book-title"><br /></span></div><div class="overview"><br /></div><div class="overview"><br /></div><div class="overview"><br /></div><div class="overview"><br /></div><div class="overview"><br /></div><div class="overview"><br /></div><div class="overview"><br /></div><div class="overview">"Effective Java" is a Jolt-award-winning book, updated for Java 7 and 8, covering new design patterns and language idioms. Authored by Joshua Bloch, it focuses on Lambda, streams, generics, collections, and selected Java 9 features.
</div>
<div class="unique-approach"><span class="book-title"><br /></span></div><div class="unique-approach">
<span class="book-title"><b>What Sets It Apart</b>:</span>
The book is known for its standalone essays in each chapter, offering advice, Java platform insights, and updated code examples. It covers updated techniques and best practices, particularly in objects, classes, libraries, methods, and serialization.
</div>
<div class="target-audience"><span class="book-title"><br /></span></div><div class="target-audience"><span class="book-title"><b>Target Audience</b>:</span>
Aimed at intermediate to advanced Java programmers familiar with earlier Java versions and seeking to update their skills.
</div><div class="target-audience"><br /></div><div class="target-audience">I had the opportunity to hear Josh speak several times and his knowledge of Java is unsurpassed. This book is one every serious Java developer should read. It is written in a clear and accessible manner.</div>Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-52556469380087797472023-11-09T19:26:00.001-08:002023-11-09T19:26:15.298-08:00How to Use Math.ceil in Java
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsWHEQP96KATBh8WBZNLWEiz9qaQquyFFApPfk8lONCNDkBX2y68XmR_VJU0ly0jw7zpJa7EQ2p8OSM1BseazIrKZxD3VRgXBKzrcSEPUcit_o6vZRrhPHPVnKfd9gXbtQneBgN0DP7AbR4PKx6nTMVHoIFas_zjEvzd64z_ihjH60sqYdysyWutmtvQ/s3726/pexels-pixabay-158571.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="2495" data-original-width="3726" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsWHEQP96KATBh8WBZNLWEiz9qaQquyFFApPfk8lONCNDkBX2y68XmR_VJU0ly0jw7zpJa7EQ2p8OSM1BseazIrKZxD3VRgXBKzrcSEPUcit_o6vZRrhPHPVnKfd9gXbtQneBgN0DP7AbR4PKx6nTMVHoIFas_zjEvzd64z_ihjH60sqYdysyWutmtvQ/w400-h268/pexels-pixabay-158571.jpg" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: PlusJakartaSans, -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen, Cantarell, "Helvetica Neue", Ubuntu, sans-serif; font-size: 14px; text-align: start; white-space: pre;">Photo by <a href="https://www.pexels.com/photo/worm-s-eye-of-white-and-black-inside-basket-158571/" target="_blank">Pixabay</a></span></td></tr></tbody></table><br /><div style="text-align: left;">Are you curious about how to use the <code>Math.ceil</code> function in Java? Well, let's break it down, step by step!</div>
<h2>What is <code>Math.ceil</code>?</h2>
<p><code>Math.ceil</code> is like a magic tool in Java that helps us with numbers. It's like having a superhero friend who can make numbers bigger, but not just any bigger—<strong>the next biggest whole number</strong>!</p>
<h2>The Problem</h2>
<p>Imagine you have some numbers that aren't whole. They have parts after the dot, like 5.5 or 3.7. Sometimes, you want to make them into big whole numbers. That's where <code>Math.ceil</code> comes to the rescue.</p>
<h2>How to Use It</h2>
<p>Here's the secret formula:</p>
<ol>
<li>First, you need a number. Let's call it your "special number." For example, let's use the number 7.3.</li>
<li>Next, you ask <code>Math.ceil</code> to do its magic with your special number. It looks at your number and says, "I'll make it bigger, but not just a little bigger. I'll make it the <strong>next biggest whole number</strong>!" So, <code>Math.ceil(7.3)</code> says, "I'll turn 7.3 into 8.0."</li>
<li>And that's it! You now have a bigger whole number. It's like turning 7.3 into 8, just like magic.</li>
</ol>
<h2>Example</h2>
<p>Let's see it in action:</p>
<pre><code>
<span style="background-color: #cccccc;"><blockquote>import java.lang.Math;
public class CeilingExample {
public static void main(String[] args) {
double specialNumber = 7.3; // Our special number
double biggerNumber = Math.ceil(specialNumber); // Math.ceil does its magic
System.out.println("Original number: " + specialNumber);
System.out.println("Bigger number: " + biggerNumber);
}
}</blockquote></span>
</code></pre>
<p>When you run this program, it will say:</p>
<pre><code>
Original number: 7.3
Bigger number: 8.0
</code></pre>
<p>You see, <code>Math.ceil</code> made our special number 7.3 bigger and turned it into the next biggest whole number, which is 8!</p>
<h2>Why It's Cool</h2>
<p><code>Math.ceil</code> helps us when we want to be very fair with numbers. Sometimes, we need to round up to make sure everyone gets their fair share. Imagine sharing candies with your friends. If you have 7.3 candies, <code>Math.ceil</code> helps make sure each friend gets 8 candies. It's like being super fair!</p>
<p>So, that's how you use <code>Math.ceil</code> in Java. It's like magic that turns numbers into the next biggest whole numbers, and it helps us be fair with our numbers. Now you're ready to use it in your own programs, just like a little math wizard!</p>
Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-8856631001831604412023-08-21T10:40:00.000-07:002023-08-21T10:43:35.632-07:00Integrating Secrets into OpenShift Deployments via Maven<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNlIUimp3YmmmZjBfvaNTPGgaBJkphCkVpFk94OuaAA0rSQYv4ETE11x3pxJwxoGOUvhE7a9UTb2iH9Bk-v-JMKN3wisHJ-Q_5rwiiP5J6RGq51HKwRjug_vtiLWptMaQ3oi_oyRNC23xlkG8ooz0wlU-XRip83To6zKuy6Xk3moeNovRsU7b5iU5yKA/s7360/pexels-sound-on-3761018.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="4912" data-original-width="7360" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNlIUimp3YmmmZjBfvaNTPGgaBJkphCkVpFk94OuaAA0rSQYv4ETE11x3pxJwxoGOUvhE7a9UTb2iH9Bk-v-JMKN3wisHJ-Q_5rwiiP5J6RGq51HKwRjug_vtiLWptMaQ3oi_oyRNC23xlkG8ooz0wlU-XRip83To6zKuy6Xk3moeNovRsU7b5iU5yKA/s320/pexels-sound-on-3761018.jpg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: PlusJakartaSans, -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen, Cantarell, "Helvetica Neue", Ubuntu, sans-serif; font-size: 14px; text-align: start; white-space: pre;">Photo by <a href="https://www.pexels.com/photo/portrait-photo-of-woman-in-yellow-t-shirt-doing-the-shh-sign-while-standing-in-front-of-blue-background-3761018/" target="_blank">Sound On</a>: </span></td></tr></tbody></table><p>I am using the to deploy a SpringBoot Java project to OpenShift. This project uses secrets that are manually added to OpenShift via the console. The secrets are added to the container as environment variables. </p><p>When building and deploying applications on OpenShift using the Maven build tool, especially for SpringBoot Java projects, managing secrets efficiently is paramount. OpenShift provides a robust environment for container orchestration, but like any tool, it requires certain optimizations to smooth out workflows. One such hiccup often encountered is the management of secrets, which are crucial for the application's environment variables.</p><h3 style="text-align: left;">Background</h3><p>I've been employing the <a href="https://eclipse.dev/jkube/docs/openshift-maven-plugin/" target="_blank">OpenShift Maven Plugin</a> to streamline my deployment processes of a SpringBoot Java project to OpenShift. In my setup, I've relied on secrets that were being manually added to OpenShift using the console. These secrets were essential as they were loaded into the container as environment variables.</p><h3 style="text-align: left;">Challenge</h3><p>A recurring bottleneck in this process was that every time the project underwent deployment, I found myself revisiting the OpenShift console to reapply these secrets. Not only was this tedious, but it also raised concerns about the efficiency of the deployment process. It is also a step that is easy to forget and will leave the software in an unusable state.</p><h3 style="text-align: left;">The Solution</h3><p>After some research, I came across a way to counteract this issue. The solution is to craft a specific YAML configuration fragment that aligns with the FAQ guidance on "<a href="https://eclipse.dev/jkube/docs/openshift-maven-plugin/#_how_do_i_define_an_environment_variable" target="_blank">How do I create an environment variable?</a>". Rather than stipulating individual environment variables, the approach leverages the <span style="font-family: courier;">envFrom</span> directive combined with <span style="font-family: courier;">secretRef </span>to reference a secret. This allows for loading all key-value pairs in the secret as environment variables in one fell swoop.</p>
<script src="https://gist.github.com/m0smith/b185102e573346ece3b31f1c000daf3e.js"></script>
<h3 style="text-align: left;"> Detailed Explanation</h3><div><div><br /></div><div><span style="font-family: courier;">envFrom</span>: This directive provides an efficient method for setting multiple environment variables in a container. Instead of the laborious task of defining each environment variable one-by-one, envFrom enables users to set all environment variables from a unified source.</div><div><br /></div><div><span style="font-family: courier;">secretRef</span>: A pivotal component of this approach, secretRef directs the environment variables to be derived from a Kubernetes Secret.</div><div><br /></div><div><span style="font-family: courier;">name:my-secret</span>: The secret's name is crucial. For this illustration, consider the name to be my-secret. This secret should be pre-existing in the same namespace as the associated resource (e.g., Pod or Deployment). Within this secret, every key-value pair will be translated into an environment variable. Here, the key assumes the role of the environment variable's name, and the associated value is what the environment variable will be set to.</div><div><br /></div><h3 style="text-align: left;">Summary</h3><div><br /></div><div>This solution not only streamlines the deployment process but also reduces the chances of manual error. By integrating the management of secrets directly into the Maven deployment workflow, we can ensure a smoother and more automated deployment process on OpenShift.</div></div><div><br /></div><div><i><span style="font-size: medium;">Have you encountered similar challenges with your deployments? Share your experiences below! 👇</span></i></div>Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-75741268210462365282023-08-17T15:55:00.002-07:002023-08-17T15:55:52.416-07:00Mastering SQL: The Power Duo of 'GROUP BY' and 'HAVING'<div style="background-color: #f2f2f2; border-radius: 10px; font-family: Arial, sans-serif; margin: auto; max-width: 800px; padding: 20px;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3l92MFCS6bl8JTC8s5QPt6dTO6vjubFBgwVdPn6yCIB2N3VI9a1USjqp5KWl_qMhCIqPuI0pPhPj8jcxvvr41kXRZbJtnZYUdfbJXeOtlMex2q-nx5MN6ZJ5BMQoeljesb_mUjHFG-YOU9Lb__IMF5Cd-ZWAYEFoZOdhj6AKmwDoAP593ymUnkmfvvQ/s5184/pexels-ebru-y%C4%B1lmaz-17789592.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="3456" data-original-width="5184" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3l92MFCS6bl8JTC8s5QPt6dTO6vjubFBgwVdPn6yCIB2N3VI9a1USjqp5KWl_qMhCIqPuI0pPhPj8jcxvvr41kXRZbJtnZYUdfbJXeOtlMex2q-nx5MN6ZJ5BMQoeljesb_mUjHFG-YOU9Lb__IMF5Cd-ZWAYEFoZOdhj6AKmwDoAP593ymUnkmfvvQ/s320/pexels-ebru-y%C4%B1lmaz-17789592.jpg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span face="PlusJakartaSans, -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen, Cantarell, "Helvetica Neue", Ubuntu, sans-serif" style="font-size: 14px; text-align: start; white-space: pre;">Photo by <a href="https://www.pexels.com/photo/people-dressed-as-ghosts-taking-pictures-on-a-field-17789592/">Ebru Yılmaz</a></span></td></tr></tbody></table><div style="font-family: Arial, sans-serif; margin: 20px;"><p id="intro">Welcome SQL enthusiasts! In today's post, we're diving deep into the synergistic relationship between <strong>GROUP BY</strong> and <strong>HAVING</strong> clauses in SQL. Both are paramount for data aggregation tasks, but how do they work hand in hand? Let's embark on this technical exploration!</p>
<label>Understanding 'GROUP BY'</label>
<p id="gb"><strong>GROUP BY</strong> is the hero of SQL when it comes to grouping rows that share the same values in specified columns. It often comes into play with aggregate functions like COUNT(), SUM(), and AVG(). But there's a catch! What if you want to filter these grouped results further?</p>
<label>Enter 'HAVING'</label>
<p id="having-explained">This is where <strong>HAVING</strong> enters the scene. Unlike the WHERE clause, which filters rows before they are grouped, the <strong>HAVING</strong> clause filters the groups after they are created. This means you can apply conditions on aggregate functions directly.</p>
<label>Query In Action</label>
<p id="query-example">Let's take a practical dive. Consider you want to find products, from a sales database, that are popular across multiple cities with an impressive sales count. Here's how you can wield both GROUP BY and HAVING to achieve this:</p>
<pre style="background-color: #f7f7f9; border-radius: 5px; font-size: 16px; padding: 10px;">SELECT product_name, COUNT(DISTINCT city) as number_of_cities, SUM(units_sold) as total_units_sold
FROM sales
GROUP BY product_name
HAVING COUNT(DISTINCT city) > 1 AND SUM(units_sold) > 100;
</pre>
<label>Concluding Thoughts</label>
<p id="conclusion">As you can see, the harmony between <strong>GROUP BY</strong> and <strong>HAVING</strong> empowers SQL practitioners to perform intricate data analysis with precision. Always remember, while GROUP BY clubs the data, HAVING is there to refine your aggregated results further!</p>
<footer>
<p>Are you eager to enhance your SQL prowess further? Bookmark our blog and join our journey to unravel the mysteries of databases and query languages! 🌐</p>
</footer>
</div>
</div>
Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-42363410359993787262023-08-15T10:39:00.003-07:002023-08-15T10:39:21.759-07:00Unveiling the Mysteries of Your CSV's Second Column! 🐧🔍 <table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5NULII8KkVZ4afhDC2uxcw0VdgOjmZtchLfSUcgIrbbak4ahKH0jwGi1FikHJJnjjyF5X-NLlpcRoJ3-ORojjz5Z9-R3nrAHCdcf2GyIHJFlq-JXSpor4XpJ4phYkQcQ9-McudKKALMZZPMnHVAqbEoUP94lDaZJhnKiT2dkYWj3HpSuMkhc6P2LD9g/s4032/pexels-mariam-antadze-5913170.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="4032" data-original-width="3024" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5NULII8KkVZ4afhDC2uxcw0VdgOjmZtchLfSUcgIrbbak4ahKH0jwGi1FikHJJnjjyF5X-NLlpcRoJ3-ORojjz5Z9-R3nrAHCdcf2GyIHJFlq-JXSpor4XpJ4phYkQcQ9-McudKKALMZZPMnHVAqbEoUP94lDaZJhnKiT2dkYWj3HpSuMkhc6P2LD9g/s320/pexels-mariam-antadze-5913170.jpg" width="240" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: PlusJakartaSans, -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen, Cantarell, "Helvetica Neue", Ubuntu, sans-serif; font-size: 14px; text-align: start; white-space: pre;">Photo by Mariam <a href="https://www.pexels.com/photo/assorted-beans-placed-in-rows-on-white-fabric-5913170/">Antadze</a>: </span></td></tr></tbody></table><br /><h1><br /></h1>
<p>Ever gazed at a CSV file over a steaming cup of coffee ☕, scratching your head, thinking, "How many times does this value pop up?". Well, today's your lucky day! Ready for some command-line sorcery? 🎩✨</p>
<h2>🔮 Behold... The Magical Bash Script! 🐚</h2>
<pre style="background-color: whitesmoke; border-radius: 5px; padding: 10px;"><code>
awk -F, '{print $2}' input.csv | sort | uniq -c | awk '$1 != 1'
</code>
</pre>
<h3>🕊️ Dissecting the Spell</h3>
<ul>
<li><strong>awk -F, '{print $2}' input.csv</strong>: This is where the magic starts! 🌟 This command fetches the <em>second column</em> of our CSV. That's right! The <code>print $2</code> is the star player here, ensuring we're only eyeing the second column.</li>
<li><strong>sort</strong>: Next up, the ever-helpful librarian of the command line, putting everything in tidy rows.</li>
<li><strong>uniq -c</strong>: Our trusty friend here spots unique items and counts 'em. Think of it as a bouncer with a clicker at the club's entrance 🎉.</li>
<li><strong>awk '$1 != 1'</strong>: Lastly, this guy filters out the solo performers, showing only values with company.</li>
</ul>
<p>Voilà! A handy method to peer into the depths of your CSV's second column. Whether you're cleaning up data or uncovering the secrets within, this little snippet is your key!</p>
<h3>🚀 Wrapping it up!</h3>
<p>Remember: In the vast universe of data, every column tells a tale. Now you're equipped to hear the second chapter. May your insights always be enlightening! 🌌</p>
<footer>
<p>Tags: <span>#bash</span>, <span>#csv</span>, <span>#awk</span>, <span>#commandLineMagic</span></p>
</footer>Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-70603712889302950652023-08-01T13:23:00.003-07:002023-08-01T14:20:56.804-07:00Simplifying Data Conversion: Converting JSON to CSV Using jq<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyyGRfe47nesLCkjfvwm0DUBTkUVwCynwYmUOq5QGxzvL0mZofATGqWoNLy3OrQh4lCZ0F9bF_cj95dioJmkSIK457FXu4Ndw4i2hfW7hlteoCXgK-8kaKhbM16gpu0hlGOWYR1XB2oeeJ9r4nCxgdBQS894U8FE5yWVLHnQL4JphKmC2JCWQG1iXYSA/s5697/pexels-dids-7867332.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="3798" data-original-width="5697" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyyGRfe47nesLCkjfvwm0DUBTkUVwCynwYmUOq5QGxzvL0mZofATGqWoNLy3OrQh4lCZ0F9bF_cj95dioJmkSIK457FXu4Ndw4i2hfW7hlteoCXgK-8kaKhbM16gpu0hlGOWYR1XB2oeeJ9r4nCxgdBQS894U8FE5yWVLHnQL4JphKmC2JCWQG1iXYSA/w400-h266/pexels-dids-7867332.jpg" width="400" /></a></div><br />JSON (JavaScript Object Notation) and CSV (Comma-Separated Values) are two widely used data formats, each with its unique advantages. Sometimes, you may encounter JSON data that needs to be converted into CSV format for easier analysis, sharing, or integration with other tools. In this blog post, we'll explore how to leverage <a href="https://jqlang.github.io/jq/" target="_blank">jq</a> to effortlessly convert JSON to CSV, enabling you to handle data transformation with ease and efficiency.<p></p><span><a name='more'></a></span><p><br /></p><h3 style="text-align: left;">Why Convert JSON to CSV?</h3><p>CSV is a widely supported and straightforward data format, making it ideal for data interchange between various applications, spreadsheets, and databases. By converting JSON to CSV, you can take advantage of CSV's simplicity and compatibility while making your data more accessible to a broader range of tools and users.</p><h3 style="text-align: left;">Prerequisites</h3><p>Before we dive into the conversion process, ensure you have jq installed on your system. You can download it from the official <a href="https://jqlang.github.io/jq/" target="_blank">jq</a> website (<a href="https://jqlang.github.io/jq/">https://jqlang.github.io/jq/</a>), or use your package manager on Linux/macOS:</p><p><script src="https://gist.github.com/m0smith/ebe16ae72d34995f7a179f154374ea84.js"></script></p><h3 style="text-align: left;">Converting JSON to CSV using jq</h3><p><br /></p><p>To convert JSON to CSV using jq, we can utilize its built-in CSV output filter. The following example demonstrates how to achieve this:</p><p><script src="https://gist.github.com/m0smith/a7ef6b2fcd1b95a6e2322950f537b389.js"></script></p><p>Suppose we have the following JSON data in a file called data.json:</p><h3 style="text-align: left;">Basic Conversion:</h3><p>To convert the JSON data to CSV, execute the following command in your terminal:</p><p><script src="https://gist.github.com/m0smith/9b93aa7e77715f03e861a576b162261a.js"></script></p><p>The -r option ensures that jq outputs raw CSV data without quoting.</p><p><br /></p><h3 style="text-align: left;">Customized Conversion:</h3><p>You can customize the CSV output to include specific fields or rearrange them according to your needs. For example:</p><p><script src="https://gist.github.com/m0smith/d11a72181f47f303986133ecb5c706f0.js"></script></p><p>This command will only include the "Name" and "Email" fields in the CSV output.</p><p><br /></p><h3 style="text-align: left;">Conclusion</h3><p><br /></p><p>Converting JSON to CSV can be a simple and seamless process with the power of jq. By harnessing its filtering capabilities and built-in CSV output, you can easily transform JSON data into a format suitable for further analysis, sharing, or integration. Whether you're dealing with large datasets or small configuration files, jq simplifies the conversion process, making it a valuable tool in your data manipulation arsenal.</p><p><br /></p><p>Next time you find yourself needing to convert JSON to CSV, give jq a try, and experience the efficiency and ease it brings to the table. Happy data transformation!</p>Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-46817397416917323232022-08-15T08:56:00.002-07:002023-08-01T15:24:59.429-07:00Example of using the AthenaQueryPolicy policy with SAM AWS::Serverless::Function<p> When defining a Lambda in a SAM template this is how you would add the <a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-policy-template-list.html#athena-query-policy">AthenaQueryPolicy</a> </p><p class="p1" style="font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: Menlo;">primary </span><span style="font-family: arial;">is the name of the Athena Workspace</span></p>
<script src="https://gist.github.com/m0smith/9be99f4022e874254f0f491931174c37.js"></script>Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-55053148948268017032022-07-21T21:46:00.004-07:002022-07-21T21:46:45.250-07:00Clojuresmith concept: return value<iframe frameborder="0" height="270" src="https://youtube.com/embed/F9TYpJLSnWY" width="480"></iframe><div><br /></div><div><p class="_04xlpA direction-ltr align-center para-style-body" style="--font-size: 69.3333px; --line-height: 1.4; font-family: "YAD7QhG2T6o 0", _fb_, auto; line-height: 97px;"><span class="JsGRdQ">Every function returns the last value of the last expression evaluated.</span></p><p class="_04xlpA direction-ltr align-center para-style-body" style="--font-size: 69.3333px; --line-height: 1.4; font-family: "YAD7QhG2T6o 0", _fb_, auto; line-height: 97px;"></p><p class="_04xlpA direction-ltr align-center para-style-body" style="--font-size: 69.3333px; --line-height: 1.4; font-family: "YAD7QhG2T6o 0", _fb_, auto; line-height: 97px;"><span class="JsGRdQ">There is no "return" statement.</span></p></div>Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-13726941525839964312022-07-19T20:28:00.005-07:002022-07-19T20:28:58.929-07:00Clojuresmith concept: truth<iframe frameborder="0" height="270" src="https://youtube.com/embed/JuDiXMLt9EA" width="480"></iframe><div><br /></div><div><br /></div><div><div>In Clojure all values are either truthy or falsey. The only falsey values are:</div><div><br /></div><div>false</div><div>nil</div><div><br /></div><div>Every other value is considered truthy</div></div>Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-68037885985256767912020-06-01T15:28:00.000-07:002023-08-01T15:29:08.394-07:00Datomic Peer? or Client?<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5EnW57WFuCtjn9shwYx5bvvxrz3ts1h-F5pj-YkxM_GUFSLsvtf5bIgHOF1i22hP0IHompy2dvbiHYgJdzrSOIK14gQMo2Hd_7qyrx0heSZ_AmKjoXPdrlqYpfcwFI1SXHfoiPzc4dkY/s1600/clouds-dock-lightning-1769348.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="853" data-original-width="640" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5EnW57WFuCtjn9shwYx5bvvxrz3ts1h-F5pj-YkxM_GUFSLsvtf5bIgHOF1i22hP0IHompy2dvbiHYgJdzrSOIK14gQMo2Hd_7qyrx0heSZ_AmKjoXPdrlqYpfcwFI1SXHfoiPzc4dkY/s200/clouds-dock-lightning-1769348.jpg" width="150" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: x-small;"><span style="background-color: #e8e8e8; color: #1a1a1a; font-family: , , "segoe ui" , "roboto" , "oxygen" , "cantarell" , "helvetica neue" , "ubuntu" , sans-serif;">Photo by </span><span style="background-color: #e8e8e8; box-sizing: border-box; color: #1a1a1a; font-family: , , "segoe ui" , "roboto" , "oxygen" , "cantarell" , "helvetica neue" , "ubuntu" , sans-serif; font-weight: 600; margin-bottom: 0px; margin-top: 0px;"><a href="https://www.pexels.com/@powella1190?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; text-decoration-line: none;">Alex Powell </a></span><span style="background-color: #e8e8e8; color: #1a1a1a; font-family: , , "segoe ui" , "roboto" , "oxygen" , "cantarell" , "helvetica neue" , "ubuntu" , sans-serif;">from </span><span style="background-color: #e8e8e8; box-sizing: border-box; color: #1a1a1a; font-family: , , "segoe ui" , "roboto" , "oxygen" , "cantarell" , "helvetica neue" , "ubuntu" , sans-serif; font-weight: 600; margin-bottom: 0px; margin-top: 0px;"><a href="https://www.pexels.com/photo/wooden-dock-on-body-of-water-1769348/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; text-decoration-line: none;">Pexels</a></span></span></td></tr>
</tbody></table>
I just stated a new job at <a href="http://taxbit.com/" target="_blank">Taxbit</a> where I am working in <a href="http://clojure.org/" target="_blank">Clojure</a> and <a href="https://docs.datomic.com/cloud/index.html" target="_blank">Datomic</a> full-time for the first time. I have been dabbling on personal projects for a number of years now but this is my first time being paid to work in this environment.<br />
<br />
<stuff about="" how="" is="" it="" nice=""></stuff><br />
<br />
<stuff about="" client="" peer="" vs=""></stuff><br />
<br />
Working to update <a href="https://github.com/m0smith/datomic-schema" target="_blank">datomic-schema</a>, the client v. peer issue became a real problem.<br />
<br />
onyx-datomic has a way to determine which client is being used<br />
<br />
<h3>
Differences between :find</h3>
<div>
<div class="message" id="inst-2018-04-04T17:04:03.000853Z" style="border: 0px; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.5rem 0px 0px; min-height: 36px; padding: 0.25rem 2rem 0.1rem 3rem; position: relative; vertical-align: baseline;">
<span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;"><div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
I have a syntax question. This is working:</div>
<pre class="highlight" style="background: rgb(251, 250, 248); border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: border-box; color: #333333; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 0.75rem; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.15rem; margin-bottom: 0.2rem; margin-top: 0.5rem; overflow-wrap: break-word; padding: 0.5rem; vertical-align: baseline; white-space: pre-wrap; word-break: normal;"><code style="background-color: transparent; border: none; box-sizing: border-box; color: inherit; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.2; margin: 0px; padding: 0px; vertical-align: baseline;">(d/q '[:find (pull ?e [*])
:where [?e :team/id]] db)
</code></pre>
This is not, and is throwing Exception<pre class="highlight" style="background: rgb(251, 250, 248); border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: border-box; color: #333333; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 0.75rem; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.15rem; margin-bottom: 0.2rem; margin-top: 0.5rem; overflow-wrap: break-word; padding: 0.5rem; vertical-align: baseline; white-space: pre-wrap; word-break: normal;"><code style="background-color: transparent; border: none; box-sizing: border-box; color: inherit; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.2; margin: 0px; padding: 0px; vertical-align: baseline;">(d/q '[:find [(pull ?e [*]) ...]
:where [?e :team/id]] db)
</code></pre>
Exception<pre class="highlight" style="background: rgb(251, 250, 248); border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: border-box; color: #333333; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 0.75rem; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.15rem; margin-bottom: 0.2rem; margin-top: 0.5rem; overflow-wrap: break-word; padding: 0.5rem; vertical-align: baseline; white-space: pre-wrap; word-break: normal;"><code style="background-color: transparent; border: none; box-sizing: border-box; color: inherit; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.2; margin: 0px; padding: 0px; vertical-align: baseline;">ExceptionInfo Only find-rel elements are allowed in client find-spec
</code></pre>
I’m using datomic-pro-0.9.5661<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
</span></div>
<div class="message" id="inst-2018-04-04T17:07:01.000775Z" style="border: 0px; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.5rem 0px 0px; min-height: 36px; padding: 0.25rem 2rem 0.1rem 3rem; position: relative; vertical-align: baseline;">
<a class="message_profile-pic" href="https://clojurians.slack.com/team/U05120CBV" style="background-image: url("https://secure.gravatar.com/avatar/9fa7f07a1caada8cbf98f1a9890f3400.jpg?s=48&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0010-48.png"); background-size: cover; border-radius: 0.2rem; border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 36px; left: 0px; line-height: inherit; margin: 0px; padding: 0px; position: absolute; vertical-align: baseline; width: 36px;"></a><a class="message_username" href="https://clojurians.slack.com/team/U05120CBV" style="border: 0px; box-sizing: border-box; color: #8b898f; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0.25rem 0px 0px; text-decoration-line: none; vertical-align: baseline;">marshall</a><span class="message_timestamp" style="border: 0px; box-sizing: border-box; color: #babbbf; display: inline; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; left: 0px; line-height: 1.2rem; margin: 0px; padding: 0px; position: relative; top: 0px; vertical-align: baseline; width: 36px;"><a href="https://clojurians-log.clojureverse.org/datomic/2018-04-04/1522850821.000775" rel="nofollow" style="border: 0px; box-sizing: border-box; color: #babbbf; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;">14:04:01</a></span><span class="message_star" style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></span><span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;"><div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
Client only supports find rel <a href="https://docs.datomic.com/cloud/query/query-data-reference.html#find-specs" style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">https://docs.datomic.com/cloud/query/query-data-reference.html#find-specs</a></div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
</span></div>
<div class="message" id="inst-2018-04-04T17:08:20.000469Z" style="border: 0px; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.5rem 0px 0px; min-height: 36px; padding: 0.25rem 2rem 0.1rem 3rem; position: relative; vertical-align: baseline;">
<a class="message_profile-pic" href="https://clojurians.slack.com/team/U05120CBV" style="background-image: url("https://secure.gravatar.com/avatar/9fa7f07a1caada8cbf98f1a9890f3400.jpg?s=48&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0010-48.png"); background-size: cover; border-radius: 0.2rem; border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 36px; left: 0px; line-height: inherit; margin: 0px; padding: 0px; position: absolute; vertical-align: baseline; width: 36px;"></a><a class="message_username" href="https://clojurians.slack.com/team/U05120CBV" style="border: 0px; box-sizing: border-box; color: #8b898f; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0.25rem 0px 0px; text-decoration-line: none; vertical-align: baseline;">marshall</a><span class="message_timestamp" style="border: 0px; box-sizing: border-box; color: #babbbf; display: inline; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; left: 0px; line-height: 1.2rem; margin: 0px; padding: 0px; position: relative; top: 0px; vertical-align: baseline; width: 36px;"><a href="https://clojurians-log.clojureverse.org/datomic/2018-04-04/1522850900.000469" rel="nofollow" style="border: 0px; box-sizing: border-box; color: #babbbf; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;">14:04:20</a></span><span class="message_star" style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></span><span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;"><div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
Peer has additional options for find spec <a href="https://docs.datomic.com/on-prem/query.html#find-specifications" style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">https://docs.datomic.com/on-prem/query.html#find-specifications</a></div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
</span></div>
<div class="message" id="inst-2018-04-04T17:14:04.000076Z" style="border: 0px; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.5rem 0px 0px; min-height: 36px; padding: 0.25rem 2rem 0.1rem 3rem; position: relative; vertical-align: baseline;">
<a class="message_profile-pic" href="https://clojurians.slack.com/team/U067PPCUR" style="background-image: url("https://avatars.slack-edge.com/2016-09-14/79601519524_6f51682405c63cb978ad_48.jpg"); background-size: cover; border-radius: 0.2rem; border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 36px; left: 0px; line-height: inherit; margin: 0px; padding: 0px; position: absolute; vertical-align: baseline; width: 36px;"></a><a class="message_username" href="https://clojurians.slack.com/team/U067PPCUR" style="border: 0px; box-sizing: border-box; color: #8b898f; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0.25rem 0px 0px; text-decoration-line: none; vertical-align: baseline;">brett</a><span class="message_timestamp" style="border: 0px; box-sizing: border-box; color: #babbbf; display: inline; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; left: 0px; line-height: 1.2rem; margin: 0px; padding: 0px; position: relative; top: 0px; vertical-align: baseline; width: 36px;"><a href="https://clojurians-log.clojureverse.org/datomic/2018-04-04/1522851244.000076" rel="nofollow" style="border: 0px; box-sizing: border-box; color: #babbbf; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;">14:04:04</a></span><span class="message_star" style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></span><span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;"><div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
All I changed is the binding form. I see it in both links you sent.</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
</span></div>
<div class="message" id="inst-2018-04-04T17:26:01.000293Z" style="border: 0px; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.5rem 0px 0px; min-height: 36px; padding: 0.25rem 2rem 0.1rem 3rem; position: relative; vertical-align: baseline;">
<a class="message_profile-pic" href="https://clojurians.slack.com/team/U05120CBV" style="background-image: url("https://secure.gravatar.com/avatar/9fa7f07a1caada8cbf98f1a9890f3400.jpg?s=48&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0010-48.png"); background-size: cover; border-radius: 0.2rem; border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 36px; left: 0px; line-height: inherit; margin: 0px; padding: 0px; position: absolute; vertical-align: baseline; width: 36px;"></a><a class="message_username" href="https://clojurians.slack.com/team/U05120CBV" style="border: 0px; box-sizing: border-box; color: #8b898f; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0.25rem 0px 0px; text-decoration-line: none; vertical-align: baseline;">marshall</a><span class="message_timestamp" style="border: 0px; box-sizing: border-box; color: #babbbf; display: inline; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; left: 0px; line-height: 1.2rem; margin: 0px; padding: 0px; position: relative; top: 0px; vertical-align: baseline; width: 36px;"><a href="https://clojurians-log.clojureverse.org/datomic/2018-04-04/1522851961.000293" rel="nofollow" style="border: 0px; box-sizing: border-box; color: #babbbf; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;">14:04:01</a></span><span class="message_star" style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></span><span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;"><div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
The client only supports the find-rel form. You can use the other binding forms for inputs, but not in the find specification</div>
</span></div>
</div>
<br />
Reference<br />
<br />
<ul>
<li>tx-data reference: <a href="https://docs.datomic.com/cloud/transactions/transaction-data-reference.html">https://docs.datomic.com/cloud/transactions/transaction-data-reference.html</a></li>
</ul>
<br />
<br />
<br />Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-44725906055888655902019-10-15T16:31:00.001-07:002019-10-15T16:31:47.134-07:00Only find-rel elements are allowed in client find-spec<div class="message" id="inst-2018-04-04T17:04:03.000853Z" style="border: 0px; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.5rem 0px 0px; min-height: 36px; padding: 0.25rem 2rem 0.1rem 3rem; position: relative; vertical-align: baseline;">
<span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;"><div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
More peer vs client; again from <a href="https://clojurians-log.clojureverse.org/datomic/2018-04-04" target="_blank">clojarians</a>:</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
<br /></div>
<h3 style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
Conversation from slack</h3>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
I have a syntax question. This is working:</div>
<pre class="highlight" style="background: rgb(251, 250, 248); border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: border-box; color: #333333; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 0.75rem; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.15rem; margin-bottom: 0.2rem; margin-top: 0.5rem; overflow-wrap: break-word; padding: 0.5rem; vertical-align: baseline; white-space: pre-wrap; word-break: normal;"><code style="background-color: transparent; border: none; box-sizing: border-box; color: inherit; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.2; margin: 0px; padding: 0px; vertical-align: baseline;">(d/q '[:find (pull ?e [*])
:where [?e :team/id]] db)
</code></pre>
This is not, and is throwing Exception<pre class="highlight" style="background: rgb(251, 250, 248); border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: border-box; color: #333333; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 0.75rem; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.15rem; margin-bottom: 0.2rem; margin-top: 0.5rem; overflow-wrap: break-word; padding: 0.5rem; vertical-align: baseline; white-space: pre-wrap; word-break: normal;"><code style="background-color: transparent; border: none; box-sizing: border-box; color: inherit; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.2; margin: 0px; padding: 0px; vertical-align: baseline;">(d/q '[:find [(pull ?e [*]) ...]
:where [?e :team/id]] db)
</code></pre>
Exception<pre class="highlight" style="background: rgb(251, 250, 248); border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing: border-box; color: #333333; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 0.75rem; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.15rem; margin-bottom: 0.2rem; margin-top: 0.5rem; overflow-wrap: break-word; padding: 0.5rem; vertical-align: baseline; white-space: pre-wrap; word-break: normal;"><code style="background-color: transparent; border: none; box-sizing: border-box; color: inherit; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.2; margin: 0px; padding: 0px; vertical-align: baseline;">ExceptionInfo Only find-rel elements are allowed in client find-spec
</code></pre>
I’m using datomic-pro-0.9.5661<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
</span></div>
<div class="message" id="inst-2018-04-04T17:07:01.000775Z" style="border: 0px; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.5rem 0px 0px; min-height: 36px; padding: 0.25rem 2rem 0.1rem 3rem; position: relative; vertical-align: baseline;">
<a class="message_profile-pic" href="https://clojurians.slack.com/team/U05120CBV" style="background-image: url("https://secure.gravatar.com/avatar/9fa7f07a1caada8cbf98f1a9890f3400.jpg?s=48&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0010-48.png"); background-size: cover; border-radius: 0.2rem; border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 36px; left: 0px; line-height: inherit; margin: 0px; padding: 0px; position: absolute; vertical-align: baseline; width: 36px;"></a><a class="message_username" href="https://clojurians.slack.com/team/U05120CBV" style="border: 0px; box-sizing: border-box; color: #8b898f; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0.25rem 0px 0px; text-decoration-line: none; vertical-align: baseline;">marshall</a><span class="message_timestamp" style="border: 0px; box-sizing: border-box; color: #babbbf; display: inline; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; left: 0px; line-height: 1.2rem; margin: 0px; padding: 0px; position: relative; top: 0px; vertical-align: baseline; width: 36px;"><a href="https://clojurians-log.clojureverse.org/datomic/2018-04-04/1522850821.000775" rel="nofollow" style="border: 0px; box-sizing: border-box; color: #babbbf; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;">14:04:01</a></span><span class="message_star" style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></span><span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;"><div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
Client only supports find rel <a href="https://docs.datomic.com/cloud/query/query-data-reference.html#find-specs" style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">https://docs.datomic.com/cloud/query/query-data-reference.html#find-specs</a></div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
</span></div>
<div class="message" id="inst-2018-04-04T17:08:20.000469Z" style="border: 0px; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.5rem 0px 0px; min-height: 36px; padding: 0.25rem 2rem 0.1rem 3rem; position: relative; vertical-align: baseline;">
<a class="message_profile-pic" href="https://clojurians.slack.com/team/U05120CBV" style="background-image: url("https://secure.gravatar.com/avatar/9fa7f07a1caada8cbf98f1a9890f3400.jpg?s=48&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0010-48.png"); background-size: cover; border-radius: 0.2rem; border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 36px; left: 0px; line-height: inherit; margin: 0px; padding: 0px; position: absolute; vertical-align: baseline; width: 36px;"></a><a class="message_username" href="https://clojurians.slack.com/team/U05120CBV" style="border: 0px; box-sizing: border-box; color: #8b898f; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0.25rem 0px 0px; text-decoration-line: none; vertical-align: baseline;">marshall</a><span class="message_timestamp" style="border: 0px; box-sizing: border-box; color: #babbbf; display: inline; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; left: 0px; line-height: 1.2rem; margin: 0px; padding: 0px; position: relative; top: 0px; vertical-align: baseline; width: 36px;"><a href="https://clojurians-log.clojureverse.org/datomic/2018-04-04/1522850900.000469" rel="nofollow" style="border: 0px; box-sizing: border-box; color: #babbbf; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;">14:04:20</a></span><span class="message_star" style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></span><span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;"><div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
Peer has additional options for find spec <a href="https://docs.datomic.com/on-prem/query.html#find-specifications" style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">https://docs.datomic.com/on-prem/query.html#find-specifications</a></div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
</span></div>
<div class="message" id="inst-2018-04-04T17:14:04.000076Z" style="border: 0px; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.5rem 0px 0px; min-height: 36px; padding: 0.25rem 2rem 0.1rem 3rem; position: relative; vertical-align: baseline;">
<a class="message_profile-pic" href="https://clojurians.slack.com/team/U067PPCUR" style="background-image: url("https://avatars.slack-edge.com/2016-09-14/79601519524_6f51682405c63cb978ad_48.jpg"); background-size: cover; border-radius: 0.2rem; border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 36px; left: 0px; line-height: inherit; margin: 0px; padding: 0px; position: absolute; vertical-align: baseline; width: 36px;"></a><a class="message_username" href="https://clojurians.slack.com/team/U067PPCUR" style="border: 0px; box-sizing: border-box; color: #8b898f; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0.25rem 0px 0px; text-decoration-line: none; vertical-align: baseline;">brett</a><span class="message_timestamp" style="border: 0px; box-sizing: border-box; color: #babbbf; display: inline; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; left: 0px; line-height: 1.2rem; margin: 0px; padding: 0px; position: relative; top: 0px; vertical-align: baseline; width: 36px;"><a href="https://clojurians-log.clojureverse.org/datomic/2018-04-04/1522851244.000076" rel="nofollow" style="border: 0px; box-sizing: border-box; color: #babbbf; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;">14:04:04</a></span><span class="message_star" style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></span><span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;"><div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
All I changed is the binding form. I see it in both links you sent.</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
</span></div>
<div class="message" id="inst-2018-04-04T17:26:01.000293Z" style="border: 0px; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.5rem 0px 0px; min-height: 36px; padding: 0.25rem 2rem 0.1rem 3rem; position: relative; vertical-align: baseline;">
<a class="message_profile-pic" href="https://clojurians.slack.com/team/U05120CBV" style="background-image: url("https://secure.gravatar.com/avatar/9fa7f07a1caada8cbf98f1a9890f3400.jpg?s=48&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0010-48.png"); background-size: cover; border-radius: 0.2rem; border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 36px; left: 0px; line-height: inherit; margin: 0px; padding: 0px; position: absolute; vertical-align: baseline; width: 36px;"></a><a class="message_username" href="https://clojurians.slack.com/team/U05120CBV" style="border: 0px; box-sizing: border-box; color: #8b898f; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0.25rem 0px 0px; text-decoration-line: none; vertical-align: baseline;">marshall</a><span class="message_timestamp" style="border: 0px; box-sizing: border-box; color: #babbbf; display: inline; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; left: 0px; line-height: 1.2rem; margin: 0px; padding: 0px; position: relative; top: 0px; vertical-align: baseline; width: 36px;"><a href="https://clojurians-log.clojureverse.org/datomic/2018-04-04/1522851961.000293" rel="nofollow" style="border: 0px; box-sizing: border-box; color: #babbbf; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;">14:04:01</a></span><span class="message_star" style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></span><span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;"><div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
The client only supports the find-rel form. You can use the other binding forms for inputs, but not in the find specification</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
<br /></div>
<h3 style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
Summary</h3>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
Datomic client does not support :find [?x] but does support :find ?x</div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
<br /></div>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
<br /></div>
</span></div>
Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-53691632994409924612019-10-15T14:31:00.001-07:002019-12-20T16:13:11.529-08:00 :db.error/not-an-entity Unable to resolve entity: :db/index<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwsmA7b9rNBjNpsTFOMvh5guTEEGd3Ockbczfm6jFA38jZKB_2nNCb-c2woGkr7LlqekAiWaBqM3eeG1EuRnRgeuwE7m2pGjLRMaT00-ojuO3jYGQyUObt2UvJwaV9G9oWd9JPPpK7m6U/s1600/architecture-art-blur-159868.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="426" data-original-width="640" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwsmA7b9rNBjNpsTFOMvh5guTEEGd3Ockbczfm6jFA38jZKB_2nNCb-c2woGkr7LlqekAiWaBqM3eeG1EuRnRgeuwE7m2pGjLRMaT00-ojuO3jYGQyUObt2UvJwaV9G9oWd9JPPpK7m6U/s200/architecture-art-blur-159868.jpg" width="200" /></a>When working with Datomic Ions, I wanted to use :db/index on an attribute but got this error:<br />
<blockquote class="tr_bq">
<span style="background-color: white; color: #009933; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">:db.error/not-an-entity Unable to resolve entity: :db/index</span></blockquote>
<br />
<br />
<br />
<br />
Using the magic of Google I came across this tidbit:<br />
<br />
<div class="message" id="inst-2018-11-06T03:23:22.202600Z" style="border: 0px; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.5rem 0px 0px; min-height: 36px; padding: 0.25rem 2rem 0.1rem 3rem; position: relative; vertical-align: baseline;">
<a class="message_username" href="https://clojurians.slack.com/team/U8LN9KT2N" style="border: 0px; box-sizing: border-box; color: #8b898f; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0.25rem 0px 0px; text-decoration-line: none; vertical-align: baseline;">robert.mather.rmm</a><span class="message_timestamp" style="border: 0px; box-sizing: border-box; color: #babbbf; display: inline; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; left: 0px; line-height: 1.2rem; margin: 0px; padding: 0px; position: relative; top: 0px; vertical-align: baseline; width: 36px;"><a href="https://clojurians-log.clojureverse.org/datomic/2018-11-06/1541463802.202600" rel="nofollow" style="border: 0px; box-sizing: border-box; color: #babbbf; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;">00:11:22</a></span><br />
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;">
</span>
<br />
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
<span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;">On Datomic Ions Solo, I'm getting an error <code style="background-color: #f7f7f9; border: 1px solid rgb(225, 225, 232); box-sizing: border-box; color: #cc2255; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.2; margin: 0px; padding: 0px; vertical-align: baseline;">Unable to resolve entity: :db/index</code> when trying to transact schema</span></div>
<span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;">
</span>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;">
</span></div>
<div class="message" id="inst-2018-11-06T03:24:30.203000Z" style="border: 0px; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.5rem 0px 0px; min-height: 36px; padding: 0.25rem 2rem 0.1rem 3rem; position: relative; vertical-align: baseline;">
<a class="message_profile-pic" href="https://clojurians.slack.com/team/U8LN9KT2N" style="background-image: url("https://avatars.slack-edge.com/2018-10-10/453139965571_047b60421690828d1fd7_48.jpg"); background-size: cover; border-radius: 0.2rem; border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 36px; left: 0px; line-height: inherit; margin: 0px; padding: 0px; position: absolute; vertical-align: baseline; width: 36px;"></a><a class="message_username" href="https://clojurians.slack.com/team/U8LN9KT2N" style="border: 0px; box-sizing: border-box; color: #8b898f; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0.25rem 0px 0px; text-decoration-line: none; vertical-align: baseline;">robert.mather.rmm</a><span class="message_timestamp" style="border: 0px; box-sizing: border-box; color: #babbbf; display: inline; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; left: 0px; line-height: 1.2rem; margin: 0px; padding: 0px; position: relative; top: 0px; vertical-align: baseline; width: 36px;"><a href="https://clojurians-log.clojureverse.org/datomic/2018-11-06/1541463870.203000" rel="nofollow" style="border: 0px; box-sizing: border-box; color: #babbbf; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;">00:11:30</a></span><br />
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;">
</span>
<br />
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
<span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;">oh, is <code style="background-color: #f7f7f9; border: 1px solid rgb(225, 225, 232); box-sizing: border-box; color: #cc2255; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.2; margin: 0px; padding: 0px; vertical-align: baseline;">:db/index</code> not supported on Datomic Cloud?</span></div>
<span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;">
</span>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;">
</span></div>
<div class="message" id="inst-2018-11-06T03:29:12.203600Z" style="border: 0px; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.5rem 0px 0px; min-height: 36px; padding: 0.25rem 2rem 0.1rem 3rem; position: relative; vertical-align: baseline;">
<a class="message_profile-pic" href="https://clojurians.slack.com/team/U8LN9KT2N" style="background-image: url("https://avatars.slack-edge.com/2018-10-10/453139965571_047b60421690828d1fd7_48.jpg"); background-size: cover; border-radius: 0.2rem; border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 36px; left: 0px; line-height: inherit; margin: 0px; padding: 0px; position: absolute; vertical-align: baseline; width: 36px;"></a><a class="message_username" href="https://clojurians.slack.com/team/U8LN9KT2N" style="border: 0px; box-sizing: border-box; color: #8b898f; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0.25rem 0px 0px; text-decoration-line: none; vertical-align: baseline;">robert.mather.rmm</a><span class="message_timestamp" style="border: 0px; box-sizing: border-box; color: #babbbf; display: inline; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; left: 0px; line-height: 1.2rem; margin: 0px; padding: 0px; position: relative; top: 0px; vertical-align: baseline; width: 36px;"><a href="https://clojurians-log.clojureverse.org/datomic/2018-11-06/1541464152.203600" rel="nofollow" style="border: 0px; box-sizing: border-box; color: #babbbf; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;">00:11:12</a></span><br />
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;">
</span>
<br />
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
<span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;">I guess fulltext indexes aren't either...</span></div>
<span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;">
</span>
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
<span class="message_content" style="border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 1rem; padding: 0px; vertical-align: baseline;">
</span></div>
<div class="message thread-msg" id="inst-2018-11-06T08:53:22.203800Z" style="border: 0px; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0.5rem 0px 0px 1rem; min-height: 36px; padding: 0.25rem 2rem 0.1rem 3rem; position: relative; vertical-align: baseline;">
<a class="message_profile-pic" href="https://clojurians.slack.com/team/U06B8J0AJ" style="background-image: url("https://avatars.slack-edge.com/2018-07-16/399365511074_2892eff7e4ee36140c89_48.jpg"); background-size: cover; border-radius: 0.2rem; border: 0px; box-sizing: border-box; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 36px; left: 0px; line-height: inherit; margin: 0px; padding: 0px; position: absolute; vertical-align: baseline; width: 36px;"></a><a class="message_username" href="https://clojurians.slack.com/team/U06B8J0AJ" style="border: 0px; box-sizing: border-box; color: #8b898f; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px 0.25rem 0px 0px; text-decoration-line: none; vertical-align: baseline;">henrik</a><span class="message_timestamp" style="border: 0px; box-sizing: border-box; color: #babbbf; display: inline; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; left: 0px; line-height: 1.2rem; margin: 0px; padding: 0px; position: relative; top: 0px; vertical-align: baseline; width: 36px;"><a href="https://clojurians-log.clojureverse.org/datomic/2018-11-06/1541483602.203800" rel="nofollow" style="border: 0px; box-sizing: border-box; color: #babbbf; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;">05:11:22</a></span><br />
<div style="border: 0px; box-sizing: border-box; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;">
</div>
</div>
<span style="font-family: inherit; font-size: 16px; font-style: inherit; font-weight: inherit;">Alas, no. And be careful with large strings as well.</span><br />
<br />
<h3>
Summary</h3>
<div>
It appears that :db/index and :db/fulltext are not support on Datomic Cloud. The only documentation for this feature is in a slack log from November 2018.</div>
<div>
<br /></div>
<div>
<br />
<a href="https://docs.datomic.com/cloud/schema/schema-reference.html">https://docs.datomic.com/cloud/schema/schema-reference.html</a><br />
<a href="https://docs.datomic.com/cloud/query/raw-index-access.html">https://docs.datomic.com/cloud/query/raw-index-access.html</a></div>
Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-33980385083523486292019-08-26T08:23:00.000-07:002019-08-26T08:32:46.971-07:00Getting a stack overflow running datomic Ion cast in ciderI was getting a StackOverflowError running this in <a href="https://github.com/clojure-emacs/cider">CIDER</a> while developing with <a href="https://docs.datomic.com/cloud/ions/ions.html">Datomic Ions</a><br />
<br />
<br />
<script src="https://gist.github.com/m0smith/2e76aecae7d41c42dcc6b7d434ab24ce.js"></script>
For some reason the output stream created ends up being referential with the nrepl PrintStream implementation. Changing it from :stdout to :stderr seems to solve the problem:
<script src="https://gist.github.com/m0smith/19bb55dda0992b3f4b623e9940fde9e7.js"></script>Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-48958920172051104322019-08-14T07:59:00.001-07:002019-08-14T08:06:33.061-07:00Which Clojure test runner to use?<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN5mlGEf7KV1cCcinNBiGk5bWFPWFwO5R8Awrs0Vngx2t5BjDjGaHDmSAmFdJDNbuGRJkQInMSeExS9IWT99grDQZz8bR8Vamc5oXQU57rds5ciAelLbGeBUPLKPkX2Sq8VTC8NmtAXUs/s1600/ancient-architecture-art-763426.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="425" data-original-width="640" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN5mlGEf7KV1cCcinNBiGk5bWFPWFwO5R8Awrs0Vngx2t5BjDjGaHDmSAmFdJDNbuGRJkQInMSeExS9IWT99grDQZz8bR8Vamc5oXQU57rds5ciAelLbGeBUPLKPkX2Sq8VTC8NmtAXUs/s320/ancient-architecture-art-763426.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: xx-small;"><span style="background-color: #e8e8e8; color: #1a1a1a; font-family: -apple-system, system-ui, "segoe ui", roboto, oxygen, cantarell, "helvetica neue", ubuntu, sans-serif; text-align: start;">Photo by </span><span style="background-color: #e8e8e8; box-sizing: border-box; color: #1a1a1a; font-family: -apple-system, system-ui, "segoe ui", roboto, oxygen, cantarell, "helvetica neue", ubuntu, sans-serif; font-weight: 600; margin-bottom: 0px; margin-top: 0px; text-align: start;"><a href="https://www.pexels.com/@gesel?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; text-decoration-line: none;">Genaro Servín </a></span><span style="background-color: #e8e8e8; color: #1a1a1a; font-family: -apple-system, system-ui, "segoe ui", roboto, oxygen, cantarell, "helvetica neue", ubuntu, sans-serif; text-align: start;">from </span><span style="background-color: #e8e8e8; box-sizing: border-box; color: #1a1a1a; font-family: -apple-system, system-ui, "segoe ui", roboto, oxygen, cantarell, "helvetica neue", ubuntu, sans-serif; font-weight: 600; margin-bottom: 0px; margin-top: 0px; text-align: start;"><a href="https://www.pexels.com/photo/black-metal-frames-763426/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; text-decoration-line: none;">Pexels</a></span></span></td></tr>
</tbody></table>
Clojure has a built in test framework which works very well and for most of my Clojure experience it has done the job, until yesterday. As part of a new project I needed to integrate with Bitbucket Pipeline, specifically I needed to run my unit tests and have the build fail on a failed test and report which test failed. <a href="https://confluence.atlassian.com/bitbucket/test-reporting-in-pipelines-939708543.html?_ga=2.84235025.92913427.1565723883-1561806784.1563385763" target="_blank">Bitbucket supports this integration</a>.<br />
<br />
The standard way to do this is to have the test runner create a XUnit compatible XML file and have the CI tool consume this file to produce the reports. Unfortunately, the junit.xml file created by the default Clojure test runner creates a junit.xml that does not follow the spec and Bitbucket doesn't report which tests failed.<br />
<br />
After some research, I found that <a href="https://github.com/lambdaisland/kaocha" target="_blank">Kaocha</a> does a much better job of creating a junit.xml that Bitbucket Pipeline can grok. In addition, it also supports code coverage which is a great bonus.<br />
<br />
Here is the stanza for deps.edn to make it work:<br />
<br />
<script src="https://gist.github.com/m0smith/e7617a21fe4c65223b92c8da34222284.js"></script>Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-33718838140862730772019-08-08T09:34:00.001-07:002019-08-08T09:35:19.585-07:00Datomic Ions: lget does not exist<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVJIOGfcjMg-pmFLc5vfZbtlfZxcQTQmIGEpQJib7JHGdA_okcFDnyGHI0R3S5VVRU_Zhs-4nHr9FzstSIunwW0mtPpcmn0XxIxwB9trtenMntmwjvWd1EnP-zVxWqZixuU3E5d-OYIUg/s1600/aromatic-art-black-and-white-733614.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="360" data-original-width="640" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVJIOGfcjMg-pmFLc5vfZbtlfZxcQTQmIGEpQJib7JHGdA_okcFDnyGHI0R3S5VVRU_Zhs-4nHr9FzstSIunwW0mtPpcmn0XxIxwB9trtenMntmwjvWd1EnP-zVxWqZixuU3E5d-OYIUg/s200/aromatic-art-black-and-white-733614.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="background-color: #e8e8e8; color: #1a1a1a; font-family: , "blinkmacsystemfont" , "segoe ui" , "roboto" , "oxygen" , "cantarell" , "helvetica neue" , "ubuntu" , sans-serif; font-size: 16px;">Photo by </span><span style="background-color: #e8e8e8; box-sizing: border-box; color: #1a1a1a; font-family: , "blinkmacsystemfont" , "segoe ui" , "roboto" , "oxygen" , "cantarell" , "helvetica neue" , "ubuntu" , sans-serif; font-size: 16px; font-weight: 600; margin-bottom: 0px; margin-top: 0px;"><a href="https://www.pexels.com/@matej-117839?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; text-decoration-line: none;">Matej </a></span><span style="background-color: #e8e8e8; color: #1a1a1a; font-family: , "blinkmacsystemfont" , "segoe ui" , "roboto" , "oxygen" , "cantarell" , "helvetica neue" , "ubuntu" , sans-serif; font-size: 16px;">from </span><span style="background-color: #e8e8e8; box-sizing: border-box; color: #1a1a1a; font-family: , "blinkmacsystemfont" , "segoe ui" , "roboto" , "oxygen" , "cantarell" , "helvetica neue" , "ubuntu" , sans-serif; font-size: 16px; font-weight: 600; margin-bottom: 0px; margin-top: 0px;"><a href="https://www.pexels.com/photo/lighted-candle-gray-scale-photo-733614/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels" style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; text-decoration-line: none;">Pexels</a></span></td></tr>
</tbody></table>
I keep running into this exception when running Clojure in on AWS using Datomic Ions:<br />
<blockquote class="tr_bq">
<span style="background-color: white; color: #444444; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">{
</span><span class="key" style="background-color: white; color: #444444; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">"Type":</span><span style="background-color: white; color: #444444; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;"> </span><span class="string" style="background-color: white; color: #009933; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">"java.lang.IllegalAccessError"</span><span style="background-color: white; color: #444444; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">,
</span><span class="key" style="background-color: white; color: #444444; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">"Message":</span><span style="background-color: white; color: #444444; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;"> </span><span class="string" style="background-color: white; color: #009933; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">"lget does not exist"</span><span style="background-color: white; color: #444444; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">,
</span><span class="key" style="background-color: white; color: #444444; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">"At":</span><span style="background-color: white; color: #444444; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;"> [
</span><span class="string" style="background-color: white; color: #009933; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">"clojure.core$refer"</span><span style="background-color: white; color: #444444; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">,
</span><span class="string" style="background-color: white; color: #009933; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">"invokeStatic"</span><span style="background-color: white; color: #444444; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">,
</span><span class="string" style="background-color: white; color: #009933; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">"core.clj"</span><span style="background-color: white; color: #444444; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">,
</span><span class="number" style="background-color: white; color: #1166bb; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">4249</span><span style="background-color: white; color: #444444; font-family: "monaco" , "menlo" , "consolas" , "courier prime" , "courier" , "courier new" , monospace; font-size: 12px; white-space: pre;">
]
}</span></blockquote>
The cause for this error seems to be that the code is trying to use either the Datomic Peer API or the wrong Datomic Client API implementation. I am using the <a data-pjax="#js-repo-pjax-container" href="https://github.com/ComputeSoftware/datomic-client-memdb" style="box-sizing: border-box; color: #0366d6; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-weight: 600; outline-width: 0px;">datomic-client-memdb</a> for testing and if the code tries to use it on AWS, you will get that error. Similarly, if the code tries to use the Peer library from a Datomic Ion, it will get this same error.<br />
<br />
The problem arises from older code trying at runtime to determine if the Peer or Client API is being used. The ways this used to be determined seem to no longer work and so the code picks the Peer when it should be the Client.<br />
<br />
So far I have not found any code that will correctly figure out which API is being used.Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-78467574626064888262018-05-26T06:27:00.000-07:002018-05-26T06:27:36.179-07:00Please do not break my code<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNxxE8Vz-1Ri-azlJk96JRUzy7gutnFdqSIRqfkOhbgU-cK9le58Z3G6aaaRXaavoAT2tN8YX96wMicPIp-D3S3qByPVeD6KFzmro3ozz1ZPsXw73BECXu4tzxl-ciF8qbbTc1_n8HVfw/s1600/pexels-photo-155008.jpeg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="425" data-original-width="640" height="132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNxxE8Vz-1Ri-azlJk96JRUzy7gutnFdqSIRqfkOhbgU-cK9le58Z3G6aaaRXaavoAT2tN8YX96wMicPIp-D3S3qByPVeD6KFzmro3ozz1ZPsXw73BECXu4tzxl-ciF8qbbTc1_n8HVfw/s200/pexels-photo-155008.jpeg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="https://www.pexels.com/photo/selective-focus-of-photo-grand-canyon-at-daytime-155008/" target="_blank">How long should code last?</a></td></tr>
</tbody></table>
I started coding in Java back in the last millennium. I fully expect that code I wrote back then will still work on a modern JVM, indeed some it may still be running today. It would probably run faster and better than it did when it was first written given the improvements in hardware, JIT optimizations and garbage collection.<br />
<br />
For the last year or so I have been writing in Python ... Python 2 to be precise. I have no hope that in 20 years any of the code I am writing today will be runnable yet alone running. <a href="https://www.python.org/download/releases/3.0/" target="_blank">Python 3.0 was released December 3, 2008</a> ... almost a decade ago. Why am I using Python 2 in 2018?<br />
<br />
If we look at <a href="https://semaphoreci.com/blog/2017/10/18/python-versions-used-in-commercial-projects-in-2017.html" target="_blank">Python Versions Used in Commercial Projects in 2017</a> we see that I am not alone. 63.7% of commercial Python projects are still using 2.7. If Python 3 is better (which it is) why are so many projects still not using it after so many years?<br />
<br />
<b>To deprecate or to break</b><br />
<b><br /></b>
Often language designers and library maintainers are faced with a difficult decision of <a href="https://www.youtube.com/watch?v=oyLBGkS5ICk" target="_blank">deprecating code or introducing breaking changes</a>. There are large costs to either decision.<br />
<br />
Back in 1996 Java <a href="https://www.cis.upenn.edu/~bcpierce/courses/629/jdkdocs/guide/misc/deprecated.html" target="_blank">introduced the deprecated tag</a> as a way to mark code as:<br />
<ul>
<li>the old API is insecure, buggy, or highly inefficient</li>
<li>the old API is going away in a future release</li>
<li>the old API encourages very bad coding practices</li>
</ul>
<div>
Fortunately, the second reason for deprecating was never really implemented. Nothing deprecated has ever been removed from the language. Nothing. </div>
<div>
<br /></div>
<div>
Whoever made the decision to not remove deprecated code should be given a Nobel prize.</div>
<div>
<br /></div>
<div>
This decision means the burden of the deprecated code remains with the owner of the code. Each release will need to test and validate code they would rather not have to maintain. This is no small cost I am sure.</div>
<div>
<br /></div>
<div>
Compare this with the Python decision to make breaking changes moving from Python 2 to Python 3. By making this decision, they try to move the on-going cost maintaining "dead" code to a one-time cost distributed across all projects using Python. </div>
<div>
<br /></div>
<div>
The cost for just one company (the one I work for) to move to Python 3 will be enormous. Because there are known breaking changes, all code will need to be treated as unreliable and have to be proven to be working correctly. This is not just code we have written but any library we have included as well. This represents hundreds or thousands of man-hours and increased risk ... ALL FOR NO BENEFIT. If all goes well after weeks or months of effort, we will end up with the exact same functionality we started with. Or, we could focus on what keeps us in business. Hence the reason we are still using Python 2</div>
<div>
<br /></div>
<div>
Which means that the effort to distribute the cost of the breaking changes to everyone else has not really worked out. 2/3 of projects are still using the old code after 10 years. The one time cost has becoming an on-going problem with no end in sight. There are no winners in this debacle, just a fractured community.</div>
<div>
<br /></div>
<div>
Don't get me wrong, I like Python. It is unfortunate that this difficult decision resulted in a situation that detracts from the usefulness of the language.</div>
<div>
<br /></div>
<div>
How long should code last? As long as it is useful, not just until some language or library owner decides it is better to break it. Please do not break my code.</div>
<b><br /></b>
<b><br /></b>Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-22353849804988885042016-11-08T04:50:00.003-08:002018-05-25T06:24:34.515-07:00lein-resource 16.11.1 released<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1v5hb4ad06n4L7aJmMyptPD0mSCEKaxNEsvtkrb2t9GWjCVyliZaAacc98BL31zjp5HuyhEdEf_8v0g2z6HCvFNpxciOSZa3O0dzyXDSnwKIg7gqEQamDnOemV1cecvdYaCpkRa4kZ78/s1600/pexels-photo-671585.jpeg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="426" data-original-width="640" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1v5hb4ad06n4L7aJmMyptPD0mSCEKaxNEsvtkrb2t9GWjCVyliZaAacc98BL31zjp5HuyhEdEf_8v0g2z6HCvFNpxciOSZa3O0dzyXDSnwKIg7gqEQamDnOemV1cecvdYaCpkRa4kZ78/s200/pexels-photo-671585.jpeg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="https://www.pexels.com/photo/black-windmills-during-sunset-671585/" target="_blank">New resources</a></td></tr>
</tbody></table>
<span style="font-family: "arial" , "helvetica" , sans-serif;">lein-resource is a <span style="background-color: white; color: #333333; font-size: 16px;"> </span><span style="background-color: white; color: #333333;">plugin that can be used to copy files from mulitple source directories to a target directory while maintaining the subdirecotries. Also, each file will by default be transformed using </span><a href="https://github.com/davidsantiago/stencil" style="background-color: white; box-sizing: border-box; color: #4078c0; text-decoration: none;">stencil</a><span style="background-color: white; color: #333333;">.</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: #333333;"><br /></span></span>
<span style="color: #333333; font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white;">Version 16.11.1 </span></span><br />
<span style="color: #333333; font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white;">* <a href="https://github.com/m0smith/lein-resource/issues/22" target="_blank">gh-22</a> - adds support for the </span></span><span style="background-color: white; color: #333333; font-size: 14px;"><span style="font-family: "arial" , "helvetica" , sans-serif;">the case where you want to render the templates with different variables based on the target path, to allow using some view-logic say, for a dev and prod output.</span></span><br />
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 14px; margin-bottom: 16px;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">As in <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="9411624" data-permission-text="Issue title is private" data-url="https://github.com/m0smith/lein-resource/issues/1" href="https://github.com/m0smith/lein-resource/issues/1" style="background-color: transparent; box-sizing: border-box; color: #4078c0; text-decoration: none;">#1</a>, but allowing for :extra-values to be passed with each path:</span></div>
<pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 11.9px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-wrap: normal;"><code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 11.9px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;"> :resource {:resource-paths [["resources"
{:target-path "app/dev"
:extra-values {:dev true :prod false}}]
["resources"
{:target-path "app/prod"
:extra-values {:dev false :prod true}}]]}</code></pre>
<div id="amzn-assoc-ad-cebc4403-a1f7-46e2-a9d1-0ac579efbade">
</div>
<script async="" src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=cebc4403-a1f7-46e2-a9d1-0ac579efbade"></script>Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-74700138728874075172015-08-30T09:40:00.000-07:002015-10-07T19:12:14.417-07:00Using the Windows Vista recover partition to install to a new hard driveAlas, the hard drive died and Windows vista no longer boots. How to get it installed on a new hard drive using only the recover partition from the old one.<br />
<br />
<ol>
<li>Attach a USB drive with at least enough free space to hold the recover partition.</li>
<li>Boot using puppy linux</li>
<li>Mount the USB drive (assuming sdc1 and also assuming the recover partition is sda2</li>
<li>Create a directory called recover on the usb drive</li>
<li>Copy the partition using dd: <span style="font-family: "Courier New",Courier,monospace;">dd if=/dev/sda2 | gzip -c | split -b 2000m - /mnt/sdc1/recover/recover.img.</span></li>
<li>Turn off the computer</li>
<li>Replace the old hard drive with the new one</li>
<li>Boot again</li>
<li>Using Gparted (System -> GParted Partition Manager)</li>
<ol>
<li>Create 2 partitions</li>
<li>Make them both ntfs</li>
<li>Use manage flags to mark the second one 'boot'</li>
</ol>
<li>Copy the partition" <span style="font-family: "Courier New", Courier, monospace;">cat /mnt/sdc1/recover/recover.img* | gzip -dc | dd of=/dev/sda2</span></li>
<li><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: inherit;">Mount the sda2 drive</span></span></li>
<li><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: inherit;">Run ntfsfix /dev/sda2</span></span></li>
<li><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: inherit;">Run Grub4Dos </span> </span> </li>
</ol>
Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-7746670509789506272014-04-16T19:03:00.001-07:002018-05-25T06:29:26.444-07:005 Faces of Dependency Injection in Clojure<b>Dilemma</b>:<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2TvEWCVZ7VlLgYGNwP_5aSjmziWuVjDOijsLWoDuI0uxU8-3dZ0Z_UGWFTFS1PQKOM1s-18clmC30EtXTJUmETgpQtWzmilvmK3JNk3aRseIky9akhAcevUKwnQLr6nJPvOWWK49Ie1E/s1600/pexels-photo-414579.jpeg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="480" data-original-width="640" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2TvEWCVZ7VlLgYGNwP_5aSjmziWuVjDOijsLWoDuI0uxU8-3dZ0Z_UGWFTFS1PQKOM1s-18clmC30EtXTJUmETgpQtWzmilvmK3JNk3aRseIky9akhAcevUKwnQLr6nJPvOWWK49Ie1E/s200/pexels-photo-414579.jpeg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="https://www.pexels.com/photo/abstract-art-circle-clockwork-414579/" target="_blank">Working together</a></td></tr>
</tbody></table>
How, in a functional way, to access resources like database and other external dependencies. Most non-trivial applications will have one or more external resources that need to be acquired in order to work. Things like databases and web services will fall into this category. The problem is they need to be shared across much of the code base but they are not truly static. The database password will need to change. Different test and production environments will need to point to different servers. <br />
<br />
How to write the code in a way that allows for the database information to be different each time the code is run? If this were Java, the common answer is Dependency Injection. Using the Spring Framework, dependencies are injected into the objects at run time. This allows for the configuration to happen outside the code and still let the objects have access to it.<br />
<br />
<b>Solution</b>:<br />
<br />
Thanks to <a href="http://stuartsierra.com/" target="_blank">Stuart Sierra</a> for his simple and elegant context idea as demonstrated in his <a href="http://www.infoq.com/presentations/Clojure-Large-scale-patterns-techniques" target="_blank">Clojure in the Large</a> presentation as well as his <a href="https://github.com/stuartsierra/component" target="_blank">Component</a> library. Using the techniques he describes, it is possible to separate the configuration of the resources from the code that needs them. This addresses the first part of the problem. The second part remains namely: how to give the code access to the resources.<br />
<br />
Thus leading to the title: Dependency Injection in Clojure. For object oriented languages like Java, Dependency Injection is a powerful technique and widely used. Of course, Dependency Injection techniques are not meaningful in a functional environment. It requires objects and specifically mutable objects to really work. The objects are built and then mutated by having their dependencies injected.<br />
<br />
However, the same problem exists in Clojure. Rather than giving objects access to the context, the Clojure problem is giving functions access to the context. For this article, Dependency Injection will have a looser definition meaning "<i>giving functions access to the context</i>".<br />
<br />
As I have thought about it and was able to discuss it with Ben and Levi at <a href="http://www.meetup.com/Lambda-Lounge-Utah/" target="_blank">Lambda Lounge Utah</a>, there are at least 5 ways of doing Dependency Injection in Clojure. That is, 5 ways of giving functions access to a shared context. Rather that present them in order based on obviousness, they will be presented starting with the most naive.<br />
<br />
<h2>
Globally Shared</h2>
<div>
This is often the first way developers think to share data across an application: simply throw it in a <span style="font-family: "courier new" , "courier" , monospace;">def </span>in a namespace and allow any function that needs it to reference it from there. </div>
<div>
<br /></div>
<script src="https://gist.github.com/m0smith/10925790.js"></script>
<br />
<div>
It has the advantage of being simple to implement. The disadvantages are numerous and Dependency Injection was originally developed to overcome the shortcoming of globally shared data. Among other things, putting the context in a globally shared data structure will make testing and moving across environment much more cumbersome.<br />
<br />
<h2>
Binding</h2>
The next thing people will often try is using the Clojure binding form<br />
<br />
<script src="https://gist.github.com/m0smith/10926777.js"></script>
This seems to overcome the global shared problem as now a function can access its copy of the form. However, <a href="http://cemerick.com/2009/11/03/be-mindful-of-clojures-binding/" target="_blank">Be Mindful of Clojure's binding</a>. This is an excellent article which describes some of the perils of using the binding form. It specifically mentions crossing thread boundaries and problem involving lazy sequences. While your context most likely won't be lazy, it will almost certainly be crossing thread boundaries making the use of binding possibly troublesome.<br />
<br />
Both the previous examples use dynamic scoping which is the underlying trouble. It would be preferable to using lexical scoping to access the context. The remaining 3 examples will use lexical scoping.<br />
<br />
<h2>
Function Argument</h2>
The first example of lexical scoping is simply passing the context into each function that wants it as an argument.<br />
<br />
<script src="https://gist.github.com/m0smith/10928463.js"></script>
There is a lot to say for this method and will be the first choice of dependency injection in Clojure. In a majority of cases, this method will serve nicely and makes for nice clean code. However, there is at least one drawback that a simple example does not reveal. The context ends up getting passed to functions that do not use it directly, but just pass it on to functions which they in turn call. If you think of a large project, there may be hundreds of functions all passing around the context just so it can make it way to the bottom layer of code which interacts with the resources. It might be my OO upbringing but this feels like exposing implementation details just as <a href="http://stackoverflow.com/questions/3883006/meaning-of-leaky-abstraction" target="_blank">leaky abstraction</a> does in Java.<br />
<br />
<h2>
Closing over the Context</h2>
Another method would be closing over the context using <span style="font-family: "courier new" , "courier" , monospace;">let </span>and <span style="font-family: "courier new" , "courier" , monospace;">letfn</span>. <br />
<br />
<script src="https://gist.github.com/m0smith/10929817.js"></script>
In the example the context is passed into a function which then closes over it. The <span style="font-family: "courier new" , "courier" , monospace;">foo </span>function is no longer visible outside the closure and can only be called by the <span style="font-family: "courier new" , "courier" , monospace;">app </span>function. While one could write the entire application in such a fashion, it is not very clear. Where this example shines is in the case of callbacks, like in Swing. The function can close over not only the context but the components of the application as well. Making it quite simple to create call backs that reference not only the context but the components.<br />
<br />
<h2>
Reader Monad</h2>
<br />
Monads often get a bad wrap, but for good reason. They are a bit hard to grasp. The examples and tutorials often describe what they are but not what to do with them.Fortunately I found a good example in the presentation "<a href="http://www.slideshare.net/borgesleonardo/monads-in-clojure" target="_blank">Monads in Clojure</a>" by Leonardo Borgess.<br />
<br />
Let me describe what the reader monad will do, but not how it does it (as I do not really care how it works). Looking at the Closing over the Context example above, the function takes a context, creates the clojure and returns a function that will execute the functions with the symbols bound. But, what if that we turned inside out? Rather than closing on the context, close on what other data is needed at creation and return a function that expects the context as an argument.<br />
<br />
<br />
<script src="https://gist.github.com/m0smith/10946475.js"></script>
This requires an explanation. What does (domonad reader-m [val func] body) do? Quite simply, it returns a function that accepts a single argument, the context. When that function is executed with the context as an argument, <span style="font-family: "courier new" , "courier" , monospace;">func </span>is executed and the result stored as <span style="font-family: "courier new" , "courier" , monospace;">val</span>. The <span style="font-family: "courier new" , "courier" , monospace;">body </span>is then executed and returned.<br />
<br />
The <span style="font-family: "courier new" , "courier" , monospace;">func </span>function has to return the monad as well so it can be called with the same context passed in to the calling function.<br />
<br />
In <span style="font-family: "courier new" , "courier" , monospace;">foo </span>there is a function <span style="font-family: "courier new" , "courier" , monospace;">asks</span>. This function is a helper for reader monad that returns a value from the context.<br />
<br />
<br />
What happens <span style="font-family: "courier new" , "courier" , monospace;">app </span>function is called? It returns a function that behaves like this<br />
<br />
<script src="https://gist.github.com/m0smith/10946953.js"></script>
Of course, it does not really use <span style="font-family: "courier new" , "courier" , monospace;">defn </span>but uses macros to generate the required functions and return the top level one. When <span style="font-family: "courier new" , "courier" , monospace;">app*</span> is executed, it then calls <span style="font-family: "courier new" , "courier" , monospace;">foo*</span> passing in the context where it can be executed. The nice thing is there can be any number of function calls between app and foo that know and care nothing about the context.<br />
<br />
Of course the <span style="font-family: "courier new" , "courier" , monospace;">(domonad reader-m</span> is hard to read and really does not really convey intent very well. To help make it clearer, I created some simple macros to wrap the code resulting in this code.<br />
<br />
<script src="https://gist.github.com/m0smith/10947426.js"></script>
The wrapper is at <a href="https://github.com/m0smith/topoged/blob/master/src/main/clojure/topoged/context.clj" target="_blank">topoged/context.clj</a> if you care to look. The advantage is that now the context can be passed using lexical scoping without having to specifically mention it in the argument lists of functions that do not need it. The downside is you have to know which functions return the monad and which don't. Those that do have to be in the <span style="font-family: "courier new" , "courier" , monospace;">[val func]</span> bindings while those that don't have to be in the body. This might end up being a pain as well. While I think this option shows promise, that will need to be overcome to make it truly useful.<br />
<br />
The 5 methods of dependency injection, or getting data into functions, are: globally shared, binding, function arguments, closing over the context and the reader monad. Each has a place in the whole architecture of a Clojure app and should be in every developers toolbox.<br />
<br />
<br /></div>
<div id="amzn-assoc-ad-cebc4403-a1f7-46e2-a9d1-0ac579efbade"></div><script async src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=cebc4403-a1f7-46e2-a9d1-0ac579efbade"></script>
Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com3tag:blogger.com,1999:blog-8762274703812576773.post-87150395322736578462014-03-05T07:10:00.000-08:002014-03-05T07:10:00.184-08:00Using malabar-mode to auto-populate a new Java fileJava has a lot of "template" code that needs to be written and most editors and IDEs understand this and help alliviate the common tasks. One of these is the putting a skeleton into a blank file. To do this in malabar-mode, there is the malabar-codegen-insert-class-template function that will:<br />
<ul>
<li>add the class declaration based on the name of the buffer</li>
<li>add a javadoc comment skeleton</li>
<li>update the package statement</li>
</ul>
To have EMACS run this function when a new file is created, add the following to your .emacs:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">;; Auto-populate an empty java file<br />(add-hook 'malabar-mode-hook <br /> '(lambda ()<br /> (when (= 0 (buffer-size))<br /> (malabar-codegen-insert-class-template)))) </span></blockquote>
Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-75840760893196023482014-03-04T07:03:00.004-08:002014-03-04T07:03:46.318-08:00malabar-update-package now works in WindowsThe functions <span style="font-family: "Courier New",Courier,monospace;">malabar-update-package</span> is used to add or fix the package statement in a Java class based on the location of a file in the maven source tree. For example running <span style="font-family: "Courier New",Courier,monospace;">malabar-update-package </span>in a buffer looking at <span style="font-family: "Courier New",Courier,monospace;"> src/main/java/com/m0smith/Test.java</span> will result in the package being set to <span style="font-family: "Courier New",Courier,monospace;">package com.m0smith;</span>Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-36011541131407059482014-02-26T05:27:00.005-08:002014-02-26T05:28:00.934-08:00lein-resource 0.3.4 adds timestamp checkingThe latest release of<a href="https://github.com/m0smith/lein-resource" target="_blank"> lein-resource</a>, 0.3.4, adds support for a new flag, <span style="font-family: Courier New, Courier, monospace;">:update</span> which when set to <span style="font-family: Courier New, Courier, monospace;">true</span> checks time stamps before processing source files. This provides a way to remove unnecessary copying and filtering if the source file has not been modified.<br />
<br />
While it could potentially save time, it should not be used if build sensitive stencil filtering is used on any of the source files. For example, if the source contains a <span style="font-family: Courier New, Courier, monospace;">{{timestamp}}</span> tag then setting <span style="font-family: Courier New, Courier, monospace;">:update</span> to <span style="font-family: Courier New, Courier, monospace;">true </span>would prevent the file from being recreated on each build. The suggestion therefore is to only set <span style="font-family: Courier New, Courier, monospace;">:update</span> to <span style="font-family: Courier New, Courier, monospace;">true </span>when <span style="font-family: Courier New, Courier, monospace;">:skip-stencil</span> is also <span style="font-family: Courier New, Courier, monospace;">true</span>. <br />
<br />
The default is false or to always overwrite the destination file.Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-22941107129912483922014-02-03T15:11:00.000-08:002014-02-03T15:16:23.880-08:00maven-pom-mode: Add DependencyThe <a href="https://github.com/m0smith/maven-pom-mode" target="_blank">maven-pom-mode</a> project has been updated to have its own mode. It will also search for and add a dependency<br />
<br />
* `C-c d` will Search for artifacts in maven central and insert dependency tag via `maven-pom-add-dependency`. NOTE the point has to be in the right place in the pom file when called.Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0tag:blogger.com,1999:blog-8762274703812576773.post-83134331095427780762014-01-31T15:30:00.002-08:002014-01-31T15:31:15.247-08:00malabar-mode 1.6 Change Log<h1>
Change log</h1>
<h2>
Resolved Issues</h2>
<ul>
</ul>
<br />
<br />
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/115"> "Apply suggestions to flycheck"</a></li>
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/114"> "import not work well in Win NT"</a></li>
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/113"> "Default to -source 1.5"</a></li>
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/110"> "in malabar-flycheck-error-column assign tabs to 8 spaces."</a></li>
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/107"> "Remove the @ from the front of annotations in malabar-import-one-class"</a></li>
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/101"> "File mode specification error: (void-function wisent-java-tags-wy--install-parser)"</a></li>
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/100"> "Compile error in melpa"</a></li>
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/95"> "Compile File Issue: IllegalArgumentException"</a></li>
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/94"> "Cannot open load file: wisent-comp"</a></li>
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/93"> "Show super classes and implemented interfaces of a class"</a></li>
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/92"> "Add pom.xml mode of some sort"</a></li>
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/83"> "[feature-request] malabar-delegate-interface"</a></li>
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/39"> "Can C-c C-v C-y be made to work for source jars?"</a></li>
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/5"> "Some sort of xref facility"</a></li>
<li><a href="https://api.github.com/repos/m0smith/malabar-mode/issues/4"> "Flymake/Flycheck"</a></li>
<br />
<h2>
Commits</h2>
<ul>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/26fdee3c976cc18543e5fa0a6da24bf6c7bf018d">view commit •</a> gh-114 move to 1.5.9 of malabar</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/e66494b20670a1293e4fb82a20ca18837e6cc5e1">view commit •</a> gh-114 move to 1.5.9 of malabar</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/6dcd7d2040b7e74e3d3504110bcda8c6640fcfa2">view commit •</a> gh-110 Fixed line parsing to include tabs</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/83bb083164fa55cef48783e7ab5c8d9486cdca0c">view commit •</a> gh-110 Handle tabs in the caret line</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/6cdca826b00dabbfd17549150dab93d56842ff6e">view commit •</a> gh-110 Handle tabs in the caret line</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/cfedcf12ede59277fcf9bbe52b1375ddb5048778">view commit •</a> gh-110 Handle tabs in the caret line</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/7f61477431007c5b9529b9718adacde2beddff51">view commit •</a> gh-4 Added support for multiple errors and finding the column</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/66d8108e169fd4d4723ebf5725daf08b6c8f0f2c">view commit •</a> gh-4 New function that returns the classes directory for the project</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/790f74faf52b1fa6d3cc01b2ad2e820cd30ef41f">view commit •</a> gh-4 flycheck error parsing</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/3d584e219d1016c03e05d5901e0dcf842b0772c4">view commit •</a> gh-4 Enable flycheck when in malabar-mode</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/fd1bf00cd2b8f9deff84f23f478c8039d44ec0d7">view commit •</a> gh-4 added a way to the project classpath</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/e021e092778c7a883348580ebf9e0ef99f1211f1">view commit •</a> gh-4 Start of flycheck</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/1c44d289dc50f6f5df699f123680ccc30449e8b8">view commit •</a> gh-4 added malabar-compile-buffer to make the call easier</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/f1e1cc031178cf85ebf168f6e2cc9dc7ebca8dc8">view commit •</a> gh-107 Import annotations</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/2edbd7b1fc34397ec4b4bd99739bd410acf907be">view commit •</a> gh-83 add delegate interface to cheatsheet</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/acdd6c39af8014467e2827aa6f316de68f9f341e">view commit •</a> gh-99 updated cheatsheet to add pop-clogal-mark</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/2d171ccc249c984e294ea79e4689c65b112ff06f">view commit •</a> gh-106 Update to rebase off m0smith repo</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/389391d3f33d47322b60bf5d84e32487ff710199">view commit •</a> gh-103 - fixed issues link</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/748d5cafe3d23617a400eda57d76d3566115b28e">view commit •</a> gh-101 - Why does not require work?</li>
<li> <a href="http://github.com/m0smith/malabar-mode/commit/20cce03ec1adea99cf7b41995109aa9eb7211b3a">view commit •</a> gh-101: missing requried file</li>
</ul>
Matthew O. Smithhttp://www.blogger.com/profile/09782540965685467311noreply@blogger.com0