読みやすいコードとは何か 読みやすいコードとは、脳に負荷がかからないコードである。脳に負荷がかからないコードとは、人間の脳の特性に配慮して書かれたコードである。したがって読みやすいコードを書くには、まず人間の脳の特性を把握する必要がある。読みやすいコードの特徴は、この人間の脳の特性から論理的に導かれる。 また、「コードを読む」とは過去から未来への情報伝達、または自分から他者への情報伝達であり、情報理論における以下の2つの数学的原理にも支配される。 頻出する情報には共通の符号を割り当てることで情報を圧縮することができる。 失われた情報を復元することはできない。 この記事に書かれた内容はプログラムに止まらず、ドキュメント、記事の執筆など、プレインテキストによって情報を伝達する際には一般に適用可能である。 もしもこの記事を読むのが面倒であれば、以下の5つだけを覚えておけばよい。 ひとつの処理の単
Python開発者向けツールRuff/uvの開発チーム(Astral inc.)がPython向けの型チェッカーを新規開発しているので紹介いたします。この型チェッカーはコードネーム"Red-knot"と呼ばれており、まだリリース前ですが将来的にはRuffに組み込まれる予定であるようです。以下ではこのプロジェクトの概略を説明したいと思います。 特徴 既存の型チェッカー(e.g. mypy, pyright)の不満点である遅さを改善すべく、徹底的にパフォーマンスに気を配った設計となっています。pyrightもそこまで遅くはないのですが、さらに高速であることを目指すようです。 Red-knotはRuffと同様Rustを用いて実装されています。Ruffが使っている諸々のデータ構造を共有しているため、フォーマット、lint、静的解析が一気通貫で行えるようになります。JavaScriptツールチェイン
TL;DR Pythonの型チェッカーを一人で作っていたらそれが仕事になりました。 私は(大学院生として物理学を専攻する傍ら)以前よりプログラミング言語やその周辺ツールのデザイン・実装に興味があり、趣味で開発したプロジェクトをOSSで公開するなどしていました。 ErgはPython APIと互換性を持つトランスパイル型の静的型付け言語で、pylyzerはこれの型検査器を流用したPython向け型チェッカーです。 ありがたいことに両方とも結構反響を受けて、公開から数年経っても未だにissueなど報告をいただいております。これはもう少し大きな話にできるのではないかと考え、Ergの開発の方で2023年度の未踏IT人材発掘・育成事業に応募し、運よく採択され、スーパークリエータにまで認定していただきました。 これだけでもかなりの僥倖ですが、それだけではなく、今年の3月からcontract softw
米ホワイトハウス「将来のソフトウェアはメモリ安全になるべき」と声明発表。ソフトウェアコミュニティに呼びかけ 米ホワイトハウスの国家サイバー局長室(The White House Office of the National Cyber Director:ONCD)は、サイバー空間における攻撃対象領域を積極的に削減する目的で、テクノロジーコミュニティやソフトウェアコミュニティに対してメモリ安全(Memory Safe)なソフトウェアの実現を積極的に呼びかけるプレスリリース「Future Software Should Be Memory Safe」(将来のソフトウェアはメモリ安全になるべき)を発表しました。 プレスリリースの中で、国家サイバー局長Harry Coker氏は「私たちは国家として、サイバースペースにおける攻撃対象領域を減らし、あらゆる種類のセキュリティバグがデジタルエコシステムに
In this blog post, we’ll take a high-level tour of what’s inside the Mojo SDK. First, let’s quickly review what Mojo is and how it can benefit you. Mojo: a high performance 'Python++' language for computeMojo is a new programming language for AI developers that will grow into being a superset of Python over time. It already supports integrating with arbitrary Python code seamlessly and has a scala
お断り この記事は『Software Design2022年3月号』の「第4章:電子署名のプロセスを体験 Pythonによる楕円曲線暗号の実装」の入稿記事を技術評論社のご好意で公開したものです。 元はLaTeXだったのをマークダウンに修正し、二つに分けています。 記事中のサンプルコードはサポートページからダウンロードできます。 はじめに この章では楕円曲線を用いた鍵共有や署名をPythonで実装します。実装するために必要な数学は随時解説します。 動作確認はPython 3.8.10で行いました。 コードは動作原理を理解するためのものであり、細かいエラー処理などはしていません。 プロダクト製品などで利用できるものではないことをご了承ください。 用語のおさらい 楕円曲線暗号の位置づけ まず最初に用語の確認をします。 「暗号」は複数の意味で使われます。 一つは「データを秘匿化するために、他人に読
When writing code on your own, the only priority is making it work. However, working in a team of professional software developers brings a plethora of challenges. One of those challenges is coordinating many people working on the same code. How do professional teams make dozens of changes per day while making sure everyone is coordinated and nothing is broken? Enter continuous integration! In thi
print style debugging is a form of debugging where print statements are inserted to print values of expressions or variables that we need to track. loggers are common if we want to use the log statements in production. But there are many times where quick print statements will do the trick in debugging and understanding the control flow. f-strings f-strings were introduced in Python 3.6 with PEP 4
Python threading allows you to have different parts of your program run concurrently and can simplify your design. If you’ve got some experience in Python and want to speed up your program using threads, then this tutorial is for you! In this article, you’ll learn: What threads are How to create threads and wait for them to finish How to use a ThreadPoolExecutor How to avoid race conditions How to
はじめに コードは理解しやすくなければいけない。 リーダブルコード ―より良いコードを書くためのシンプルで実践的なテクニック (Theory in practice) 作者:Dustin Boswell,Trevor Foucher発売日: 2012/06/23メディア: 単行本(ソフトカバー) コードの保守性や可読性を高めるために我々エンジニアはどんなことができるでしょうか? テストを書く 推奨されているコードスタイルに準拠する コメントを書く DRY原則に則る 変更・拡張しやすく設計する ログを出力する・監視する 適切な命名をする etc... まだまだ意識すべきことはあると思いますが、上記の項目はエンジニアであれば恐らく一度は目にしたことがあるような内容であり、暗黙的に了承されたいルールです。 しかし、これらはただの心構えであり、体現するために実際には以下のような項目に落とし込む必要
Introducing App Engine Second Generation runtimes and Python 3.7 Today, Google Cloud is announcing the availability of Second Generation App Engine standard runtimes, a significant upgrade to the platform that allows you to easily run web apps using up-to-date versions of popular languages, frameworks and libraries. Python 3.7 is available today in beta on the App Engine standard environment. You
最近では、Gradual Typing、漸進的型付けと呼ばれる型システムを備えた言語(拡張)が増えてきています。 次のようなもの JavaScript: TypeScript / Flowtype Python: mypy / pyre-checker PHP: hack / php-storm flow/pyre-checker/hack と facebook 製が多いですね。 この記事は、それらを使う動機と運用について書きます。この記事の出発点として、 おそらく TypeScript/Flow で発生した問題が後発の言語で発生すると思っており、それらを使う方や、設計する人への提言でもあります。 自分は昔 https://github.com/mizchi/TypedCoffeeScript というAltJS作ろうとして、実装のツラミはなんとなく知ってるつもりです。ホビーレベルで作るもの
外資系コンサルが実践する 資料作成の基本 パワーポイント、ワード、エクセルを使い分けて「伝える」→「動かす」王道70posted with カエレバ吉澤 準特 日本能率協会マネジメントセンター 2014-08-20 Amazonで最安値を探す楽天市場で最安値を探すYahooショッピングで最安値を探す 目次 目次 はじめに PyCoolPlot 必要なもの ダウンロードの仕方 使い方 Horizontal bar plot Line graph Time bar chart 参考資料 MyEnigma Supporters はじめに いつもグラフを書く時にデザインに迷うのですが、 下記の記事を見て、すぐにmaplotlibで実装したくなりました。 note.mu しかし、 もたもたしているうちに先を越されてしまったのですが、 「データ視覚化のデザイン #1」をmatplotlibで実装する
Back Development & Design Development Framework & Tools Build, design, and deliver high-performance applications across platforms. Accelerate development and UI design with tools that connect teams and streamline the path from concept to production. Products Qt Framework Cross-Platform Software Libraries and APIs
We are pleased to announce that the April 2018 release of the Python Extension for Visual Studio Code is now available from the marketplace and the gallery. You can download the Python extension from the marketplace, or install it directly from the extension gallery in Visual Studio Code. You can learn more about Python support in Visual Studio Code in the VS Code documentation. In this release we
This post aims to give an introduction to the Qt.py project and how to get set up with it for PySide/PyQt4 and PySide2/PyQt5 development. Contents What is Qt.py How does it work? Installing Qt.py Caveats Contributing Closing comments What is Qt.py? Qt.py is a Minimal Python 2 & 3 shim around all Qt bindings - PySide, PySide2, PyQt4 and PyQt5 – which enables you to write software that dynamically c
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く