diff --git a/README.md b/README.md
index cdd242ae..4b4717a3 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,7 @@ Dutch translation by [_Ivo Herweijer_](https://github.com/easydatawarehousing)
Brazilian Portuguese translation by [_Ricardo da Verdade Silva_](https://github.com/ricardovsilva)
Japanese translation by _Koji Shimada_ & _Masayoshi Takahashi_
Russian translation by [_Alexander Nikolaev_](https://github.com/startaper)
+Bahasa Indonesia translation by [_Irvan Fauziansyah_](https://github.com/irvanfza)
Suggestions to improve translations are welcome.
If you submit a pull request updating a translation please
diff --git a/collector.rb b/collector.rb
index efe2c7d3..7a694834 100644
--- a/collector.rb
+++ b/collector.rb
@@ -139,6 +139,7 @@ def initialize(app, options_hash={}, &block)
Collector.new('translations/pt-br/try_ruby_*.md', 'source/try_ruby_pt-br.json').collect
Collector.new('translations/ja/try_ruby_*.md', 'source/try_ruby_ja.json').collect
Collector.new('translations/ru/try_ruby_*.md', 'source/try_ruby_ru.json').collect
+ Collector.new('translations/id/try_ruby_*.md', 'source/try_ruby_id.json').collect
# TODO: add any new translations here
diff --git a/source/index.html.markdown b/source/index.html.markdown
index 35043380..62207cd9 100644
--- a/source/index.html.markdown
+++ b/source/index.html.markdown
@@ -20,6 +20,7 @@ description: Learn to program in Ruby in 30 minutes
+
diff --git a/source/try_ruby_id.json b/source/try_ruby_id.json
new file mode 100644
index 00000000..b14237a9
--- /dev/null
+++ b/source/try_ruby_id.json
@@ -0,0 +1,58 @@
+{
+ "1": {"lang": "ID", "title": "Punya waktu 30 menit? Coba Ruby sekarang juga!", "chapter": "Y", "answer": "", "ok": "", "error": "", "text": "%3Cp%3ERuby%20adalah%20sebuah%20bahasa%20pemrograman%20dari%20Jepang%20yang%20merevolusi%0Adunia%20pengembangan%20software.%3C/p%3E%0A%0A%3Cp%3EKeindahan%20dari%20Ruby%20terletak%20pada%20keseimbangan%20antara%20kesederhanaan%20dan%20kekuatannya.%3C/p%3E%0A%0A%3Cp%3EKamu%20bisa%20coba%20mengetik%20beberapa%20kode%20Ruby%20di%20editor%20dan%20gunakan%20tombol-tombol%20berikut%20untuk%20navigasi:%3C/p%3E%0A%0A%3Cul%3E%0A%3Cli%3E%3Cstrong%3ERun%3C/strong%3E%20→%20Mengeksekusi%20kode%20yang%20ada%20di%20editor%3C/li%3E%0A%3Cli%3E%3Cstrong%3ECopy%3C/strong%3E%20→%20Menyalin%20contoh%20kode%20kedalam%20editor%3C/li%3E%0A%3Cli%3E%3Cstrong%3ENext%3C/strong%3E%20→%20Melanjutkan%20ke%20pelajaran%20selanjutnya%3C/li%3E%0A%3Cli%3E%3Cstrong%3EBack%3C/strong%3E%20→%20Kembali%20ke%20pelajaran%20sebelumnya%3C/li%3E%0A%3Cli%3E%3Cstrong%3EClear%3C/strong%3E%20→%20Mengosongkan%20editor%3C/li%3E%0A%3C/ul%3E%0A%0A%3Cp%3EGunakan%20tombol%20dengan%20ikon%20‘dunia’%20%3Cspan%20aria-hidden=%22true%22%20class=%22glyphicon%20glyphicon-globe%22%3E%3C/span%3E%0Adiatas%20untuk%20merubah%20bahasa%20TryRuby.%3C/p%3E%0A%0A%3Ch3%3EKlik%20tombol%20%3Cstrong%3ENext%3C/strong%3E%20untuk%20mulai%20belajar.%3C/h3%3E%0A", "load_code": ""},
+ "2": {"lang": "ID", "title": "Cara Menggunakan Editor", "chapter": "N", "answer": "%5E%5Cd%7B1,%7D$", "ok": "Bagus!%20Kamu%20baru%20saja%20melakukan%20perhitungan%20matematika.%20Lihat%20bagaimana%20jawabannya%20muncul?", "error": "Ketik%202%20+%206%20di%20dalam%20editor", "text": "%3Cp%3EJendela%20editor%20yang%20paling%20bawah%20adalah%20tempat%20untuk%20menulis%20kode%20Ruby%20kamu,%20tekan%20tombol%20%3Cstrong%3ERun%3C/strong%3E%20dan%0Alihat%20hasilnya!%3C/p%3E%0A%0A%3Cp%3EContoh,%20coba%20ketik%20perhitungan%20matematika.%20Seperti:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3E2%20+%206%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EHasil%20dari%20kode%20program%20yang%20kamu%20ketik%20akan%20muncul%20sendiri%20di%20dalam%20jendela%20hasil%20yang%20ada%20di%20paling%20atas.%0AJuga%20akan%20ada%20baris%20informasi%20yang%20membberitahukan%20seberapa%20baik%20kamu.%3C/p%3E%0A%0A%3Cblockquote%3E%0A%3Cp%3ESebagai%20alternatif%20kamu%20bisa%20menekan%20tombol%20%3Cstrong%3ECopy%3C/strong%3E%20untuk%20menyalin%20contoh%20kode%20yang%20ada%20ke%20dalam%20editor.%3C/p%3E%0A%3C/blockquote%3E%0A", "load_code": ""},
+ "3": {"lang": "ID", "title": "Angka dan Matematika", "chapter": "N", "answer": "%5E[0-9%5C.,-]%7B1,%7D$", "ok": "bagus", "error": "", "text": "%3Cp%3ERuby%20mengenali%20angka%20dan%20simbol-simbol%20matematika.%20Kamu%20bisa%20coba%20beberapa%20matematika%20sederhana%20seperti:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3E4%20*%2010%0A5%20-%2012%0A30%20/%204%0A%3C/code%3E%3C/pre%3E%0A", "load_code": ""},
+ "4": {"lang": "ID", "title": "Putting it differently", "chapter": "N", "answer": "%5E[0-9%5C.,-]%7B1,%7D$", "ok": "Well%20put", "error": "", "text": "%3Cp%3EApa%20kamu%20memperhatikan%20kalau%20kamu%20mengetik%20lebih%20dari%20satu%20formula,%20maka%20hasil%20yang%20ditampilkan%20hanyalah%20formula%20yang%20terakhir.%0AKenapa%20bisa%20begitu?%3C/p%3E%0A%0A%3Cblockquote%3E%0A%3Cp%3EAgar%20website%20ini%20mudah%20digunakan,%20To%20make%20this%20website%20easier%20to%20use%20I%20have%20told%20Ruby%20to%20copy%20the%20result%20of%20your%20program%20to%20the%0Aoutput%20screen%20at%20the%20top.%20So%20when%20you%20type%20a%20formula%20you%20get%20to%20see%20the%20results.%0A%3Cstrong%3EBut%20only%20the%20last%20result.%3C/strong%3E%20And%20only%20if%20the%20output%20is%20still%20empty.%3C/p%3E%0A%3C/blockquote%3E%0A%0A%3Cp%3ESo%20when%20you%20entered%202%20or%20more%20formula’s,%20Ruby%20only%20showed%20the%20result%20of%20the%20last%20formula.%3C/p%3E%0A%0A%3Cp%3EOf%20course%20you%20have%20the%20power%20to%20control%20the%20screen!%20Just%20type%20%3Cstrong%3Eputs%3C/strong%3E%20before%20each%20formula%0A(with%20a%20space%20in%20between).%20Puts%20means:%20%3Cem%3E‘put%20something%20on%20the%20screen’%3C/em%3E.%3C/p%3E%0A%0A%3Cp%3ETry%20this:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eputs%204%20*%2010%0Aputs%205%20-%2012%0Aputs%2030%20/%204%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3ENow%20remove%20the%20puts%20from%20the%20last%20formula%20and%20see%20what%20happens.%3C/p%3E%0A", "load_code": ""},
+ "5": {"lang": "ID", "title": "Say Your Name", "chapter": "N", "answer": "[a-zA-Z]%7B1,1%7D", "ok": "Perfect,%20you've%20formed%20a%20string%20from%20the%20letters%20of%20your%20name", "error": "", "text": "%3Cp%3ESure,%20computers%20are%20handy%20and%20fast%20for%20math.%20Let’s%20move%20on.%20Want%20to%20see%20your%20name%20reversed?%3C/p%3E%0A%0A%3Cp%3EFirst%20type%20your%20first%20name%20in%20quotes%20like%20this:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3E"Jimmy"%0A%3C/code%3E%3C/pre%3E%0A", "load_code": ""},
+ "6": {"lang": "ID", "title": "Say Your Name Backwards", "chapter": "N", "answer": "%5Cw+", "ok": "dooG", "error": "", "text": "%3Cp%3EA%20string%20is%20a%20set%20of%20characters%20the%20computer%20can%20process.%20Imagine%20the%20letters%20are%20on%20a%20string%20of%0Alaundry%20line%20and%20the%20quotes%20are%20clothespins%20holding%20the%20ends.%20The%20quotes%20mark%20the%20beginning%20and%20end.%3C/p%3E%0A%0A%3Cp%3ETo%20reverse%20your%20name,%20type:%20%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3E"Jimmy".reverse%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3E(Don’t%20forget%20the%20dot!)%3C/p%3E%0A", "load_code": ""},
+ "7": {"lang": "ID", "title": "Counting the Letters", "chapter": "N", "answer": "%5E%5Cd+$", "ok": "Yep.%20Length%20is%20also%20a%20'method'", "error": "", "text": "%3Cp%3EYou%20have%20used%20the%20reverse%20%3Cstrong%3Emethod%3C/strong%3E%20on%20your%20name!%20By%20enclosing%20your%20name%20in%20quotes,%20you%20made%20a%20string.%20Then%20you%20called%20the%20reverse%20method,%20which%20works%20on%20strings%20to%20flip%20all%20the%20letters%20backwards.%3C/p%3E%0A%0A%3Cp%3ENow,%20let%20us%20see%20how%20many%20letters%20are%20in%20your%20name:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3E"Jimmy".length%0A%3C/code%3E%3C/pre%3E%0A", "load_code": ""},
+ "8": {"lang": "ID", "title": "On Repeat", "chapter": "N", "answer": "(%5Cw+)", "ok": "Nice%20to%20meet%20you.Nice%20to%20meet%20you.Nice%20to%20meet%20you.", "error": "", "text": "%3Cp%3ENow,%20you’re%20probably%20wondering%20what%20any%20of%20this%20is%20good%20for.%3C/p%3E%0A%0A%3Cp%3EWell,%20I’m%20sure%20you’ve%20been%20to%20a%20website%20that%20screamed,%20%3Cstrong%3EHey,%20your%20password%20is%20too%20short!%3C/strong%3E%3C/p%3E%0A%0A%3Cp%3ESee,%20some%20programs%20use%20that%20simple%20%3Cstrong%3E.length%3C/strong%3E%20code.%3C/p%3E%0A%0A%3Cp%3EWatch%20this.%20Let’s%20multiply%20your%20name%20by%205.%20%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3E"Jimmy"%20*%205%0A%3C/code%3E%3C/pre%3E%0A", "load_code": ""},
+ "9": {"lang": "ID", "title": "Hey, Summary #1 Already", "chapter": "Y", "answer": "NoMethodError%7Cundefined", "ok": "Nope,%20it%20is%20not%20possible%20to%20reverse%20a%20number.%20Click%20'next'", "error": "", "text": "%3Cp%3ELet’s%20look%20at%20what%20you’ve%20learned%20in%20the%20first%20minute.%3C/p%3E%0A%0A%3Ch3%3EThe%20editor%3C/h3%3E%0A%0A%3Cp%3ETyping%20code%20into%20the%20editor%20and%20clicking%20on%20run%20gives%20you%20an%20answer%20in%20the%20ouput%20window.%0A(Almost)%20all%20code%20gives%20an%20answer.%3C/p%3E%0A%0A%3Ch3%3ENumbers%20and%20strings%3C/h3%3E%0A%0A%3Cp%3ENumbers%20and%20strings%20are%20Ruby’s%20math%20and%20text%20objects.%3C/p%3E%0A%0A%3Ch3%3EMethods%3C/h3%3E%0A%0A%3Cp%3EYou’ve%20used%20English-language%20methods%20like%20reverse%20and%20length.%20And%20symbolic%20methods%20like%20the%0Amultiplication%20method:%20*%3Cbr%3E%0A%3Cstrong%3EMethods%20mean%20action!%3C/strong%3E%3C/p%3E%0A%0A%3Cp%3EThis%20is%20the%20essence%20of%20your%20learning.%20Taking%20simple%20things,%20toying%20with%20them%20and%20turning%20them%20into%0Anew%20things.%20Feeling%20comfortable%20yet?%20I%20promise%20you%20are.%3C/p%3E%0A%0A%3Ch2%3EOkay,%3C/h2%3E%0A%0A%3Cp%3Elet’s%20do%20something%20uncomfortable.%20Try%20reversing%20a%20number:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3E40.reverse%0A%3C/code%3E%3C/pre%3E%0A", "load_code": ""},
+ "10": {"lang": "ID", "title": "Stop, You're Barking Mad!", "chapter": "N", "answer": "%5E%5Cd%7B1,%7D$", "ok": "Only%20strings%20can%20be%20reversed", "error": "", "text": "%3Cp%3EYou%20can’t%20reverse%20the%20number%20forty.%20I%20guess%20you%20can%20hold%20your%20monitor%20up%20to%20the%20mirror,%20but%20reversing%20a%20number%20just%20doesn’t%20make%20sense.%3C/p%3E%0A%0A%3Cp%3ERuby%20has%20tossed%20an%20error%20message.%20Ruby%20is%20telling%20you%20there%20is%20no%20method%20reverse%20for%20numbers.%3C/p%3E%0A%0A%3Cp%3EMaybe%20if%20you%20turn%20the%20number%20into%20a%20string%20first:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3E40.to_s.reverse%0A%3C/code%3E%3C/pre%3E%0A", "load_code": ""},
+ "11": {"lang": "ID", "title": "Apples are Different From Oranges", "chapter": "N", "answer": "%5C[%5C]", "ok": "Great,%20that's%20an%20empty%20list", "error": "", "text": "%3Cp%3EAnd%20numbers%20are%20different%20from%20strings.%3C/p%3E%0A%0A%3Cp%3EWhile%20you%20can%20use%20methods%20on%20any%20object%20in%20Ruby,%20some%20methods%20only%20work%20on%20certain%20types%20of%20things.%0ABut%20you%20can%20always%20convert%20between%20different%20types%20using%20Ruby’s%20“to”%20methods.%3C/p%3E%0A%0A%3Cul%3E%0A%3Cli%3E%3Cstrong%3Eto_s%3C/strong%3E%20converts%20things%20to%20%3Cstrong%3Es%3C/strong%3Etrings%3C/li%3E%0A%3Cli%3E%3Cstrong%3Eto_i%3C/strong%3E%20converts%20things%20to%20%3Cstrong%3Ei%3C/strong%3Entegers%20(numbers)%3C/li%3E%0A%3Cli%3E%3Cstrong%3Eto_a%3C/strong%3E%20converts%20things%20to%20%3Cstrong%3Ea%3C/strong%3Errays%3C/li%3E%0A%3C/ul%3E%0A%0A%3Cp%3E%3Cstrong%3EWhat%20are%20arrays?!%3C/strong%3E%3C/p%3E%0A%0A%3Cp%3EThey%20are%20lists.%20Type%20in%20a%20pair%20of%20brackets:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3E[]%0A%3C/code%3E%3C/pre%3E%0A", "load_code": ""},
+ "12": {"lang": "ID", "title": "Standing in Line", "chapter": "N", "answer": "%5E%5C[([-%5C.%5Cd]+)(%5Cs*,%5Cs*[-%5Cd%5C.]+)%7B3,%7D%5C]$", "ok": "Excellent", "error": "Try%20adding%20a%20fourth%20number%20to%20the%20list", "text": "%3Cp%3ELists%20(arrays)%20store%20things%20%3Cstrong%3Ein%20some%20order%3C/strong%3E.%3C/p%3E%0A%0A%3Cp%3ELike%20standing%20in%20line%20for%20popcorn.%20You%20are%20behind%20someone%20and%20you%20wouldn’t%20dream%20of%20pushing%20them%20aside,%0Aright?%20And%20the%20guy%20behind%20you,%20you’ve%20got%20a%20close%20eye%20on%20him,%20right?%3C/p%3E%0A%0A%3Cp%3EHere’s%20a%20list%20for%20you.%20Lottery%20numbers:%20%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3E[12,%2047,%2035]%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3ETry%20adding%20a%20number%20to%20this%20list:%20type%20a%20comma%20after%2035%20followed%20by%20a%20number.%20The%20space%20is%20optional.%3C/p%3E%0A", "load_code": ""},
+ "13": {"lang": "ID", "title": "One Raises Its Hand", "chapter": "N", "answer": "%5E47$", "ok": "Okay", "error": "", "text": "%3Cp%3EA%20list%20of%20lottery%20numbers.%20Which%20one%20is%20the%20highest?%3C/p%3E%0A%0A%3Cp%3ETry:%20%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3E[12,%2047,%2035].max%0A%3C/code%3E%3C/pre%3E%0A", "load_code": ""},
+ "14": {"lang": "ID", "title": "Tucking a List Away", "chapter": "N", "answer": "%5E%5C[(%5Cd+)(,%5Cs*%5Cd+)%7B2,%7D%5C]$", "ok": "Saved!", "error": "", "text": "%3Cp%3EGood,%20good.%20But%20it’s%20annoying%20to%20have%20to%20retype%20that%20list%20every%20time%20you%20need%20it,%20isn’t%20it?%3C/p%3E%0A%0A%3Cp%3ELet’s%20save%20our%20numbers%20inside%20a%20ticket%20like%20so:%20%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eticket%20=%20[12,%2047,%2035]%0A%3C/code%3E%3C/pre%3E%0A", "load_code": ""},
+ "15": {"lang": "ID", "title": "Now Type Ticket", "chapter": "N", "answer": "%5C[(%5Cd+(,%20)?)%7B2,%7D%5C]", "ok": "Restored!", "error": "", "text": "%3Cp%3ENow,%20type:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eticket%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "ticket%20=%20[12,%2047,%2035]"},
+ "16": {"lang": "ID", "title": "Saved, Tucked Away", "chapter": "N", "answer": "%5C[12,%2035,%2047%5C]", "ok": "You've%20sorted%20the%20list", "error": "", "text": "%3Cp%3EYou’ve%20hung%20on%20to%20your%20lotto%20numbers,%20tucking%20them%20away%20inside%20a%20%3Cstrong%3Evariable%3C/strong%3E%20called%20ticket.%0ABut%20any%20other%20name,%20like%20%3Cem%3Ejimmyslist%3C/em%3E,%20would%20have%20been%20fine%20too.%3C/p%3E%0A%0A%3Cp%3EProgramming,%20you%20will%20discover,%20is%20mostly%20about%20working%20with%20variables.%3C/p%3E%0A%0A%3Cp%3ELet’s%20put%20your%20lotto%20numbers%20in%20order,%20how%20about?%3C/p%3E%0A%0A%3Cp%3EUse:%20%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eticket.sort!%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EYou%20had%20a%20list.%20You%20sorted%20the%20list.%20The%20ticket%20variable%20is%20now%20changed.%3Cbr%3E%0ADid%20you%20notice%20that%20the%20%3Cem%3Esort!%3C/em%3E%20method%20has%20a%20big,%20bright%20exclamation%20at%20the%20end?%3Cbr%3E%0AA%20lot%20of%20times%20Ruby%20methods%20shout%20like%20that%20if%20they%20alter%20the%20variable%20for%20good.%0AIt’s%20nothin%20special,%20just%20a%20mark.%3C/p%3E%0A", "load_code": "ticket%20=%20[12,%2047,%2035]"},
+ "17": {"lang": "ID", "title": "Elemental", "chapter": "N", "answer": "%5E(12%7C35%7C47)$", "ok": "Ok", "error": "Almost", "text": "%3Cp%3ESo%20we%20stored%20our%20lotto%20numbers%20inside%20variable%20ticket.%20How%20to%20get%20‘em%20out%20again?%3C/p%3E%0A%0A%3Cp%3EWe%20already%20saw%20that%20we%20can%20get%20the%20highest%20number%20with%20%3Cstrong%3Emax%3C/strong%3E.%20Similarly%20you%20can%0Aget%20the%20%3Cstrong%3Efirst%3C/strong%3E%20or%20the%20%3Cstrong%3Elast%3C/strong%3E%20element%20of%20the%20list.%0ABut%20what%20if%20you%20want%20a%20specific%20element?%3C/p%3E%0A%0A%3Ch3%3E[%20]%3C/h3%3E%0A%0A%3Cp%3ERuby%20uses%20the%20square%20brackets%20[%20]%20to%20target%20an%20element.%0AThe%20square%20brackets%20are%20very%20common%20in%20Ruby.%0AThey%20are%20like%20sights%20used%20to%20line%20up%20a%20target.%20Exactly.%0AThese%20brackets%20mean,%20“I%20am%20looking%20for%20____”%20Ready,%20aim.%3C/p%3E%0A%0A%3Cp%3ELet’s%20get%20all%20of%20our%20lotto%20numbers:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eputs%20ticket[0]%0Aputs%20ticket[1]%0Aputs%20ticket[2]%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EWhy%20do%20we%20use%20[0],%20[1],%20[2]?%3C/p%3E%0A%0A%3Cp%3EAnd%20not%20[1],%20[2]%20and%20[3]?%20Is%20that%20some%20kind%20of%20Japanese%20Zen%20thing?%0ANo,%20we%20computer%20people%20just%20like%20to%20begin%20counting%20from%20zero.%20It’s%20not%20just%20a%20Ruby%20thing,%0Athis%20%3Cem%3Ezero%20based%20indexing%3C/em%3E%20is%20used%20in%20most%20programming%20languages.%3C/p%3E%0A%0A%3Cblockquote%3E%0A%3Cp%3EA%20little%20reminder:%20you%20can%20use%20the%20%3Cstrong%3ECopy%3C/strong%3E%20button%20to%20copy%20the%20example%20code%20to%20the%20editor.%3C/p%3E%0A%3C/blockquote%3E%0A", "load_code": "ticket%20=%20[12,%2047,%2035]"},
+ "18": {"lang": "ID", "title": "Summary #2 is Upon Us", "chapter": "Y", "answer": "%5Cw+", "ok": "Does%20it%20rhyme?", "error": "", "text": "%3Cp%3ENow,%20look%20how%20your%20second%20minute%20went:%3C/p%3E%0A%0A%3Ch3%3EErrors%3C/h3%3E%0A%0A%3Cp%3EIf%20you%20try%20to%20reverse%20a%20number%20or%20do%20anything%20fishy,%20Ruby%20will%20tell%20you%20so.%3C/p%3E%0A%0A%3Ch3%3EArrays%3C/h3%3E%0A%0A%3Cp%3EArrays%20are%20lists%20for%20storing%20things%20in%20some%20order.%0AWe%20also%20know%20how%20to%20create%20array’s%20and%20get%20items%20from%20array’s.%3C/p%3E%0A%0A%3Ch3%3EVariables%3C/h3%3E%0A%0A%3Cp%3EVariables%20save%20a%20thing%20and%20give%20it%20a%20name.%20You%20used%20the%20equals%20sign%20to%20do%20this.%20Like:%0Aticket%20=%20[14,%2037,%2018].%3C/p%3E%0A%0A%3Ch3%3E2/8%3C/h3%3E%0A%0A%3Cp%3EIn%20all%20there%20are%20eight%20sections.%20You%20are%20two-eighths%20of%20the%20way%20there!%20This%20is%20simple%20stuff,%0Adon’t%20you%20think?%20Good%20stuff%20up%20ahead.%3C/p%3E%0A%0A%3Cp%3ELet’s%20change%20directions%20for%20a%20moment.%20I’ve%20stuffed%20a%20bit%20of%20poetry%20for%20you%20in%20a%20certain%20variable.%0ATake%20a%20look.%20Type:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eputs%20poem%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "poem%20=%20%22My%20toast%20has%20flown%20from%20my%20hand%5CnAnd%20my%20toast%20has%20gone%20to%20the%20moon.%5CnBut%20when%20I%20saw%20it%20on%20television,%5CnPlanting%20our%20flag%20on%20Halley's%20comet,%5CnMore%20still%20did%20I%20want%20to%20eat%20it.%5Cn%22"},
+ "19": {"lang": "ID", "title": "Sadly, You Hate Toast Poetry", "chapter": "N", "answer": "(toast)%7B0%7D", "ok": "Excellent", "error": "Still%20smells%20like%20toast%20to%20me", "text": "%3Cp%3ELook,%20it’s%20okay.%20You%20don’t%20have%20to%20like%20it.%20Hack%20it%20up,%20be%20my%20guest.%20Instead%20of%20toast,%20go%20for%20a%0Amelon%20or%20something.%20Try%20this%20to%20see%20the%20new%20poem:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Epoem.gsub("toast",%20"honeydew")%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EThe%20%3Cstrong%3Egsub%3C/strong%3E%20method%20is%20short%20for%20global%20substitute.%20It%20replaces%20all%20occurences%20of%20“toast”%20with%0A“honeydew”.%3C/p%3E%0A", "load_code": "prev"},
+ "20": {"lang": "ID", "title": "Ready, Aim", "chapter": "N", "answer": "%5E%5Cn.ti%20tae%20ot%20(.+)", "ok": "Okay,%20sure.%20%20So%20the%20whole%20poem%20has%20been%20turned%20backwards.", "error": "", "text": "%3Cp%3EHere’s%20a%20question:%20what%20happens%20when%20we%20reverse%20this%20whole%20poem?%20%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Epoem.reverse%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "prev"},
+ "21": {"lang": "ID", "title": "Too Much Reversal", "chapter": "N", "answer": "%5E%5C[%22More%20still%20did%20(.+)", "ok": "Yes,%20almost%20what%20we%20want", "error": "", "text": "%3Cp%3ESo%20the%20whole%20poem’s%20been%20turned%20backwards,%20letter-by-letter.%20I%20really%20wanted%20to%20just%20reverse%20the%20lines%20though.%0AMove%20the%20last%20line%20up%20to%20first%20and%20the%20first%20line%20down%20to%20last.%3C/p%3E%0A%0A%3Cp%3EBackwards,%20but%20not%20%3Cstrong%3Ethat%3C/strong%3E%20backwards.%3C/p%3E%0A%0A%3Cp%3EHere’s%20how:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Epoem.lines.reverse%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "prev"},
+ "22": {"lang": "ID", "title": "Ringlets of Chained Methods", "chapter": "N", "answer": "%5EMore%20still%20did%20(.+)", "ok": "Good%20show,%20my%20friend!%3Cbr/%3EThe%20join%20method%20took%20that%20array%20of%20lines%20and%20put%20them%20together%20into%20a%20string.", "error": "", "text": "%3Cp%3ESo%20what%20do%20you%20see?%20What%20happened%20there?%20You%20typed%20%3Cstrong%3Epoem.lines.reverse%3C/strong%3E%20and%20what%20happened?%3C/p%3E%0A%0A%3Cp%3ETwo%20things%20happened.%20You%20turned%20the%20poem%20into%20a%20list%20using%20lines.%0ALines%20decides%20the%20way%20the%20string%20is%20split%20up%20and%20converts%20it%20into%20an%20Array.%3C/p%3E%0A%0A%3Cp%3EThen,%20you%20reversed%20that%20list.%20You%20had%20each%20line.%20You%20reversed%20them.%20That’s%20it.%3C/p%3E%0A%0A%3Cp%3ELet’s%20tack%20one%20more%20method%20on%20the%20end%20there:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eputs%20poem.lines.reverse.join%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3ECombining%20methods%20like%20this%20is%20called%20%3Cem%3Emethod%20chaining%3C/em%3E.%3C/p%3E%0A", "load_code": "prev"},
+ "23": {"lang": "ID", "title": "Of All the Summaries, #3 is Here Now", "chapter": "Y", "answer": "%5C%7B%5C%7D", "ok": "You've%20made%20an%20empty%20hash!", "error": "", "text": "%3Ch3%3EExclamations%3C/h3%3E%0A%0A%3Cp%3EMethods%20may%20have%20exclamations%20(and%20also%20question%20marks)%20in%20their%20name.%0AThese%20are%20just%20there%20to%20better%20explain%20what%20their%20function%20is.%20No%20big%20deal.%3C/p%3E%0A%0A%3Ch3%3EString%20manipulation%3C/h3%3E%0A%0A%3Cp%3ESearch%20and%20change%20strings%3C/p%3E%0A%0A%3Ch3%3EChaining%3C/h3%3E%0A%0A%3Cp%3EChaining%20methods%20lets%20you%20get%20a%20lot%20more%20done.%20Break%20up%20a%20poem,%20reverse%20it,%20reassemble%20it:%0A%3Cstrong%3Epoem.lines.reverse.join%3C/strong%3E%3C/p%3E%0A%0A%3Cp%3EAt%20this%20point,%20you%20may%20want%20to%20tinker%20with%20the%20poem%20a%20bit%20more.%20A%20complete%20list%20of%20all%20the%20String%0Amethods%20is%20%3Ca%20href=%22http://ruby-doc.org/core/classes/String.html%22%20target=%22_blank%22%3Ehere%3C/a%3E.%3C/p%3E%0A%0A%3Cp%3EGo%20ahead%20and%20try%20a%20few,%20such%20as:%20poem.downcase%20or%20poem.swapcase%3C/p%3E%0A%0A%3Ch2%3EReady?%3C/h2%3E%0A%0A%3Cp%3EWhen%20you%20feel%20ready%20to%20move%20on,%20type:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Ebooks%20=%20%7B%7D%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "prev"},
+ "24": {"lang": "ID", "title": "A Wee Blank Book", "chapter": "N", "answer": "%5E(splendid%7Cquite_good%7Cmediocre%7Cquite_not_good%7Cabysmal)$", "ok": "Yes%20that's%20a%20new%20review", "error": "Use%20one%20of%20splendid,%20quite_good,%20mediocre,%20quite_not_good,%20abysmal.%3Cbr/%3EDon't%20forget%20the%20colon", "text": "%3Cp%3EYou’ve%20made%20an%20empty%20%3Cstrong%3Ehash%3C/strong%3E.%20A%20hash%20is%20like%20an%20array,%20only%20every%20one%20of%20its%20elements%20has%20a%20name.%3C/p%3E%0A%0A%3Cp%3EWe’re%20going%20to%20stuff%20some%20miniature%20book%20reviews%20in%20our%20new%20hash.%20Here’s%20our%20rating%20system:%3C/p%3E%0A%0A%3Cul%3E%0A%3Cli%3E:splendid%20→%20a%20masterpiece%3C/li%3E%0A%3Cli%3E:quite_good%20→%20enjoyed,%20sure,%20yes%3C/li%3E%0A%3Cli%3E:mediocre%20→%20equal%20parts%20great%20and%20terrible%3C/li%3E%0A%3Cli%3E:quite_not_good%20→%20notably%20bad%3C/li%3E%0A%3Cli%3E:abysmal%20→%20steaming%20wreck%3C/li%3E%0A%3C/ul%3E%0A%0A%3Cp%3ETo%20rate%20a%20book,%20put%20the%20title%20in%20square%20brackets%20and%20put%20the%20rating%20after%20the%20equals.%20For%20example:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Ebooks["Gravitys%20Rainbow"]%20=%20:splendid%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cblockquote%3E%0A%3Cp%3EBy%20now%20I%20think%20it%20is%20only%20fair%20to%20tell%20you%20that%20all%20lessons%20in%20TryRuby%20are%20separate%20from%20each%20other.%0ASo%20if%20you%20go%20crazy%20typing%20book%20reviews%20here,%20you%20can%20only%20use%20‘em%20in%20this%20lesson.%3Cbr%3E%0AIf%20you%20want%20to%20use%20your%20reviews%20in%20the%20next%20lesson%20you%20should%20copy/paste%20them.%3Cbr%3E%0ADon’t%20worry%20about%20this%20too%20much,%20each%20lesson%20has%20plenty%20of%20predefined%20stuff%20for%20you%20to%20play%20around%20with.%3C/p%3E%0A%3C/blockquote%3E%0A", "load_code": "books%20=%20%7B%7D"},
+ "25": {"lang": "ID", "title": "More Bite-Size Reviews", "chapter": "N", "answer": "[3-9]", "ok": "See,%20the%20length%20method%20works%20on%20strings,%20array's%20and%20hashes.", "error": "", "text": "%3Cp%3EKeep%20going,%20fill%20it%20up%20with%20reviews.%20And,%20if%20you%20want%20to%20see%20the%20whole%20list,%20just%20type:%20%3Cstrong%3Eputs%20books%3C/strong%3E%3C/p%3E%0A%0A%3Cp%3EAgain,%20the%20ratings%20are:%20:splendid,%20:quite_good,%20:mediocre,%20:quite_not_good%20and%20:abysmal.%3C/p%3E%0A%0A%3Cp%3EThese%20ratings%20are%20not%20strings.%20When%20you%20place%20a%20colon%20in%20front%20of%20a%20simple%20word,%20you%20get%20a%20%3Cstrong%3Esymbol%3C/strong%3E.%0ASymbols%20are%20cheaper%20than%20strings%20(in%20terms%20of%20computer%20memory.)%20If%20you%20use%20a%20word%20over%20and%20over%20in%20your%20program,%0Ause%20a%20symbol.%20Rather%20than%20having%20thousands%20of%20copies%20of%20that%20word%20in%20memory,%20the%20computer%20will%20store%20the%20symbol%20only%0A%3Cstrong%3Eonce%3C/strong%3E.%3C/p%3E%0A%0A%3Cp%3EMore%20importantly,%20a%20symbol%20tells%20you%20that%20is%20not%20just%20any%20old%20word%20but%20has%20a%20meaning%20within%20your%20program.%3C/p%3E%0A%0A%3Cp%3EEnter%202%20more%20bookreviews,%20use%20%3Cstrong%3Ebooks.length%3C/strong%3E%20to%20see%20how%20many%20reviews%20there%20are%20in%20the%20hash:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Ebooks["The%20deep%20end"]%20%20=%20:abysmal%0Abooks["Living%20colors"]%20=%20:mediocre%0A%0Aputs%20books%0A%0Aputs%20books.length%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "books%20=%20%7B%22Gravitys%20Rainbow%22%20=%3E%20:splendid%7D"},
+ "26": {"lang": "ID", "title": "Wait, Did I Like Gravity's Rainbow?", "chapter": "N", "answer": "%5E(splendid%7Cquite_good%7Cmediocre%7Cquite_not_good%7Cabysmal)$", "ok": "I%20liked%20it%20a%20lot", "error": "", "text": "%3Cp%3EOne%20great%20thing%20about%20Ruby%20is%20that%20names%20are%20often%20reused,%20which%20means%20fewer%20names%20you%20need%20to%20remember.%3C/p%3E%0A%0A%3Cp%3ERemember%20how%20we%20retrieved%20items%20from%20an%20array%20using%20a%20number:%3Cbr%3E%0A%3Cstrong%3Eputs%20ticket[1]%3C/strong%3E.%3C/p%3E%0A%0A%3Cp%3EFor%20a%20hash%20this%20works%20the%20same%20way,%20except%20we%20don’t%20use%20a%20number%20to%20get%20an%20element%20but%20a%20name.%3C/p%3E%0A%0A%3Cp%3ESo,%20if%20you’d%20like%20to%20look%20up%20one%20of%20your%20old%20reviews,%20again%20put%20the%20title%20in%20the%20square.%20But%20leave%20off%20the%20equals.%0AJust%20like%20this:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eputs%20books["Gravitys%20Rainbow"]%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "books%20=%20%7B%22Gravitys%20Rainbow%22%20=%3E%20:splendid,%20%22The%20deep%20end%22%20=%3E%20:abysmal,%20%22Living%20colors%22%20=%3E%20:mediocre%7D"},
+ "27": {"lang": "ID", "title": "Hashes as Pairs", "chapter": "N", "answer": "%5E%5C[%22.*%22%5C]", "ok": "You%20found%20the%20keys", "error": "", "text": "%3Cp%3EKeep%20in%20mind%20that%20hashes%20won’t%20keep%20things%20in%20order.%20That’s%20not%20their%20job.%20It’ll%20just%20pair%20up%0Atwo%20things:%20a%20%3Cstrong%3Ekey%3C/strong%3E%20and%20a%20%3Cstrong%3Evalue%3C/strong%3E.%3C/p%3E%0A%0A%3Cp%3EIn%20your%20reviews,%20the%20book’s%20title%20is%20the%20key%20and%20the%20rating%20is%20the%20value.%3C/p%3E%0A%0A%3Cp%3EIf%20you%20want%20to%20just%20see%20the%20titles%20of%20all%20the%20books%20you’ve%20reviewed:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Ebooks.keys%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EYou%20can%20also%20try%20this%20with%20.values%20instead%20of%20.keys.%3C/p%3E%0A", "load_code": "prev"},
+ "28": {"lang": "ID", "title": "Are You Harsh?", "chapter": "N", "answer": "%22mediocre%22", "ok": "Great,%20wow!%20You've%20made%20a%20scorecard%20of%20your%20ratings", "error": "", "text": "%3Cp%3ESo%20are%20you%20giving%20out%20harsh,%20unfair%20reviews?%20Let’s%20keep%20score%20with%20a%20new%20hash%20%3Cstrong%3Eratings%3C/strong%3E:%3C/p%3E%0A%0A%3Cp%3EThen,%20okay,%20now%20let’s%20count%20up%20your%20reviews.%20Just%20stay%20with%20me.%20Type:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eratings%20=%20Hash.new%20%7B0%7D%0A%0Abooks.values.each%20%7B%20%7Crate%7C%0A%20%20ratings[rate]%20+=%201%0A%7D%0A%0Aputs%20ratings%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EThe%20straight%20line%20in%20the%20code%20is%20the%20pipe%20character,%20probably%20located%20right%20above%20the%20Enter%20key%0Aon%20your%20keyboard.%3C/p%3E%0A%0A%3Cp%3EThat%20%3Cem%3E+=%201%3C/em%3E%20line%20means:%20increase%20the%20value%20by%201.%3C/p%3E%0A%0A%3Cp%3EDon’t%20worry%20if%20you%20don’t%20understand%20everything%20that%20is%20going%20on%20here.%20It%20will%20be%20revealed%20later.%3C/p%3E%0A", "load_code": "books%20=%20%7B%22Gravitys%20Rainbow%22%20=%3E%20:splendid,%20%22The%20deep%20end%22%20=%3E%20:abysmal,%20%22Living%20colors%22%20=%3E%20:mediocre,%20%22Bumblebees%22%20=%3E%20:mediocre%7D"},
+ "29": {"lang": "ID", "title": "A Tally", "chapter": "N", "answer": "%5Cw+", "ok": "Yodelay!", "error": "", "text": "%3Cp%3EOne%20of%20the%20amazing%20new%20things%20we’ve%20just%20used%20is%20a%20%3Cstrong%3Eblock%3C/strong%3E.%20We’re%20going%20to%20explore%20these%20more%0Ain%20this%20and%20the%20next%20lesson.%20But,%20basically,%20a%20block%20is%20a%20bit%20of%20Ruby%20code%20surrounded%20by%20curly%0Abraces.%3C/p%3E%0A%0A%3Cp%3ELet’s%20try%20another%20block:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3E5.times%20%7B%20print%20"Odelay!%20"%20%7D%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EBlocks%20are%20always%20attached%20to%20methods.%20Like%20the%20%3Cstrong%3Etimes%3C/strong%3E%20method,%20which%20takes%20the%20block%20and%20runs%0Athe%20code%20over%20and%20over.%20(In%20our%20example:%20five%20times.)%3C/p%3E%0A", "load_code": ""},
+ "30": {"lang": "ID", "title": "Have you got the time?", "chapter": "N", "answer": "%5E[0-9]$", "ok": "You%20timed%20it%20just%20right!", "error": "Run%20the%20block%200%20to%209%20times", "text": "%3Cp%3EAs%20we%20saw%20in%20the%20first%20example%20with%20a%20block%20(when%20counting%20ratings)%20we%20can%20pass%20a%20value%20to%20the%20block.%20Which%0Avalues%20are%20%3Cstrong%3Epassed%3C/strong%3E%20is%20determined%20by%20the%20method%20that%20is%20running%20the%20block.%3C/p%3E%0A%0A%3Cp%3EThe%20values%20that%20are%20%3Cstrong%3Ereceived%3C/strong%3E%20by%20the%20block%20are%20placed%20in%20the%20variable%20name%20at%20the%20beginning%20of%20the%20block,%0Abetween%20two%20pipe%20symbols:%20%7C%3C/p%3E%0A%0A%3Cp%3ELet’s%20try%20that%20with%20this%20block:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3E5.times%20%7B%20%7Ctime%7C%0A%20%20puts%20time%0A%7D%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EHere,%20method%20%3Cstrong%3E.times%3C/strong%3E%20sends%20a%20value%20to%20variable%20%3Cstrong%3E%7Ctime%7C%3C/strong%3E.%20But%20note%20that%20variable%20time%20is%20only%20known%20within%20the%20block.%3C/p%3E%0A%0A%3Cblockquote%3E%0A%3Cp%3EDid%20you%20notice%20that%20you%20can%20split%20code%20over%20multiple%20lines.%20This%20makes%20it%20a%20bit%20easier%20to%20read.%3C/p%3E%0A%3C/blockquote%3E%0A", "load_code": ""},
+ "31": {"lang": "ID", "title": "Now Arriving at Summary #4", "chapter": "Y", "answer": "", "ok": "", "error": "", "text": "%3Cp%3EThis%20last%20lesson%20was%20a%20bit%20longer.%20You’ve%20probably%20used%20up%20three%20minutes%20learning%20about:%3C/p%3E%0A%0A%3Ch3%3EHashes%3C/h3%3E%0A%0A%3Cp%3EThe%20little%20dictionary%20with%20the%20curly%20pages:%20%3Cstrong%3E%7B%7D%3C/strong%3E%3C/p%3E%0A%0A%3Ch3%3ESymbols%3C/h3%3E%0A%0A%3Cp%3ETiny,%20efficient%20code%20words%20with%20a%20colon,%20like:%20%3Cstrong%3E:splendid%3C/strong%3E%3C/p%3E%0A%0A%3Ch3%3EBlocks%3C/h3%3E%0A%0A%3Cp%3EChunks%20of%20code%20which%20can%20be%20tacked%20on%20to%20many%20of%20Ruby’s%20methods.%20Here’s%20the%20code%20you%20used%20to%0Abuild%20a%20scorecard:%3Cbr%3E%0A%3Cstrong%3Ebooks.values.each%20%7B%20%7Crate%7C%20ratings[rate]%20+=%201%20%7D%3C/strong%3E%3C/p%3E%0A%0A%3Ch3%3ENext%3C/h3%3E%0A%0A%3Cp%3EIn%20the%20next%20lesson%20we%20will%20delve%20al%20little%20bit%20deeper%20into%20methods.%3C/p%3E%0A", "load_code": ""},
+ "32": {"lang": "ID", "title": "To (be) or not to (be)", "chapter": "N", "answer": "", "ok": "", "error": "", "text": "%3Cp%3EOne%20other%20little%20thing%20we%20haven’t%20really%20talked%20about%20openly:%20method%20arguments.%0ARemember%20when%20we%20changed%20the%20poem%20a%20little%20bit?%20We%20used:%0A%3Cstrong%3Epoem.gsub(“toast”,%20“honeydew”)%3C/strong%3E%3C/p%3E%0A%0A%3Cp%3EThe%20gsub%20method%20needs%202%20arguments,%20which%20we%20passed%20to%20gsub%20by%20including%20two%20strings%20between%0Aparenthesis.%20%3Cem%3EArguments%20tell%20the%20method%20exactly%20what%20to%20do.%3C/em%3E%3C/p%3E%0A%0A%3Ch3%3EParenthesis%3C/h3%3E%0A%0A%3Cp%3EActually,%20most%20of%20the%20time%20Ruby%20doesn’t%20mind%20if%20you%20omit%20the%20parenthesis.%20So%20this%20would%20have%0Aworked%20too:%0A%3Cstrong%3Epoem.gsub%20“toast”,%20“honeydew”%3C/strong%3E%3C/p%3E%0A%0A%3Cp%3EWe%20have%20already%20used%20another%20method%20with%20a%20parameter.%20Many%20times%20in%20fact,%20though%20it%20was%20not%20very%0Aobvious:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eputs%20"Hello"%0Aputs("Hello")%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EYes%20%3Cstrong%3Eputs%3C/strong%3E%20is%20also%20a%20method.%20Using%20puts%20with%20or%20without%20parenthesis%20is%20the%20same%20to%20Ruby,%20but%20the%0Aversion%20without%20parenthesis%20is%20a%20bit%20easier%20to%20read.%20And%20it%20saves%20you%20valuable%20typing%20time!%3C/p%3E%0A%0A%3Cblockquote%3E%0A%3Cp%3ESo%20I%20guess%20the%20conclusion%20is%20that%20you%20can%20do%20whatever%20you%20like%20with%20parenthesis%20as%20long%20as%20your%0Acode%20reads%20nicely.%3C/p%3E%0A%3C/blockquote%3E%0A%0A%3Ch3%3Eto%20(be)%20or%20not%20to%20(be)%3C/h3%3E%0A%0A%3Cp%3ESo%20if%20%3Cem%3Eto%3C/em%3E%20is%20a%20method%20and%20%3Cem%3Ebe%3C/em%3E%20is%20an%20argument%20we%20now%20know%20the%20answer%20to%20this%20age%20old%20question.%0AIt%20is%20really%20just%20a%20matter%20of%20preference%20whether%20you%20want%20%3Cem%3Eto%20be%3C/em%3E%20or%20%3Cem%3Eto(be)%3C/em%3E.%3C/p%3E%0A%0A%3Cp%3EAre%20you%20in%20the%20mood%20for%20more%20Shakespeare?%20Read%20on.%3C/p%3E%0A", "load_code": "poem%20=%20%22My%20toast%20has%20flown%20from%20my%20hand%5CnAnd%20my%20toast%20has%20gone%20to%20the%20moon.%5CnYada%20yada%20yada%5Cn%22"},
+ "33": {"lang": "ID", "title": "The Taming of the Shrew", "chapter": "N", "answer": "%5Etame", "ok": "Good%20good!", "error": "", "text": "%3Cp%3EYou%20totally%20know%20how%20to%20use%20Ruby%20now.%20I%20mean%20you’ve%20got%20down%20the%20essentials.%0AYou%20just%20need%20to%20keep%20learning%20more%20methods%20and%20try%20out%20more%20complex%20blocks.%3C/p%3E%0A%0A%3Cp%3EBut%20there’s%20one%20side%20of%20Ruby%20we%20haven’t%20settled.%20Making%20your%20own%20methods.%0A%3Cstrong%3EAhem!%3C/strong%3E%20Let’s%20get%20it%20over%20with%20then.%3C/p%3E%0A%0A%3Cp%3ENext%20to%20using%20Ruby’s%20built%20in%20methods%20(like%20puts,%20sort,%20times)%20you%20can%20define%0Ayour%20own%20methods.%20Why%20is%20that%20a%20good%20idea?%20Two%20reasons:%3C/p%3E%0A%0A%3Ch3%3ETo%20make%20your%20program%20shorter%3C/h3%3E%0A%0A%3Cp%3EIf%20you%20have%20to%20do%20the%20same%20thing%20in%20more%20than%20one%20part%20of%20your%20code%20it%20is%20easier%0Ato%20put%20that%20code%20in%20a%20separate%20method.%20Your%20code%20will%20be%20shorter.%3C/p%3E%0A%0A%3Ch3%3ETo%20make%20your%20code%20easier%20to%20read%3C/h3%3E%0A%0A%3Cp%3ESuppose%20your%20program%20needs%20to%20do%20a%20lot%20of%20different%20things.%0AYou%20%3Cstrong%3Ecould%3C/strong%3E%20stuff%20all%20code%20into%20one%20long%20piece.%20But%20it%20would%20be%20very%20difficult%20to%0Aread%20and%20understand%20that%20code%20later.%3C/p%3E%0A%0A%3Cp%3EInstead%20you%20should%20cut%20up%20your%20code%20in%20different%20methods%20and%20give%20each%20method%20an%20easy%20to%0Aunderstand%20English%20name.%20You%20will%20thank%20yourself%20later.%3C/p%3E%0A%0A%3Cp%3ESo%20how%20do%20we%20define%20a%20method?%20Like%20this:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Edef%20tame(%20number_of_shrews%20)%0Aend%0A%3C/code%3E%3C/pre%3E%0A", "load_code": ""},
+ "34": {"lang": "ID", "title": "In Ruby, Def Leppard means: define method Leppard", "chapter": "N", "answer": "%5Etame", "ok": "Tame%20is%20not%20lame", "error": "", "text": "%3Cp%3EHey,%20okay,%20you%20done%20it.%20You’re%20making%20your%20own%20method.%20You%20started%20with%20def,%20followed%20by%20the%20name%20of%20the%20method.%0AAnd%20a%20list%20of%20arguments%20which%20the%20method%20will%20need.%20This%20isn’t%20too%20scary%20and%20dangerous!%0AAll%20we%20have%20to%20do%20is%20fill%20it%20up%20with%20Ruby%20and%20finish%20it%20up%20with%20end.%3C/p%3E%0A%0A%3Cp%3EHere’s%20the%20code:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Edef%20tame(%20number_of_shrews%20)%0A%20%20number_of_shrews.times%20%7B%0A%20%20%20%20puts%20"Tamed%20a%20shrew"%0A%20%20%7D%0Aend%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cblockquote%3E%0A%3Cp%3E%3Cstrong%3EP.S.%3C/strong%3E%3Cbr%3E%0AIf%20you%20don’t%20get%20the%20title%20of%20this%20chapter.%0A%3Ca%20href=%22http://en.wikipedia.org/wiki/Def_Leppard%22%20target=%22_blank%22%3EDef%20Leppard%3C/a%3E%0Ais%20the%20name%20of%20a,%20once%20famous,%20English%20rock%20band.%3C/p%3E%0A%3C/blockquote%3E%0A", "load_code": ""},
+ "35": {"lang": "ID", "title": "The Ripened Fruit of Your Own Creation", "chapter": "N", "answer": "%5ETamed%20a%20shrew", "ok": "That'll%20show%20those%20shrews", "error": "", "text": "%3Cp%3EA%20new%20method%20is%20born.%20Let%20us%20use%20it%20now:%20%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Etame%205%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "def%20tame(number_of_shrews);number_of_shrews.times%7Bputs%20%22Tamed%20a%20shrew%22%7D;end;"},
+ "36": {"lang": "ID", "title": "Give and take", "chapter": "N", "answer": "%5Cd+", "ok": "Right%20on.%20Bravo.", "error": "", "text": "%3Cp%3EMost%20methods%20do%20not%20only%20want%20some%20parameters%20as%20input,%20but%20will%20also%20%3Cstrong%3Egive%20something%20back%3C/strong%3E.%0AI%20have%20changed%20our%20method%20a%20bit%20so%20it%20will%20return%20a%20value%20to%20you.%20Try%20it:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Edef%20tame(%20number_of_shrews%20)%0A%20%20number_of_shrews.times%20%7B%0A%20%20%20%20puts%20"Tamed%20a%20shrew"%0A%20%20%7D%0A%20%20return%20number_of_shrews%0Aend%0A%0Aputs%20tame(3)%0A%3C/code%3E%3C/pre%3E%0A%0A%3Ch3%3EReturn%3C/h3%3E%0A%0A%3Cp%3EAnd,%20since%20you’re%20getting%20so%20advanced%20and%20capable%20here,%20one%20other%20tip:%0Ayou%20can%20omit%20the%20word%20%3Cstrong%3Ereturn%3C/strong%3E%20from%20the%20last%20line%20of%20the%20method.%0ARuby%20will%20automagically%20return%20the%20last%20value%20that%20was%20used%20inside%20the%20method.%3C/p%3E%0A%0A%3Cp%3ESo%20we%20can%20change%20the%20last%20line%20to%20just:%20%3Cstrong%3Enumber_of_shrews%3C/strong%3E.%3C/p%3E%0A%0A%3Cp%3EBut%20since%20method%20%3Cstrong%3E.times%3C/strong%3E%20also%20returns%20the%20%3Cem%3Enumber_of_shrews%3C/em%3E%20we%20can%0Aremove%20the%20entire%20last%20line.%20So%20in%20fact%20our%20original%20method%20already%20did%20what%20we%20wanted%20all%20along!%3C/p%3E%0A", "load_code": ""},
+ "37": {"lang": "ID", "title": "Hello, Who's There? And Summary #5 Waves Its Hat!", "chapter": "Y", "answer": "", "ok": "", "error": "", "text": "%3Cp%3EWell%20done,%20well%20done,%20well%20done,%20well%20done!%3C/p%3E%0A%0A%3Cp%3ETruly,%20truly,%20truly,%20truly,%20truuuuuuuuly!%3C/p%3E%0A%0A%3Cp%3EHere’s%20the%20last%20few%20minutes%20of%20your%20life%20in%20review:%3C/p%3E%0A%0A%3Ch3%3EMethods%3C/h3%3E%0A%0A%3Cp%3EMethods%20can%20be%20defined%20with%20%3Cstrong%3Edef%3C/strong%3E%20and%20have%20a%20name.%20Methods%20make%20your%20program%20shorter%0Aand%20easier%20to%20read.%3C/p%3E%0A%0A%3Ch3%3EParameters%3C/h3%3E%0A%0A%3Cp%3EMethods%20can%20have%20parameters.%3C/p%3E%0A%0A%3Ch3%3EReturn%20values%3C/h3%3E%0A%0A%3Cp%3EMethods%20(almost)%20always%20return%20a%20value.%3C/p%3E%0A%0A%3Ch2%3ENow%3C/h2%3E%0A%0A%3Cp%3ETo%20(be)%20or%20not%20to%20(be)%20is%20not%20a%20question%20to%20you%20anymore.%20Are%20you%20ready%20for%20some%20more%20Shakespeare?%3C/p%3E%0A", "load_code": ""},
+ "38": {"lang": "ID", "title": "The world is our oyster", "chapter": "N", "answer": "%5E%5C%7B%5C%22William", "ok": "Good.%20Bit%20difficult%20to%20read.", "error": "", "text": "%3Cp%3ESo%20far%20we%20have%20been%20running%20programs%20that%20only%20use%20things%20that%20we%20have%20typed%20ourselves.%0AWhich%20is%20nice,%20I%20mean%20that%20%3Cem%3EOdelaying%3C/em%3E%20was%20epic,%20but%20this%20the%20internet%20era%20so%20it%20is%20about%0Atime%20we%20included%20the%20rest%20of%20the%20world%20in%20our%20programming%20efforts.%3C/p%3E%0A%0A%3Cp%3EMany,%20many,%20many%20websites%20are%20available%20that%20you%20can%20ask%20for%20information.%20For%20instance%0Athis%20link%20will%20give%20you%20all%20current%20%3Ca%20href=%22http://news.google.com/news/section?q=ruby&output=rss%22%20target=%22_blank%22%3EGoogle%20news%20feeds%3C/a%3E%0Aabout%20Ruby.%3C/p%3E%0A%0A%3Cp%3EYour%20web%20browser%20will%20probably%20display%20it%20quite%20nicely%20for%20you.%20If%20you%20look%20at%20the%20source%0A(type:%20control-U)%20you%20will%20see%20a%20long%20string%20of%20strangely%20formatted%20text.%20In%20the%20Google%20example%0Ait%20is%20in%20the%20%3Cstrong%3Erss%3C/strong%3E%20format.%3C/p%3E%0A%0A%3Ch3%3EFormats%3C/h3%3E%0A%0A%3Cp%3EThere%20are%20many%20other%20formats,%20with%20strange%20names,%20available%20and%20used%20on%20the%20web,%20like:%0Ahtml,%20xml%20and%20json.%20Yes,%20even%20this%20very%20website%20uses%20a%20couple%20of%20these.%3C/p%3E%0A%0A%3Cp%3EI%20have%20prepared%20a%20method%20for%20you%20that%20will%20fetch%20a%20list%20of%20the%20complete%20works%20of%20William%0AShakespeare%20from%20the%20internet.%0A(Don’t%20worry%20it%20actually%20comes%20from%20the%20same%20server%20that%20this%20website%20runs%20on,%20so%0Awe’re%20not%20bothering%20anyone.)%3C/p%3E%0A%0A%3Cp%3EGet%20the%20data%20with:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eget_shakey%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "def%20get_shakey;JSON.parse(%22%7B%5C%22William%20Shakespeare%5C%22:%20%7B%5C%221%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22The%20Two%20Gentlemen%20of%20Verona%5C%22,%20%5C%22finished%5C%22:%201591%7D,%5C%222%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22The%20Taming%20of%20the%20Shrew%5C%22,%20%5C%22finished%5C%22:%201591%7D,%5C%223%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Henry%20VI,%20Part%202%5C%22,%20%5C%22finished%5C%22:%201591%7D,%5C%224%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Henry%20VI,%20Part%203%5C%22,%20%5C%22finished%5C%22:%201591%7D,%5C%225%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Henry%20VI,%20Part%201%5C%22,%20%5C%22finished%5C%22:%201592%7D,%5C%226%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Titus%20Andronicus%5C%22,%20%5C%22finished%5C%22:%201592%7D,%5C%227%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Richard%20III%5C%22,%20%5C%22finished%5C%22:%201593%7D,%5C%228%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Edward%20III%5C%22,%20%5C%22finished%5C%22:%201593%7D,%5C%229%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22The%20Comedy%20of%20Errors%5C%22,%20%5C%22finished%5C%22:%201594%7D,%5C%2210%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Love's%20Labour's%20Lost%5C%22,%20%5C%22finished%5C%22:%201595%7D,%5C%2211%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Love's%20Labour's%20Won%5C%22,%20%5C%22finished%5C%22:%201596%7D,%5C%2212%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Richard%20II%5C%22,%20%5C%22finished%5C%22:%201595%7D,%5C%2213%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Romeo%20and%20Juliet%5C%22,%20%5C%22finished%5C%22:%201595%7D,%5C%2214%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22A%20Midsummer%20Night's%20Dream%5C%22,%20%5C%22finished%5C%22:%201595%7D,%5C%2215%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22King%20John%5C%22,%20%5C%22finished%5C%22:%201596%7D,%5C%2216%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22The%20Merchant%20of%20Venice%5C%22,%20%5C%22finished%5C%22:%201597%7D,%5C%2217%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Henry%20IV,%20Part%201%5C%22,%20%5C%22finished%5C%22:%201597%7D,%5C%2218%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22The%20Merry%20Wives%20of%20Windsor%5C%22,%20%5C%22finished%5C%22:%201597%7D,%5C%2219%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Henry%20IV,%20Part%202%5C%22,%20%5C%22finished%5C%22:%201598%7D,%5C%2220%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Much%20Ado%20About%20Nothing%5C%22,%20%5C%22finished%5C%22:%201599%7D,%5C%2221%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Henry%20V%5C%22,%20%5C%22finished%5C%22:%201599%7D,%5C%2222%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Julius%20Caesar%5C%22,%20%5C%22finished%5C%22:%201599%7D,%5C%2223%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22As%20You%20Like%20It%5C%22,%20%5C%22finished%5C%22:%201600%7D,%5C%2224%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Hamlet%5C%22,%20%5C%22finished%5C%22:%201601%7D,%5C%2225%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Twelfth%20Night%5C%22,%20%5C%22finished%5C%22:%201601%7D,%5C%2226%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Troilus%20and%20Cressida%5C%22,%20%5C%22finished%5C%22:%201602%7D,%5C%2227%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Sir%20Thomas%20More%5C%22,%20%5C%22finished%5C%22:%201604%7D,%5C%2228%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Measure%20for%20Measure%5C%22,%20%5C%22finished%5C%22:%201604%7D,%5C%2229%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Othello%5C%22,%20%5C%22finished%5C%22:%201604%7D,%5C%2230%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22All's%20Well%20That%20Ends%20Well%5C%22,%20%5C%22finished%5C%22:%201605%7D,%5C%2231%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22King%20Lear%5C%22,%20%5C%22finished%5C%22:%201606%7D,%5C%2232%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Timon%20of%20Athens%5C%22,%20%5C%22finished%5C%22:%201606%7D,%5C%2233%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Macbeth%5C%22,%20%5C%22finished%5C%22:%201606%7D,%5C%2234%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Antony%20and%20Cleopatra%5C%22,%20%5C%22finished%5C%22:%201606%7D,%5C%2235%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Pericles,%20Prince%20of%20Tyre%5C%22,%20%5C%22finished%5C%22:%201608%7D,%5C%2236%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Coriolanus%5C%22,%20%5C%22finished%5C%22:%201608%7D,%5C%2237%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22The%20Winter's%20Tale%5C%22,%20%5C%22finished%5C%22:%201611%7D,%5C%2238%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Cymbeline%5C%22,%20%5C%22finished%5C%22:%201610%7D,%5C%2239%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22The%20Tempest%5C%22,%20%5C%22finished%5C%22:%201611%7D,%5C%2240%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Cardenio%5C%22,%20%5C%22finished%5C%22:%201613%7D,%5C%2241%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22Henry%20VIII%5C%22,%20%5C%22finished%5C%22:%201613%7D,%5C%2242%5C%22:%20%7B%5C%22title%5C%22:%20%5C%22The%20Two%20Noble%20Kinsmen%5C%22,%20%5C%22finished%5C%22:%201614%7D%7D%7D%22);end;"},
+ "39": {"lang": "ID", "title": "Noble Kinsmen", "chapter": "N", "answer": "%5EThe%20Two%20Noble%20Kinsmen$", "ok": "That's%20much%20better", "error": "", "text": "%3Cp%3EOkay%20we%20now%20have%20a%20list%20of%20plays%20from%20the%20internet.%20The%20list%20was%20in%20the%20json%20format.%0AFortunately%20for%20us%20Ruby%20kindly%20provides%20a%20method%20to%20convert%20json%20data%20to%20a%20Ruby%20hash.%0AThe%20%3Cem%3Eget_shakey%3C/em%3E%20method%20already%20did%20that%20for%20us.%3C/p%3E%0A%0A%3Cp%3EBut%20since%20the%20structure%20of%20the%20json%20data%20is%20retained%20in%20the%20hash,%20it%20is%20still%20a%20bit%20difficult%20to%20read.%0ALet%20us%20write%20a%20method%20to%20display%20the%20plays%20nicely.%3C/p%3E%0A%0A%3Cp%3EIf%20you%20inspect%20the%20list%20of%20plays%20carefully%20you%20will%20see%20that%20it%20has%20a%20kind%20of%20nested%0Astructure.%20(This%20is%20actually%20quite%20common%20in%20data%20you%20get%20from%20the%20internet.)%0ALooks%20like%20this:%3C/p%3E%0A%0A%3Cul%3E%0A%20%20%3Cli%3E“William%20Shakespeare”%0A%20%20%3Cul%3E%0A%20%20%20%20%20%20%3Cli%3E“1”%0A%20%20%20%20%20%20%3Cul%3E%0A%20%20%20%20%20%20%20%20%3Cli%3E“title”:%20“The%20Two%20Gentlemen%20of%20Verona”%3C/li%3E%0A%20%20%20%20%20%20%20%20%3Cli%3E“finished”:%201591%3C/li%3E%0A%20%20%20%20%20%20%3C/ul%3E%0A%20%20%20%20%20%20%3C/li%3E%0A%20%20%20%20%20%20%3Cli%3E“2”%0A%20%20%20%20%20%20%3Cul%3E%0A%20%20%20%20%20%20%20%20%3Cli%3E“title”:%20“The%20Taming%20of%20the%20Shrew”%3C/li%3E%0A%20%20%20%20%20%20%20%20%3Cli%3E“finished”:%201591%3C/li%3E%0A%20%20%20%20%20%20%3C/ul%3E%0A%20%20%20%20%20%20%3C/li%3E%0A%20%20%20%20%20%20%3Cli%3E…%3C/li%3E%0A%20%20%3C/ul%3E%0A%20%20%3C/li%3E%0A%3C/ul%3E%0A%0A%3Cp%3ETo%20list%20the%20plays%20we%20first%20have%20to%20access%20the%20top%20“William%20Shakespeare”%20hash%20element%20by%20it’s%20name.%0ANext%20we%20have%20to%20%3Cstrong%3Eiterate%3C/strong%3E%20through%20each%20element%20below%20it.%3C/p%3E%0A%0A%3Cp%3ERuby%20has%20a%20method%20for%20iterating.%20It%20is%20called%20%3Cstrong%3Eeach%3C/strong%3E.%20We%20have%20seen%20it%20before%20when%0Acreating%20our%20book%20rating%20system.%3C/p%3E%0A%0A%3Cp%3EEverything%20that%20method%20%3Cstrong%3Eeach%3C/strong%3E%20returns%20is%20passed%20to%20a%20block:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Es%20=%20get_shakey%0A%0As["William%20Shakespeare"].each%20%7B%20%7Ckey,%20val%7C%0A%20%20puts%20val["title"]%0A%7D%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "prev"},
+ "40": {"lang": "ID", "title": "All together now", "chapter": "N", "answer": "%5E4$", "ok": "Yes,%20Shakespeare%20wrote%204%20plays%20in%201591", "error": "Answer%20for%20the%20year%201591%20should%20be%204", "text": "%3Cp%3ENow%20suppose%20we%20only%20want%20to%20know%20the%20names%20and%20number%20of%20plays%20written%20by%20Shakespeare%0Ain%20a%20certain%20year.%3C/p%3E%0A%0A%3Cp%3ERuby%20lets%20us%20%3Cstrong%3Eselect%3C/strong%3E%20values%20from%20a%20hash.%20The%20select%20method%20uses%20a%20block%20to%20let%20us%0Adefine%20what%20to%20select%20and%20returns%20what%20it%20found.%3C/p%3E%0A%0A%3Cp%3EWe%20can%20then%20use%20the%20results%20returned%20by%20%3Cstrong%3Eselect%3C/strong%3E%20in%20the%20%3Cstrong%3Eeach%3C/strong%3E%20method%20as%20before%20by%0Asimply%20adding%20it%20after%20the%20select%20block.%20This%20is%20another%20example%20of%20method%20chaining,%20which%20we%20saw%0Aearlier%20when%20reversing%20a%20poem.%3C/p%3E%0A%0A%3Cp%3EI%20have%20prepared%20the%20%3Cstrong%3Ecount_plays%3C/strong%3E%20method%20for%20you.%20See%20if%20you%20can%20find%20out%20how%20many%20plays%0Awere%20written%20by%20Shakespeare%20in%20the%20year%20%3Cstrong%3E1591%3C/strong%3E.%20Try%20this:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Edef%20count_plays(year)%0A%20%20s%20=%20get_shakey%0A%0A%20%20s["William%20Shakespeare"]%0A%20%20%20%20.select%20%7B%20%7Ck,%20v%7C%0A%20%20%20%20%20%20v["finished"]%20==%20year%0A%20%20%20%20%7D.each%20%7B%20%7Ckey,%20val%7C%0A%20%20%20%20%20%20puts%20val["title"]%0A%20%20%20%20%7D.count%0Aend%0A%0Aputs%20count_plays(0)%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EDid%20you%20notice%20that%20I%20chained%20the%20count%20method%20at%20the%20end%20of%20the%20each%20method.%20This%20gives%0Aus%20a%20return%20value%20for%20the%20%3Cstrong%3Ecount_plays%3C/strong%3E%20method.%3C/p%3E%0A%0A%3Cp%3EThere%20is%20another%20possibility%20for%20chaining%20here.%20See%20that%20loney%20line%20%3Cstrong%3Es%20=%20get_shakey%3C/strong%3E.%0AYou%20could%20add%20the%20%3Cstrong%3E[“William%20Shakespeare”].select%20%7B%20%7Ck,%20v%7C%3C/strong%3E%20at%20the%20end%20of%20get_shakey%0A(no%20dot%20needed%20in%20this%20case).%3C/p%3E%0A", "load_code": "prev"},
+ "41": {"lang": "ID", "title": "All's Well That Ends Well", "chapter": "N", "answer": "All's%20Well%20That%20Ends%20Well", "ok": "True", "error": "Use%201605%20as%20the%20second%20parameter", "text": "%3Cp%3EOkay,%20we%20got%20some%20data%20from%20the%20internet,%20we%20selected%20what%20we%20wanted%20and%20printed%20it%20out.%0AWhat%20is%20left%20to%20improve?%20We%20could%20print%20the%20results%20a%20bit%20prettier.%20Like%20add%20the%20year%0Aand%20align%20titles%20and%20years.%3C/p%3E%0A%0A%3Cp%3EThis%20means%20printing%20several%20values%20on%20one%20line.%20Ruby%20has%20a%20neat%20way%20of%20doing%0Athat.%20It%20is%20just%20like%20printing%20a%20string%20like:%20%3Cstrong%3Eputs%20“Hi,%20my%20name%20is%20Jimmy”%3C/strong%3E.%0ABut%20instead%20of%20the%20literal%20value%20%3Cem%3EJimmy%3C/em%3E%20we%20use%20the%20value%20of%20a%20variable.%3C/p%3E%0A%0A%3Cp%3EFirst%20replace%20%3Cstrong%3EJimmy%3C/strong%3E%20with%20%3Cstrong%3E%23%7B%7D%3C/strong%3E.%20If%20Ruby%20sees%20a%20hash%20symbol%20%23%20followed%20by%20a%20curly%20brace%20%7B%0Ait%20looks%20for%20a%20variable%20between%20the%20first%20brace%20and%20the%20following%20closing%20brace%20%7D.%0ASo%20we%20can%20use%20this:%20%3Cstrong%3E“Hi,%20my%20name%20is%20%23%7Bname%7D”%3C/strong%3E.%3C/p%3E%0A%0A%3Cp%3ELet’s%20change%20our%20code%20a%20bit%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Edef%20print_plays(year_from,%20year_to)%0A%20%20get_shakey["William%20Shakespeare"]%0A%20%20%20%20.select%20%7B%20%7Ck,%20v%7C%0A%20%20%20%20%20%20year_from%20<=%20v["finished"]%20&&%0A%20%20%20%20%20%20year_to%20%20%20>=%20v["finished"]%0A%20%20%20%20%7D.each%20%7B%20%7Ck,%20v%7C%0A%20%20%20%20%20%20puts%20"%23%7Bv["title"].ljust(30)%7D%20%23%7Bv["finished"]%7D"%0A%20%20%20%20%7D%0Aend%0Aprint_plays(1600,%201605)%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EI%20have%20added%20%3Cstrong%3E.ljust(30)%3C/strong%3E%20to%20the%20title.%20This%20way%20the%20title%20is%20%3Cem%3Eleft%20justified%3C/em%3E%20with%20a%20minimum%0Alength%20of%2030%20characters%20so%20the%20years%20align%20nicely.%3C/p%3E%0A%0A%3Cp%3ESee%20if%20you%20can%20change%20the%20ouput%20of%20the%20program%20so%20that%20it%20shows%20the%20plays%20like%20this:%20%3Cstrong%3E1600%20->%20As%20You%20Like%20It%3C/strong%3E%3C/p%3E%0A%0A%3Cp%3E%3Cstrong%3EAll’s%20Well%20That%20Ends%20Well?%3C/strong%3E%20Hey%20we’re%20not%20done%20yet,%20but%20the%20end%20is%20in%20sight!%3C/p%3E%0A", "load_code": "prev"},
+ "42": {"lang": "ID", "title": "If only I knew how to make a decision", "chapter": "N", "answer": "", "ok": "", "error": "", "text": "%3Cp%3EDecision%20making,%20in%20real%20life%20this%20can%20be%20a%20real%20problem.%20Not%20for%20us%20though.%0ARuby%20makes%20it%20very%20easy%20to%20make%20decisions.%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eif%201%20<%202%0A%20%20puts%20"It%20is%20true:%201%20is%20less%20than%202"%0Aend%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EThe%20key%20word%20here%20is%20%3Cstrong%3Eif%3C/strong%3E.%20If%20can%20be%20placed%20before%20a%20method%20or%20after%20a%20method,%20like%20so:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eputs%20"It%20is%20true:%201%20is%20less%20than%202"%20if%201%20<%202%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3E%3Cstrong%3EIf%3C/strong%3E%20is%20a%20method%20that%20requires%20one%20parameter.%20That%20parameter%20can%20be%20any%20expression%20that%20you%0Awant%20to%20test.%20The%20outcome%20of%20the%20expression%20must%20be%20either%20%3Cstrong%3Etrue%3C/strong%3E%20or%20%3Cstrong%3Efalse%3C/strong%3E.%0AHere%20are%20a%20couple%20of%20expressions%20with%20their%20outcomes:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3E5%20%20%20%20%20<=%2010%20%20%20%20%20%23%20=>%20true%0A&%2339;abc&%2339;%20==%20&%2339;def&%2339;%20%20%23%20=>%20false%0Atrue%20%20%20%20%20%20%20%20%20%20%20%20%23%20=>%20true%0A123456%20%20%20%20%20%20%20%20%20%20%23%20=>%20true%0A0%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20=>%20true%0Anil%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20=>%20false%0A&%2339;xyz&%2339;.empty?%20%20%20%20%23%20=>%20false%0A&%2339;a&%2339;%20>%205%20%20%20%20%20%20%20%20%20%23%20=>%20error:%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20comparison%20of%20String%20with%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20Numeric%20failed%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EThe%20%3Cem%3Eif%20expression%3C/em%3E%20can%20take%20many%20forms.%20It%20can%20compare%20literal%20values%20(1%20<%202),%0Avariables%20(a%20<%201)%20and%20the%20return%20value%20of%20a%20method%20(‘xyz’.empty?).%3C/p%3E%0A", "load_code": ""},
+ "43": {"lang": "ID", "title": "And Now For the Startling Conclusion", "chapter": "N", "answer": "is%20not%20equal%20to%20100$", "ok": "That's%20better", "error": "This%20can't%20be%20right", "text": "%3Cp%3EDid%20you%20see%20the%202%20equal%20signs%20in%20%3Cstrong%3E‘abc’%20==%20‘def’%3C/strong%3E?%3C/p%3E%0A%0A%3Cp%3EThis%20%3Cstrong%3E==%3C/strong%3E%20means%20%3Cstrong%3Eis%20equal%20to%3C/strong%3E.%0AThe%20single%20equal%20sign%20that%20we%20have%20seen%20before%20means%20%3Cstrong%3Eassign%20a%20value%20to%20a%20variable%3C/strong%3E.%3C/p%3E%0A%0A%3Cp%3ETo%20make%20it%20more%20confusing:%20you%20can%20use%20the%20assignment%20after%20an%20if%20method%20like%20this:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Ea%20=%200%0A%0Aif%20a%20=%20100%0A%20%20puts%20"Expression%20is%20true,%20but%20a%20is%20now:%20%23%7Ba%7D"%0Aelse%0A%20%20puts%20"%23%7Ba%7D%20is%20not%20equal%20to%20100"%0Aend%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EChange%20the%20=%20into%20==%20and%20see%20what%20happens.%3C/p%3E%0A%0A%3Cp%3EI%20can%20guarantee%20you%20that%20you%20will%20forget%20typing%20the%20second%20equal%20sign%20regularly.%20I%20also%0Astill%20forget%20it%20sometimes.%3C/p%3E%0A%0A%3Ch3%3Eelse%3C/h3%3E%0A%0A%3Cp%3EIn%20the%20code%20above%20I%20have%20added%20an%20else%20expression.%20This%20part%20will%20be%20executed%20when%20the%0A%3Cstrong%3Eif%20test-expression%3C/strong%3E%20evaluates%20to%20false.%3C/p%3E%0A%0A%3Cblockquote%3E%0A%3Cp%3EThere%20are%20more%20variations%20to%20this%20if-then-else%20theme.%20You%20can%20read%20more%0A%3Ca%20href=%22http://www.ruby-doc.org/core/doc/syntax/control_expressions_rdoc.html%22%20target=%22_blank%22%3Ehere%3C/a%3E.%3C/p%3E%0A%3C/blockquote%3E%0A", "load_code": ""},
+ "44": {"lang": "ID", "title": "Me hungry", "chapter": "N", "answer": "%5EMe%20not%20hungry", "ok": "Yes", "error": "No%20way%20am%20I%20hungry%20at%2010%20AM!", "text": "%3Cp%3EOkay,%20this%20is%20coming%20along%20wonderfully.%20This%20is%20simple%20stuff%20for%20you,%20but%20keep%20in%20mind%20that%20you%0Adidn’t%20know%20%3Cstrong%3Eany%20Ruby%20whatsoever%3C/strong%3E%20just%20fifteen%20minutes%20ago!%3C/p%3E%0A%0A%3Cp%3ELast%20step.%20Let’s%20tie%20it%20all%20together,%20you%20know?%20Let’s%20make%20it%20chime%20together%20like%20a%20very%20nice%20set%0Aof%20glistening%20chimes%20on%20the%20beach%20in%20the%20maginificent%20sunlight!%3C/p%3E%0A%0A%3Cp%3EWe’ll%20define%20two%20methods%20first%20and%20then%20take%20a%20decision:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Edef%20hungry?(time_of_day_in_hours)%0A%20%20puts%20"Me%20hungry"%0A%20%20true%0Aend%0A%0Adef%20eat_an(what)%0A%20%20puts%20"Me%20eat%20%23%7Bwhat%7D%5Cn"%0Aend%0A%0Aeat_an%20&%2339;apple&%2339;%20if%20hungry?(14)%0A%0Aeat_an%20&%2339;apple&%2339;%20if%20hungry?(10)%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3ENow%20see%20if%20you%20can%20change%20the%20method%20%3Cstrong%3Ehungry?%3C/strong%3E%20to%20display%20%3Cstrong%3E“Me%20not%20hungry”%3C/strong%3E%20and%20returning%20false%0Awhen%20the%20time%20is%20less%20than%2012.%3C/p%3E%0A", "load_code": ""},
+ "45": {"lang": "ID", "title": "Summary #6 Which Means You've Come So Far", "chapter": "Y", "answer": "%5C%7B%5C%7D", "ok": "Ok,%20that's%20an%20empty%20hash", "error": "", "text": "%3Cp%3EYou’re%20a%20level%20six%20Ruby%20cleric.%20I%20mean%20what%20a%20great%20job%20you’ve%20done.%20Let’s%20review:%3C/p%3E%0A%0A%3Ch3%3EData%3C/h3%3E%0A%0A%3Cp%3EYou%20loaded%20some%20data%20of%20the%20internet,%20traversed%20a%20data%20structure%20and%20selected%20values.%3C/p%3E%0A%0A%3Ch3%3EIterating%3C/h3%3E%0A%0A%3Cp%3EYou%20iterated%20all%20elements%20of%20a%20hash%20and%20you%20chained%20some%20more%20methods.%3C/p%3E%0A%0A%3Ch3%3EPretty%20printing%3C/h3%3E%0A%0A%3Cp%3EAnd%20if%20that%20wasn’t%20enough,%20you%20formatted%20and%20printed%20some%20values%20in%20a%20way%20that%20is%20easy%0Ato%20read%20for%20humans.%20In%20fact%20%3Cstrong%3Eyou%20made%20a%20real%20program!%3C/strong%3E%3C/p%3E%0A%0A%3Ch3%3EIF%3C/h3%3E%0A%0A%3Cp%3EYou%20learned%20to%20take%20control%20of%20your%20programs%20with%20%3Cstrong%3Eif%3C/strong%3E%20and%20%3Cstrong%3Eelse%3C/strong%3E%20statements.%3C/p%3E%0A%0A%3Ch2%3ESo%3C/h2%3E%0A%0A%3Cp%3EWhat%20could%20possibly%20be%20next?%20What%20could%20you%20possibly%20have%20to%20learn%20now?%0AHa,%20this%20is%20the%20best%20part.%20You’ve%20come%20such%20a%20long%20way%20that%20we’re%20going%0Ato%20uncover%20classes.%20For%20two%20more%20short%20lessons%20and%20you’re%20done.%3C/p%3E%0A%0A%3Cp%3EEarlier,%20we%20created%20a%20hash%20like%20this:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3EHash.new%0A%3C/code%3E%3C/pre%3E%0A", "load_code": ""},
+ "46": {"lang": "ID", "title": "Not a School Class, a Working Class", "chapter": "N", "answer": "", "ok": "", "error": "", "text": "%3Cp%3EYou%20see,%20the%20empty%20curly%20braces%20%7B%7D%20is%20a%20shortcut%20for%20Hash.new.%20The%20new%20method%20is%20used%20to%20make%20objects%0Aof%20a%20certain%20class.%20Think%20“class”%20as%20in%20“working%20class”%20—%20a%20specific%20group%20of%20objects%20which%0Aare%20similar,%20have%20the%20same%20jobs,%20the%20same%20shirts.%0AWhat%20use%20is%20a%20class?%3C/p%3E%0A%0A%3Ch3%3EBlurbalizer%3Csup%3ETM%3C/sup%3E%3C/h3%3E%0A%0A%3Cp%3EYou%20just%20had%20a%20brilliant%20idea%20for%20a%20new%20app.%20It%20is%20going%20to%20be%20%3Cstrong%3Ethe%3C/strong%3E%20next%20instant%0Amessaging%20platform.%20You%20want%20an%20app%20where%20people%20can%20send%20each%20other%20short%20messages.%20You%20call%0Athese%20messages%20Blurbs%3Csup%3ETM%3C/sup%3E.%20A%20Blurb%3Csup%3ETM%3C/sup%3E%20has%20a%20maximum%20length%20of%20just%2040%20characters.%20Let’s%20do%20a%20mood%20setting%20too.%3C/p%3E%0A%0A%3C!---The%20Internet%20has%20really%20brought%20back%20stick%20people%20and%20smileys%20out%20of%20bankruptcy.%20__Emote!__--%3E%0A%0A%3Ch3%3EWhere%20to%20start%3C/h3%3E%0A%0A%3Cp%3EWell,%20you%20might%20store%20your%20Blurbs%3Csup%3ETM%3C/sup%3E%20entries%20in%20a%20json%20file,%20right?%0ABut%20how%20would%20you%20keep%20track%20of%20the%20content%20of%20the%20entry%20and%20the%20time%20it%20was%20posted?%0AAnd%20when%20you%20loaded%20the%20file,%20how%20would%20it%20look%20in%20Ruby?%0AWould%20it%20be%20a%20Hash?%20Or%20an%20Array?%20Or%20an%20Array%20of%20Arrays?%20Or%20something%20else?%3C/p%3E%0A%0A%3Ch3%3EClass%3C/h3%3E%0A%0A%3Cp%3EI%20really%20think%20you’ll%20want%20to%20use%20a%20class.%20You%20are%20already%20familiar%20with%20many%20classes:%0AHash,%20Array,%20String.%0ALet’s%20make%20a%20new%20class%20(returns%20no%20output):%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eclass%20Blurb%0Aend%0A%3C/code%3E%3C/pre%3E%0A", "load_code": ""},
+ "47": {"lang": "ID", "title": "The Stuff Apps are Made of", "chapter": "N", "answer": "", "ok": "", "error": "", "text": "%3Cp%3EYou’ve%20opened%20up%20a%20new%20Blurb%3Csup%3ETM%3C/sup%3E%20class.%20What%20is%20your%20blog%20entry%20made%20of?%0AThe%20content,%20sure.%20Also,%20a%20time%20when%20the%20Blurb%3Csup%3ETM%3C/sup%3E%20was%20posted.%20And%20a%20mood.%3C/p%3E%0A%0A%3Cp%3EOkay,%20so%20you’ve%20got%20the%20first%20line%20of%20the%20class,%20here’s%20the%20rest:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eclass%20Blurb%0A%20%20attr_accessor%20:content,%20:time,%20:mood%0Aend%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EClass%20names%20always%20begin%20with%20a%20capital%20letter.%3C/p%3E%0A%0A%3Cp%3E(Still%20no%20output)%3C/p%3E%0A", "load_code": ""},
+ "48": {"lang": "ID", "title": "Accessors Are the Dangling Limbs", "chapter": "N", "answer": "Blurb:", "ok": "My%20first%20Blurb", "error": "", "text": "%3Cp%3EHey,%20good%20class,%20man.%20You’ve%20got%20a%20new%20Blurb%3Csup%3ETM%3C/sup%3E%20class.%3C/p%3E%0A%0A%3Cp%3EIn%20the%20class%20definition,%20you%20used%20a%20method%20called%20attr_accessor.%0AThere%20are%20many%20%3Cstrong%3Eattr%3C/strong%3Eibute%20methods%20like%20this%20which%20add%20little%20settings%20to%20classes.%0AThese%20attributes%20are%20just%20variables%20attached%20to%20a%20class.%3C/p%3E%0A%0A%3Cp%3EThink%20of%20it%20this%20way.%20A%20class%20is%20like%20a%20person.%20That%20star-shaped%20human%20thing%20out%20there.%0AAnd%20the%20attributes%20are%20the%20dangling%20limbs,%20the%20different%20parts%20that%20make%20up%20a%20body%20and%0Aother%20people%20can%20shake%20hands%20with.%3C/p%3E%0A%0A%3Ch3%3ENow%3C/h3%3E%0A%0A%3Cp%3ETo%20create%20a%20Blurb%3Csup%3ETM%3C/sup%3E%20and%20set%20the%20content:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eblurb1%20=%20Blurb.new%0Aputs%20blurb1%0Ablurb1.content%20=%20"Today%20Mount%20Hood%20Was%20Stolen!"%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "class%20Blurb;attr_accessor%20:content,:time,:mood;end"},
+ "49": {"lang": "ID", "title": "An Object, That Neat Little Package", "chapter": "N", "answer": "Blurb:", "ok": "Blurb%20updated", "error": "", "text": "%3Cp%3EGo%20ahead%20and%20set%20the%20Blurb%3Csup%3ETM%3C/sup%3E%20time%20and%20mood:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eblurb1.time%20=%20Time.now%0Ablurb1.mood%20=%20:sick%0A%0Aputs%20blurb1%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "prev;blurb1=Blurb.new;blurb1.content=%22Today%20Mount%20Hood%20Was%20Stolen!%22"},
+ "50": {"lang": "ID", "title": "Quickening it Up", "chapter": "N", "answer": "%5E%5Cd%7B4%7D", "ok": "Noted", "error": "", "text": "%3Cp%3ECool,%20your%20app%20is%20awesome.%20Hey,%20let’s%20make%20things%20a%20bit%20easier%20on%20you.%0AYou’re%20not%20going%20to%20want%20to%20set%20the%20time%20like%20that%20every%20time%20you%20Blurb%3Csup%3ETM%3C/sup%3E.%3C/p%3E%0A%0A%3Cp%3EYou%20just%20want%20to%20type%20the%20content%20and%20set%20the%20mood,%20right?%3C/p%3E%0A%0A%3Cp%3ELet’s%20add%20an%20%3Cstrong%3Einitialize%3C/strong%3E%20method%20to%20our%20class.%20This%20method%20is%20called%20whenever%20a%20new%20Blurb%3Csup%3ETM%3C/sup%3E%0Ais%20created.%0AAt%20the%20same%20time%20we%20can%20limit%20the%20length%20of%20the%20Blurb%3Csup%3ETM%3C/sup%3E%20content%20to%2040%20characters.%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eclass%20Blurb%0A%20%20attr_accessor%20:content,%20:time,%20:mood%0A%0A%20%20def%20initialize(mood,%20content="")%0A%20%20%20%20@time%20%20%20%20=%20Time.now%0A%20%20%20%20@content%20=%20content[0..39]%0A%20%20%20%20@mood%20%20%20%20=%20mood%0A%20%20end%0Aend%0A%0ABlurb.new.time%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3E(That%20parameter%20%3Cstrong%3Econtent=“”%3C/strong%3E%20is%20there%20to%20make%20sure%20that%20we%20know%20content%20is%20a%20string,%0Aeven%20if%20no%20content%20parameter%20is%20passed%20to%20the%20initialize%20method.)%3C/p%3E%0A", "load_code": ""},
+ "51": {"lang": "ID", "title": "You've Taught Your App to Reject Worthless Things", "chapter": "N", "answer": "Blurb:", "ok": "Blurb%20added", "error": "", "text": "%3Cp%3EDid%20you%20see%20how%20inside%20the%20class%20we%20used%20the%20at-symbols%20(@time).%3C/p%3E%0A%0A%3Cp%3E%3Cstrong%3EOutside%3C/strong%3E%20the%20class,%20we%20use%20accessors:%3C/p%3E%0A%0A%3Cblockquote%3E%0A%3Cp%3E%3Cstrong%3Eblurb.time%20=%20Time.now%3C/strong%3E%3C/p%3E%0A%3C/blockquote%3E%0A%0A%3Cp%3Ebut%20%3Cstrong%3Einside%3C/strong%3E%20we%20use%20the%20%3Cstrong%3Eobject’s%20variables%3C/strong%3E:%3C/p%3E%0A%0A%3Cblockquote%3E%0A%3Cp%3E%3Cstrong%3E@time%20=%20Time.now%3C/strong%3E%3C/p%3E%0A%3C/blockquote%3E%0A%0A%3Cp%3EThey’re%20the%20exact%20same%20thing,%20but%20expressed%20in%20two%20different%20places%20of%20your%20program.%3C/p%3E%0A%0A%3Ch3%3ECreate%20another%20Blurb%3Csup%3ETM%3C/sup%3E%3C/h3%3E%0A%0A%3Cp%3EWhen%20a%20new%20Blurb%3Csup%3ETM%3C/sup%3E%20is%20created,%20the%20initialize%20method%20is%20used%20to%20check%20for%20any%0Aarguments%20to%20new.%3C/p%3E%0A%0A%3Cp%3EUh,%20we%20need%20two%20arguments:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3EBlurb2%20=%20Blurb.new%20:confused,%20"I%20can%20not%20believe%20Mt.%20Hood%20was%20stolen!"%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "class%20Blurb;attr_accessor%20:content,:time,:mood;def%20initialize(mood,%20content=%22%22);@time=Time.now;@content=content[0..39];@mood=mood;end;end;blurb1=Blurb.new(:sick,%22Today%20Mount%20Hood%20Was%20Stolen!%22)"},
+ "52": {"lang": "ID", "title": "A Giraffe Has Not Stolen Summary #7", "chapter": "Y", "answer": "", "ok": "", "error": "", "text": "%3Cp%3EAha,%20you’re%20here.%20And%20all%20in%20one%20piece.%20We’re%20still%20going%20to%20make%20your%20app%20real,%0Abut%20until%20then,%20let’s%20review,%20okay?%3C/p%3E%0A%0A%3Ch3%3EClasses%3C/h3%3E%0A%0A%3Cp%3EEverything%20in%20Ruby%20is%20some%20kind%20of%20object.%20Classes%20explain%20objects,%20how%20a%20certain%20object%20works.%0AFor%20example,%20you%20made%20a%20few%20Blurb%3Csup%3ETM%3C/sup%3E%20objects%20and%20these%20objects%20are%20explained%20in%20the%20Blurb%0Aclass.%0AIn%20other%20words:%20you%20call%20them%20Blurb%20objects.%0AYou%20can%20use%20classes%20to%20(kinda)%20model%20real%20life%20objects.%3C/p%3E%0A%0A%3Ch3%3EAccessors%3C/h3%3E%0A%0A%3Cp%3EAccessors%20are%20variables%20attached%20to%20an%20object%20which%20can%20be%20used%20%3Cstrong%3Eoutside%3C/strong%3E%20the%20object.%0A(blurb2.time%20=%20Time.now)%3C/p%3E%0A%0A%3Ch3%3EObject%20variables%3C/h3%3E%0A%0A%3Cp%3EObject%20variables%20are%20the%20same%20variables%20you’re%20using%20for%20accessors,%20but%20%3Cstrong%3Einside%3C/strong%3E%20the%20object.%0A(@time%20=%20Time.now)%3C/p%3E%0A", "load_code": "prev;blurb2=Blurb.new%20:confused,%20%22I%20can%20not%20believe%20Mt.%20Hood%20was%20stolen!%22"},
+ "53": {"lang": "ID", "title": "Your Own Turf", "chapter": "N", "answer": "Blurbalizer:", "ok": "My%20app%20created", "error": "", "text": "%3Cp%3EOkay,%20let’s%20wrap%20things%20up,%20kid.%20Here’s%20the%20last%20chapter%20of%20the%20GRIPPING%20epic%20story%20of%20Try%20Ruby!%0ANow%20that%20you’ve%20got%20a%20taste%20of%20how%20it%20all%20works,%20how%20are%20you%20going%20to%20use%20it%20around%20the%20house%0Aand%20in%20your%20grocer’s%20freezer?%0AYou’re%20a%20great%20person%20(one%20of%20my%20favorites),%20but%20you%20need%20guidance.%3C/p%3E%0A%0A%3Ch3%3ELet’s%20finish%20your%20app%3C/h3%3E%0A%0A%3Cp%3EYou%20have%20app%20entries,%20but%20no%20actual%20app.%0AIt%20still%20needs%20a%20title,%20someplace%20to%20store%20all%20Blurbs%3Csup%3ETM%3C/sup%3E%20and%20a%20timeline%20in%20order%20to%20work.%3C/p%3E%0A%0A%3Cp%3EGuess%20what,%20we’re%20going%20to%20use%20another%20class.%20I’ve%20given%20all%20the%20code%20for%20the%20new%20class%20in%20one%20go.%0AJust%20%3Cstrong%3Etake%20your%20time%3C/strong%3E%20to%20study%20it.%3Cbr%3E%0AI’m%20in%20no%20hurry,%20I’ll%20wait%20for%20you%20in%20the%20next%20lesson.%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eclass%20Blurbalizer%0A%20%20def%20initialize(title)%0A%20%20%20%20@title%20%20=%20title%0A%20%20%20%20@blurbs%20=%20[]%20%23%20A%20fresh%20clean%20array%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20for%20storing%20Blurbs%0A%20%20end%0A%0A%20%20def%20add_a_blurb(mood,%20content)%0A%20%20%20%20%23%20The%20<<%20means%20add%20to%20the%20end%20of%20the%20array%0A%20%20%20%20@blurbs%20<<%20Blurb.new(mood,%20content)%0A%20%20end%0A%0A%20%20def%20show_timeline%0A%20%20%20%20puts%20"Blurbify:%20%23%7B@title%7D%20has%20%23%7B@blurbs.count%7D%20Blurbs"%0A%0A%20%20%20%20@blurbs.sort_by%20%7B%20%7Ct%7C%0A%20%20%20%20%20%20t.time%0A%20%20%20%20%7D.reverse.each%20%7B%20%7Ct%7C%0A%20%20%20%20%20%20puts%20"%23%7Bt.content.ljust(40)%7D%20%23%7Bt.time%7D"%0A%20%20%20%20%7D%0A%20%20end%0Aend%0A%0Amyapp%20=%20Blurbalizer.new%20"The%20Big%20Blurb"%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "class%20Blurb;attr_accessor%20:content,:time,:mood;def%20initialize(mood,%20content=%22%22);@time=Time.now;@content=content[0..39];@mood=mood;end;end"},
+ "54": {"lang": "ID", "title": "What's that Blurb all about?", "chapter": "N", "answer": "Today", "ok": "Bring%20on%20the%20blurbs", "error": "", "text": "%3Cp%3EThere%20you%20are.%20Did%20you%20figure%20out%20what%20all%20that%20code%20in%20the%20Blurbalizer%3Csup%3ETM%3C/sup%3E%20class%20does?%3C/p%3E%0A%0A%3Cblockquote%3E%0A%3Cp%3EIn%20the%20Blurbalizer%3Csup%3ETM%3C/sup%3E%20class%20are%20two%20%3Cstrong%3Emethods%3C/strong%3E%20(add_a_blurb%20and%20show_timeline).%0AYou%20can%20use%20a%20method%20outside%20the%20class,%20just%20like%20we%20did%20with%20accessors.%3C/p%3E%0A%3C/blockquote%3E%0A%0A%3Cp%3ETime%20to%20start%20using%20Blurbalizer%3Csup%3ETM%3C/sup%3E.%20I’ve%20already%20loaded%20some%20Blurbs%3Csup%3ETM%3C/sup%3E%20for%20you,%0Abut%20feel%20free%20to%20add%20your%20own.%3C/p%3E%0A%0A%3Cp%3EWe’re%20no%20longer%20creating%20Blurbs%3Csup%3ETM%3C/sup%3E%20directly,%20but%20we%20use%20the%20add_a_blurb%20%3Cstrong%3Emethod%3C/strong%3E%20of%20the%0ABlurbalizer%3Csup%3ETM%3C/sup%3E%20class.%20This%20way%20we%20can%20be%20sure%20all%20our%20Blurbs%3Csup%3ETM%3C/sup%3E%20are%20stored%20in%20the%0Amyapp%20object.%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Emyapp.add_a_blurb%20:moody,%20"Add%20Blurb%20here"%0A%0Amyapp.show_timeline%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "prev;class%20Blurbalizer;attr_reader%20:title;def%20initialize(title);@title=title;@blurbs=[];end;def%20add_a_blurb(mood,%20content);@blurbs%20%3C%3C%20Blurb.new(mood,%20content);@blurbs.each%20%7B%7Ct%7C%20t.time%20-=%2073%7D;end;def%20show_timeline;puts%20%22Blurbalizer:%20%23%7B@title%7D%20has%20%23%7B@blurbs.count%7D%20Blurbs%5Cn%22;@blurbs.sort_by%20%7B%20%7Ct%7C%20t.time%7D.reverse.each%20%7B%20%7Ct%7C%20puts%20%22%23%7Bt.content.ljust(40)%7D%20%23%7Bt.time%7D%22%7D;end;end;myapp%20=%20Blurbalizer.new%20%22The%20Big%20Blurb%22;myapp.add_a_blurb%20:sick,%22Today%20Mount%20Hood%20Was%20Stolen!%22;myapp.add_a_blurb%20:confused,%22I%20can%20not%20believe%20Mt.%20Hood%20was%20stolen!%22;myapp.add_a_blurb%20:dazed,%22I%20am%20speechless!%22;myapp.add_a_blurb%20:mad,%22It%20was%20stolen%20by%20a%20giraffe%20!!%22;myapp.add_a_blurb%20:sad,%22I%20Left%20my%20Hoodie%20on%20the%20Mountain!%22;myapp.add_a_blurb%20:mad,%22I%20am%20never%20going%20back%20to%20that%20mountain.%22"},
+ "55": {"lang": "ID", "title": "It's All About Combining", "chapter": "N", "answer": ":-", "ok": "Moody!", "error": "", "text": "%3Cp%3ESome%20beautiful%20things%20can%20be%20done%20with%20the%20simple%20parts%20of%20Ruby,%20especially%20when%20you%20combine%20them%0Atogether%20into%20new%20things.%0AHere%20we’ve%20got%20an%20app%20made%20of%20a%20class%20containing%20another%20class.%20And,%20actually,%20Ruby%20really%20does%20good%0Awith%20this%20kind%20of%20creature.%20It%20is%20called%20object%20oriented%20programming.%3C/p%3E%0A%0A%3Cp%3EWe%20have%20arrived%20at%20the%20%3Cstrong%3Elast%20programming%20excercise%3C/strong%3E%20of%20TryRuby.%20If%20you%20want,%20you%20can%20add%20some%0Amore%20features%20to%20Blurbalizer%3Csup%3ETM%3C/sup%3E.%3C/p%3E%0A%0A%3Cp%3EMaybe%20you%20want%20to%20print%20the%20mood%20as%20a%20smiley%20in%20the%20%3Cstrong%3Eshow_timeline%3C/strong%3E%20method.%20You%20could%20add%0Aa%20%3Cem%3Emoodify%3C/em%3E%20method%20to%20the%20Blurb%3Csup%3ETM%3C/sup%3E%20class%20and%20then%20use%20that%20method%20in%20the%20%3Cem%3Eshow_timeline%3C/em%3E%20method:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eclass%20Blurb%0A%20%20attr_accessor%20:content,%20:time,%20:mood%0A%0A%20%20def%20initialize(mood,%20content="")%0A%20%20%20%20@time%20%20%20%20=%20Time.now%0A%20%20%20%20@content%20=%20content[0..39]%0A%20%20%20%20@mood%20%20%20%20=%20mood%0A%20%20end%0A%0A%20%20def%20moodify%0A%20%20%20%20if%20%20%20%20@mood%20==%20:sad%0A%20%20%20%20%20%20return%20":-("%0A%20%20%20%20elsif%20@mood%20==%20:happy%0A%20%20%20%20%20%20return%20":-)"%0A%20%20%20%20%23%20Add%20other%20moods%20here%0A%20%20%20%20end%0A%0A%20%20%20%20%23%20The%20default%20mood%0A%20%20%20%20":-%7C"%0A%20%20end%0Aend%0A%0Aclass%20Blurbalizer%0A%20%20def%20initialize(title)%0A%20%20%20%20@title%20%20=%20title%0A%20%20%20%20@blurbs%20=%20[]%0A%20%20end%0A%0A%20%20def%20add_a_blurb(mood,%20content)%0A%20%20%20%20@blurbs%20<<%20Blurb.new(mood,%20content)%0A%20%20end%0A%0A%20%20def%20show_timeline%0A%20%20%20%20puts%20"Blurbalizer:%20%23%7B@title%7D%20has%20%23%7B@blurbs.count%7D%20Blurbs"%0A%0A%20%20%20%20@blurbs.sort_by%20%7B%20%7Ct%7C%0A%20%20%20%20%20%20t.time%0A%20%20%20%20%7D.reverse.each%20%7B%20%7Ct%7C%0A%20%20%20%20%20%20puts%20"%23%7Bt.content.ljust(40)%7D%20%23%7Bt.time%7D"%0A%20%20%20%20%7D%0A%20%20end%0Aend%0A%0Amyapp.show_timeline%0A%3C/code%3E%3C/pre%3E%0A", "load_code": "prev"},
+ "56": {"lang": "ID", "title": "Summary #8, The Hey-Relax-You-Did-Good Summary", "chapter": "Y", "answer": "", "ok": "", "error": "", "text": "%3Cp%3EThis%20last%20section%20took%20a%20moment%20to%20wind%20down,%20to%20give%20you%20some%20pointers%20as%20to%20how%20you%20can%20use%20Ruby.%3C/p%3E%0A%0A%3Cp%3EIf%20you%20enjoyed%20yourself,%20you%20can%20continue%20with%20the%20%3Ca%20href=%22/TryRuby/playground%22%3ETryRuby%20Playground%3C/a%3E%0Aor%20download%20and%20install%20Ruby:%0A%3Ca%20href=%22https://www.ruby-lang.org/en/downloads/%22%20target=%22_blank%22%3Eruby-lang.org%3C/a%3E%3C/p%3E%0A%0A%3Cp%3EOnce%20you%20have%20Ruby%20installed,%20you%20can%20create%20a%20file,%20let%20say%20%3Cem%3Emy_first_progam.rb%3C/em%3E,%20with%20a%20text%0Aeditor,%20type%20some%20Ruby%20code%20and%20then%20run%20it%20by%20opening%20a%20command%20prompt%20and%20typing:%3C/p%3E%0A%0A%3Cpre%3E%3Ccode%3Eruby%20my_first_progam.rb%0A%3C/code%3E%3C/pre%3E%0A%0A%3Cp%3EThere%20are%20many%20(free)%20development%20tools%20available%20that%20combine%20an%20editor,%20file%20browser%20and%20a%0A‘ruby-runner’.%3C/p%3E%0A%0A%3Ch2%3ECelebrate%3C/h2%3E%0A%0A%3Cp%3EYou%20really%20deserve%20a%20double-layer%20cake%20with%20double-double%20frosting%20and%20a%20guy%20playing%20one%20of%20those%20guitars%20that’s%20a%20double%20guitar.%0AI%20mean%20you%20finished,%20you%20really%20did!%20No%20doubt%20about%20it,%20you’re%20a%20%3Cstrong%3Ecertified%20red-blooded%20smartiac!%3C/strong%3E%3C/p%3E%0A%0A%3Ch2%3EMore%20info%3C/h2%3E%0A%0A%3Cp%3EThere%20are%20a%20couple%20of%20articles%20on%20this%20website.%20They%20can%20give%20you%20some%20pointers%20on%20where%20to%0Ago%20from%20here.%3C/p%3E%0A", "load_code": "def%20ruby(f);puts%20%22Go%20to%20www.ruby-lang.org%20to%20download%20Ruby%22;end;class%20K;attr_reader%20:rb;end;my_first_progam=K.new"}
+}
\ No newline at end of file
diff --git a/translations/id/README.md b/translations/id/README.md
new file mode 100644
index 00000000..eefba6c8
--- /dev/null
+++ b/translations/id/README.md
@@ -0,0 +1,21 @@
+## Copyright (C)
+Try Ruby version 4 English version, 2014-2015, _Irvan Fauziansyah_
+
+## The MIT License
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/translations/id/try_ruby_10.md b/translations/id/try_ruby_10.md
new file mode 100644
index 00000000..8ed54b4a
--- /dev/null
+++ b/translations/id/try_ruby_10.md
@@ -0,0 +1,26 @@
+---
+lang: ID
+title: Punya waktu 30 menit? Coba Ruby sekarang juga!
+answer:
+class: stretcher chapmark
+ok:
+error:
+---
+
+Ruby adalah sebuah bahasa pemrograman dari Jepang yang merevolusi
+dunia pengembangan software.
+
+Keindahan dari Ruby terletak pada keseimbangan antara kesederhanaan dan kekuatannya.
+
+Kamu bisa coba mengetik beberapa kode Ruby di editor dan gunakan tombol-tombol berikut untuk navigasi:
+
+- __Run__ → Mengeksekusi kode yang ada di editor
+- __Copy__ → Menyalin contoh kode kedalam editor
+- __Next__ → Melanjutkan ke pelajaran selanjutnya
+- __Back__ → Kembali ke pelajaran sebelumnya
+- __Clear__ → Mengosongkan editor
+
+Gunakan tombol dengan ikon 'dunia'
+diatas untuk merubah bahasa TryRuby.
+
+### Klik tombol __Next__ untuk mulai belajar.
diff --git a/translations/id/try_ruby_100.md b/translations/id/try_ruby_100.md
new file mode 100644
index 00000000..9065f5e2
--- /dev/null
+++ b/translations/id/try_ruby_100.md
@@ -0,0 +1,15 @@
+---
+lang: ID
+title: Stop, You're Barking Mad!
+answer: ^\d{1,}$
+ok: Only strings can be reversed
+error:
+---
+
+You can't reverse the number forty. I guess you can hold your monitor up to the mirror, but reversing a number just doesn't make sense.
+
+Ruby has tossed an error message. Ruby is telling you there is no method reverse for numbers.
+
+Maybe if you turn the number into a string first:
+
+ 40.to_s.reverse
diff --git a/translations/id/try_ruby_110.md b/translations/id/try_ruby_110.md
new file mode 100644
index 00000000..45c0556f
--- /dev/null
+++ b/translations/id/try_ruby_110.md
@@ -0,0 +1,22 @@
+---
+lang: ID
+title: Apples are Different From Oranges
+answer: \[\]
+ok: Great, that's an empty list
+error:
+---
+
+And numbers are different from strings.
+
+While you can use methods on any object in Ruby, some methods only work on certain types of things.
+But you can always convert between different types using Ruby's "to" methods.
+
+- __to_s__ converts things to __s__trings
+- __to_i__ converts things to __i__ntegers (numbers)
+- __to_a__ converts things to __a__rrays
+
+__What are arrays?!__
+
+They are lists. Type in a pair of brackets:
+
+ []
diff --git a/translations/id/try_ruby_120.md b/translations/id/try_ruby_120.md
new file mode 100644
index 00000000..32589399
--- /dev/null
+++ b/translations/id/try_ruby_120.md
@@ -0,0 +1,18 @@
+---
+lang: ID
+title: Standing in Line
+answer: ^\[([-\.\d]+)(\s*,\s*[-\d\.]+){3,}\]$
+ok: Excellent
+error: Try adding a fourth number to the list
+---
+
+Lists (arrays) store things __in some order__.
+
+Like standing in line for popcorn. You are behind someone and you wouldn't dream of pushing them aside,
+right? And the guy behind you, you've got a close eye on him, right?
+
+Here's a list for you. Lottery numbers:
+
+ [12, 47, 35]
+
+Try adding a number to this list: type a comma after 35 followed by a number. The space is optional.
diff --git a/translations/id/try_ruby_130.md b/translations/id/try_ruby_130.md
new file mode 100644
index 00000000..7a7a2f98
--- /dev/null
+++ b/translations/id/try_ruby_130.md
@@ -0,0 +1,13 @@
+---
+lang: ID
+title: One Raises Its Hand
+answer: ^47$
+ok: Okay
+error:
+---
+
+A list of lottery numbers. Which one is the highest?
+
+Try:
+
+ [12, 47, 35].max
diff --git a/translations/id/try_ruby_140.md b/translations/id/try_ruby_140.md
new file mode 100644
index 00000000..0e0beaa1
--- /dev/null
+++ b/translations/id/try_ruby_140.md
@@ -0,0 +1,13 @@
+---
+lang: ID
+title: Tucking a List Away
+answer: ^\[(\d+)(,\s*\d+){2,}\]$
+ok: Saved!
+error:
+---
+
+Good, good. But it's annoying to have to retype that list every time you need it, isn't it?
+
+Let's save our numbers inside a ticket like so:
+
+ ticket = [12, 47, 35]
diff --git a/translations/id/try_ruby_150.md b/translations/id/try_ruby_150.md
new file mode 100644
index 00000000..1628ed9e
--- /dev/null
+++ b/translations/id/try_ruby_150.md
@@ -0,0 +1,12 @@
+---
+lang: ID
+title: Now Type Ticket
+answer: \[(\d+(, )?){2,}\]
+load: ticket = [12, 47, 35]
+ok: Restored!
+error:
+---
+
+Now, type:
+
+ ticket
diff --git a/translations/id/try_ruby_160.md b/translations/id/try_ruby_160.md
new file mode 100644
index 00000000..1fef0211
--- /dev/null
+++ b/translations/id/try_ruby_160.md
@@ -0,0 +1,24 @@
+---
+lang: ID
+title: Saved, Tucked Away
+answer: \[12, 35, 47\]
+load: ticket = [12, 47, 35]
+ok: You've sorted the list
+error:
+---
+
+You've hung on to your lotto numbers, tucking them away inside a __variable__ called ticket.
+But any other name, like _jimmyslist_, would have been fine too.
+
+Programming, you will discover, is mostly about working with variables.
+
+Let's put your lotto numbers in order, how about?
+
+Use:
+
+ ticket.sort!
+
+You had a list. You sorted the list. The ticket variable is now changed.
+Did you notice that the _sort!_ method has a big, bright exclamation at the end?
+A lot of times Ruby methods shout like that if they alter the variable for good.
+It's nothin special, just a mark.
diff --git a/translations/id/try_ruby_170.md b/translations/id/try_ruby_170.md
new file mode 100644
index 00000000..63fc2953
--- /dev/null
+++ b/translations/id/try_ruby_170.md
@@ -0,0 +1,34 @@
+---
+lang: ID
+title: Elemental
+answer: ^(12|35|47)$
+load: ticket = [12, 47, 35]
+ok: Ok
+error: Almost
+---
+
+So we stored our lotto numbers inside variable ticket. How to get 'em out again?
+
+We already saw that we can get the highest number with __max__. Similarly you can
+get the __first__ or the __last__ element of the list.
+But what if you want a specific element?
+
+### [ ]
+Ruby uses the square brackets [ ] to target an element.
+The square brackets are very common in Ruby.
+They are like sights used to line up a target. Exactly.
+These brackets mean, "I am looking for ____" Ready, aim.
+
+Let's get all of our lotto numbers:
+
+ puts ticket[0]
+ puts ticket[1]
+ puts ticket[2]
+
+Why do we use [0], [1], [2]?
+
+And not [1], [2] and [3]? Is that some kind of Japanese Zen thing?
+No, we computer people just like to begin counting from zero. It's not just a Ruby thing,
+this _zero based indexing_ is used in most programming languages.
+
+> A little reminder: you can use the __Copy__ button to copy the example code to the editor.
diff --git a/translations/id/try_ruby_180.md b/translations/id/try_ruby_180.md
new file mode 100644
index 00000000..d191e13b
--- /dev/null
+++ b/translations/id/try_ruby_180.md
@@ -0,0 +1,31 @@
+---
+lang: ID
+title: Summary #2 is Upon Us
+answer: \w+
+class: stretcher chapmark
+load: poem = "My toast has flown from my hand\nAnd my toast has gone to the moon.\nBut when I saw it on television,\nPlanting our flag on Halley's comet,\nMore still did I want to eat it.\n"
+ok: Does it rhyme?
+error:
+---
+
+Now, look how your second minute went:
+
+### Errors
+If you try to reverse a number or do anything fishy, Ruby will tell you so.
+
+### Arrays
+Arrays are lists for storing things in some order.
+We also know how to create array's and get items from array's.
+
+### Variables
+Variables save a thing and give it a name. You used the equals sign to do this. Like:
+ticket = [14, 37, 18].
+
+### 2/8
+In all there are eight sections. You are two-eighths of the way there! This is simple stuff,
+don't you think? Good stuff up ahead.
+
+Let's change directions for a moment. I've stuffed a bit of poetry for you in a certain variable.
+Take a look. Type:
+
+ puts poem
diff --git a/translations/id/try_ruby_190.md b/translations/id/try_ruby_190.md
new file mode 100644
index 00000000..b5d87435
--- /dev/null
+++ b/translations/id/try_ruby_190.md
@@ -0,0 +1,16 @@
+---
+lang: ID
+title: Sadly, You Hate Toast Poetry
+answer: (toast){0}
+load: prev
+ok: Excellent
+error: Still smells like toast to me
+---
+
+Look, it's okay. You don't have to like it. Hack it up, be my guest. Instead of toast, go for a
+melon or something. Try this to see the new poem:
+
+ poem.gsub("toast", "honeydew")
+
+The __gsub__ method is short for global substitute. It replaces all occurences of "toast" with
+"honeydew".
diff --git a/translations/id/try_ruby_20.md b/translations/id/try_ruby_20.md
new file mode 100644
index 00000000..4caa90c0
--- /dev/null
+++ b/translations/id/try_ruby_20.md
@@ -0,0 +1,19 @@
+---
+lang: ID
+title: Cara Menggunakan Editor
+answer: ^\d{1,}$
+ok: Bagus! Kamu baru saja melakukan perhitungan matematika. Lihat bagaimana jawabannya muncul?
+error: Ketik 2 + 6 di dalam editor
+---
+
+Jendela editor yang paling bawah adalah tempat untuk menulis kode Ruby kamu, tekan tombol __Run__ dan
+lihat hasilnya!
+
+Contoh, coba ketik perhitungan matematika. Seperti:
+
+ 2 + 6
+
+Hasil dari kode program yang kamu ketik akan muncul sendiri di dalam jendela hasil yang ada di paling atas.
+Juga akan ada baris informasi yang membberitahukan seberapa baik kamu.
+
+> Sebagai alternatif kamu bisa menekan tombol __Copy__ untuk menyalin contoh kode yang ada ke dalam editor.
diff --git a/translations/id/try_ruby_200.md b/translations/id/try_ruby_200.md
new file mode 100644
index 00000000..4150278d
--- /dev/null
+++ b/translations/id/try_ruby_200.md
@@ -0,0 +1,12 @@
+---
+lang: ID
+title: Ready, Aim
+answer: ^\n.ti tae ot (.+)
+load: prev
+ok: Okay, sure. So the whole poem has been turned backwards.
+error:
+---
+
+Here's a question: what happens when we reverse this whole poem?
+
+ poem.reverse
diff --git a/translations/id/try_ruby_210.md b/translations/id/try_ruby_210.md
new file mode 100644
index 00000000..02c2f679
--- /dev/null
+++ b/translations/id/try_ruby_210.md
@@ -0,0 +1,17 @@
+---
+lang: ID
+title: Too Much Reversal
+answer: ^\["More still did (.+)
+load: prev
+ok: Yes, almost what we want
+error:
+---
+
+So the whole poem's been turned backwards, letter-by-letter. I really wanted to just reverse the lines though.
+Move the last line up to first and the first line down to last.
+
+Backwards, but not __that__ backwards.
+
+Here's how:
+
+ poem.lines.reverse
diff --git a/translations/id/try_ruby_220.md b/translations/id/try_ruby_220.md
new file mode 100644
index 00000000..1841b98a
--- /dev/null
+++ b/translations/id/try_ruby_220.md
@@ -0,0 +1,21 @@
+---
+lang: ID
+title: Ringlets of Chained Methods
+answer: ^More still did (.+)
+load: prev
+ok: Good show, my friend!
The join method took that array of lines and put them together into a string.
+error:
+---
+
+So what do you see? What happened there? You typed __poem.lines.reverse__ and what happened?
+
+Two things happened. You turned the poem into a list using lines.
+Lines decides the way the string is split up and converts it into an Array.
+
+Then, you reversed that list. You had each line. You reversed them. That's it.
+
+Let's tack one more method on the end there:
+
+ puts poem.lines.reverse.join
+
+Combining methods like this is called _method chaining_.
\ No newline at end of file
diff --git a/translations/id/try_ruby_230.md b/translations/id/try_ruby_230.md
new file mode 100644
index 00000000..8639943b
--- /dev/null
+++ b/translations/id/try_ruby_230.md
@@ -0,0 +1,30 @@
+---
+lang: ID
+title: Of All the Summaries, #3 is Here Now
+answer: \{\}
+class: stretcher chapmark
+load: prev
+ok: You've made an empty hash!
+error:
+---
+
+### Exclamations
+Methods may have exclamations (and also question marks) in their name.
+These are just there to better explain what their function is. No big deal.
+
+### String manipulation
+Search and change strings
+
+### Chaining
+Chaining methods lets you get a lot more done. Break up a poem, reverse it, reassemble it:
+__poem.lines.reverse.join__
+
+At this point, you may want to tinker with the poem a bit more. A complete list of all the String
+methods is here.
+
+Go ahead and try a few, such as: poem.downcase or poem.swapcase
+
+## Ready?
+When you feel ready to move on, type:
+
+ books = {}
diff --git a/translations/id/try_ruby_240.md b/translations/id/try_ruby_240.md
new file mode 100644
index 00000000..e2dffeee
--- /dev/null
+++ b/translations/id/try_ruby_240.md
@@ -0,0 +1,27 @@
+---
+lang: ID
+title: A Wee Blank Book
+answer: ^(splendid|quite_good|mediocre|quite_not_good|abysmal)$
+load: books = {}
+ok: Yes that's a new review
+error: Use one of splendid, quite_good, mediocre, quite_not_good, abysmal.
Don't forget the colon
+---
+
+You've made an empty __hash__. A hash is like an array, only every one of its elements has a name.
+
+We're going to stuff some miniature book reviews in our new hash. Here's our rating system:
+
+- :splendid → a masterpiece
+- :quite\_good → enjoyed, sure, yes
+- :mediocre → equal parts great and terrible
+- :quite\_not\_good → notably bad
+- :abysmal → steaming wreck
+
+To rate a book, put the title in square brackets and put the rating after the equals. For example:
+
+ books["Gravitys Rainbow"] = :splendid
+
+> By now I think it is only fair to tell you that all lessons in TryRuby are separate from each other.
+> So if you go crazy typing book reviews here, you can only use 'em in this lesson.
+> If you want to use your reviews in the next lesson you should copy/paste them.
+> Don't worry about this too much, each lesson has plenty of predefined stuff for you to play around with.
diff --git a/translations/id/try_ruby_250.md b/translations/id/try_ruby_250.md
new file mode 100644
index 00000000..d78e6420
--- /dev/null
+++ b/translations/id/try_ruby_250.md
@@ -0,0 +1,28 @@
+---
+lang: ID
+title: More Bite-Size Reviews
+answer: [3-9]
+load: books = {"Gravitys Rainbow" => :splendid}
+ok: See, the length method works on strings, array's and hashes.
+error:
+---
+
+Keep going, fill it up with reviews. And, if you want to see the whole list, just type: __puts books__
+
+Again, the ratings are: :splendid, :quite\_good, :mediocre, :quite\_not\_good and :abysmal.
+
+These ratings are not strings. When you place a colon in front of a simple word, you get a __symbol__.
+Symbols are cheaper than strings (in terms of computer memory.) If you use a word over and over in your program,
+use a symbol. Rather than having thousands of copies of that word in memory, the computer will store the symbol only
+__once__.
+
+More importantly, a symbol tells you that is not just any old word but has a meaning within your program.
+
+Enter 2 more bookreviews, use __books.length__ to see how many reviews there are in the hash:
+
+ books["The deep end"] = :abysmal
+ books["Living colors"] = :mediocre
+
+ puts books
+
+ puts books.length
diff --git a/translations/id/try_ruby_260.md b/translations/id/try_ruby_260.md
new file mode 100644
index 00000000..a276d671
--- /dev/null
+++ b/translations/id/try_ruby_260.md
@@ -0,0 +1,20 @@
+---
+lang: ID
+title: Wait, Did I Like Gravity's Rainbow?
+answer: ^(splendid|quite_good|mediocre|quite_not_good|abysmal)$
+load: books = {"Gravitys Rainbow" => :splendid, "The deep end" => :abysmal, "Living colors" => :mediocre}
+ok: I liked it a lot
+error:
+---
+
+One great thing about Ruby is that names are often reused, which means fewer names you need to remember.
+
+Remember how we retrieved items from an array using a number:
+__puts ticket[1]__.
+
+For a hash this works the same way, except we don't use a number to get an element but a name.
+
+So, if you'd like to look up one of your old reviews, again put the title in the square. But leave off the equals.
+Just like this:
+
+ puts books["Gravitys Rainbow"]
diff --git a/translations/id/try_ruby_270.md b/translations/id/try_ruby_270.md
new file mode 100644
index 00000000..97f03fd2
--- /dev/null
+++ b/translations/id/try_ruby_270.md
@@ -0,0 +1,19 @@
+---
+lang: ID
+title: Hashes as Pairs
+answer: ^\[".*"\]
+load: prev
+ok: You found the keys
+error:
+---
+
+Keep in mind that hashes won't keep things in order. That's not their job. It'll just pair up
+two things: a __key__ and a __value__.
+
+In your reviews, the book's title is the key and the rating is the value.
+
+If you want to just see the titles of all the books you've reviewed:
+
+ books.keys
+
+You can also try this with .values instead of .keys.
\ No newline at end of file
diff --git a/translations/id/try_ruby_280.md b/translations/id/try_ruby_280.md
new file mode 100644
index 00000000..121a6759
--- /dev/null
+++ b/translations/id/try_ruby_280.md
@@ -0,0 +1,27 @@
+---
+lang: ID
+title: Are You Harsh?
+answer: "mediocre"
+load: books = {"Gravitys Rainbow" => :splendid, "The deep end" => :abysmal, "Living colors" => :mediocre, "Bumblebees" => :mediocre}
+ok: Great, wow! You've made a scorecard of your ratings
+error:
+---
+
+So are you giving out harsh, unfair reviews? Let's keep score with a new hash __ratings__:
+
+Then, okay, now let's count up your reviews. Just stay with me. Type:
+
+ ratings = Hash.new {0}
+
+ books.values.each { |rate|
+ ratings[rate] += 1
+ }
+
+ puts ratings
+
+The straight line in the code is the pipe character, probably located right above the Enter key
+on your keyboard.
+
+That _+= 1_ line means: increase the value by 1.
+
+Don't worry if you don't understand everything that is going on here. It will be revealed later.
diff --git a/translations/id/try_ruby_290.md b/translations/id/try_ruby_290.md
new file mode 100644
index 00000000..820750dc
--- /dev/null
+++ b/translations/id/try_ruby_290.md
@@ -0,0 +1,18 @@
+---
+lang: ID
+title: A Tally
+answer: \w+
+ok: Yodelay!
+error:
+---
+
+One of the amazing new things we've just used is a __block__. We're going to explore these more
+in this and the next lesson. But, basically, a block is a bit of Ruby code surrounded by curly
+braces.
+
+Let's try another block:
+
+ 5.times { print "Odelay! " }
+
+Blocks are always attached to methods. Like the __times__ method, which takes the block and runs
+the code over and over. (In our example: five times.)
\ No newline at end of file
diff --git a/translations/id/try_ruby_30.md b/translations/id/try_ruby_30.md
new file mode 100644
index 00000000..74f97851
--- /dev/null
+++ b/translations/id/try_ruby_30.md
@@ -0,0 +1,13 @@
+---
+lang: ID
+title: Angka dan Matematika
+answer: ^[0-9\.,-]{1,}$
+ok: bagus
+error:
+---
+
+Ruby mengenali angka dan simbol-simbol matematika. Kamu bisa coba beberapa matematika sederhana seperti:
+
+ 4 * 10
+ 5 - 12
+ 30 / 4
\ No newline at end of file
diff --git a/translations/id/try_ruby_300.md b/translations/id/try_ruby_300.md
new file mode 100644
index 00000000..704aac49
--- /dev/null
+++ b/translations/id/try_ruby_300.md
@@ -0,0 +1,23 @@
+---
+lang: ID
+title: Have you got the time?
+answer: ^[0-9]$
+ok: You timed it just right!
+error: Run the block 0 to 9 times
+---
+
+As we saw in the first example with a block (when counting ratings) we can pass a value to the block. Which
+values are __passed__ is determined by the method that is running the block.
+
+The values that are __received__ by the block are placed in the variable name at the beginning of the block,
+between two pipe symbols: |
+
+Let's try that with this block:
+
+ 5.times { |time|
+ puts time
+ }
+
+Here, method __.times__ sends a value to variable __|time|__. But note that variable time is only known within the block.
+
+> Did you notice that you can split code over multiple lines. This makes it a bit easier to read.
diff --git a/translations/id/try_ruby_310.md b/translations/id/try_ruby_310.md
new file mode 100644
index 00000000..36494226
--- /dev/null
+++ b/translations/id/try_ruby_310.md
@@ -0,0 +1,24 @@
+---
+lang: ID
+title: Now Arriving at Summary #4
+answer:
+class: stretcher chapmark
+ok:
+error:
+---
+
+This last lesson was a bit longer. You've probably used up three minutes learning about:
+
+### Hashes
+The little dictionary with the curly pages: __{}__
+
+### Symbols
+Tiny, efficient code words with a colon, like: __:splendid__
+
+### Blocks
+Chunks of code which can be tacked on to many of Ruby's methods. Here's the code you used to
+build a scorecard:
+__books.values.each { |rate| ratings[rate] += 1 }__
+
+### Next
+In the next lesson we will delve al little bit deeper into methods.
diff --git a/translations/id/try_ruby_320.md b/translations/id/try_ruby_320.md
new file mode 100644
index 00000000..f41b774b
--- /dev/null
+++ b/translations/id/try_ruby_320.md
@@ -0,0 +1,38 @@
+---
+lang: ID
+title: To (be) or not to (be)
+answer:
+load: poem = "My toast has flown from my hand\nAnd my toast has gone to the moon.\nYada yada yada\n"
+ok:
+error:
+---
+
+One other little thing we haven't really talked about openly: method arguments.
+Remember when we changed the poem a little bit? We used:
+__poem.gsub("toast", "honeydew")__
+
+The gsub method needs 2 arguments, which we passed to gsub by including two strings between
+parenthesis. _Arguments tell the method exactly what to do._
+
+### Parenthesis
+Actually, most of the time Ruby doesn't mind if you omit the parenthesis. So this would have
+worked too:
+__poem.gsub "toast", "honeydew"__
+
+We have already used another method with a parameter. Many times in fact, though it was not very
+obvious:
+
+ puts "Hello"
+ puts("Hello")
+
+Yes __puts__ is also a method. Using puts with or without parenthesis is the same to Ruby, but the
+version without parenthesis is a bit easier to read. And it saves you valuable typing time!
+
+> So I guess the conclusion is that you can do whatever you like with parenthesis as long as your
+> code reads nicely.
+
+### to (be) or not to (be)
+So if _to_ is a method and _be_ is an argument we now know the answer to this age old question.
+It is really just a matter of preference whether you want _to be_ or _to(be)_.
+
+Are you in the mood for more Shakespeare? Read on.
diff --git a/translations/id/try_ruby_330.md b/translations/id/try_ruby_330.md
new file mode 100644
index 00000000..9347f5de
--- /dev/null
+++ b/translations/id/try_ruby_330.md
@@ -0,0 +1,33 @@
+---
+lang: ID
+title: The Taming of the Shrew
+answer: ^tame
+ok: Good good!
+error:
+---
+
+You totally know how to use Ruby now. I mean you've got down the essentials.
+You just need to keep learning more methods and try out more complex blocks.
+
+But there's one side of Ruby we haven't settled. Making your own methods.
+__Ahem!__ Let's get it over with then.
+
+Next to using Ruby's built in methods (like puts, sort, times) you can define
+your own methods. Why is that a good idea? Two reasons:
+
+### To make your program shorter
+If you have to do the same thing in more than one part of your code it is easier
+to put that code in a separate method. Your code will be shorter.
+
+### To make your code easier to read
+Suppose your program needs to do a lot of different things.
+You __could__ stuff all code into one long piece. But it would be very difficult to
+read and understand that code later.
+
+Instead you should cut up your code in different methods and give each method an easy to
+understand English name. You will thank yourself later.
+
+So how do we define a method? Like this:
+
+ def tame( number_of_shrews )
+ end
diff --git a/translations/id/try_ruby_340.md b/translations/id/try_ruby_340.md
new file mode 100644
index 00000000..0b9aaefe
--- /dev/null
+++ b/translations/id/try_ruby_340.md
@@ -0,0 +1,24 @@
+---
+lang: ID
+title: In Ruby, Def Leppard means: define method Leppard
+answer: ^tame
+ok: Tame is not lame
+error:
+---
+
+Hey, okay, you done it. You're making your own method. You started with def, followed by the name of the method.
+And a list of arguments which the method will need. This isn't too scary and dangerous!
+All we have to do is fill it up with Ruby and finish it up with end.
+
+Here's the code:
+
+ def tame( number_of_shrews )
+ number_of_shrews.times {
+ puts "Tamed a shrew"
+ }
+ end
+
+> __P.S.__
+> If you don't get the title of this chapter.
+> Def Leppard
+> is the name of a, once famous, English rock band.
diff --git a/translations/id/try_ruby_350.md b/translations/id/try_ruby_350.md
new file mode 100644
index 00000000..bf2a8f10
--- /dev/null
+++ b/translations/id/try_ruby_350.md
@@ -0,0 +1,12 @@
+---
+lang: ID
+title: The Ripened Fruit of Your Own Creation
+answer: ^Tamed a shrew
+ok: That'll show those shrews
+error:
+load: def tame(number_of_shrews);number_of_shrews.times{puts "Tamed a shrew"};end;
+---
+
+A new method is born. Let us use it now:
+
+ tame 5
diff --git a/translations/id/try_ruby_360.md b/translations/id/try_ruby_360.md
new file mode 100644
index 00000000..c2e288c0
--- /dev/null
+++ b/translations/id/try_ruby_360.md
@@ -0,0 +1,29 @@
+---
+lang: ID
+title: Give and take
+answer: \d+
+ok: Right on. Bravo.
+error:
+---
+
+Most methods do not only want some parameters as input, but will also __give something back__.
+I have changed our method a bit so it will return a value to you. Try it:
+
+ def tame( number_of_shrews )
+ number_of_shrews.times {
+ puts "Tamed a shrew"
+ }
+ return number_of_shrews
+ end
+
+ puts tame(3)
+
+### Return
+And, since you're getting so advanced and capable here, one other tip:
+you can omit the word __return__ from the last line of the method.
+Ruby will automagically return the last value that was used inside the method.
+
+So we can change the last line to just: __number\_of\_shrews__.
+
+But since method __.times__ also returns the _number\_of\_shrews_ we can
+remove the entire last line. So in fact our original method already did what we wanted all along!
diff --git a/translations/id/try_ruby_370.md b/translations/id/try_ruby_370.md
new file mode 100644
index 00000000..0e4fc8b1
--- /dev/null
+++ b/translations/id/try_ruby_370.md
@@ -0,0 +1,27 @@
+---
+lang: ID
+title: Hello, Who's There? And Summary #5 Waves Its Hat!
+answer:
+class: stretcher chapmark
+ok:
+error:
+---
+
+Well done, well done, well done, well done!
+
+Truly, truly, truly, truly, truuuuuuuuly!
+
+Here's the last few minutes of your life in review:
+
+### Methods
+Methods can be defined with __def__ and have a name. Methods make your program shorter
+and easier to read.
+
+### Parameters
+Methods can have parameters.
+
+### Return values
+Methods (almost) always return a value.
+
+## Now
+To (be) or not to (be) is not a question to you anymore. Are you ready for some more Shakespeare?
diff --git a/translations/id/try_ruby_380.md b/translations/id/try_ruby_380.md
new file mode 100644
index 00000000..565ffba7
--- /dev/null
+++ b/translations/id/try_ruby_380.md
@@ -0,0 +1,33 @@
+---
+lang: ID
+title: The world is our oyster
+answer: ^\{\"William
+ok: Good. Bit difficult to read.
+error:
+load: def get_shakey;JSON.parse("{\"William Shakespeare\": {\"1\": {\"title\": \"The Two Gentlemen of Verona\", \"finished\": 1591},\"2\": {\"title\": \"The Taming of the Shrew\", \"finished\": 1591},\"3\": {\"title\": \"Henry VI, Part 2\", \"finished\": 1591},\"4\": {\"title\": \"Henry VI, Part 3\", \"finished\": 1591},\"5\": {\"title\": \"Henry VI, Part 1\", \"finished\": 1592},\"6\": {\"title\": \"Titus Andronicus\", \"finished\": 1592},\"7\": {\"title\": \"Richard III\", \"finished\": 1593},\"8\": {\"title\": \"Edward III\", \"finished\": 1593},\"9\": {\"title\": \"The Comedy of Errors\", \"finished\": 1594},\"10\": {\"title\": \"Love's Labour's Lost\", \"finished\": 1595},\"11\": {\"title\": \"Love's Labour's Won\", \"finished\": 1596},\"12\": {\"title\": \"Richard II\", \"finished\": 1595},\"13\": {\"title\": \"Romeo and Juliet\", \"finished\": 1595},\"14\": {\"title\": \"A Midsummer Night's Dream\", \"finished\": 1595},\"15\": {\"title\": \"King John\", \"finished\": 1596},\"16\": {\"title\": \"The Merchant of Venice\", \"finished\": 1597},\"17\": {\"title\": \"Henry IV, Part 1\", \"finished\": 1597},\"18\": {\"title\": \"The Merry Wives of Windsor\", \"finished\": 1597},\"19\": {\"title\": \"Henry IV, Part 2\", \"finished\": 1598},\"20\": {\"title\": \"Much Ado About Nothing\", \"finished\": 1599},\"21\": {\"title\": \"Henry V\", \"finished\": 1599},\"22\": {\"title\": \"Julius Caesar\", \"finished\": 1599},\"23\": {\"title\": \"As You Like It\", \"finished\": 1600},\"24\": {\"title\": \"Hamlet\", \"finished\": 1601},\"25\": {\"title\": \"Twelfth Night\", \"finished\": 1601},\"26\": {\"title\": \"Troilus and Cressida\", \"finished\": 1602},\"27\": {\"title\": \"Sir Thomas More\", \"finished\": 1604},\"28\": {\"title\": \"Measure for Measure\", \"finished\": 1604},\"29\": {\"title\": \"Othello\", \"finished\": 1604},\"30\": {\"title\": \"All's Well That Ends Well\", \"finished\": 1605},\"31\": {\"title\": \"King Lear\", \"finished\": 1606},\"32\": {\"title\": \"Timon of Athens\", \"finished\": 1606},\"33\": {\"title\": \"Macbeth\", \"finished\": 1606},\"34\": {\"title\": \"Antony and Cleopatra\", \"finished\": 1606},\"35\": {\"title\": \"Pericles, Prince of Tyre\", \"finished\": 1608},\"36\": {\"title\": \"Coriolanus\", \"finished\": 1608},\"37\": {\"title\": \"The Winter's Tale\", \"finished\": 1611},\"38\": {\"title\": \"Cymbeline\", \"finished\": 1610},\"39\": {\"title\": \"The Tempest\", \"finished\": 1611},\"40\": {\"title\": \"Cardenio\", \"finished\": 1613},\"41\": {\"title\": \"Henry VIII\", \"finished\": 1613},\"42\": {\"title\": \"The Two Noble Kinsmen\", \"finished\": 1614}}}");end;
+---
+
+So far we have been running programs that only use things that we have typed ourselves.
+Which is nice, I mean that _Odelaying_ was epic, but this the internet era so it is about
+time we included the rest of the world in our programming efforts.
+
+Many, many, many websites are available that you can ask for information. For instance
+this link will give you all current Google news feeds
+about Ruby.
+
+Your web browser will probably display it quite nicely for you. If you look at the source
+(type: control-U) you will see a long string of strangely formatted text. In the Google example
+it is in the __rss__ format.
+
+### Formats
+There are many other formats, with strange names, available and used on the web, like:
+html, xml and json. Yes, even this very website uses a couple of these.
+
+I have prepared a method for you that will fetch a list of the complete works of William
+Shakespeare from the internet.
+(Don't worry it actually comes from the same server that this website runs on, so
+we're not bothering anyone.)
+
+Get the data with:
+
+ get_shakey
diff --git a/translations/id/try_ruby_390.md b/translations/id/try_ruby_390.md
new file mode 100644
index 00000000..0e070cd4
--- /dev/null
+++ b/translations/id/try_ruby_390.md
@@ -0,0 +1,53 @@
+---
+lang: ID
+title: Noble Kinsmen
+answer: ^The Two Noble Kinsmen$
+ok: That's much better
+error:
+load: prev
+---
+
+Okay we now have a list of plays from the internet. The list was in the json format.
+Fortunately for us Ruby kindly provides a method to convert json data to a Ruby hash.
+The _get\_shakey_ method already did that for us.
+
+But since the structure of the json data is retained in the hash, it is still a bit difficult to read.
+Let us write a method to display the plays nicely.
+
+If you inspect the list of plays carefully you will see that it has a kind of nested
+structure. (This is actually quite common in data you get from the internet.)
+Looks like this:
+
+