<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Slavius</title>
    <description>The latest articles on DEV Community by Slavius (@slavius).</description>
    <link>https://dev.to/slavius</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F90948%2F907b52f3-89d3-4461-b127-4e7ceab4dc6a.jpg</url>
      <title>DEV Community: Slavius</title>
      <link>https://dev.to/slavius</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/slavius"/>
    <language>en</language>
    <item>
      <title>TIL: Java SpringBoot vs. Asp.Net REST API performance</title>
      <dc:creator>Slavius</dc:creator>
      <pubDate>Sat, 10 Sep 2022 22:47:52 +0000</pubDate>
      <link>https://dev.to/slavius/til-java-springboot-vs-aspnet-rest-api-performance-jm2</link>
      <guid>https://dev.to/slavius/til-java-springboot-vs-aspnet-rest-api-performance-jm2</guid>
      <description>&lt;h1&gt;
  
  
  TIL: Java Spring boot vs. Asp.Net REST API performance
&lt;/h1&gt;

&lt;p&gt;Today I learned (#til) something about Java SpringBoot and Asp.Net performance.&lt;/p&gt;

&lt;p&gt;I was testing an upcoming .Net 7 release and its Minimal APIs and I was amazed by the speed. So I decided to compare it to Java 18 SpringBoot project.&lt;/p&gt;

&lt;p&gt;The finding was that Asp.Net 7 solution is almost 2x as fast as SpringBoot application on Java 18!&lt;/p&gt;

&lt;h2&gt;
  
  
  Here are the results
&lt;/h2&gt;

&lt;p&gt;Asp.Net 7 Minimal APIs delivers 4,084,163 requests in 30s compared to 2,152,070 request per 30s in case of SpringBoot Java 18 application!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Java 18 SpringBoot&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ k6 run --vus 16 --duration 30s config.json

          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io

  execution: local
     script: config.json
     output: -

  scenarios: (100.00%) 1 scenario, 16 max VUs, 1m0s max duration (incl. graceful stop):
           * default: 16 looping VUs for 30s (gracefulStop: 30s)


running (0m30.0s), 00/16 VUs, 2152070 complete and 0 interrupted iterations
default ✓ [======================================] 16 VUs  30s

     data_received..................: 373 MB  12 MB/s
     data_sent......................: 392 MB  13 MB/s
     http_req_blocked...............: avg=1.61µs   min=441ns   med=942ns    max=2.39ms p(90)=1.53µs   p(95)=1.75µs
     http_req_connecting............: avg=308ns    min=0s      med=0s       max=1.55ms p(90)=0s       p(95)=0s
     http_req_duration..............: avg=180.65µs min=114.4µs med=170.42µs max=4.11ms p(90)=202.21µs p(95)=216.99µs
       { expected_response:true }...: avg=180.65µs min=114.4µs med=170.42µs max=4.11ms p(90)=202.21µs p(95)=216.99µs
     http_req_failed................: 0.00%   ✓ 0            ✗ 2152070
     http_req_receiving.............: avg=22.51µs  min=4.59µs  med=20.95µs  max=3.95ms p(90)=32.44µs  p(95)=39.5µs
     http_req_sending...............: avg=6.3µs    min=2.63µs  med=5.61µs   max=3.03ms p(90)=8.87µs   p(95)=9.59µs
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s       max=0s     p(90)=0s       p(95)=0s
     http_req_waiting...............: avg=151.83µs min=92.24µs med=142.39µs max=3.43ms p(90)=172.73µs p(95)=187.11µs
     http_reqs......................: 2152070 71733.676043/s
     iteration_duration.............: avg=218.91µs min=138.9µs med=207.65µs max=4.54ms p(90)=244.87µs p(95)=263.15µs
     iterations.....................: 2152070 71733.676043/s
     vus............................: 16      min=16         max=16
     vus_max........................: 16      min=16         max=16
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Asp.Net 7&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ k6 run --vus 16 --duration 30s config.json

          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io

  execution: local
     script: config.json
     output: -

  scenarios: (100.00%) 1 scenario, 16 max VUs, 1m0s max duration (incl. graceful stop):
           * default: 16 looping VUs for 30s (gracefulStop: 30s)


running (0m30.0s), 00/16 VUs, 4084163 complete and 0 interrupted iterations
default ✓ [======================================] 16 VUs  30s

     data_received..................: 845 MB  28 MB/s
     data_sent......................: 743 MB  25 MB/s
     http_req_blocked...............: avg=1.06µs   min=431ns   med=972ns    max=2.48ms p(90)=1.41µs   p(95)=1.62µs
     http_req_connecting............: avg=0ns      min=0s      med=0s       max=66.6µs p(90)=0s       p(95)=0s
     http_req_duration..............: avg=74.37µs  min=30.59µs med=67.84µs  max=7.33ms p(90)=91.37µs  p(95)=106.97µs
       { expected_response:true }...: avg=74.37µs  min=30.59µs med=67.84µs  max=7.33ms p(90)=91.37µs  p(95)=106.97µs
     http_req_failed................: 0.00%   ✓ 0             ✗ 4084163
     http_req_receiving.............: avg=13.64µs  min=4.43µs  med=12.72µs  max=7.05ms p(90)=17.75µs  p(95)=19.44µs
     http_req_sending...............: avg=6.36µs   min=2.77µs  med=5.96µs   max=5.83ms p(90)=8.24µs   p(95)=8.96µs
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s       max=0s     p(90)=0s       p(95)=0s
     http_req_waiting...............: avg=54.35µs  min=19.55µs med=48.45µs  max=5.34ms p(90)=70.1µs   p(95)=83.96µs
     http_reqs......................: 4084163 136135.973692/s
     iteration_duration.............: avg=113.11µs min=56.58µs med=105.71µs max=7.9ms  p(90)=133.41µs p(95)=153.52µs
     iterations.....................: 4084163 136135.973692/s
     vus............................: 16      min=16          max=16
     vus_max........................: 16      min=16          max=16
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Details
&lt;/h2&gt;

&lt;p&gt;The goal was to test simple HTTP POST API that takes JSON body, deserializes it, modifies the values and returns serialized JSON response back.&lt;/p&gt;

&lt;p&gt;The request and response objects are identical but represented by different classes. Modification of data is simple concatenation of strings and addition to integer value.&lt;/p&gt;

&lt;p&gt;For Asp.Net project a preview7 of .Net 7 was used, for Java counterpart a new SpringBoot project with &lt;code&gt;spring-boot-starter-web&lt;/code&gt; and &lt;code&gt;lombok&lt;/code&gt; as dependencies combined with Oracle OpenJDK 18.0.2.1&lt;/p&gt;

&lt;p&gt;The code is as follows:&lt;/p&gt;

&lt;h2&gt;
  
  
  Java 18 SpringBoot
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;pom.xml&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"&amp;gt;
    &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
    &amp;lt;parent&amp;gt;
        &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;spring-boot-starter-parent&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;2.7.3&amp;lt;/version&amp;gt;
        &amp;lt;relativePath/&amp;gt; &amp;lt;!-- lookup parent from repository --&amp;gt;
    &amp;lt;/parent&amp;gt;
    &amp;lt;groupId&amp;gt;com.example&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;RestApiDemo&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;0.0.1-SNAPSHOT&amp;lt;/version&amp;gt;
    &amp;lt;name&amp;gt;RestApiDemo&amp;lt;/name&amp;gt;
    &amp;lt;description&amp;gt;RestApiDemo&amp;lt;/description&amp;gt;
    &amp;lt;properties&amp;gt;
        &amp;lt;java.version&amp;gt;18&amp;lt;/java.version&amp;gt;
    &amp;lt;/properties&amp;gt;
    &amp;lt;dependencies&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;spring-boot-starter-web&amp;lt;/artifactId&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.projectlombok&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;lombok&amp;lt;/artifactId&amp;gt;
            &amp;lt;optional&amp;gt;true&amp;lt;/optional&amp;gt;
        &amp;lt;/dependency&amp;gt;

        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;spring-boot-starter-test&amp;lt;/artifactId&amp;gt;
            &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
        &amp;lt;/dependency&amp;gt;
    &amp;lt;/dependencies&amp;gt;

    &amp;lt;build&amp;gt;
        &amp;lt;plugins&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;spring-boot-maven-plugin&amp;lt;/artifactId&amp;gt;
            &amp;lt;/plugin&amp;gt;
        &amp;lt;/plugins&amp;gt;
    &amp;lt;/build&amp;gt;

&amp;lt;/project&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;RestApiDemoApplication.java&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.restapidemo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class RestApiDemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(RestApiDemoApplication.class, args);
    }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;InputModel.java&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.restapidemo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@AllArgsConstructor
public final class InputModel {
    String FirstName;
    String LastName;
    Integer Age;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;OutputModel.java&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.restapidemo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
@AllArgsConstructor
public final class OutputModel {
    String FirstName;
    String LastName;
    Integer Age;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;DemoController.java&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.restapidemo;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {

    @PostMapping("/get")
    @ResponseBody
    public OutputModel GetData(@RequestBody InputModel input) {
        return new OutputModel(input.FirstName + "x", input.LastName + "x", input.Age + 10);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Asp.Net 7
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Program.cs&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;using Microsoft.AspNetCore.Mvc;

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.MapPost("/get", ([FromBody] InputModel input) =&amp;gt; new OutputModel
    {
        FirstName = input.FirstName + "x",
        LastName = input.LastName + "x",
        Age = input.Age + 10
    }
);

app.Run();

internal sealed class InputModel
{
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public int Age { get; set; }
}

internal sealed class OutputModel
{
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public int Age { get; set; }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;K6.io config.json&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import http from 'k6/http';

export default function () {

  const url = 'http://localhost:8080/get';

  const payload = JSON.stringify({
    FirstName: 'John',
    LastName: 'Doe',
    Age: 33
  });

  const params = {
    headers: {
      'Content-Type': 'application/json',
    },
  };

  http.post(url, payload, params);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Testing first with CURL for response validity:&lt;br&gt;
&lt;strong&gt;Java 18 SpringBoot&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ curl -X POST http://localhost:8080/get -H "content-type: application/json" -d "{\"FirstName\":\"John\",\"LastName\":\"Doe\",\"Age\":33}"

{"firstName":"Johnx","lastName":"Doex","age":43}%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Asp.Net 7&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ curl -X POST http://localhost:8080/get -H "content-type: application/json" -d "{\"FirstName\":\"John\",\"LastName\":\"Doe\",\"Age\":33}"

{"firstName":"Johnx","lastName":"Doex","age":43}%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It seems Kestrel server with .Net 7 does a pretty decent job handling simple APIs compared to default Tomcat Server with Java 18 based SpringBoot application.&lt;/p&gt;

&lt;p&gt;Maybe someone can consider using this when deciding to implement simple REST API since the bare language is very similar until you decide to use some ORM framework or logging.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>java</category>
      <category>spring</category>
    </item>
    <item>
      <title>Wait for injectable service init() in Angular</title>
      <dc:creator>Slavius</dc:creator>
      <pubDate>Thu, 06 Aug 2020 14:12:55 +0000</pubDate>
      <link>https://dev.to/slavius/wait-for-injectable-service-init-in-angular-38l8</link>
      <guid>https://dev.to/slavius/wait-for-injectable-service-init-in-angular-38l8</guid>
      <description>&lt;p&gt;Hey Angularists,&lt;/p&gt;

&lt;p&gt;I'm learning Angular and I still cannot figure out one important thing to do properly.&lt;/p&gt;

&lt;p&gt;What I'm trying to achieve is to create global &lt;code&gt;@Inject&lt;/code&gt;able Service that has some initialization function that needs to finish before the Service should be used.&lt;/p&gt;

&lt;p&gt;Right now the Service does its initialization in the constructor, as AFAIK services do not use &lt;code&gt;ngOnInit()&lt;/code&gt; functions. Let's say the initialization calculates some random prime number which takes about 200ms to finish.&lt;/p&gt;

&lt;p&gt;Unfortunately when the Service is injected into a Component and a public function of the Service that's supposed to return this prime number is being called in the &lt;code&gt;onInit()&lt;/code&gt; of the Component the returned value is always &lt;code&gt;undefined&lt;/code&gt; as the constructor of that Service did not finish yet at that time.&lt;/p&gt;

&lt;p&gt;Of course if there would be some async function to call (e.g. an HttpClient) I would return a &lt;code&gt;Promise&lt;/code&gt; or &lt;code&gt;Observable&lt;/code&gt; and subscribe to it in the Component. However the constructor does not call any of it.&lt;/p&gt;

&lt;p&gt;I also tried &lt;code&gt;EventEmitter&lt;/code&gt; and emit &lt;code&gt;true&lt;/code&gt; at the end of the constructor work when the initialization is done while subscribing to it in the Component &lt;code&gt;OnInit&lt;/code&gt; function. This however does not work for me for some reason and it never receives the emitted event.&lt;/p&gt;

&lt;p&gt;I come from C# and I simply find it amusing that DI can provide you with an uninitialized object. ;)&lt;/p&gt;

&lt;p&gt;I found possible solution with &lt;code&gt;APP_INITIALIZER&lt;/code&gt; and ProviderFactory but I find it too complex so I wanted to know about other options.&lt;/p&gt;

&lt;p&gt;Any advice and help on how this should be &lt;strong&gt;properly handled&lt;/strong&gt; in Angular is welcome. Thanks in advance!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; I figured out that when I hide the property behind a function call &lt;code&gt;getPrime() { return this.prime; }&lt;/code&gt; it works. However it's still a mystery to me how a non-static property can be read before the constructor has finished...&lt;/p&gt;

</description>
      <category>help</category>
      <category>angular</category>
      <category>async</category>
    </item>
    <item>
      <title>Fixing issues running Folding@Home on Gentoo/Sabayon Linux</title>
      <dc:creator>Slavius</dc:creator>
      <pubDate>Fri, 10 Apr 2020 15:52:03 +0000</pubDate>
      <link>https://dev.to/slavius/fixing-issues-running-folding-home-on-gentoo-sabayon-linux-3e0n</link>
      <guid>https://dev.to/slavius/fixing-issues-running-folding-home-on-gentoo-sabayon-linux-3e0n</guid>
      <description>&lt;h1&gt;
  
  
  The problem
&lt;/h1&gt;

&lt;p&gt;Directly after installing Folding@Home (FaH from now on) on recent version of Sabayon Linux (based on Gentoo Linux) there are issues with OpenSSL libraries linked. One of the dependent packages installed is &lt;code&gt;openssl-compat&lt;/code&gt; which however is also too recent for ancient FaH client released in 2018.&lt;/p&gt;

&lt;h1&gt;
  
  
  Source of the problems
&lt;/h1&gt;

&lt;p&gt;Examining the original dependencies of FaH client is OpenSSL 1.0.1 while openssl-compat package includes version 1.0.2u which results in unrecoverable errors during FaH application runtime due to ABI changes.&lt;/p&gt;

&lt;h1&gt;
  
  
  The solution
&lt;/h1&gt;

&lt;p&gt;Solution is to install older OpenSSL libopenssl.so and libcrypto.so libraries. To avoid collisions with openssl-compat package, which can now be safely uninstalled (if you validate no other packages depend on it) by:&lt;code&gt;&lt;br&gt;
sudo equo rm --ask --nodeps openssl-compat&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
I opted to download OpenSSL 1.0.1 from GitHub repository, compile the shared libraries and install them inplace.&lt;/p&gt;

&lt;p&gt;This can be easily achieved by:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#clone GitHub repo&lt;/span&gt;
git clone https://github.com/openssl/openssl.git 
&lt;span class="nb"&gt;cd &lt;/span&gt;openssl 
&lt;span class="c"&gt;# switch to 1.0.1 branch&lt;/span&gt;
git checkout OpenSSL_1_0_1-stable 
&lt;span class="c"&gt;# configure with the same Sabayon system wide CFLAGS&lt;/span&gt;
&lt;span class="nv"&gt;CFLAG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"-O2 -march=x86-64 -pipe -fno-strict-aliasing -Wa,--noexecstack"&lt;/span&gt; ./Configure linux-x86_64 shared 
&lt;span class="c"&gt;# make libs only - libssl.so and libcrypto.so&lt;/span&gt;
make build_libs 
&lt;span class="c"&gt;# remove now invalid symlinks in FaH client folder&lt;/span&gt;
&lt;span class="nb"&gt;sudo rm&lt;/span&gt; –f /opt/foldingathome/libcrypto.so.10 /opt/foldingathome/libssl.so.10 
&lt;span class="c"&gt;# copy new libraries over&lt;/span&gt;
&lt;span class="nb"&gt;sudo cp&lt;/span&gt; ./libcrypto.so.1.0.0 /opt/foldingathome/libcrypto.so.10 
&lt;span class="nb"&gt;sudo cp&lt;/span&gt; ./libssl.so.1.0.0 /opt/foldingathome/libssl.so.10
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now running FaH client works correctly.&lt;/p&gt;

&lt;p&gt;Happy folding against COVID-19! Stay safe!&lt;/p&gt;

</description>
      <category>foldingathome</category>
      <category>linux</category>
      <category>ssl</category>
    </item>
    <item>
      <title>Brent Ozar offering free MSSQL courses</title>
      <dc:creator>Slavius</dc:creator>
      <pubDate>Mon, 16 Mar 2020 23:50:57 +0000</pubDate>
      <link>https://dev.to/slavius/brent-ozar-offering-free-mssql-courses-22lm</link>
      <guid>https://dev.to/slavius/brent-ozar-offering-free-mssql-courses-22lm</guid>
      <description>&lt;p&gt;[&lt;a href="https://mailchi.mp/brentozar/free-sql-server-training-during-the-quarantines?e=207f9bb421"&gt;https://mailchi.mp/brentozar/free-sql-server-training-during-the-quarantines?e=207f9bb421&lt;/a&gt;]&lt;br&gt;
Free training during the quarantine, even in the EU.&lt;/p&gt;

&lt;p&gt;Well, that escalated quickly, huh? Two months ago, I didn't know what a coronavirus was. Since then, it's gone through more name changes than the Microsoft certification program (well, maybe not that many) and we're canceling all our travel plans, restaurant reservations, and wondering why people think toilet paper gives them immunity.&lt;/p&gt;

&lt;p&gt;Every business seems to be emailing me their COVID-19 action plan, so I figure I should give y'all one, too. Here's my action plan: give away training to give you something to do.&lt;/p&gt;

&lt;p&gt;Fundamentals of Index Tuning:&lt;br&gt;
This class assumes you've already been through my How to Think Like the Engine class, which has always been free. After conquering that one:&lt;br&gt;
Indexing for the WHERE Clause&lt;br&gt;
Indexing for ORDER BY&lt;br&gt;
Indexing for JOINs&lt;br&gt;
Clippy's Index Recommendations&lt;br&gt;
Recap and Next Steps&lt;br&gt;
After finishing that one, you're ready for:&lt;/p&gt;

&lt;p&gt;Fundamentals of Query Tuning:&lt;br&gt;
Went live today: Building a Query Plan&lt;br&gt;
Goes live Tuesday: How to Find the Right Queries to Tune&lt;br&gt;
Weds: How Parameters Influence Cached Plans&lt;br&gt;
Thurs: Improving Cardinality Estimation Accuracy&lt;br&gt;
Fri: Common T-SQL Anti-Patterns&lt;br&gt;
Those videos will go away April 1, and if countries are still quarantined, I'll give away more fundamentals classes to keep amping up your skills. We're all in this together.&lt;/p&gt;

&lt;p&gt;Stay safe and be well.&lt;br&gt;
Brent&lt;/p&gt;

</description>
      <category>sql</category>
      <category>home</category>
      <category>learn</category>
    </item>
    <item>
      <title>The curious case of insecure HTTPS certificates</title>
      <dc:creator>Slavius</dc:creator>
      <pubDate>Fri, 09 Aug 2019 16:53:41 +0000</pubDate>
      <link>https://dev.to/slavius/the-curious-case-of-insecure-https-certificates-41pf</link>
      <guid>https://dev.to/slavius/the-curious-case-of-insecure-https-certificates-41pf</guid>
      <description>&lt;p&gt;This article is a first in series of explanations to all claims done by our former colleague that claimed he found numerous security and performance issues in our project shortly after joining our team.&lt;br&gt;
You can &lt;a href="https://dev.to/slavius/your-code-has-lots-of-security-and-performance-issues-he-said-24c7"&gt;find the preface here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Lets have a look at the first claim:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I guess that we transfer data from GUI to the API server probably with HTTPS , but this is not enough. Because a person can easily get a SSL certificate with DNS spoofing and listen to the packages. So the first thing is , We are sending our password for login or any other transaction as a plain text and then we will only encrypt it on DB. We must also encrypt the passwords on the client-side with another salt or another type of encryption when we want to send a request like LOGIN function. (recommend different salt for different customers)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;First question that should come to our minds is; why would everyone including huge international companies like Microsoft, Google, Mozilla and Intel invest so much time and money into developing support for HTTPS and SSL/TLS into basically all web browsers, improving SSL/TLS protocols with enhancements, bug and performance fixes, forming certification authorities and creating selling points of certificates for companies and individuals when based on this description it seems to be totally trivial to overcome the whole protection of SSL/TLS and certificate based security??? &lt;br&gt;
How would you justify in your company buying a $199 EV SSL certificate for just one site for one year if this would be true?&lt;/p&gt;

&lt;p&gt;Let's first start with how SSL certificates are obtained. Most certification authorities (from now on called CAs) require you to prove your personal identity to get basic certificates. This can be accomplished e.g. by validating and assigning your e-mail address to your CA account. For so called EV (Extended validation) certificates - that give you this well known "green lock" in the browser's URL bar, you need to undergo a more strict procedure in addition to the personal verification by e.g. faxing/photocopying a company certificate, address and/or validating your relationship by making a phone call from a phone-number associated with your company in public registry, or receiving a validation code using postal service delivered to your company postal address. This guarantees that nobody else without access to your e-mail, private company post box, office or phone device can validate him/her-self as company representative to gain EV validation for your company at the CA.&lt;/p&gt;

&lt;p&gt;Now that you have validated your person or company you need to actually prove you own the domain you'd like to get certificate for. Of course e.g. google.com domain is no more owned by Google company (it's now called Alphabet) so when you are validated as a company you are eligible to request any domain certificate not only one that matches your company name.&lt;br&gt;
For this purpose you have to alter the public DNS records or your HTTP server settings to return expected response to your CA request. E.g. you may be asked by your CA to set up a special DNS record with name d24ecd160f4443b5ba55374b15516fc3.yourdomain.com that points to their server or return specific TXT response; or that by visiting URL &lt;a href="http://yourdomain.com/d24ecd160f4443b5ba55374b15516fc3.txt"&gt;http://yourdomain.com/d24ecd160f4443b5ba55374b15516fc3.txt&lt;/a&gt; you present a content from a text file delivered to your previously validated e-mail address by the CA.&lt;br&gt;
This way only person that has access to the DNS management of your domain and a web server that your DNS records points to, is able to successfully validate certificate request by the CA.&lt;/p&gt;

&lt;p&gt;As you can see without extensive social engineering, wiretapping, breaking into someone offices or post box at the right time, hacking your DNS provider and server hosting it is quite hard to request a certificate to arbitrary domain name on someones behalf.&lt;/p&gt;

&lt;p&gt;Let's be honest and say that in the past, there were some incidents where due to human errors and heavy social engineering some less known, smaller CAs erroneously issued certificates for different company domains like Google. This can happen but it was soon discovered and corrected. In this case certificates must be invalidated (revoked) and new ones for affected sites re-issued. For this purpose each CA exposes so called Certificate Revocation List (CRL). These lists are checked by your browser by each time an access to certificate protected site is made, to disallow access to sites that are compromised and served with certificate already revoked by the CA.&lt;/p&gt;

&lt;p&gt;So now when we've explained how it is hard (not impossible) to fake a certificate let's explore options how this actually can be done without any user even noticing!&lt;/p&gt;

&lt;p&gt;And here everything boils down to trust. The easiest way to convince someone he's accessing a perfectly valid and secure certificate protected site is by lying to him. What does that mean you ask?&lt;br&gt;
The whole sense of safety is a result of you relying on your browser to tell you if the site you are visiting is fine or there's something fishy going on by looking at the browser error displayed when you visit misconfigured or fake site.&lt;br&gt;
&lt;strong&gt;Rule number one: Use only web browser downloaded from verified source&lt;/strong&gt;&lt;br&gt;
Never ever download a web browser from untrusted sources (download sites, warez sites, custom browser builds on GitHub, etc.). It may be tempting to have an "Un-Googled Chromium" - perfect browser based on Chromium with Google spyware removed (TM). The only source of these browser builds are random people on the internet. You may get a browser that was built from official GitHub repo with Google stuff removed but sneakily one CA certificate added that is under control of an attacker. Results may be disastrous. By having an attacker controlled CA certificate bundled into your browser one can, in addition to DNS spoofing redirect you to an attacker controlled server hosting an exact copy of Gmail login page. Just type in the credentials and they will be sent to the attacker's server without you even noticing!&lt;br&gt;
Some browsers do not come with CA certificates bundled and instead rely on the operating system CA certificate store. There is also a risk associated with it because the code in the source code of this untrusted browser download may have been modified to use internal CA certificate bundled in it.&lt;br&gt;
In case of browsers like Internet Explorer running on Windows without antivirus combined with untrusted applications from unverified sources can result in system infection that imports own CA certificates into Windows/Linux CA store. All browsers using these store would then be compromised even if the browser itself comes from verified vendor's site.&lt;br&gt;
&lt;strong&gt;Rule number two: Run antivirus combined with software from trusted sources&lt;/strong&gt;&lt;br&gt;
Do your job and verify downloaded file's hash with the one the vendor provides. Most of them do now!&lt;br&gt;
An alternative would be to run regular browser in a sandbox or Virtual Machine and only use trusted browser on your main operating system to access important sites (banking, mails, company portals, social media, etc.)&lt;/p&gt;

&lt;p&gt;Some attacks are also possible on insecure networks, especially public WiFi. Here the claim about DNS spoofing comes to effect. Although without compromising your operating system and/or web browser it's hard to fake certificates, what can actually happen is that your request to gmail.com will be handled by the DNS server under attacker's control and you will be redirected to similarly looking gmial.com domain with valid certificate. It is common to do this kind of tricks as user's don't usually check what they typed in after the page they receive looks what they expect it usually does. Similar typo-based domains are registered and pretend to be their original counterparts so always beware on untrusted networks. Use your own DNS settings paired with DNSSEC or DNS over HTTPS or use VPN to browse the internet. Or if you have such option, do not connect to unknown networks and use cellular network instead.&lt;br&gt;
&lt;strong&gt;Rule number three: Never trust unknown networks and use VPN if you need to&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hope you enjoyed this post and thank you for reading!&lt;/p&gt;

&lt;p&gt;In the next part we can have a look at why may accessing even self-signed certificate sites be secure in some cases and what it means to establish an SSL/TLS session with remote host.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Your code has lots of security and performance issues, he said...</title>
      <dc:creator>Slavius</dc:creator>
      <pubDate>Fri, 09 Aug 2019 15:46:18 +0000</pubDate>
      <link>https://dev.to/slavius/your-code-has-lots-of-security-and-performance-issues-he-said-24c7</link>
      <guid>https://dev.to/slavius/your-code-has-lots-of-security-and-performance-issues-he-said-24c7</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Recently we hired an external freelancer to our team to help with a backend server project done in .Net Core and PostgreSQL database server. Our solution consists of many projects including an MQTT protocol based server, a threaded TCP server, a calculation/processing engine and a public rest API.&lt;/p&gt;

&lt;p&gt;After just two weeks this person suddenly changed his attitude and said he's too unhappy with the security and performance issues in the project so that he has already decided to leave. In person, we never managed to get from him a list of issues he was referring to. We unfortunately had to threaten him not paying for his works unless he provides some evidence to his claims. We were too afraid that our project suffers from some overlooked problems we missed and if he has the expertise and experience to advice us we simply wanted to know.&lt;/p&gt;

&lt;p&gt;After few days an e-mail arrived thanking us for cooperation and a brief list of what the person found so unacceptably bothering about the security and performance in our project. Here's an unedited excerpt from the e-mail:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;First of all, you shouldn’t be worry about the security. I just told you generally.&lt;br&gt;
But I strongly recommend you to follow these changes on the code and DB to have a better quality. (this is just a help)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;      I guess that we transfer data from GUI to the API server probably with HTTPS , but this is not enough. Because a person can easily get a SSL certificate with DNS spoofing and listen to the packages. So the first thing is ,  We are sending our password for login or any other transaction as a plain text and then we will only encrypt it on DB. We must also encrypt the passwords on the client-side  with another salt or another type of encryption when we want to send a request like LOGIN function. (recommend different salt for different customers)&lt;/li&gt;
&lt;li&gt;      3 char password for users are really short. Because with authentication attempts attacks , a person can find a password after a short while , at least 7 or 8 chars recommended&lt;/li&gt;
&lt;li&gt;      And also we should prevent authentication attempts, for example after 10 time attempt of one user, we block that user.&lt;/li&gt;
&lt;li&gt;      There is something also that maybe is not very important, but just for you to know, there is something called Man-in-middle Attack or spoofing , for preventing any issue in this case, it’s better to validate any request to server. For example in project/Add we just check if the body.Device is not null then we do our process , But imagine that if body.Device is really not null, and the data on the package was not a correct data. This type of data can harm the DB data or add some invalid values. For this item , because you normally know your customers, it’s not an important issue. But it’s still important.&lt;/li&gt;
&lt;li&gt;      In Database I found many non-indexes fields like Group in Table ProjectDevices.  (can be better in performance)&lt;/li&gt;
&lt;li&gt;      About the tokens in API header I recommend you to Encrypt it while sending.&lt;/li&gt;
&lt;li&gt;      And also because of better security I recommend to have a node to node client certificate (x509. Certificate authentication)&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;I have decided to personally go through the list and examine, investigate and eventually fix the problems in each point. After reading it through though - I realized this person just lacks the knowledge and the threats he describes are not real.&lt;/p&gt;

&lt;p&gt;I decided to write a detailed explanation to each point in individual articles so you may find some of these useful when working on your project that you understand the topics and you're not missing anything regarding security and performance.&lt;/p&gt;

&lt;p&gt;Stay tuned.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Explaining Load Balancers</title>
      <dc:creator>Slavius</dc:creator>
      <pubDate>Wed, 22 Aug 2018 20:03:26 +0000</pubDate>
      <link>https://dev.to/slavius/explaining-load-balancers-from--30cb</link>
      <guid>https://dev.to/slavius/explaining-load-balancers-from--30cb</guid>
      <description>&lt;h2&gt;
  
  
  Preface
&lt;/h2&gt;

&lt;p&gt;This originally came as comment on &lt;strong&gt;&lt;a href="https://dev.to/t/explainlikeimfive"&gt;#explainlikeimfive&lt;/a&gt;&lt;/strong&gt; - &lt;a href="https://dev.to/slavius/comment/500e"&gt;Explain Load Balancers Like I'm Five&lt;/a&gt; but I decided to convert it to a little explaining article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Load balancers are all about scaling
&lt;/h2&gt;

&lt;p&gt;Generally speaking, there are 2 types of scaling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vertical&lt;/strong&gt; - you keep adding resources to your &lt;em&gt;single system&lt;/em&gt; until you run out of space - e.g. until you have no more free memory slots to expand your RAM or SATA/SAS ports to connect another hard drive. This is similar to piling up resources in one isolated place - it all grows to the roof &lt;code&gt;vertically&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Horizontal&lt;/strong&gt; - you keep adding &lt;em&gt;more small autonomous systems&lt;/em&gt;, each having it's own portion of resources that in sum give you the power and performance you need. You can do this as long as you have physical space (and enough electricity for reliable operation) which is very efficient in regards of future growth. Think of a big shelf where you put new server next to the last one when you run out of resources - it grows &lt;code&gt;horizontally&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Load Balancers come in play when you scale &lt;em&gt;horizontally&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;The individual systems deployed behind load balancer are called &lt;em&gt;nodes&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Generally you put load balancer in front of these nodes to handle the management work. The load balancer decides how to spread the load across all nodes and how it supports the nodes and tries to offload as many tasks from them as possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features of the load balancer
&lt;/h2&gt;

&lt;p&gt;We can sum up as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;balancing the load across available nodes - obviously&lt;/li&gt;
&lt;li&gt;keeping information about health of all nodes to prevent routing requests to dead nodes. This is done by implementing regular health checks - usually HTTP probes to specially crafted API that responds with the internal state of the application. This allows e.g. for an awesome way to do maintenance - because you can mark nodes as inactive (while doing the maintenance and/or reboots) and the web application still works by serving requests from other active nodes. The same way you can slowly replace all nodes by swapping one-by-one for more powerfull ones without any downtime!&lt;/li&gt;
&lt;li&gt;keeping information about the load on each node (CPU load, RAM usage, number of active connections, number of connections/second to each node) to prevent further overloading already heavily used nodes&lt;/li&gt;
&lt;li&gt;keeps track of sessions (based on source IP address+port or HTTP cookie) to route the same client always to the same node (necessary if the remaining nodes are not session aware - imagine you log into an application which produces cookie for your authenticated session. Then your next request would be redirected to a different node (which load balancer decides e.g. is less loaded) that has no idea you were already authenticated because it has no cookie - you would end up redirected back to the login screen, possibly ending in a loop.&lt;/li&gt;
&lt;li&gt;offloading - load balancer can take over responsibility of compressing resources and sending them to end clients leaving more CPU power for application code on nodes. The same way it can terminate and negotiate HTTPS sessions, which is also expensive because of SSL/TLS cryptography happening for each client. Similarly, load balancer can also cache frequently used resources in memory or on a fast storage to prevent retrieving them from nodes all the time so your nodes does not have to account for more memory and fast SSDs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Additional things you can do with load balancers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Splitting load based on routing (parts of an URL) - you can decide to dedicate 4 nodes for &lt;code&gt;/rest/api&lt;/code&gt; context, 2 nodes for &lt;code&gt;/[css|js|img]&lt;/code&gt; and the rest for application code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;Load balancers [can] make your service more reliable, easily scalable, more performant and resilient to outages.&lt;/p&gt;

</description>
      <category>loadbalancer</category>
      <category>web</category>
      <category>http</category>
    </item>
    <item>
      <title>So you're into RFCs?</title>
      <dc:creator>Slavius</dc:creator>
      <pubDate>Mon, 20 Aug 2018 10:35:54 +0000</pubDate>
      <link>https://dev.to/slavius/so-youre-into-rfcs-5hd0</link>
      <guid>https://dev.to/slavius/so-youre-into-rfcs-5hd0</guid>
      <description>&lt;h3&gt;
  
  
  Full RFC
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://tools.ietf.org/html/rfc2324"&gt;Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Excerpt
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Rationale and Scope&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There is coffee all over the world. Increasingly, in a world in which&lt;br&gt;
   computing is ubiquitous, the computists want to make coffee. Coffee&lt;br&gt;
   brewing is an art, but the distributed intelligence of the web-&lt;br&gt;
   connected world transcends art.  Thus, there is a strong, dark, rich&lt;br&gt;
   requirement for a protocol designed espressoly for the brewing of&lt;br&gt;
   coffee. Coffee is brewed using coffee pots.  Networked coffee pots&lt;br&gt;
   require a control protocol if they are to be controlled.&lt;/p&gt;

&lt;p&gt;Increasingly, home and consumer devices are being connected to the&lt;br&gt;
   Internet. Early networking experiments demonstrated vending devices&lt;br&gt;
   connected to the Internet for status monitoring [COKE]. One of the&lt;br&gt;
   first remotely &lt;em&gt;operated&lt;/em&gt; machine to be hooked up to the Internet,&lt;br&gt;
   the Internet Toaster, (controlled via SNMP) was debuted in 1990&lt;br&gt;
   [RFC2235].&lt;/p&gt;

&lt;p&gt;The demand for ubiquitous appliance connectivity that is causing the&lt;br&gt;
   consumption of the IPv4 address space. Consumers want remote control&lt;br&gt;
   of devices such as coffee pots so that they may wake up to freshly&lt;br&gt;
   brewed coffee, or cause coffee to be prepared at a precise time after&lt;br&gt;
   the completion of dinner preparations.&lt;/p&gt;

&lt;p&gt;This document specifies a Hyper Text Coffee Pot Control Protocol&lt;br&gt;
   (HTCPCP), which permits the full request and responses necessary to&lt;br&gt;
   control all devices capable of making the popular caffeinated hot&lt;br&gt;
   beverages.&lt;/p&gt;

&lt;p&gt;HTTP 1.1 ([RFC2068]) permits the transfer of web objects from origin&lt;br&gt;
   servers to clients. The web is world-wide.  HTCPCP is based on HTTP.&lt;br&gt;
   This is because HTTP is everywhere. It could not be so pervasive&lt;br&gt;
   without being good. Therefore, HTTP is good. If you want good coffee,&lt;br&gt;
   HTCPCP needs to be good. To make HTCPCP good, it is good to base&lt;br&gt;
   HTCPCP on HTTP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. HTCPCP Protocol&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The HTCPCP protocol is built on top of HTTP, with the addition of a&lt;br&gt;
   few new methods, header fields and return codes.  All HTCPCP servers&lt;br&gt;
   should be referred to with the "coffee:" URI scheme (Section 4).&lt;/p&gt;

&lt;p&gt;Coffee pots heat water using electronic mechanisms, so there is no&lt;br&gt;
   fire. Thus, no firewalls are necessary, and firewall control policy&lt;br&gt;
   is irrelevant. However, POST may be a trademark for coffee, and so&lt;br&gt;
   the BREW method has been added. The BREW method may be used with&lt;br&gt;
   other HTTP-based protocols (e.g., the Hyper Text Brewery Control&lt;br&gt;
   Protocol).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.2.2 New header fields&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.2.2.1 The Accept-Additions header field&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In HTTP, the "Accept" request-header field is used to specify media&lt;br&gt;
   types which are acceptable for the response. However, in HTCPCP, the&lt;br&gt;
   response may result in additional actions on the part of the&lt;br&gt;
   automated pot. For this reason, HTCPCP adds a new header field,&lt;br&gt;
   "Accept-Additions":&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Accept-Additions = "Accept-Additions" ":"
                      #( addition-range [ accept-params ] )

    addition-type   = ( "*"
                      | milk-type
                      | syrup-type
                      | sweetener-type
                      | spice-type
                      | alcohol-type
                      ) *( ";" parameter )
    milk-type       = ( "Cream" | "Half-and-half" | "Whole-milk"
                      | "Part-Skim" | "Skim" | "Non-Dairy" )
    syrup-type      = ( "Vanilla" | "Almond" | "Raspberry"
                      | "Chocolate" )
    alcohol-type    = ( "Whisky" | "Rum" | "Kahlua" | "Aquavit" )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;2.2.3 Omitted Header Fields&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No options were given for decaffeinated coffee. What's the point?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.3.2 418 I'm a teapot&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Any attempt to brew coffee with a teapot should result in the error&lt;br&gt;
   code "418 I'm a teapot". The resulting entity body MAY be short and&lt;br&gt;
   stout.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The "coffee" URI scheme&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because coffee is international, there are international coffee URI&lt;br&gt;
   schemes.  All coffee URL schemes are written with URL encoding of the&lt;br&gt;
   UTF-8 encoding of the characters that spell the word for "coffee" in&lt;br&gt;
   any of 29 languages, following the conventions for&lt;br&gt;
   internationalization in URIs [URLI18N].&lt;/p&gt;

&lt;p&gt;coffee-url  =  coffee-scheme ":" [ "//" host ]&lt;br&gt;
                ["/" pot-designator ] ["?" additions-list ]&lt;/p&gt;

&lt;p&gt;coffee-scheme = ( "koffie"                      ; Afrikaans, Dutch&lt;br&gt;
                  | "q%C3%A6hv%C3%A6"          ; Azerbaijani&lt;br&gt;
                  | "%D9%82%D9%87%D9%88%D8%A9" ; Arabic&lt;br&gt;
               | "akeita"                   ; Basque&lt;br&gt;
               | "koffee"                   ; Bengali&lt;br&gt;
               | "kahva"                    ; Bosnian&lt;br&gt;
               | "kafe"                     ; Bulgarian, Czech&lt;br&gt;
               | "caf%C3%E8"                ; Catalan, French, Galician&lt;br&gt;
                  | "%E5%92%96%E5%95%A1"       ; Chinese&lt;br&gt;
                  | "kava"                     ; Croatian&lt;br&gt;
               | "k%C3%A1va                 ; Czech&lt;br&gt;
               | "kaffe"                    ; Danish, Norwegian, Swedish&lt;br&gt;
               | "coffee"                   ; English&lt;br&gt;
               | "kafo"                     ; Esperanto&lt;br&gt;
                  | "kohv"                     ; Estonian&lt;br&gt;
               | "kahvi"                    ; Finnish&lt;br&gt;
               | "%4Baffee"                 ; German&lt;br&gt;
               | "%CE%BA%CE%B1%CF%86%CE%AD" ; Greek&lt;br&gt;
               | "%E0%A4%95%E0%A5%8C%E0%A4%AB%E0%A5%80" ; Hindi&lt;br&gt;
               | "%E3%82%B3%E3%83%BC%E3%83%92%E3%83%BC" ; Japanese&lt;br&gt;
               | "%EC%BB%A4%ED%94%BC"       ; Korean&lt;br&gt;
               | "%D0%BA%D0%BE%D1%84%D0%B5" ; Russian&lt;br&gt;
               | "%E0%B8%81%E0%B8%B2%E0%B9%81%E0%B8%9F" ; Thai&lt;br&gt;
               )&lt;/p&gt;

&lt;p&gt;pot-designator = "pot-" integer  ; for machines with multiple pots&lt;br&gt;
   additions-list = #( addition )&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.2 Crossing firewalls&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In most organizations HTTP traffic crosses firewalls fairly easily.&lt;br&gt;
   Modern coffee pots do not use fire. However, a "firewall" is useful&lt;br&gt;
   for protection of any source from any manner of heat, and not just&lt;br&gt;
   fire. Every home computer network SHOULD be protected by a firewall&lt;br&gt;
   from sources of heat. However, remote control of coffee pots is&lt;br&gt;
   important from outside the home. Thus, it is important that HTCPCP&lt;br&gt;
   cross firewalls easily.&lt;/p&gt;

&lt;p&gt;By basing HTCPCP on HTTP and using port 80, it will get all of HTTP's&lt;br&gt;
   firewall-crossing virtues. Of course, the home firewalls will require&lt;br&gt;
   reconfiguration or new versions in order to accommodate HTCPCP-&lt;br&gt;
   specific methods, headers and trailers, but such upgrades will be&lt;br&gt;
   easily accommodated. Most home network system administrators drink&lt;br&gt;
   coffee, and are willing to accommodate the needs of tunnelling&lt;br&gt;
   HTCPCP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Security Considerations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Anyone who gets in between me and my morning coffee should be&lt;br&gt;
   insecure.&lt;/p&gt;

&lt;p&gt;Unmoderated access to unprotected coffee pots from Internet users&lt;br&gt;
   might lead to several kinds of "denial of coffee service" attacks.&lt;br&gt;
   The improper use of filtration devices might admit trojan grounds.&lt;br&gt;
   Filtration is not a good virus protection method.&lt;/p&gt;

</description>
      <category>joke</category>
      <category>fun</category>
      <category>rfc</category>
      <category>web</category>
    </item>
    <item>
      <title>Tell me a good IT joke</title>
      <dc:creator>Slavius</dc:creator>
      <pubDate>Wed, 15 Aug 2018 15:53:35 +0000</pubDate>
      <link>https://dev.to/slavius/tell-me-a-good-it-joke-3ca</link>
      <guid>https://dev.to/slavius/tell-me-a-good-it-joke-3ca</guid>
      <description>&lt;p&gt;Tell me a good joke you know with coding / devops / infra / testing / support related twist. ;)&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>jokes</category>
      <category>fun</category>
    </item>
    <item>
      <title>Give ligatures a chance</title>
      <dc:creator>Slavius</dc:creator>
      <pubDate>Tue, 14 Aug 2018 13:06:12 +0000</pubDate>
      <link>https://dev.to/slavius/give-ligatures-a-chance-5e8o</link>
      <guid>https://dev.to/slavius/give-ligatures-a-chance-5e8o</guid>
      <description>&lt;h2&gt;
  
  
  What are ligatures anyway?
&lt;/h2&gt;

&lt;p&gt;Do you find yourself constantly changing and tweaking your development editor by changing color schemes, font size, line size or tab size to improve your coding exprience?&lt;br&gt;
Do you find yourself staring at a piece of code for too long just to realize you're looking at a simple lambda function with a piece of math?&lt;/p&gt;

&lt;p&gt;Well then, you probably lack ligatures and you don't even know it! Ligatures is a font feature, that allows you to display multiple consecutive characters as one custom glyph! &lt;br&gt;
If you've ever used Microsoft Word, it's substitution rules are very close to what ligatures are; with a difference, that Word really replaces the text with a substitution so original text is gone. In contrast, ligatures look like one character only when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you use font with ligatures&lt;/li&gt;
&lt;li&gt;you use editor that supports ligatures&lt;/li&gt;
&lt;li&gt;you have ligatures enabled&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you don't have one of these your code will look as usual; without any improvements.&lt;/p&gt;

&lt;h2&gt;
  
  
  What can it do for me?
&lt;/h2&gt;

&lt;p&gt;Ligatures generally improve readability by making special character combinations distict and as well, making your code shorter by reducing the width of your code by displaying one shorter glyph instead of 2 or sometimes 3 regular width ones.&lt;/p&gt;

&lt;p&gt;Let's look at an example:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uzH3ViYK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/tonsky/FiraCode/master/showcases/all_ligatures.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uzH3ViYK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/tonsky/FiraCode/master/showcases/all_ligatures.png" alt="font ligatures picture" title="Font ligatures in action"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The funny thing is that within an editor a ligature acts as a single glyph so you can cop and paste it as a single character. In the underlying file it will, however, take space as multiple characters depending on ligature code.&lt;/p&gt;

&lt;p&gt;So let's have a look at some sample code with ligatures:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pDBBhP9e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://oi67.tinypic.com/11ceiox.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pDBBhP9e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://oi67.tinypic.com/11ceiox.jpg" alt="ligatures in editor" title="Font ligatures in VS Code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice especially:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the for loop --&amp;gt;&lt;/li&gt;
&lt;li&gt;== comparison&lt;/li&gt;
&lt;li&gt;&amp;lt;/ html tags&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Very easy on the eyes enhanced by easily identifiable logic operators and markup formatting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where can I get it?
&lt;/h2&gt;

&lt;p&gt;There are multiple fonts that support ligatures.&lt;/p&gt;

&lt;p&gt;My favorite free one is &lt;a href="https://github.com/tonsky/FiraCode"&gt;Fira Code&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There are other alternatives as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/i-tu/Hasklig"&gt;Hasklig&lt;/a&gt; (free)&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://larsenwork.com/monoid/"&gt;Monoid&lt;/a&gt; (free)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/kika/fixedsys"&gt;Fixedsys Excelsior&lt;/a&gt; (free)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://be5invis.github.io/Iosevka/"&gt;Iosevka&lt;/a&gt; (free)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/SSNikolaevich/DejaVuSansCode"&gt;DejaVu Sans Code&lt;/a&gt; (free)&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.fsd.it/fonts/pragmatapro.htm"&gt;PragmataPro&lt;/a&gt; (paid)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But hey, you mentioned editor support! And you're right, ligatures do not work everywhere! So here's some overview.&lt;br&gt;
Working in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VS Code (including VS Exploration)&lt;/li&gt;
&lt;li&gt;Microsoft Visual Studio 2015+ (including Community edition) - currently a bug in WPF prevents ligatures with minus/dash sign (like --&amp;gt;) to be converted&lt;/li&gt;
&lt;li&gt;JetBrains editors (CLion, Intellij, PHPStorm, WebStorm, PyCharm, Rider, ...)&lt;/li&gt;
&lt;li&gt;Notepad++ (workaround needed)&lt;/li&gt;
&lt;li&gt;Sublime Text&lt;/li&gt;
&lt;li&gt;Xamarin Studio&lt;/li&gt;
&lt;li&gt;XCode&lt;/li&gt;
&lt;li&gt;gEdit&lt;/li&gt;
&lt;li&gt;Atom based editors (1.1+)&lt;/li&gt;
&lt;li&gt;Android Studio&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For complete support have a look at the list of &lt;a href="https://github.com/tonsky/FiraCode#editor-support"&gt;working and non-working editors&lt;/a&gt; and &lt;a href="https://github.com/tonsky/FiraCode#terminal-support"&gt;as well as terminals&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>coding</category>
      <category>font</category>
      <category>ligatures</category>
    </item>
  </channel>
</rss>
