<?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: Seimei Matsusaki</title>
    <description>The latest articles on DEV Community by Seimei Matsusaki (@lulkafe).</description>
    <link>https://dev.to/lulkafe</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%2F740335%2Ff8c92a0a-ff78-4598-91b7-dd4f28fa3c25.png</url>
      <title>DEV Community: Seimei Matsusaki</title>
      <link>https://dev.to/lulkafe</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lulkafe"/>
    <language>en</language>
    <item>
      <title>About Eslint configuration (Airbnb style option for a Typescript project)</title>
      <dc:creator>Seimei Matsusaki</dc:creator>
      <pubDate>Sun, 04 Sep 2022 06:12:40 +0000</pubDate>
      <link>https://dev.to/lulkafe/about-eslint-configuration-airbnb-style-typescript-4hh7</link>
      <guid>https://dev.to/lulkafe/about-eslint-configuration-airbnb-style-typescript-4hh7</guid>
      <description>&lt;p&gt;Since my team recently has decided to introduce Eslint (Typescript + Airbnb style), I was researching how to set up yesterday.&lt;/p&gt;

&lt;p&gt;When I read some articles about the configuration, some of the authors directed to choose the Airbnb option during initialization with an image like below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--L_Zb4CLS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ezksixr3emny0kk6gczp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--L_Zb4CLS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ezksixr3emny0kk6gczp.png" alt="Image description" width="835" height="157"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, I found that the "Airbnb" option didn't appear when I was initializing the configuration. Only "Standard" and "XO" are available on the latest version (8.23.0): &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vvD0m-0S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u1pqbioyrsir6mq2exj9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vvD0m-0S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u1pqbioyrsir6mq2exj9.png" alt="Image description" width="880" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Curious to say, the "Airbnb" option appeared when I answered "No" to a question, "Does your project use Typescript?":&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tVE2p2r7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9agzx7bifgjbmb419q9k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tVE2p2r7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9agzx7bifgjbmb419q9k.png" alt="Image description" width="880" height="309"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, what was wrong? This took me a while to figure out why.&lt;/p&gt;

&lt;p&gt;After I did some research on the cause, I realized that the version of my Eslint was the cause. In short, the "Airbnb" and  "Google" style options are gone from 8.7.0 for some reason; meanwhile 8.6.0 or before, these were okay:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EkPVsG9D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o6xwfzyskios0x5ysvm0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EkPVsG9D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o6xwfzyskios0x5ysvm0.png" alt="Image description" width="880" height="301"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;As you can see, even if I select "Yes" to Typescript, the options are selectable. Nice.&lt;/p&gt;

&lt;p&gt;But, I'm still in the middle of the configuration, so there is no guarantee that this is the correct way to go, but I just wanted to share this finding.&lt;/p&gt;

</description>
      <category>eslint</category>
      <category>typescript</category>
      <category>airbnb</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Learning Finnish software engineering vocabulary</title>
      <dc:creator>Seimei Matsusaki</dc:creator>
      <pubDate>Thu, 21 Apr 2022 00:54:50 +0000</pubDate>
      <link>https://dev.to/lulkafe/learning-finnish-software-engineering-vocabulary-pf1</link>
      <guid>https://dev.to/lulkafe/learning-finnish-software-engineering-vocabulary-pf1</guid>
      <description>&lt;p&gt;Before I wrote this article, I was wondering if it would be OK to post this to Dev.to. But since this is not a 100% off topic, I decided to post.&lt;/p&gt;

&lt;p&gt;Do you study another language besides English? &lt;br&gt;
In my case, Yes. &lt;/p&gt;

&lt;p&gt;I have been learning Finnish since 4 years ago. In case you don't know what it is, it is an official language in Finland, and &lt;a href="https://yle.fi/news/3-6690499"&gt;also known as one of the hardest languages for English speakers&lt;/a&gt;. You might get a question like, "Hmm, did you live in Finland before?" or "Do you have friends there?" The answer is no. It is a long story why I started learning the language, so I don't write detail here. But in short, I was a big fan of Heavy metal from the country, and that's the beginning. &lt;/p&gt;

&lt;p&gt;Anyway, as I was gradually able to read real Finnish (i.e., not Easy-Finnish) articles, I began to want to learn software related vocabulary in Finnish. However, as I expected, I was not able to find a good list to start. I found some lists but there were for more general words. So, I googled or looked up in a dictionary, and jot down one by one. Here is part of my notes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VOCAB LIST&lt;/strong&gt;&lt;br&gt;
argument : argumentti&lt;br&gt;
array : taulukko&lt;br&gt;
backend : back end&lt;br&gt;
class : luokka&lt;br&gt;
click (verb): klikata&lt;br&gt;
cache : välimuisti&lt;br&gt;
code : koodi&lt;br&gt;
colon (:) : kaksoispiste&lt;br&gt;
constructor : konstruktori&lt;br&gt;
compile (verb): kääntää &lt;br&gt;
computer : tietokone&lt;br&gt;
cookie : eväste&lt;br&gt;
data : tieto&lt;br&gt;
database : tietokanta&lt;br&gt;
define (verb): määritellä&lt;br&gt;
deploy (verb): sijoittaa&lt;br&gt;
developer : kehittäjä&lt;br&gt;
domain name : verkkotunnus&lt;br&gt;
download (verb) : ladata&lt;br&gt;
engineer : insinööri&lt;br&gt;
file : tiedosto&lt;br&gt;
folder : kansio&lt;br&gt;
frontend : front end &lt;br&gt;
function : funktio&lt;br&gt;
integer : kokonaisluku&lt;br&gt;
keyboard : näppäimistö&lt;br&gt;
operating system : käyttöjärjestelmä&lt;br&gt;
namespace : nimiavaruus&lt;br&gt;
object oriented programming : olio-ohjelmointi&lt;br&gt;
parameter : parametri&lt;br&gt;
performance : suorituskyky&lt;br&gt;
polymorphism : polymorfismi&lt;br&gt;
process : prosessi&lt;br&gt;
programming : ohjelmointi&lt;br&gt;
responsive : responsiivinen &lt;br&gt;
save (verb) : tallentaa&lt;br&gt;
semicolon (;) : puolipiste&lt;br&gt;
server : palvelin&lt;br&gt;
session : istunto&lt;br&gt;
software : ohjelmisto&lt;br&gt;
software developer: ohjelmistokehittäjä&lt;br&gt;
software engineer : ohjelmistoinsinööri&lt;br&gt;
source code: lähdekoodi&lt;br&gt;
terminal : terminaali&lt;br&gt;
test : testi&lt;br&gt;
user interface : käyttöliittymä&lt;br&gt;
value : arvo&lt;br&gt;
variable : muuttuja&lt;br&gt;
webpage : verkkosivu &lt;br&gt;
website : verkkosivusto&lt;/p&gt;

&lt;p&gt;I cannot confirm if those words are really used in actual workplaces because I have no Finnish friends. But I hope this list can save someone's time.&lt;/p&gt;

&lt;p&gt;Before I close this post, I want to write little about my learning experience of this language so far. Its grammar is surely hard but hardest part for me is listening comprehension. Unlike major languages such as Spanish, there is a very limited number of intermediate level listening stuff with subtitles, so I lost where to start when I was leaving Easy-Finnish materials. This is still a tough issue. Fortunately, I found some Finnish youtuber videos with subtitles, so I continue this journey.&lt;/p&gt;

</description>
      <category>finnish</category>
      <category>blog</category>
      <category>software</category>
      <category>language</category>
    </item>
    <item>
      <title>Attempted to deploy Next.js app with Docker to Heroku</title>
      <dc:creator>Seimei Matsusaki</dc:creator>
      <pubDate>Sat, 02 Apr 2022 22:04:07 +0000</pubDate>
      <link>https://dev.to/lulkafe/attempted-to-deploy-nextjs-app-with-docker-to-heroku-1fga</link>
      <guid>https://dev.to/lulkafe/attempted-to-deploy-nextjs-app-with-docker-to-heroku-1fga</guid>
      <description>&lt;p&gt;[Updated on 11/23/2022: Because Heroku is going to remove free dynos, I deleted my app on Heroku]&lt;/p&gt;

&lt;p&gt;Last week, I was able to deploy a simple Express server to Heroku with Docker after struggling for an almost entire day. And this time, I wanted to try the same deployment method, &lt;a href="https://devcenter.heroku.com/articles/container-registry-and-runtime"&gt;Container Registry &amp;amp; Runtime (Docker Deploys)&lt;/a&gt; for a Next.js app.&lt;/p&gt;

&lt;p&gt;For the sake of simplicity, I used &lt;code&gt;create-next-app&lt;/code&gt; command to create a sample Next.js app and used the generated code as is. Here is &lt;a href="https://github.com/Lulkafe/Nextjs_and_Docker"&gt;the source code&lt;/a&gt; just in case.&lt;/p&gt;

&lt;p&gt;Here are steps I took after I built the app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Add Dockerfile (and .dockerignore)&lt;/strong&gt;&lt;br&gt;
This is from my Dockerfile:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0RQCzqP0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vx2qaoqeq1c7rdixs9a1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0RQCzqP0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vx2qaoqeq1c7rdixs9a1.png" alt="Image description" width="830" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nothing special but I needed to do little research on the last line. Since Heroku doesn't allow us to publish a particular port, I had to make my Next.js app listen to the environment variable &lt;code&gt;PORT&lt;/code&gt; to which Heroku assigns a random port number.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Create a Heroku app on Heroku&lt;/strong&gt;&lt;br&gt;
I made an app "docker-test-with-nextjs" through Heroku GUI.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3ZdmFe8n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0vzl7njlqt0tikhtlauf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3ZdmFe8n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0vzl7njlqt0tikhtlauf.png" alt="Image description" width="631" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Log in Heroku on terminal&lt;/strong&gt;&lt;br&gt;
by the following commands: &lt;br&gt;
&lt;code&gt;heroku login&lt;/code&gt;&lt;br&gt;
&lt;code&gt;heroku container:login&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Add a remote to my local repository&lt;/strong&gt;&lt;br&gt;
My heroku app name is "docker-test-with-nextjs", so I typed&lt;br&gt;
&lt;code&gt;heroku git:remote -a docker-test-with-nextjs&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Build, push and release an image&lt;/strong&gt;&lt;br&gt;
Build an image and push to Heroku:&lt;br&gt;
&lt;code&gt;heroku container:push web&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Release the image:&lt;br&gt;
&lt;code&gt;heroku container:release web&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Wait for seconds and the app is deployed&lt;/strong&gt;&lt;br&gt;
At last, I could see the app on Heroku👍&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docker-test-with-nextjs.herokuapp.com/"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8s17mR1d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c22c1mfpnpyv8nkfhau3.png" alt="Image description" width="362" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Overall, I was able to complete the deployment much quicker than I thought. This was a good experiment and now I can move on deployment of a real Next.js app.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>heroku</category>
      <category>docker</category>
      <category>deployment</category>
    </item>
    <item>
      <title>Notes on Express server deployment with Docker to Heroku</title>
      <dc:creator>Seimei Matsusaki</dc:creator>
      <pubDate>Sun, 27 Mar 2022 14:10:14 +0000</pubDate>
      <link>https://dev.to/lulkafe/notes-on-express-server-deployment-with-docker-to-heroku-4491</link>
      <guid>https://dev.to/lulkafe/notes-on-express-server-deployment-with-docker-to-heroku-4491</guid>
      <description>&lt;p&gt;Phew.. I ended up to spend the whole Saturday trying to deploy a very simple Express server to Heroku. &lt;a href="https://devcenter.heroku.com/articles/container-registry-and-runtime"&gt;Heroku documentation&lt;/a&gt; looked easy at first glance, but I got many errors and needed to do research, but I finally &lt;a href="https://dockertest-123456.herokuapp.com/"&gt;made the server work&lt;/a&gt; (&lt;a href="https://github.com/Lulkafe/DockerTest"&gt;src&lt;/a&gt;). &lt;/p&gt;

&lt;p&gt;Here are my three notes about the deployment. &lt;br&gt;
I hope these can help someone save his/her time in the future.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Dockerfile name needs to start with "D", not "d"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;OK: "&lt;strong&gt;D&lt;/strong&gt;ockerfile"&lt;br&gt;
WRONG : "&lt;strong&gt;d&lt;/strong&gt;ockerfile"&lt;/p&gt;

&lt;p&gt;For some reason, a Heroku CLI command &lt;code&gt;heroku container:push&lt;/code&gt; doesn't recognize "&lt;strong&gt;d&lt;/strong&gt;ockerfile". You will see "No images to push" error then.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Use "web" as the process-type&lt;/strong&gt;&lt;br&gt;
Ref: &lt;a href="https://devcenter.heroku.com/articles/container-registry-and-runtime"&gt;Container Registry &amp;amp; Runtime (Docker Deploys)&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to build an image and push to Heroku,&lt;br&gt;
the following command is directed to use.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;heroku container:push &amp;lt;process-type&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For a simple web-server case like mine, &lt;br&gt;
"web" was the correct process type. &lt;br&gt;
So, this was the correct command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;heroku container:push web&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you are wondering where "process-type" comes from, &lt;br&gt;
here is an official documentation page:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devcenter.heroku.com/articles/dynos"&gt;Dynos and the Dyno Manager&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;According to it, there are three process types: "Web", "Worker", "One-off".&lt;/p&gt;

&lt;p&gt;Since I wasn't sure what the "&amp;lt;process-type&amp;gt;" referred to, I typed an image tag at first. Yes, this was wrong. It was deployed on Heroku; however, it ended up in a "H14" "No web processes running" error. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Port # is given through an environment variable PORT&lt;/strong&gt;&lt;br&gt;
Ref: &lt;a href="https://stackoverflow.com/questions/28706180/setting-the-port-for-node-js-server-on-heroku"&gt;Setting the port for node.js server on Heroku&lt;/a&gt;&lt;br&gt;
I wasn't sure how to publish a port on Heroku.&lt;br&gt;
In short, we cannot freely publish any ports unfortunately.&lt;/p&gt;

&lt;p&gt;instead, a port # is given through PORT variable by Heroku, &lt;br&gt;
and it is what the app needed to listen to.&lt;/p&gt;

&lt;p&gt;in my case, my app checks PORT variable when it starts,&lt;br&gt;
so i didn't need any modification:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const port = process.env.PORT || 8080;&lt;/code&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>heroku</category>
      <category>express</category>
      <category>deployment</category>
    </item>
  </channel>
</rss>
