並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 38 件 / 38件

新着順 人気順

if else boolean java exampleの検索結果1 - 38 件 / 38件

  • OOP: the worst thing that happened to programming

    > BTC: bc1qs0sq7agz5j30qnqz9m60xj4tt8th6aazgw7kxr ETH: 0x1D834755b5e889703930AC9b784CB625B3cd833E USDT(Tron): TPrCq8LxGykQ4as3o1oB8V7x1w2YPU2o5n Ton: UQAtBuFWI3H_LpHfEToil4iYemtfmyzlaJpahM3tFSoxomYQ Doge: D7GMQdKhKC9ymbT9PtcetSFTQjyPRRfkwTdismiss OOP: the worst thing that happened to programming [2/24/2025] In this article, we will try to understand why OOP is the worst thing that happened to prog

      OOP: the worst thing that happened to programming
    • Java の CLI アプリケーション用フレームワーク picocli はミスタイプ時にサジェスチョンを出してくれる - Mitsuyuki.Shiiba

      長くなっちゃったから最初にまとめ まとめ picocli は便利。 デフォルトでサジェスチョンの機能がついている。なので、オプションやサブコマンドの定義だけしておけば、ミスタイプしたときにサジェスチョンを出してくれる。 オプションの場合は、先頭2文字が一致するオプション一覧 サブコマンドの場合は、先頭2文字じゃなくて、似たものを出してくれる こんなつぶやきを見かけて がくぞさんのこんなつぶやきを見かけて そういえばCLIのオプションパーザのライブラリは多種あるけど、定義されてないオプションが指定されたときにオプション名から類推して正しくはコレじゃない?ってサジェストしてくれるような機構まで盛り込んだライブラリってあるのかな?— がくぞ (@gakuzzzz) August 11, 2021 あぁ、たしかにそういうのフレームワークに含まれてたら便利だなー、picocli だったらありそうだけ

        Java の CLI アプリケーション用フレームワーク picocli はミスタイプ時にサジェスチョンを出してくれる - Mitsuyuki.Shiiba
      • Prototyping in Rust | corrode Rust Consulting

        Programming is an iterative process. As much as we would like to come up with the perfect solution from the start, it rarely works that way. Good programs often begin as quick prototypes. While many experiments remain prototypes, the best programs can evolve into production code. Whether you’re writing games, CLI tools, or designing library APIs, prototyping helps tremendously in finding the best

          Prototyping in Rust | corrode Rust Consulting
        • Changing std::sort at Google’s Scale and Beyond

          TL;DR; We are changing std::sort in LLVM’s libcxx. That’s a long story of what it took us to get there and all possible consequences, bugs you might encounter with examples from open source. We provide some benchmarks, perspective, why we did this in the first place and what it cost us with exciting ideas from Hyrum’s Law to reinforcement learning. All changes went into open source and thus I can

            Changing std::sort at Google’s Scale and Beyond
          • SQLDelightを使ってKotlinで型安全にSQLを扱う - 空の箱

            klibsを眺めていたところ面白そうなものを見つけたので試してみた。 sqldelight.github.io これが結構面白い。リポジトリのAboutに「Generates typesafe Kotlin APIs from SQL」とあって「ORM?」と思ったけど、どうもちょっと違う気がする*1。ORMはオブジェクトを定義して、オブジェクトを操作することでSQLを扱う。が、SQLDelightは逆で、SQLを元に型安全なコードを自動生成するというアプローチを取っている。正しく表現できてるかアレだけど、簡単に違いを表にしてみる。 特徴 SQLDelight 典型的なORM SQL操作 SQLを直接記述し、それを元に型安全なコードを生成 SQLを抽象化してオブジェクトとして操作 型安全性 SQLを元にオブジェクトを定義する。オブジェクトの作成はSQLDelightが自動で定義してくれる。

              SQLDelightを使ってKotlinで型安全にSQLを扱う - 空の箱
            • I have written a JVM in Rust

              Lately I've been spending quite a bit of time learning Rust, and as any sane person would do, after writing a few 100 lines programs I've decided to take on something a little bit more ambitious: I have written a (toy) Java Virtual Machine in Rust. 🎉 With a lot of originality, I have called it rjvm. The code is available on GitHub. I want to stress that this is a toy JVM, built for learning purpo

              • CUPID: for joyful coding

                What started as lighthearted iconoclasm, poking at the bear of SOLID, has developed into something more concrete and tangible. If I do not think the SOLID principles are useful these days, then what would I replace them with? Can any set of principles hold for all software? What do we even mean by principles? I believe that there are properties or characteristics of software that make it a joy to

                • Golang Mini Reference 2022: A Quick Guide to the Modern Go Programming Language (REVIEW COPY)

                  Golang Mini Reference 2022 A Quick Guide to the Modern Go Programming Language (REVIEW COPY) Harry Yoon Version 0.9.0, 2022-08-24 REVIEW COPY This is review copy, not to be shared or distributed to others. Please forward any feedback or comments to the author. • feedback@codingbookspress.com The book is tentatively scheduled to be published on September 14th, 2022. We hope that when the release da

                  • 12.6. B-Trees — CS3 Data Structures & Algorithms

                    12.6. B-Trees¶ 12.6.1. B-Trees¶ This module presents the B-tree. B-trees are usually attributed to R. Bayer and E. McCreight who described the B-tree in a 1972 paper. By 1979, B-trees had replaced virtually all large-file access methods other than hashing. B-trees, or some variant of B-trees, are the standard file organization for applications requiring insertion, deletion, and key range searches.

                    • FlutterとUnityを連携させる | gihyo.jp

                      本連載は、iOS/Android向けのアプリでUIの表現力を高めることを目標に、Unity製アプリにFlutterを導入した例を具体的な実装方法を交えながら紹介する記事の4回目となります。 前回の記事ではUnityからExportしたXcodeプロジェクトに対してFlutterを組み込む方法を解説しました。4回目となる今回は実際にFlutterとUnityで連携を行う方法を紹介します。 前回までの記事で、UnityからExportされたAndroid/iOSプロジェクトにFlutterを組み込みビルドする方法を紹介していますのでまだ見ていない方はまずそちらをご覧ください。 Unity製のAndroidアプリにFlutterを組み込む Unity製のiOSアプリにFlutterを組み込む FlutterとUnityの連携概要 2回目の記事でも少し触れたのですが、アプリ内にFlutterEng

                        FlutterとUnityを連携させる | gihyo.jp
                      • Best practices for writing code comments - Stack Overflow

                        Stack Internal: the knowledge intelligence layer that powers enterprise AI. Stack Data Licensing: decades of verified, technical knowledge to boost AI performance and trust. [Ed. note: While we take some time to rest up over the holidays and prepare for next year, we are re-publishing our top ten posts for the year. Please enjoy our favorite work this year and we’ll see you in 2022.] Famed MIT pro

                          Best practices for writing code comments - Stack Overflow
                        • 0.10.0 Release Notes ⚡ The Zig Programming Language

                          Tier 4 Support § Support for these targets is entirely experimental. If this target is provided by LLVM, LLVM may have the target as an experimental target, which means that you need to use Zig-provided binaries for the target to be available, or build LLVM from source with special configure flags. zig targets will display the target if it is available. This target may be considered deprecated by

                          • Cloudflare functions with Scala.js

                            Indoor VivantsAnton Sviridov. I love reinventing the wheel and I usually use Scala for that. TL;DR We are deploying an app to Cloudflare using Scala.js We are using ScalablyTyped We are using Scala 3 heavily Code on Github Deployed app Cloudflare API bindings Welcome to the "Put ma Scala on yo cloud" series I want to say that I'm kicking off a blog series, but even I don't believe that. If I did,

                            • New – Amazon CloudWatch Evidently – Experiments and Feature Management | Amazon Web Services

                              AWS News Blog New – Amazon CloudWatch Evidently – Experiments and Feature Management Update Nov 29, 2021 – This post has been modified to provide more clarity on the new service. As a developer, I am excited to announce the availability of Amazon CloudWatch Evidently. This is a new Amazon CloudWatch capability that makes it easy for developers to introduce experiments and feature management in the

                                New – Amazon CloudWatch Evidently – Experiments and Feature Management | Amazon Web Services
                              • JEP 425: Virtual Threads (Preview)

                                Summary Introduce virtual threads to the Java Platform. Virtual threads are lightweight threads that dramatically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications. This is a preview API. Goals Enable server applications written in the simple thread-per-request style to scale with near-optimal hardware utilization. Enable existing code that uses the j

                                • research!rsc: Floating-Point Printing and Parsing Can Be Simple And Fast (Floating Point Formatting, Part 3)

                                  Introduction A floating point number f has the form f=m·2e where m is called the mantissa and e is a signed integer exponent. We like to read numbers scaled by powers of ten, not two, so computers need algorithms to convert binary floating-point to and from decimal text. My 2011 post “Floating Point to Decimal Conversion is Easy” argued that these conversions can be simple as long as you don’t car

                                  • とほほのKotlin入門 - とほほのWWW入門

                                    概要 Kotlinとは Kotlinを試してみる インストール Hello world 基本的な覚え事 コマンド引数 print, println コメント 行末のセミコロン コーディング規約 キーワード 変数 型 真偽値(Boolean) 数値(Byte, Short, Int, Long, Float, Double) 文字(Char) 文字列(String) Any型(Any) 型変換 配列 リスト セット マップ レンジ(range) 型を確認する(is, !is) 型の別名(typealias) キャスト(as, as?) ダイナミック型(dynamic) 演算子 制御構文 if式 fotループ forEachループ whileループ do-whileループ break文 continue文 when式 ラベル(@) 例外処理(try, throw, catch, finally

                                    • BottomNavigationViewとJetpack Navigationを組み合わせた画面遷移の実装の勘所 - Giftmall Inside Blog

                                      こんにちは。ギフトモールで Android アプリの開発をしている @KeithYokoma です。 スマホアプリで一般的な UI のパターンのひとつに Bottom Navigation (いわゆる下タブ)があります。Android においては、Jetpack ライブラリにある BottomNavigationView を使うことでかんたんに Bottom Navigation の UI を構築できます。Bottom Navigation の UI は画面遷移の実装もセットになっており、Jetpack Navigation と Fragment、BottomNavigationView を組み合わせて画面遷移を実装します。 この記事では、BottomNavigationView と Jetpack Navigation を組み合わせた Fragment ベースの画面遷移の実装にけおる勘所

                                        BottomNavigationViewとJetpack Navigationを組み合わせた画面遷移の実装の勘所 - Giftmall Inside Blog
                                      • とにかくWEB言語してみたい | ラング・ラグー

                                        本稿はTeX & LaTeX Advent Calendar 2022の23日目の記事です。22日目はtasusuさんでした。24日目はgolden_luckyさんです。 TeXの実装言語といえばWEB言語ですが、皆さんは少しでもよいのでWEB言語でプログラムを書いたことがあるでしょうか? 多くの有名ソフトウェアはC/C++、Java、Ruby、Pythonといったメジャーな言語で書かれており(むしろ、だからこそメジャーとされるわけですが)、一般にプログラマと言われている人であればこうした言語に関しては何かしらの経験や知見があって、その気になればそのソースコードを読んで理解したり、場合によっては改造したりということができるかと思います。一方、TeXはその挙動が偏屈なのもさることながら、実装も現代的感覚からするとかなり風変わりです。実際、TeXの実装言語であるWEB言語もまたKnuthがオリ

                                          とにかくWEB言語してみたい | ラング・ラグー
                                        • Type Parameters Proposal

                                          Ian Lance Taylor Robert Griesemer August 20, 2021 StatusThis is the design for adding generic programming using type parameters to the Go language. This design has been proposed and accepted as a future language change. We currently expect that this change will be available in the Go 1.18 release in early 2022. AbstractWe suggest extending the Go language to add optional type parameters to type an

                                          • A Tour of WebAuthn

                                            This book was distributed at the FIDO Authenticate conference in 2024. Its intended format was as a PDF, which you can find here. The following is the contents of the PDF converted to HTML. 1: Introduction Passwords are rubbish. If you’re reading this book then hopefully you’re already on board with this idea, but let’s recap anyway. The typical practice with passwords is to remember a few differe

                                            • Renato Athaydes

                                              Revenge of Lisp (Part 1⁄2) Background vector created by upklyak - www.freepik.com This may surprise you if you know me, but I’ve been learning Common Lisp for a few weeks now. It all started when I was reading, funnily enough, a blog post about another, much more hyped, language called Julia. The post was titled Julia and the reincarnation of Lisp, and in it the author lamented that despite his lo

                                              • bytecode interpreters for tiny computers ⁑ Dercuano

                                                Introduction: Density Is King (With a Tiny VM) I've previously come to the conclusion that there's little reason for using bytecode in the modern world, except in order to get more compact code, for which it can be very effective. So, what kind of a bytecode engine will give you more compact code? Suppose I want a bytecode interpreter for a very small programming environment, specifically to minim

                                                • Rust is more portable than C for pngquant/libimagequant

                                                  Improved portability and performance 🦀 libimagequant is a library for generating high-quality palettes, useful for compression of transparent PNG images (~75% smaller!) and making nice GIF animations. libimagequant is now a pure Rust library. The new version is a drop-in replacement (ABI-compatible), so C projects can continue using it. The C version will be maintained for a while to give library

                                                  • "Five-Point Haskell": Total Depravity (and Defensive Typing)

                                                    I have thought about distilling the principles by which I program Haskell, and how I’ve been able to steer long-lived projects over years of growth, refactorings, and changes in demands. I find myself coming back to a few distinct and helpful “points” (“doctrines”, if you may allow me to say) that have yet to lead me astray. With a new age of software development coming, what does it even mean to

                                                      "Five-Point Haskell": Total Depravity (and Defensive Typing)
                                                    • Kotlin 1.6.0 Released | The Kotlin Blog

                                                      Kotlin 1.6.0 is now officially released with Stable exhaustive whens, Kover, and a new memory manager for Kotlin/Native. Other language and standard library features released in 1.5.30 became Stable as well. Thanks for the feedback you’ve shared with us. If you still haven’t tried these new features out, now is the time! In this blog post, you can find an overview of the following updates: Languag

                                                        Kotlin 1.6.0 Released | The Kotlin Blog
                                                      • cuneicode, and the Future of Text in C

                                                        Following up from the last post, there is a lot more we need to cover. This was intended to be the post where we talk exclusively about benchmarks and numbers. But, I have unfortunately been perfectly taunted and status-locked, like a monster whose “aggro” was pulled by a tank. The reason, of course, is due to a few folks taking issue with my outright dismissal of the C and C++ APIs (and not showi

                                                          cuneicode, and the Future of Text in C
                                                        • Why you shouldn’t use Redis as a rate limiter: Part 1 of 2

                                                          (This is the first of a two part series on rate limiting with Redis. This part will look at possible implementations, and the second part will look at performance) My colleague Eric has informed me that many companies are now using Redis to implement rate limiting, and has witnessed serious businesses doing this, first hand. “Redis?”, I thought. “Isn’t that that thing to cache your slow HTTP page

                                                            Why you shouldn’t use Redis as a rate limiter: Part 1 of 2
                                                          • The sad state of property-based testing libraries

                                                            The sad state of property-based testing libraries Posted on Jul 2, 2024 Property-based testing is a rare example of academic research that has made it to the mainstream in less than 30 years. Under the slogan “don’t write tests, generate them” property-based testing has gained support from a diverse group of programming language communities. In fact, the Wikipedia page of the original property-bas

                                                            • News

                                                              Logback components written for logback 1.2 should work without change in version 1.3. However, Joran, logback's configuration system, has been rewritten to use an internal representation model which can be processed separately. Thus, code depending on Joran needs to be adapted to changes in Joran (logback's internal configuration mechanism). As a result of enhancements to Joran, logback configurat

                                                              • Why APL is a language worth knowing

                                                                “A language that doesn't affect the way you think about programming, is not worth knowing.”, by Alan J. Perlis. Why APL is a language worth knowing Alan Perlis, the computer scientist recipient of the first Turing award, wrote “A language that doesn't affect the way you think about programming, is not worth knowing.” ― Alan J. Perlis, 1982. Special feature: Epigrams on programming. ACM Sigplan Not

                                                                  Why APL is a language worth knowing
                                                                • The Koka Programming Language

                                                                  1. Getting started Welcome to Koka – a strongly typed functional-style language with effect types and handlers. Why Koka? A Tour of Koka Install Discussion forum Github Libraries Note: Koka v3 is a research language that is currently under development and not ready for production use. Nevertheless, the language is stable and the compiler implements the full specification. The main things lacking a

                                                                  • Apache PDFBox で折り返しのある文章を表示する - A Memorandum

                                                                    はじめに HelloWorld True Type Font の指定 段落文章の表示 まとめ はじめに Apache PDFBox は PDF を操作する Java ライブラリです。 PDFの作成やテキストの抽出、PDFの分割やマージなどを行うことができます。 Apache PDFBox は比較的低レベルな API セットとなっているため、文章を作成しようとした場合に行の折返し操作を自身で実装する必要があったりします。 ここでは、簡単な HelloWorld からはじめ、折返しのある文章の表示方法について見ていきます。 HelloWorld まずは簡単な PDF の生成です。 public static void main(String[] args) { try (PDDocument doc = new PDDocument()) { PDPage page = new PDPage(

                                                                      Apache PDFBox で折り返しのある文章を表示する - A Memorandum
                                                                    • AWS Distro for OpenTelemetry の新機能 – トレースのサポートが一般的に利用可能に | Amazon Web Services

                                                                      Amazon Web Services ブログ AWS Distro for OpenTelemetry の新機能 – トレースのサポートが一般的に利用可能に 昨年の re:Invent の前、AWS でサポートされている OpenTelemetry プロジェクトの安全なディストリビューションである AWS Distro for OpenTelemetry のパブリックプレビューをご紹介しました。OpenTelemetry は、アプリケーションの動作とパフォーマンスをよりよく理解するために、テレメトリデータをインストルメント化、生成、収集、およびエクスポートするためのツール、API、および SDK を提供します。2021 年 9 月 22 日、アップストリームの OpenTelemetry は、そのコンポーネントのトレース安定性マイルストーンを発表しました。2021 年 9 月 23 日、

                                                                        AWS Distro for OpenTelemetry の新機能 – トレースのサポートが一般的に利用可能に | Amazon Web Services
                                                                      • Smalltalk, Haskell and Lisp - Daniel's Blog

                                                                        To assist with job interviews at the NRAO we recently wrote a small “contest” program. Without giving away the details, the crux of the problem is to read a file with a list of scans and calculate the amount of time it takes to move the dishes and perform the scans, and report it. Candidates are required to write this in Java, but that restriction does not apply to me, so I of course had to write

                                                                        • How uv Works Under the Hood | Noos - Where Thought, Code, and Craft Converge

                                                                          I started using uv because the benchmarks seemed too good to be true—10–100x faster than pip, resolves and installs in milliseconds. After reading the source code and the official resolver internals documentation, I understand why, and the answers are more interesting than just "it's written in Rust." This post traces every layer: from the repository structure, through what literally happens when

                                                                            How uv Works Under the Hood | Noos - Where Thought, Code, and Craft Converge
                                                                          • Django for Startup Founders: A better software architecture for SaaS startups and consumer apps

                                                                            In an ideal world, startups would be easy. We'd run our idea by some potential customers, build the product, and then immediately ride that sweet exponential growth curve off into early retirement. Of course it doesn't actually work like that. Not even a little. In real life, even startups that go on to become billion-dollar companies typically go through phases like: Having little or no growth fo

                                                                            • Philosophy of coroutines

                                                                              [Simon Tatham, initial version 2023-09-01, last updated 2025-03-25] [Coroutines trilogy: C preprocessor | C++20 native | general philosophy ] Introduction Why I’m so enthusiastic about coroutines The objective view: what makes them useful? Versus explicit state machines Versus conventional threads The subjective view: why do I like them so much? “Teach the student when the student is ready” They s

                                                                              1