本書は、Lydia Hallie 氏 と Addy Osmani 氏らによる Learning Patterns (https://www.patterns.dev/) の日本語訳です。原著は大きく 3 つのセクションに分かれていますが、本書は、その最初のセクションである Design Patterns を訳したものとなります。
Python Design Patterns¶ Welcome! I’m Brandon Rhodes (website, Twitter) and this is my evolving guide to design patterns in the Python programming language. This site is letting me collect my ideas about Python and Design Patterns all in one place. My hope is that these pages make the patterns more discoverable — easier to find in web searches, and easier to read — than when they were scattered acr
この記事はRust Advent Calendar 2021の12/8日の記事です。 Rust前提の記事として書きましたが、他の言語にも適用できる考え方なので、ほかの言語勢の方々もよければお付き合い下さい。 今回のテーマは「Rustで真に安全なプログラムを書く方法」についてです。 「真に安全なプログラム」の定義は以下とします。 挙動が安定し、結果が予測可能となる 正しさの基準に基づき、プログラムの間違いを検知することができる 「真に」とはドメイン知識に基づく正しさという意味です。詳しくは後述します。 それと「そもそもRustで実装されるプログラムは安全じゃないのか」という想定質問については「メモリの操作は安全。だが、それだけでは真に安全なプログラムにはならない」が答えになります。これについて興味がある方、ぜひ最後までお付き合いください。 「真に安全なプログラム」を実現するレシピとしては「関
Nature株式会社ファームウェアエンジニアの中林 (id:tomo-wait-for-it-yuki) です。 本記事では、拙著『基礎から学ぶ 組込みRust』1がC&R研究所様より出版されたので、書籍の紹介やNatureのファームウェア開発にRustを使っていきたい、ということを書きます。 本を書きましたエントリは個人ブログで書いている2ので、それとは少し違った観点から話をしたいと思います。 『基礎から学ぶ 組込みRust』の紹介 2021年5月現在、Rustはすでにマイナーの域を超えたと言って差し支えない状況でしょう。一方、組込みRustはまだまだマイナーな分野です。『基礎から学ぶ 組込みRust』出版をtwitterやブログで告知した際も、「Rustって組込みできたんだ?」という反応が少なくありませんでした。 マイナー扱いから脱するための施策として、認知度を上げ、入門を手厚くする、
僕はコードを読むのは得意な方だけど、それが過ぎてコードを書かなくてもシニアソフトウェア開発者になってしまった。実はコードをちゃんと読めるソフトウェア開発者って希少価値が高いのではないか、と思ったので自分がどんな感じでシニアになったのかをまとめてみた。似た様な人の参考になれば幸いだ。 同意。僕は未だ書く方はほとんど機会なく成果もないけど、コードを読み尽くして、負荷試験や本番で挙動を把握し続け、メトリクスでとことん確かめていった結果、Sr. Engineer になれた。 https://t.co/KXtMdEaRr8 — Ryosuke Iwanaga (@riywo) April 16, 2021 コードを書かなくてもシニアソフトウェア開発者になれた 僕は今 Amazon の Sr. Systems Development Engineer という職種で働いている。いわゆるソフトウェア開発職
※本記事は2020年4月に公開した内容です。 株式会社ディー・エヌ・エーのシステム本部CTO室の露木誠です。PythonやDjangoについて執筆した『パーフェクトPython』や『Django×Python』などの著書が技術系出版社から数冊出版されています。DjangoのAUTHORSファイルにも実は名前が掲載されています。 本記事では、Pythonを始めたいと思っている方向けに、Pythonの魅力をお伝えできればと思います。知っておきたいPythonの言語仕様や特徴的な考え方をご紹介しますので、参考にしてください。 Python関連のエンジニア案件を見てみる 自己紹介とPython、Djangoに関わる活動について ディー・エヌ・エーのCTO室に所属、元々は異業種からIT業界に参入 現在は、株式会社ディー・エヌ・エーのシステム本部CTO室で、エンジニア組織の課題解決を主な活動として、日
出典: https://www.npmtrends.com/typescript TypeScriptはJavaScriptを拡張して作られたプログラミング言語です。トレンドが示すとおり、TypeScriptはJavaScriptに代わって第一に選択される言語になりました。TypeScriptが提供する静的型システムは、コードの保守性と可読性を大幅に向上させます。またブラウザ等の互換性を心配することなく、モダンで便利なJavaScriptの機能を利用できます。 TypeScript DeepDiveは初心者からベテランまで役立つオープンソースのドキュメントです。JavaScriptのモダンな機能からTypeScriptの様々な魔法に至るまで丁寧に説明されています。多くのコードサンプルがあり、具体的なTypeScriptの使い方を簡単に理解できます。TypeScript DeepDive日本
Click here for English version *追記:Student Goで発表しました。 speakerdeck.com クリーンアーキテクチャとは 以下を実現することで、関心の分離をするアーキテクチャパターンです。 ドメインロジックを独立させる フレームワークを独立させる UIを独立させる DB含む外部の全てを独立させる ドメインロジックをテストしやすくする 詳しくは様々な記事で説明されているので、今エントリでは割愛し実装パターンに絞って紹介します。 Clean Coder Blog 持続可能な開発を目指す ~ ドメイン・ユースケース駆動(クリーンアーキテクチャ) + 単方向に制限した処理 + FRP - Qiita サンプルアプリケーション ↓サンプルコード github.com 仕様は、/users にPOSTすることでユーザー登録するだけのapiです。 基本はma
Go は goroutine という非同期の仕組みを提供していますが、使い方次第では色々なパターンが実装できる為、初めて goroutine を見た人はどの様な物が正解なのか分からない事があります。以前、このブログでも紹介した事がありますが Go の非同期の仕組みは一見単純な様に見えて実はとても奥深いのです。 Big Sky :: golang の channel を使ったテクニックあれこれ golang の channel は他の言語に見ない独特のパラダイムを開発者に提供します。 単純にスレッド間でメッセージングをするだけでもC言語で書けばそこそこの量になったり、慣れていない人であればど... https://mattn.kaoriya.net/software/lang/go/20160706165757.htm 2012 年に Rob Pike 氏が Google I/O で「Go
NTT データ数理システムでリサーチャーをしている大槻 (通称、けんちょん) です。 今回はソートについて記します。 0. はじめに データ構造とアルゴリズムを学ぶと一番最初に「線形探索」や「ソート」が出て来ます。これらのテーマは応用情報技術者試験などでも頻出のテーマであり、アルゴリズムの Hello World とも呼ぶべきものです。 特にソートは、 計算量の改善 ($O(n^2)$ から $O(n\log{n})$ へ) 分割統治法 ヒープ、バケットなどのデータ構造 乱択アルゴリズムの思想 といった様々なアルゴリズム技法を学ぶことができるため、大学の授業でも、アルゴリズム関連の入門書籍でも、何種類ものソートアルゴリズムが詳細に解説される傾向にあります。本記事でも、様々なソートアルゴリズムを一通り解説してみました。 しかしながら様々な種類のソートを勉強するのもよいが、「ソートの使い方」や
ブロックチェ-ンの仕組みを知るには構築するのが最短の方法 この記事を読んでいるということは、仮想通貨の拡大に興奮しているということですね。ブロックチェ-ンの仕組み、背後にある基本的なテクノロジーについて知りたいのでしょう。 しかしブロックチェ-ンを理解するのは簡単ではありません。少なくとも私にはそうでした。大量の動画の中をさまよい、抜けだらけのチュートリアルに従い、結局、実例が少なすぎてフラストレーションが大きくなりました。 私は手を動かして学ぶのが好きです。コードのレベルで内容を扱わざるを得なくなり、そうすることで身に付くからです。同じようにやってもらえば、この解説が終わる頃には、機能するブロックチェーンが出来上がり、どのように動くかがしっかりと把握できるようになるでしょう。 準備 ブロックチェ-ンとはブロックという名の 不変でシーケンシャルな 一連のレコードだということを覚えてください
最速で知る! プログラミング言語Rustの基本機能とメモリ管理【第二言語としてのRust】 Rustは、新しいシステムプログラミング言語です。本稿では、基本的な構文に加えて、所有権、参照と借用、ライフタイムといった特徴的な機能によるメモリ管理を解説します。 κeen(@blackenedgold)です。Rustの入門を担当することになりました。基本的な文法と使い方を説明しつつ、Rustの特徴的な機能と、なぜその機能が必要かというモチベーションを紹介していけたらと思います。 Rustは非常に高機能であり、この記事ですべてを紹介できません。興味を持った方は、ぜひ公式ドキュメントを読んでみてください。私が管理している和訳もあります。 The Rust Programming Language プログラミング言語Rust Rustはシステムプログラミング言語 Rustのインストール Hello W
<この記事は「Money Forward Advent Calendar 2015」の22日目の記事です> この記事は、iOS Clean Architectureと実際にコードへ適用した内容について紹介します。 コードについては、改善の余地があるため随時修正していくと思います。 → github: https://github.com/koutalou/iOS-CleanArchitecture iOS開発においてよくある問題点 「ビジネスロジックはModelに置くべき」と言うが、開発者によって理解や意見がバラバラで統一的な実装ができない 度重なる仕様変更や複雑な仕様に対応するためにViewControllerや特定のModelが肥大化し、ビジネスロジックの本質を見失う MVC,MVP,MVVMだけで考えると、どこかのレイヤが複数の責務を持つことになり依存度の高い複雑なコードが生まれてし
10分で実装するFlux 自己紹介 azu @azu_re Web scratch, JSer.info Flux /flˈʌks/ Fluxとは Facebookが提唱したSmalltalk MVCの焼き直し CQRS(Command Query Responsibility Segregation)と類似 データが一方通行へ流れるようにするアーキテクチャ ウェブUIについてそれを適応する 今日の目的 小さなFluxの実装を作りながらFluxついて学ぶ Fluxの特徴: Unidirectional data flow 本当にデータが一方通行に流れるのかを確認する Fluxでよく見る図 登場人物 何か色々いる Action Creators, Dispatcher, Store, React Views... Dispatcher = EventEmitterと今回は考える もっと実装的
Go言語はシンプルさを念頭にデザインされた言語です。仕様は単純明瞭さのために小さく収められていますが、そのため表現力に欠けているとか、コードが冗長になるという印象を持つ人も多いでしょう。有名なところでは、ジェネリクスや例外といった機能が(今のところ)存在しないことが問題にされることが多いようです。 一般に、ソフトウェアエンジニアリングというものは書かれる言語だけに依るものではありません。視点を拡げてGoを取りまくツール群を含めて見てみると、go fmt や goimports といったツールが広く使われていること、また go generate コマンドの存在などを見ても、Goという言語には、人間のプログラミングを機械によってさまざまな面から補助しようという態度があります。
Rust は、Firefox を開発する Mozilla が開発し、次世代ブラウザの開発に使っているプログラミング言語です。借用検査という概念を導入することによりメモリ安全およびデータ競合安全をコンパイラが保証する言語であり、2015年中頃の安定版のリリースあたりから次第に注目を集めるようになりました。 メモリ安全とは、メモリの範囲外アクセスや二重解放、ヌル参照、未初期化領域へのアクセスがない状態を表します。ただし、Rust の言うメモリ安全とは、メモリリークをしないことを保証するものではありません。 データ競合安全とは、あるひとつのオブジェクトに対しての読み込みおよび書き込みのが同時に起き結果が不定になる状態にならないことを表します。競合状態とは異なります。 無名関数という概念を様々な言語が次々と導入したように、プログラミング言語は相互に影響を及ぼし徐々に変化しています。Rust は「寿
Go の言語仕様はシンプルで他の言語に比べてはまりどころが少なくて学習コストが小さめな言語のように思います。しかし、それでもはまるところがないわけではないので、自分がはまって時間を無駄にしてしまったことを書き留めておきます。 念の為誤解のないように追記しておくと、この文書の目的は Go を批判することではなく Go が Go であるがゆえに C++/Java/Python など利用者が Go を使い始めるときに困惑あるいは誤解するであろうポイントをまとめておくことで初めて Go を触る人がスムーズに Go を使い始められるようにすることです。私個人は Go はバランスがとれた良い言語でだと思いますし、気に入っています。 目次 interface と nil (Go の interface は単なる参照ではない) 文献 メソッド内でレシーバ(this, self)が nil でないことをチェ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く