本文書は、実現したい機能に対してリソース(時間)が足りないときの開発ポリシーをまとめたものである。これらのポリシーを一律にプロジェクトに適用するのが難しい場合は、機能毎に個別に適用を検討する。各項目には、機能実現の代償となるものも書き添える。
機能の実現に直接関係ない実装をしない。例えば、ページ遷移せずにJavaScriptでデータや画面を操作するなど。工数の少ない代替案がある場合は、開発者が仕様を提案する。
| module github.com/irohiroki/aws-sdk-go-v2-test | |
| go 1.18 | |
| require github.com/aws/aws-sdk-go-v2/service/dynamodb v1.17.3 | |
| require ( | |
| github.com/aws/aws-sdk-go-v2/credentials v1.12.23 // indirect | |
| github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19 // indirect | |
| github.com/aws/aws-sdk-go-v2/internal/ini v1.3.26 // indirect |
| #!/usr/bin/env ruby | |
| # | |
| # usage: ./abc.rb | |
| # | |
| # Shows the total, average, and the worst 10 methods in the project. | |
| def pt(line) | |
| line[/(?<=: )\d+/].to_i | |
| end |
| This is a leaner version of K combinator and can be included directly by a script tag. | |
| See https://gist.github.com/7727 for a mature one. |
| # RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
| # defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
| module Player | |
| describe MovieList, "with optional description" do | |
| it "is pending example, so that you can write ones quickly" | |
| it "is already working example that we want to suspend from failing temporarily" do | |
| pending("working on another feature that temporarily breaks this one") |
| app = window.app | |
| class app.Singleton | |
| instance = null | |
| @get: -> | |
| unless instance | |
| instance = new this | |
| instance.init() | |
| instance |
| require 'base64' | |
| require 'cairo' | |
| require 'stringio' | |
| png_b64 = <<END | |
| iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAC7mlDQ1BJQ0Mg | |
| UHJvZmlsZQAAeAGFVM9rE0EU/jZuqdAiCFprDrJ4kCJJWatoRdQ2/RFiawzb | |
| H7ZFkGQzSdZuNuvuJrWliOTi0SreRe2hB/+AHnrwZC9KhVpFKN6rKGKhFy3x | |
| zW5MtqXqwM5+8943731vdt8ADXLSNPWABOQNx1KiEWlsfEJq/IgAjqIJQTQl | |
| VdvsTiQGQYNz+Xvn2HoPgVtWw3v7d7J3rZrStpoHhP1A4Eea2Sqw7xdxClkS |
| class Singleton | |
| # We can make private variables! | |
| instance = null | |
| # Static singleton retriever/loader | |
| @get: -> | |
| unless instance | |
| instance = new @ | |
| instance.init() | |
| require 'sinatra' | |
| configure do | |
| set :port, 9999 | |
| end | |
| allow_all = { | |
| 'Access-Control-Allow-Headers' => 'X-Requested-With, X-File-Name, Content-Type', | |
| 'Access-Control-Allow-Origin' => '*', | |
| } |
| function webrick { | |
| if [ -z "$1" ] ; then | |
| port=3333 | |
| else | |
| port=$1 | |
| fi | |
| ruby -rwebrick -e "WEBrick::HTTPServer.new(:DocumentRoot => './', :Port => ${port}).tap{|w| Signal.trap(:INT){w.shutdown()} }.start" | |
| } |