タグ

2016年12月26日のブックマーク (11件)

  • Prefer DEFER Over ASYNC

    Steve works at SpeedCurve on the interplay between performance and design. He previously served as Google's Head Performance Engineer, Chief Performance Yahoo!, and Chief Performance Officer at Fastly. Steve has pioneered much of the work in the world of web performance. He is the author of High Performance Web Sites and Even Faster Web Sites. He is the creator of many performance tools and servic

    Prefer DEFER Over ASYNC
    kyaido
    kyaido 2016/12/26
  • Image Optimization

    Firefox and IE8 need to be served the JPEG or PNG fallback. While both Safari and Firefox are experimenting with supporting WebP images, there is no indication that support is forthcoming, according to CanIUse.com. There are some great online tutorials for media queries, <picture> and srcset if you want to dig deeper and implement any of these newer but well-supported features. Almost unlimited co

    Image Optimization
    kyaido
    kyaido 2016/12/26
  • JavaScriptテスト自動化キホンのキ - Qiita

    if(add(1, 2) == 3) { console.log("テスト結果OK"); } else { console.log("テスト結果NG"); } のように、ひたすら泥臭いコードを書くハメになる可能性があります。(これは極端な例ですが) また、このままではテスト実行後の結果がとても分かり辛いです。 どんなテストに成功したのか/失敗したのか、全体でどれだけテストがあって、どれだけパスしたのか。 はたまた失敗した場合に、どんな部分がNGだったのか。 これらを解決するためにあるのが、テストフレームワークと呼ばれるものです。 Javaで言えばJUnitRubyではRSpec、PHPではPHPUnitPHPSpecなどが該当します。 こういったテストフレームワークを使うことで、テストを簡潔に分かりやすく書けるようになります。 また、こんな感じでテスト結果も見やすく出力してくれます。

    JavaScriptテスト自動化キホンのキ - Qiita
  • 【Gulp】pngquantで圧縮した画像がMacで暗くなる場合の対処法 | たねっぱ!

    pngquantで圧縮した画像がMacのFirefox/Chromeで暗くなるという問題の原因と解決法に関してご紹介したいと思います。 自分はタスクランナーとしてGulpを利用しており、png画像の圧縮にはpngquantを使っているのですが、先日「MacのFirefoxとChromeだけ圧縮したpng画像の色が暗くなる」という状況に遭遇してしまいました。 色々調査した結果、原因と解決法がわかりましたので、今回はそれに関してご紹介したいと思います。 結論 Gulpでpngquantを使用する場合は以下のようにgulpfileを書いているかと思います。 var gulp = require('gulp'); var imagemin = require('gulp-imagemin'); var pngquant = require('imagemin-pngquant'); gulp.ta

    【Gulp】pngquantで圧縮した画像がMacで暗くなる場合の対処法 | たねっぱ!
    kyaido
    kyaido 2016/12/26
  • Speed Versus Speed to Market

    Jeremy Wagner (@malchata) is a professional front end developer living in the frozen wastes of Saint Paul, Minnesota. He is the author of Web Performance in Action from Manning Publications. You can see what he's up to on his blog, or on Twitter @malchata. When tasked to develop new projects, conscientious developers do all they can to ensure that the sites they make are as performant as possible.

    Speed Versus Speed to Market
    kyaido
    kyaido 2016/12/26
  • Cross-Browser HTML5 Form Validation is Finally Here! Now What? - Telerik Blogs

    Last week the Safari team released a new Technology Preview, and the release contained a feature that caught my eye. OMG, THE NEW SAFARI TECH PREVIEW HAS FORM VALIDATION SUPPORT! https://t.co/kzQtIwK4b2 pic.twitter.com/lKZsz5ZT9G — TJ VanToll (@tjvantoll) December 7, 2016 I’m irrationally excited because this is more than just a mundane feature shipping in a random browser preview. Safari was the

    Cross-Browser HTML5 Form Validation is Finally Here! Now What? - Telerik Blogs
    kyaido
    kyaido 2016/12/26
  • CSS Shorthand Syntax Considered an Anti-Pattern – CSS Wizardry

    12 December, 2016 CSS Shorthand Syntax Considered an Anti-Pattern Written by Harry Roberts on CSS Wizardry. There’s a very small but surprisingly significant (and even more surprisingly frequent) issue I spot a lot in other peoples’ code, either when working directly with it, refactoring it, or auditing it: the use of shorthand syntax in CSS. Typically we would view shorthand syntax as a benefit:

    CSS Shorthand Syntax Considered an Anti-Pattern – CSS Wizardry
    kyaido
    kyaido 2016/12/26
  • 実録!!データ構造リファクタリング -- 僕とメッセージ機能の300日戦争 - Qiita

    みなさんもきっとそうだと確信いたしておりますが、プログラマというのは、どういうわけか実装のちょろまかしには頭がまわるもので、今や丁寧なコードを書く人の鏡とまで言われるワタクシも、それはそれは手抜き方法ばかりうかんだものでした。 技術投資のいくつかは、不意ながら技術的負債になりまして、いろいろと世間様にもご迷惑をおかけした次第です。みなさんもきっとそうだと思いますが。 この話は、そんな「誰にでもある」小さな事件のひとつです。1 この記事は CrowdWorks Advent Calendar 21 日目の記事です。 昨日は @tmknom さんの 「アプリケーションアーキテクチャに関するポエム」 でした。 設計に関するトピックは幅広く、かなり広範な知識が求められますよね!早く DDD を読まねばという気分になりました(笑)。 さて、この記事は、著者がここ1年ほど携わった簡単なデータ構造の

    実録!!データ構造リファクタリング -- 僕とメッセージ機能の300日戦争 - Qiita
    kyaido
    kyaido 2016/12/26
  • apollo11号のソースコードを読みつつ - aerith7’s blog

    これはなに? はじめに AGCあれこれ Temporary I HOPEHOPEHOPE ASTRONAUT NOW LOOK WHERE YOU ENDED UP ふと気になりました いい時代ですね 1201&1202エラー なにそれ? カ、カルマンフィルターだー!!! カルマンフィルターの開発経緯 その他面白コメントアウト集 TRASHY LITTLE SUBROUTINES(つまんないサブルーチン) NUMERO MYSTERIOSO(神秘の数字) OFF TO SEE THE WIZARD COME AGAIN SOON HONI SOIT QUI MAL Y PENSE(悪意を抱く者に災いあれ)、NOLI ME TANGERE(私に触れるな) PINBALL_GAME_BUTTONS_AND_LIGHTS.agc おわりに 反省 参考文献 これはなに? この記事はeeic Adv

    apollo11号のソースコードを読みつつ - aerith7’s blog
    kyaido
    kyaido 2016/12/26
  • How V8 measures real-world performance · V8

    Show navigation Over the last year the V8 team has developed a new methodology to measure and understand real-world JavaScript performance. We’ve used the insights that we gleaned from it to change how the V8 team makes JavaScript faster. Our new real-world focus represents a significant shift from our traditional performance focus. We’re confident that as we continue to apply this methodology in

    kyaido
    kyaido 2016/12/26
  • サーバーサイドレンダリング不要論 - Qiita

    サーバーサイドレンダリング、Isomorphic、Universal JavaScriptなどの言葉をよく見かけます。なるほどね、良さそうだね、外部公開するサービスを書くことがあったら挑戦してみたいね、Mithrilにもisomorphic-mithrilってのをがんばっている人がいるし、みたいなことを漠然と思っていたのですが、最近ASCII.jpのシステムコールプログラミングの連載を書いていて、あらためてHTTPの仕様を見返してみて、逆にサーバーサイドレンダリングをしない方がいいのではないか、と思い始めました。 追記(23:30): サーバーサイドレンダリングと書いていますがUniversal JavaScriptみたいな凝ったビューの更新の意味です。 サーバーサイドレンダリングの欠点 サーバーサイドレンダリングのメリットとしてあげられるのは次の2点です。 検索エンジンのクローラー向け

    サーバーサイドレンダリング不要論 - Qiita
    kyaido
    kyaido 2016/12/26