並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 29 件 / 29件

新着順 人気順

boolean java if statementの検索結果1 - 29 件 / 29件

  • 関数名、メソッド名、変数名でよく使う英単語のまとめ

    プログラミングをしていると関数名、メソッド名、変数名をどうするか悩みます。 ロジックより命名に時間を費やすこともざらにあります。翻訳したり、一般的な命名規則なのかいつも検索して大変です。 よく使うサイトの内容をコピってメモしておく 関数名とメソッド名の違いについて よく使う英単語のまえに、いつもごっちゃにして使っているけど、定義はこんな感じ 「関数」と「メソッド」の違い 似ているところ どちらも何か(引数)を入れると処理をして何か(戻り値)を返してくれます。 違うところ やってること自体は大差ありません。概念としては違います。 メソッドはオブジェクト指向で登場する用語で、オブジェクトの動作を定義したものです。 まずオブジェクトありきなのですね。一方の関数は、オブジェクト云々は関係ありません。 個人的な使い分け Java で登場する関数は「メソッド」です。C 言語で登場する関数は「関数」と呼

      関数名、メソッド名、変数名でよく使う英単語のまとめ
    • BigQueryのアンチパターン認識ツールで独自のSQLリンターを開発しました - ZOZO TECH BLOG

      こんにちは、株式会社ZOZOで25卒の内定者アルバイトをしている村井です。この記事では業務で取り組んでいる、BigQueryで使うSQLのリンターの作成方法について紹介します。 目次 目次 課題と解決策 課題 解決策 BigQueryのアンチパターン認識ツール ミニマムな使い方 日本語がSQL内に含まれている際の問題 アンチパターンを定義する リンターとしてBigQueryのアンチパターン認識ツールを使用する際に生じる課題と解決策 構成 APIサーバ化 Chrome拡張 動作例 まとめ 課題と解決策 課題 社内では様々なチームがSQLを書いており、動作はするものの良くない書き方をしている場合があります。そういった構文を検知して、前もって修正する必要があります。 解決策 BigQueryのコンソールで入力されたSQLの不正構文を検知、修正案を提示できるようにしました。 BigQueryのアン

        BigQueryのアンチパターン認識ツールで独自のSQLリンターを開発しました - ZOZO TECH BLOG
      • research!rsc: Coroutines for Go

        This post is about why we need a coroutine package for Go, and what it would look like. But first, what are coroutines? Every programmer today is familiar with function calls (subroutines): F calls G, which stops F and runs G. G does its work, potentially calling and waiting for other functions, and eventually returns. When G returns, G is gone and F continues running. In this pattern, only one fu

        • Scala 3 マクロ入門 · eed3si9n

          2021-09-06 / scala はじめに マクロは楽しくかつ強力なツールだが、使いすぎは害もある。責任を持って適度にマクロを楽しんでほしい。 マクロとは何だろうか? よくある説明はマクロはコードを入力として受け取り、コードを出力するプログラムだとされる。それ自体は正しいが、map {...} のような高階関数や名前渡しパラメータのように一見コードのブロックを渡して回っている機能に親しんでいる Scala プログラマには「コードを入力として受け取る」の意味が一見分かりづらいかもしれない。 以下は、僕が Scala 3 にも移植した Expecty という assersion マクロの用例だ: scala> import com.eed3si9n.expecty.Expecty.assert import com.eed3si9n.expecty.Expecty.assert scala

          • Java と Kotlin で assertion の挙動が違った話 - ドワンゴ教育サービス開発者ブログ

            assertion とは 起きた出来事 原因 Java Kotlin 対策 まとめ We are hiring! assertion とは assertion とはプログラムの中の様々な前提が満たされていることを確認するための仕組みで、日本語だと「表明」という訳が当てられることが多いです。 Java や Kotlin に限らず様々な言語で実装されており細かい仕様は言語ごとに異なりますが、多くの場合「前提が満たされていない場合は例外を発生させる」「本番環境では無効化できる」という点で共通しています。 例えば Kotlin の場合は以下の形で記述され、仮に条件が満たされなかった場合は AssertionError が指定されたエラーメッセージ付きで投げられます。 val result: Int = someFunction() assert(result > 0) { "result of s

              Java と Kotlin で assertion の挙動が違った話 - ドワンゴ教育サービス開発者ブログ
            • 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

              • パターンからわかりやすく入門するドメイン駆動設計(DDD)|研修コースに参加してみた | SEプラス 研修 Topics

                成瀬さんは日本最大の Java のカンファレンスでの登壇に加え、 YouTube でも「なるせみ」という IT 技術解説で人気のチャンネルを持ってらっしゃいます。 ドメイン駆動設計とは まずはドメイン駆動設計とは何か紹介いただきました。 ソフトウェア開発は難しい 理由: たくさんの技術 + 対象のドメイン知識 (物流、など) ドメインとはソフトウェア対象領域 ドメインのソフトウェアを作りたいなら、ドメインを主軸とした設計 = ドメイン駆動設計が必要 「エリック・エヴァンスのドメイン駆動設計」(翔泳社刊) という本が原典(翻訳版は 2013 年刊行。 原著は 2003 年出版) ただし、とっっっっっっても難解 ドメイン駆動設計の進め方 “モデリング” と “パターン” というパートに分けて進める 関係者と開発者が集まって、モデリングで設計して、設計したものをパターンで実装する それぞれに専門

                  パターンからわかりやすく入門するドメイン駆動設計(DDD)|研修コースに参加してみた | SEプラス 研修 Topics
                • Why People are Angry over Go 1.23 Iterators - gingerBill

                  NOTE: This is based on, but completely rewritten, from a Twitter post: https://x.com/TheGingerBill/status/1802645945642799423 TL;DR It makes Go feel too “functional” rather than being an unabashed imperative language. I recently saw a post on Twitter showing the upcoming Go iterator design for Go 1.23 (August 2024). From what I can gather, many people seem to dislike the design. I wanted to give m

                  • Go 1.19 Release Notes - The Go Programming Language

                    Introduction to Go 1.19 The latest Go release, version 1.19, arrives five months after Go 1.18. Most of its changes are in the implementation of the toolchain, runtime, and libraries. As always, the release maintains the Go 1 promise of compatibility. We expect almost all Go programs to continue to compile and run as before. Changes to the language There is only one small change to the language, a

                      Go 1.19 Release Notes - The Go Programming Language
                    • 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,

                      • 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

                        • 改訂3版JavaScript本格入門 | 技術評論社

                          概要 2010年の刊行から約100,000部の実績を誇るロングセラーを、ECMAScript 2022に対応した内容で200ページ増の大幅改訂。最新の基本文法から、開発に欠かせない応用トピックまで解説します。JavaScriptらしく書くために大切なオブジェクトの扱い方や、大規模開発でさらに実用的になったオブジェクト指向構文を学び、しっかりと動くプログラムの作り方を本質から理解できます。 こんな方にオススメ JavaやC言語などほかのプログラミング言語の経験があり、JavaScriptを新規に学びたい方 JavaScriptを多少使えるけど基本が不安な方 ECMAScript 2022による新たなJavaScript記法を学びたい方 目次 Chapter 1 イントロダクション 1.1 JavaScriptとは? 1.1.1 JavaScriptの歴史 1.1.2 復権のきっかけはAjax

                            改訂3版JavaScript本格入門 | 技術評論社
                          • Himeji: A Scalable Centralized System for Authorization at Airbnb

                            The ProblemOver the last couple of years, Airbnb engineering moved from a monolithic Ruby on Rails architecture to a service oriented architecture. In our Rails architecture, we had an API per resource to access the underlying data. These APIs had authorization checks to protect sensitive data. As there was a single way to access a resource’s data, managing these checks was easy. In the transition

                              Himeji: A Scalable Centralized System for Authorization at Airbnb
                            • Proto Best Practices

                              Clients and servers are never updated at exactly the same time - even when you try to update them at the same time. One or the other may get rolled back. Don’t assume that you can make a breaking change and it’ll be okay because the client and server are in sync. Don’t Re-use a Tag NumberNever re-use a tag number. It messes up deserialization. Even if you think no one is using the field, don’t re-

                              • 21st Century C++ – Communications of the ACM

                                It is now 45+ years since C++ was first conceived. As planned, it evolved to meet challenges, but many developers use C++ as if it was still the previous millennium. This is suboptimal from the perspective of ease of expressing ideas, performance, reliability, and maintainability. Here, I present the key concepts on which performant, type safe, and flexible C++ software can be built: resource mana

                                • Go 1.19 Release Notes - The Go Programming Language

                                  Introduction to Go 1.19 The latest Go release, version 1.19, arrives five months after Go 1.18. Most of its changes are in the implementation of the toolchain, runtime, and libraries. As always, the release maintains the Go 1 promise of compatibility. We expect almost all Go programs to continue to compile and run as before. Changes to the language There is only one small change to the language, a

                                    Go 1.19 Release Notes - The Go Programming Language
                                  • 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

                                    • The simplicity of Prolog

                                      Back to homepage Nowadays the most popular programming languages are Python, Javascript, Java, C++, C#, Kotlin and Ruby, and the average programmer is probably familiar with one or more of these languages. It's relatively easy to switch from one to another (barring any framework specific knowledge that may be needed), since they are all imperative (and for the most part object-oriented) languages,

                                      • Range Over Function Types - The Go Programming Language

                                        Range over function types is a new language feature in the Go 1.23 release. This blog post will explain why we are adding this new feature, what exactly it is, and how to use it. Why? Since Go 1.18 we’ve had the ability to write new generic container types in Go. For example, let’s consider this very simple Set type, a generic type implemented on top of a map. // Set holds a set of elements. type

                                          Range Over Function Types - The Go Programming Language
                                        • Spring Securityでログイン時にパスワードハッシュアルゴリズムを変更する方法 - IK.AM

                                          Spring Securityでログイン時にデータベース上の保存されたエンコードされたパスワードを別のアルゴリズムで再度エンコードして保存する方法を紹介します。 変更の手順を先に説明すると、 DelegatingPasswordEncoderのidForEncodeを変える UserDetailsPasswordServiceを実装する ログインし直す です。 以下、少しずつ説明します。 目次 一般的なユーザー認証パスワードハッシュアルゴリズムの変更既存ユーザーのパスワードハッシュアルゴリズムのマイグレーションレガシーなMD5ハッシュからのマイグレーション(おまけ) OWASP推奨のPBKDF2ハッシュを使用する 一般的なユーザー認証 まずはデータベースを使った一般的なSpring Securityのユーザー認証を実装します。次のクラスを使用します。読みやすいように、意図的にシンプルにして

                                            Spring Securityでログイン時にパスワードハッシュアルゴリズムを変更する方法 - IK.AM
                                          • 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
                                            • React Best Practices – Tips for Writing Better React Code

                                              By Jean-Marc Möckel Two years ago, I started to learn and use React. And today I'm still using it at my day job as a Software Developer and in my own side projects. During that time I've come across a lot of "typical" issues. So I searched around and found some best practices that I've integrated into my workflow, and I've come up with things that have made my life or my team members' lives easier

                                                React Best Practices – Tips for Writing Better React Code
                                              • 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

                                                    • January 2022 (version 1.64)

                                                      Update 1.64.1: The update addresses these security issues. Update 1.64.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the January 2022 release of Visual Studio Code. There are many updates in this version that we hope you will like, some of the key highlights include: New Side Panel - Display more view

                                                        January 2022 (version 1.64)
                                                      • 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

                                                          • Java Interview Questions

                                                            Java remains one of the most common and popular programming languages in the world because of its strong features. Therefore, it’s no surprise that good Java programmers are very much sought after by almost all organizations across the world – be it startups or large multinational corporations. Considering the above, we created a list of common job interview questions about Java programming with d

                                                              Java Interview Questions
                                                            1