teleren/devto huggingface dataset:
Laravel Mixにて途中でJavaScriptをTypeScriptに変える
Tags: laravel, vue, typescript, japanese
Published: 2018-12-30 02:06:30

---
title: Laravel Mixにて途中でJavaScriptをTypeScriptに変える
published: true
description: 
tags: laravel,vue,typescript,japanese
canonical_url: https://crieit.net/posts/Laravel-Mix-JavaScript-TypeScript
---

Laravel MixでVueを使っているプロジェクトで、既にコンポーネントをJavaScriptで書いてしまったけどTypeScriptに変えたい、という場合があると思いますが、割と最小限ではじめられます。全部のコンポーネントをTypeScriptに書き直さなければならない、ということもありませんし、おすすめです。具体的な手順を書いておきます。

## 必要なファイルを追加

vue-cliやcreate-nuxt-appのテンプレートから取ってくると早いと思います。

* tsconfig.json
* resources/assets/js/index.d.ts

## mix.jsをmix.tsに変える

webpack.mix.jsで下記のような設定があると思います。

```javascript
mix.js('resources/assets/js/app.js', 'public/js')
```

これをtsに変えます。

```javascript
mix.ts('resources/assets/js/app.ts', 'public/js')
```

まるごと全てTypeScriptに置き換える開設の場合はフォルダ名もtsに変更する様な記述があったりしますが、今回は最小限ですのでメソッド名とapp.jsのファイル名だけの変更になります。

## app.jsをapp.tsにする

app.jsというかエントリーポイントのファイルですが、これだけはTypeScriptに変更しないといけません。そのため変更し、ビルド時にエラーが出るようであればとりあえず変数の宣言に`variable: any`のようにanyを付けまくります。とりあえずビルドできないとしょうがないので型の設定はあとでやることにしてひたすらanyを付けていきます。

## コンポーネントをTypeScript化する

とりあえず何か一つTypeScriptに変更してみましょう。これは他で色々解説があるので詳しくはそのあたりを見ていただければ良いと思いますが、一応ざっと何をするかを書いておきます。

### クラスにする

これがだいたい基本形です。

```typescript
<script lang="ts">
import { Vue, Component, Prop } from 'vue-property-decorator'

@Component
export default class YourComponentName extends Vue {
```

### いくつかの設定はデコレータ側へ

使うコンポーネントの設定などはデコレータ側で設定します。

```typescript
@Component({
  components: { SubComponent }
})
```

### プロパティもデコレータ

```typescript
@Prop({
  type: String
  required: true
})
name: string
```

### dataは使わず全部クラスのプロパティにする

before

```typescript
data() {
  return {
    val1: false,
    val2: 'aaa'
    val3: null
  }
}
```

after

```typescript
val1 = false
val2 = 'aaa'
val3: YourType
```

### メソッドは普通のメソッドに

methods配下には書かず直接クラスのメソッドにする

### computedはgetterに

```typescript
get computedId() {
  return `ID:${this.id}`
}
```

## その他

* ts-loaderがエラーになったらバージョンをあわせてインストール
* 型が入っていない外部モジュール等は@typesに型があればインストール
* 型がない外部モジュールはindex.d.tsにdeclareを追加（VSCodeなどであれば対処方法が表示されていると思います）
Reusable code (tick), backwards compatibility (fail)
Tags: discuss, web, javascript
Published: 2018-12-29 23:56:47

---
title: Reusable code (tick), backwards compatibility (fail)
published: true
description: In the old days, reuse was hard but we never broke interface backwards compatibility...
tags: #discuss #web #javascript
---

When I was a lad, starting out in development (COM, C++, DLLs etc for Windows), we never broke an interface. That is, the latest version of a module would always support every previous API (interface) version.

However code reuse was really hard. DLLs were rarely actually reused for other projects.

Nowadays with this new web stuff it all seems to be the other way round. Reuse is everywhere but interface updates often break old code. Old code is stuck using the original reused files.

This seems wrong to me. A major version of a package shouldn't break old code. It should just offer a new API with the old stuff in parallel.

Am I missing something?
Quick Writing Tip: Content and Perception
Tags: writing, quicktips
Published: 2018-12-30 03:00:10

---
title: Quick Writing Tip: Content and Perception
published: true
tags: writing,quick-tips
canonical_url: https://SeanKilleen.com/2018/12/writing-tip-content-perception/
---

_I’ve had this quick tip sitting around for a while in my drafts, and figured I really need to publish more of these things, so here it is._

## The Challenge

You have something to say, and also an audience to consider or worries about how that message might be perceived.

## Tip: Two Lists – Content & Perception

When I do this stuff I make myself 2 checklists:

- things I want to say and
- how I want to be perceived

Then, you write the points on the first list in whatever raw, first-draft way you want, and iterate on them until they all meet the requirements for the 2nd list. Check it per sentence and per paragraph.

The two lists helps you function as your own editor and switch mindsets to make sure your points are saying what you want them to. This is especially effective for angry e-mails (which luckily I haven’t had to write for some time). It also makes a decent quick framework if you need someone else to review the writing.

Happy writing!

[Quick Writing Tip: Content and Perception](https://SeanKilleen.com/2018/12/writing-tip-content-perception/) was originally published by Sean Killeen at [SeanKilleen.com](https://SeanKilleen.com) on December 29, 2018.
Blog Launch
Tags: announcements
Published: 2019-05-31 05:31:39

---
title: Blog Launch
published: true
tags: announcements
canonical_url: https://blog.parametricstudios.com/posts/blog-launch/
---

# Welcome to the blog!

I've been eager to start sharing tips, tricks, and the occasional tutorial for
all things software. My business partner, Joel Cunningham, may wish contribute
posts as well in his own field of expertise.

In the spirit of talking shop, this blog has been launched on
[Netlify's](https://www.netlify.com/) amazing and free hosting services via our
Github repository. We host most of our work on
[DigitalOcean](https://www.digitalocean.com), but I wanted to take advantage of
the continuous deployment perks that Netlify offers for
[Hugo](https://gohugo.io) static sites. We simply push to the master branch, and
Netlify builds and deploys our site immediately! 🎉🎉🎉

Thanks for stopping by! I'll have more to come soon. I've started what will
probably be a multi-part series of posts about writing more robust JavaScript by
using type systems to employ patterns I've learned from the
[Rust programming language](https://www.rust-lang.org/).

&ndash; Cheers 👋
Authority is not leadership
Tags: leadership, management, philosophy
Published: 2018-12-29 21:09:50

---
title: Authority is not leadership
published: true
description: 
tags: Leadership, Management, Philosophy
canonical_url: http://jesperreiche.com/authority-is-not-leadership/
---

If your only tool in your management toolbox is authority and your ability to exercise it, then you are not really a well-developed leader. Getting people to follow by way of authority, is as blunt and single-minded as leading people with a gun to their head - it does not require that much talent.

Great leadership does not come from rank, seniority or power. Great leadership comes from actions, results and trust. 

Actions is how you exercise your leadership. How you make people perform task, how these tasks combine to yield results. Through actions and results you build trust. When people see your actions being carried out in a meaningful, caring and passionate way. When they see how these actions all combine to go from vision to results. Then they will start to trust you. Then they will start to respect you as a leader.

If all they see is you exercising your power without compassion, without passion, then they might do as they are told because of your authority. But they will never respect you and they will never go out of their way to follow you or make an extra effort to deliver results.

Too many managers and leaders only use blunt force to make people perform the task they need. Too many manager and leaders does not give enough of them selves to either show compassion for the people they lead or the cause/vision they are fighting for. 

If you want people to make an extra effort and feel the same commitment for the cause, then you have to lead the way and show people that you both care for them and the cause. And that they can trust your leadership to deliver the results that are needed to reach the end goal.

Leading by power or authority has become the norm and leading by compassion, trust and actions the exception. In order to deliver better results and have people being managed living more meaningful lives, we need to have it the other way around.

It won’t be easy and it probably won’t happen overnight, but we need to raise the bar. Instead of only having managers and leaders being measured by results, which can be obtained by brute force, perhaps we should have them measured on how meaningful the people they manage, feel the work they are doing is and how much they trust their manager.

After al part of a manager/leaders job is managing people. And if we only measure their performance by the results of these people and not by how these people feel about the work they are doing or the person managing them. Then we will never know whether they are great leaders or just blunt power-people.
Normalize GraphQL response data
Tags: githunt, opensource, javascript, graphql
Published: 2018-12-29 21:00:46

---
title: Normalize GraphQL response data
published: true
description: Normalize GraphQL responses for persisting in the client cache/state.
tags: githunt,opensource,javascript,graphql
---


We all love **GraphQL** and we want to use it. There are tons of libraries and clients out there that help us do that with ease, but there is still one problem... How do you persist that data?

Yes, everything is all great when the response mirrors the exact structure we asked for, but we don't want to cache it that way, do we? We probably want a normalized version of that data which we can persist to our store and read/modify it efficiently. Flux or Redux stores work best with normalized data and there are also GraphQL clients you can use to execute queries on the local cache/state ([blips](https://github.com/monojack/blips) or [apollo-link-state](https://github.com/apollographql/apollo-link-state)), in which case, we definitely need to persist normalized data.

**GraphQLNormalizr** is simple, fast, light-weight and it provides all the tools needed to do just that, the only requirement is that you include the *id* and *__typename* fields for all the nodes (but it can do that for you if you're too lazy or you want to keep your sources thin).

{% github monojack/graphql-normalizr %}
Making an IDE
Tags: java, discuss
Published: 2018-12-29 18:59:55

---
title: "Making an IDE"
published: true
description: Making an IDE
tags: java, discuss
---
Hi, Me and my friend are planning on creating an IDE for Java, But we haven't really worked on such thing and we are wondering how difficult this could be, and also what programming languages should we use for it? we are really confused on the programming languages part because we think that it would be weird to open the program as a jar file?

~ Kind regards and Happy holidays.
rrweb: record and replay the web
Tags: githunt, webdev, javascript, opensource
Published: 2018-12-29 17:51:48

This is a library for recording user activity and storing it as a replayable video of sorts.

This is similar to [hotjar](https://www.hotjar.com) and similar services, but it's open source and seems more configurable. Inherently more configurable because you have the code.


{% github rrweb-io/rrweb %}

Currently deemed not ready for production according to the README.

_P.S._ We started a new tag called GitHunt for posts like this one. Follow the tag if you like this sort of stuff. Of course, all are welcome to contribute a post as well.

{% tag githunt %}

Happy coding! ❤️
Procrastination Season
Tags: webdev, selfimprovement, personalgrowth, productivity
Published: 2020-02-26 00:42:04

---
title: Procrastination Season
published: true
date: 2018-12-29 16:28:52 UTC
tags: web-development,self-improvement,personal-growth,productivity
canonical_url: https://medium.com/jmspaceblog/procrastination-season-e6b03011df49
---

#### I just spent 6 months procrastinating.

I really took a lot of time off. I don’t think that I got my shit together in that time.

![](https://cdn-images-1.medium.com/max/1024/1*ZO0EUppuWgoIef_4X52mvw@2x.jpeg)

I’m still procrastinating but I’m over the feeling of doing nothing. I haven’t coded like I use to in so long that I think I need to start over learning everything. I haven’t looked at a wireframe.

I think about coding and occasionally I sit at my laptop and nothing gets done. Really. I only use my laptop to code. So if I don’t code, my laptop doesn’t get turned on, and if my laptop doesn’t get turned on, it doesn’t update as often as it should and if it’s trying to update when I use it, I can’t code during that time period because I only have 2 GB of RAM. So once I realize that my laptop is updating, I simply just shut it down, so it can update. You win Windows 10.

I think I got to the point where I just didn’t want to do anything. My laziness kicked in and I just prefer to not do anything.

I haven’t even finished my online coursework, yet. Luckily for me, I can just enroll in a new class every time I get behind. But this is also the reason I haven’t finished. _No real deadline._

- Maybe I was getting overwhelmed or bored.
- Maybe I had too much on my plate at that time.
- Maybe I lost my motivation.

### It’s time to get back in gear.

![](https://cdn-images-1.medium.com/max/1024/1*wMOasR7xK1IER0LOCDCB1w@2x.jpeg)

So I’m completely changing my schedule for doing things until it works and continues to work.

I’m going to to try block scheduling. It’s something I haven’t tried. So I’m going to see if it can help me. I’m also going to commit to my BUJO. This is a creative way to schedule my day and think in terms of goals and other things that need to be done. I count BUJO as a small creative outlet.

Once I figure out the best way and time to do everything, I will refer back to an article I wrote about getting stuff done. I should read it every time I feel like I’m starting off wrong.

[How to Make Time for Laziness](https://link.medium.com/tnEVyV2L1S)

* * *
What did your first website design look like?
Tags: discuss, beginners, webdev
Published: 2018-12-29 12:30:37

Hello friends. As we approach the decline of 2018, I took a trip down memory lane to my first ever website design and thought I'd share it with you all.

![My first website design](https://thepracticaldev.s3.amazonaws.com/i/ecjzu7c38wuqegqc53za.png)

Although this feels slightly embarassing 😳, I am also curious to seeing how you did on your first attempt.

## Some context

This piece was done during the summer of 2006 when a couple of friends asked for my help in putting together a website as part of the Croydon Supplementary Education Project. I didn't know HTML and CSS at the time, so I used web software to put this screen together instead.

Frustrations from this experience led me to [**Sams Teach Yourself HTML 4 in 24 Hours**](https://amzn.to/2Q79iIt). And the rest is pretty much history.

Please share your experience **as well as some screenshots if any**. _This page might take longer to load the more images that are added but it will be worth it!_😜
How to Start Blogging When Faced with Imposter Syndrome
Tags: writing, impostersyndrome, howto, selfhelp
Published: 2018-12-30 02:59:49

---
title: How to Start Blogging When Faced with Imposter Syndrome
published: true
tags: writing,imposter-syndrome,howto,selfhelp
canonical_url: https://SeanKilleen.com/2018/12/how-to-start-blogging-imposter-syndrome/
---

I had this drafted for a while as notes I’d sent to someone who is faced with imposter syndrome and not sure they have something to add, and I figured I would write it up here rather than stashing it in my drafts.

## “What do I have to add to the Conversation?”

You have a ton. Your story is invaluable, and your skills can absolutely help someone, somewhere, level up.

We need your voice!

## “But where do I get started?”

Some ways I approached this when getting started:

- What are some good pieces of advice that you’ve gotten? Can you group any of them by subject or context? Boom, blog post.
- What is something new you’re excited about? Why? Add a little research and boom, blog post.
- Imagine someone showed up at your job as a new hire. They’re smart but unfamiliar with all of your tools & techniques. Which things would you teach them as tips first? The bullet points for those tips could probably be a bunch of blog posts.
- What’s a problem you’re chewing on right now? Why do you think the solution is less accessible? Any ideas on how the solution could be easier to get through? Blog post.
- What are some things you’d do to level up people to where you are? Someone needs a bridge from where they are to where you are.
- Also, anything that takes you more time than you wished it had – definitely good blog post material. My most popular blog post is still “how do I remove table formatting in Excel?” Thousands and thousands of hits. I wrote it for myself so that I’d stop hunting for the exact steps.
- I’ve also found it helpful to keep a list of topics publicly and seek feedback. All of my blog posts are drafted as github issues first, for example. Gives you permission to let something sit if it’s not ready, and get feedback at all points.

## Are you looking to get started?

Let me know in [my AMA](http://github.com/SeanKilleen/ama) and I’ll be happy to help you out.

## What other advice do you give those who are getting started?

Sound off in the comments!

[How to Start Blogging When Faced with Imposter Syndrome](https://SeanKilleen.com/2018/12/how-to-start-blogging-imposter-syndrome/) was originally published by Sean Killeen at [SeanKilleen.com](https://SeanKilleen.com) on December 28, 2018.
fzf is my tool discovery of 2018
Tags: fzftiptool
Published: 2018-12-29 12:08:22

---
title: fzf is my tool discovery of 2018
published: true
description: sharing my discovery of the fzf tool this year
tags: fzf tip tool
---

This year I discovered the command-line tool [fzf](https://github.com/junegunn/fzf) by accident while experimenting with Vim plugins (long story).

In the words of the website:

> It's an interactive Unix filter for command-line that can be used with any list; files, command history, processes, hostnames, bookmarks, git commits, etc.

It very quickly become an indispensable tool that I use on Linux and macOS. Examples of how I use it are:

- Search my command history.

- Combined with [z](https://github.com/junegunn/fzf/wiki/examples#z) it makes it trivial to navigate around previous directories.

- I use the following script to select an account from the file `accounts.ledger` before running [ledger](https://www.ledger-cli.org/). 

```bash
#!/bin/bash
account=$(sed 's/^account //' accounts.ledger | fzf)
if [[ $account != "" ]]; then
    ledger reg $account "${@}"
fi
```
dotnet-guid: Generate GUIDs/UUIDs with the Command Line
Tags: dotnet, dotnetcore, powershell, terminal
Published: 2020-03-24 14:23:19

---
title: dotnet-guid: Generate GUIDs/UUIDs with the Command Line
published: true
date: 2018-12-29 11:58:00 UTC
tags: dotnet, dotnetcore, powershell, terminal
canonical_url: https://sebnilsson.com/blog/dotnet-guid-generate-guids-uuids-with-the-command-line/
---

There have been a few projects, although not many, which I've been involved in, where generating [GUIDs/UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier) has been important. For that, I used to use online-tools like [https://guidgenerator.com](https://guidgenerator.com), but when I switched machine, the autocomplete in my browser lost that link.

Minimally for this reason, and mostly for fun, I decided to write a [.NET Core Global Tool](https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools) which quickly generates one or multiple GUIDs/UUIDs, in whatever format could be needed.

## Installation

Download the [.NET Core SDK 2.1](https://aka.ms/DotNetCore21) or later. The install the [`dotnet-guid`](https://www.nuget.org/packages/dotnet-guid) .NET Global Tool, using the command-line:

```
dotnet tool install -g dotnet-guid
```

## Usage

```
Usage: guid [arguments] [options]

Arguments:
  Count Defines how may GUIDs/UUIDs to generate. Defaults to 1.

Options:
  -?|-h|--help Show help information
  -n Formatted as 32 digits:
                00000000000000000000000000000000
  -d Formatted as 32 digits separated by hyphens:
                00000000-0000-0000-0000-000000000000
  -b Formatted as 32 digits separated by hyphens, enclosed in braces:
                {00000000-0000-0000-0000-000000000000}
  -p Formatted as 32 digits separated by hyphens, enclosed in parentheses:
                (00000000-0000-0000-0000-000000000000)
  -x Formatted as four hexadecimal values enclosed in braces,
                where the fourth value is a subset of eight hexadecimal values that is also enclosed in braces:
                {0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
  -e Defines if the GUIDs/UUIDs should be empty, using zero-values only.
  -u Defines if the GUIDs/UUIDs generated should be upper-cased letters.
```

## Examples

To get a single GUID/UUID, simply type:

```
guid
```

To get 3 random GUIDs/UUIDs, with letters in upper-case, formatted with brackets:

```
guid 3 -b -u
```

You can find the [source-code on GitHub](https://github.com/sebnilsson/DotnetGuid), the [package on Nuget](https://www.nuget.org/packages/dotnet-guid/) and the [latest builds on MyGet](https://www.myget.org/feed/sebnilsson/package/nuget/dotnet-guid).

You can find [a great list of more .NET Core Global Tools on GitHub](https://github.com/natemcmaster/dotnet-tools), maintained by Nate McMaster.
What's your 🎉New Year Resolutions🎉 ?
Tags: discuss, productivity, meta, career
Published: 2018-12-29 11:57:58

I know you all must be thinking, "Ugh... Not this again. These things never work!"
But they can. Hear me out!
Recently I was reading a great [article](https://www.nytimes.com/guides/smarterliving/resolution-ideas) about new year resolutions by the New York Times. After reading that, I realized that the reason I have achieved my resolution this year is 

![](https://i.imgur.com/owNSQki.png)

Yes, community. Last year I shared my goals with someone and it helped me achieve it. You must have seen those Youtube channels where people share their body transformation journey through video(s). A big part of their success is the accountability they create by recording those videos. They become more committed to their resolutions when they feel thousands - even millions - of people are watching!

So how about we spend this last weekend of the year for something good? Let's tell each other about our new year resolutions, and if any of us can help someone else in their resolutions, then reply to their comment. 🤓

**My Resolution:** Well, I had a lot of fun and learned so much while creating [Dev10](https://dev.to/teamxenox/-dev10--a-christmas-gift-for-the-best-community-on--44bg). So this year, my primary resolution is that *I will create or contribute to at least 12 Open Source Projects*, along with a few small other resolutions. 

## Bonus!!

Github is a cool place. I was browsing through the explore page of Github and I found that someone had a public repo named NewYearResolution2019. I thought damn, that's a brilliant idea to leverage the help of the community to achieve your goals. So I made "The Resolution Board" template. 
Fork it! Fill it! Commit it!

{% github sarthology/ResolutionBoard %}

If you think that sharing your goals with the community is a good idea then you can make it public, and if not, you can still use it as a private repo. I have also added a [HELPME.md](https://github.com/sarthology/ResolutionBoard/blob/master/HELPME.md) file to get you started. 

Once you have done that, just use Dev.to integration to pin that repo to your Dev.to profile. 
![](https://i.imgur.com/xz7MNhV.png)
![](https://i.imgur.com/e3RnKTL.png)

Dev.to is the best community for devs. So I thought this would be the best way to take help from the community. 

Anyways, I wish for everyone here to achieve their goals. Even if you don't, worry not, because this Resolution Board will be there to reflect your efforts at the end of the year. All the best and 🎉**Happy New Year**🎉.

![](https://media.giphy.com/media/HyDfNCZlTn5iU/giphy.gif)
Blog RSS feed in Devto
Tags: discuss
Published: 2018-12-29 10:34:28

---
title: Blog RSS feed in Devto
published: true
description: Blog RSS feed in Devto
tags: discuss
---
Hello Dev's, Including **Blog Rss feed into Devto** is good?

Anyone have done this, please give me your tips or review on it.

Thank you in advance.
therichpost