Having tests is important. They allow us to extend and refactor our code with ease. Many developers follow test driven development as a workflow. I believe that writing tests makes software development much more interesting and generally leads to better code. Well-designed and tested systems are easier to maintain. Over the last few years, developers have begun to put a lot of application logic in
lodash v3.0.0 After a little over a year & more than 2,000 commits we’re excited to release lodash v3.0.0. lodash follows semantic versioning so with this major release we’ve taken the opportunity to clean house & make some back-compat breaking changes. We’ll get into that in a bit, but first lets talk about all the cool things this release has to offer. String methods By popular demand we surveye
ユニットテストがしにくい状態となってるコードをTestiumを使ったE2Eテストを書いてリファクタリングしてみる話です。 例えば、以下のようなjQueryで書いたコードは外(テストコード)から取り出すポイントがないので、ユニットテストを書くのは難しいと思います。(そもそもViewのコードなので) 特定のバージョンでの変更点を簡単に確認できるよう、 「Aの列のラジオボタンを選ぶと同じ行より一つ下にあるBの列のラジオボタンを自動で選ぶ」 という補助機能 $(document).ready(function () { // seq: シーケンス番号 $.each(["new_version", "old_version"], function () { $("input[name='" + this + "']").each(function (idx, elem) { if (idx == 0
Warning: This blog post is outdated. Instead, read chapter “Destructuring” and section “Parameter handling” in “Exploring JavaScript”. ECMAScript 6 (ES6) supports destructuring, a convenient way to extract values from data stored in (possibly nested) objects and arrays. This blog post describes how it works and gives examples of its usefulness. Additionally, parameter handling receives a significa
さてさて、io.js ver.1.0.0, 1.0.1 が無事アメリカ時間の1/13日に予告通りリリースされました。 リリースから数日経過して、現在はv1.0.3が出ています。 ある程度v1.0が安定してきた今、実際にNode.jsとどう違うのかを解説したいと思います。 Node.jsと機能的に違う所はどこか 前回の記事のio.jsについて知っていること - from scratchでも触れたんですが、一番大きな違いはv8が新しくなり、ES6の機能が増えました。 詳しくは公式のES6に関するページを読んでもらうとして、かいつまんで書いていきます。 ES6の機能に"shipping", "staged", "in_progress"の3段階のラベルがつくようになりました。 これはES6の機能の安定度合いを示していて、 "shipping" > "staged" > "in_progress"
Introduction Developers have a number of choices today when it comes to selecting a JavaScript framework or UI library for building scalable web apps. React / Next.js, Vue / Nuxt, Angular…the list of solutions continues to grow, but just how do you decide on which to use in a sea of so many options? To help you understand the options, we created TodoMVC - a project which has offered the same Todo
追記 config.js は常に自動生成されるものだと思っていましたが、その認識は誤りだったようです。 そのため、jspm_packages 下ではなく、public ディレクトリに設置するようにしました。 はじめに ぼくは Web の技術が大好き。 はじめに HTML 書いてブラウザで見たら表示されて感動したのを今でも覚えてる。 そんな調子でプログラミングの仕事について、ずっとそこらへんを書いてるけど、 最近の開発、めんどくせーこと多くないですか。 AltJS だー、React + JSX だー。ミニファイだー。依存の解決だー! もちろん、必要なことだし、イケてるのもわかるけど、開発中に毎回 watch すんのもめんどいし...。と思っていた。 救世主 jspm 会社の人がなにげなく紹介していた jspm。 ビルドツールとかの「開発全体がキレイで楽になります!」っていうのが好きなので、試
TypeScript 1.4が出てCompiler Service APIのドキュメントが出てきた。 Using the Compiler API · Microsoft/TypeScript Wiki · GitHub よーし触ってみようと思ったのだけど、APIがファイルを前提にしていて、ちょっとしたTypeScriptコード片を文字列で渡して変換結果を取り出す、みたいなことをするだけなのに50行ぐらい必要。 まあTypeScriptの性質上、外部ファイルを参照していたら型解決のために読み取る必要があるわけなのでファイルを前提にするのはしょうがない。ただもう少し簡単なAPIが欲しいので、typescript-simpleというモジュールを作った。 使い方はこれだけ。シンプル。 var tss = require('typescript-simple'); var js = tss('va
Highlights This is a summary of the major changes you need to know about for this version of ESLint. Partial ECMAScript 6 support 0.12.0 introduces support for several ECMAScript 6 features, including: let and const Regular expression y flag Regular expression u flag Binary literals Octal literals for-of Generators Object literal syntax changes All of these options are off by default, and you can
Jestとは Facebookで開発しているUnitTestフレームワーク。 特徴は以下です。 FAMILIAR APPROACH Jasmineベースなので記法は馴染みやすいものです。 MOCK BY DEFAULT CommonJSスタイルのrequire()をMockすることで単体テストを実現します。 SHORT FEEDBACK LOOP サクッとテストできる。 ブラウザとかPhantom.jsとか要らないよって意味だと思う。。。 何がいいのか? 素のJasmineと比べてこんな特徴があるようです。 テストファイルを勝手に探してくれる。 DefaultでMockされるので、あえて記述しない限り純粋な単体テストになる。 mockを使うことで、非同期処理を同期的に書ける。 Jasmine2.Xでは非同期サポートがされたとか聞きましたがよく知らない。 jsdomを使うことで、HTMLを含
What is the best way to add new features to a language? This blog post describes the approach taken by ECMAScript 6 [1], the next version of JavaScript. It is called One JavaScript, because it avoids versioning. Versioning # In principle, a new version of a language is a chance to clean it up, by removing outdated features or by changing how features work. That means that new code doesn’t work in
With the latest programming language rankings coming in, it’s clear that Google’s Dart is going nowhere. Dart has fallen out of the top 20 at TIOBE (now sitting at 34th position). Langpop.corger.nl still show Dart behind Scala, Haskell, Groovy, Go, Clojure, Lua, and Erlang…languages that are far, far down the list at the pathological TIOBE index. Even a newly introduced ranking report from Gartner
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く