Phone Home: A client-side error collection systemChris Birchall
This document summarizes Phone Home, a system to collect client-side errors from users' browsers. The Phone Home client runs JavaScript in users' browsers to collect errors and send them via HTTP POST requests to the Phone Home server. The server is built with Scalatra and saves the error data to MongoDB. It was created to debug unreproducible jQuery errors in IE browsers. Features include error handling, page load timing collection, custom field support, and an admin UI with stats and a recent events list. The server uses CORS to allow cross-domain requests from the Phone Home client. Data can also be analyzed using the ltsv4s library to parse and query the log files in Scala.
Guess the Country - Playing with Twitter Streaming APIChris Birchall
(1) The document describes a project that collected over 285,000 geo-tagged tweets over 13 days using the Twitter Streaming API and extracted user names and countries to build a database linking names to countries. (2) It then used Spark to process the data and built a web interface that allows users to search for a name and get the most likely country. (3) Analysis of the data found the top countries by user count were the United States, United Kingdom, Indonesia and others, and the most common first and last names.
ScalaCache is a facade library that provides a simple API for caching methods across various cache systems like Google Guava, Ehcache, Memcached, and Redis. It uses macros to generate cache keys and automatically cache method return values. This avoids issues with traditional approaches using the Java API or Spring which involve runtime overhead or restrictions. ScalaCache aims to improve features like asynchronous support, versioning, custom serialization, and browser caching integration.
This document provides an overview of Gatling, an open source load testing tool. It can record scenarios from browser interactions similar to Selenium and run multiple scenarios simultaneously. The document discusses Gatling's scripting domain specific language (DSL) for defining scenarios, advanced features like loading data from files, and how to get started using Gatling by downloading, creating a simulation, and viewing reports. It also briefly mentions Gatling's internal architecture using Scala, Akka, and Netty.
Skinny is a lightweight web framework for Scala that aims to provide a Rails-like development experience. It offers features like routing, CRUD templates, validation, ORM, database migrations, asset compilation, and mail sending. Some benefits highlighted include an easy setup process, statically typed but simple code, and suitability for replacing legacy systems. The framework is under active development with a 1.0 release planned for this week and continued work on future versions.
On February 18th, 2010 was O'Reilly's "Exploring Rails 3" online conference and these are Gregg Pollack's slides. They are by no means a complete record of improvements in Rails 3, but they should serve to get your appetite wet.
Rails 3 provides a concise overview of changes in Rails 3 including maintaining MVC structure and RESTful routing while improving areas like file structure, block helpers, routing and constraints, ActiveRecord querying, resources routing, and ActionMailer delivery. Key changes include a more Rack-like implementation, chainable ActiveRecord scopes, and pagination and layout support in ActionMailer.
Pourquoi Ruby on Rails est génial? (d'un point de vue non technique)Camille Roux
Camille Roux vous explique pourquoi Ruby et Ruby on Rails peuvent être un choix fantastique pour vos prochains projets. Pendant une heure vous aurez le plaisir de faire un tour en orbite autour de la planète Ruby. Après un bref voyage dans le temps pour comprendre son histoire, vous découvrirez ce qui rend ce monde si magique.
Camille répondra à de nombreuses questions que vous vous posez sûrement :
*Pourquoi y-a-t-il un tel d'engouement envers Rails en ce moment?
*Rails est-il performant? pourquoi?
*Pourquoi est-ce un environnement si confortable pour les développeur?
*Qu'est-ce qui rend cette techno si efficace?
*Quel est l'avenir de Rails?
All I learned while working on a Scala OSS project for over six years #ScalaM...Kazuhiro Sera
* http://2018.scalamatsuri.org/index_en.html
* https://www.youtube.com/watch?v=y7BxvT-Jm6w
In 2011, I started a Scala open source project named ScalikeJDBC. Thanks to many contributors, I am still working on the project after six years. In the meantime, the Scala community has been growing sharply, and the trends have been continuously changing. Despite the fact that the number of developers who work on OSS projects has increased, there are not many developers who have been working on a Scala project for several years. In this talk, I will share my experiences and pieces of knowledge through maintaining the OSS project for more than six years.
Skinny 2 was recently released on November 19th. The update includes moving from Scalatra to Skinny Micro for the servlet layer. Upgrading to Skinny 2 is easy and provides improvements like making async controllers safer when using Scala Futures. The documentation website was also renewed with archived 1.x docs.
This document discusses using Futures in Servlet applications. It notes that while Futures are standard in Scala, directly accessing mutable Servlet API objects like the request from Future threads can cause issues. It describes problems like request objects being recycled before Futures complete. It also discusses how Scalatra's use of DynamicScope for the request/response can cause problems when used with Futures. The document outlines improvements in Skinny Framework that avoid these issues, such as passing a stable Context object and avoiding DynamicScope.
Beginning Scala with Skinny Framework #jjug_cccKazuhiro Sera
This document provides an overview of the Skinny Framework for building Scala web applications. It discusses how to get started with a basic Skinny application, the MVC structure used in Skinny, database modeling and access using Skinny ORM, and other features like validation, routing and scaffolding. Key points covered include bootstrapping a Skinny app, writing basic controllers and views, defining models and relationships, and generating CRUD pages automatically with scaffolding.
Skinny Framework is a Scala web framework similar to Rails that aims for apps and frameworks to be "skinny" or lightweight. Version 0.9.17 added features like scaffold generation and database migrations. Version 1.0.0 is planned for Q4 2013 and will focus on fixing issues and establishing stable APIs before continuing development of new features. Contributors are welcome and the framework can be easily tested by running the included blank app template.
Kabukiza.tech 1 LT - ScalikeJDBC-Async & Skinny Framework #kbkz_techKazuhiro Sera
This document introduces ScalikeJDBC, a type-safe SQL library for Scala that provides a non-blocking approach to database access. It summarizes ScalikeJDBC's features, including its DSL for writing queries, SQL interpolation support, and an asynchronous version called ScalikeJDBC-Async. It also briefly introduces a new Scala web framework called Skinny that is inspired by Ruby on Rails and uses ScalikeJDBC.
This document is a tutorial for the ScalikeJDBC library. It introduces ScalikeJDBC as a tidy SQL-based database access library for Scala developers. It covers key topics like the connection pool, implicit sessions, SQL syntax, the query DSL, testing support, and integration with Play. The tutorial aims to help beginners get started with ScalikeJDBC's main features.
This document introduces the rspec-kickstarter gem, which is a command line tool that automates the generation of RSpec test code. It can create new spec files, write describe and context blocks, create instances and prepare method arguments to invoke tested methods. The gem parses source code using RDoc::Parser::Ruby to extract method names and parameters and generate starter test code. While testing methods alone is imperfect, the author argues it is effective for quickly kickstarting tests when none exist. Feedback on the new gem is welcomed.
論文紹介:「Amodal Completion via Progressive Mixed Context Diffusion」「Amodal Insta...Toru Tamaki
Katherine Xu, Lingzhi Zhang, Jianbo Shi; Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, "Amodal Completion via Progressive Mixed Context Diffusion"CVPR2024
https://openaccess.thecvf.com/content/CVPR2024/html/Xu_Amodal_Completion_via_Progressive_Mixed_Context_Diffusion_CVPR_2024_paper.html
Minh Tran, Khoa Vo, Tri Nguyen, and Ngan Le,"Amodal Instance Segmentation with Diffusion Shape Prior Estimation"ACCV 2024
https://uark-aicv.github.io/AISDiff/
This study aims to develop an interactive idea-generation support system that enables users to consider the potential side effects of realizing new ideas.
In idea generation, confirmation bias often leads to an excessive focus on ``convenience,'' which can result in the oversight of unintended consequences, referred to as the ``side effects of convenience.''
To address this, we explored methods to alleviate user biases and expand perspectives through system-supported dialogue, facilitating a broader consideration of potential side effects.
The proposed system employs a stepwise idea-generation process supported by large language models (LLMs), enabling users to refine their ideas interactively.
By dividing the ideation process into distinct stages, the system mitigates biases at each stage while promoting ideas' concretization and identifying side effects through visually supported dialogues.
Preliminary evaluation suggests that engaging with the proposed system fosters awareness of diverse perspectives on potential side effects and facilitates the generation of ideas that proactively address these issues.
14. 7 つの実装パターン
• Value Objects
• Service Objects
• Form Objects
• Query Objects
• View Objects
• Policy Objects
• Decorators
15. Value Objects
• おなじみ Value Object
• immutable な値を保持するクラス
• 保持する値によって比較可能
• 何らかのロジックを持つ attribute(また
はその小さな集合)が適している
• 具体例:PhoneNumber、Money、
Ratingなど
16. Service Objects
• 複数の model を利用する場合
• 外部のサービス、API と連携する場合
• 複雑なロジックを実装する場合
• 既存の model の主たる責務でない場合
• Strategy パターンを適用したい場合
• 普通 ActiveModel ではない
17. Form Objects
• 一つのフォームで複数の AR model を更
新したい場合に有効
• ActiveModel にする
• Form の save の内部で複数の AR model
の save を呼び出す
• 標準の accepts_nested_attributes_for
は @brynary 的には非推奨
• 複雑になったら永続化処理を Service に
18. Query Objects
• バッチ用 or 複雑な条件の SQL を AR の
scope やクラスメソッドにせず Query
Object として分離
• 初期化時に AR::Relation オブジェクトを
渡すようにすると合成可能になる
• TrialQuery.new(Account.where(…)).fin
d_each do ¦e¦ … end
19. View Objects
• View のためのロジックを AR model に
書かない(エラーメッセージ生成など)
• AR model を保持するクラスを定義し
render にはこちらを渡すようにする
• helper に AR model を渡す実装よりも、
リファクタリングが促進される
• 多様な UI に対応する場合にも有効
20. Policy Objects
• AR model を参照はするが主たるドメイ
ンではないロジック(分析のための判定
など)を分離する
• 例:メール配信対象?アクティブユーザ?
• AR model を保持するクラスとして定義
• 他との違い:Policy は read な処理だけ
Service は write も含む、Query は SQL
実行と result set を yield に渡すだけ
27. 今日から出来ること
• 盲目的に AR のクラスメソッドにしない
• AR でないモデルもどんどんつくる
• Controller に AR model 呼び出しをズラ
ズラ書くより Service にする
• 複雑なフォームは Form を導入する
• AR に表示用ロジックを持たず View
Object でラップして表示処理に渡す