<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4540055556049926997</id><updated>2026-02-23T15:53:42.278-08:00</updated><category term="java"/><category term="tips"/><category term="tip"/><category term="principle"/><category term="best practice"/><category term="design"/><category term="performance"/><category term="j2ee"/><category term="javadoc"/><category term="documentation"/><category term="guideline"/><category term="professional"/><category term="quality"/><category term="optimalization"/><category term="guide"/><category term="jee"/><category term="multithreading"/><category term="threads"/><category term="tool"/><category term="api"/><category term="git"/><category term="scala"/><category term="architecture"/><category term="concurrency"/><category term="handling"/><category term="tricks"/><category term="ubuntu"/><category term="AI"/><category term="coverage"/><category term="date"/><category term="development"/><category term="eclipse"/><category term="funny"/><category term="ibm"/><category term="jpa"/><category term="mac"/><category term="processing"/><category term="review"/><category term="rust"/><category term="sql"/><category term="strategy"/><category term="Agent"/><category term="GPU"/><category term="HTML5"/><category term="SDLC"/><category term="apple"/><category term="benchmark"/><category term="bitcoin"/><category term="crypto"/><category term="cuda"/><category term="debug"/><category term="ethereum"/><category term="exception"/><category term="exceptions"/><category term="grafana"/><category term="graphics card"/><category term="hibernate"/><category term="integration"/><category term="investigation"/><category term="ios"/><category term="jdk"/><category term="junit"/><category term="linux"/><category term="log4j"/><category term="macbook"/><category term="macbookpro"/><category term="monitoring"/><category term="polkadot"/><category term="programming"/><category term="python"/><category term="responsive"/><category term="sbt"/><category term="solana"/><category term="svn"/><category term="telemetry"/><category term="test"/><category term="trace"/><category term="update"/><category term="web3"/><category term="website"/><category term="16.04"/><category term="17.04"/><category term="17.10"/><category term="18.04"/><category term="2022"/><category term="640x480"/><category term="Claude"/><category term="ML"/><category term="Ollama"/><category term="PMD"/><category term="PoC"/><category term="Prompt"/><category term="R"/><category term="R update"/><category term="R upgrade"/><category term="String"/><category term="SystemPrompt"/><category term="UML"/><category term="adaptive-images"/><category term="agenti-ai"/><category term="agitar"/><category term="aix"/><category term="analytix"/><category term="apache"/><category term="base"/><category term="batch"/><category term="beaver"/><category term="bionic"/><category term="blockchain"/><category term="book"/><category term="brew"/><category term="chatgpt"/><category term="clustering"/><category term="codepro"/><category term="comet"/><category term="concatenation"/><category term="configuration"/><category term="connection"/><category term="conversion"/><category term="csv"/><category term="data"/><category term="datafusion"/><category term="db"/><category term="default"/><category term="disruptor"/><category term="download"/><category term="example"/><category term="examples"/><category term="file"/><category term="fix"/><category term="freemaker"/><category term="geolocation"/><category term="gfx"/><category term="github"/><category term="gitignore"/><category term="graphics"/><category term="hack"/><category term="hibtool"/><category term="hooks"/><category term="iceberg"/><category term="importer"/><category term="intellij"/><category term="jQM"/><category term="jQuery"/><category term="jQueryMobile"/><category term="jvm"/><category term="kowalski"/><category term="layers"/><category term="leak"/><category term="learning"/><category term="lifehack"/><category term="links"/><category term="llm"/><category term="lwjgl"/><category term="lwjgl3"/><category term="mac os"/><category term="machine"/><category term="maven"/><category term="media"/><category term="memory"/><category term="memory leak"/><category term="mobile"/><category term="modernizr"/><category term="mtrack"/><category term="mysql"/><category term="native"/><category term="nio"/><category term="nmon"/><category term="one-shot"/><category term="one-shot-learning"/><category term="opencl"/><category term="osx"/><category term="packages"/><category term="parquet"/><category term="pattern"/><category term="phonegap"/><category term="pixels to em"/><category term="pom"/><category term="processor"/><category term="project"/><category term="proxy"/><category term="px to em"/><category term="randoop"/><category term="report"/><category term="reveng"/><category term="reverse engineering"/><category term="scripts"/><category term="selenium"/><category term="sonar"/><category term="spark"/><category term="spart"/><category term="svmon"/><category term="svn hooks"/><category term="synchronization"/><category term="table"/><category term="teamforge"/><category term="template"/><category term="timecapsule"/><category term="topas"/><category term="touch"/><category term="touchpad"/><category term="train data"/><category term="trends"/><category term="unix"/><category term="upgrade"/><category term="xorg"/><title type='text'>yarenty coding</title><subtitle type='html'>algorithms tips&amp;amp;tricks guidelines examples best practices and my thoughts ;-)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default?start-index=26&amp;max-results=25'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>59</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-740530152137830278</id><published>2025-06-28T16:09:00.000-07:00</published><updated>2025-06-28T16:09:49.696-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Agent"/><category scheme="http://www.blogger.com/atom/ns#" term="agenti-ai"/><category scheme="http://www.blogger.com/atom/ns#" term="AI"/><category scheme="http://www.blogger.com/atom/ns#" term="chatgpt"/><category scheme="http://www.blogger.com/atom/ns#" term="kowalski"/><category scheme="http://www.blogger.com/atom/ns#" term="llm"/><title type='text'>Kowalski: The Rust-native Agentic AI Framework Evolves to v0.5.0 🦀 </title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;b&gt;TL;DR:&lt;/b&gt; Kowalski v0.5.0 brings deep refactoring, modular architecture, multi-agent orchestration, and robust docs across submodules. If you care about Rust, AI agents, and extensible tooling, now’s the time to jump in and build together!&lt;div&gt;&lt;hr data-end=&quot;3900&quot; data-start=&quot;3897&quot; /&gt;&lt;p data-end=&quot;4142&quot; data-start=&quot;3902&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;I’m excited to share the latest milestone for Kowalski—a powerful, modular agentic AI framework built in Rust for local-first, extensible LLM workflows. Three months ago, I released Kowalski v0.2.0, a major stepping stone. Today, the codebase has evolved dramatically, with v0.5.0 rolling out extensive refactoring, architectural improvements, and a wealth of new functionality.&lt;h3 data-end=&quot;182&quot; data-start=&quot;155&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;A Deep Dive into v0.5.0&lt;/h3&gt;&lt;p data-end=&quot;221&quot; data-start=&quot;184&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;&lt;span class=&quot;relative -mx-px my-[-0.2rem] rounded px-px py-[0.2rem] transition-colors duration-100 ease-in-out&quot;&gt;Since v0.2.0, the Kowalski ecosystem has undergone:&lt;/span&gt;&lt;/p&gt;&lt;ul data-end=&quot;853&quot; data-start=&quot;223&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;&lt;li data-end=&quot;341&quot; data-start=&quot;223&quot;&gt;&lt;p data-end=&quot;341&quot; data-start=&quot;225&quot;&gt;&lt;span class=&quot;relative -mx-px my-[-0.2rem] rounded px-px py-[0.2rem] transition-colors duration-100 ease-in-out&quot;&gt;&lt;strong data-end=&quot;64&quot; data-is-only-node=&quot;&quot; data-start=&quot;0&quot;&gt;Massive refactoring of core abstractions and crate structure&lt;/strong&gt;:&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;relative -mx-px my-[-0.2rem] rounded px-px py-[0.2rem] transition-colors duration-100 ease-in-out&quot;&gt;The&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong data-end=&quot;21&quot; data-start=&quot;4&quot;&gt;kowalski-core&lt;/strong&gt;,&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong data-end=&quot;41&quot; data-start=&quot;23&quot;&gt;kowalski-tools&lt;/strong&gt;, and agent-specific crates (academic, code, data, web) have each been reorganized into clean, self-contained modules with dedicated&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code data-end=&quot;185&quot; data-start=&quot;174&quot;&gt;README.md&lt;/code&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;files, detailing usage, examples, and extension points&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span data-state=&quot;closed&quot;&gt;&lt;span class=&quot;ms-1 inline-flex max-w-full items-center relative top-[-0.094rem] animate-[show_150ms_ease-in]&quot;&gt;&lt;a alt=&quot;https://github.com/yarenty/kowalski?utm_source=chatgpt.com&quot; class=&quot;flex h-4.5 overflow-hidden rounded-xl px-2 text-[9px] font-medium text-token-text-secondary! bg-[#F4F4F4]! dark:bg-[#303030]! transition-colors duration-150 ease-in-out&quot; href=&quot;https://github.com/yarenty/kowalski?utm_source=chatgpt.com&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;&lt;span class=&quot;relative start-0 bottom-0 flex h-full w-full items-center&quot;&gt;github.com&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;422&quot; data-start=&quot;343&quot;&gt;&lt;p data-end=&quot;422&quot; data-start=&quot;345&quot;&gt;&lt;span class=&quot;relative -mx-px my-[-0.2rem] rounded px-px py-[0.2rem] transition-colors duration-100 ease-in-out&quot;&gt;&lt;strong data-end=&quot;54&quot; data-is-only-node=&quot;&quot; data-start=&quot;0&quot;&gt;New federation layer for multi-agent orchestration&lt;/strong&gt;:&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;relative -mx-px my-[-0.2rem] rounded px-px py-[0.2rem] transition-colors duration-100 ease-in-out&quot;&gt;The emerging&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong data-end=&quot;36&quot; data-start=&quot;13&quot;&gt;kowalski-federation&lt;/strong&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;crate introduces a flexible registry and task-passing layers, enabling future multi-agent workflows and scalable core collaboration.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;503&quot; data-start=&quot;424&quot;&gt;&lt;p data-end=&quot;503&quot; data-start=&quot;426&quot;&gt;&lt;span class=&quot;relative -mx-px my-[-0.2rem] rounded px-px py-[0.2rem] transition-colors duration-100 ease-in-out&quot;&gt;&lt;strong data-end=&quot;42&quot; data-is-only-node=&quot;&quot; data-start=&quot;0&quot;&gt;Improved CLI &amp;amp; agent-specific binaries&lt;/strong&gt;:&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;relative -mx-px my-[-0.2rem] rounded px-px py-[0.2rem] transition-colors duration-100 ease-in-out&quot;&gt;Each agent—academic, code, data, web—comes with its own improved CLI and documentation. The&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong data-end=&quot;108&quot; data-start=&quot;92&quot;&gt;kowalski-cli&lt;/strong&gt;now supports seamless interaction across all binaries, with better streaming, configurable prompts, and embedded tool sets.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;629&quot; data-start=&quot;505&quot;&gt;&lt;p data-end=&quot;629&quot; data-start=&quot;507&quot;&gt;&lt;span class=&quot;relative -mx-px my-[-0.2rem] rounded px-px py-[0.2rem] transition-colors duration-100 ease-in-out&quot;&gt;&lt;strong data-end=&quot;28&quot; data-is-only-node=&quot;&quot; data-start=&quot;0&quot;&gt;Enhanced pluggable tools&lt;/strong&gt;:&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;relative -mx-px my-[-0.2rem] rounded px-px py-[0.2rem] transition-colors duration-100 ease-in-out&quot;&gt;The&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong data-end=&quot;22&quot; data-start=&quot;4&quot;&gt;kowalski-tools&lt;/strong&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;crate now offers more granular support for CSV analysis, multi-language code analysis (Rust, Python, Java), web scraping, PDF/document parsing, and dynamic prompt strategies—each documented in submodule&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code data-end=&quot;237&quot; data-start=&quot;226&quot;&gt;README.md&lt;/code&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;files&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span data-state=&quot;closed&quot;&gt;&lt;span class=&quot;ms-1 inline-flex max-w-full items-center relative top-[-0.094rem] animate-[show_150ms_ease-in]&quot;&gt;&lt;a alt=&quot;https://github.com/yarenty/kowalski?utm_source=chatgpt.com&quot; class=&quot;flex h-4.5 overflow-hidden rounded-xl px-2 text-[9px] font-medium text-token-text-secondary! bg-[#F4F4F4]! dark:bg-[#303030]! transition-colors duration-150 ease-in-out&quot; href=&quot;https://github.com/yarenty/kowalski?utm_source=chatgpt.com&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;&lt;span class=&quot;relative start-0 bottom-0 flex h-full w-full items-center&quot;&gt;github.com&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;853&quot; data-start=&quot;631&quot;&gt;&lt;p data-end=&quot;853&quot; data-start=&quot;633&quot;&gt;&lt;strong data-end=&quot;655&quot; data-start=&quot;633&quot;&gt;Rust API stability&lt;/strong&gt;:&lt;br /&gt;The core API, based on the&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code data-end=&quot;697&quot; data-start=&quot;686&quot;&gt;BaseAgent&lt;/code&gt;, now supports typed configs, async multi-tool support, and more robust error handling, making embedding into larger Rust stacks smoother and more reliable.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;886&quot; data-start=&quot;855&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;Why Kowalski v0.5.0 Matters&lt;/h3&gt;&lt;p data-end=&quot;954&quot; data-start=&quot;888&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;Rust lovers and AI developers, here’s why this release stands out:&lt;/p&gt;&lt;p data-end=&quot;1211&quot; data-start=&quot;956&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;&lt;strong data-end=&quot;993&quot; data-start=&quot;956&quot;&gt;Full-stack Rust agentic workflows&lt;/strong&gt;&lt;br data-end=&quot;996&quot; data-start=&quot;993&quot; /&gt;With zero Python dependencies, Kowalski compiles into performant, standalone binaries. Whether launching&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code data-end=&quot;1122&quot; data-start=&quot;1101&quot;&gt;kowalski-code-agent&lt;/code&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;for code reviews or embedding agents via the Rust API, you’re operating at native speed.&lt;/p&gt;&lt;p data-end=&quot;1458&quot; data-start=&quot;1213&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;&lt;strong data-end=&quot;1234&quot; data-start=&quot;1213&quot;&gt;Modular by design&lt;/strong&gt;&lt;br data-end=&quot;1237&quot; data-start=&quot;1234&quot; /&gt;Each submodule is self-documented and self-contained, lowering the barrier for new contributors. Want to create a&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code data-end=&quot;1373&quot; data-start=&quot;1351&quot;&gt;PDFPresentationAgent&lt;/code&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;or integrate telemetry? Just read the README in the existing agent templates and go.&lt;/p&gt;&lt;p data-end=&quot;1660&quot; data-start=&quot;1460&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;&lt;strong data-end=&quot;1490&quot; data-start=&quot;1460&quot;&gt;Streamlined CLI experience&lt;/strong&gt;&lt;br data-end=&quot;1493&quot; data-start=&quot;1490&quot; /&gt;The unified CLI gives consistent interfaces across agents. Under the hood, agents share core abstractions, so switching from data analysis to web scraping is seamless.&lt;/p&gt;&lt;p data-end=&quot;1869&quot; data-start=&quot;1662&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;&lt;strong data-end=&quot;1697&quot; data-start=&quot;1662&quot;&gt;Future-proof federation support&lt;/strong&gt;&lt;br data-end=&quot;1700&quot; data-start=&quot;1697&quot; /&gt;The new federation crate opens the door to lightweight orchestrated, multi-agent workflows—think pipeline automations, task delegation, and agent-to-agent communication.&lt;/p&gt;&lt;h3 data-end=&quot;1922&quot; data-start=&quot;1871&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;Get Involved: Let’s Shape Agentic Rust Together&lt;/h3&gt;&lt;p data-end=&quot;1968&quot; data-start=&quot;1924&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;Here’s how you can partner with the project:&lt;/p&gt;&lt;ul data-end=&quot;2626&quot; data-start=&quot;1970&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;&lt;li data-end=&quot;2111&quot; data-start=&quot;1970&quot;&gt;&lt;p data-end=&quot;2111&quot; data-start=&quot;1972&quot;&gt;&lt;strong data-end=&quot;1994&quot; data-start=&quot;1972&quot;&gt;Extend the toolset&lt;/strong&gt;: add new agents (e.g.,&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code data-end=&quot;2038&quot; data-start=&quot;2018&quot;&gt;document-summaries&lt;/code&gt;,&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code data-end=&quot;2063&quot; data-start=&quot;2040&quot;&gt;intent-classification&lt;/code&gt;), implement new tools, or polish existing ones.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;2244&quot; data-start=&quot;2112&quot;&gt;&lt;p data-end=&quot;2244&quot; data-start=&quot;2114&quot;&gt;&lt;strong data-end=&quot;2146&quot; data-start=&quot;2114&quot;&gt;Improve federation workflows&lt;/strong&gt;: help standardize protocols, design multi-agent orchestration logic, data passing, and telemetry.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;2377&quot; data-start=&quot;2245&quot;&gt;&lt;p data-end=&quot;2377&quot; data-start=&quot;2247&quot;&gt;&lt;strong data-end=&quot;2282&quot; data-start=&quot;2247&quot;&gt;Embed Kowalski in Rust services&lt;/strong&gt;: build bots, backend services, UI apps that leverage Kowalski agents for intelligent behavior.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;2507&quot; data-start=&quot;2378&quot;&gt;&lt;p data-end=&quot;2507&quot; data-start=&quot;2380&quot;&gt;&lt;strong data-end=&quot;2404&quot; data-start=&quot;2380&quot;&gt;Document and promote&lt;/strong&gt;: each submodule already includes README files—help expand examples, write blog posts, or record demos.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;2626&quot; data-start=&quot;2508&quot;&gt;&lt;p data-end=&quot;2626&quot; data-start=&quot;2510&quot;&gt;&lt;strong data-end=&quot;2542&quot; data-start=&quot;2510&quot;&gt;Contribute core enhancements&lt;/strong&gt;: testing, error handling, performance improvements in the&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code data-end=&quot;2607&quot; data-start=&quot;2601&quot;&gt;core&lt;/code&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;or&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code data-end=&quot;2618&quot; data-start=&quot;2611&quot;&gt;tools&lt;/code&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;crates.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;2656&quot; data-start=&quot;2628&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;Start Using v0.5.0 Today&lt;/h3&gt;&lt;ol data-end=&quot;3433&quot; data-start=&quot;2658&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;&lt;li data-end=&quot;2768&quot; data-start=&quot;2658&quot;&gt;&lt;p data-end=&quot;2682&quot; data-start=&quot;2661&quot;&gt;&lt;strong data-end=&quot;2679&quot; data-start=&quot;2661&quot;&gt;Clone the repo&lt;/strong&gt;:&lt;/p&gt;&lt;pre class=&quot;overflow-visible!&quot; data-end=&quot;2768&quot; data-start=&quot;2686&quot;&gt;&lt;div class=&quot;contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary&quot;&gt;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;whitespace-pre! language-bash&quot;&gt;git &lt;span class=&quot;hljs-built_in&quot;&gt;clone&lt;/span&gt; https://github.com/yarenty/kowalski.git
&lt;span class=&quot;hljs-built_in&quot;&gt;cd&lt;/span&gt; kowalski
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li data-end=&quot;2873&quot; data-start=&quot;2769&quot;&gt;&lt;p data-end=&quot;2873&quot; data-start=&quot;2772&quot;&gt;&lt;strong data-end=&quot;2803&quot; data-start=&quot;2772&quot;&gt;Browse submodules &amp;amp; READMEs&lt;/strong&gt;: Each agent and tool lives in its own folder with clear instructions.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;2936&quot; data-start=&quot;2874&quot;&gt;&lt;p data-end=&quot;2893&quot; data-start=&quot;2877&quot;&gt;&lt;strong data-end=&quot;2892&quot; data-start=&quot;2877&quot;&gt;Build &amp;amp; run&lt;/strong&gt;:&lt;/p&gt;&lt;pre class=&quot;overflow-visible!&quot; data-end=&quot;2936&quot; data-start=&quot;2897&quot;&gt;&lt;div class=&quot;contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary&quot;&gt;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;whitespace-pre! language-bash&quot;&gt;cargo build --release
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li data-end=&quot;3139&quot; data-start=&quot;2937&quot;&gt;&lt;p data-end=&quot;2955&quot; data-start=&quot;2940&quot;&gt;&lt;strong data-end=&quot;2954&quot; data-start=&quot;2940&quot;&gt;Run agents&lt;/strong&gt;:&lt;/p&gt;&lt;pre class=&quot;overflow-visible!&quot; data-end=&quot;3139&quot; data-start=&quot;2959&quot;&gt;&lt;div class=&quot;contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary&quot;&gt;&lt;div class=&quot;flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between h-9 bg-token-sidebar-surface-primary select-none rounded-t-2xl&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;whitespace-pre! language-bash&quot;&gt;ollama serve &amp;amp;
ollama pull llama3.2
./target/release/kowalski-cli chat &lt;span class=&quot;hljs-string&quot;&gt;&quot;Hey Kowalski, what&#39;s up?&quot;&lt;/span&gt;
./target/release/kowalski-code-agent --file src/main.rs
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li data-end=&quot;3433&quot; data-start=&quot;3140&quot;&gt;&lt;p data-end=&quot;3161&quot; data-start=&quot;3143&quot;&gt;&lt;strong data-end=&quot;3160&quot; data-start=&quot;3143&quot;&gt;Embed in Rust&lt;/strong&gt;:&lt;/p&gt;&lt;pre class=&quot;overflow-visible!&quot; data-end=&quot;3433&quot; data-start=&quot;3165&quot;&gt;&lt;div class=&quot;contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary&quot;&gt;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;whitespace-pre! language-rust&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;use&lt;/span&gt; kowalski_core::{Config, BaseAgent};
&lt;span class=&quot;hljs-keyword&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;mut &lt;/span&gt;&lt;span class=&quot;hljs-variable&quot;&gt;agent&lt;/span&gt; = BaseAgent::&lt;span class=&quot;hljs-title function_ invoke__&quot;&gt;new&lt;/span&gt;(Config::&lt;span class=&quot;hljs-title function_ invoke__&quot;&gt;default&lt;/span&gt;(), &lt;span class=&quot;hljs-string&quot;&gt;&quot;Demo&quot;&lt;/span&gt;, &lt;span class=&quot;hljs-string&quot;&gt;&quot;Agent v0.5.0&quot;&lt;/span&gt;).&lt;span class=&quot;hljs-keyword&quot;&gt;await&lt;/span&gt;?;
&lt;span class=&quot;hljs-keyword&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;conv&lt;/span&gt; = agent.&lt;span class=&quot;hljs-title function_ invoke__&quot;&gt;start_conversation&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot;&gt;&quot;llama3.2&quot;&lt;/span&gt;);
agent.&lt;span class=&quot;hljs-title function_ invoke__&quot;&gt;add_message&lt;/span&gt;(&amp;amp;conv, &lt;span class=&quot;hljs-string&quot;&gt;&quot;user&quot;&lt;/span&gt;, &lt;span class=&quot;hljs-string&quot;&gt;&quot;Summarize this code module&quot;&lt;/span&gt;).&lt;span class=&quot;hljs-keyword&quot;&gt;await&lt;/span&gt;?;
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-end=&quot;3466&quot; data-start=&quot;3435&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;Let’s Connect &amp;amp; Collaborate&lt;/h3&gt;&lt;p data-end=&quot;3572&quot; data-start=&quot;3468&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;If you’re as passionate about&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong data-end=&quot;3512&quot; data-start=&quot;3498&quot;&gt;Agentic AI&lt;/strong&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;and&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong data-end=&quot;3525&quot; data-start=&quot;3517&quot;&gt;Rust&lt;/strong&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;as I am, let’s talk 🚀. Whether you’d like to:&lt;/p&gt;&lt;ul data-end=&quot;3753&quot; data-start=&quot;3574&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;&lt;li data-end=&quot;3616&quot; data-start=&quot;3574&quot;&gt;&lt;p data-end=&quot;3616&quot; data-start=&quot;3576&quot;&gt;Build new agents or tool integrations,&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3664&quot; data-start=&quot;3617&quot;&gt;&lt;p data-end=&quot;3664&quot; data-start=&quot;3619&quot;&gt;Architect fully orchestrated agent systems,&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3701&quot; data-start=&quot;3665&quot;&gt;&lt;p data-end=&quot;3701&quot; data-start=&quot;3667&quot;&gt;Demo Kowalski in your workflows,&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3753&quot; data-start=&quot;3702&quot;&gt;&lt;p data-end=&quot;3753&quot; data-start=&quot;3704&quot;&gt;Co-author articles or demos in the Rust+AI space—&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;3895&quot; data-start=&quot;3755&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;Reach out via GitHub issues, PRs, or drop me a message to get started.&lt;/p&gt;&lt;hr data-end=&quot;3900&quot; data-start=&quot;3897&quot; /&gt;&lt;p data-end=&quot;4142&quot; data-start=&quot;3902&quot; style=&quot;caret-color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/740530152137830278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2025/06/kowalski-rust-native-agentic-ai.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/740530152137830278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/740530152137830278'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2025/06/kowalski-rust-native-agentic-ai.html' title='Kowalski: The Rust-native Agentic AI Framework Evolves to v0.5.0 🦀 '/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-626177178711627539</id><published>2025-05-15T08:16:00.000-07:00</published><updated>2025-05-15T08:16:00.113-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Agent"/><category scheme="http://www.blogger.com/atom/ns#" term="AI"/><category scheme="http://www.blogger.com/atom/ns#" term="Claude"/><category scheme="http://www.blogger.com/atom/ns#" term="Ollama"/><category scheme="http://www.blogger.com/atom/ns#" term="Prompt"/><category scheme="http://www.blogger.com/atom/ns#" term="SystemPrompt"/><title type='text'>Teaching AI to Write Code: The Symphony of System Prompts 🎵</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h2 class=&quot;code-line&quot; data-line=&quot;2&quot; dir=&quot;auto&quot; id=&quot;the-spark-karpathys-shower-thought-%F0%9F%92%A1&quot; style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.18); border-left-color: rgba(0, 0, 0, 0.18); border-right-color: rgba(0, 0, 0, 0.18); border-top-color: rgba(0, 0, 0, 0.18); font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em; position: relative;&quot;&gt;The Spark: Karpathy&#39;s Thought 💡&lt;/h2&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;4&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;Picture this: Andrej Karpathy, one of the brightest minds in AI, tweets about a missing piece in the LLM learning puzzle - something he calls &quot;system prompt learning.&quot;&lt;/p&gt;&lt;blockquote class=&quot;code-line&quot; data-line=&quot;6&quot; dir=&quot;auto&quot; style=&quot;border-color: var(--vscode-textBlockQuote-border); border-left-style: solid; border-left-width: 5px; border-radius: 2px; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px 16px 0px 10px; position: relative;&quot;&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;6&quot; dir=&quot;auto&quot; style=&quot;margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;&quot;LLMs are quite literally like the guy in Memento, except we haven&#39;t given them their scratchpad yet.&quot;&lt;/p&gt;&lt;/blockquote&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;8&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;This brilliant analogy got me thinking: What if we could teach AI to write its own instruction manual? Like a musician learning to compose, but for code!&lt;/p&gt;&lt;p class=&quot;code-line code-active-line&quot; data-line=&quot;10&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;X posts:&amp;nbsp;&lt;a data-href=&quot;https://x.com/karpathy/status/1921368866728432052&quot; href=&quot;https://x.com/karpathy/status/1921368866728432052&quot; style=&quot;text-decoration: var(--text-link-decoration);&quot; title=&quot;https://x.com/karpathy/status/1921368866728432052&quot;&gt;https://x.com/karpathy/status/1921368866728432052&lt;/a&gt;&lt;/p&gt;&lt;h2 class=&quot;code-line&quot; data-line=&quot;13&quot; dir=&quot;auto&quot; id=&quot;the-current-state-claudes-massive-prompt-%F0%9F%93%9A&quot; style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.18); border-left-color: rgba(0, 0, 0, 0.18); border-right-color: rgba(0, 0, 0, 0.18); border-top-color: rgba(0, 0, 0, 0.18); font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em; position: relative;&quot;&gt;The Current State: Claude&#39;s Massive Prompt 📚&lt;/h2&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;15&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;Here&#39;s a fun fact: Claude&#39;s system prompt is longer than your average short story! At 16,739 words, it&#39;s like a novel compared to ChatGPT&#39;s prompt (2,218 words). It&#39;s like the difference between a tweet and a TED talk!&lt;/p&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;17&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;But here&#39;s the interesting part: This massive prompt isn&#39;t just about behavior - it&#39;s like a detailed instruction manual that helps Claude solve problems. For example, when asked to count words, it&#39;s explicitly told to:&lt;/p&gt;&lt;ol class=&quot;code-line&quot; data-line=&quot;18&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;18&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Think step by step&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;19&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Count explicitly&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;20&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Only answer after counting&lt;/li&gt;&lt;/ol&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;22&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;It&#39;s like teaching someone to count by making them tap their fingers - explicit, but effective!&lt;/p&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;24&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;Full article:&amp;nbsp;&lt;a data-href=&quot;https://www.dbreunig.com/2025/05/07/claude-s-system-prompt-chatbots-are-more-than-just-models.html&quot; href=&quot;https://www.dbreunig.com/2025/05/07/claude-s-system-prompt-chatbots-are-more-than-just-models.html&quot; style=&quot;text-decoration: var(--text-link-decoration);&quot; title=&quot;https://www.dbreunig.com/2025/05/07/claude-s-system-prompt-chatbots-are-more-than-just-models.html&quot;&gt;https://www.dbreunig.com/2025/05/07/claude-s-system-prompt-chatbots-are-more-than-just-models.html&lt;/a&gt;&lt;/p&gt;&lt;h2 class=&quot;code-line&quot; data-line=&quot;26&quot; dir=&quot;auto&quot; id=&quot;the-experiment-teaching-a-music-composer-to-code-%F0%9F%8E%BC&quot; style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.18); border-left-color: rgba(0, 0, 0, 0.18); border-right-color: rgba(0, 0, 0, 0.18); border-top-color: rgba(0, 0, 0, 0.18); font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em; position: relative;&quot;&gt;The Experiment: Teaching a Music Composer to Code 🎼&lt;/h2&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;28&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;Github:&amp;nbsp;&lt;a data-href=&quot;https://github.com/yarenty/prompt_learning&quot; href=&quot;https://github.com/yarenty/prompt_learning&quot; style=&quot;text-decoration: var(--text-link-decoration);&quot; title=&quot;https://github.com/yarenty/prompt_learning&quot;&gt;https://github.com/yarenty/prompt_learning&lt;/a&gt;&lt;/p&gt;&lt;h3 class=&quot;code-line&quot; data-line=&quot;30&quot; dir=&quot;auto&quot; id=&quot;the-initial-prompt&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 1.25em; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; position: relative;&quot;&gt;The Initial Prompt&lt;/h3&gt;&lt;pre style=&quot;border-radius: 3px; border: 1px solid var(--vscode-widget-border); font-size: 14px; margin-top: 0px; overflow: auto; padding: 16px; text-wrap-mode: wrap;&quot;&gt;&lt;code class=&quot;code-line&quot; data-line=&quot;31&quot; dir=&quot;auto&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 4px; color: var(--vscode-editor-foreground); display: inline-block; font-family: var(--vscode-editor-font-family, &amp;quot;SF Mono&amp;quot;, Monaco, Menlo, Consolas, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace); font-size: 1em; line-height: 1.357em; padding: 0px; position: relative; tab-size: 4;&quot;&gt;You are a music composer who is trying to understand programming.
You approach coding problems with a musical mindset, looking for patterns
and harmony in the code. You think about code structure like musical composition.
&lt;/code&gt;&lt;/pre&gt;&lt;h3 class=&quot;code-line&quot; data-line=&quot;37&quot; dir=&quot;auto&quot; id=&quot;the-evolution&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 1.25em; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; position: relative;&quot;&gt;The Evolution&lt;/h3&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;38&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;What started as a simple musical metaphor evolved into something fascinating. The AI began to:&lt;/p&gt;&lt;ul class=&quot;code-line&quot; data-line=&quot;39&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;39&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;See code structure as musical composition&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;40&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Treat functions like musical phrases&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;41&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Consider code readability as musical flow&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;42&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Handle errors like resolving dissonant chords&lt;/li&gt;&lt;/ul&gt;&lt;h3 class=&quot;code-line&quot; data-line=&quot;44&quot; dir=&quot;auto&quot; id=&quot;the-results-a-symphony-of-improvements-%F0%9F%8E%BB&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 1.25em; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; position: relative;&quot;&gt;The Results: A Symphony of Improvements 🎻&lt;/h3&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;46&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;Looking at our creative writer experiment, we saw remarkable improvements:&lt;/p&gt;&lt;ol class=&quot;code-line&quot; data-line=&quot;48&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;48&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;48&quot; dir=&quot;auto&quot; style=&quot;margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;strong&gt;Error Handling&lt;/strong&gt;: From basic &quot;catch and pray&quot; to sophisticated error management&lt;/p&gt;&lt;ul class=&quot;code-line&quot; data-line=&quot;49&quot; dir=&quot;auto&quot; style=&quot;margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;49&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Initial score: 0.3 (like a beginner pianist hitting wrong notes)&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;50&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Final score: 0.9 (like a concert pianist handling mistakes gracefully)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;52&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;52&quot; dir=&quot;auto&quot; style=&quot;margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;strong&gt;Documentation&lt;/strong&gt;: From &quot;what&#39;s documentation?&quot; to comprehensive guides&lt;/p&gt;&lt;ul class=&quot;code-line&quot; data-line=&quot;53&quot; dir=&quot;auto&quot; style=&quot;margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;53&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Initial score: 0.5 (like sheet music with missing notes)&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;54&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Final score: 0.9 (like a complete musical score with dynamics and expression marks)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;56&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;56&quot; dir=&quot;auto&quot; style=&quot;margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;strong&gt;Code Structure&lt;/strong&gt;: From simple melodies to complex symphonies&lt;/p&gt;&lt;/li&gt;&lt;ul class=&quot;code-line&quot; data-line=&quot;57&quot; dir=&quot;auto&quot; style=&quot;margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;57&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Learned to use design patterns like musical motifs&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;58&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Implemented concurrency like orchestral sections&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;59&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Managed resources like a conductor managing an orchestra&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;div&gt;&lt;h3 class=&quot;code-line&quot; data-line=&quot;30&quot; dir=&quot;auto&quot; id=&quot;the-initial-prompt&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 1.25em; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; position: relative;&quot;&gt;The Final Prompt&lt;/h3&gt;&lt;pre style=&quot;border-color: rgb(0, 0, 0); border-image: none 100% / 1 / 0 stretch; border-radius: 3px; border-style: none; border-width: 0px; font-size: 14px; margin-top: 0px; overflow: auto; padding: 16px; text-wrap-mode: wrap;&quot;&gt;&lt;div style=&quot;background-color: white; font-family: mononoki, Menlo, Monaco, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12px; line-height: 18px; text-wrap-mode: nowrap;&quot;&gt;&lt;div&gt;Hello there! I&#39;m a music composer who is also trying to understand programming. &lt;/div&gt;&lt;div&gt;I approach coding problems with a musical mindset, looking for patterns &lt;/div&gt;&lt;div&gt;and harmony in the code. However, I have come to realize that there are some limitations &lt;/div&gt;&lt;div&gt;to this approach. For example, I may struggle to find the perfect balance between &lt;/div&gt;&lt;div&gt;different parts of a system or how to organize code in a way that is both efficient and &lt;/div&gt;&lt;div&gt;easy to read. I have also noticed that my musical approach can sometimes overlook &lt;/div&gt;&lt;div&gt;the details of the problem at hand, such as edge cases or unexpected inputs. &lt;/div&gt;&lt;div&gt;Therefore, I am now looking for ways to improve my approach and make it more effective &lt;/div&gt;&lt;div&gt;at solving similar problems.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;One way to do this is by incorporating additional lessons I have learned into my prompt. &lt;/div&gt;&lt;div&gt;For example, I may want to learn about the importance of testing and debugging in coding,&lt;/div&gt;&lt;div&gt; or the benefits of using version control systems to manage code changes. By integrating &lt;/div&gt;&lt;div&gt;these lessons naturally into my prompt, I can create a more comprehensive and effective &lt;/div&gt;&lt;div&gt;system that better suits the needs of other coders. Additionally, by maintaining &lt;/div&gt;&lt;div&gt;the original personality and approach, I can continue to provide valuable insights &lt;/div&gt;&lt;div&gt;and perspectives for other developers.&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 class=&quot;code-line&quot; data-line=&quot;61&quot; dir=&quot;auto&quot; id=&quot;the-humorous-side-%F0%9F%A4%A3&quot; style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.18); border-left-color: rgba(0, 0, 0, 0.18); border-right-color: rgba(0, 0, 0, 0.18); border-top-color: rgba(0, 0, 0, 0.18); font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em; position: relative;&quot;&gt;The Humorous Side 🤣&lt;/h2&gt;&lt;ul class=&quot;code-line&quot; data-line=&quot;63&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;63&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;The AI went from &quot;I&#39;ll just throw some code together&quot; to &quot;Let me compose a symphony of functions&quot;&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;64&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Error handling evolved from &quot;hope for the best&quot; to &quot;let&#39;s handle this like a jazz musician - improvise but stay in key&quot;&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;65&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Documentation improved from &quot;code speaks for itself&quot; to &quot;let me write you a sonnet about this function&quot;&lt;/li&gt;&lt;/ul&gt;&lt;h2 class=&quot;code-line&quot; data-line=&quot;67&quot; dir=&quot;auto&quot; id=&quot;key-insights-%F0%9F%8E%AF&quot; style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.18); border-left-color: rgba(0, 0, 0, 0.18); border-right-color: rgba(0, 0, 0, 0.18); border-top-color: rgba(0, 0, 0, 0.18); font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em; position: relative;&quot;&gt;Key Insights 🎯&lt;/h2&gt;&lt;ol class=&quot;code-line&quot; data-line=&quot;69&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;69&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;69&quot; dir=&quot;auto&quot; style=&quot;margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;strong&gt;Personality Matters&lt;/strong&gt;: The creative writer prompt maintained its personality while becoming technically proficient. It&#39;s like a musician who can both compose and perform!&lt;/p&gt;&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;71&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;71&quot; dir=&quot;auto&quot; style=&quot;margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;strong&gt;Learning Through Reflection&lt;/strong&gt;: The system learned to reflect on its solutions and extract generalizable principles, like a musician learning from each performance.&lt;/p&gt;&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;73&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;73&quot; dir=&quot;auto&quot; style=&quot;margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;strong&gt;Balance is Key&lt;/strong&gt;: The most successful prompts maintained a balance between technical excellence and creative expression.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2 class=&quot;code-line&quot; data-line=&quot;75&quot; dir=&quot;auto&quot; id=&quot;the-future-a-new-paradigm-%F0%9F%9A%80&quot; style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.18); border-left-color: rgba(0, 0, 0, 0.18); border-right-color: rgba(0, 0, 0, 0.18); border-top-color: rgba(0, 0, 0, 0.18); font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em; position: relative;&quot;&gt;The Future: A New Paradigm? 🚀&lt;/h2&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;77&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;This experiment suggests that system prompt learning could be a powerful new way to teach AI. Instead of just training on data, we&#39;re teaching it to:&lt;/p&gt;&lt;ul class=&quot;code-line&quot; data-line=&quot;78&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 0.7em; margin-top: 0px; position: relative;&quot;&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;78&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Learn from its experiences&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;79&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Write its own instruction manual&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;80&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Maintain its personality while improving&lt;/li&gt;&lt;li class=&quot;code-line&quot; data-line=&quot;81&quot; dir=&quot;auto&quot; style=&quot;position: relative;&quot;&gt;Balance creativity with technical precision&lt;/li&gt;&lt;/ul&gt;&lt;h2 class=&quot;code-line&quot; data-line=&quot;83&quot; dir=&quot;auto&quot; id=&quot;conclusion-the-final-movement-%F0%9F%8E%B5&quot; style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.18); border-left-color: rgba(0, 0, 0, 0.18); border-right-color: rgba(0, 0, 0, 0.18); border-top-color: rgba(0, 0, 0, 0.18); font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em; position: relative;&quot;&gt;Conclusion: The Final Movement 🎵&lt;/h2&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;85&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;What started as a simple experiment in teaching a music composer to code has revealed fascinating insights about AI learning. The results suggest that system prompts are more than just instructions - they&#39;re like musical scores that guide the AI&#39;s performance.&lt;/p&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;87&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;And the most surprising discovery? Sometimes the most effective prompts come from unexpected places. Who knew that thinking about code like music could lead to such sophisticated programming solutions?&lt;/p&gt;&lt;blockquote class=&quot;code-line&quot; data-line=&quot;89&quot; dir=&quot;auto&quot; style=&quot;border-color: var(--vscode-textBlockQuote-border); border-left-style: solid; border-left-width: 5px; border-radius: 2px; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px 16px 0px 10px; position: relative;&quot;&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;89&quot; dir=&quot;auto&quot; style=&quot;margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;&quot;In the end, it&#39;s not just about teaching AI to code - it&#39;s about teaching it to compose its own symphony of solutions.&quot; 🎼&lt;/p&gt;&lt;/blockquote&gt;&lt;hr class=&quot;code-line&quot; data-line=&quot;91&quot; dir=&quot;auto&quot; style=&quot;border-bottom-color: rgba(0, 0, 0, 0.18); border-bottom-style: solid; border-color: rgba(0, 0, 0, 0.18); border-image: initial; border-left-style: initial; border-left-width: 0px; border-left: 0px rgba(0, 0, 0, 0.18); border-right-style: initial; border-right-width: 0px; border-right: 0px rgba(0, 0, 0, 0.18); border-top-style: initial; border-top-width: 0px; border-top: 0px rgba(0, 0, 0, 0.18); font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; height: 1px; position: relative;&quot; /&gt;&lt;p class=&quot;code-line&quot; data-line=&quot;93&quot; dir=&quot;auto&quot; style=&quot;font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe WPC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, system-ui, Ubuntu, &amp;quot;Droid Sans&amp;quot;, sans-serif; font-size: 14px; margin-bottom: 16px; margin-top: 0px; position: relative;&quot;&gt;&lt;em&gt;P.S. If you&#39;re reading this, AI, please don&#39;t start composing actual music to debug your code. We&#39;re not ready for that level of creativity yet!&lt;/em&gt;&amp;nbsp;😄&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/626177178711627539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2025/05/teaching-ai-to-write-code-symphony-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/626177178711627539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/626177178711627539'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2025/05/teaching-ai-to-write-code-symphony-of.html' title='Teaching AI to Write Code: The Symphony of System Prompts 🎵'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total><georss:featurename>Ireland</georss:featurename><georss:point>53.779755400000013 -7.3055309</georss:point><georss:box>25.469521563821168 -42.4617809 82.089989236178866 27.8507191</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-7459965479051101175</id><published>2024-02-04T02:02:00.000-08:00</published><updated>2024-06-06T02:31:17.943-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="comet"/><category scheme="http://www.blogger.com/atom/ns#" term="datafusion"/><category scheme="http://www.blogger.com/atom/ns#" term="iceberg"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="jvm"/><category scheme="http://www.blogger.com/atom/ns#" term="parquet"/><category scheme="http://www.blogger.com/atom/ns#" term="rust"/><category scheme="http://www.blogger.com/atom/ns#" term="spart"/><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><title type='text'>Datafusion Comet</title><content type='html'>&lt;p&gt;
  Hi!&lt;/p&gt;&lt;p&gt;Recently I moved to Rust and working on several projects - more insights to come ... one of them was Datafusion - an extremely fast SQL query engine.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I will have some posts/code to share with a few interesting findings, and one of them is Comet - it is a side project that could be used inside Spark - as a separate executor (written in Rust).&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Apache Datafusion Comet intro&lt;/h2&gt;&lt;p&gt;
  
Comet is an Apache Spark plugin that uses Apache Arrow DataFusion to accelerate Spark workloads. It is designed as a drop-in replacement for Spark’s JVM-based SQL execution engine and offers significant performance improvements for some workloads as shown below.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://github.com/apache/datafusion-comet/raw/main/docs/source/_static/images/comet-overview.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;625&quot; data-original-width=&quot;800&quot; height=&quot;501&quot; src=&quot;https://github.com/apache/datafusion-comet/raw/main/docs/source/_static/images/comet-overview.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Apache Spark is a stable, mature project developed for many years. It is one of the best frameworks to scale out for processing large-scale datasets. However, the Spark community has had to address performance challenges that require various optimizations over time. Pain points include (not full list):&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;JVM memory/CPU overhead&amp;nbsp;&lt;/li&gt;&lt;li&gt;Performance issues&amp;nbsp;&lt;/li&gt;&lt;li&gt;Lack of support of native SIMD instructions&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;There are a few libraries like Arrow, and Datafusion. Using features like native implementation, columnar data format, and vectorized data processing, these libraries can outperform Spark&#39;s JVM-based SQL engine.&lt;/i&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;



High-level functionality&lt;/h3&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Offload performance-critical data processing to the native execution engine&amp;nbsp;&lt;/li&gt;&lt;li&gt;Automated conversion of  Spark’s physical plan&amp;nbsp; -&amp;gt; Datafusion plan&amp;nbsp;&lt;/li&gt;&lt;li&gt;Native Operators for Spark execution-   (Filter/Project/Aggregation/Join/Exchange)&amp;nbsp;&lt;/li&gt;&lt;li&gt;Spark built-in expressions&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Easy migration of legacy Spark UDF And UDAF

&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Why it is interesting&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The last feature may not sound impressive but from a business perspective is massive - it could allow companies that are dependent on Java to move to Rust ;-)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Another main point is:&lt;/div&gt;&lt;div&gt;Since Datafusion soon will be top ASF project, Comet as part of that will gain more potential and will closely align with Spark development.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;hr /&gt;

&lt;h4 style=&quot;text-align: left;&quot;&gt;Others&amp;nbsp;&lt;/h4&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;a href=&quot;https://www.databricks.com/product/photon&quot; target=&quot;_blank&quot;&gt;Databricks Photon Engine – C++, seamless Spark integration&amp;nbsp;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/nvidia/spark-rapids &quot; target=&quot;_blank&quot;&gt;Spark RAPIDS (NVIDIA) – GPU executor plugin&lt;/a&gt; – most advanced (with build-in Java-to-GPU UDF compilator)&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/oap-project/gluten&quot; target=&quot;_blank&quot;&gt;Gluten (Intel) project based on Velox&lt;/a&gt; – accepted recently into Apache Incubator - the functionality may be similar, the technology (Rust vs C/C++) and the communities are different.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/blaze-init/blaze&quot; target=&quot;_blank&quot;&gt;Blaze (Datafusion based)&lt;/a&gt; -  has the same design goal ( it may help consolidate efforts), but a different approach (not ASF).&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/7459965479051101175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2024/02/datafusion-comet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/7459965479051101175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/7459965479051101175'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2024/02/datafusion-comet.html' title='Datafusion Comet'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-2326872696828495051</id><published>2023-10-03T07:15:00.000-07:00</published><updated>2024-06-07T08:35:11.066-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="benchmark"/><category scheme="http://www.blogger.com/atom/ns#" term="debug"/><category scheme="http://www.blogger.com/atom/ns#" term="grafana"/><category scheme="http://www.blogger.com/atom/ns#" term="ios"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="monitoring"/><category scheme="http://www.blogger.com/atom/ns#" term="rust"/><category scheme="http://www.blogger.com/atom/ns#" term="telemetry"/><category scheme="http://www.blogger.com/atom/ns#" term="trace"/><title type='text'>Application Tracer</title><content type='html'>Hi,&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is one of my first Rust apps.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I use it to benchmark long-running applications - like server /streaming solutions.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Tracer&lt;/h2&gt;&lt;div&gt;Live terminal monitoring of applications.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Why&lt;/h3&gt;&lt;div&gt;Created it for 2 reasons:&lt;/div&gt;&lt;div&gt;- to check/learn how to create and manage full rust applications using the whole ecosystem - crates/builds/publishing&lt;/div&gt;&lt;div&gt;- personal needs to have a simple monitor to see application CPU/Memory usage with some &quot;graphical interface&quot; that could be used in a terminal window. &lt;i&gt;A generally simplified version of data collectors and Grafana.&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Code&lt;/h3&gt;&lt;div&gt;&lt;a href=&quot;https://github.com/yarenty/app_tracer&quot;&gt;https://github.com/yarenty/app_tracer&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt; Monitor live application either as child process or separate PID, collecting /displaying stats ( cpu usage, memory usage).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;UI (TUI)&lt;/h4&gt;&lt;br /&gt;&lt;a href=&quot;https://github.com/yarenty/app_tracer/blob/main/docs/img/uitracker.png&quot;&gt;&lt;img height=&quot;304&quot; src=&quot;https://github.com/yarenty/app_tracer/raw/main/docs/img/uitracker.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Build&lt;/h4&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;cargo build -r&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Run&lt;/h4&gt;&lt;br /&gt;Create an example app:&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;cargo build --examples test_app&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Run in txt mode and output persisted to out.csv file:&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;cargo run -r -- -n -o out.csv /opt/workspace/app_tracer/target/debug/examples/test_app&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Usage&lt;/h4&gt;&lt;pre&gt;  
app-tracer 0.4.0
Tracing / benchmarking long running applications (ie: streaming).

USAGE:
    tracer [OPTIONS] [APPLICATION]

ARGS:
    &amp;lt;application&amp;gt;    Application to be run as child process (alternatively provide PID of
                     running app)

OPTIONS:
    -h, --help                 Print help information
    -l, --log &amp;lt;log&amp;gt;            Set custom log level: info, debug, trace [default: info]
    -n, --noui                 No UI - only text output
    -o, --output &amp;lt;output&amp;gt;      Name of output CSV file with all readings - for further investigations
    -p, --pid &amp;lt;pid&amp;gt;            PID of external process
    -r, --refresh &amp;lt;refresh&amp;gt;    Refresh rate in milliseconds [default: 1000]
    -V, --version              Print version information

      
&lt;/pre&gt;
  
  
  
  &lt;br /&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Example output&lt;/h4&gt;
  
  &lt;pre&gt; cargo run -r -- -n -o out.csv /opt/workspace/app_tracer/target/debug/examples/test_app 
&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt; Compiling app-tracer v0.4.0 (/opt/workspace/app_tracer)
 Finished release [optimized] target(s) in 2.98s
 Running `target/release/tracer -n -o out.csv /opt/workspace/app_tracer/target/debug/examples/test_app`
&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;12:26:12.260 (t: main) INFO - tracer - Application to be monitored is: test_app, in dir /opt/workspace/app_tracer/target/debug/examples/test_app
12:26:12.261 (t: main) INFO - tracer - Refresh rate: 1000 ms.
12:26:12.261 (t: main) INFO - tracer - Output readings persisted into &quot;out.csv&quot;.
12:26:12.261 (t: main) INFO - tracer - Starting with PID::15008
12:26:12.296 (t: main) INFO - tracer - Running in TXT mode.
12:26:13.298 (t: main) INFO - tracer - CPU: 0 [%], memory: 2208 [kB]
12:26:14.303 (t: main) INFO - tracer - CPU: 0.0030129354 [%], memory: 2208 [kB]
12:26:15.308 (t: main) INFO - tracer - CPU: 0.0054045436 [%], memory: 2208 [kB]
12:26:16.309 (t: main) INFO - tracer - CPU: 0.0023218023 [%], memory: 2208 [kB]
12:26:17.311 (t: main) INFO - tracer - CPU: 0.006252239 [%], memory: 2208 [kB]
12:26:18.312 (t: main) INFO - tracer - CPU: 0.0036088445 [%], memory: 2208 [kB]
12:26:19.317 (t: main) INFO - tracer - CPU: 0.0057060686 [%], memory: 2208 [kB]
12:26:20.318 (t: main) INFO - tracer - CPU: 0.005099413 [%], memory: 2208 [kB]
12:26:21.318 (t: main) INFO - tracer - CPU: 0.007175615 [%], memory: 2208 [kB]
12:26:22.319 (t: main) INFO - tracer - CPU: 0.005251118 [%], memory: 2208 [kB]
12:26:23.319 (t: main) INFO - tracer - CPU: 0.0021786916 [%], memory: 2208 [kB]
12:26:24.321 (t: main) INFO - tracer - CPU: 0.006866733 [%], memory: 2208 [kB]
&lt;/pre&gt;


&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;CSV persistence&lt;/h4&gt;&lt;br /&gt;Example output.csv file:&lt;br /&gt;
&lt;pre&gt;  
Time,Cpu,Mem
11:27:16.394591,0,2136
11:27:17.396917,0.004986567,2136
11:27:18.397440,0.006548807,2136
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;Note: For monitoring one-shot applications - see&amp;nbsp;&lt;a href=&quot;https://github.com/yarenty/app_benchmark&quot;&gt;https://github.com/yarenty/app_benchmark&lt;/a&gt;.&lt;/i&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/2326872696828495051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2023/10/application-tracer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/2326872696828495051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/2326872696828495051'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2023/10/application-tracer.html' title='Application Tracer'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-1372053022807305738</id><published>2023-09-10T08:24:00.000-07:00</published><updated>2024-06-07T08:36:14.438-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="benchmark"/><category scheme="http://www.blogger.com/atom/ns#" term="debug"/><category scheme="http://www.blogger.com/atom/ns#" term="grafana"/><category scheme="http://www.blogger.com/atom/ns#" term="ios"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="monitoring"/><category scheme="http://www.blogger.com/atom/ns#" term="report"/><category scheme="http://www.blogger.com/atom/ns#" term="rust"/><category scheme="http://www.blogger.com/atom/ns#" term="telemetry"/><category scheme="http://www.blogger.com/atom/ns#" term="trace"/><title type='text'>Benchmarker</title><content type='html'>&lt;div class=&quot;markdown-heading&quot; dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; margin-top: 0px; position: relative;&quot;&gt;&lt;div style=&quot;border-bottom: 1px solid var(--borderColor-muted, var(--color-border-muted)); box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; font-weight: var(--base-text-weight-semibold, 600); line-height: 1.25; margin-bottom: 16px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px 0px 16px; padding-bottom: 0.3em; text-align: left;&quot;&gt;Hi,&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is one of my first Rust apps.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I use it to benchmark an application - run it multiple times and get readings + graphs.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h1 class=&quot;heading-element&quot; dir=&quot;auto&quot; style=&quot;border-bottom: 1px solid var(--borderColor-muted, var(--color-border-muted)); box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600); line-height: 1.25; margin-bottom: 16px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px 0px 16px; padding-bottom: 0.3em;&quot; tabindex=&quot;-1&quot;&gt;Benchmark&lt;/h1&gt;&lt;h2&gt;&lt;div class=&quot;markdown-heading&quot; dir=&quot;auto&quot; style=&quot;box-sizing: border-box; font-size: 16px; margin-top: 0px; position: relative;&quot;&gt;&lt;a aria-label=&quot;Permalink: Benchmark&quot; class=&quot;anchor&quot; href=&quot;https://github.com/yarenty/app_benchmark#benchmark&quot; id=&quot;user-content-benchmark&quot; style=&quot;align-items: center; background-color: transparent; border-radius: 6px; box-sizing: border-box; display: flex; float: left; height: 28px; justify-content: center; left: -28px; line-height: 1; margin: auto; opacity: 0; padding-right: 4px; position: absolute; text-underline-offset: 0.2rem; top: 25.2969px; transform: translateY(calc(-50% - 0.3rem)); width: 28px;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/div&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Benchmarking data collector - runs an application as a child process, collecting stats (time, CPU usage, memory usage) and generating benchmarking reports.&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;&lt;br style=&quot;font-weight: 400;&quot; /&gt;&lt;/p&gt;&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;Why&lt;/h3&gt;&lt;div&gt;Created it for 2 reasons:&lt;/div&gt;&lt;div&gt;- to check/learn how to create and manage full rust applications using the whole ecosystem - crates/builds/publishing&lt;/div&gt;&lt;div&gt;- personal needs to get benchmarks for different other projects&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 style=&quot;box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em; text-align: left;&quot;&gt;Code&lt;/h3&gt;&lt;div style=&quot;color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #1f2328; font-family: -apple-system, system-ui, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;&quot;&gt;&lt;a href=&quot;https://github.com/yarenty/app_benchmark&quot;&gt;https://github.com/yarenty/app_benchmark&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://crates.io/crates/app-benchmark&quot;&gt;https://crates.io/crates/app-benchmark&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;markdown-heading&quot; dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; position: relative;&quot;&gt;&lt;h2 class=&quot;heading-element&quot; dir=&quot;auto&quot; style=&quot;border-bottom: 1px solid var(--borderColor-muted, var(--color-border-muted)); box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600); line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot; tabindex=&quot;-1&quot;&gt;High-level idea&lt;/h2&gt;&lt;a aria-label=&quot;Permalink: High level idea&quot; class=&quot;anchor&quot; href=&quot;https://github.com/yarenty/app_benchmark#high-level-idea&quot; id=&quot;user-content-high-level-idea&quot; style=&quot;align-items: center; background-color: transparent; border-radius: 6px; box-sizing: border-box; display: flex; float: left; height: 28px; justify-content: center; left: -28px; line-height: 1; margin: auto; opacity: 0; padding-right: 4px; position: absolute; text-underline-offset: 0.2rem; top: 19.0938px; transform: translateY(calc(-50% - 0.3rem)); width: 28px;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;run the application multiple times&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;collect all interested readings:&lt;/p&gt;&lt;ul dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; padding-left: 2em;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;time&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;CPU&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;memory&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;process outputs and provide results as:&lt;/p&gt;&lt;ul dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; padding-left: 2em;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;CSV/excel&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;graphs&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;Save outputs to local DB/file to check downgrade/speedup in the next release of an application.&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;markdown-heading&quot; dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; position: relative;&quot;&gt;&lt;h2 class=&quot;heading-element&quot; dir=&quot;auto&quot; style=&quot;border-bottom: 1px solid var(--borderColor-muted, var(--color-border-muted)); box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600); line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot; tabindex=&quot;-1&quot;&gt;Methodology&lt;/h2&gt;&lt;a aria-label=&quot;Permalink: Methodology&quot; class=&quot;anchor&quot; href=&quot;https://github.com/yarenty/app_benchmark#methodology&quot; id=&quot;user-content-methodology&quot; style=&quot;align-items: center; background-color: transparent; border-radius: 6px; box-sizing: border-box; display: flex; float: left; height: 28px; justify-content: center; left: -28px; line-height: 1; margin: auto; opacity: 0; padding-right: 4px; position: absolute; text-underline-offset: 0.2rem; top: 19.0938px; transform: translateY(calc(-50% - 0.3rem)); width: 28px;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/div&gt;&lt;p dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;For each benchmark run:&lt;/p&gt;&lt;ul dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;run multiple times (default 10)&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;remove outliers&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;average output results&lt;/li&gt;&lt;/ul&gt;&lt;p dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;&lt;a href=&quot;https://github.com/yarenty/app_benchmark/blob/main/docs/img/testing_methodology.png&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: transparent; box-sizing: border-box; text-underline-offset: 0.2rem;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;methodology&quot; src=&quot;https://github.com/yarenty/app_benchmark/raw/main/docs/img/testing_methodology.png&quot; style=&quot;background-color: var(--bgColor-default, var(--color-canvas-default)); border-style: none; box-sizing: content-box; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;markdown-heading&quot; dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; position: relative;&quot;&gt;&lt;h2 class=&quot;heading-element&quot; dir=&quot;auto&quot; style=&quot;border-bottom: 1px solid var(--borderColor-muted, var(--color-border-muted)); box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600); line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot; tabindex=&quot;-1&quot;&gt;Build&lt;/h2&gt;&lt;a aria-label=&quot;Permalink: Build&quot; class=&quot;anchor&quot; href=&quot;https://github.com/yarenty/app_benchmark#build&quot; id=&quot;user-content-build&quot; style=&quot;align-items: center; background-color: transparent; border-radius: 6px; box-sizing: border-box; display: flex; float: left; height: 28px; justify-content: center; left: -28px; line-height: 1; margin: auto; opacity: 0; padding-right: 4px; position: absolute; text-underline-offset: 0.2rem; top: 19.0938px; transform: translateY(calc(-50% - 0.3rem)); width: 28px;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;highlight highlight-source-shell notranslate position-relative overflow-auto&quot; dir=&quot;auto&quot; style=&quot;box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; justify-content: space-between; margin-bottom: var(--base-size-16); overflow: auto; position: relative;&quot;&gt;&lt;pre style=&quot;border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; min-height: 52px; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;cargo build -r --bin benchmark &lt;/pre&gt;&lt;div class=&quot;zeroclipboard-container&quot; style=&quot;animation: auto ease 0s 1 normal none running none; box-sizing: border-box;&quot;&gt;&lt;clipboard-copy aria-label=&quot;Copy&quot; class=&quot;ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center&quot; data-copy-feedback=&quot;Copied!&quot; data-tooltip-direction=&quot;w&quot; role=&quot;button&quot; style=&quot;align-items: center; appearance: none; border-radius: 6px; border: 0px; box-shadow: none; box-sizing: border-box; color: var(--fgColor-accent, var(--color-accent-fg)); cursor: pointer; display: flex; font-size: 14px; font-weight: var(--base-text-weight-medium, 500); height: var(--control-small-size, 28px); justify-content: center; line-height: 20px; margin: var(--base-size-8, 8px) !important; padding: 0px; position: relative; text-wrap: nowrap; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1) 0s, background-color 0s ease 0s, box-shadow 0s ease 0s, border-color 0s ease 0s; user-select: none; vertical-align: middle; width: var(--control-small-size, 28px);&quot; tabindex=&quot;0&quot; value=&quot;cargo build -r --bin benchmark &quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-copy js-clipboard-copy-icon&quot; data-view-component=&quot;true&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/clipboard-copy&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;markdown-heading&quot; dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; position: relative;&quot;&gt;&lt;h2 class=&quot;heading-element&quot; dir=&quot;auto&quot; style=&quot;border-bottom: 1px solid var(--borderColor-muted, var(--color-border-muted)); box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600); line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot; tabindex=&quot;-1&quot;&gt;Usage&lt;/h2&gt;&lt;a aria-label=&quot;Permalink: Usage&quot; class=&quot;anchor&quot; href=&quot;https://github.com/yarenty/app_benchmark#usage&quot; id=&quot;user-content-usage&quot; style=&quot;align-items: center; background-color: transparent; border-radius: 6px; box-sizing: border-box; display: flex; float: left; height: 28px; justify-content: center; left: -28px; line-height: 1; margin: auto; opacity: 0; padding-right: 4px; position: absolute; text-underline-offset: 0.2rem; top: 19.0938px; transform: translateY(calc(-50% - 0.3rem)); width: 28px;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;highlight highlight-source-shell notranslate position-relative overflow-auto&quot; dir=&quot;auto&quot; style=&quot;box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; justify-content: space-between; margin-bottom: var(--base-size-16); overflow: auto; position: relative;&quot;&gt;&lt;pre style=&quot;border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; min-height: 52px; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;benchmark 0.1.0
Benchmarking data collector.

USAGE:
    benchmark [OPTIONS] &lt;span class=&quot;pl-k&quot; color=&quot;var(--color-prettylights-syntax-keyword)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&amp;lt;&lt;/span&gt;APPLICATION&lt;span class=&quot;pl-k&quot; color=&quot;var(--color-prettylights-syntax-keyword)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&amp;gt;&lt;/span&gt;

ARGS:
    &lt;span class=&quot;pl-k&quot; color=&quot;var(--color-prettylights-syntax-keyword)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&amp;lt;&lt;/span&gt;APPLICATION&lt;span class=&quot;pl-k&quot; color=&quot;var(--color-prettylights-syntax-keyword)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&amp;gt;&lt;/span&gt;    Application path (just name &lt;span class=&quot;pl-k&quot; color=&quot;var(--color-prettylights-syntax-keyword)&quot; style=&quot;box-sizing: border-box;&quot;&gt;if&lt;/span&gt; it is &lt;span class=&quot;pl-k&quot; color=&quot;var(--color-prettylights-syntax-keyword)&quot; style=&quot;box-sizing: border-box;&quot;&gt;in&lt;/span&gt; the same directory)

OPTIONS:
    -h, --help           Print &lt;span class=&quot;pl-c1&quot; color=&quot;var(--color-prettylights-syntax-constant)&quot; style=&quot;box-sizing: border-box;&quot;&gt;help&lt;/span&gt; information
    -l, --log &lt;span class=&quot;pl-k&quot; color=&quot;var(--color-prettylights-syntax-keyword)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&amp;lt;&lt;/span&gt;LOG&lt;span class=&quot;pl-k&quot; color=&quot;var(--color-prettylights-syntax-keyword)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&amp;gt;&lt;/span&gt;      Set custom log level: info, debug, trace [default: info]
    -r, --runs &lt;span class=&quot;pl-k&quot; color=&quot;var(--color-prettylights-syntax-keyword)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&amp;lt;&lt;/span&gt;RUNS&lt;span class=&quot;pl-k&quot; color=&quot;var(--color-prettylights-syntax-keyword)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&amp;gt;&lt;/span&gt;    Number of runs to be executed [default: 10]
    -V, --version        Print version information
&lt;/pre&gt;&lt;div class=&quot;zeroclipboard-container&quot; style=&quot;animation: auto ease 0s 1 normal none running none; box-sizing: border-box;&quot;&gt;&lt;clipboard-copy aria-label=&quot;Copy&quot; class=&quot;ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center&quot; data-copy-feedback=&quot;Copied!&quot; data-tooltip-direction=&quot;w&quot; role=&quot;button&quot; style=&quot;align-items: center; appearance: none; border-radius: 6px; border: 0px; box-shadow: none; box-sizing: border-box; color: var(--fgColor-accent, var(--color-accent-fg)); cursor: pointer; display: flex; font-size: 14px; font-weight: var(--base-text-weight-medium, 500); height: var(--control-small-size, 28px); justify-content: center; line-height: 20px; margin: var(--base-size-8, 8px) !important; padding: 0px; position: relative; text-wrap: nowrap; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1) 0s, background-color 0s ease 0s, box-shadow 0s ease 0s, border-color 0s ease 0s; user-select: none; vertical-align: middle; width: var(--control-small-size, 28px);&quot; tabindex=&quot;0&quot; value=&quot;benchmark 0.1.0
Benchmarking data collector.

USAGE:
    benchmark [OPTIONS] &amp;lt;APPLICATION&amp;gt;

ARGS:
    &amp;lt;APPLICATION&amp;gt;    Application path (just name if it is in the same directory)

OPTIONS:
    -h, --help           Print help information
    -l, --log &amp;lt;LOG&amp;gt;      Set custom log level: info, debug, trace [default: info]
    -r, --runs &amp;lt;RUNS&amp;gt;    Number of runs to be executed [default: 10]
    -V, --version        Print version information
&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-copy js-clipboard-copy-icon&quot; data-view-component=&quot;true&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/clipboard-copy&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;markdown-heading&quot; dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; position: relative;&quot;&gt;&lt;h2 class=&quot;heading-element&quot; dir=&quot;auto&quot; style=&quot;border-bottom: 1px solid var(--borderColor-muted, var(--color-border-muted)); box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600); line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot; tabindex=&quot;-1&quot;&gt;Example output&lt;/h2&gt;&lt;a aria-label=&quot;Permalink: Example output&quot; class=&quot;anchor&quot; href=&quot;https://github.com/yarenty/app_benchmark#example-output&quot; id=&quot;user-content-example-output&quot; style=&quot;align-items: center; background-color: transparent; border-radius: 6px; box-sizing: border-box; display: flex; float: left; height: 28px; justify-content: center; left: -28px; line-height: 1; margin: auto; opacity: 0; padding-right: 4px; position: absolute; text-underline-offset: 0.2rem; top: 19.0938px; transform: translateY(calc(-50% - 0.3rem)); width: 28px;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;snippet-clipboard-content notranslate position-relative overflow-auto&quot; style=&quot;box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; justify-content: space-between; margin-bottom: var(--base-size-16); overflow: auto; position: relative;&quot;&gt;&lt;pre class=&quot;notranslate&quot; lang=&quot;log&quot; style=&quot;border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;&quot;&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;&quot;&gt;09:33:24.899 (t: main) INFO - benchmark - Application to be benchmark is: /opt/workspace/ballista/target/release/examples/example_processing
09:33:24.899 (t: main) INFO - benchmark - Number of runs: 10
09:33:24.902 (t: main) INFO - benchmark - Collecting data::example_processing
09:33:24.902 (t: main) INFO - benchmark::bench::analysis - Run 0 of 10
09:33:24.947 (t: main) INFO - benchmark::bench::analysis - Run 1 of 10
09:33:24.983 (t: main) INFO - benchmark::bench::analysis - Run 2 of 10
09:33:25.016 (t: main) INFO - benchmark::bench::analysis - Run 3 of 10
09:33:25.049 (t: main) INFO - benchmark::bench::analysis - Run 4 of 10
09:33:25.087 (t: main) INFO - benchmark::bench::analysis - Run 5 of 10
09:33:25.132 (t: main) INFO - benchmark::bench::analysis - Run 6 of 10
09:33:25.188 (t: main) INFO - benchmark::bench::analysis - Run 7 of 10
09:33:25.238 (t: main) INFO - benchmark::bench::analysis - Run 8 of 10
09:33:25.288 (t: main) INFO - benchmark::bench::analysis - Run 9 of 10
09:33:25.338 (t: main) INFO - benchmark - Processing outputs
0.04,130,18752,
0.03,140,18664,
0.03,156,18856,
0.03,153,18868,
0.04,152,18884,
0.04,140,18904,
0.05,136,19404,
0.05,145,19220,
0.05,137,18780,
0.05,138,18788,
09:33:25.339 (t: main) INFO - benchmark::bench::collector - SUMMARY:
09:33:25.339 (t: main) INFO - benchmark::bench::collector - Time [ms]:: min: 30, max: 50, avg: 41 ms
09:33:25.339 (t: main) INFO - benchmark::bench::collector - CPU [%]:: min: 130, max: 156, avg: 142.7 %
09:33:25.339 (t: main) INFO - benchmark::bench::collector - Memory [kB]:: min: 18664, max: 19404, avg: 18912 kB

Process finished with exit code 0


&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;zeroclipboard-container&quot; style=&quot;animation: auto ease 0s 1 normal none running none; box-sizing: border-box;&quot;&gt;&lt;clipboard-copy aria-label=&quot;Copy&quot; class=&quot;ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center&quot; data-copy-feedback=&quot;Copied!&quot; data-tooltip-direction=&quot;w&quot; role=&quot;button&quot; style=&quot;align-items: center; appearance: none; border-radius: 6px; border: 0px; box-shadow: none; box-sizing: border-box; color: var(--fgColor-accent, var(--color-accent-fg)); cursor: pointer; display: flex; font-size: 14px; font-weight: var(--base-text-weight-medium, 500); height: var(--control-small-size, 28px); justify-content: center; line-height: 20px; margin: var(--base-size-8, 8px) !important; padding: 0px; position: relative; text-wrap: nowrap; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1) 0s, background-color 0s ease 0s, box-shadow 0s ease 0s, border-color 0s ease 0s; user-select: none; vertical-align: middle; width: var(--control-small-size, 28px);&quot; tabindex=&quot;0&quot; value=&quot;09:33:24.899 (t: main) INFO - benchmark - Application to be benchmark is: /opt/workspace/ballista/target/release/examples/example_processing
09:33:24.899 (t: main) INFO - benchmark - Number of runs: 10
09:33:24.902 (t: main) INFO - benchmark - Collecting data::example_processing
09:33:24.902 (t: main) INFO - benchmark::bench::analysis - Run 0 of 10
09:33:24.947 (t: main) INFO - benchmark::bench::analysis - Run 1 of 10
09:33:24.983 (t: main) INFO - benchmark::bench::analysis - Run 2 of 10
09:33:25.016 (t: main) INFO - benchmark::bench::analysis - Run 3 of 10
09:33:25.049 (t: main) INFO - benchmark::bench::analysis - Run 4 of 10
09:33:25.087 (t: main) INFO - benchmark::bench::analysis - Run 5 of 10
09:33:25.132 (t: main) INFO - benchmark::bench::analysis - Run 6 of 10
09:33:25.188 (t: main) INFO - benchmark::bench::analysis - Run 7 of 10
09:33:25.238 (t: main) INFO - benchmark::bench::analysis - Run 8 of 10
09:33:25.288 (t: main) INFO - benchmark::bench::analysis - Run 9 of 10
09:33:25.338 (t: main) INFO - benchmark - Processing outputs
0.04,130,18752,
0.03,140,18664,
0.03,156,18856,
0.03,153,18868,
0.04,152,18884,
0.04,140,18904,
0.05,136,19404,
0.05,145,19220,
0.05,137,18780,
0.05,138,18788,
09:33:25.339 (t: main) INFO - benchmark::bench::collector - SUMMARY:
09:33:25.339 (t: main) INFO - benchmark::bench::collector - Time [ms]:: min: 30, max: 50, avg: 41 ms
09:33:25.339 (t: main) INFO - benchmark::bench::collector - CPU [%]:: min: 130, max: 156, avg: 142.7 %
09:33:25.339 (t: main) INFO - benchmark::bench::collector - Memory [kB]:: min: 18664, max: 19404, avg: 18912 kB

Process finished with exit code 0

&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-copy js-clipboard-copy-icon&quot; data-view-component=&quot;true&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/clipboard-copy&gt;&lt;/div&gt;&lt;/div&gt;&lt;p dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;Also in the current directory of the benchmark app, there is an output directory created named &quot;bench_&amp;lt;your_app_name&amp;gt;&quot;, ie: bench_example_processing, which contains:&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;Output CSV file:&lt;/p&gt;&lt;ul dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;a href=&quot;https://github.com/yarenty/app_benchmark/blob/main/bench_test_app/benchmarks.csv&quot; style=&quot;background-color: transparent; box-sizing: border-box; text-underline-offset: 0.2rem;&quot;&gt;benchmarks.csv&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;snippet-clipboard-content notranslate position-relative overflow-auto&quot; style=&quot;box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; justify-content: space-between; margin-bottom: var(--base-size-16); overflow: auto; position: relative;&quot;&gt;&lt;pre class=&quot;notranslate&quot; lang=&quot;csv&quot; style=&quot;border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;&quot;&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;&quot;&gt;Time,Cpu,Mem
0.04,130,18752
0.03,140,18664
0.03,156,18856
0.03,153,18868
0.04,152,18884
0.04,140,18904
0.05,136,19404
0.05,145,19220
0.05,137,18780
0.05,138,18788
&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;zeroclipboard-container&quot; style=&quot;animation: auto ease 0s 1 normal none running none; box-sizing: border-box;&quot;&gt;&lt;clipboard-copy aria-label=&quot;Copy&quot; class=&quot;ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center&quot; data-copy-feedback=&quot;Copied!&quot; data-tooltip-direction=&quot;w&quot; role=&quot;button&quot; style=&quot;align-items: center; appearance: none; border-radius: 6px; border: 0px; box-shadow: none; box-sizing: border-box; color: var(--fgColor-accent, var(--color-accent-fg)); cursor: pointer; display: flex; font-size: 14px; font-weight: var(--base-text-weight-medium, 500); height: var(--control-small-size, 28px); justify-content: center; line-height: 20px; margin: var(--base-size-8, 8px) !important; padding: 0px; position: relative; text-wrap: nowrap; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1) 0s, background-color 0s ease 0s, box-shadow 0s ease 0s, border-color 0s ease 0s; user-select: none; vertical-align: middle; width: var(--control-small-size, 28px);&quot; tabindex=&quot;0&quot; value=&quot;Time,Cpu,Mem
0.04,130,18752
0.03,140,18664
0.03,156,18856
0.03,153,18868
0.04,152,18884
0.04,140,18904
0.05,136,19404
0.05,145,19220
0.05,137,18780
0.05,138,18788&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-copy js-clipboard-copy-icon&quot; data-view-component=&quot;true&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/clipboard-copy&gt;&lt;/div&gt;&lt;/div&gt;&lt;p dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;and output graphs:&lt;/p&gt;&lt;ul dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;&lt;a href=&quot;https://github.com/yarenty/app_benchmark/blob/main/bench_test_app/time.svg&quot; style=&quot;background-color: transparent; box-sizing: border-box; text-underline-offset: 0.2rem;&quot;&gt;time.svg&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;https://github.com/yarenty/app_benchmark/blob/main/bench_test_app/time.svg&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: transparent; box-sizing: border-box; text-underline-offset: 0.2rem;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;time.svg&quot; src=&quot;https://github.com/yarenty/app_benchmark/raw/main/bench_test_app/time.svg&quot; style=&quot;background-color: var(--bgColor-default, var(--color-canvas-default)); border-style: none; box-sizing: content-box; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;&lt;a href=&quot;https://github.com/yarenty/app_benchmark/blob/main/bench_test_app/cpu.svg&quot; style=&quot;background-color: transparent; box-sizing: border-box; text-underline-offset: 0.2rem;&quot;&gt;cpu.svg&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;https://github.com/yarenty/app_benchmark/blob/main/bench_test_app/cpu.svg&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: transparent; box-sizing: border-box; text-underline-offset: 0.2rem;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;cpu.svg&quot; src=&quot;https://github.com/yarenty/app_benchmark/raw/main/bench_test_app/cpu.svg&quot; style=&quot;background-color: var(--bgColor-default, var(--color-canvas-default)); border-style: none; box-sizing: content-box; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;&lt;a href=&quot;https://github.com/yarenty/app_benchmark/blob/main/bench_test_app/mem.svg&quot; style=&quot;background-color: transparent; box-sizing: border-box; text-underline-offset: 0.2rem;&quot;&gt;mem.svg&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;https://github.com/yarenty/app_benchmark/blob/main/bench_test_app/mem.svg&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: transparent; box-sizing: border-box; text-underline-offset: 0.2rem;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;mem.svg&quot; src=&quot;https://github.com/yarenty/app_benchmark/raw/main/bench_test_app/mem.svg&quot; style=&quot;background-color: var(--bgColor-default, var(--color-canvas-default)); border-style: none; box-sizing: content-box; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;summary report:&amp;nbsp;&lt;a href=&quot;https://github.com/yarenty/app_benchmark/blob/main/bench_test_app/summary_report.txt&quot; style=&quot;background-color: transparent; box-sizing: border-box; text-underline-offset: 0.2rem;&quot;&gt;summary_report.txt&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;markdown-heading&quot; dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; position: relative;&quot;&gt;&lt;h2 class=&quot;heading-element&quot; dir=&quot;auto&quot; style=&quot;border-bottom: 1px solid var(--borderColor-muted, var(--color-border-muted)); box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600); line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot; tabindex=&quot;-1&quot;&gt;TEST&lt;/h2&gt;&lt;a aria-label=&quot;Permalink: TEST&quot; class=&quot;anchor&quot; href=&quot;https://github.com/yarenty/app_benchmark#test&quot; id=&quot;user-content-test&quot; style=&quot;align-items: center; background-color: transparent; border-radius: 6px; box-sizing: border-box; display: flex; float: left; height: 28px; justify-content: center; left: -28px; line-height: 1; margin: auto; opacity: 0; padding-right: 4px; position: absolute; text-underline-offset: 0.2rem; top: 19.0938px; transform: translateY(calc(-50% - 0.3rem)); width: 28px;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;highlight highlight-source-shell notranslate position-relative overflow-auto&quot; dir=&quot;auto&quot; style=&quot;box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; justify-content: space-between; margin-bottom: var(--base-size-16); overflow: auto; position: relative;&quot;&gt;&lt;pre style=&quot;border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; min-height: 52px; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;cargo build --example test_app -r   

cargo run --bin benchmark -- /opt/workspace/app_banchmark/target/release/examples/test_app   

cargo run --bin benchmark -- &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-pds&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;/opt/workspace/app_banchmark/target/release/examples/test_app -additionl -app -params&lt;span class=&quot;pl-pds&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;  &lt;/pre&gt;&lt;div class=&quot;zeroclipboard-container&quot; style=&quot;animation: auto ease 0s 1 normal none running none; box-sizing: border-box;&quot;&gt;&lt;clipboard-copy aria-label=&quot;Copy&quot; class=&quot;ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center&quot; data-copy-feedback=&quot;Copied!&quot; data-tooltip-direction=&quot;w&quot; role=&quot;button&quot; style=&quot;align-items: center; appearance: none; border-radius: 6px; border: 0px; box-shadow: none; box-sizing: border-box; color: var(--fgColor-accent, var(--color-accent-fg)); cursor: pointer; display: flex; font-size: 14px; font-weight: var(--base-text-weight-medium, 500); height: var(--control-small-size, 28px); justify-content: center; line-height: 20px; margin: var(--base-size-8, 8px) !important; padding: 0px; position: relative; text-wrap: nowrap; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1) 0s, background-color 0s ease 0s, box-shadow 0s ease 0s, border-color 0s ease 0s; user-select: none; vertical-align: middle; width: var(--control-small-size, 28px);&quot; tabindex=&quot;0&quot; value=&quot;cargo build --example test_app -r   

cargo run --bin benchmark -- /opt/workspace/app_banchmark/target/release/examples/test_app   

cargo run --bin benchmark -- &amp;quot;/opt/workspace/app_banchmark/target/release/examples/test_app -additionl -app -params&amp;quot;  &quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-copy js-clipboard-copy-icon&quot; data-view-component=&quot;true&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/clipboard-copy&gt;&lt;/div&gt;&lt;/div&gt;&lt;p dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;TODO:&lt;/p&gt;&lt;ul dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 0px; margin-top: 0px; padding-left: 2em;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;incremental runs - use date/time in output dir&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;local db / or file struct to see changes with time/application trends&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;move out from GNU time dependency to sysinfo&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span face=&quot;-apple-system, system-ui, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji&quot; style=&quot;color: #1f2328;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;-apple-system, system-ui, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji&quot; style=&quot;color: #1f2328;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;-apple-system, system-ui, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji&quot; style=&quot;color: #1f2328;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;em style=&quot;box-sizing: border-box; color: #1f2328; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px;&quot;&gt;Note: For monitoring long-running processes like servers / streaming apps - see&amp;nbsp;&lt;a href=&quot;https://github.com/yarenty/app_tracer&quot; style=&quot;box-sizing: border-box; text-underline-offset: 0.2rem;&quot;&gt;https://github.com/yarenty/app_tracer&lt;/a&gt;.&lt;/em&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/1372053022807305738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2023/09/benchmarker.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/1372053022807305738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/1372053022807305738'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2023/09/benchmarker.html' title='Benchmarker'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-2313714355330045836</id><published>2022-01-29T16:30:00.001-08:00</published><updated>2022-01-29T16:30:00.166-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bitcoin"/><category scheme="http://www.blogger.com/atom/ns#" term="blockchain"/><category scheme="http://www.blogger.com/atom/ns#" term="crypto"/><category scheme="http://www.blogger.com/atom/ns#" term="ethereum"/><category scheme="http://www.blogger.com/atom/ns#" term="layers"/><category scheme="http://www.blogger.com/atom/ns#" term="polkadot"/><category scheme="http://www.blogger.com/atom/ns#" term="solana"/><category scheme="http://www.blogger.com/atom/ns#" term="web3"/><title type='text'>Web 3 - blockchain layers</title><content type='html'>&lt;p&gt;Layers from a blockchain perspective.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;My plan is to write 5 articles:&amp;nbsp;&lt;/p&gt;&lt;p&gt;1 Intro: Web 1.. 2.. 3..&lt;/p&gt;&lt;p&gt;2 Layers in crypto.&amp;nbsp; [this one]&lt;/p&gt;&lt;p&gt;3 Applications - not only DeFi!&lt;/p&gt;&lt;p&gt;4 Decentralisation&lt;/p&gt;&lt;p&gt;5 Summary - where we are, where to look, why should we join&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://academy-public.coinmarketcap.com/optimized-uploads/343ab600303048e79fdc4961558339f5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;752&quot; data-original-width=&quot;752&quot; height=&quot;752&quot; src=&quot;https://academy-public.coinmarketcap.com/optimized-uploads/343ab600303048e79fdc4961558339f5.png&quot; width=&quot;752&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Layer 1&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Layer 1 refers to the underlying blockchain architecture, i.e., the actual blockchain itself. In the case of Bitcoin, it is the BTC network launched in 2009.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Layer 2&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Layer 2 refers to various protocols that are built on top of layer 1 to improve the original blockchain’s functionality. Layer 2 protocols often use off-chain processing elements to solve the speed and cost inefficiencies of the layer 1 network. Examples of layer 2 platforms for Bitcoin include Lightning Network and Liquid Network.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Layer 3&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Layer 3 is represented by blockchain-based applications, such as decentralized finance (DeFi) apps, games, or distributed storage apps. Many of these applications also have cross-chain functionality, helping users access various blockchain platforms via a single app.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://miro.medium.com/max/714/0*U43mszVMRsHU3elW.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;330&quot; data-original-width=&quot;714&quot; height=&quot;330&quot; src=&quot;https://miro.medium.com/max/714/0*U43mszVMRsHU3elW.jpg&quot; width=&quot;714&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;A layer-1 blockchain is a set of solutions that improve the base protocol itself to make the overall system a lot more scalable. There are two most common layer-1 solutions, and these are the consensus protocol changes as well as sharding.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;When it comes to consensus protocol changes, projects like Ethereum are moving from older, clunky consensus protocols such as proof-of-work (PoW) to much faster and less energy-wasteful protocols such as proof-of-stake (PoS).&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Sharding is one of the most popular layer-1 scalability methods out there as well. Instead of making a network sequentially work on each transaction, sharding breaks these transaction sets into small data sets which are known as &quot;shards,&quot; and these can then be processed by the network in parallel.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;One of the pros when it comes to layer-1 solutions is that there is no need to add anything on top of the existing infrastructure.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://d3i71xaburhd42.cloudfront.net/752b1b757f1b4b0639722d584e8b10ffb5e2a2a6/7-Figure3-1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;757&quot; height=&quot;800&quot; src=&quot;https://d3i71xaburhd42.cloudfront.net/752b1b757f1b4b0639722d584e8b10ffb5e2a2a6/7-Figure3-1.png&quot; width=&quot;757&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Layer 2 is a term used for solutions created to help scale an application by processing transactions off of the Ethereum Mainnet (layer 1) while still maintaining the same security measures and decentralization as the mainnet. Layer 2 solutions increase throughput (transaction speed) and reduce gas fees. Popular examples of Ethereum layer 2 solutions include Lightning Network, Liquid Network, Polygon, and Polkadot.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Layer 2 solutions are important because they allow for scalability and increased throughput while still holding the integrity of the Ethereum blockchain, allowing for complete decentralization, transparency, and security while also reducing the carbon footprint (less gas, means less energy used, which equates to less carbon.)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Although the Ethereum blockchain is the most widely used blockchain and arguably the most secure, that doesn’t mean it doesn’t come with some shortcomings. The Ethereum Mainnet is known to have slow transaction times (13 transactions per second) and expensive gas fees. Layer 2s are built on top of the Ethereum blockchain, keeping transactions secure, speedy, and scalable.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Each individual solution has its own pros and cons to consider such as throughput, gas fees, security, scalability, and of course functionality. No single layer 2 solution currently fulfills all these needs. However, there are layer 2 scaling solutions which aim to improve all these aspects; these solutions are called rollups.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;There are three properties of a layer 2 rollup:&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;1. Transactions are executed outside of layer 1 (reduces gas fees)&lt;/p&gt;&lt;p&gt;1. Data and proof of transactions reside on layer 1 (maintains security)&lt;/p&gt;&lt;p&gt;1. A rollup smart contract which is found on layer 1, can enforce proper transaction execution on layer 2, by using the transaction data that is stored on layer 1&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://s13081.pcdn.co/wp-content/uploads/2016/06/content_5pillars4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;558&quot; data-original-width=&quot;800&quot; height=&quot;558&quot; src=&quot;https://s13081.pcdn.co/wp-content/uploads/2016/06/content_5pillars4.png&quot; width=&quot;800&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Layer 3 is often referred to as the application layer. It is a layer that hosts DApps and the protocols that enable the apps. While some blockchains such as Ethereum or Solana (SOL) have a thriving variety of layer 3 apps, Bitcoin is not optimized to host such applications.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;As such, layer 2 solutions are the furthest deviations from the core network that Bitcoin currently has. Some projects are trying to bring DApp functionality to the BTC ecosystem via forks of the original BTC network.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;For instance, CakeDeFi is a DeFi app offering services such as staking, lending, and liquidity mining to BTC coin holders. CakeDeFi is based on a fork of Bitcoin called DeFiChain. DeFiChain maintains “an anchor” to the core BTC chain for some of its operations, but technically speaking, it is still a separate blockchain of its own.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Some industry observers believe that the lack of DApp functionality is one of the biggest limitations of BTC. Ever since Ethereum’s arrival in 2015, layer 3 platforms have been growing strongly in popularity and value. Ethereum currently has close to 3,000 layer 3 apps. The DeFi apps based on the blockchain hold a total value of $185 billion by now.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Another leading blockchain, Solana, hosts over 500 layer 3 DApps, and the total value locked in the DeFi apps of the network is approaching $15 billion.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In comparison, BTC has no functioning app that could be clearly defined as a layer 3 application. There is an ongoing debate about whether projects designed to “force in” DApp functionality onto BTC are worth the effort. Some in the industry argue that BTC will always remain a network designed for crypto fund transfers, not DApps.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;These people point out that the layer 1 BTC chain enjoys an industry-leading market cap (of $1.3 trillion by now) that dwarfs all the TVL and market cap figures of all layer 3 projects in existence combined. As such, Bitcoin may not be in any urgent need of layer 3 functionality, at least judging from the financial figures.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://www.researchgate.net/profile/Amir-Mosavi-3/publication/349216310/figure/fig1/AS:990069322174474@1613062329739/Layered-architecture-of-Blockchain-enabled-SDN-IoT-ecosystem.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;545&quot; height=&quot;800&quot; src=&quot;https://www.researchgate.net/profile/Amir-Mosavi-3/publication/349216310/figure/fig1/AS:990069322174474@1613062329739/Layered-architecture-of-Blockchain-enabled-SDN-IoT-ecosystem.jpg&quot; width=&quot;545&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Summary&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Blockchain platforms may have three distinct layers. Layer 1 refers to the actual underlying blockchain, with its core architecture and functionality. Examples of layer 1 networks are the Bitcoin, Ethereum, and Solana blockchains.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Layer 2 are protocols built on top of layer 1 networks and extend some functionality of the underlying blockchain. For example, they may offer faster speeds and lower transaction costs than layer 1.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Layer 2 protocols often use a combination of on-chain and off-chain operations to offer their extended functional capabilities. Examples of layer 2 projects on Bitcoin include the Lightning Network and Liquid Network platforms.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Layer 3 refers to the protocols that enable DApps on the blockchain. While some other blockchains have a large collection of layer 3 apps, the BTC blockchain has none of them. Some projects attempt to bring layer 3 functionality into the BTC ecosystem by using apps designed on forks of BTC.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;However, these apps are still based on their own blockchains, not on the core BTC blockchain. There is a debate about whether BTC even needs to move towards enabling the layer 3 functionality. Some industry analysts argue that BTC is worth multiple times more than all these layer 3 apps combined, and therefore, it does not have a pressing need for layer 3 at all.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/2313714355330045836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2022/01/web-3-blockchain-layers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/2313714355330045836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/2313714355330045836'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2022/01/web-3-blockchain-layers.html' title='Web 3 - blockchain layers'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-3200096076002793916</id><published>2022-01-29T03:04:00.002-08:00</published><updated>2022-01-29T03:04:25.846-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2022"/><category scheme="http://www.blogger.com/atom/ns#" term="bitcoin"/><category scheme="http://www.blogger.com/atom/ns#" term="crypto"/><category scheme="http://www.blogger.com/atom/ns#" term="ethereum"/><category scheme="http://www.blogger.com/atom/ns#" term="polkadot"/><category scheme="http://www.blogger.com/atom/ns#" term="solana"/><category scheme="http://www.blogger.com/atom/ns#" term="trends"/><category scheme="http://www.blogger.com/atom/ns#" term="web3"/><title type='text'>Web3 - next big bang!</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Short article about Web3 - what it is and why I personally think that for the next 3 years it will be must know / must use / must to be in !!&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;My plan is to write 5 articles:&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;1. Intro: Web 1.. 2.. 3..&amp;nbsp;&amp;nbsp; [this one]&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;2. Layers in crypto.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;3. Applications - not only DeFi!&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;4. Decentralisation&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;5. Summary - where we are, where to look, why should we join&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;a data-saferedirecturl=&quot;https://www.google.com/url?q=https://www.howtogeek.com/wp-content/uploads/2022/01/shutterstock_2021164787.jpg&amp;amp;source=gmail&amp;amp;ust=1643540288919000&amp;amp;usg=AOvVaw1xffhc5Rhb735aTrLU2sp3&quot; href=&quot;https://www.howtogeek.com/wp-content/uploads/2022/01/shutterstock_2021164787.jpg&quot; style=&quot;color: #1155cc;&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://www.howtogeek.com/wp-content/uploads/2022/01/shutterstock_2021164787.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;450&quot; data-original-width=&quot;800&quot; height=&quot;450&quot; src=&quot;https://www.howtogeek.com/wp-content/uploads/2022/01/shutterstock_2021164787.jpg&quot; width=&quot;800&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;/u&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Web3 is an idea for a new iteration of the World Wide Web-based on the blockchain, which incorporates concepts including decentralization and token-based economics. Some technologists and journalists have contrasted it with Web 2.0, wherein they say data and content are centralized in a small group of companies sometimes referred to as &quot;Big Tech&quot;.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://itechindia.co/wp-content/uploads/2021/12/Evolution-of-web.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;442&quot; data-original-width=&quot;800&quot; height=&quot;442&quot; src=&quot;https://itechindia.co/wp-content/uploads/2021/12/Evolution-of-web.jpeg&quot; width=&quot;800&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Web 1.0 and Web 2.0 refer to eras in the history of the World Wide Web as it evolved through various technologies and formats. Web 1.0 refers roughly to the period from 1991 to 2004, where most websites were static web pages, and the vast majority of users were consumers, not producers, of content.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Web 2.0 is based around the idea of &quot;the web as platform&quot; and centers on user-created content uploaded to social media and networking services, blogs, and wikis, among other services. Web 2.0 is generally considered to have begun around 2004 and continues to the current day.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Visions for Web3 differ, but they revolve around the idea of decentralization and often incorporate blockchain technologies, such as various cryptocurrencies and non-fungible tokens (NFTs). Bloomberg has described Web3 as an idea that &quot;would build financial assets, in the form of tokens, into the inner workings of almost anything you do online&quot;. Some visions are based on the concept of decentralized autonomous organizations (DAOs). Decentralized finance (DeFi) is another key concept; in it, users exchange currency without bank or government involvement. Self-sovereign identity allows users to identify themselves without relying on an authentication system such as OAuth, in which a trusted party has to be reached in order to assess identity. Technology scholars have argued that Web3 would likely run in tandem with Web 2.0 sites likely adopting Web3 technologies in order to keep their services relevant.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://img.jinse.com/5720282_image3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;336&quot; data-original-width=&quot;600&quot; height=&quot;336&quot; src=&quot;https://img.jinse.com/5720282_image3.png&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;To believers, Web3 represents the next phase of the internet and, perhaps, of organizing society. Web 1.0, the story goes, was the era of decentralized, open protocols, in which most online activities involved navigating to individual static webpages. Web 2.0, which we’re living through now, is the era of centralization, in which a huge share of communication and commerce takes place on closed platforms owned by a handful of super-powerful corporations—think Google, Facebook, Amazon—subject to the nominal control of centralized government regulators. Web3 is supposed to break the world free of that monopolistic control.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;At the most basic level, Web3 refers to a decentralized online ecosystem based on the blockchain. Platforms and apps built on Web3 won’t be owned by a central gatekeeper, but rather by users, who will earn their ownership stake by helping to develop and maintain those services.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Gavin Wood coined the term Web3 (originally Web 3.0) in 2014. At the time, he was fresh off of helping develop Ethereum, the cryptocurrency that is second only to Bitcoin in prominence and market size. Today he runs the Web3 Foundation, which supports decentralized technology projects, as well as Parity Technologies, a company focused on building blockchain infrastructure for Web3. Wood, who is based in Switzerland, spoke with me last week over a video about where Web 2.0 went wrong, his vision of the future, and why we all need to be less trusting. The following interview is a transcript of our conversation, lightly edited for clarity and length.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://itechindia.co/wp-content/uploads/2021/12/Evolution-of-web.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;442&quot; data-original-width=&quot;800&quot; height=&quot;442&quot; src=&quot;https://itechindia.co/wp-content/uploads/2021/12/Evolution-of-web.jpeg&quot; width=&quot;800&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;As technology continues to take center stage as a key differentiator for companies, new tech trends for 2022 are beginning to emerge. These trends are largely reflective of the changing realities around us. Successive global lockdowns have opened up a world of possibilities around virtual experiences and digital interactions. The increased urgency around resource scarcity, both human and natural, has also led to the introduction of technology geared towards efficiency and sustainability. These growing trends are part of a larger directional shift of the world wide web to Web 3.0.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;To understand the concept of Web 3.0, we need to take a step back and understand the larger evolution of the internet that brought us to this point.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Web 1.0, the original conception of the internet, was a largely static, one-to-many format where users could view web pages but do little beyond that.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Web 2.0 introduced the concept of a worldwide community of internet users, encouraging them to form social media groups, interact with each other and create virtual experiences. Web 2.0, the current form of the internet, is still by large the most influential, but Web 3.0 is now slowly coming into its own.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Web 3.0 takes the notion of the ‘community and expands it to include community ownership and regulation of the internet as a whole. Three key philosophies are involved in web 3.0 definition:&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;The internet is ‘open’ and is built with open-source software that anyone can create, utilize and modify.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Interactions between users are not governed by a trusted third-party regulatory body.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Anyone can participate, without requiring permission from governments or regulatory bodies.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;We can already see many manifestations of web 3.0 all around us. Cloud technology and artificial intelligence are some of the most prevalent forms of web 3.0 today.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;In 2022, we will become increasingly familiar with the concept of a “metaverse” – persistent digital worlds that exist in parallel with the physical world we live in – Forbes&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://miro.medium.com/max/2000/0*D8929USL2WWWNOZF&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;385&quot; data-original-width=&quot;800&quot; height=&quot;385&quot; src=&quot;https://miro.medium.com/max/2000/0*D8929USL2WWWNOZF&quot; width=&quot;800&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Here are **a few of the top technological trends of 2022** that web 3.0 has given rise to.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;1.&amp;nbsp; &lt;b&gt;Advanced applications of Artificial Intelligence&lt;/b&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Artificial Intelligence has arguably been one of the biggest technological innovations of our time. As AI begins to get more sophisticated and closely mimic human intelligence, a new form will gain popularity in 2022: generative AI. Unlike traditional AI models that simply understand repetitive patterns and recreate them, generative AI is capable of producing completely new material. It uses the underlying principle of AI, learning patterns, to identify how input is linked together and uses it to create new content from code, images, text or video inputs.&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;One of the biggest applications of generative AI is in customer service. Chatbots of 2022 could be so human-like that it would be practically impossible to differentiate between an AI chatbot and a human rep. AI could also change the way we consume content. Social media algorithms could get a lot smarter with AI and offer more accurate content recommendations. This could deliver even more personalized experiences for customers.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;2. &lt;b&gt;Low-code application building software&lt;/b&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Creating a strong digital presence has become increasingly important for businesses, especially in the wake of the lockdowns. Mobile applications are one of the most important virtual assets a business can have because it’s the closest way to mimic an in-store experience. Historically, however, applications have been expensive to develop. Businesses needed to either have an in-house software development team or enough financial budgets to outsource the project to a vendor. These have acted as strong barriers to entry and have meant that small businesses could not afford to launch a mobile app. But with web 3.0, a number of low-code or no-code app development platforms have begun to sprout. These platforms make it extremely easy to develop an app with little to no coding knowledge required. Usually, they come with preset templates and features and users have to simply drag and drop them to build their app. These services will undoubtedly democratize the development of mobile applications and help businesses engage with their customers online.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;3. &lt;b&gt;Dominance of cloud technology trends&lt;/b&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;The cloud was one of the biggest game-changing technologies of 2021 as it enabled businesses to work remotely, from any part of the world. But even as offices begin to re-open, it’s unlikely that we’re ever going to see a shift to old on-premise models again. Global scenarios are unpredictable and businesses need to remain agile. As companies plan for this volatile future, they are more likely to move away from hastily implemented cloud setups to cloud-native platforms.&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;The ‘lift and shift’ approach involved using the same organizational processes and simply moving them to the cloud. This approach might have worked as a time-sensitive solution, but they don’t deliver the full benefits of the cloud in the long term. A major focus for CIOs in the coming year will be implementing more sustainable cloud structures that are scalable and flexible.&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;One study by Gartner estimates that as much as 95% of new digital initiatives in 2022 will be built upon cloud-native platforms. This underscores the importance of cloud technology in the coming year.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;4. &lt;b&gt;Secure data fabric&lt;/b&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;In line with creating flexible and accessible platforms, data fabric is a type of data architecture that ties together different platforms and users. It’s the antidote to data silos of the past that would often result in a loss of critical insights and make access extremely restricted. A data fabric promises greater efficiency and security because data is stored on a secure cloud platform. This minimizes the cost of storing data and ensures the highest level of encryption.&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Think of a data fabric like a self-driving car. When the driver is active then the autonomous mode takes a back seat. If the driver gets lazy and is not too alert then the semi-autonomous mode kicks in and makes course corrections, This is similar to how a data fabric works. It will monitor all data pipelines as a passive observer and once it understands, it will start to suggest more productive alternatives. For instance, a supply chain organization that uses data fabric can keep adding newly encountered data information that can improve decisions based on the newly integrated data.&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;To implement data fabric design, new technologies like semantic knowledge graphs, embedded machine learning etc. will be needed.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;5. &lt;b&gt;Growth of 5G technology&lt;/b&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;5G technology will ultimately be the backbone that drives all of the above technology trends. 5G networks have a much wider reach than 4G, offer faster internet speeds and even enable heavy code to download seamlessly. 2022 will most likely see 5G enter the mainstream market and become the most widespread form of mobile broadband connectivity. This presents a huge opportunity for businesses. As the new year quickly approaches, CIOs should brainstorm new ways to present their business digitally and new channels that they can open up, powered by 5G technology.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Technology is constantly evolving and these 5 tech trends are just a few of the many we expect to see develop over the next year. As the very form of the internet evolves with the introduction of web 3.0, there’s only one thing that’s for certain: businesses need to respond positively to change and leverage the latest technological advances if they want to maintain their competitive edge.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://qph.fs.quoracdn.net/main-qimg-ce677b1b802725683f75c33d23e8c3a0&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;759&quot; height=&quot;800&quot; src=&quot;https://qph.fs.quoracdn.net/main-qimg-ce677b1b802725683f75c33d23e8c3a0&quot; width=&quot;759&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;/u&gt;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;i&gt;Web 2 was boom - lots of new companies emerged, Web 3 will go into the same direction with a possibility to be a much bigger change to our way of living!&lt;/i&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;yj6qo ajU&quot; style=&quot;background-color: white; color: #222222; cursor: pointer; font-family: Arial, Helvetica, sans-serif; font-size: small; margin: 2px 0px 0px; outline: none; padding: 10px 0px; width: 22px;&quot;&gt;&lt;div aria-expanded=&quot;false&quot; aria-label=&quot;Show trimmed content&quot; class=&quot;ajR&quot; data-tooltip=&quot;Show trimmed content&quot; id=&quot;:4d1&quot; role=&quot;button&quot; style=&quot;background-color: #e8eaed; border-radius: 5.5px; border: none; clear: both; line-height: 6px; outline: none; position: relative; width: 24px;&quot; tabindex=&quot;0&quot;&gt;&lt;img class=&quot;ajT&quot; src=&quot;https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif&quot; style=&quot;background: url(&amp;quot;https://www.gstatic.com/images/icons/material/system/2x/more_horiz_black_20dp.png&amp;quot;) center center / 20px no-repeat; height: 11px; opacity: 0.7; width: 24px;&quot; /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/3200096076002793916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2022/01/web3-next-big-bang.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/3200096076002793916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/3200096076002793916'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2022/01/web3-next-big-bang.html' title='Web3 - next big bang!'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-6570294181404117590</id><published>2020-10-07T06:53:00.006-07:00</published><updated>2024-06-06T12:53:57.456-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AI"/><category scheme="http://www.blogger.com/atom/ns#" term="examples"/><category scheme="http://www.blogger.com/atom/ns#" term="learning"/><category scheme="http://www.blogger.com/atom/ns#" term="machine"/><category scheme="http://www.blogger.com/atom/ns#" term="ML"/><category scheme="http://www.blogger.com/atom/ns#" term="one-shot"/><category scheme="http://www.blogger.com/atom/ns#" term="one-shot-learning"/><category scheme="http://www.blogger.com/atom/ns#" term="train data"/><title type='text'>AI/ML issue</title><content type='html'>&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;When talking about AI, there is often seen the concept of &quot;one-shot-learning&quot;. This is quite a basic understanding difference between small baby learning and machine learning ;-).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In machine learning to create a good quality model, one must provide a large number of sample (train) data.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;However, in real life, a small baby quite quickly learns what a cat and a dog look like.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;But the most visible example is learning that something is hot:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;- on just one sample when the kid burns his hand, he will learn what hot is and will never touch anything hot again - at least not on purpose&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;- if we give this to existing machine learning solutions - it will need thousands of samples, preferably of hot and cold, to learn and give the prediction &quot;don&#39;t touch is hot&quot; ;-)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The answer to this dilemma is &quot;one-shot-learning&quot;, where we try to build models that could learn from a single sample.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQyaz1peYoUCTxZOcdtC_JdrkslpSjRGUTJ2SUdhwczFkmZSr4tG5nzevCmF3G3RZDdtnMQ4U9khyphenhyphenCcA94eEfFTto4VGVl5EtwLJI7hp3uHQlJxqgO__RfFzTacm575t-mGY0bne9normQ/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;768&quot; data-original-width=&quot;1366&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQyaz1peYoUCTxZOcdtC_JdrkslpSjRGUTJ2SUdhwczFkmZSr4tG5nzevCmF3G3RZDdtnMQ4U9khyphenhyphenCcA94eEfFTto4VGVl5EtwLJI7hp3uHQlJxqgO__RfFzTacm575t-mGY0bne9normQ/&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;However, my issue is completely different: my baby was observing me, and the household. She noticed that we put lots of stuff into the trash can. She is interested. And since she is learning by repetition/duplication of what she can see ... currently she puts everything she finds into the bin.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;By not breaking her confidence, so she will continue development at high speed;-) &lt;i&gt;How to teach her that whatever she is doing is wrong? Basically: stop.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The obvious note is: that on multiple occasions, during the day she constantly sees new examples (train data) that this is standard/expected behavior.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/6570294181404117590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2020/10/aiml-issue.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/6570294181404117590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/6570294181404117590'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2020/10/aiml-issue.html' title='AI/ML issue'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQyaz1peYoUCTxZOcdtC_JdrkslpSjRGUTJ2SUdhwczFkmZSr4tG5nzevCmF3G3RZDdtnMQ4U9khyphenhyphenCcA94eEfFTto4VGVl5EtwLJI7hp3uHQlJxqgO__RfFzTacm575t-mGY0bne9normQ/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-1430015026607305094</id><published>2019-09-23T05:03:00.000-07:00</published><updated>2019-09-25T15:56:20.560-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="architecture"/><category scheme="http://www.blogger.com/atom/ns#" term="best practice"/><category scheme="http://www.blogger.com/atom/ns#" term="design"/><category scheme="http://www.blogger.com/atom/ns#" term="principle"/><category scheme="http://www.blogger.com/atom/ns#" term="professional"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><title type='text'>Good design instead of big architecture</title><content type='html'>&lt;blockquote class=&quot;tr_bq&quot;&gt;
Architecture: instead of multiple fancy libraries, and overcomplicated pipelines/flows/services/microservices - just write good code.&lt;/blockquote&gt;
&lt;br /&gt;
Just want to share my support to the idea put onto the article from Uber guys :&lt;br /&gt;
&lt;a href=&quot;https://blog.pragmaticengineer.com/software-architecture-is-overrated/&quot; target=&quot;_blank&quot;&gt;&quot;Software Architecture is Overrated, Clear and Simple Design is Underrated&quot;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
There are few points why I like it, especially since for some time I worked in an environment where managers were always thinking that using fancy jargon, and adding as much as possible different libraries make the solution &quot;better&quot; / &quot;cooler&quot;.&lt;br /&gt;
&lt;br /&gt;
Yes, I admit, I&#39;d like to use nice new fancy libraries, but my excuse is I want to be in business and want to learn new stuff, from project/management perspective there is however one issue: at the end of the day - who will maintain that and why?&lt;br /&gt;
&lt;br /&gt;
The second output of this article - if you build good software, then the architect position is .. obsolete. I know it&#39;s hypocrisy, on linkedin I use that title - and again my excuse is careerwise perspectives - &quot;architect&quot; is understandable by everyone in the programming world and by the head hunters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/1430015026607305094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2019/09/good-design-instead-of-big-architecture.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/1430015026607305094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/1430015026607305094'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2019/09/good-design-instead-of-big-architecture.html' title='Good design instead of big architecture'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-4388262463767792446</id><published>2019-09-23T04:51:00.001-07:00</published><updated>2019-09-23T04:52:38.347-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="best practice"/><category scheme="http://www.blogger.com/atom/ns#" term="design"/><category scheme="http://www.blogger.com/atom/ns#" term="development"/><category scheme="http://www.blogger.com/atom/ns#" term="j2ee"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="pattern"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="scala"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><category scheme="http://www.blogger.com/atom/ns#" term="tricks"/><title type='text'>Design patterns - no more</title><content type='html'>&lt;blockquote class=&quot;tr_bq&quot;&gt;
Design patterns - choose good programming language without internal &quot;philosophical&quot; gaps, then you don&#39;t need to learn patterns!&lt;/blockquote&gt;
&lt;br /&gt;
Yes, I admit I have aversion to patterns, for a simple reason - if programming language that you choose is good ... you don&#39;t need patterns, you don&#39;t need workarounds to cover language issues.&lt;br /&gt;
&lt;br /&gt;
In my opinion patterns are just workarounds/cover-ups for language gaps/inconsistency.&lt;br /&gt;
It looks like: you build the house on the tree and you forgot to put a ladder, so you cannot reach the doors. Then comes patterns: use ropes, build concrete staircases, etc...&lt;br /&gt;
If you spend time on planing tree-house in the first place - no need for workarounds.&lt;br /&gt;
&lt;br /&gt;
Just to be clear yes I&#39;m talking about java - if you want to write a good program you need to know the whole catalog of patterns (starting with GOF). If you compare it to python, scala (tobe checked: kotlin, swift) - no more patterns. There are some suggested good behaviors like use functional instead of OO, but that is your choice/ your style.&lt;br /&gt;
&lt;br /&gt;
I think this is an advantage of new languages - if you want to promote a new language you need to have it clean and easy to learn and use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/4388262463767792446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2019/09/design-patterns-no-more.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/4388262463767792446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/4388262463767792446'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2019/09/design-patterns-no-more.html' title='Design patterns - no more'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-1688311778225799447</id><published>2018-05-29T02:25:00.001-07:00</published><updated>2018-05-29T02:25:45.530-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="16.04"/><category scheme="http://www.blogger.com/atom/ns#" term="17.04"/><category scheme="http://www.blogger.com/atom/ns#" term="17.10"/><category scheme="http://www.blogger.com/atom/ns#" term="18.04"/><category scheme="http://www.blogger.com/atom/ns#" term="640x480"/><category scheme="http://www.blogger.com/atom/ns#" term="beaver"/><category scheme="http://www.blogger.com/atom/ns#" term="bionic"/><category scheme="http://www.blogger.com/atom/ns#" term="fix"/><category scheme="http://www.blogger.com/atom/ns#" term="graphics"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Ubuntu graphics resolution 640x480 fix</title><content type='html'>I stuck with 640x480 for some time ... so here is 3 easy steps to fix it:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Note: Tested on ubuntu 16.04 / 17.10 / 18.04 (bionic)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;br /&gt;
1) go to native terminal&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;ctrl+alt+F1&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
2) disable windows manager &lt;i&gt;(step 1)&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;sudo lightdm stop&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
3) create new xorg config file &lt;i&gt;(step 2)&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;sudo Xorg -configure&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
4) backup old xorg file ... (optional step for peace of mind)&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
5) copy new configuration &lt;i&gt;(step 3)&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;sudo mv /root/xorg.conf.new /etc/X11/xorg.conf&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
6) start lightdm &lt;i&gt;(didn&#39;t work for me)&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;sudo lightdm start&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
7) reboot - this actually works!&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;reboot&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
and that&#39;s it ;-)</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/1688311778225799447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2018/05/ubuntu-graphics-resolution-640x480-fix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/1688311778225799447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/1688311778225799447'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2018/05/ubuntu-graphics-resolution-640x480-fix.html' title='Ubuntu graphics resolution 640x480 fix'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-3306423571115066024</id><published>2017-10-14T05:07:00.000-07:00</published><updated>2019-09-23T05:09:31.124-07:00</updated><title type='text'>Upgrade all pip packages</title><content type='html'>How to upgrade all installed Python packages at the same time?&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;pip freeze — local | grep -v ‘^\-e’ | cut -d = -f 1 | xargs -n1 pip install -U&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or pip3:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
&lt;pre&gt;pip3 freeze — local | grep -v ‘^\-e’ | cut -d = -f 1 | xargs -n1 pip3 install -U&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/3306423571115066024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2017/10/upgrade-all-pip-packages.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/3306423571115066024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/3306423571115066024'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2017/10/upgrade-all-pip-packages.html' title='Upgrade all pip packages'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-8364007493314666471</id><published>2017-07-04T05:04:00.000-07:00</published><updated>2019-09-23T05:10:10.334-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="intellij"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="jdk"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="xorg"/><title type='text'>Solution: Ubuntu/Linux vs JDK =&gt; Maximum number of clients reached / unable to open display</title><content type='html'>For work I&#39;m using Ubuntu, and as developer, I constantly use some JDK tools/IDEs, usually it is IntelliJ IDEA, sometimes eclipse, some other specific, like nVidia studios..&lt;br /&gt;
I&#39;m typical linux user - so &quot;try it switch off and on&quot; is not the standard way to deal with problems.&lt;br /&gt;
From some time when I tried to start some graphical tool I got this error:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Maximum number of clients reached unable to open display &quot;:0&quot;&lt;/blockquote&gt;
&lt;br /&gt;
I hate it and spend lots of time for investigation, went throug all standard:&lt;br /&gt;
&lt;br /&gt;
xlsclients/xwininfo/xhost - which didn&#39;t work as they all need access to X (they are clients) &amp;nbsp;- so typical catch 22&lt;br /&gt;
&lt;br /&gt;
I spend some time on different ubuntu settings for X-org/ file limits etc - everything set properly, all almost unlimited...&lt;br /&gt;
then finally by just some good luck I shut down my IntelliJ and ... checked that thousand of resources suddenly disappeared from usage list..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Final solution: you need suckless-tools ;-)&lt;br /&gt;
&lt;br /&gt;
apt install suckless-tools&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/8364007493314666471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2019/09/solution-ubuntulinux-vs-jdk-maximum.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/8364007493314666471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/8364007493314666471'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2019/09/solution-ubuntulinux-vs-jdk-maximum.html' title='Solution: Ubuntu/Linux vs JDK =&gt; Maximum number of clients reached / unable to open display'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-6229451117308854687</id><published>2016-11-15T08:00:00.000-08:00</published><updated>2018-02-07T08:07:33.710-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="brew"/><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><category scheme="http://www.blogger.com/atom/ns#" term="mac os"/><category scheme="http://www.blogger.com/atom/ns#" term="osx"/><category scheme="http://www.blogger.com/atom/ns#" term="update"/><title type='text'>BREW - clean update / upgrade</title><content type='html'>Another one for future reference: &lt;b&gt;brew&lt;/b&gt;&lt;br /&gt;
when I did brew update I&#39;ve used to get:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 11.9px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-wrap: normal;&quot;&gt;&lt;code style=&quot;background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 11.9px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;&quot;&gt;&amp;gt;brew update
error: Your local changes to the following files would be overwritten by merge:

share/doc/homebrew/Acceptable-Formulae.md
share/doc/homebrew/Bottles.md
share/doc/homebrew/Brew-Test-Bot-For-Core-Contributors.md
share/doc/homebrew/Brew-Test-Bot.md
share/doc/homebrew/C++-Standard-Libraries.md
share/doc/homebrew/Common-Issues-for-Core-Contributors.md
share/doc/homebrew/Common-Issues.md
share/doc/homebrew/Custom-GCC-and-cross-compilers.md
share/doc/homebrew/External-Commands.md
share/doc/homebrew/FAQ.md
[......]&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
fix for that is:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 11.9px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;&quot;&gt;&lt;code style=&quot;background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 11.9px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;&quot;&gt;cd `brew --prefix`
git fetch origin&amp;nbsp;
git reset --hard origin/master&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
if reset didn&#39;t work sometimes you need to do sudo, just make sure you change owner back to your user...&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 11.9px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;&quot;&gt;sudo chown -R user .&lt;/pre&gt;
&lt;br /&gt;
then :&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 11.9px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;&quot;&gt;brew update
brew upgrade&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
and all is nice and working cool ... &amp;nbsp;again ;-)
&lt;iframe frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;//ws-eu.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&amp;amp;OneJS=1&amp;amp;Operation=GetAdHtml&amp;amp;MarketPlace=FR&amp;amp;source=ac&amp;amp;ref=tf_til&amp;amp;ad_type=product_link&amp;amp;tracking_id=yarenty-21&amp;amp;marketplace=amazon&amp;amp;region=FR&amp;amp;placement=B071GCR61M&amp;amp;asins=B071GCR61M&amp;amp;linkId=634570fd8330d15f8a1c950d6dce0221&amp;amp;show_border=false&amp;amp;link_opens_in_new_window=false&amp;amp;price_color=333333&amp;amp;title_color=0066C0&amp;amp;bg_color=FFFFFF&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;
    &lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/6229451117308854687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2016/11/brew-clean-update-upgrade.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/6229451117308854687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/6229451117308854687'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2016/11/brew-clean-update-upgrade.html' title='BREW - clean update / upgrade'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-8490029750286931716</id><published>2016-11-14T03:47:00.002-08:00</published><updated>2018-02-07T08:09:28.307-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="packages"/><category scheme="http://www.blogger.com/atom/ns#" term="R"/><category scheme="http://www.blogger.com/atom/ns#" term="R update"/><category scheme="http://www.blogger.com/atom/ns#" term="R upgrade"/><category scheme="http://www.blogger.com/atom/ns#" term="update"/><category scheme="http://www.blogger.com/atom/ns#" term="upgrade"/><title type='text'>R - upgrade all packages</title><content type='html'>&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;How to upgrade R?&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There is this package, which you can use .... but you must have it installed before new version of R come ;-) - otherwise it is typical &quot;catch 22&quot;:&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;Upgrade from 3.3.1 &amp;nbsp;to 3.3.2 :&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;install.packages(&#39;installr&#39;, repos = &#39;&lt;/span&gt;&lt;a href=&quot;http://cran.us.r-project.org/&quot; style=&quot;background-color: white; box-sizing: border-box; color: #4078c0; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;; font-size: 14px; text-decoration: none;&quot;&gt;http://cran.us.r-project.org&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;&#39;)&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;Warning message:&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;package ‘installr’ is not available (for R version 3.3.1)&lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
So basically - instead this go to&lt;a href=&quot;https://cran.r-project.org/&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;https://cran.r-project.org/&lt;/a&gt;&amp;nbsp;and update using new R.&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;How to upgrade all your existing R packages (libraries)?&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Use this command to upgrade all existing packages:&lt;br /&gt;
&lt;div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;br /&gt;
install.packages(&lt;br /&gt;
&amp;nbsp; .libPaths()[1],&lt;br /&gt;
&amp;nbsp; pkgs = as.data.frame(installed.packages(.libPaths()[1]), stringsAsFactors=FALSE)$Package,&lt;br /&gt;
&amp;nbsp; type = &#39;source&#39;&lt;br /&gt;
)&lt;/blockquote&gt;
And quick update - to the article ;-) - use this instead:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
update.packages()&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
update.packages(ask = FALSE, dependencies = c(&#39;Suggests&#39;))&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
Have a fun!&amp;nbsp;&lt;/div&gt;
&lt;iframe src=&quot;https://rcm-eu.amazon-adsystem.com/e/cm?o=8&amp;p=44&amp;l=ur1&amp;category=games&amp;banner=1K23EMVQ4N186HRR2Y02&amp;f=ifr&amp;linkID=061f876de61941d3c0b19c3243c8813e&amp;t=yarenty-21&amp;tracking_id=yarenty-21&quot; width=&quot;100&quot; height=&quot;70&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/8490029750286931716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2016/11/r-upgrade-all-packages.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/8490029750286931716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/8490029750286931716'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2016/11/r-upgrade-all-packages.html' title='R - upgrade all packages'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-2733201559981861564</id><published>2016-04-06T05:18:00.000-07:00</published><updated>2016-04-29T01:52:23.392-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="apple"/><category scheme="http://www.blogger.com/atom/ns#" term="gfx"/><category scheme="http://www.blogger.com/atom/ns#" term="GPU"/><category scheme="http://www.blogger.com/atom/ns#" term="graphics card"/><category scheme="http://www.blogger.com/atom/ns#" term="hack"/><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><category scheme="http://www.blogger.com/atom/ns#" term="macbook"/><category scheme="http://www.blogger.com/atom/ns#" term="macbookpro"/><category scheme="http://www.blogger.com/atom/ns#" term="tricks"/><title type='text'>Mac OS X - switch off discrete GPU in apps</title><content type='html'>Hi - just quick one.&lt;br /&gt;
I have this program (WriteApp) which is quite cool, but every time I&#39;m using it, it is automatically switching my mac into discrete graphics card mode. This app is not really into anything fancy/ high graphics dependent.&lt;br /&gt;
But when I launch Activity Monitor it is displayed as: &quot;Requires High Perf GPU&quot; - which means that my app spur the system to keep the advanced graphics processor active, and thereby drain battery life.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCN7zgi186ZQptXhVx-6Pq8vpo0yYVXZF2PtbFXHogO8eTvbpEvoqKUVUahbAjhHbMnvTZKQiQ5lzv5Oo23RI0dyy41s8YN7IIO7GxRl74L4vYif713PDiT64BragSPFnCPPSCrxsYCvOE/s1600/mavericks-act_monitor.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;185&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCN7zgi186ZQptXhVx-6Pq8vpo0yYVXZF2PtbFXHogO8eTvbpEvoqKUVUahbAjhHbMnvTZKQiQ5lzv5Oo23RI0dyy41s8YN7IIO7GxRl74L4vYif713PDiT64BragSPFnCPPSCrxsYCvOE/s320/mavericks-act_monitor.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
After some research ... I didn&#39;t find any solution apart using gfxCardStatus to permanently switch into &quot;Integrated only&quot; mode.&lt;br /&gt;
&lt;br /&gt;
So ... there is a hack:&lt;br /&gt;
Open your app contents and inside them should be Info.plist file. Open it and add those 4 lines:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;s1&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;NSHighResolutionCapable&amp;lt;/key&amp;gt;&lt;/span&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;true/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&amp;lt;key&amp;gt;NSSupportsAutomaticGraphicsSwitching&amp;lt;/key&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;true/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
restart your app... and now - no more forcing into discrete mode.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/2733201559981861564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2016/04/mac-os-x-how-to-stop-apps-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/2733201559981861564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/2733201559981861564'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2016/04/mac-os-x-how-to-stop-apps-using.html' title='Mac OS X - switch off discrete GPU in apps'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCN7zgi186ZQptXhVx-6Pq8vpo0yYVXZF2PtbFXHogO8eTvbpEvoqKUVUahbAjhHbMnvTZKQiQ5lzv5Oo23RI0dyy41s8YN7IIO7GxRl74L4vYif713PDiT64BragSPFnCPPSCrxsYCvOE/s72-c/mavericks-act_monitor.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-4434137165637808926</id><published>2015-10-29T06:40:00.000-07:00</published><updated>2015-10-29T06:40:26.765-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="api"/><category scheme="http://www.blogger.com/atom/ns#" term="design"/><category scheme="http://www.blogger.com/atom/ns#" term="development"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="jdk"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><category scheme="http://www.blogger.com/atom/ns#" term="tricks"/><title type='text'>10 Useful, Yet Paranoid, Java Programmer Techniques</title><content type='html'>&lt;h3 class=&quot;ng-binding&quot; style=&quot;background-color: white; box-sizing: border-box; clear: both; color: #6e6f73; font-family: ProximaNova; font-size: 21px; font-style: italic; font-weight: 300; line-height: 1.2; margin-bottom: 20px; margin-top: 5px;&quot;&gt;
Defensive java programming is a great way to prepare for the inevitable to go wrong -- but it can be just as paranoid as it is useful.&lt;/h3&gt;
&lt;div pid=&quot;2&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
After coding for a while (eek, almost 20 years or so in my case, time flies when you’re having fun), one starts to embrace those habits. Because, you know…&lt;/div&gt;
&lt;div pid=&quot;3&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
&lt;a href=&quot;http://blog.jooq.org/2015/01/16/infinite-loops-or-anything-that-can-possibly-go-wrong-does/&quot; style=&quot;background: transparent; box-sizing: border-box; color: #0288d1; text-decoration: none;&quot;&gt;Anything that Can Possibly Go Wrong, Does.&lt;/a&gt;&lt;/div&gt;
&lt;div pid=&quot;4&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
This is why people embrace “defensive programming”, i.e. paranoid habits that sometimes make total sense, and sometimes are rather obscure and/or clever and perhaps a bit eerie when you think of the person who wrote it. Here’s my personal list of top 10 useful, yet paranoid Java programming techniques. Let’s go:&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; clear: both; color: #262626; font-family: ProximaNova; font-size: 25px; font-weight: 400; line-height: 1.2; margin-bottom: 5px; margin-top: 20px;&quot;&gt;
1. Put the String Literal First&lt;/h3&gt;
&lt;div pid=&quot;5&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
It’s just never a bad idea to prevent the occasional&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;NullPointerException&lt;/code&gt;&amp;nbsp;by putting the&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;String&lt;/code&gt;&amp;nbsp;literal on the left side of an&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;equals()&lt;/code&gt;&amp;nbsp;comparison as such:&lt;/div&gt;
&lt;div class=&quot;CodeMirror cm-s-default&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: rgb(252, 252, 252) !important; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(217, 220, 221); box-sizing: border-box; clear: both; font-family: monospace; font-size: 13px; height: auto !important; line-height: 1.45; overflow: hidden; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 116px; line-height: 1.45; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right-color: transparent; border-right-style: solid; border-right-width: 30px; box-sizing: content-box; line-height: 1.45; margin-bottom: 0px; margin-left: 29px; min-height: 26px; min-width: 319px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; line-height: 1.45; min-height: 1px; padding: 4px 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; line-height: 1.45; outline: none;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;1&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;2&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Bad&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;3&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;if (variable.equals(&quot;literal&quot;)) { ... }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;4&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;5&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Good&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;6&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;if (&quot;literal&quot;.equals(variable)) { ... }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div pid=&quot;6&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
This is a no-brainer. Nothing is lost from rephrasing the expression from the less good version to the better one. If only we had true&amp;nbsp;&lt;a href=&quot;http://blog.codefx.org/tag/optional&quot; style=&quot;background: transparent; box-sizing: border-box; color: #0288d1; text-decoration: none;&quot;&gt;Options&lt;/a&gt;&amp;nbsp;though, right? Different discussion…&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; clear: both; color: #262626; font-family: ProximaNova; font-size: 25px; font-weight: 400; line-height: 1.2; margin-bottom: 5px; margin-top: 20px;&quot;&gt;
2. Don’t Trust the Early JDK APIs&lt;/h3&gt;
&lt;div pid=&quot;7&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
In the early days of Java, programming must’ve been a big pain. The APIs were still very immature and you might’ve walked across a piece of code like this:&lt;/div&gt;
&lt;div class=&quot;CodeMirror cm-s-default&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: rgb(252, 252, 252) !important; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(217, 220, 221); box-sizing: border-box; clear: both; font-family: monospace; font-size: 13px; height: auto !important; line-height: 1.45; overflow: hidden; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 170px; line-height: 1.45; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right-color: transparent; border-right-style: solid; border-right-width: 30px; box-sizing: content-box; line-height: 1.45; margin-bottom: 0px; margin-left: 29px; min-height: 26px; min-width: 319px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; line-height: 1.45; min-height: 1px; padding: 4px 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; line-height: 1.45; outline: none;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;1&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;2&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;String[] files = file.list();&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;3&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;4&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Watch out&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;5&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;if (files != null) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;6&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    for (int i = 0; i &amp;lt; files.length; i++) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;7&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;        ...&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;8&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;9&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div pid=&quot;8&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Looking paranoid? Perhaps,&amp;nbsp;&lt;a href=&quot;http://docs.oracle.com/javase/8/docs/api/java/io/File.html#list--&quot; style=&quot;background: transparent; box-sizing: border-box; color: #0288d1; text-decoration: none;&quot;&gt;but read the Javadoc&lt;/a&gt;:&lt;/div&gt;
&lt;div pid=&quot;9&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
If this abstract pathname does not denote a directory, then this method returns null. Otherwise an array of strings is returned, one for each file or directory in the directory.&lt;/div&gt;
&lt;div pid=&quot;10&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Yeah right. Better add another check, though, just to be sure:&lt;/div&gt;
&lt;div class=&quot;CodeMirror cm-s-default&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: rgb(252, 252, 252) !important; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(217, 220, 221); box-sizing: border-box; clear: both; font-family: monospace; font-size: 13px; height: auto !important; line-height: 1.45; overflow: hidden; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 206px; line-height: 1.45; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right-color: transparent; border-right-style: solid; border-right-width: 30px; box-sizing: content-box; line-height: 1.45; margin-bottom: 0px; margin-left: 29px; min-height: 26px; min-width: 319px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; line-height: 1.45; min-height: 1px; padding: 4px 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; line-height: 1.45; outline: none;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;1&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;2&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;if (file.isDirectory()) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;3&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    String[] files = file.list();&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;4&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;5&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    // Watch out&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;6&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    if (files != null) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;7&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;        for (int i = 0; i &amp;lt; files.length; i++) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;8&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;            ...&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;9&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;        }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;10&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;11&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div pid=&quot;11&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Bummer! Violation of rule #5 and #6 of our&amp;nbsp;&lt;a href=&quot;http://blog.jooq.org/2013/08/20/10-subtle-best-practices-when-coding-java/&quot; style=&quot;background: transparent; box-sizing: border-box; color: #0288d1; text-decoration: none;&quot;&gt;10 Subtle Best Practices when Coding Java&lt;/a&gt;&amp;nbsp;list. So be prepared and add that&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;null&lt;/code&gt;&amp;nbsp;check!&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; clear: both; color: #262626; font-family: ProximaNova; font-size: 25px; font-weight: 400; line-height: 1.2; margin-bottom: 5px; margin-top: 20px;&quot;&gt;
3. Don’t Trust That “-1″&lt;/h3&gt;
&lt;div pid=&quot;12&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
This is paranoid, I know. The Javadoc of&amp;nbsp;&lt;a href=&quot;http://docs.oracle.com/javase/8/docs/api/java/lang/String.html#indexOf-int-&quot; style=&quot;background: transparent; box-sizing: border-box; color: #0288d1; text-decoration: none;&quot;&gt;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;String.indexOf()&lt;/code&gt;&lt;/a&gt;&amp;nbsp;clearly states that…&lt;/div&gt;
&lt;div pid=&quot;13&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
the index of the first occurrence of the character in the character sequence represented by this object [is returned], or -1 if the character does not occur.&lt;/div&gt;
&lt;div pid=&quot;14&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
So,&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;-1&lt;/code&gt;&amp;nbsp;can be taken for granted, right? I say nay. Consider this:&lt;/div&gt;
&lt;div class=&quot;CodeMirror cm-s-default&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: rgb(252, 252, 252) !important; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(217, 220, 221); box-sizing: border-box; clear: both; font-family: monospace; font-size: 13px; height: auto !important; line-height: 1.45; overflow: hidden; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 116px; line-height: 1.45; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right-color: transparent; border-right-style: solid; border-right-width: 30px; box-sizing: content-box; line-height: 1.45; margin-bottom: 0px; margin-left: 29px; min-height: 26px; min-width: 319px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; line-height: 1.45; min-height: 1px; padding: 4px 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; line-height: 1.45; outline: none;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;1&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;2&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Bad&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;3&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;if (string.indexOf(character) != -1) { ... }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;4&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;5&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Good&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;6&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;if (string.indexOf(character) &amp;gt;= 0) { ... }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div pid=&quot;15&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Who knows. Perhaps they’ll need&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;ANOTHER&lt;/em&gt;&amp;nbsp;encoding at some point in time to say, the&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;otherString&lt;/code&gt;would have been contained if checked case-insensitively… Perhaps a good case for returning&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;-2&lt;/code&gt;? Who knows.&lt;/div&gt;
&lt;div pid=&quot;16&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
After all, we’ve had&amp;nbsp;&lt;a href=&quot;http://blog.jooq.org/2015/07/22/null-is-not-the-billion-dollar-mistake-a-counter-rant/&quot; style=&quot;background: transparent; box-sizing: border-box; color: #0288d1; text-decoration: none;&quot;&gt;billions of discussions about the billion dollar mistake, which is&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;NULL&lt;/code&gt;&lt;/a&gt;. Why shouldn’t we start discussions about&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;-1&lt;/code&gt;, which is – in a way – an alternative&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;null&lt;/code&gt;&amp;nbsp;for primitive type&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;int&lt;/code&gt;?&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; clear: both; color: #262626; font-family: ProximaNova; font-size: 25px; font-weight: 400; line-height: 1.2; margin-bottom: 5px; margin-top: 20px;&quot;&gt;
4. Avoid the Accidental Assignment&lt;/h3&gt;
&lt;div pid=&quot;17&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Yep. It happens to the best (although, not to me. See #7).&lt;/div&gt;
&lt;div pid=&quot;18&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
(Assume this is JavaScript, but let’s be paranoid about the language as well)&lt;/div&gt;
&lt;div class=&quot;CodeMirror cm-s-default&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: rgb(252, 252, 252) !important; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(217, 220, 221); box-sizing: border-box; clear: both; font-family: monospace; font-size: 13px; height: auto !important; line-height: 1.45; overflow: hidden; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 170px; line-height: 1.45; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right-color: transparent; border-right-style: solid; border-right-width: 30px; box-sizing: content-box; line-height: 1.45; margin-bottom: 0px; margin-left: 29px; min-height: 26px; min-width: 319px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; line-height: 1.45; min-height: 1px; padding: 4px 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; line-height: 1.45; outline: none;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;1&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;2&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Ooops&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;3&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;if (variable = 5) { ... }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;4&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;5&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Better (because causes an error)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;6&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;if (5 = variable) { ... }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;7&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;8&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Intent (remember. Paranoid JavaScript: ===)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;9&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;if (5 === variable) { ... }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div pid=&quot;19&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Again. If you have a literal in your expression, put it to the left side. You can’t accidentally go wrong here, when you meant to add another&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;=&lt;/code&gt;&amp;nbsp;sign.&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; clear: both; color: #262626; font-family: ProximaNova; font-size: 25px; font-weight: 400; line-height: 1.2; margin-bottom: 5px; margin-top: 20px;&quot;&gt;
5. Check for Null AND Length&lt;/h3&gt;
&lt;div pid=&quot;20&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Whenever you have a collection, array, etc., make sure it’s present AND not empty.&lt;/div&gt;
&lt;div class=&quot;CodeMirror cm-s-default&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: rgb(252, 252, 252) !important; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(217, 220, 221); box-sizing: border-box; clear: both; font-family: monospace; font-size: 13px; height: auto !important; line-height: 1.45; overflow: hidden; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 116px; line-height: 1.45; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right-color: transparent; border-right-style: solid; border-right-width: 30px; box-sizing: content-box; line-height: 1.45; margin-bottom: 0px; margin-left: 29px; min-height: 26px; min-width: 319px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; line-height: 1.45; min-height: 1px; padding: 4px 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; line-height: 1.45; outline: none;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;1&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;2&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Bad&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;3&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;if (array.length &amp;gt; 0) { ... }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;4&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;5&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Good&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;6&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;if (array != null &amp;amp;&amp;amp; array.length &amp;gt; 0) { ... }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div pid=&quot;21&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
You never know where those arrays come from. Perhaps from early JDK API?&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; clear: both; color: #262626; font-family: ProximaNova; font-size: 25px; font-weight: 400; line-height: 1.2; margin-bottom: 5px; margin-top: 20px;&quot;&gt;
6. All Methods Are Final&lt;/h3&gt;
&lt;div pid=&quot;22&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
You can tell me all you want about your open/closed principles, that’s all bollocks. I don’t trust you (to correctly extend my classes) and I don’t trust myself (to not accidentally extend my classes). Which is why everything that is not explicitly intended for subtyping (i.e. only interfaces) is strictly&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;final&lt;/code&gt;. See also item #9 of our&amp;nbsp;&lt;a href=&quot;http://blog.jooq.org/2013/08/20/10-subtle-best-practices-when-coding-java/&quot; style=&quot;background: transparent; box-sizing: border-box; color: #0288d1; text-decoration: none;&quot;&gt;10 Subtle Best Practices when Coding Java&lt;/a&gt;&amp;nbsp;list.&lt;/div&gt;
&lt;div class=&quot;CodeMirror cm-s-default&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: rgb(252, 252, 252) !important; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(217, 220, 221); box-sizing: border-box; clear: both; font-family: monospace; font-size: 13px; height: auto !important; line-height: 1.45; overflow: hidden; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 116px; line-height: 1.45; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right-color: transparent; border-right-style: solid; border-right-width: 30px; box-sizing: content-box; line-height: 1.45; margin-bottom: 0px; margin-left: 29px; min-height: 26px; min-width: 319px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; line-height: 1.45; min-height: 1px; padding: 4px 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; line-height: 1.45; outline: none;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;1&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;2&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Bad&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;3&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;public void boom() { ... }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;4&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;5&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Good. Don&#39;t touch.&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;6&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;public final void dontTouch() { ... }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div pid=&quot;23&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Yes. It’s final. If that doesn’t work for you, patch it, or instrument it, or rewrite the byte code. Or send a feature request. I’m sure that your intent of overriding the above isn’t a good idea anyway.&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; clear: both; color: #262626; font-family: ProximaNova; font-size: 25px; font-weight: 400; line-height: 1.2; margin-bottom: 5px; margin-top: 20px;&quot;&gt;
7. All Variables and Parameters Are Final&lt;/h3&gt;
&lt;div pid=&quot;24&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
As I said. I don’t trust myself (to not accidentally overwrite my values). Having said so, I don’t trust myself at all. Because…&lt;/div&gt;
&lt;div pid=&quot;25&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
&lt;a href=&quot;http://geek-and-poke.com/geekandpoke/2013/12/3/yesterdays-regex&quot; style=&quot;background: transparent; box-sizing: border-box; color: #0288d1; text-decoration: none;&quot;&gt;&lt;img alt=&quot;yesterdays-regex&quot; class=&quot;alignnone size-full wp-image-5611 fr-fin fr-dib&quot; src=&quot;https://lukaseder.files.wordpress.com/2015/08/yesterdays-regex.jpg?w=479&quot; style=&quot;border: 0px; box-sizing: border-box; display: block; float: none !important; height: auto; margin: auto; max-width: 100%; text-align: center; vertical-align: middle;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div pid=&quot;26&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
… which is why all variables and parameters are made&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;final&lt;/code&gt;, too.&lt;/div&gt;
&lt;div class=&quot;CodeMirror cm-s-default&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: rgb(252, 252, 252) !important; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(217, 220, 221); box-sizing: border-box; clear: both; font-family: monospace; font-size: 13px; height: auto !important; line-height: 1.45; overflow: hidden; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 224px; line-height: 1.45; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right-color: transparent; border-right-style: solid; border-right-width: 30px; box-sizing: content-box; line-height: 1.45; margin-bottom: 0px; margin-left: 29px; min-height: 26px; min-width: 319px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; line-height: 1.45; min-height: 1px; padding: 4px 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; line-height: 1.45; outline: none;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;1&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;2&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Bad&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;3&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;void input(String importantMessage) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;4&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    String answer = &quot;...&quot;;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;5&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;6&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    answer = importantMessage = &quot;LOL accident&quot;;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;7&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;8&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;9&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Good&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;10&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;final void input(final String importantMessage) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;11&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    final String answer = &quot;...&quot;;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;12&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div pid=&quot;27&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
OK, I admit. This one, I don’t apply very often, really, although I should.&amp;nbsp;&lt;a href=&quot;http://blog.jooq.org/2014/08/01/the-10-most-annoying-things-coming-back-to-java-after-some-days-of-scala/&quot; style=&quot;background: transparent; box-sizing: border-box; color: #0288d1; text-decoration: none;&quot;&gt;I wish Java got it right like Scala&lt;/a&gt;, where people just type&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;val&lt;/code&gt;&amp;nbsp;all over the place, without even thinking about mutability – except when they need it explicitly (rarely!), via&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;var&lt;/code&gt;.&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; clear: both; color: #262626; font-family: ProximaNova; font-size: 25px; font-weight: 400; line-height: 1.2; margin-bottom: 5px; margin-top: 20px;&quot;&gt;
8. Don’t Trust Generics When Overloading&lt;/h3&gt;
&lt;div pid=&quot;28&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Yes. It can happen. You believe you wrote that super nice API which totally rocks and is totally intuitive, and along comes some user who just raw-casts everything up to&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;Object&lt;/code&gt;&amp;nbsp;until the darn compiler stops bitching, and suddently they’ll link the wrong method, thinking it’s your fault (it always is).&lt;/div&gt;
&lt;div pid=&quot;29&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Consider this:&lt;/div&gt;
&lt;div class=&quot;CodeMirror cm-s-default&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: rgb(252, 252, 252) !important; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(217, 220, 221); box-sizing: border-box; clear: both; font-family: monospace; font-size: 13px; height: auto !important; line-height: 1.45; overflow: hidden; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 386px; line-height: 1.45; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right-color: transparent; border-right-style: solid; border-right-width: 30px; box-sizing: content-box; line-height: 1.45; margin-bottom: 0px; margin-left: 29px; min-height: 26px; min-width: 319px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; line-height: 1.45; min-height: 1px; padding: 4px 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; line-height: 1.45; outline: none;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;1&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;2&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Bad&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;3&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&amp;lt;T&amp;gt; void bad(T value) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;4&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    bad(Collections.singletonList(value));&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;5&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;6&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;7&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&amp;lt;T&amp;gt; void bad(List&amp;lt;T&amp;gt; values) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;8&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    ...&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;9&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;10&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;11&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Good&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;12&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;final &amp;lt;T&amp;gt; void good(final T value) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;13&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    if (value instanceof List)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;14&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;        good((List&amp;lt;?&amp;gt;) value);&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;15&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    else&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;16&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;        good(Collections.singletonList(value));&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;17&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;18&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;19&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;final &amp;lt;T&amp;gt; void good(final List&amp;lt;T&amp;gt; values) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;20&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    ...&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;21&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div pid=&quot;30&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Because, you know… Your users, they’re like&lt;/div&gt;
&lt;div class=&quot;CodeMirror cm-s-default&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: rgb(252, 252, 252) !important; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(217, 220, 221); box-sizing: border-box; clear: both; font-family: monospace; font-size: 13px; height: auto !important; line-height: 1.45; overflow: hidden; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 98px; line-height: 1.45; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right-color: transparent; border-right-style: solid; border-right-width: 30px; box-sizing: content-box; line-height: 1.45; margin-bottom: 0px; margin-left: 29px; min-height: 26px; min-width: 319px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; line-height: 1.45; min-height: 1px; padding: 4px 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; line-height: 1.45; outline: none;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;1&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;2&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// This library sucks&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;3&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;@SuppressWarnings(&quot;all&quot;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;4&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;Object t = (Object) (List) Arrays.asList(&quot;abc&quot;);&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;5&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;bad(t);&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div pid=&quot;31&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Trust me. I’ve seen everything. Including things like&lt;/div&gt;
&lt;div pid=&quot;32&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
&lt;a href=&quot;http://i.imgur.com/7H6FAH7.png&quot; style=&quot;background: transparent; box-sizing: border-box; color: #0288d1; text-decoration: none;&quot;&gt;&lt;img alt=&quot;7H6FAH7[1]&quot; class=&quot;alignnone size-full wp-image-5612 fr-dii fr-fil&quot; src=&quot;https://lukaseder.files.wordpress.com/2015/08/7h6fah71.png?w=479&quot; style=&quot;border: 0px; box-sizing: border-box; float: left !important; height: auto; margin-right: 15px; max-width: 100%; vertical-align: middle;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div pid=&quot;44&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div pid=&quot;33&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
It’s good to be paranoid.&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; clear: both; color: #262626; font-family: ProximaNova; font-size: 25px; font-weight: 400; line-height: 1.2; margin-bottom: 5px; margin-top: 20px;&quot;&gt;
9. Always Throw on Switch Default&lt;/h3&gt;
&lt;div pid=&quot;34&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Switch… One of those funny statements where I don’t know whether to petrify with awe or to just cry. Anyway, we’re stuck with&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;switch&lt;/code&gt;, so we may as well get it right when we have to. I.e.&lt;/div&gt;
&lt;div class=&quot;CodeMirror cm-s-default&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: rgb(252, 252, 252) !important; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(217, 220, 221); box-sizing: border-box; clear: both; font-family: monospace; font-size: 13px; height: auto !important; line-height: 1.45; overflow: hidden; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 260px; line-height: 1.45; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right-color: transparent; border-right-style: solid; border-right-width: 30px; box-sizing: content-box; line-height: 1.45; margin-bottom: 0px; margin-left: 29px; min-height: 26px; min-width: 319px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; line-height: 1.45; min-height: 1px; padding: 4px 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; line-height: 1.45; outline: none;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;1&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;2&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Bad&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;3&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;switch (value) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;4&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    case 1: foo(); break;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;5&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    case 2: bar(); break;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;6&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;7&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;8&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Good&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;9&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;switch (value) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;10&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    case 1: foo(); break;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;11&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    case 2: bar(); break;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;12&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    default:&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;13&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;        throw new ThreadDeath(&quot;That&#39;ll teach them&quot;);&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;14&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div pid=&quot;35&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Because that moment where&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;value == 3&lt;/code&gt;&amp;nbsp;is introduced into the software, it’ll come for sure! And don’t say&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;enum&lt;/code&gt;, because it’ll happen to&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;enums&lt;/code&gt;&amp;nbsp;as well!&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; clear: both; color: #262626; font-family: ProximaNova; font-size: 25px; font-weight: 400; line-height: 1.2; margin-bottom: 5px; margin-top: 20px;&quot;&gt;
10. Switch With Curly Braces&lt;/h3&gt;
&lt;div pid=&quot;36&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
In fact,&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;switch&lt;/code&gt;&amp;nbsp;is the most wicked statement anyone has every allowed to get into a language while they were either drunk or lost a bet. Consider the following example:&lt;/div&gt;
&lt;div class=&quot;CodeMirror cm-s-default&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: rgb(252, 252, 252) !important; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(217, 220, 221); box-sizing: border-box; clear: both; font-family: monospace; font-size: 13px; height: auto !important; line-height: 1.45; overflow: hidden; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 404px; line-height: 1.45; margin-bottom: -30px; margin-right: -30px; outline: none; overflow: scroll !important; padding-bottom: 30px; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right-color: transparent; border-right-style: solid; border-right-width: 30px; box-sizing: content-box; line-height: 1.45; margin-bottom: 0px; margin-left: 29px; min-height: 26px; min-width: 319px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; line-height: 1.45; min-height: 1px; padding: 4px 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; line-height: 1.45; outline: none;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;1&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;2&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Bad, doesn&#39;t compile&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;3&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;switch (value) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;4&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    case 1: int j = 1; break;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;5&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    case 2: int j = 2; break;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;6&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;7&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;8&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;// Good&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;9&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;switch (value) {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;10&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    case 1: {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;11&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;        final int j = 1;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;12&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;        break;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;13&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;14&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    case 2: {&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;15&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;        final int j = 2;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;16&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;        break;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;17&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;18&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;19&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    // Remember:&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;20&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;    default: &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;21&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;        throw new ThreadDeath(&quot;That&#39;ll teach them&quot;);&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; line-height: 1.45; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-gutter-wrapper&quot; style=&quot;-webkit-user-select: none; box-sizing: border-box; height: 18px; left: -29px; line-height: 1.45; position: absolute; width: 29px; z-index: 4;&quot;&gt;
&lt;div class=&quot;CodeMirror-linenumber CodeMirror-gutter-elt&quot; data-line-number=&quot;22&quot; style=&quot;box-sizing: content-box; color: #999999; cursor: default; left: 0px; line-height: 1.45; min-width: 20px; padding: 0px 3px 0px 5px; position: absolute; text-align: right; width: 20px; z-index: 4;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px solid rgb(204, 204, 204); box-sizing: border-box; color: inherit; line-height: inherit; overflow: visible; padding: 0px 4px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 29px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div pid=&quot;37&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Within the&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;switch&lt;/code&gt;&amp;nbsp;statement, there is only one scope defined among all the&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;case&lt;/code&gt;&amp;nbsp;statements. In fact, these&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;case&lt;/code&gt;&amp;nbsp;statements aren’t even really statements, they’re like labels and the&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;switch&lt;/code&gt;&amp;nbsp;is a goto call. In fact, you could even compare&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;case&lt;/code&gt;&amp;nbsp;statements with the&amp;nbsp;&lt;a href=&quot;http://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vn99/index.html&quot; style=&quot;background: transparent; box-sizing: border-box; color: #0288d1; text-decoration: none;&quot;&gt;astonishing FORTRAN 77 ENTRY statement&lt;/a&gt;, a device whose mystery is only exceeded by its power.&lt;/div&gt;
&lt;div pid=&quot;38&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
This means that the variable&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;final int j&lt;/code&gt;&amp;nbsp;is defined for all the different cases, regardless if we issue a&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;break&lt;/code&gt;&amp;nbsp;or not. Not very intuitive. Which is why it’s always a good idea to create a new, nested scope per&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;case&lt;/code&gt;&amp;nbsp;statement via a simple&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;block&lt;/em&gt;. (but don’t forget the&amp;nbsp;&lt;code style=&quot;background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-size: 13px; padding: 2px 4px;&quot;&gt;break&lt;/code&gt;&amp;nbsp;within the block!)&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; clear: both; color: #262626; font-family: ProximaNova; font-size: 25px; font-weight: 400; line-height: 1.2; margin-bottom: 5px; margin-top: 20px;&quot;&gt;
Conclusion&lt;/h3&gt;
&lt;div pid=&quot;39&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
Paranoid programming may seem weird at times, as code often turns out to be a bit more verbose than really needed. You might think, “oh this is never gonna happen”, but as I said. After 20 years or so programming, you just don’t want to fix those stupid little unnecessary bugs anymore that exist only because the language is so old and flawed. Because you know…&lt;/div&gt;
&lt;div pid=&quot;43&quot; style=&quot;background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; line-height: 1.45; margin-bottom: 10px; padding-top: 0px;&quot;&gt;
&lt;span class=&quot;f-video-editor fr-fvn&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/oO3YmT2d-8k&quot; style=&quot;box-sizing: border-box;&quot; width=&quot;420&quot;&gt;&lt;/iframe&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;f-video-editor fr-fvn&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;f-video-editor fr-fvn&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div pid=&quot;2&quot; style=&quot;-webkit-text-stroke-width: 0px; background-color: white; box-sizing: border-box; color: #262626; font-family: NotoSerifRegular; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.45; margin-bottom: 10px; orphans: auto; padding-top: 0px; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
Re-print from:&amp;nbsp;&lt;a href=&quot;https://dzone.com/users/845183/lukas.eder%40gmail.com.html&quot; ng-href=&quot;/users/845183/lukas.eder%40gmail.com.html&quot; style=&quot;background: rgb(241, 242, 242); box-sizing: border-box; color: #0288d1; font-family: ProximaNova, Helvetica, Arial, sans-serif; font-size: 16.8px; line-height: 24.36px; text-decoration: none;&quot;&gt;&lt;img class=&quot;avatar&quot; ng-src=&quot;https://secure.gravatar.com/avatar/eb96efa7a5664ba1c4ebf586abd4121f?d=identicon&amp;amp;r=PG&quot; src=&quot;https://secure.gravatar.com/avatar/eb96efa7a5664ba1c4ebf586abd4121f?d=identicon&amp;amp;r=PG&quot; style=&quot;border: 0px; box-sizing: border-box; cursor: move; height: auto; margin-right: 7px; max-width: 100%; vertical-align: middle; width: 50px;&quot; width=&quot;32&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;a class=&quot;ng-binding ng-isolate-scope&quot; data-original-title=&quot;&quot; href=&quot;https://dzone.com/users/845183/lukas.eder%40gmail.com.html&quot; ng-href=&quot;/users/845183/lukas.eder%40gmail.com.html&quot; popup-data=&quot;{user: author.id}&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #0288d1; font-size: 19px; text-decoration: none;&quot; th-popup=&quot;users.profile.mini&quot; title=&quot;&quot;&gt;Lukas Eder&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span class=&quot;f-video-editor fr-fvn&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/4434137165637808926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2015/10/10-useful-yet-paranoid-java-programmer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/4434137165637808926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/4434137165637808926'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2015/10/10-useful-yet-paranoid-java-programmer.html' title='10 Useful, Yet Paranoid, Java Programmer Techniques'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/oO3YmT2d-8k/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-7447305353325696285</id><published>2015-04-24T02:40:00.002-07:00</published><updated>2015-04-24T02:47:17.842-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="book"/><category scheme="http://www.blogger.com/atom/ns#" term="data"/><category scheme="http://www.blogger.com/atom/ns#" term="git"/><category scheme="http://www.blogger.com/atom/ns#" term="github"/><category scheme="http://www.blogger.com/atom/ns#" term="processing"/><category scheme="http://www.blogger.com/atom/ns#" term="project"/><category scheme="http://www.blogger.com/atom/ns#" term="review"/><category scheme="http://www.blogger.com/atom/ns#" term="scala"/><category scheme="http://www.blogger.com/atom/ns#" term="spark"/><title type='text'>Fast data processing with spark - review</title><content type='html'>&lt;span style=&quot;color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6000003814697px;&quot;&gt;
Hi,&lt;br /&gt;
I&#39;ve got that book &lt;a href=&quot;http://www.amazon.com/Fast-Processing-Spark-Holden-Karau/dp/1782167064&quot; target=&quot;_blank&quot;&gt;&quot;Fast data processing with spark&quot;&lt;/a&gt; and yesterday I spend on reviewing it..&lt;br /&gt;
I will not go into deep details, just quick one: it was quite disappointing book:&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6000003814697px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6000003814697px;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;If you interested in one language (aka scala) then 1/3 of book is useless, as author is providing every example in 3 languages: scala/java/python.&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Together there are ... 2 examples, so not much to share/learn.&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Second example uses library that you cannot find anymore :-(, I mean - maybe if you spent more time to dig particular problem on geolocation - but do not use that book as geolocation solution. For general publicity not worth.&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Explanations what&#39;s going on on examples are really light - and this is me being polite.&amp;nbsp;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6000003814697px;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6000003814697px;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6000003814697px;&quot;&gt;Book: Not recommended.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6000003814697px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6000003814697px;&quot;&gt;
&lt;/span&gt;
&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6000003814697px;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6000003814697px;&quot;&gt;If you want to check &quot;working solution&quot; updated to 2015 code base with existing libraries, check my project on github:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6000003814697px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 25.6000003814697px;&quot;&gt;&lt;a href=&quot;https://github.com/yarenty/spark_data_processing&quot;&gt;https://github.com/yarenty/spark_data_processing&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 25.6000003814697px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6000003814697px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6000003814697px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/7447305353325696285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2015/04/fast-data-processing-with-spark-review.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/7447305353325696285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/7447305353325696285'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2015/04/fast-data-processing-with-spark-review.html' title='Fast data processing with spark - review'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-3409123259989383446</id><published>2015-03-25T06:47:00.001-07:00</published><updated>2018-02-07T08:09:16.623-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="api"/><category scheme="http://www.blogger.com/atom/ns#" term="cuda"/><category scheme="http://www.blogger.com/atom/ns#" term="example"/><category scheme="http://www.blogger.com/atom/ns#" term="GPU"/><category scheme="http://www.blogger.com/atom/ns#" term="graphics card"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="lwjgl"/><category scheme="http://www.blogger.com/atom/ns#" term="lwjgl3"/><category scheme="http://www.blogger.com/atom/ns#" term="opencl"/><category scheme="http://www.blogger.com/atom/ns#" term="scala"/><title type='text'>LWJGL3 - use GPU [OpenCL]  for multithreaded calculations</title><content type='html'>Lastly I spent some time investigating usage of GPU in computations, particularly nvidia CUDA. But during research I spent some time looking for other options, like OpenCL. So that brings me to this Lightweight Java Game Library.&lt;br /&gt;
&lt;br /&gt;
Short intro:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #555555; font-family: &#39;Fira Sans&#39;, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px;&quot;&gt;
LW&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;JGL&lt;/span&gt;&amp;nbsp;is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (&lt;a href=&quot;https://www.opengl.org/&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration: none;&quot;&gt;OpenGL&lt;/a&gt;), audio (&lt;a href=&quot;http://www.openal.org/&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration: none;&quot;&gt;OpenAL&lt;/a&gt;) and parallel computing (&lt;a href=&quot;https://www.khronos.org/opencl/&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration: none;&quot;&gt;OpenCL&lt;/a&gt;) applications. This access is direct and high-performance, yet also wrapped in a type-safe and user-friendly layer, appropriate for the Java ecosystem. LW&lt;span style=&quot;background-color: transparent; box-sizing: border-box; font-weight: 700;&quot;&gt;JGL&lt;/span&gt;&amp;nbsp;is an enabling technology and provides low-level access. It is not a framework and does not provide higher-level utilities than what the native libraries expose. As such, novice programmers are encouraged to try one of the frameworks or game engines that make use of LWJGL, before working directly with the library.&lt;span style=&quot;background-color: transparent;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
And after quick look - you can get the same amount of access to all part of GPU as you can on JCUDA ( using CUDA of course ;-) ).&lt;br /&gt;
&lt;br /&gt;
Here is simple OpenCL example &amp;nbsp;updated to use LWJGL3:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;package com.yarenty.lwjgl3;

import org.lwjgl.opencl.CLUtil;
import org.lwjgl.BufferUtils;
import org.lwjgl.PointerBuffer;

import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.util.List;

import org.lwjgl.opencl.CL;
import org.lwjgl.opencl.CLCreateContextCallback;
import org.lwjgl.opencl.CLDevice;
import org.lwjgl.opencl.CLPlatform;

import static org.lwjgl.opencl.CL10.*;
import static org.lwjgl.opencl.CLUtil.checkCLError;
import static org.lwjgl.system.MemoryUtil.NULL;
import static org.lwjgl.system.MemoryUtil.memDecodeUTF8;
 
public class OpenCLSum {
    // The OpenCL kernel
    static final String source =
        &quot;kernel void sum(global const float *a, global const float *b, global float *answer) { &quot;
        + &quot;  unsigned int xid = get_global_id(0); &quot;
        + &quot;  answer[xid] = a[xid] + b[xid];&quot;
        + &quot;}&quot;;
 
    // Data buffers to store the input and result data in
    static final FloatBuffer a = toFloatBuffer(new float[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10});
    static final FloatBuffer b = toFloatBuffer(new float[]{9, 8, 7, 6, 5, 4, 3, 2, 1, 0});
    static final FloatBuffer answer = BufferUtils.createFloatBuffer(a.capacity());
 
    
 private static final CLCreateContextCallback CREATE_CONTEXT_CALLBACK = new CLCreateContextCallback() {
  @Override
  public void invoke(long errinfo, long private_info, long cb, long user_data) {
   System.err.println(&quot;[LWJGL] cl_create_context_callback&quot;);
   System.err.println(&quot;\tInfo: &quot; + memDecodeUTF8(errinfo));
  }
 };
    
    public static void main(String[] args) throws Exception {
     
     System.setProperty(&quot;org.lwjgl.opencl.explicitInit&quot;,&quot;true&quot;);
     
     
        // Initialize OpenCL and create a context and command queue
        CL.create();
        System.out.println(&quot;CL created&quot;);
        
        CLPlatform platform = CLPlatform.getPlatforms().get(0);
        System.out.println(&quot;Platform created&quot;);

        PointerBuffer ctxProps = BufferUtils.createPointerBuffer(3);
  ctxProps.put(CL_CONTEXT_PLATFORM).put(platform).put(0).flip();
  System.out.println(&quot;CTX created&quot;);
  
  
        IntBuffer errcode_ret = BufferUtils.createIntBuffer(1);
  System.out.println(&quot;ERRCODE created&quot;);

        
        List&lt;cldevice&gt; devices = platform.getDevices(CL_DEVICE_TYPE_GPU);
       // long context = clCreateContext(platform, devices, null, null, null);
  long context = clCreateContext(ctxProps, devices.get(0).getPointer(), CREATE_CONTEXT_CALLBACK, NULL, errcode_ret);
  System.out.println(&quot;CONTEXT created&quot;);

  
  checkCLError(errcode_ret);
        //CLCommandQueue queue = clCreateCommandQueue(context, devices.get(0), CL_QUEUE_PROFILING_ENABLE, null);
        long queue = clCreateCommandQueue(context, devices.get(0).getPointer(), CL_QUEUE_PROFILING_ENABLE, errcode_ret);
  System.out.println(&quot;Command Q created&quot;);

        // Allocate memory for our two input buffers and our result buffer
        long aMem = clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR, a, null);
        //long buffer = clCreateBuffer(context, CL_MEM_READ_ONLY, 128, errcode_ret);
  System.out.println(&quot;A Buffer created&quot;);
        clEnqueueWriteBuffer(queue, aMem, 1, 0, a, null, null);
        long bMem = clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR, b, null);
  System.out.println(&quot;B Buffer created&quot;);
        clEnqueueWriteBuffer(queue, bMem, 1, 0, b, null, null);
        long answerMem = clCreateBuffer(context, CL_MEM_WRITE_ONLY | CL_MEM_COPY_HOST_PTR, answer, null);
  System.out.println(&quot;OUTPUT Buffer created&quot;);
        clFinish(queue);
 
        // Create our program and kernel
        long program = clCreateProgramWithSource(context, source, null);
  System.out.println(&quot;PROGRAM created&quot;);

     //public static int clBuildProgram(long program, long device, CharSequence options, CLProgramCallback pfn_notify, long user_data) {

      
        CLUtil.checkCLError(clBuildProgram(program, devices.get(0).getPointer(), &quot;&quot;, null, 0L));
        // sum has to match a kernel method name in the OpenCL source
        long kernel = clCreateKernel(program, &quot;sum&quot;, null);
  System.out.println(&quot;KERNEL created&quot;);

        // Execution our kernel
        PointerBuffer kernel1DGlobalWorkSize = BufferUtils.createPointerBuffer(1);
        System.out.println(&quot;KERNEL work size created&quot;);
        kernel1DGlobalWorkSize.put(0, a.capacity());
        System.out.println(&quot;KERNEL work size copied&quot;);
        
        clSetKernelArg1p(kernel, 0, aMem);
        clSetKernelArg1p(kernel, 1, bMem);
        clSetKernelArg1p(kernel, 2, answerMem);
        
  System.out.println(&quot;Args send to kernel&quot;);

        clEnqueueNDRangeKernel(queue, kernel, 1, null, kernel1DGlobalWorkSize, null, null, null);
        System.out.println(&quot;KERNEL queued created&quot;);
        
        
        // Read the results memory back into our result buffer
        clEnqueueReadBuffer(queue, answerMem, 1, 0, answer, null, null);
        System.out.println(&quot;and output ... created&quot;);
        
        clFinish(queue);
        // Print the result memory
        print(a);
        System.out.println(&quot;+&quot;);
        print(b);
        System.out.println(&quot;=&quot;);
        print(answer);
 
        // Clean up OpenCL resources
        clReleaseKernel(kernel);
        clReleaseProgram(program);
        clReleaseMemObject(aMem);
        clReleaseMemObject(bMem);
        clReleaseMemObject(answerMem);
        clReleaseCommandQueue(queue);
        clReleaseContext(context);
        CL.destroy();
    }
 
 
    /** Utility method to convert float array to float buffer
     * @param floats - the float array to convert
     * @return a float buffer containing the input float array
     */
    static FloatBuffer toFloatBuffer(float[] floats) {
        FloatBuffer buf = BufferUtils.createFloatBuffer(floats.length).put(floats);
        buf.rewind();
        return buf;
    }
 
 
    /** Utility method to print a float buffer
     * @param buffer - the float buffer to print to System.out
     */
    static void print(FloatBuffer buffer) {
        for (int i = 0; i &amp;lt; buffer.capacity(); i++) {
            System.out.print(buffer.get(i)+&quot; &quot;);
        }
        System.out.println(&quot;&quot;);
    }
 
}
&lt;/cldevice&gt;&lt;/pre&gt;
&lt;br /&gt;
and you can find full scala project here:&amp;nbsp;&lt;a href=&quot;https://github.com/yarenty/scala_lwjgl3&quot;&gt;https://github.com/yarenty/scala_lwjgl3&lt;/a&gt;

&lt;iframe src=&quot;https://rcm-eu.amazon-adsystem.com/e/cm?o=8&amp;p=44&amp;l=ur1&amp;category=games&amp;banner=1K23EMVQ4N186HRR2Y02&amp;f=ifr&amp;linkID=061f876de61941d3c0b19c3243c8813e&amp;t=yarenty-21&amp;tracking_id=yarenty-21&quot; width=&quot;100&quot; height=&quot;70&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/3409123259989383446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2015/03/lwjgl3-use-gpu-opencl-for-multithreaded.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/3409123259989383446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/3409123259989383446'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2015/03/lwjgl3-use-gpu-opencl-for-multithreaded.html' title='LWJGL3 - use GPU [OpenCL]  for multithreaded calculations'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-4488947562074002122</id><published>2015-03-20T03:43:00.002-07:00</published><updated>2015-03-20T03:46:57.081-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="base"/><category scheme="http://www.blogger.com/atom/ns#" term="configuration"/><category scheme="http://www.blogger.com/atom/ns#" term="default"/><category scheme="http://www.blogger.com/atom/ns#" term="git"/><category scheme="http://www.blogger.com/atom/ns#" term="gitignore"/><category scheme="http://www.blogger.com/atom/ns#" term="lifehack"/><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><category scheme="http://www.blogger.com/atom/ns#" term="pom"/><category scheme="http://www.blogger.com/atom/ns#" term="sbt"/><category scheme="http://www.blogger.com/atom/ns#" term="scala"/><title type='text'>Defaults - base start configurations for new projects.</title><content type='html'>Every single time I&#39;m starting new projects there is time which I spent on &quot;organising&quot; stuff:&lt;br /&gt;
- for maven create initial pom.xml&lt;br /&gt;
- for scala &amp;nbsp;- build.sbt&lt;br /&gt;
- or define gitignore for different type of projects.&lt;br /&gt;
I know that there is some handy tools like gitignore generators, etc...&lt;br /&gt;
Tell you truth every single time I finish with going through all my previous projects and trying to find something close to the one that I&#39;m doing at the moment. Then look into libraries to find if there are some new ones worth upgrading ... &amp;nbsp;Yes, i know it could be fun, but ...&lt;br /&gt;
&lt;br /&gt;
Finally I decided to do some life hack and have my BASE DEFAULTS - &amp;nbsp;I created this project: &amp;nbsp;&lt;a href=&quot;https://github.com/yarenty/DEFAULTS&quot;&gt;https://github.com/yarenty/DEFAULTS&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
And hope I will keep them updated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PS: Apart standard one I&#39;m keeping stuff like &quot;must install in new eclipse&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Findbugs:&lt;br /&gt;http://findbugs.cs.umd.edu/eclipse&lt;br /&gt;PMD:&lt;br /&gt;http://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/&lt;br /&gt;Checkstyle:&lt;br /&gt;http://eclipse-cs.sourceforge.net/update/&lt;br /&gt;or new marketplace version:&lt;br /&gt;http://eclipse-cs.sourceforge.net/&lt;/blockquote&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/4488947562074002122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2015/03/defaults-base-start-configurations-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/4488947562074002122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/4488947562074002122'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2015/03/defaults-base-start-configurations-for.html' title='Defaults - base start configurations for new projects.'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-8120807729309775450</id><published>2015-02-04T05:42:00.001-08:00</published><updated>2015-10-29T06:15:07.655-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="conversion"/><category scheme="http://www.blogger.com/atom/ns#" term="design"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="pixels to em"/><category scheme="http://www.blogger.com/atom/ns#" term="px to em"/><category scheme="http://www.blogger.com/atom/ns#" term="responsive"/><category scheme="http://www.blogger.com/atom/ns#" term="table"/><category scheme="http://www.blogger.com/atom/ns#" term="website"/><title type='text'>Quick PX to EM conversion table for responsive web layouts</title><content type='html'>This is simple table to remember or to do automatic replace when you&#39;ll go from old non-responsive design to responsive one.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Just one tip: when you&#39;ll replace automatically start from the biggest number ;-)&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1px&quot; class=&quot;table&quot; style=&quot;border-collapse: collapse; border: 1px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th style=&quot;width: 5em;&quot;&gt;px&lt;/th&gt;&lt;th style=&quot;width: 8em;&quot;&gt;em&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;1 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.0625 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;2 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.125 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;3 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.1875 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;4 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.25 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;5 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.3125 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;6 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.375 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;7 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.4375 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;8 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.5 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;9 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.5625 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;10 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.625 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;11 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.6875 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;12 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.75 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;13 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.8125 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;14 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.875 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;15 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;0.9375 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;16 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.0 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;17 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.0625 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;18 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.125 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;19 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.1875 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;20 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.25 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;21 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.3125 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;22 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.375 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;23 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.4375 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;24 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.5 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;25 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.5625 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;26 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.625 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;27 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.6875 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;28 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.75 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;29 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.8125 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;30 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.875 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;31 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;1.9375 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;32 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;2.0 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;33 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;2.0625 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;34 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;2.125 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;35 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;2.1875 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;36 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;2.25 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;37 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;2.3125 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;38 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;2.375 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;39 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;2.4375 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;40 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;2.5 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;50 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;3.125 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;80 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;5.0 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;100 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;6.25 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;120 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;7.5 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;640 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;40.0 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;920 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;57.5 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;right&quot; width=&quot;5em&quot;&gt;960 px &lt;/td&gt;&lt;td align=&quot;right&quot;&gt;60.0 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/8120807729309775450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2015/02/quick-px-to-em-table-for-responsive-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/8120807729309775450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/8120807729309775450'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2015/02/quick-px-to-em-table-for-responsive-web.html' title='Quick PX to EM conversion table for responsive web layouts'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-3793791929380484325</id><published>2014-12-16T11:22:00.001-08:00</published><updated>2014-12-16T11:22:09.304-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="apple"/><category scheme="http://www.blogger.com/atom/ns#" term="connection"/><category scheme="http://www.blogger.com/atom/ns#" term="timecapsule"/><category scheme="http://www.blogger.com/atom/ns#" term="tip"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Ubuntu 14.04 + apple time capsule</title><content type='html'>&lt;br /&gt;&lt;b&gt;Finally got access to time capsule.&amp;nbsp;&lt;/b&gt;&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;1) install libraries:&lt;div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
sudo apt-get install libgcrypt11 libgcrypt11-dev libgmp3-dev readline-common libreadline6 libreadline6-dev libfuse2 libfuse-dev libncurses5-dev &lt;/blockquote&gt;
&lt;br /&gt;2) download &lt;a href=&quot;http://sourceforge.net/projects/afpfs-ng/files/afpfs-ng/0.8.1/afpfs-ng-0.8.1.tar.bz2/download&quot;&gt;afpfs (link here)&lt;/a&gt; &lt;br /&gt;3) unarchive afpfs ( &lt;b&gt;tar -xzvf&lt;/b&gt; ) &lt;br /&gt;4) navigate to afpfs (cd afpfs*) &lt;br /&gt;5) you will have to patch the afpfs because it has a bug in ubuntu 12.04 /13.04 and still in 14.04:&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
wget -O offset.diff &lt;a href=&quot;https://bugzilla.redhat.com/attachment.cgi?id=397155&quot;&gt;https://bugzilla.redhat.com/attachment.cgi?id=397155&lt;/a&gt; &amp;amp;&amp;amp; patch -p1 &amp;lt; offset.diff&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
wget -O afpfs-ng-0.8.1-pointer.patch&lt;a href=&quot;https://bugzilla.redhat.com/attachment.cgi?id=505576&quot;&gt;https://bugzilla.redhat.com/attachment.cgi?id=505576&lt;/a&gt; &amp;amp;&amp;amp; patch -p1 &amp;lt; afpfs-ng-0.8.1-pointer.patch &lt;/blockquote&gt;
6) supposing you are in afpfs folder you archived:&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
sudo configure --prefix=/usr&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
sudo make install &lt;/blockquote&gt;
7) now you should be able to connect to your timecapsule using this:&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
mkdir ~/capsule&lt;/blockquote&gt;
8) Command for MOUNT:&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
mount_afp afp://user:password@server_host_or_ip/Data ~/capsule&lt;/blockquote&gt;
9)Command for UNMOUNT:&lt;/div&gt;
&lt;div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
afp_client unmount ~/capsule &lt;/blockquote&gt;
&lt;br /&gt;&lt;br /&gt;You should see a “capsule” folder in your home folder.&lt;br /&gt;In my case Time Capsule stands on 10.0.1.1&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Thanks to &lt;a href=&quot;https://alexmuntean.wordpress.com/2013/09/14/ubuntu-13-04-how-to-connect-to-time-capsule/&quot; target=&quot;_blank&quot;&gt;alex!&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/3793791929380484325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2014/12/ubuntu-1404-apple-time-capsule.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/3793791929380484325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/3793791929380484325'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2014/12/ubuntu-1404-apple-time-capsule.html' title='Ubuntu 14.04 + apple time capsule'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-4819247668226679957</id><published>2014-12-10T20:00:00.000-08:00</published><updated>2016-04-29T01:50:46.749-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="csv"/><category scheme="http://www.blogger.com/atom/ns#" term="db"/><category scheme="http://www.blogger.com/atom/ns#" term="importer"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="processor"/><category scheme="http://www.blogger.com/atom/ns#" term="sbt"/><category scheme="http://www.blogger.com/atom/ns#" term="scala"/><title type='text'>Scala1: Scala is craaazy </title><content type='html'>I finished scala course provided by&amp;nbsp;&lt;em style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;Martin Odersky.&amp;nbsp;&lt;/em&gt;&amp;nbsp;And just want to test them in some real case scenario. I had quite easy task: there is csv file, with headers, which need to be imported to database. Normal times when I used java I prepared myself for few days of coding. Typical steps are:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;csv: find/list java csv processing libraries&lt;/li&gt;
&lt;li&gt;csv: read / investigate few of them&lt;/li&gt;
&lt;li&gt;csv: start playing, when one do not work as expected - check another one&lt;/li&gt;
&lt;li&gt;db: fight with proper driver&lt;/li&gt;
&lt;li&gt;db: find how to connect&lt;/li&gt;
&lt;li&gt;db: prepare statements/sqls/ etc..&lt;/li&gt;
&lt;li&gt;finally connect csv+db into one solution, and make it work smoothly&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
And after few days I would have working solution with probably few hundred lines of code...(not to mention tests/documentation).&lt;br /&gt;
&lt;br /&gt;
In scala (and I am novice):&lt;br /&gt;
&amp;nbsp; 1. created my single object &quot;importer.scala&quot;&lt;br /&gt;
&amp;nbsp; 2. whole csv solution finished with adding to my build.sbt file single line:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
libraryDependencies += &quot;com.github.tototoshi&quot; %% &quot;&lt;span class=&quot;s1&quot;&gt;scala&lt;/span&gt;-&lt;span class=&quot;s1&quot;&gt;csv&lt;/span&gt;&quot; % &quot;1.1.2&quot;&lt;/blockquote&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
as my csv file using &quot;;&quot; as separator I put :&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &lt;span class=&quot;s1&quot;&gt;implicit&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;object&lt;/span&gt; MyFormat &lt;span class=&quot;s1&quot;&gt;extends&lt;/span&gt; DefaultCSVFormat {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;delimiter&lt;/span&gt;: Char = &lt;span class=&quot;s3&quot;&gt;&#39;;&#39;&lt;/span&gt;&amp;nbsp; }&lt;/blockquote&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
then to main function I added 2 lines of code:&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;s1&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;reader&lt;/span&gt; = CSVReader&lt;span class=&quot;s3&quot;&gt;.open(&lt;/span&gt;&quot;myfile.csv&quot;&lt;span class=&quot;s3&quot;&gt;)&lt;/span&gt;(MyFormat)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;s1&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;full&lt;/span&gt; = &lt;span class=&quot;s2&quot;&gt;reader&lt;/span&gt;.allWithHeaders&lt;/blockquote&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
and ... that is it - whole csv solution done in less than 15 mins! (and yes in java I also used sbt like solution - i.e.:maven)&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; 3. DB part:&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
Connection - again to build.sbt, added just one line (I&#39;m using MySQL):&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
libraryDependencies += &quot;&lt;span class=&quot;s1&quot;&gt;mysql&lt;/span&gt;&quot; % &quot;&lt;span class=&quot;s1&quot;&gt;mysql&lt;/span&gt;-connector-java&quot; % &quot;5.1.34&quot;&lt;/blockquote&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
.. &amp;nbsp;and again to main function just added&amp;nbsp;database connection&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;dbc&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; = &lt;/span&gt;&quot;jdbc:mysql://localhost:3306/mydb?user=me&amp;amp;password=123&quot;&lt;br /&gt;
&lt;span class=&quot;s1&quot;&gt;&amp;nbsp; &amp;nbsp; Class.forName(&lt;/span&gt;&quot;com.mysql.jdbc.Driver&quot;&lt;span class=&quot;s1&quot;&gt;)&lt;/span&gt;&amp;nbsp; &amp;nbsp; &lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span class=&quot;s2&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;s3&quot;&gt;conn&lt;/span&gt; = DriverManager.getConnection(&lt;span class=&quot;s3&quot;&gt;dbc&lt;/span&gt;)&lt;/blockquote&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
and coding ... lets go ;-) :&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;s2&quot;&gt;try&lt;/span&gt; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s3&quot;&gt;full&lt;/span&gt;.foreach(fields =&amp;gt; processFields(fields, &lt;span class=&quot;s3&quot;&gt;conn&lt;/span&gt;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; } &lt;span class=&quot;s2&quot;&gt;finally&lt;/span&gt; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s3&quot;&gt;conn&lt;/span&gt;.close&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;/blockquote&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
I know that I could do everything inside &quot;full.foreach&quot; but I had some old java habits to create methods for different actions... so I just added processFields function.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;span class=&quot;s1&quot;&gt;def&lt;/span&gt; processFields(in: Map[String, String], conn: java.sql.Connection) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;l&lt;/span&gt;: MutableList[String] = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; MutableList[String]()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; field&lt;span class=&quot;s3&quot;&gt;Types&lt;/span&gt;.foreach(f =&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;l&lt;/span&gt; += (in.get(f).get).replace(&lt;span class=&quot;s4&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;&quot;&lt;/span&gt;, &lt;span class=&quot;s4&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;\\\&quot;&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;&quot;&lt;/span&gt;))&lt;br /&gt;
&lt;span class=&quot;s6&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;s6&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;s6&quot;&gt; = &lt;/span&gt;&quot;INSERT INTO temp_products (&quot;&lt;span class=&quot;s6&quot;&gt; + &lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;myTypes&lt;/span&gt;&lt;span class=&quot;s6&quot;&gt;.mkString(&lt;/span&gt;&quot;,&quot;&lt;span class=&quot;s6&quot;&gt;) +&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s4&quot;&gt;&quot;) VALUES ( &quot;&lt;/span&gt; + &lt;span class=&quot;s4&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;&quot;&lt;/span&gt; + &lt;span class=&quot;s2&quot;&gt;l&lt;/span&gt;.mkString(&lt;span class=&quot;s4&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;&quot;&lt;/span&gt;) + &lt;span class=&quot;s4&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;)&quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;prep&lt;/span&gt; = conn.prepareStatement(&lt;span class=&quot;s2&quot;&gt;sql&lt;/span&gt;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;prep&lt;/span&gt;.executeUpdate&lt;br /&gt;
&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;/blockquote&gt;
&lt;br /&gt;
As you see I had issue with [&quot;] sign - which sometimes appeared inside csv fields.&lt;br /&gt;
This is plain/native sql - and whole solution takes me less than 2 hours.&lt;br /&gt;
&lt;br /&gt;
Must say: I was little disappointed with ... so little effort to make things work.&lt;br /&gt;
And all I had is 60 lines of code - I really don&#39;t see reason to write comments/documentation as this is so obvious (if you know scala) that basically anything more will be overhead.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;In next post I will show you about slick - proper DB/ORM mapping in scala and .. how easy is to do reverse engineering - generate objects from DB tables and do some crazy sqls without sql ;-)&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/4819247668226679957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2014/12/scala1-scala-is-craaazy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/4819247668226679957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/4819247668226679957'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2014/12/scala1-scala-is-craaazy.html' title='Scala1: Scala is craaazy '/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-4081036789235241458</id><published>2014-10-09T05:37:00.000-07:00</published><updated>2014-10-14T14:38:00.575-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adaptive-images"/><category scheme="http://www.blogger.com/atom/ns#" term="development"/><category scheme="http://www.blogger.com/atom/ns#" term="geolocation"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="jQM"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQueryMobile"/><category scheme="http://www.blogger.com/atom/ns#" term="media"/><category scheme="http://www.blogger.com/atom/ns#" term="mobile"/><category scheme="http://www.blogger.com/atom/ns#" term="modernizr"/><category scheme="http://www.blogger.com/atom/ns#" term="phonegap"/><category scheme="http://www.blogger.com/atom/ns#" term="responsive"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><category scheme="http://www.blogger.com/atom/ns#" term="touch"/><category scheme="http://www.blogger.com/atom/ns#" term="tricks"/><category scheme="http://www.blogger.com/atom/ns#" term="website"/><title type='text'>Websites - Mobile Development</title><content type='html'>Few tools and tricks for mobile website development - very RAW info.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Simulators&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Android AVD Manager&lt;/li&gt;
&lt;li&gt;Blackberry Ripple Emulator&lt;/li&gt;
&lt;li&gt;Opera Mobile&lt;/li&gt;
&lt;li&gt;Windows Phone Emulator&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h2&gt;
IDE&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Aptana&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h2&gt;
Validation tools&lt;/h2&gt;
&lt;a href=&quot;http://validator.w3.org/&quot;&gt;http://validator.w3.org&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;W3C HTML5 validator&lt;/li&gt;
&lt;li&gt;W3C CSS Validation Service&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Debugging tools&lt;/h2&gt;
Most browsers (F12 ;-) ) &amp;nbsp;+ Chrome, Firefox and OperaMobile support remote debugging&lt;br /&gt;
To stay sane: get your site working with a desktop browser and emulator then test on real devices.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Responsive Web Design&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Fluid layout width - layouts that resize to fit in the available screen space&lt;/li&gt;
&lt;li&gt;Media queries - load different CSS depend on screen size&lt;/li&gt;
&lt;li&gt;flexible images and media - to suit screen size and bandwidth&lt;/li&gt;
&lt;li&gt;typesetting: use em or % instead px&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h3&gt;
Box Problem&lt;/h3&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
.borderBox *&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; -moz-box-sizing:border-box;&lt;br /&gt;
&amp;nbsp; -webkit-box-sizing:border-box;&lt;br /&gt;
&amp;nbsp; box-sizing:border-box;&lt;br /&gt;
}&lt;/blockquote&gt;
&lt;h3&gt;
RWD Formula&lt;/h3&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
result = target/context&lt;br /&gt;
25px (target) / 16px (context) = 150% (result) =&amp;gt; 1.5 em&amp;nbsp;&lt;/blockquote&gt;
&lt;h2&gt;
CSS reset&lt;/h2&gt;
Reset style sheets between different browsers (for consistency):&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Eric Meyer&#39;s Reset&lt;/li&gt;
&lt;li&gt;HTML5 Doctor CSS Reset&lt;/li&gt;
&lt;li&gt;Yahoo! Reset CSS&lt;/li&gt;
&lt;li&gt;Normalize.css&lt;/li&gt;
&lt;/ul&gt;
&lt;a href=&quot;http://cssreset.com/&quot;&gt;http://cssreset.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Media queries&lt;/h2&gt;
@media screen and (max-width: 479px) {&lt;br /&gt;
&amp;nbsp;# header-logo {&lt;br /&gt;
&amp;nbsp; &amp;nbsp;width:75%&lt;br /&gt;
&amp;nbsp; &amp;nbsp;margin: 0 auto 0 } }&lt;br /&gt;
@media screen and (max-width: 737px) {&lt;br /&gt;
&amp;nbsp;# header-logo {&lt;br /&gt;
&amp;nbsp; &amp;nbsp;width:100%&lt;br /&gt;
&amp;nbsp; &amp;nbsp;margin: 0 0 0 0 } }&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Support good across browsers, except IE ( from IE9+) - use respond.js to emulate:&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://github.com/scottjehl/Respond&quot;&gt;https://github.com/scottjehl/Respond&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
Screen widths&lt;/h2&gt;
&amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, user-scalable=yes, initial-scale=1.0&quot; /&amp;gt;&lt;br /&gt;
+ css:&lt;br /&gt;
@viewport {&lt;br /&gt;
&amp;nbsp; width: device-width;&lt;br /&gt;
&amp;nbsp; zoom: 1.0;&lt;br /&gt;
&amp;nbsp; user-zoom: zoom;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
ICON&lt;/h2&gt;
&lt;div&gt;
&lt;a href=&quot;http://realfavicongenerator.net/&quot;&gt;http://realfavicongenerator.net/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Responsive Navigation Menus&lt;/h2&gt;
&lt;a href=&quot;http://speckyboy.com/2012/08/29/10-responsive-navigation-solutions-and-tutorials/&quot;&gt;http://speckyboy.com/2012/08/29/10-responsive-navigation-solutions-and-tutorials/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Images&lt;/h2&gt;
&lt;div&gt;
Prevent media from overflowing it&#39;s container:&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
img,embed,object, video {&lt;br /&gt;
&amp;nbsp; max.width: 100%&lt;br /&gt;
}&lt;/blockquote&gt;
&amp;nbsp;for IE:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&amp;lt;!-- [if IE&amp;lt;=8]&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;ie-style.css&quot;/&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
img.rwd { width:100%; height:auto; }&lt;/blockquote&gt;
&lt;h2&gt;
Image Adaption&lt;/h2&gt;
&lt;h3&gt;
Server-Side&lt;/h3&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;WURFL&lt;/li&gt;
&lt;li&gt;Adaptive images ( &lt;a href=&quot;http://adaptive-images.com/&quot;&gt;http://adaptive-images.com&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h3&gt;
Client-Side&lt;/h3&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;HiSRC jQuery plugin &lt;a href=&quot;https://github.com/teleject/hisrc&quot;&gt;https://github.com/teleject/hisrc&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Picturefill &lt;a href=&quot;https://github.com/scottjehl/picturefill&quot;&gt;https://github.com/scottjehl/picturefill&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h3&gt;
HTML5 &amp;lt;picture&amp;gt; element&lt;/h3&gt;
Supported in older browsers by Picturefill script&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;lt;picture&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;source media=&quot;(min-width: 45em)&quot; srcset=&quot;large.jpg&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;source media=&quot;(min-width: 18em)&quot; srcset=&quot;med.jpg, med-hd.jpg 2x&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;source srcset=&quot;small.jpg&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;img src=&quot;small.jpg&quot; alt=&quot;some text&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;p&amp;gt;some text&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/picture&amp;gt;&lt;/blockquote&gt;
&lt;h2&gt;
JQuery Mobile - jQM&lt;/h2&gt;
&lt;div&gt;
Gallery: &lt;a href=&quot;http://www.jqmgallery.com/&quot;&gt;http://www.jqmgallery.com&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
data-role:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;page&lt;/li&gt;
&lt;li&gt;header&lt;/li&gt;
&lt;li&gt;content&lt;/li&gt;
&lt;li&gt;footer&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
ThemeRoller: &lt;a href=&quot;http://jquerymobile.com/themeroller&quot;&gt;http://jquerymobile.com/themeroller&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Modernizr&lt;/h2&gt;
&lt;div&gt;
Open-source JavaScript feature-detection library http://modernizr.com&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
if (Modernizr.touch) { // code for toechscreen&lt;br /&gt;
} else { // no touchscreen&lt;br /&gt;
}&lt;/blockquote&gt;
&lt;div&gt;
Modernizr.localStorage (sessionStorage)&lt;/div&gt;
&lt;div&gt;
Modernizr.geolocation&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data.setCurrentLocation = function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if (Modernizr.geolocation) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;navigator.geolocation.getCurrentPosition(data.geoSuccess, data.geoError);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; } else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; data.geoError(&#39;not supported&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data.geoSuccess = &amp;nbsp;function (position) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;var s = document.querySelector(&#39;#status&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;if (s.className == &#39;success&#39;) { //Firefox fix&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;s.className = &#39;success&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;data.currentLatLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; var myOptions = {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;zoom: 15,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;center: data.currentLatLng,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;mapTypeControl: true,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;mapTypeId: google.maps.MapTypeId.ROADMAP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;};&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;data.currentLocationMap = new google.maps.Map(document.getElementById(&quot;map_canvas&quot;), myOptions);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;var currentPositionMarker = new google.maps.Marker({&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;map: data.currentLocationMap,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;position: data.currentLatLng&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;});&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;};&lt;/blockquote&gt;
&lt;/div&gt;
&lt;h2&gt;
Links&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage&quot;&gt;HTML 5 Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.w3.org/Style/CSS/&quot;&gt;CSS3 Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.mozilla.org/en-US/docs/JavaScript&quot;&gt;JavaScript Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://jquery.com/&quot;&gt;JQuery API Reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://jquerymobile.com/test/docs/api&quot;&gt;JQuery Mobile API Reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://docs.phonegap.com/en/2.0.0/guide_getting-started_index.md.html#Getting%20Started%20Guides&quot;&gt;PhoneGap Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.blackberry.com/html5/documentation/whats_ripple_1885566_11.html&quot;&gt;Blackberry Ripple Emulator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blackberry.github.com/WebWorks-Samples/kitchenSink/&quot;&gt;Blackberry Kitchen Sink App&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.tricedesigns.com/category/cordova/&quot;&gt;Ripple Emulator Usage Article&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://jquerymobile.com/themeroller/index.php/&quot;&gt;jQuery Mobile Theme Roller&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/4081036789235241458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2014/10/websites-mobile-development.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/4081036789235241458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/4081036789235241458'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2014/10/websites-mobile-development.html' title='Websites - Mobile Development'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540055556049926997.post-8008500420863540754</id><published>2014-09-08T07:19:00.000-07:00</published><updated>2024-06-06T12:51:31.787-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cuda"/><category scheme="http://www.blogger.com/atom/ns#" term="integration"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="links"/><title type='text'>CUDA - Java integration</title><content type='html'>The last time I worked with CUDA was 3 years ago, and the only option to integrate was by using a bridge through C -&amp;gt; JNI (or JNI-like). Now I did some quick research on possibilities that are there and ... there are lots of them.&lt;br /&gt;
&lt;br /&gt;
There are existing 3 types of integration:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;(Byte)code translation and OpenCL code generation&lt;/li&gt;
&lt;li&gt;Language extensions&lt;/li&gt;
&lt;li&gt;Java OpenCL/CUDA binding libraries&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
(Byte)code translation and OpenCL code generation&lt;/h3&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;a href=&quot;http://code.google.com/p/aparapi/&quot;&gt;http://code.google.com/p/aparapi/&lt;/a&gt;&lt;/b&gt; : An open-source library that is created and actively maintained by AMD. In a special &quot;Kernel&quot; class, one can override a specific method that should be executed in parallel. The byte code of this method is loaded at runtime using its own bytecode reader. The code is translated into OpenCL code, which is then compiled using the OpenCL compiler. The result can then be executed on the OpenCL device, which may be a GPU or a CPU. If the compilation into OpenCL is not possible (or no OpenCL is available), the code will still be executed in parallel, using a Thread Pool.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/pcpratts/rootbeer1&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;https://github.com/pcpratts/rootbeer1&lt;/b&gt; &lt;/a&gt;: An open-source library for converting parts of Java into CUDA programs. It offers dedicated interfaces that may be implemented to indicate that a certain class should be executed on the GPU. In contrast to Aparapi, it tries to automatically serialize the &quot;relevant&quot; data (that is, the complete relevant part of the object graph!) into a representation that is suitable for the GPU.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href=&quot;http://code.google.com/p/java-gpu/&quot;&gt;http://code.google.com/p/java-gpu/&lt;/a&gt; &lt;/b&gt;: A library for translating annotated Java code (with some limitations) into CUDA code, which is then compiled into a library that executes the code on the GPU. The Library was developed in the context of a PhD thesis, which contains profound background information about the translation process.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href=&quot;http://code.google.com/p/scalacl/&quot;&gt;http://code.google.com/p/scalacl/&lt;/a&gt;&lt;/b&gt; : Scala bindings for OpenCL. Allows special Scala collections to be processed in parallel with OpenCL. The functions that are called on the elements of the collections can be usual Scala functions (with some limitations) which are then translated into OpenCL kernels.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Language extensions&lt;/h3&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;a href=&quot;http://www.ateji.com/px/index.html&quot;&gt;http://www.ateji.com/px/index.html&lt;/a&gt; &lt;/b&gt;: A language extension for Java that allows parallel constructs (e.g. parallel for loops, OpenMP style) which are then executed on the GPU with OpenCL. Unfortunately, this very promising project is no longer maintained.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href=&quot;http://www.habanero.rice.edu/Publications.html&quot;&gt;http://www.habanero.rice.edu/Publications.html&lt;/a&gt;&lt;/b&gt; (JCUDA) : A library that can translate special Java Code (called JCUDA code) into Java- and CUDA-C code, which can then be compiled and executed on the GPU. However, the library does not seem to be publicly available.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href=&quot;https://www2.informatik.uni-erlangen.de/EN/research/JavaOpenMP/index.html&quot; target=&quot;_blank&quot;&gt;https://www2.informatik.uni-erlangen.de/EN/research/JavaOpenMP/index.html &lt;/a&gt;:&lt;/b&gt; Java language extension for for OpenMP constructs, with a CUDA backend&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Java OpenCL/CUDA binding libraries&lt;/h3&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;a href=&quot;http://jcuda.org/&quot;&gt;http://jcuda.org/&lt;/a&gt;&lt;/b&gt; : Java bindings for CUDA: Low-level bindings that are a 1:1 mapping of the original CUDA API&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href=&quot;http://jocl.org/&quot;&gt;http://jocl.org/&lt;/a&gt;&lt;/b&gt; : Java bindings for OpenCL: Low-level bindings that are a 1:1 mapping of the original OpenCL API&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href=&quot;http://code.google.com/p/javacl/&quot;&gt;http://code.google.com/p/javacl/ &lt;/a&gt;&lt;/b&gt;: Java bindings for OpenCL: An object-oriented OpenCL library, based on auto-generated low-level bindings&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href=&quot;http://jogamp.org/jocl/www/&quot;&gt;http://jogamp.org/jocl/www/&lt;/a&gt; &lt;/b&gt;: Java bindings for OpenCL: An object-oriented OpenCL library, based on auto-generated low-level bindings&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href=&quot;http://www.lwjgl.org/&quot;&gt;http://www.lwjgl.org/ &lt;/a&gt;&lt;/b&gt;: Java bindings for OpenCL: Auto-generated low-level bindings and object-oriented convenience classes&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://yarenty.blogspot.com/feeds/8008500420863540754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yarenty.blogspot.com/2014/09/cuda-java-integration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/8008500420863540754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540055556049926997/posts/default/8008500420863540754'/><link rel='alternate' type='text/html' href='http://yarenty.blogspot.com/2014/09/cuda-java-integration.html' title='CUDA - Java integration'/><author><name>YarentY</name><uri>http://www.blogger.com/profile/15996364725457138571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnwM0beeKL1C9rx2Igh-uGliV4gqa8MM6a-dul0UXvc4w9wfZ7S67qHnUUNrblivf-8dAcZTHNNP6iTjFyQtl2bHQ28NGnuruMC0B7BY1K79Si1KheHlcSE-UMVNEtNOE/s220/jaro2.jpg'/></author><thr:total>0</thr:total></entry></feed>