はてなブックマークアプリ

サクサク読めて、
アプリ限定の機能も多数!

アプリで開く

はてなブックマーク

  • はてなブックマークって?
  • アプリ・拡張の紹介
  • ユーザー登録
  • ログイン
  • Hatena

はてなブックマーク

トップへ戻る

  • 総合
    • 人気
    • 新着
    • IT
    • 最新ガジェット
    • 自然科学
    • 経済・金融
    • おもしろ
    • マンガ
    • ゲーム
    • はてなブログ(総合)
  • 一般
    • 人気
    • 新着
    • 社会ニュース
    • 地域
    • 国際
    • 天気
    • グルメ
    • 映画・音楽
    • スポーツ
    • はてな匿名ダイアリー
    • はてなブログ(一般)
  • 世の中
    • 人気
    • 新着
    • 新型コロナウイルス
    • 働き方
    • 生き方
    • 地域
    • 医療・ヘルス
    • 教育
    • はてな匿名ダイアリー
    • はてなブログ(世の中)
  • 政治と経済
    • 人気
    • 新着
    • 政治
    • 経済・金融
    • 企業
    • 仕事・就職
    • マーケット
    • 国際
    • はてなブログ(政治と経済)
  • 暮らし
    • 人気
    • 新着
    • カルチャー・ライフスタイル
    • ファッション
    • 運動・エクササイズ
    • 結婚・子育て
    • 住まい
    • グルメ
    • 相続
    • はてなブログ(暮らし)
    • 掃除・整理整頓
    • 雑貨
    • 買ってよかったもの
    • 旅行
    • アウトドア
    • 趣味
  • 学び
    • 人気
    • 新着
    • 人文科学
    • 社会科学
    • 自然科学
    • 語学
    • ビジネス・経営学
    • デザイン
    • 法律
    • 本・書評
    • 将棋・囲碁
    • はてなブログ(学び)
  • テクノロジー
    • 人気
    • 新着
    • IT
    • セキュリティ技術
    • はてなブログ(テクノロジー)
    • AI・機械学習
    • プログラミング
    • エンジニア
  • おもしろ
    • 人気
    • 新着
    • まとめ
    • ネタ
    • おもしろ
    • これはすごい
    • かわいい
    • 雑学
    • 癒やし
    • はてなブログ(おもしろ)
  • エンタメ
    • 人気
    • 新着
    • スポーツ
    • 映画
    • 音楽
    • アイドル
    • 芸能
    • お笑い
    • サッカー
    • 話題の動画
    • はてなブログ(エンタメ)
  • アニメとゲーム
    • 人気
    • 新着
    • マンガ
    • Webマンガ
    • ゲーム
    • 任天堂
    • PlayStation
    • アニメ
    • バーチャルYouTuber
    • オタクカルチャー
    • はてなブログ(アニメとゲーム)
    • はてなブログ(ゲーム)
  • おすすめ

    iPhone 17

『avdi.codes』

  • 人気
  • 新着
  • すべて
  • Enough With the Service Objects Already

    6 users

    avdi.codes

    Enough With the Service Objects Already Skip to entry content Once upon a time I was writing a web app that needed to accept notifications of payments. Once it was notified of a payment (via a webhook) it needed to take certain actions to fulfill the purchase. An overweight controller Imagine that you’re working on this app. The payment notifications come in the form of PayPal-style IPN data. Here

    • テクノロジー
    • 2017/11/02 09:40
    • rails
    • service
    • Riffing on `interpose` implementations in Ruby

      3 users

      avdi.codes

      Riffing on `interpose` implementations in Ruby Skip to entry content I very much enjoyed Brian Cobb’s step-by-step translation of the Clojure interpose  function to Ruby. I too agree that interpose  would be a handy method to have around. As a quick TL;DR: interpose is kind of like Array#join , except that it produces a sequence instead of a string. [1, 2].interpose(:sep).to_a # => [1, :sep, 2] Br

      • テクノロジー
      • 2017/08/05 00:25
      • Ruby is defined by terrible tools

        4 users

        avdi.codes

        Look, let’s face it: Ruby tools are terrible. If you’ve worked in any Lisp you know what I’m talking about. If you’ve worked in Java or C# anytime recently you know what I’m talking about. If you’ve worked in Haskell you know what I’m talking about. “But Avdi! Lisp is homoiconic, and those other languages are statically typed! That’s an unfair comparison!” Well, if you’ve worked in Smalltalk you d

        • テクノロジー
        • 2015/07/09 09:26
        • Java
        • Ruby
        • あとで読む
        • Benchmarking Ruby Dispatch Strategies

          3 users

          avdi.codes

          Let’s say we’re dispatching events to listener objects. Events look like this: Event = Struct.new(:name, :source, :args) Events should be routed to different handler methods based on the name of the event. For instance, when an object is sent the #call message with an :accepted event: listener.call(Event[:accepted, obj]) …then it should be dispatched to the #handle_accepted method, as if the liste

          • テクノロジー
          • 2015/06/09 11:57
          • ruby
          • A personal programming language roadmap

            3 users

            avdi.codes

            A personal programming language roadmap Skip to entry content Lately I’ve become increasingly sensitive to how little time I have left to learn new technologies. It’s not that I’m nearing death: I’m not, at least not by 21st century baseline human standards. It’s more a matter of the impossible and ever-expanding variety of tech that is out there to be learned. That, coupled with the limited time

            • テクノロジー
            • 2015/05/15 09:57
            • programming
            • blog
            • Zero to Smoke Test with Sinatra

              3 users

              avdi.codes

              The other day I put an app in production with (gasp) no automated tests. I’m careful to say no automated tests, because of course I had been testing it manually throughout the ~12 hours it took me to write the initial version of the app. In lieu of tests, I made sure to log copious amounts of information, which I then collected from my deployed app into Papertrail. For a single day’s work this was

              • テクノロジー
              • 2014/07/11 02:19
              • Ruby
              • Learn advanced Rake in 7 episodes

                3 users

                avdi.codes

                Rake is ubiquitous in Ruby-land, but its power is often under-appreciated and under-used. Over the course of the past two weeks I’ve been posting a series of RubyTapas videos I did on Rake. They go into advanced features of Rake that can help you elegantly automate common tasks. Here, for convenience, is a list of all of the episodes in one place. I’ve included links to the original posts, which c

                • テクノロジー
                • 2014/05/02 10:30
                • Avdi Grimm

                  9 users

                  avdi.codes

                  Follow me for updates on what I am creating.

                  • テクノロジー
                  • 2013/11/18 21:59
                  • ruby
                  • Book
                  • Confident Ruby is Finished!

                    5 users

                    avdi.codes

                    I am thrilled to announce that my book Confident Ruby is now finished. I even hit my target of releasing by September 1st… if by “September 1st” I had meant “of the following year”. So what is this book and why should you buy it? Confident Ruby is, first and foremost, a book about joy. It’s about the joy I found when I first discovered how elegantly and succinctly I could state problems in Ruby co

                    • テクノロジー
                    • 2013/08/27 05:17
                    • ruby
                    • book
                    • A List of Programming Screencast Series

                      9 users

                      avdi.codes

                      A List of Programming Screencast Series Skip to entry content UPDATE: This list is now very out of date. Please check out the updated version instead. Since I publish a screencast series, I’m curious what other programming screencasts people watch. So I asked around. Here’s the list, based on feedback as well as my own bookmarks. Railscasts – Ruby on Rails Destroy all Software – Ruby, Python, Unix

                      • テクノロジー
                      • 2013/06/23 10:29
                      • Screencast
                      • video
                      • ruby
                      • programming
                      • Linux has better hardware support than OS X

                        3 users

                        avdi.codes

                        Linux has better hardware support than OS X Skip to entry content TL;DR: OS X users pick their hardware from a very short list of known-good configurations, and when you do the same thing for Linux, the results are equivalent. Like most nerds I know, I don’t mind disagreement, but something in me just can’t stand a poor argument. And thus it is that I feel compelled to write about one such argumen

                        • テクノロジー
                        • 2013/06/17 09:53
                        • Let’s stop telling programming newbies to learn Vim (or Emacs)

                          3 users

                          avdi.codes

                          Let’s stop telling programming newbies to learn Vim (or Emacs) Skip to entry content As readers of this blog know, I am a proud user of the third most baffling editor in existence. (Why third? well, I feel confident placing Vim as the 2nd, because while inscrutable, hand-twisting keybindings are difficult, in my observation modal editing is a slightly bigger mental leap for the programming newbie.

                          • テクノロジー
                          • 2012/10/17 06:16
                          • language
                          • ruby
                          • blog
                          • Configuring database_cleaner with Rails, RSpec, Capybara, and Selenium

                            15 users

                            avdi.codes

                            Configuring database_cleaner with Rails, RSpec, Capybara, and Selenium Skip to entry content If you write Rails code, or any Ruby code that interacts with a database, and you also write automated tests, chances are you have heard of or used the database_cleaner gem. It’s a terrific gem that abstracts away the various ORM APIs for getting the DB into a “blank slate” state. Periodically I start a ne

                            • テクノロジー
                            • 2012/09/01 19:03
                            • rspec
                            • rails
                            • Objects on Rails is Retired

                              42 users

                              avdi.codes

                              If you’re reading this, you have my permission to nag me to write up an actual post about why I’m no longer distributing Objects on Rails. In the meantime, feel free to sign up for my free email course about how most of what they told me about object-oriented programming was wrong: Lies of Object-Oriented Programming in Ruby and Rails

                              • テクノロジー
                              • 2012/03/16 02:31
                              • rails
                              • ruby
                              • book
                              • DCI
                              • programming
                              • dev
                              • development
                              • Letter to a Young Developer

                                3 users

                                avdi.codes

                                I’ve been getting some emails from young developers wanting to “level up” as programmers. I’m definitely not the first to write about this topic, so I’m not sure how much I have to add. Still, for what it’s worth here are a few points off the top of my head: Work with other developers. We are at a wonderful time in the history of technology when for the first time, it doesn’t really matter where y

                                • テクノロジー
                                • 2011/08/21 01:56
                                • programming
                                • Null Objects and Falsiness

                                  4 users

                                  avdi.codes

                                  Thank you to Ben Hamill for sending me a question that prompted this post. Very often in Ruby code, we would like to execute some action only if an object is present: def slug(title) if title title.strip.downcase.tr_s('^[a-z0-9]', '-') end end slug(" Confident Code") confident-code h = {} slug(h[:missing_key]) nil Strictly speaking, we aren’t checking for object presence here. In Ruby there is alm

                                  • テクノロジー
                                  • 2011/06/02 00:13
                                  • ruby
                                  • Avdi Grimm

                                    31 users

                                    avdi.codes

                                    Follow me for updates on what I am creating.

                                    • テクノロジー
                                    • 2011/05/05 00:26
                                    • ruby
                                    • ebook
                                    • book
                                    • pdf
                                    • 言語
                                    • dev
                                    • 書籍
                                    • Complex Hash Expectations in RSpec

                                      3 users

                                      avdi.codes

                                      When spec-ing something that calls method which takes a set of nested hashes (as many Rails methods do), it may be tempting to use #hash_including: to test for only the values you care about. However #hash_including won’t work the way we might hope for nested hashes. Take the following (highly contrived) example: describe CoffeeMaker do before :each do @it = CoffeeMaker.new end it "should receive

                                      • テクノロジー
                                      • 2011/03/05 04:34
                                      • ruby
                                      • Rails 3 resource routes with dots; or, how to make a Ruby developer go a little bit insane

                                        3 users

                                        avdi.codes

                                        Rails 3 resource routes with dots; or, how to make a Ruby developer go a little bit insane Skip to entry content This one cost me at least an hour of frustration. So apparently the Rails router has considered the dot (“.”) to be a “separator” character along with the slash (“/”) since version 1.2. I don’t know in what context this ever seemed like a good idea, but whatever. It’s not the sort of th

                                        • テクノロジー
                                        • 2010/10/29 16:23
                                        • Rails
                                        • Using "and" and "or" in Ruby

                                          6 users

                                          avdi.codes

                                          UPDATE: For a newer, better take on this topic, check out this post. UPDATE 2: This topic is part of the Graceful.Dev Flawless Ruby course, which is now completely free! If you use Ruby long enough, you will discover the and and or operators. These appear at first glance to be synonyms for && and ||. You will then be tempted to use these English oprators in place of && and ||, for the sake of impr

                                          • テクノロジー
                                          • 2010/08/03 02:13
                                          • ruby
                                          • Hammertime: An interactive error console for Ruby

                                            5 users

                                            avdi.codes

                                            Hammertime: An interactive error console for Ruby Skip to entry content Users of Lisp and Smalltalk environments are used to having some pretty powerful tools for debugging exceptions in their code. For instance, here’s the dialog I see when I try to do execute some bad code in Squeak: Ruby users are not so lucky. Our first indication of an error is either the code not working or a stack trace, de

                                            • テクノロジー
                                            • 2010/01/19 22:59
                                            • ruby
                                            • debug

                                            このページはまだ
                                            ブックマークされていません

                                            このページを最初にブックマークしてみませんか?

                                            『avdi.codes』の新着エントリーを見る

                                            キーボードショートカット一覧

                                            j次のブックマーク

                                            k前のブックマーク

                                            lあとで読む

                                            eコメント一覧を開く

                                            oページを開く

                                            はてなブックマーク

                                            • 総合
                                            • 一般
                                            • 世の中
                                            • 政治と経済
                                            • 暮らし
                                            • 学び
                                            • テクノロジー
                                            • エンタメ
                                            • アニメとゲーム
                                            • おもしろ
                                            • アプリ・拡張機能
                                            • 開発ブログ
                                            • ヘルプ
                                            • お問い合わせ
                                            • ガイドライン
                                            • 利用規約
                                            • プライバシーポリシー
                                            • 利用者情報の外部送信について
                                            • ガイドライン
                                            • 利用規約
                                            • プライバシーポリシー
                                            • 利用者情報の外部送信について

                                            公式Twitter

                                            • 公式アカウント
                                            • ホットエントリー

                                            はてなのサービス

                                            • はてなブログ
                                            • はてなブログPro
                                            • 人力検索はてな
                                            • はてなブログ タグ
                                            • はてなニュース
                                            • ソレドコ
                                            • App Storeからダウンロード
                                            • Google Playで手に入れよう
                                            Copyright © 2005-2025 Hatena. All Rights Reserved.
                                            設定を変更しましたx