Steven Wong

7 posts

Learn backend development - Ruby on Rails

Here are some references to get you started with backend development with Ruby on Rails (http://rubyonrails.org/). Ruby Basics Online courses: https://www.codeschool.com/learn/ruby https://www.codecademy.com/learn/learn-ruby Familiar with Ruby's community (one strong reason people use RoR) http://rubyonrails.org/community/ Advanced: Other Ruby tools / libraries https://github.com/markets/awesome-ruby...


Read More

Learning Web Programming - 1 Month Curriculum

Q: I want to learn web development, where should I start ? F5 Works offers mentorship to people who are interested in picking up software development. Most of them have no idea what web and mobile development is about. As a result, we have prepared a 1 month curriculum for fresh beginners (and even fresh graduate who has no...


Read More

Gotcha using paranoia - a soft delete gem for Ruby on Rails application

Gotcha using paranoia - a soft delete gem for Ruby on Rails application thumbnail

To implement soft delete mechanism in Ruby on Rails, paranoia is the life-saver. Sample Usage After destroying a record, the record is still stored in the database, but it won't be returned in most of the ActiveRecord collection methods. For example, the following method call only returns Product that has not be soft-deleted: Product.all There are use...


Read More

Use Koala Ruby gem to post "gif" image

Use Koala Ruby gem to post "gif" image thumbnail

Koala is a famous gem for interacting with Facebook activity. Common interaction can be achieved with single simple method call. However, when we develop a Facebook feed poster for gif image, the gif image was not automatically played. Koala common usage For posting a plain text message to my Facebook feed: facebook_graph = Koala::Facebook::API.new(facebook_...


Read More

Ionic play embed youtube

When we want to play youtube in an ionic project. Simply using <youtube-iframe-player></youtube-iframe-player> It works great during development, and also on Android. However once it is tested in iOS, it shows a blank page with Unable to post message to https://www.youtube.com. Recipient has origin file:// To Solve this, include the...


Read More

Prevent duplicated database record creation with find_or_create_by

When we developed the gaming App for our client Colors, we encountered a common data consistency problem: How to prevent duplicated database record creation. Of course everyone instantly can think of "use #find_or_create_by", but it is actually little bit more complicated than that. #find_or_create_by We are using Ruby on Rails to implement...


Read More

Android sdk "system-images" eat up large disk space

My mac runs out of disk space, after doing disk diagnosis found out Android sdk "system-images" eat up 37GB. Directly DELETE them with no doubt!...


Read More