Contributing and Starting Open Source Projects for Beginners

Contributing and Starting Open Source Projects for Beginners

Guo Xiang

Guo Xiang
Alan

Guo Xiang
Alan

     @tgxworld
     @tgx_world

Student

Did a one year internship in California under the

NUS Overseas College programme

Im a Follower

N
E
K
O

A
T
S
U
M
E

 

GEM  MINITEST-nyan-cat

#1 Contributor to

Ruby on Rails in Singapore

Contributing and Starting Open Source Projects for Beginners

Open Source Projects 

Ruby on Rails

Title Text

I was New

I was New

Title Text

I wanted to LEARN 

I was New

Title Text

I wanted to LEARN 

I wanted to GIVE BACK 

Google

summer of code 2014

DEVELOPER

Magician

Reading RAILS forces you to learn

 

​​or rather reading open source code in general 

You Don't know
What you Don't KNow

# rails/actionpack/lib/action_dispatch/testing/integration.rb

%w(get post patch put head delete cookies assigns
   xml_http_request xhr get_via_redirect post_via_redirect).each do |method|
  define_method(method) do |*args|
    # reset the html_document variable, except for cookies/assigns calls
    unless method == 'cookies' || method == 'assigns'
      @html_document = nil
      reset_template_assertion
    end

    integration_session.__send__(method, *args).tap do
      copy_session_variables!
    end
  end
end

Rails is such a large code base, How can I possibly contribute anything

[CI SKIP] DOC FIX

IMPROVE PERFORMANCE

853.16 ips/s

Before

aFTER

882.19 ips/s

3.76%

Don't be AFRAID

It is ok to make mistaeks

BE Patient

\o/

Finding THINGS TO WORK ON

codetriage.com

RAILS ISSUES

DHH's list

Tools to help you understand the code base better

Ruby-prof

class UserFlowTest < ActionDispatch::IntegrationTest
  def test_index
    RubyProf.start
    get '/users'
    result = RubyProf.stop
    File.open "a.html", 'w' do |file|
      RubyProf::GraphHtmlPrinter.new(result).print(file)
    end

    assert_equal 200, response.status
  end
end

BYEBUG

READ THE TESTS!

Contributing and Starting Open Source Projects for Beginners

Title Text

Lesson LEARNT

FIND a simple but important

Problem to Solve

Why RubyBENCh.org matters

Finding out about regressions MONTHS in the development cycle can often incur a massive cost , fixing bugs early is cheap - Sam Saffron

We need data

Title Text

Always be measuring

Ruby benchmarks

https://github.com/ruby/ruby/tree/trunk/benchmark

DISCOURSE benchmarks

https://github.com/discourse/discourse/blob/master/script/bench.rb

Title Text

RELEASES BENCHMARKs

Title Text

PER COMMIT BENCHMARKS 

Ruby-bench-web

Lesson LEARNT

Ask for help

Ruby-bench-Server

VIRTUAL HOSTS

DEDICATED SERVERS

Lesson LEARNT

Ask for help

Ruby-bench-DOCKER

Lesson LEARNT

LEARN AND TRY OUT NEW THINGS

Ruby-bench-SUITE

Lesson LEARNT

Ask for help

 @KIRS

MOST IMPORTANT Lesson LEARNT

Keep building

and

seek for feedback

Starting and Contributing to Open Source

By tgxworld

Starting and Contributing to Open Source

  • 1,647