<?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: deadcheat</title>
    <description>The latest articles on DEV Community by deadcheat (@deadcheat).</description>
    <link>https://dev.to/deadcheat</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%2F41288%2F70f9cd22-6eab-46ee-9812-27a70ae4ed62.jpeg</url>
      <title>DEV Community: deadcheat</title>
      <link>https://dev.to/deadcheat</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/deadcheat"/>
    <language>en</language>
    <item>
      <title>deadcheat/goblet embedding library for assets written in Go</title>
      <dc:creator>deadcheat</dc:creator>
      <pubDate>Thu, 17 May 2018 11:33:13 +0000</pubDate>
      <link>https://dev.to/deadcheat/deadcheatawsset-embedding-library-for-assets-written-in-go-248h</link>
      <guid>https://dev.to/deadcheat/deadcheatawsset-embedding-library-for-assets-written-in-go-248h</guid>
      <description>&lt;h2&gt;
  
  
  Circumstance
&lt;/h2&gt;

&lt;p&gt;Embedding of assets, is necessary for creating a single binary application in Go.&lt;/p&gt;

&lt;p&gt;I used to use github.com/jteeuwen/go-bindata, but go-bindata is somehow removed (url is alive now, but original author is not there).&lt;/p&gt;

&lt;p&gt;For that reason, I　thought to migrate go-bindata to &lt;a href="https://github.com/jessevdk/go-assets"&gt;github.com/jessevdk/go-assets&lt;/a&gt;. go-assets is not bad, but it has some problems for me like below -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Idempotency, for go-assets, I have to create .go file from asset by using go-assets-builder. but generated .go file is not constant, changed each execution.&lt;/li&gt;
&lt;li&gt;Seems not to be maintained, there are some PRs that has been left untreated.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I created my library.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/deadcheat/goblet"&gt;github.com/deadcheat/goblet&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use
&lt;/h2&gt;

&lt;p&gt;To generate .go file from assets,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;install
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go get -u github.com/deadcheat/goblet/...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;execute command (plz set $GOPATH/bin to $PATH env before that)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;goblet %MYASSETDIR%...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Write a code to use them, for example, it can be used for http.FileServe
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http.Handle("/static/", http.FileServer(assetsbin.Assets.WithPrefix("/static/")))
log.Println("start server localhost:3000")
if err := http.ListenAndServe(":3000", nil); err != nil {
    log.Fatal(err)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to change package name in generated file, use &lt;code&gt;-p&lt;/code&gt; flag.&lt;/p&gt;

&lt;p&gt;It is not so bad for my use case, but I want it to be more better, please tell me anything what you think about.&lt;/p&gt;

&lt;p&gt;Thanks for your reading.&lt;/p&gt;

&lt;p&gt;bye.&lt;/p&gt;

</description>
      <category>go</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Should we review some codes for other project or not ?</title>
      <dc:creator>deadcheat</dc:creator>
      <pubDate>Wed, 28 Mar 2018 08:49:11 +0000</pubDate>
      <link>https://dev.to/deadcheat/should-we-review-some-codes-for-other-project-or-not--5eko</link>
      <guid>https://dev.to/deadcheat/should-we-review-some-codes-for-other-project-or-not--5eko</guid>
      <description>&lt;h2&gt;
  
  
  Do you review any codes your colleague ask that ?
&lt;/h2&gt;

&lt;p&gt;Generally, almost of you will review codes written for your project.&lt;br&gt;
But, how about codes for projects what you are nothing to do with ?&lt;/p&gt;

&lt;p&gt;If you say "i do" fluently, you are definitely awesome, fabulous, amazing person. I guarantee that.&lt;/p&gt;

&lt;p&gt;Actually and unfortunately, there are a lot of people who doesn't care anything about such a pull-request or a asking review.&lt;/p&gt;

&lt;p&gt;I think this is a problem about consciousness or awareness, so I believe we can change theirs and we can make our relationship such as reviewing each other and create great things. I hope.&lt;/p&gt;

&lt;h2&gt;
  
  
  We have no reason that don't review other's code, it's true, it's damn true.
&lt;/h2&gt;

&lt;p&gt;We can accept so much favor through code review.&lt;/p&gt;

&lt;p&gt;For example, I'd refer to experience, such as quantities of simulations for programming try and error, or viewpoints what you may not aware that when you do your thing. they are so much helpful things for your coding and work.&lt;/p&gt;

&lt;p&gt;Ofcourse, I can understand people doesn't review other's situation or argument such as "Nevertheless, I don't know so much about their project, and don't want to tell misdirected things".&lt;/p&gt;

&lt;p&gt;Yes, you're right, you're very kind and gentle person.&lt;/p&gt;

&lt;p&gt;But I wanna make a team or a organization who can keep helping each other, and there are a lot of things to help someone else whether you do know about their work or not.&lt;/p&gt;

&lt;p&gt;This is not that we can "MAKE" or "FORCE" someone to do. We need all of us to aware and change ourselves to positive and fearless about helping others.&lt;/p&gt;

&lt;p&gt;Does anyone have any idea ? Please tell me anything you think about it.&lt;/p&gt;

&lt;p&gt;Thanks for your reading.&lt;br&gt;
Have a nice day.&lt;/p&gt;

</description>
      <category>poem</category>
      <category>codereview</category>
    </item>
    <item>
      <title>satori/go.uuid may cause build error for goa application</title>
      <dc:creator>deadcheat</dc:creator>
      <pubDate>Wed, 31 Jan 2018 07:49:42 +0000</pubDate>
      <link>https://dev.to/deadcheat/satorigouuid-may-cause-build-error-for-goa-application-3em7</link>
      <guid>https://dev.to/deadcheat/satorigouuid-may-cause-build-error-for-goa-application-3em7</guid>
      <description>&lt;p&gt;Today, I released application for my working project to the production. but I got build error like this,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# myapp/vendor/github.com/goadesign/goa/uuid
vendor/github.com/goadesign/goa/uuid/uuid.go:18:23: not enough arguments in call to uuid.Must
    have (uuid.UUID)
    want (uuid.UUID, error)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Luckily, I happend to see talking about same topic on goa-slack-channel, I knew this problem is caused by &lt;a href="https://github.com/satori/go.uuid/issues/66"&gt;this issue(Breaking API Change)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ofcourse they fixed that on master branch.but they've not added release tag yet.&lt;br&gt;
so you will face this problem if you write "glide.yaml" like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import:
- package: github.com/goadesign/goa
  version: ^1.3.1
- package: github.com/satori/go.uuid
  version: ^1.2.0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;For my application, fix glide.yaml like below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import:
- package: github.com/goadesign/goa
  version: ^1.3.1
- package: github.com/satori/go.uuid
  version: master
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Thanks.&lt;/p&gt;

</description>
      <category>go</category>
      <category>goa</category>
      <category>gouuid</category>
    </item>
    <item>
      <title>Create middleware environment on Docker Compose</title>
      <dc:creator>deadcheat</dc:creator>
      <pubDate>Wed, 24 Jan 2018 07:09:06 +0000</pubDate>
      <link>https://dev.to/deadcheat/create-middleware-environment-on-docker-compose-1m9i</link>
      <guid>https://dev.to/deadcheat/create-middleware-environment-on-docker-compose-1m9i</guid>
      <description>&lt;h2&gt;
  
  
  Things what to do in this post
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use Docker Compose&lt;/li&gt;
&lt;li&gt;Create an environment using these middleware

&lt;ul&gt;
&lt;li&gt;MySQL(for database)&lt;/li&gt;
&lt;li&gt;Couchbase(for datacache)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Docker Compose
&lt;/h2&gt;

&lt;p&gt;is a Command-Line-Tool to manage multiple docker containers.&lt;br&gt;
This is useful for creating development environment because &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using configuration file "docker-compose.yml", you can distribute your environment configuration to other developer easily.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to create it
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Ofcourse, you'd better install docker, or you can't do this anymore.&lt;/li&gt;
&lt;li&gt;Make your dir with suitable name for your application.&lt;/li&gt;
&lt;li&gt;Create "docker-compose.yml" to your dir, edit like below
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;version: '3'

services:
  couch:
    container_name: "couch"
    image: deadcheat/couchbase
    deploy:
      replicas: 1
    environment:
      BUCKET_NAME: "default"
    ports:
      - 8091:8091
  db:
    image: mysql:5.7
    environment:
      - MYSQL_ROOT_PASSWORD=password
      - MYSQL_DATABASE=sample
      - MYSQL_USER=sample
      - MYSQL_PASSWORD=password
    ports:
      - 3306:3306
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Then, run &lt;code&gt;docker-compose up -d&lt;/code&gt; on your terminal.&lt;br&gt;
MySQL and Couchbase environment will start up soon.&lt;/p&gt;

&lt;p&gt;Confirm to connection, &lt;br&gt;
couchbase: open &lt;a href="http://localhost:8091/"&gt;http://localhost:8091/&lt;/a&gt;&lt;br&gt;
mysql: connect to localhost:3306&lt;/p&gt;

&lt;p&gt;To be continued...&lt;/p&gt;

</description>
      <category>dockercompose</category>
      <category>docker</category>
      <category>mysql</category>
      <category>couchbase</category>
    </item>
    <item>
      <title>Why do some engineers in Japan wants to post poops ?</title>
      <dc:creator>deadcheat</dc:creator>
      <pubDate>Wed, 15 Nov 2017 06:29:04 +0000</pubDate>
      <link>https://dev.to/deadcheat/why-do-some-engineers-in-japan-wants-to-post-poops--11h</link>
      <guid>https://dev.to/deadcheat/why-do-some-engineers-in-japan-wants-to-post-poops--11h</guid>
      <description>&lt;p&gt;I don't understand that but somehow, several people post some useless articles.(ofcouse, also this article will be the same)&lt;/p&gt;

&lt;p&gt;They're not about techs, engineerings, web and other useful topic.&lt;/p&gt;

&lt;p&gt;They always post poops at everywhere in the internet world.&lt;/p&gt;

&lt;p&gt;But maybe, is it same in other contries?&lt;/p&gt;

&lt;p&gt;I do want to know about that.&lt;/p&gt;

</description>
      <category>poem</category>
    </item>
  </channel>
</rss>
