<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Code intoxicated</title>
    <link>https://cristian.io/</link>
    <description>Recent content on Code intoxicated</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <copyright>&amp;copy; 2017 | Powered by &lt;a href=&#34;http://gohugo.io&#34; target=&#34;_blank&#34;&gt;Hugo&lt;/a&gt; ♥ | Art by &lt;a href=&#34;http://etc.usf.edu/clipart/&#34;&gt;Clip Art ETC&lt;/a&gt;</copyright>
    <lastBuildDate>Thu, 02 Jun 2022 10:21:10 -0700</lastBuildDate>
    
	<atom:link href="https://cristian.io/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Annotated examples of paperd.ink programs</title>
      <link>https://cristian.io/post/annotated-paperd-ink/</link>
      <pubDate>Thu, 02 Jun 2022 10:21:10 -0700</pubDate>
      
      <guid>https://cristian.io/post/annotated-paperd-ink/</guid>
      <description>A couple of weeks I got a paperd.ink display. I must confess I bought it on impulse. I am a sucker for EInk tech. But upon receiving it I realized I just don&amp;rsquo;t know how to code for it. So I decided to embark on a masochistic journey through the world of embedded programming, mainly by reading the source code of the few examples available.
As I was going through that, I thought it would be fruitful for me and potentially others to annotate, as best as I can, the different components of the code that make up a program for this display/board.</description>
    </item>
    
    <item>
      <title>paperd.ink - notes from a non-expert</title>
      <link>https://cristian.io/post/paperd.ink/</link>
      <pubDate>Thu, 19 May 2022 13:11:02 -0700</pubDate>
      
      <guid>https://cristian.io/post/paperd.ink/</guid>
      <description>I am a sucker for E Ink displays. So when I saw https://paperd.ink/ I joined the waiting list immediately, even though I don&amp;rsquo;t know much about hardware.
I got my dev kit yesterday and so far managed to run some sample apps, and learned some things along the way. This post is a note to myself aiming at reinforcing the lessons learned, but might be useful to others new to this.</description>
    </item>
    
    <item>
      <title>Blender Texture</title>
      <link>https://cristian.io/post/blender-texture/</link>
      <pubDate>Tue, 15 Mar 2022 15:12:12 -0700</pubDate>
      
      <guid>https://cristian.io/post/blender-texture/</guid>
      <description>A post for myself. Something I forget to do everytime. Not anymore:
Here&amp;rsquo;s a step by step of how to apply a texture to a 3d model using Blender.
0. Create model or import STL 1. Remesh Open the Object Data Properties menu, then Remesh, choose the appropriate Voxel Size, and click Voxel Remesh.
To check if this worked, go to Edit mode (Tab), and zoom into the model. You should see it has thousands of faces.</description>
    </item>
    
    <item>
      <title>macondo: making Docker-wrapped applications easier to run</title>
      <link>https://cristian.io/post/macondo/</link>
      <pubDate>Wed, 30 Dec 2020 11:18:17 -0800</pubDate>
      
      <guid>https://cristian.io/post/macondo/</guid>
      <description>I found this article and it reminded me of a tool I wrote a couple of months ago called macondo.
In this post, I will try to explain what it is, why I wrote it and some of the drawbacks I&amp;rsquo;ve found. I am not trying to justify its existence of it or even suggesting this is the right way of doing things. I haven&amp;rsquo;t decided whether I like it or not.</description>
    </item>
    
    <item>
      <title>Kotlin&#39;s .copy() gotcha... when Java is better</title>
      <link>https://cristian.io/post/kotlin-copy/</link>
      <pubDate>Tue, 29 Dec 2020 16:00:40 -0800</pubDate>
      
      <guid>https://cristian.io/post/kotlin-copy/</guid>
      <description>Kotlin&amp;rsquo;s data classes are cool. They are the recommended way of replacing POJOs and it is usually recommended to use them with vals so the classes are immutable.
They come with a handy copy() method that &amp;ldquo;clones&amp;rdquo; the data class, which can also be parameterized with any named argument, so the new object has all the fields of the original class + the overridden fields. So far so good.
How does Kotlin&amp;rsquo;s copy() work under the hood?</description>
    </item>
    
    <item>
      <title>Tools I use</title>
      <link>https://cristian.io/post/tools/</link>
      <pubDate>Mon, 30 Nov 2020 22:12:49 -0800</pubDate>
      
      <guid>https://cristian.io/post/tools/</guid>
      <description>It should be no mystery that tooling is a big part of anyone working with computers. They can make a huge impact on your workflow and productivity.
I decided to maintain a list of the tools I feel define my workflow, focusing on the tools that I don&amp;rsquo;t see used as much by my peers (e.g. I don&amp;rsquo;t list my browser or anything commonplace):
  NixOS
I used macOS heavily for at least 7 years.</description>
    </item>
    
    <item>
      <title>YouTube flagged me so I built a Telegram bot to proxy/watch videos</title>
      <link>https://cristian.io/post/youtube-telegram/</link>
      <pubDate>Mon, 10 Aug 2020 20:31:19 -0700</pubDate>
      
      <guid>https://cristian.io/post/youtube-telegram/</guid>
      <description>TLDR;  I use ad blockers. YouTube flagged my account and devices. I can only watch around 1 in 4 videos. So I wrote a Telegram bot that receives YouTube URLs and replies back with the video.
 The problem I use adblockers to have a semi-decent experience on the Internet. I mainly use UBlock Origin plus some DNS ones. One nice feature of UBlock Origin is that it does block ads from YouTube videos.</description>
    </item>
    
    <item>
      <title>Automatic work session recordings with OBS Studio &#43; TaskWarrior &#43; TimeWarrior &#43; YouTube</title>
      <link>https://cristian.io/post/auto-screencasts/</link>
      <pubDate>Wed, 03 Jun 2020 15:27:18 -0700</pubDate>
      
      <guid>https://cristian.io/post/auto-screencasts/</guid>
      <description>Hacker News discussion
Not long ago I read a comment on Hacker News about tips to improve one&amp;rsquo;s performance as a developer; it recommended a system of recording oneself while working and someone suggested uploading the videos to YouTube (as private or unlisted) for future revision and as a backup.
I liked the idea so I wanted to give it a try myself. Of course, like most of the stuff I do, the practicality of it was not as important as the chance to see how I would implement a system to support such workflow.</description>
    </item>
    
    <item>
      <title>Include versions in published POM file when using Gradle platforms (BOM)</title>
      <link>https://cristian.io/post/gradle-publish-bom/</link>
      <pubDate>Wed, 20 May 2020 20:25:36 -0700</pubDate>
      
      <guid>https://cristian.io/post/gradle-publish-bom/</guid>
      <description>Gradle platforms are a nice feature introduced back in Gradle 5. They allow you to align the versions of the dependencies across multiple projects by declaring them explicitly in a &amp;ldquo;platform module&amp;rdquo;. This is no more than Gradle implementing Maven&amp;rsquo;s BOM (bill of materials) pattern.
This post is not intended to sell you the idea of Gradle platforms. In fact, it assumes familiarity with this feature.
Instead, we will discuss one of the downsides and a potential solution: when publishing an artifact that uses a platform, the generated POM file will not, by default, include the version numbers of the transitive dependencies.</description>
    </item>
    
    <item>
      <title>Mentorship</title>
      <link>https://cristian.io/post/mentorship/</link>
      <pubDate>Mon, 03 Jun 2019 15:27:18 -0700</pubDate>
      
      <guid>https://cristian.io/post/mentorship/</guid>
      <description>I enjoy mentoring too. If you need need some engineering mentoring, especially around Java (and other JVM languages), data engineering (Flink, Presto, etc.), backend engineering, infra (Kubernetes, Docker, etc.), please send me an email or contact me via telegram at https://t.me/casidiablo.
Sessions price can vary depending on the topic, but it goes for around 80USD/hr.</description>
    </item>
    
    <item>
      <title>[RedisConf 2018] Slides of my presentation on ReBloom</title>
      <link>https://cristian.io/post/redisconf-2018/</link>
      <pubDate>Thu, 26 Apr 2018 19:03:10 -0700</pubDate>
      
      <guid>https://cristian.io/post/redisconf-2018/</guid>
      <description>You can download the slides here:
Leaveraing Bloom Filters on Redis</description>
    </item>
    
    <item>
      <title>Connect to VPN using Pritunl &#43; auto 2FA</title>
      <link>https://cristian.io/post/pritunl/</link>
      <pubDate>Sat, 21 Apr 2018 21:45:52 -0700</pubDate>
      
      <guid>https://cristian.io/post/pritunl/</guid>
      <description>At work we use Pritunl to connect to the office VPN. This process involves entering a password and a two factor authentication token.
Tired of manually connecting using the graphical user interface and pulling my phone to get a new 2FA every time, I went ahead and tried to automate the process.
It turns out that, in Linux, Pritunl offers two clients: CLI and GTK. Using the CLI one, once you have imported the VPN profile, you can connect to a VPN like this:</description>
    </item>
    
    <item>
      <title>Idempotence layer on bloom filters</title>
      <link>https://cristian.io/post/bloom-filters/</link>
      <pubDate>Tue, 10 Apr 2018 22:35:03 -0700</pubDate>
      
      <guid>https://cristian.io/post/bloom-filters/</guid>
      <description>TLDR: we run several applications consuming multiple real-time streams. These applications implement idempotence using Redis sets. In this post I describe our journey moving to bloom filters (using the ReBloom module), which brought down our memory usage by almost 10x.
 Let&amp;rsquo;s briefly define idempotence:
An operation is said to be idempotent when applying it multiple times has the same effect.
There are some reasons why applications consuming a real-time stream must have an idempotence layer, e.</description>
    </item>
    
    <item>
      <title>So... I have an album on Spotify</title>
      <link>https://cristian.io/post/code-intoxication/</link>
      <pubDate>Fri, 30 Mar 2018 16:07:34 -0700</pubDate>
      
      <guid>https://cristian.io/post/code-intoxication/</guid>
      <description>First of all, let me clarify something: I&amp;rsquo;m not a musician. I don&amp;rsquo;t even know the difference between DO and RE. I&amp;rsquo;m a human just like you (unless you are some future alien reading this, in which case all I can say is: cool), so I like music. And using a synthesizer is rather easy to create your own, so I did it, and it&amp;rsquo;s live and feels great.</description>
    </item>
    
    <item>
      <title>Find self-references in (possibly nested) collections</title>
      <link>https://cristian.io/post/no-self-reference/</link>
      <pubDate>Fri, 16 Mar 2018 21:37:49 -0700</pubDate>
      
      <guid>https://cristian.io/post/no-self-reference/</guid>
      <description>I found a nice trick reading part of the ElasticSearch client for Java.
Say you are given an object (could be a map, a list, an array or anything) and you need to make sure the same reference does not show up in any of the children objects (or theirs).
Here is how this the ElasticSearch guys solved this problem:
static void ensureNoSelfReferences(Object value) { ensureNoSelfReferences(value, Collections.newSetFromMap(new IdentityHashMap&amp;lt;&amp;gt;())); } static void ensureNoSelfReferences(final Object value, final Set&amp;lt;Object&amp;gt; ancestors) { if (value !</description>
    </item>
    
    <item>
      <title>Mutability and Java 8&#39;s method references</title>
      <link>https://cristian.io/post/method-reference/</link>
      <pubDate>Mon, 12 Mar 2018 11:46:23 -0700</pubDate>
      
      <guid>https://cristian.io/post/method-reference/</guid>
      <description>Method references is a nice feature introduced in Java 8. It lets you make your lambdas even more concise:
// from... someStream .map(item -&amp;gt; obj.someMethod(item)) .moreStuff... // to... someStream .map(obj::someMethod) .moreStuff... Some linting tools will even suggest you replace your lambdas with method references but, watch out, that sometimes have some unadverted consequences.
For instance, this is a piece of actual code I was working one:
private List&amp;lt;Application&amp;gt; applications() { return applications .</description>
    </item>
    
    <item>
      <title>Merge multi-project test coverage: Gradle &#43; Jacoco &#43; Sonarqube</title>
      <link>https://cristian.io/post/sonar-coverage/</link>
      <pubDate>Thu, 08 Mar 2018 05:32:58 -0800</pubDate>
      
      <guid>https://cristian.io/post/sonar-coverage/</guid>
      <description>I&amp;rsquo;m assuming you got here because you are using Gradle with Jacoco and noticed that integrating it with Sonarqube does not work perfectly out of the box. Specifically, when your project has multiple modules, you might have seen that Sonarqube&amp;rsquo;s coverage report ignores code in module A covered by tests in module B.
In fact, this is a problem that you will find even if you are not using Sonarqube: Jacoco itself will not merge test reports by default, which makes it extra hard to find a solution online.</description>
    </item>
    
    <item>
      <title>Send Flink&#39;s logs to ElasticSearch using Log4j</title>
      <link>https://cristian.io/post/flink-log4j/</link>
      <pubDate>Wed, 29 Nov 2017 03:10:23 -0800</pubDate>
      
      <guid>https://cristian.io/post/flink-log4j/</guid>
      <description>Flink uses slf4j as its logging façade, and log4j as the default logging framework (they support logback too). Logs are accessible via Flink&amp;rsquo;s UI in the JobManager tab which is good for short-lived jobs but unusable for long-lived, streaming applications. You probably want your logs out of there somewhere else; here&amp;rsquo;s how you can send them to ElasticSearch so you can access them, say, with Kibana.
First, you will need a log4j binding for ElasticSearch; Downfy/log4j-elasticsearch-java-api seems to do the job.</description>
    </item>
    
    <item>
      <title>Paste multi-line commands in Scala&#39;s REPL</title>
      <link>https://cristian.io/post/paste/</link>
      <pubDate>Thu, 16 Nov 2017 16:43:14 -0800</pubDate>
      
      <guid>https://cristian.io/post/paste/</guid>
      <description>Use :paste
scala&amp;gt; :paste // Entering paste mode (ctrl-D to finish) </description>
    </item>
    
    <item>
      <title>Shuffle or pick random lines from a file</title>
      <link>https://cristian.io/post/shuf/</link>
      <pubDate>Mon, 13 Nov 2017 10:35:18 -0800</pubDate>
      
      <guid>https://cristian.io/post/shuf/</guid>
      <description>There comes a day in the life a developer when one needs to choose random lines from a text file. This is useful for a myriad of reasons, like taking a random sample of a CSV file, or shuffling the code of your coworkers, just for fun.
There are multiple tools in the UNIX toolbox to solve this problem, but the shuf utility is by far the most elegant:
# shuffles a file and prints to stdout shuf file # pick 100 random lines from a file shuf file -n 100 There&amp;rsquo;s also sort which has a --random-sort flag.</description>
    </item>
    
    <item>
      <title>Customizing pyspark app start up script</title>
      <link>https://cristian.io/post/custom-pyspark/</link>
      <pubDate>Fri, 10 Nov 2017 00:00:00 +0000</pubDate>
      
      <guid>https://cristian.io/post/custom-pyspark/</guid>
      <description>A nice feature of pyspark applications is that you don&amp;rsquo;t have to use spark-submit manually. Instead, when you instantiate a SparkContext instance, it will take care of running spark-submit ... pyspark-shell for you.
Sometimes, however, you may want to customize that launch a bit. For instance, it is useful to tell spark-submit to include specific libraries in the classpath; which is in and of itself a pretty cool feature because you can provide Maven coordinates.</description>
    </item>
    
    <item>
      <title>JVM notes</title>
      <link>https://cristian.io/post/jvm/</link>
      <pubDate>Fri, 03 Nov 2017 20:16:43 -0700</pubDate>
      
      <guid>https://cristian.io/post/jvm/</guid>
      <description>A class file consists of bytecode and a symbol table There are two kinds of types: primitives and references Reference types can be either a dynamically allocated class instance or an array. There is no way to distinguish primitive types within bytecode except for the operands used to manipulate them. Each operand has a different version depending on the type: e.g.: iadd, ladd, fadd and dadd are addition operands for int, long, float and double.</description>
    </item>
    
    <item>
      <title>the incident &#39;might&#39; make an agreeable break to the routine of the day</title>
      <link>https://cristian.io/post/might/</link>
      <pubDate>Fri, 29 Sep 2017 00:26:32 -0700</pubDate>
      
      <guid>https://cristian.io/post/might/</guid>
      <description>Min 39, sec 48
  </description>
    </item>
    
    <item>
      <title>Plantasia</title>
      <link>https://cristian.io/post/plantasia/</link>
      <pubDate>Thu, 14 Sep 2017 20:02:02 -0500</pubDate>
      
      <guid>https://cristian.io/post/plantasia/</guid>
      <description>A piece of art from Mort Garson. A good companion for when you need to go there. Happy trip!
  </description>
    </item>
    
    <item>
      <title>Estimate Gas when using Oraclize</title>
      <link>https://cristian.io/post/estimate-gas/</link>
      <pubDate>Tue, 12 Sep 2017 09:57:49 -0500</pubDate>
      
      <guid>https://cristian.io/post/estimate-gas/</guid>
      <description>Ethereum transactions require you to pay a fee that is measured with gas. Every instruction executed by the EVM costs a certain amount of gas, so before queuing your transaction, you have to specify a gas limit and a gas price. That gas is paid in ether, so for example, if your transaction has a gas limit of 82470 and your gas price is, say, 1 Gwei (0.000000001 ΞTH), then the cost of the transaction would be:</description>
    </item>
    
    <item>
      <title>God bless Kovan (and Parity)</title>
      <link>https://cristian.io/post/kovan/</link>
      <pubDate>Mon, 11 Sep 2017 13:03:34 -0500</pubDate>
      
      <guid>https://cristian.io/post/kovan/</guid>
      <description>Learning a new technology is always a daunting task, specially when in its early stages. Ethereum is one of such technologies and, soon enough, after starting your journey you get a lot of new terminology/projects thrown at you: Solidity, MetaMask, Mist, Serpent, Rinkeby, Ropsten, Kovan, Parity, Truffle, Geth, etc, etc.
As you start wrapping your head around some of those new concepts it is common to focus on specific parts of the whole technology.</description>
    </item>
    
    <item>
      <title>The Rabbit Hole</title>
      <link>https://cristian.io/post/hello/</link>
      <pubDate>Sun, 10 Sep 2017 00:00:00 +0000</pubDate>
      
      <guid>https://cristian.io/post/hello/</guid>
      <description>It seems like no matter how much experience I gain as a developer, and as a human being, time to time I end up going deep into some rabbit hole. This time, in one of those deadly spirals of random clicking on the net I ended up learning about Ethereum. How did I get from there to creating Hugo-based blog hosted on the InterPlanetary File System? I thought I was done with blogging.</description>
    </item>
    
  </channel>
</rss>