サクサク読よめて、アプリ限定げんていの機能きのうも多数たすう!
トップへ戻もどる
画が力りょくアップ
blog.ojisan.io
最近さいきん久ひさしぶりに React Router を使つかう機会きかいがあった。 SSR不要ふような要件ようけんだったのでNext.jsではなく Vite を選えらんだら、ルーターが必要ひつようとなり React Router を選定せんていした。 React Router は Remix との統合とうごうもある通とおり、もはやただのルーターではなく、fetch や form action までもサポートされている。 採用さいようにあたって考かんがえるのはどこまで React Router の機能きのうを使つかうかだ。 自分じぶんは router が欲ほしくて入いれるので fetcher や action は不要ふようだ。 一方いっぽうで React Router を FW と考かんがえると FW の標準ひょうじゅんに乗のるのは自然しぜんな発想はっそうにも思おもえる。 今回こんかい、React Router の機能きのうに寄よせて開発かいはつしてみて、この機能きのう使つかう・この機能きのう使つかわないという土地とち勘かんができたのでメモをしておく。 router ルーターライブラリなので
業務ぎょうむ委託いたく期間きかんを含ふくめて4年ねん在籍ざいせきした日本経済新聞社にほんけいざいしんぶんしゃを退職たいしょくしました。 日経にっけいに入はいるまで 自分じぶんが日経にっけいに入はいった理由りゆうは3みっつあり、 そろそろ健康けんこう保険ほけんが切きれそうだったから Web標準ひょうじゅんへの理解りかいが求もとめられる仕事しごとをしたかったから 情報じょうほうを編纂へんさんすること、発信はっしんすること自体じたいに興味きょうみがあり、興味きょうみと事業じぎょうドメインがマッチするから です。なんと自己じこ中ちゅうな・・・ 前まえの会社かいしゃを辞やめてフリーランス(と名乗なのってはいたがどちらかというと無職むしょくの方ほうが実態じったいには近ちかかった)になったときの話はなしも書かいておくと、元々もともとは営業えいぎょうから入社にゅうしゃした職場しょくばで活躍かつやくできず逃にげるようにエンジニアになったものの、その道みちで進すすんでいこうにも未み経験けいけんで基礎きそ的てきな能力のうりょくが無なかったので勉強べんきょう期間きかんを作つくりたくなって辞やめました。当時とうじ社会しゃかい人じんを経験けいけんして思おもったのは、社会しゃかいでは期待きたいされる人ひとに成長せいちょうできる仕事しごとが任まかされていくので、ブートストラップに失敗しっぱいした自分じぶんはこれから常つねに不利ふりな戦たたかいを強しいられ続つづけそうだということです。なので勉つとむ
Next.jsを初心者しょしんしゃ向むけツールとして捉とらえている自分じぶんが、実践じっせん Next.js を読よんでみて2024-03-28 この記事きじは 実践じっせん Next.js の書評しょひょうです。 見本みほん誌しを頂いただいた上うえでの記事きじです。(PR記事きじ?) tl;dr App Router のメリットを理解りかいしつつも、学習がくしゅうコストに割わり合あわないと思おもっている人ひとにオススメ!ドキュメントを読よめるようになるし、学習がくしゅうコストが下さがる。 はじめに 自分じぶんはどちらかというと今いまの Next.js に対たいしては否定ひてい的てきな感情かんじょうの割合わりあいの方ほうが高たかく、仕事しごとで困こまらない程度ていどの最低限さいていげんの知識ちしきしか持もっていない。 しかし、なんだかんだ勉強べんきょうの必要ひつよう性せいに駆かられていて、そのキャッチアップとして同書どうしょの発売はつばいを楽たのしみにしていた。 そんな折おりに @takepepe さんから見本みほん誌しをいただいたことで、この週末しゅうまつに読よんだので書評しょひょうを書かきたい。 俺おれは今いまのNext.jsが好すきではない 書評しょひょうを書かく前まえにポエム書かかせてくれ!
aiko のモノマネとは? いわゆるコールアンドレスポンスです。 aiko のライブに行いくと「男子だんしー?」「女子じょしー?」「メガネー?」って言いわれて「いぇええ」って答こたえるのですが、それをしました。 理由りゆうとしては当日とうじつの視聴しちょう者しゃの層そうが分わからなくて、DockerやNginxといった直接ちょくせつPHPと関係かんけいない話はなしをどれほど前提ぜんていにして話はなしていいのかを知しるためのアンケートが目的もくてきです。 半分はんぶんくらいに別わかれるという想定そうていだったのですが、会場かいじょうの雰囲気ふんいき的てきにはDocker使つかっている人ひとがほとんどで少すこし驚おどろきました。 なのでDockerの説明せつめいは結構けっこう端折はしょって進すすめました。(その結果けっか、5分ふんくらい早はやく終おわってしまった...) 資料しりょう自体じたいははてぶでバズっていたみたいなのですが、誰だれもaikoに言及げんきゅうしていなくて悲かなしい気持きもちになりました。 なにを話はなしたのか Laravel を Docker で動うごかす際さいに Apache や Nginx を要求ようきゅうされることに対たい
FrankenPHP を CloudRun で動うごかして、1イメージだけでサーバーを実行じっこうできるのか試ためしてみる2024-03-06 隙すきあらば自分じぶん語かたり1 3/8 14:40-15:20 に PHPerKaigi で話はなします。 PHP を Docker に固かためてデプロイするときに ApacheやらNginxが求もとめられることに対たいして、そもそも Webサーバーとは何なにかという話はなしをします。 FrankenPHPも、Dockerに固かためてデプロイするときの解決かいけつ策さくの一ひとつとして紹介しょうかいします。 see: https://fortee.jp/phperkaigi-2024/proposal/42d9e721-b3e8-4a7d-ae88-1727ccfabf9b 隙すきあらば自分じぶん語かたり2 年ねんパスを持もっていたので小ちいさい頃ころユニバによく行いっていました。 ユニバにモンスター・メーキャップ っていうフランケンシュタインが出でてくるアトラ
普通ふつうこういうブログって一いち年ねんの締しめに書かくようなものだが、ラーメンにハマったのが去年きょねんの後半こうはんだったというのと、最近さいきん自己じこ紹介しょうかいする時ときに「ラーメン好すき」って言いうと「どこが好すき?」「どこ行おこなった?」と聞きかれるので、何なにか今いままでのまとめを作つくるかと思おもって書かいている。今年ことしの総集編そうしゅうへんは今年ことしの末すえにやると思おもう。 最近さいきんラーメンにハマった きっかけは同僚どうりょうと行おこなった駄目だめな隣人りんじん。 ググると SUSURU という Youtuber が行おこなっていることを知しり動画どうがを見みる。 SUSURUは毎日まいにちラーメンを食たべていることにかっこよさを感かんじ、そのままチャンネルを登録とうろくする。 そしてどはまりし、毎日まいにち更新こうしんされる動画どうがを毎日まいにち楽たのしみに見みるようになってしまった。 日頃ひごろから過去かこ動画どうがも漁あさっており、店みせを認知にんちした結果けっか、SUSURUが行おこなったラーメン屋やに行いくようになる。 そして最後さいごは自分じぶんでも開拓かいたくを始はじめるほどにハマった。 厚木あつぎ家か 家系かけいの直系ちょっけい店てん。 醤油じょうゆ強つよめ、動物どうぶつ強きょうめといった明あきら
定期ていき的てきに DDD やクリーンアーキテクチャなどを題材だいざいにした記事きじが盛もり上あがっているのを見みていると、いま長年ながねんの疑問ぎもんを書かけば誰だれか答こたえてくれるのではと思おもって書かいてみる。 何なにに困こまっているかというと、 いわゆるレポジトリ層そうが持もつ create/update 関数かんすうの引数ひきすうは Entity で待まち受うけるべきか、プレーンなオブジェクトで待まち受うけるべきか分わからない ユーザーから POST Body されたデータにはビジネスルールを適用てきようさせるべきか(= 一度いちど Entity を作つくるべきか)分わからない だ。 Entity を作つくらない場合ばあい、いわゆるトランザクションスクリプトと呼よばれているものに近ちかづく。 そしてトランザクションスクリプトには結構けっこう否定ひてい的てきな意見いけんも見みられる。 しかし、自分じぶんは Entity を作つくることが必かならず正解せいかいとは思おもえず、レイヤードな設計せっけいとトランザクションスクリプトを組くみ合あわせる設計せっけいの余地よちもあると思おもっていて、トラ
新規しんき開発かいはつの設計せっけい支援しえんや古ふるいコードベースを甦よみがえらせて欲ほしいという相談そうだんをもらったときに、最初さいしょにちょろっとコードだけお手本てほん的てきなコードを書かいてから引ひき渡わたしているのだが、そのときに必かならず結合けつごうテストを書かくようにしている。 3, 4年ねん前まえから僕ぼくと付つき合あいがある人ひとからすると、 「「「あの sadnessOjisan がテストを書かくだと!!!」」」 という感かんじだと思おもうのだが、最近さいきんはテストに思おもうところもあってちゃんと書かいている。 そしてそのテストコードだが、基本きほん的てきにはアプリケーションから分離ぶんりして書かいている。その話はなしをしたい。 OGP OGP は野方のかたホープで海苔のりが分離ぶんりされて出でてきた時ときの画像がぞうだ。 アプリケーションから分離ぶんりしたテストとはどういうことか 最終さいしゅう的てきにはテスト対象たいしょうのサーバーを Docker コンテナで固かためて、そのコンテナに対たいして HTTP リクエストを投なげてその結果けっかや DB の中身なかみを検証けんしょうするコンテナを docker
どうも、仕事しごとを納おさめてしまうと、何なにも予定よていがない人ひとになってしまった人ひとです... てなわけで、公式こうしきドキュメント、リリースノート、信頼しんらいできる情報じょうほう源げん全部ぜんぶ読よんじゃうぞという計画けいかくを立たてました。計画けいかく倒たおれしないようにちゃんと読よむことをブログで宣言せんげんします! 何なにをするのか マジでやること何なにもないので、日頃ひごろサボったプログラミングの勉強べんきょうを一気いっきにしようと思おもっている。「勉強べんきょうしていない」なんていうと「嘘うそつけ」と言いわれそうだが、いつも必要ひつようになったことをその都度つど調しらべて誤魔化ごまかしているだけであり、読よむのは本ほんや記事きじといった誰だれかの二に次じ三さん次じ情報じょうほうなので、実じつは一いち次じ情報じょうほうには触ふれていない。なので以下いかに挙あげるドキュメントは実じつはちゃんと読よんだことがない。全すべて雰囲気ふんいきで使つかっている。 そのため自分じぶんは歳としの割わりには未知みちになっている範囲はんいがとても多おおく(この構文こうぶんってフリーレンぽくてなんかかっこいいよね)、未知みちの未知みちにとても弱よわいため、わかっている人ひとから見みるとおかしな
fastify で 0 -> 1 することが年としに何なん回かいかあるのだけど、その都度つどやり方かたを忘わすれて調しらべているのでメモしておく。 OGPはFastifyをコントロールしている人ひとのイラスト by DALLEだ。 Routing をプラグインで表現ひょうげんする root ファイルで fastify.get("/users/:id", (req, res) => { res.status(200).send(""); }); のようにしてもいいけど、機能きのう毎ごとにモジュール化かしておいた方ほうがあとでスケーリング効きくので、ルーティングはモジュールとして定義ていぎしたい。 そのためには FastifyPluginAsync を定義ていぎすればよく、 export const userFindRouter: FastifyPluginAsync = async (f, opts) => { f.get("/:id", {}, async (
転職てんしょくドラフトからオライリーの本ほんたくさんもらったので欲ほしかったやつとりあえず全部ぜんぶ読よんでみた。 <pr> 紹介しょうかいコード RVSC を使つかうとお互たがいにもらえるので気きになる人ひとは是非ぜひ。 https://job-draft.jp/sign_up?utm_term=RVSC </pr> オブザーバビリティ・エンジニアリング 良よい本ほん。トレーシングやOpenTelemetryの本ほんと思おもって買かっていたが、実際じっさいはオブザーバビリティを確保かくほするための色々いろいろな手法しゅほうを紹介しょうかいしている。そのような手法しゅほうが発達はったつするまでの歴史れきしの流ながれの解説かいせつも面白おもしろかった。従来じゅうらいのメトリクスとモニタリングだけでは現代げんだいの分散ぶんさんシステムのデバッグが困難こんなんということで、 オブザーバビリティ・エンジニアリングを導入どうにゅうする上じょうでの説得せっとくに使つかえそうな文言もんごんがたくさん散ちりばめられている。その手法しゅほうの一ひとつが、そもそも問題もんだいが起おきてからデバッグのためにデバッガを挟はさみ込こんでデプロイしたくないという
なんか今日きょう、megumish が CNDT 2023 で Next.js と otel の話はなしをする らしい。そこで話はなされてしまうと、下書したがきに入いれてあった Next.js と otel の記事きじが二番煎にばんせんじになって出だしにくくなりそうだったので大急おおいそぎで書かいている。 OGPは小樽おたるのnextの駅えきです。 Next.js が OpenTelemetry をサポートした Next.js v13 でサポートされている。 see: https://nextjs.org/docs/pages/building-your-application/optimizing/open-telemetry instrumentation.ts というファイルを置おいて、ここで sdk-node を起動きどうすれば計けい装そうされるという仕組しくみだ。計けい装そうには @vercel/otel というライブラリを使つかう。 ドキュメントは export as
OpenTelemetry Advent Calendar 2023 6日にち目めは sadnessOjisan がやっていきます。 約やく2ヶ月かげつぶりのブログ。サボった最長さいちょう記録きろく達成たっせいしてると思おもいます。何なにをしていたかはそのうち書かきます。今日きょうは OpenTelemetry & JS についてです。 公式こうしきのExample を使つかうとすぐに tracing を試ためせるようになっていますが、一体いったいどういう仕組しくみで、express サーバーへのリクエストがトレーシングされてログになるのかって不思議ふしぎじゃないですか?てなわけで調しらべてみました。 OGP はモンキーパッチを DALLE に書かいてもらいました。モンキーパッチが解答かいとうだからです。 公式こうしきのExample通どおりにSDKを使つかってみよう Getting Start をまずはやってみましょう。 see: https://opentelemetry.io/docs/instrum
宣伝せんでん 10/21 に rust.tokyo でカニさんタワーバトルという発表はっぴょうをする。その事前じぜん資料しりょうとして axum の内部ないぶ実装じっそうの解説かいせつを書かいているのだが、その解説かいせつを読よむためには axum の Router は tower の Service ということを知しっておく必要ひつようがあるので、そもそも Service とは何なにかという tower の導入どうにゅう記事きじを書かく。 tl;dr Webサーバーはルーティング、認証にんしょう、レートリミット、ロギングなどのmiddleware関数かんすうが積つみ重かさなったものと見做みなせる これらのmiddleware関数かんすうは Fn: (req: Request) -> Future<Response> と見做みなせ、そのmiddleware関数かんすうの中なかが別べつの関数かんすうを呼よぶことで積つみ重かさねられる 関数かんすうの中なかにmiddleware関数かんすうをハードコートすると再さい利用りよう性せいに乏とぼしくスケーリングさせにくいので、Fn: (req: Req
ひょんとしたことから PHP をやることになったのですが、Laravel を コンテナでホスティングするのが難むずかしすぎて困こまっています。とりあえず今いまできていることをメモです。こうした方ほうが良よいよ的てきなアドバイスがあったら教おしえて欲ほしいです。 ちなみに本当ほんとうは昨日きのう公開こうかい予定よていのブログでしたが、Xが急遽きゅうきょOGPに対たいする仕様しようを変かえたのでそれを踏ふまえた新あたらしいOGイメージでお送おくりします。 注意ちゅうい ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ この文章ぶんしょうは PHP + Laravel歴れき 1週間しゅうかんちょっとのペーペーによって書かかれたものです。apache も fastcgi も初はつ見みです。書かかれている内容ないようを間あいだに受うけないでください。 ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ tl;dr Docker で動うごかす最小さいしょう構成こうせいがわからないのですが、とりあえずこう書かけば動うごきはします。 FROM php:8.2-f
はじめに とても前まえになるが、コグニカル というサイトが盛もり上あがっていた。 これは知識ちしきを体系たいけい的てきに記述きじゅつされていて、分わからない概念がいねんがあればその概念がいねんの理解りかいに必要ひつような概念がいねんを逆ぎゃく引ひけるサイトだ。コンピュータ以外いがいにも数学すうがくや理工りこう学がく全般ぜんぱんを学まなべる。 コメントを見みると、インターネットを使つかった学習がくしゅうで、自分じぶんの分わからなかったことを辿たどれる学習がくしゅうや体系たいけいだっていることに対たいして価値かちを感かんじているようだ。「誰だれが何なにのためにどうやって作つくったのか情報じょうほうがぜんぜんなくて怖こわい」というコメントがあるが、同感どうかんだ。怖こわい。そして教育きょういく工学こうがくを専攻せんこうしていた身みとしては地ちに足あしついたアウトプットが人ひとの役やくに立たっていて羨うらやましくも思おもうし、尊敬そんけいする。 実じつはこのような教授きょうじゅ手法しゅほうは古ふるくから研究けんきゅうされている。それは知識ちしきをネットワークで表現ひょうげんするだけでなく、個々人ここじんの学習がくしゅう履歴りれきや成績せいせきを元もとに次つぎに学まなぶものを提案ていあんする方法ほうほうも提案ていあんされている。コグニカルを知しった時ときにその技術ぎじゅつについてのブログを書かこうと思おもっ
tl;dr 今いまある選択肢せんたくしで十分じゅうぶんにHTTPサーバーを書かける 言語げんご組くみ込こみの機能きのうのみでHTTPサーバーを書かけるように、デザインされた言語げんごはないと思おもう サーバー開発かいはつに特とく化かした言語げんごがあってもいいのではとふと思おもった はじめに 最近さいきんいくつか新規しんき開発かいはつをする機会きかいがあって言語げんごの選定せんていに頭あたまを悩なやませた。要件ようけんや状況じょうきょうやチームに応おうじて言語げんご選択せんたくの正解せいかいは変かわるとは思おもうので、現実げんじつに合あわせて妥協だきょうするしかないのだが、選択せんたくに際さいしてそもそも HTTP サーバーを書かくことを意識いしきして設計せっけいされた言語げんごがないような気きがした。いま自分じぶん達たちがHTTPサーバーを作つくれているのは、汎用はんようプログラミング言語げんごとエコシステムの力ちから、そして開発かいはつ者しゃの取捨選択しゅしゃせんたくと創意そうい工夫くふうのおかげだと思おもう。それで十分じゅうぶんに間まに合あっていると思おもう。 なのにどうしてHTTPサーバー用ようの言語げんごがあるかどうかを気きにするかと言いうと、サードパーティのエコシステムに頼たよりたくないからだ。それは長期ちょうき的てきなメンテナンス
飲のみ会かいで「お前まえ、次つぎの転職てんしょくどうするよ?」的てきな話はなしをするときはいつも これまでは自分じぶんが一番いちばん下手へたくそなバンドメンバーになれる職場しょくばを意図いと的てきに探さがしていたし、今いまの職場しょくばもその基準きじゅんで選えらんだが、そろそろ俺おれの音楽おんがくをやりたい プログラミングそのものをドメインとした仕事しごとをしたい ドキュメントやチュートリアルの整備せいびをしたい。あわよくば今こん blog.ojisan.io を書かいていること自体じたいが仕事しごとになるようなことをしたい 的てきなことを言いっている(はず、アルコールが入はいっているので記憶きおくが定さだかでない)。 で、この最後さいごの 「ドキュメントやチュートリアルの整備せいびをしたい」というのはここ1年ねんくらい言いっている気きがするのだが、そろそろ本当ほんとうに動うごき出だそうと思おもって最近さいきんふわふわ考かんがえていることを書かいてみようと思おもう。そういう仕事しごとをしている人ひとの目めに止とまってくれると嬉うれしい。 どうしてドキュメントを書かくような仕事しごとをしたいのか いまこういったブログを運営うんえいしてい
クソコードを読よませない💩 https://uit.connpass.com/event/291443/ 免責めんせき事項じこう 「クソコードという言葉ことばを使つかうな」と思おもった人ひと、いると思おもいます。 攻撃こうげき的てきで、解像度かいぞうども荒あらくて、建設けんせつ的てきでない言葉ことばだと私わたしは思おもっています。 一方いっぽうで、目めにすることも多おおい言葉ことばであり、具体ぐたい例れいに関かんしてはふわりとした共通きょうつう認識にんしきが持もたれているのと、そういったコードに対たいするダメージコントロールの話はなしなので、便宜上べんぎじょうクソコードという言葉ことばを使つかいます。とあるソースコードに対たいしてクソコードと呼よぶのはよくないですが、クソコードという概念がいねんそのものについて話はなすことに対たいしては有益ゆうえきだと思おもいます。 自己じこ紹介しょうかい sadnessOjisan JS/TS, Rust, 最近さいきん Go, PHP マイブーム: 優ゆう光こうというラーメン屋や クソコードとは何なにか クソコードとは何なにでしょうか? 知しりません。 インターネットミーム? https://tog
コンテナでサーバーを動うごかして、それに対たいするリクエストをするE2Eテストを GitHub Actions 上じょうで動うごかすことに苦労くろうしたので書かく。 成果せいか物ぶつrepo: https://github.com/sadnessOjisan/e2e-gha お題だいとなるサーバー コンテナに固かためるから別べつに何なに言語げんごでも良よいので、まずはちょっとしたエコーサーバーを書かいてみよう。 import Fastify from "fastify"; const fastify = Fastify({ logger: true, }); fastify.get("/", async function handler(req, res) { const q = req.query["q"]; res .status(200) .headers({ "content-type": "application/json", }) .se
「private 関数かんすうにはテストを書かかない」というのが多数たすう派はだと思おもう。だが昨日きのう、仕事しごとで In-source testing を書かいていたらふと private 関数かんすうにテストを書かきたくなった。そこで、In-source testingができる環境かんきょう下かでもprivate 関数かんすうにテストを書かくべきかを X で聞きいてみたら何なにか盛もり上あがっていた。 (In-source Testing: https://vitest.dev/guide/in-source.html) 反応はんのうを見みる限かぎり、やはり「private 関数かんすうにはテストを書かかない」の方ほうが主流しゅりゅうだった。Kent Beck先生せんせいの http://shoulditestprivatemethods.com を紹介しょうかいするツイートにもそういった反応はんのうが寄よせられていた。(ぶんぶんさん、教おしえてくれてありがとうございます。) (このサイト面白おもしろすぎますよね・・・) 自分じぶんの立場たちばを
axum を始はじめ、tower 系列けいれつでサーバーを作つくっているといくらでも例れいが出でてきそうな話はなしではあるが、「ちょっと君きみ、明日あしたからRust でトレーシングしたまえ」って言いわれた時ときに欲ほしいまとまった情報じょうほうは意外いがいとない気きがしたので書かく。 基本きほん的てきに tower 系列けいれつや、tower に準じゅんずる様ような Service トレイトを持もつ様ようなFWであれば同おなじ様ような話はなしであり、tracing crate 自体じたいは Agnostic なものなので、ここでは axum を例れいにあげて書かく。 axum と tracing subscriber まず、簡単かんたんに HTML を返かえすサーバーを作つくる。 use axum::{response::Html, Router}; use std::net::SocketAddr; #[tokio::main] async fn main() { let app = Router::new().route(
Rust でWebサーバーを書かく時ときの技術ぎじゅつ選定せんていをするときに調しらべていると hyper に必かならず出会であうと思おもう。これは黎明れいめい期きから存在そんざいしているライブラリで、Webサーバーにしては珍めずらしく version 1 まで到達とうたつしている老舗しにせだ(1に到達とうたつしてたら安心あんしんって考かんがえ方かたが正ただしいかはさておき...)。このライブラリは actix-web や axum のような他ほかのライブラリとは毛色けいろが違ちがい、かなり primitive だ。そのため axum のベースに使つかわれてもいて、hyper はそのまま使つかわないライブラリなのかもしれない。 サンプルコードから存在そんざい意義いぎがわかりにくい さて、そんな hyper だが公式こうしきの example はこのようになっている。 #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>>
先週せんしゅう、A Tour of Go やってみた TIL というブログを書かいてみた通とおり、Go言語げんごを始はじめた。 で、ちまちま勉強べんきょうをしていたのだが、つい最近さいきんたまたま ISUCON の過去かこ問といをやる機会きかいがあって Go のスコアを見みたら初期しょき値ちですら、チューニング済ずみの他ほかの言語げんごのスコアを超こえていて、絶対ぜったいに習得しゅうとくするぞの気持きもちにさせられた。 ちなみに私わたしはどう言いうわけかフロントエンドのソースコードをビルドしたら vite が走はしってファイルハッシュが全部ぜんぶ変かわって、ベンチマークからアクセスできなくなって0点てんでした。対戦たいせんありがとうございました。 なにはともあれ、本番ほんばんは絶対ぜったいにGoでやるぞの気持きもちを新あらたに Go の習得しゅうとくに励はげんでいた。前まえのブログでは、文法ぶんぽうが分わかったから HTTPサーバー DB Connection / Migration 境界きょうかい値ちチェックや型かた推論すいろん テスト スキーマ駆動くどう開発かいはつ コンテナデプロイ あたりをやってみたいと
OGPは白川郷しらかわごうだ。石川いしかわ県けんに住すんでいたときよく白山はくさん白川郷しらかわごうホワイトロードをドライブして遊あそびに行いっていた。早はやくに閉しまるから帰かえりは富山とやま側がわに出でて日本海にほんかい側がわで美味おいしい魚さかなを食たべて石川いしかわに戻もどっていた。あのときは楽たのしかったなぁ。 今年ことし、ISUCONに挑戦ちょうせんするつもりの夏休なつやすみの過すごし方かたをしているので Go の勉強べんきょうを始はじめた。自分じぶんには既すでにNode.js とRustが Main/Sub weaponになっているので、別べつにISUCON向むけに勉強べんきょうしなくていいと思おもっていたが、どうも上位じょうい勢ぜいは軒並のきなみGoっていうのと、彼かれらの解法かいほうブログを読よみ解とくためにはGoをやっていた方ほうがよさそうだったのでGoの勉強べんきょうを始はじめた。 ちなみにGoは生涯しょうがいで3行ぎょうしか書かいたことがない(うち2行ぎょうはHTMLテンプレート)生粋きっすいの素人しろうとだ。いや正確せいかくには遥はるか昔むかしに勉強べんきょうに挑戦ちょうせんしたことがあって本ほんを一いち冊さつ買かった覚おぼえはあるが、A Tour of Go の冒頭ぼうとうで「ほぇ〜大文字おおもじでexpor
一昨日おとといくらいに 「DIP してもどうせ辛からくなるよね」的てきなことを適当てきとうにツイートしたら引用いんよう RT や RT 後ご言及げんきゅうやエアリプで言及げんきゅうされた上うえに「こいつは設計せっけいを何なにも理解りかいしとらん」みたいなことを言いわれた。「俺おれは本当ほんとうに何なにも理解りかいしていないのか?」と不安ふあんになったので、自分じぶんの考かんがえをちゃんと書かいておこうと思おもった。先さきに自分じぶんの立場たちばを言いうと、なんたらアーキテクチャとか SOLID 原則げんそくは有用ゆうようだし自分じぶんも使つかうが、それを厳守げんしゅしようとは思おもっていないと言いう立場たちばだ。 DIP とはなんだったか DIP(依存いぞん性せい逆転ぎゃくてんの原則げんそく)は SOLID 原則げんそくの一ひとつで、一言ひとことで言いうと「抽象ちゅうしょうに依存いぞんさせると依存いぞん関係かんけいが逆転ぎゃくてんする」といったものだ。何なにのことやらという風ふうになるので例れいだけ挙あげると、UserRepository と UserService があってこのように定義ていぎすると class UserRepository { get() { return dat
この前ぜんポジショントークしたらそれなりに反響はんきょうがあったので書かいてみる。 これまでの人生じんせいを振ふり返かえると毎年まいとしラジオや電話でんわや配信はいしんサービスを作つくっている気きがするし、なんかそういう仕事しごとが回まわってくることが多おおい気きがする。 最近さいきん自分じぶんなりに答こたえが出でたかなと思おもったことがあるので言語げんご化かしてみようと思おもう。 OGP は Flux ぽい画像がぞうだ。 注意ちゅうい・免責めんせき事項じこう ここにあるソースコードは不完全ふかんぜんです。これは私わたしが元々もともと手元てもとで実験じっけんしていたボイラープレートであるとはいえ、いろんな仕事しごとで培つちかったノウハウ的てきなものも含ふくまれているので、念ねんには念ねんを入いれて意図いと的てきに要件ようけんが透すけそうな箇所かしょは削除さくじょしています。 その結果けっか元々もともとのボイラープレートと乖離かいりしてしまい、動作どうさしないコードになっています。ただ概念がいねんを伝つたえるには十分じゅうぶんなコードになっているはずなので、脳のう内ない補完ほかんしてください。質問しつもんは Twitter のメンション、もしくは Issue でのみ受うけ付つけます。 (完全かんぜん版ばんを書しょ
先日せんじつ フロントエンドの Monorepo をやめてリポジトリ分割ぶんかつしたワケ というブログがバズっていた。そのおかげか、Twitter でもモノレポに関かんする言及げんきゅうがちょこちょこあった。一家言いっかげんあるドメインなので書かきたい。ただの一家言いっかげん(a.k.a お気持きもち)なのでぜひ皆みなさんの意見いけんも聞きいてみたい。 tl;dr 別べつに自分じぶんはどっち派はとかではなく、どっちも選えらぶ。強しいて言いうならリポジトリ分割ぶんかつ派はで、依存いぞん更新こうしんがしんどくなったら monorepo 派は。 免責めんせき モノレポに対たいする一家言いっかげんを書かきたいだけであって、内容ないよう自体じたいはフロントエンドの Monorepo をやめてリポジトリ分割ぶんかつしたワケ と全まったく関係かんけいなく、そのブログで述のべられている施策しさくについては何なにも言及げんきゅうしません。ただ一ひとつ言及げんきゅうするとしたら肉にくの部位ぶいがコードネームに採用さいようされているのは良よいと思おもいました。🍖🍖🍖 モノレポにしたくなる状態じょうたいの前提ぜんていにあるもの 前提ぜんていは元もと記事きじと同おなじように
自分じぶんのブログを辿たどってみたところ Rust を 2020 年ねんには書かいているようだが、初心者しょしんしゃを名乗なのらせていただく。なぜならブログのネタにする以外いがいで Rust 書かいたことないし、これも調しらべながら書かいているからだ。もっと練習れんしゅうしたい、どこかに Rust を書かける機会きかいないかな〜チラッチラッ 👀 なぜありふれていそうな題材だいざいで書かくか 題材だいざいはありふれているし解説かいせつもたくさんあるが、それらを読よんで理解りかいできるのか?という疑問ぎもんがある。というのも、所有しょゆう権けん、借用しゃくよう、ライフタイム自体じたいについての説明せつめいは至いたる所ところで見みるが、これらが無ないと何なにが大変たいへんなのか、導入どうにゅうすることで何なにが解決かいけつされるかがよく分わからないと思おもうからだ。勿論もちろん、そのような点てんまで解説かいせつしてくれているものもたくさんあるが、正直しょうじきなところ Not for Me だった。何なにが Not for Me だったかというと、C++ の知識ちしきやコンピュータサイエンスの知識ちしきがあることが前提ぜんていになってい
次つぎのページ
このページを最初さいしょにブックマークしてみませんか?
『blog.ojisan.io』の新着しんちゃくエントリーを見みる
j次つぎのブックマーク
k前まえのブックマーク
lあとで読よむ
eコメント一覧いちらんを開ひらく
oページを開ひらく