Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changed the schema and fixed missing answers. added also github_name …

…twitter_name as optional attributes
  • Loading branch information...
commit 40a1420cf9552dd0a5a1f38f8b00d5c738098f52 1 parent 135e180
@koos koos authored
Showing with 426 additions and 215 deletions.
  1. +1 −0  .rvmrc
  2. +1 −1  README.markdown
  3. +72 −69 creator
  4. +2 −1  questions/2_seconds.json
  5. +2 −1  questions/HTCPCP.json
  6. +5 −2 questions/about_ruby.json
  7. +2 −1  questions/absolute_superclass_1.8.json
  8. +2 −1  questions/absolute_superclass_1.9.json
  9. +2 −1  questions/active_record_base.json
  10. +2 −1  questions/all_ur_base.json
  11. +1 −0  questions/answer_to_everything.json
  12. +2 −1  questions/array_all_but_the_first.json
  13. +2 −1  questions/array_all_but_the_first_and_last .json
  14. +2 −1  questions/array_all_but_the_last.json
  15. +2 −1  questions/array_ampersand.json
  16. +2 −1  questions/array_get_and remove_first_element.json
  17. +2 −1  questions/array_get_and remove_last_element.json
  18. +2 −1  questions/array_pipe.json
  19. +2 −1  questions/array_splat.json
  20. +2 −1  questions/array_to_csv_string.json
  21. +2 −1  questions/attribute_selectors.json
  22. +2 −1  questions/background_image.json
  23. +2 −1  questions/backticks_in_ruby.json
  24. +2 −1  questions/base_object.json
  25. +2 −1  questions/best_language.json
  26. +2 −1  questions/bitwise_and.json
  27. +2 −1  questions/bitwise_or.json
  28. +2 −1  questions/chrome_v8.json
  29. +2 −1  questions/class_inheritance.json
  30. +1 −0  questions/club_mate_caffeine.json
  31. +2 −1  questions/collect_alternative.json
  32. +5 −2 questions/comparsion.json
  33. +2 −1  questions/constants.json
  34. +2 −1  questions/controller_action.json
  35. +2 −1  questions/date_format_month.json
  36. +5 −2 questions/divmod.json
  37. +2 −1  questions/emails.json
  38. +2 −1  questions/enumerable.json
  39. +3 −1 questions/equality.json
  40. +2 −1  questions/falsy.json
  41. +2 −1  questions/fastes_sorting_algorithm.json
  42. +2 −1  questions/fizzbuzz.json
  43. +2 −1  questions/float_left.json
  44. +2 −1  questions/folders.json
  45. +2 −1  questions/fps.json
  46. +2 −1  questions/fun_with_brackets.json
  47. +2 −1  questions/garbarge_collector_in_19.json
  48. +2 −1  questions/global_variable_character.json
  49. +2 −1  questions/half_a_byte.json
  50. +2 −1  questions/hash_with_indifferent_access.json
  51. +2 −1  questions/hexadecimal_code.json
  52. +2 −1  questions/how_can_you_access_the_data_pas.json
  53. +2 −1  questions/how_do_you_specify_html5_doctyp.json
  54. +2 −1  questions/how_do_you_use_multiple_box_sha.json
  55. +2 −1  questions/how_is_ruby_licensed.json
  56. +2 −1  questions/how_many_gems.json
  57. +2 −1  questions/img_tag.json
  58. +6 −1 questions/instance_exec.json
  59. +5 −2 questions/invited-php.json
  60. +2 −1  questions/jquery_sizzle.json
  61. +2 −1  questions/json.json
  62. +2 −1  questions/jsonp.json
  63. +6 −1 questions/kanji_converter.json
  64. +5 −2 questions/kernel-sprintf-2.json
  65. +5 −2 questions/kernel-sprintf.json
  66. +2 −1  questions/kernel.json
  67. +3 −1 questions/last_cmd_sub.json
  68. +2 −1  questions/last_directory.json
  69. +2 −1  questions/lazy.json
  70. +2 −1  questions/map_parseInt.json
  71. +5 −2 questions/matz.json
  72. +2 −1  questions/media.json
  73. +2 −1  questions/method_used_for_comparisions.json
  74. +2 −1  questions/min_max_quantifier.json
  75. +2 −1  questions/mixins_are_what.json
  76. +2 −1  questions/mutable_data_type.json
  77. +2 −1  questions/negative_look_ahead.json
  78. +6 −1 questions/new_database.json
  79. +2 −1  questions/new_lambda_calling_syntax.json
  80. +2 −1  questions/new_lambda_constructing_syntax.json
  81. +2 −1  questions/nil.json
  82. +2 −1  questions/nil_id.json
  83. +6 −1 questions/nilclass.json
  84. +2 −1  questions/nodetype_of_text_node.json
  85. +2 −1  questions/numeric_types.json
  86. +1 −0  questions/ook_ook.json
  87. +2 −1  questions/optional_html_tags.json
  88. +2 −1  questions/pluralize_person.json
  89. +2 −1  questions/png.json
  90. +2 −1  questions/position_fixed_support.json
  91. +2 −1  questions/position_property.json
  92. +2 −1  questions/prediction_gates.json
  93. +3 −1 questions/prefix_last_command.json
  94. +6 −1 questions/prime.json
  95. +3 −1 questions/private_method_in_ruby.json
  96. +2 −1  questions/protected_method_in_ruby.json
  97. +2 −1  questions/ps_save_for_web.json
  98. +6 −1 questions/quo.json
  99. +2 −1  questions/rails_first_shown.json
  100. +1 −0  questions/rails_inventor.json
  101. +2 −1  questions/rake_about.json
  102. +2 −1  questions/ranges_three_dots.json
  103. +2 −1  questions/release_date.json
  104. +2 −1  questions/return_value_or.json
  105. +2 −1  questions/roses.json
  106. +6 −1 questions/rspec_controller_render_views.json
  107. +2 −1  questions/run_time_of_bst.json
  108. +2 −1  questions/same_origin_policy.json
  109. +2 −1  questions/screen_image_resolution.json
  110. +2 −1  questions/simple_format.json
  111. +2 −1  questions/spaceship_operator.json
  112. +2 −1  questions/square_numbers_in_list.json
  113. +2 −1  questions/strict_doctype.json
  114. +2 −1  questions/string_clean_whitespace.json
  115. +2 −1  questions/string_object_coercion_internals.json
  116. +2 −1  questions/sum_things_up.json
  117. +2 −1  questions/symbol_identity_01.json
  118. +2 −1  questions/symbol_identity_02.json
  119. +2 −1  questions/symbol_identity_03.json
  120. +2 −1  questions/symbol_string_ids.json
  121. +2 −1  questions/symbols.json
  122. +1 −0  questions/the_cake.json
  123. +2 −1  questions/the_difference_between_and_operators.json
  124. +1 −0  questions/to_which_year_marty_mcfly_wants.json
  125. +2 −1  questions/trace_something_in_as3.json
  126. +2 −1  questions/typeof_arguments.json
  127. +2 −1  questions/unless_wtf.json
  128. +2 −1  questions/valid_function_expression.json
  129. +6 −1 questions/weakref.json
  130. +2 −1  questions/what_did_matz_say_about_ruby.json
  131. +2 −1  questions/what_do_array.json
  132. +2 −1  questions/what_do_string.json
  133. +2 −1  questions/what_does_gil_stands_for.json
  134. +2 −1  questions/what_does_negate_regexp_operator_do.json
  135. +3 −2 questions/what_is_a_mixin.json
  136. +1 −0  questions/what_is_a_traditional_vulcan_sa.json
  137. +2 −1  questions/what_s_4_2.json
  138. +6 −1 questions/what_s_typeof_null.json
  139. +2 −0  questions/when_life_gives_you_lemons.json
  140. +1 −0  questions/where_are_the_characters_of_daw.json
  141. +1 −0  questions/which_character_in_star_trek_se.json
  142. +2 −1  questions/who_created_jquery.json
  143. +2 −1  questions/who_is_the_first_character_to_b.json
  144. +2 −1  questions/yo_dawg.json
  145. +2 −1  questions/z-index_property.json
  146. +15 −5 schema/question.json
View
1  .rvmrc
@@ -0,0 +1 @@
+rvm use --create ruby-1.9.3-rc1-perf@nerdpursuit
View
2  README.markdown
@@ -13,7 +13,7 @@ Comment commits and pull requests or create a ticket.
Thanks to marcinbunsch, who created a commandline interface to create new
questions(he hates writing json). Start it with:
- ./creator [category]
+ ./creator [sub_category]
## Tech
View
141 creator
@@ -1,70 +1,73 @@
-#!/usr/bin/env ruby
-require 'rubygems'
-require 'bundler/setup'
-require 'json'
-
-category = ARGV.shift
-
-# Helper method, idea stolen from higline
-def ask(prompt)
- print prompt
- gets.chomp
-end
-
-# Helper method for exiting the program with a status code of 1 and a message
-def die(message)
- puts message
- exit 1
-end
-
-die("No category given! Run creator with ./creator [category]") if !category or category.empty?
-
-die("No such category. Create a '#{category}' folder in questions to add it.") if !File.exists?("questions/#{category}")
-
-question = ask("New question for #{category}: ")
-correct_answer = ask("Correct answer: ")
-
-# Get all wrong answers
-iterator = 0
-answers = [correct_answer]
-begin
- iterator += 1
- wrong_answer = ask("Wrong answer ##{iterator} (leave empty to continue): ")
- answers.push wrong_answer if wrong_answer != ''
-end while wrong_answer != '' and iterator < 3
-
-level = ask("Nerd level (1-5): ").to_i
-
-# Handle edge cases
-level = 5 if level > 5
-level = 1 if level < 1
-
-# Extract the creator from git
-creator = `git config --get user.name`.chomp
-
-# Shuffle the answers and find the index of the correct one
-answers.shuffle!
-correct_index = answers.index(correct_answer)
-
-# Construct the hash that will be converted to JSON
-data = {
- :category => category,
- :nerd_level => level,
- :text => question,
- :created_by => creator,
- :created_at => Time.now.strftime('%Y-%m-%d'),
- :right_answer => "a#{correct_index + 1}"
-}
-
-# Add the answers to the result hash
-answers.each_with_index do |answer, index|
- data["a#{index+1}"] = answer
-end
-
-json = JSON.pretty_generate({ :question => data })
-
-filename = question.downcase[0..30].gsub(/[^a-z0-9]+/i, '_').sub(/_+$/, '') + '.json'
-File.open("questions/#{category}/#{filename}", "w") do |file|
- file.write(json)
-end unless filename == '.json'
+#
+# TODO fix the creator
+#
+# #!/usr/bin/env ruby
+# require 'rubygems'
+# require 'bundler/setup'
+# require 'json'
+
+# category = ARGV.shift
+
+# # Helper method, idea stolen from higline
+# def ask(prompt)
+# print prompt
+# gets.chomp
+# end
+
+# # Helper method for exiting the program with a status code of 1 and a message
+# def die(message)
+# puts message
+# exit 1
+# end
+
+# die("No category given! Run creator with ./creator [category]") if !category or category.empty?
+
+# die("No such category. Create a '#{category}' folder in questions to add it.") if !File.exists?("questions/#{category}")
+
+# question = ask("New question for #{category}: ")
+# correct_answer = ask("Correct answer: ")
+
+# # Get all wrong answers
+# iterator = 0
+# answers = [correct_answer]
+# begin
+# iterator += 1
+# wrong_answer = ask("Wrong answer ##{iterator} (leave empty to continue): ")
+# answers.push wrong_answer if wrong_answer != ''
+# end while wrong_answer != '' and iterator < 3
+
+# level = ask("Nerd level (1-5): ").to_i
+
+# # Handle edge cases
+# level = 5 if level > 5
+# level = 1 if level < 1
+
+# # Extract the creator from git
+# creator = `git config --get user.name`.chomp
+
+# # Shuffle the answers and find the index of the correct one
+# answers.shuffle!
+# correct_index = answers.index(correct_answer)
+
+# # Construct the hash that will be converted to JSON
+# data = {
+# :category => category,
+# :nerd_level => level,
+# :text => question,
+# :created_by => creator,
+# :created_at => Time.now.strftime('%Y-%m-%d'),
+# :right_answer => "a#{correct_index + 1}"
+# }
+
+# # Add the answers to the result hash
+# answers.each_with_index do |answer, index|
+# data["a#{index+1}"] = answer
+# end
+
+# json = JSON.pretty_generate({ :question => data })
+
+# filename = question.downcase[0..30].gsub(/[^a-z0-9]+/i, '_').sub(/_+$/, '') + '.json'
+# File.open("questions/#{category}/#{filename}", "w") do |file|
+# file.write(json)
+# end unless filename == '.json'
View
3  questions/2_seconds.json
@@ -8,7 +8,8 @@
"a3": "Fixnum",
"created_at": "2011-06-15",
"a4": "Time",
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"right_answer": "a3",
"id": ""
}
View
3  questions/HTCPCP.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "http",
+ "sub_category": "http",
+ "category": "backend",
"nerd_level": 5,
"text":"What does the HTCPCP response 418 stand for?",
"a1": "Not acceptable",
View
7 questions/about_ruby.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text":"Who invented Ruby?",
"a1": "Yukihiro Matsumoto",
@@ -8,6 +9,8 @@
"a4": "Ransom E. Olds",
"right_answer":"a1",
"created_at": "2011-05-09",
- "created_by": "Koos"
+ "created_by": "Koos",
+ "created_by_github_name": "koos",
+ "created_by_twitter_name": "koos"
}
}
View
3  questions/absolute_superclass_1.8.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "What is the absolute superclass, the mother of all classes, in Ruby 1.8?",
"a1": "MotherClass",
View
3  questions/absolute_superclass_1.9.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "What is the return value of nil || 'a'?",
"a1": "true",
View
3  questions/active_record_base.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "From which class do all active record objects descend?",
"a1": "MySql",
View
3  questions/all_ur_base.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "memes",
+ "sub_category": "culture",
+ "category": "culture",
"nerd_level": 2,
"text":"Know your meme: Who said 'All your base are belong to us' originally?",
"a1": "Mechanic",
View
1  questions/answer_to_everything.json
@@ -1,4 +1,5 @@
{ "question" : {
+ "sub_category": "culture",
"category": "culture",
"nerd_level": 1,
"text":"What is the answer to the ultimate question of life, the universe, and everything?",
View
3  questions/array_all_but_the_first.json
@@ -6,7 +6,8 @@
"a2": "ary[1..-1]",
"a3": "ary.size-1",
"a4": "ary[1...-1]",
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"right_answer": "a2",
"created_by": "Georg Leciejewski",
"created_at": "2011-06-23",
View
3  questions/array_all_but_the_first_and_last .json
@@ -6,7 +6,8 @@
"a2": "ary.pop",
"a3": "ary[1...-1]",
"a4": "ary.size-2",
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"right_answer": "a1",
"created_by": "Georg Leciejewski",
"created_at": "2011-06-23",
View
3  questions/array_all_but_the_last.json
@@ -6,7 +6,8 @@
"a2": "ary.pop",
"a3": "ary.size-1",
"a4": "ary[0...-1]",
- "category": "ruby",
+ "category": "backend",
+ "sub_category": "ruby",
"right_answer": "a4",
"created_by": "Georg Leciejewski",
"created_at": "2011-06-20",
View
3  questions/array_ampersand.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "What's the output of [1, 2, 3] & [3, 4, 5]?",
"a1": "[1, 2, 4, 5]",
View
3  questions/array_get_and remove_first_element.json
@@ -6,7 +6,8 @@
"a2": "[1,2,3].shift",
"a3": "[1,2,3].first",
"a4": "[1,2,3].index(1)",
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"right_answer": "a2",
"created_by": "Georg Leciejewski",
"created_at": "2011-06-23",
View
3  questions/array_get_and remove_last_element.json
@@ -6,7 +6,8 @@
"a2": "[1,2,3].last",
"a3": "[1,2,3].shift",
"a4": "[1,2,3].index(3)",
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"right_answer": "a1",
"created_by": "Georg Leciejewski",
"created_at": "2011-06-23",
View
3  questions/array_pipe.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "What's the output of [1, 2, 3] | [3, 4, 5]?",
"a1": "[1, 2, 4, 5]",
View
3  questions/array_splat.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "What is the correct way to pass [arg1, arg2] as an argument to User.send(:my_method)?",
"a1": "User.send(:my_method, a)",
View
3  questions/array_to_csv_string.json
@@ -6,7 +6,8 @@
"a2": "[1,2,3].collapse(',')",
"a3": "[1,2,3].join(',')",
"a4": "[1,2,3].glue.with(',')",
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"right_answer": "a3",
"created_by": "Georg Leciejewski",
"created_at": "2011-06-20",
View
3  questions/attribute_selectors.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "css",
+ "sub_category": "css",
+ "category": "frontend",
"nerd_level": 4,
"text":"How would you style all links to PDF files via CSS?",
"a1": "[href*=.pdf]",
View
3  questions/background_image.json
@@ -1,6 +1,7 @@
{
"question": {
- "category": "css",
+ "sub_category": "css",
+ "category": "frontend",
"nerd_level": 3,
"text": "Why it's better to use <img.. /> tag instead of background whenever it's possible?",
"a1": "Easier to manage images in dev mode.",
View
3  questions/backticks_in_ruby.json
@@ -1,6 +1,7 @@
{
"question": {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"right_answer": "a3",
"nerd_level": 4,
"text": "Backticks ` in ruby",
View
3  questions/base_object.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "What is the absolute superclass in Ruby 1.9?",
"a1": "Super",
View
3  questions/best_language.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "culture",
"nerd_level": 1,
"text":"What is the best programing language ever?",
"a1": "C#",
View
3  questions/bitwise_and.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "What's the output of 5 & 2?",
"a1": "0",
View
3  questions/bitwise_or.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "What's the output of 5 | 2?",
"a1": "0",
View
3  questions/chrome_v8.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "javascript",
+ "sub_category": "javascript",
+ "category": "frontend",
"nerd_level": 1,
"text": "What is the name of the javascript engine in google chrome.",
"a1": "V8",
View
3  questions/class_inheritance.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "From how many classes can a ruby class directly descend/inherit.",
"a1": "three",
View
1  questions/club_mate_caffeine.json
@@ -1,4 +1,5 @@
{ "question" : {
+ "sub_category": "culture",
"category": "culture",
"nerd_level": 2,
"text":"How much caffeine does Club Mate contain (per 100ml)?",
View
3  questions/collect_alternative.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text":"Which method can be used instead of 'collect' ",
"a1": "scan",
View
7 questions/comparsion.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 2,
"text": "What is the result of 'a' == ('b' || 'a')",
"a1": "a",
@@ -8,6 +9,8 @@
"a4": "false",
"right_answer": "a4",
"created_at": "2011-06-08",
- "created_by": "koos"
+ "created_by": "koos",
+ "created_by_github_name": "koos",
+ "created_by_twitter_name": "koos"
}
}
View
3  questions/constants.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 2,
"text":"Which of the following will call the constant Bar from class Foo ?",
"a1": "Foo.Bar()",
View
3  questions/controller_action.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "rails",
+ "sub_category": "rails",
+ "category": "backend",
"nerd_level": 1,
"text":"How many controller actions are created when scaffolding a model e.g. rails generate scaffold User name:string ?",
"a1": "6",
View
3  questions/date_format_month.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 2,
"text": "Which placeholder in date formatting renders the full month name",
"a1": "%B",
View
7 questions/divmod.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 3,
"text": "What is the output of 13456.divmod(100)[0]?",
"a1": "1345",
@@ -8,6 +9,8 @@
"a4": "56",
"right_answer": "a2",
"created_at": "2011-06-08",
- "created_by": "koos"
+ "created_by": "koos",
+ "created_by_github_name": "koos",
+ "created_by_twitter_name": "koos"
}
}
View
3  questions/emails.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "regex",
+ "sub_category": "regex",
+ "category": "backend",
"nerd_level": 5,
"text": "Which one works as email validator?",
"a1": "/[\w.!\$%+-].@[\w-]+(?\.[\w-]+)+/",
View
3  questions/enumerable.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "Which module is included in Hash and Array to faciliate traversal and searching.",
"a1": "Searchable",
View
4 questions/equality.json
@@ -1,10 +1,12 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text":"If val = 42 which of the following will produce false",
"a1": "val.eql?(42.0)",
"a2": "val.equal?(42)",
"a3": "val == 42.0",
+ "a4": "0 == 0",
"right_answer":"a1",
"created_at": "2011-06-06",
"created_by": "juliancheal"
View
3  questions/falsy.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "Which of these are the only falsy entities in Ruby?",
"a1": "0, false, and nil",
View
3  questions/fastes_sorting_algorithm.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "algorithms",
+ "sub_category": "algorithms",
+ "category": "backend",
"nerd_level": 3,
"text":"Which one is the fastest sorting algorithm?",
"a1": "Selection Sort",
View
3  questions/fizzbuzz.json
@@ -8,7 +8,8 @@
"a4": "All of the above",
"created_by": "Mike Poltyn",
"created_at": "2011-06-15",
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"right_answer": "a3",
"id": ""
}
View
3  questions/float_left.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "css",
+ "sub_category": "css",
+ "category": "frontend",
"nerd_level": 4,
"text":"How to remove the gaps between <li> elements that have been set to display: inline-block?",
"a1": "width: 100%",
View
3  questions/folders.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "rails",
+ "sub_category": "rails",
+ "category": "backend",
"nerd_level": 2,
"text":"How many top-level folders are created in a new Ruby on Rails 3.0 app e.g.: rails new blog ?",
"a1": "10",
View
3  questions/fps.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "flash",
+ "sub_category": "flash",
+ "category": "frontend",
"nerd_level": 1,
"text":"The default setting for frames per second in flash is?",
"a1": "8 fps",
View
3  questions/fun_with_brackets.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "javascript",
+ "sub_category": "javascript",
+ "category": "backend",
"nerd_level": 5,
"text": "Which of this expressions has value 11?",
"a1": "+[++[+[]][+[]]+[]+[++[+[]][+[]]]]",
View
3  questions/garbarge_collector_in_19.json
@@ -7,7 +7,8 @@
"a3": "Mark and sweep",
"a4": "Memory is managed by a programmer",
"right_answer": "a3",
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"created_by": "Michał Łomnicki",
"created_at": "2011-09-08"
}
View
3  questions/global_variable_character.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 2,
"text":"What character is used to denote a Global Variable?",
"a1": "VAR",
View
3  questions/half_a_byte.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "data",
+ "sub_category": "data",
+ "category": "backend",
"nerd_level": 2,
"text": "What is the name for half a byte?",
"a1": "a Nibble",
View
3  questions/hash_with_indifferent_access.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "Which hash can be accessed by string and symbolized keys",
"a1": "Any ruby hash",
View
3  questions/hexadecimal_code.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "css",
+ "sub_category": "css",
+ "category": "frontend",
"nerd_level": 2,
"text":"What is the hexadecimal code for red?",
"a1": "ff0000",
View
3  questions/how_can_you_access_the_data_pas.json
@@ -8,7 +8,8 @@
"a3": "function (data) { data.state }",
"a4": "function (data) { data }",
"created_at": "2011-06-14",
- "category": "javascript",
+ "sub_category": "javascript",
+ "category": "backend",
"right_answer": "a3",
"id": ""
}
View
3  questions/how_do_you_specify_html5_doctyp.json
@@ -1,6 +1,7 @@
{
"question": {
- "category": "html",
+ "category": "frontend",
+ "sub_category": "html",
"nerd_level": 2,
"text": "How do you specify HTML5 doctype?",
"created_by": "Philipp Brumm",
View
3  questions/how_do_you_use_multiple_box_sha.json
@@ -1,6 +1,7 @@
{
"question": {
- "category": "css",
+ "category": "frontend",
+ "sub_category": "css",
"nerd_level": 1,
"text": "How do you use multiple box-shadows?",
"created_by": "Philipp Brumm",
View
3  questions/how_is_ruby_licensed.json
@@ -1,7 +1,8 @@
{
"question": {
"nerd_level": 1,
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "culture",
"text": "How is Ruby licensed?",
"a1": "Microsoft EULA",
"a2": "PHP License",
View
3  questions/how_many_gems.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "culture",
"nerd_level": 2,
"text":"How many gems can you download at Rubygems.org on June 2011?",
"a1": "ca 15000",
View
3  questions/img_tag.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "html",
+ "sub_category": "html",
+ "category": "frontend",
"nerd_level": 1,
"text":"Which attribute can not be forgotten for the <img ../> tag?",
"a1": "title",
View
7 questions/instance_exec.json
@@ -1,8 +1,13 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 3,
"text":"What's the name of the method, which has the same behaviour as instance_eval but allows passing arguments?",
"a1": "instance_exec",
+ "a2": "exec_instance",
+ "a3": "exe_win_32.dll",
+ "a4": "send",
+ "right_answer":"a1",
"created_at": "2011-06-06",
"created_by": "mkorfmann"
}
View
7 questions/invited-php.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "php",
+ "sub_category": "php",
+ "category": "culture",
"nerd_level": 1,
"text":"When php was invented?",
"a1": "2001",
@@ -8,6 +9,8 @@
"a4": "1999",
"right_answer":"a3",
"created_at": "2011-07-16",
- "created_by": "Koos"
+ "created_by": "Koos",
+ "created_by_github_name": "koos",
+ "created_by_twitter_name": "koos"
}
}
View
3  questions/jquery_sizzle.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "javascript",
+ "sub_category": "javascript",
+ "category": "backend",
"nerd_level": 1,
"text": "What is the name of the css selector engine in jQuery.",
"a1": "hot-css",
View
3  questions/json.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "javascript",
+ "sub_category": "javascript",
+ "category": "backend",
"nerd_level": 4,
"text":"Which one is correct JSON?",
"a1": "\"name\" : 'Answer'",
View
3  questions/jsonp.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "javascript",
+ "sub_category": "javascript",
+ "category": "backend",
"nerd_level": 4,
"text":"What does \"jsonp=?\" or similar statements do?",
"a1": "Treat the incoming JSON data as JSONP",
View
7 questions/kanji_converter.json
@@ -1,8 +1,13 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 5,
"text": "Which Ruby module can be used to convert Kanji into UTF-8",
"a1": "NKF",
+ "a2": "KFT",
+ "a3": "PHP",
+ "a4": "ROR",
+ "right_answer": "a1",
"created_at": "2011-06-06",
"created_by": "juliancheal"
}
View
7 questions/kernel-sprintf-2.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 3,
"text": "What's the output of '%-020s' % 'dude is here'?",
"a1": "dude is here",
@@ -8,6 +9,8 @@
"a4": "dude is",
"right_answer": "a2",
"created_at": "2011-06-08",
- "created_by": "koos"
+ "created_by": "koos",
+ "created_by_github_name": "koos",
+ "created_by_twitter_name": "koos"
}
}
View
7 questions/kernel-sprintf.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 3,
"text": "What's the output of '%02i' % 0?",
"a1": "00",
@@ -8,6 +9,8 @@
"a4": "an error",
"right_answer": "a1",
"created_at": "2011-06-08",
- "created_by": "koos"
+ "created_by": "koos",
+ "created_by_github_name": "koos",
+ "created_by_twitter_name": "koos"
}
}
View
3  questions/kernel.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 2,
"text": "What is Kernel?",
"a1": "The thing holding your OS together, sometimes a bit panicky.",
View
4 questions/last_cmd_sub.json
@@ -1,10 +1,12 @@
{ "question" : {
- "category": "bash",
+ "sub_category": "bash",
+ "category": "backend",
"nerd_level": 2,
"text":"How to call the last command after substituting some text?",
"a1": "^old_substring^new_substring^",
"a2": "/old_substring/new_substring/",
"a3": "sbl 'old_substring/new_substring'",
+ "a4": "subl 'old_substring/new_substring'",
"right_answer": "a1",
"created_at": "2011-06-06",
"created_by": "mkorfmann"
View
3  questions/last_directory.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "bash",
+ "sub_category": "bash",
+ "category": "backend",
"nerd_level": 3,
"text": "How to switch back to the previous directory?",
"a1": "cd ...",
View
3  questions/lazy.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "regex",
+ "sub_category": "regex",
+ "category": "backend",
"nerd_level": 3,
"text": "Which regex will capture everything between the first pair of square brackets: '[a,b,c][1]'",
"a1": "/\[(.*)\]/",
View
3  questions/map_parseInt.json
@@ -1,6 +1,7 @@
{
"question": {
- "category": "javascript",
+ "sub_category": "javascript",
+ "category": "backend",
"nerd_level": 2,
"text": "What does `['3','2','1','0'].map(parseInt)` evaluate to?",
"created_by": "Tim Becker",
View
7 questions/matz.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "culture",
"nerd_level": 1,
"text":"When Matz joined Heruku?",
"a1": "12th June 2008",
@@ -8,6 +9,8 @@
"a4": "12th June 2010",
"right_answer":"a3",
"created_at": "2011-07-16",
- "created_by": "Koos"
+ "created_by": "Koos",
+ "created_by_github_name": "koos",
+ "created_by_twitter_name": "koos"
}
}
View
3  questions/media.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "css",
+ "sub_category": "css",
+ "category": "frontend",
"nerd_level": 3,
"text":"What would you use to write device- or screen-size specific css?",
"a1": "Javascript",
View
3  questions/method_used_for_comparisions.json
@@ -1,7 +1,8 @@
{
"question": {
"nerd_level": 2,
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"text": "Which method is used for comparisions in case ... when statement?",
"a1": "==",
"a2": "===",
View
3  questions/min_max_quantifier.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "regex",
+ "sub_category": "regex",
+ "category": "backend",
"nerd_level": 2,
"text": "Which regex will match 'blaaa' with the number of 'a' ' s at the end ranging from 2 to 5",
"a1": "bla{2..5}",
View
3  questions/mixins_are_what.json
@@ -1,6 +1,7 @@
{
"question": {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"right_answer": "a1",
"nerd_level": 3,
"text": "Mixins are an example of what design pattern?",
View
3  questions/mutable_data_type.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "python",
+ "sub_category": "python",
+ "category": "backend",
"nerd_level": 2,
"text": "Which of the following data types are mutable?",
"a1": "str",
View
3  questions/negative_look_ahead.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "regex",
+ "sub_category": "regex",
+ "category": "backend",
"nerd_level": 3,
"text": "Which regex will match 'foobaz' and 'fooboz' but not 'foobar'",
"a1": "/foo[^bar]/",
View
7 questions/new_database.json
@@ -1,8 +1,13 @@
{ "question" : {
- "category": "couchdb",
+ "sub_category": "couchdb",
+ "category": "backend",
"nerd_level": 2,
"text":"How to create a couchdb collection called 'nerds' with curl",
"a1": "curl -X PUT http://localhost:5984/nerds",
+ "a2": "curl -X HEAD http://localhost:5984/nerds",
+ "a3": "curl -X GET http://localhost:5984/nerds",
+ "a4": "curl -X DELETE http://localhost:5984/nerds",
+ "right_answer": "a1",
"created_at": "2011-06-21",
"created_by": "kangguru"
}
View
3  questions/new_lambda_calling_syntax.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 3,
"text":"How to call a lambda, assigned to a variable named foo in ruby 1.9?",
"a1": "foo()",
View
3  questions/new_lambda_constructing_syntax.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 3,
"text":"What is the new literal for constructing lambda's in ruby 1.9?",
"a1": "l()",
View
3  questions/nil.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text":"What does nil.nil? return?",
"a1": "true",
View
3  questions/nil_id.json
@@ -1,6 +1,7 @@
{
"question": {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"right_answer": "a3",
"nerd_level": 5,
"text": "What is the result of nil.id ?",
View
7 questions/nilclass.json
@@ -1,8 +1,13 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text":"How many instances does NilClass have?",
"a1": "1",
+ "a2": "2",
+ "a3": "5",
+ "a4": "8",
+ "right_answer":"a1",
"created_at": "2011-06-07",
"created_by": "Paul"
}
View
3  questions/nodetype_of_text_node.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "javascript",
+ "sub_category": "javascript",
+ "category": "backend",
"nerd_level": 3,
"text": "What's the nodeType value of text nodes?",
"a1": "1",
View
3  questions/numeric_types.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text":"Which of the following is of type Bignum?",
"a1": "0.1234567890987654321",
View
1  questions/ook_ook.json
@@ -1,5 +1,6 @@
{
"question": {
+ "sub_category": "culture",
"category": "culture",
"nerd_level": 5,
"text": "Ook. Ook?",
View
3  questions/optional_html_tags.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "html",
+ "sub_category": "html",
+ "category": "frontend",
"nerd_level": 2,
"text":"Which one of these tags is not specified as optional according to the HTML 4.01 Strict DTD?",
"a1": "<html>",
View
3  questions/pluralize_person.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "rails",
+ "sub_category": "rails",
+ "category": "backend",
"nerd_level": 3,
"text": "What's the output of pluralize(2, 'person') ?",
"a1": "personperson",
View
3  questions/png.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "grafix",
+ "sub_category": "grafix",
+ "category": "design",
"nerd_level": 1,
"text": "What are the advantages of PNGs?",
"a1": "alpha-channel and lossless compression",
View
3  questions/position_fixed_support.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "css",
+ "sub_category": "css",
+ "category": "frontend",
"nerd_level": 2,
"text":"Which of the following browsers does not support css position:fixed?",
"a1": "Firefox 4",
View
3  questions/position_property.json
@@ -1,6 +1,7 @@
{
"question": {
- "category": "css",
+ "sub_category": "css",
+ "category": "frontend",
"nerd_level": 2,
"text": "What is the right property for attribute 'position' to have the element always in the relative position to the browser frames even if page is scrolled?",
"a1": "stable",
View
3  questions/prediction_gates.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "nerdism",
+ "sub_category": "culture",
+ "category": "culture",
"nerd_level": 2,
"text":"Which totally true prediction comes from Bill Gates in 2004",
"a1": "Computers in the future may weigh no more than 1.5 tons",
View
4 questions/prefix_last_command.json
@@ -1,10 +1,12 @@
{ "question" : {
- "category": "bash",
+ "sub_category": "bash",
+ "category": "backend",
"nerd_level": 2,
"text":"How to prefix the last command with for example 'sudo'?",
"a1": "sudo ^",
"a2": "sudo $LAST_COMMAND",
"a3": "sudo !!",
+ "a4": "su -",
"right_answer": "a3",
"created_at": "2011-06-06",
"created_by": "mkorfmann"
View
7 questions/prime.json
@@ -1,8 +1,13 @@
{ "question" : {
- "category": "regex",
+ "sub_category": "regex",
+ "category": "backend",
"nerd_level": 5,
"text": "This regex is normally used to determine if a number is not prime: /^1?$|^(1+?)\1+$/, but it is broken, how to fix it? The number has the format /1{number}/.",
"a1": "/^1?$|^(11+?)\1+$/",
+ "a2": "/^1?$|^(21+?)\1+$/",
+ "a3": "/^1?$|^(31+?)\1+$/",
+ "a4": "/^1?$|^(41+?)\1+$/",
+ "right_answer": "a1",
"created_at": "2011-06-07",
"created_by": "mkorfmann"
}
View
4 questions/private_method_in_ruby.json
@@ -1,11 +1,13 @@
{
"question": {
"nerd_level": 4,
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"text": "A private method in Ruby ...",
"a1": "May be called only on explicit self receiver",
"a2": "May be called on any receiver",
"a3": "May be called only on implicit self receiver",
+ "a4": "May not be called at all",
"right_answer": "a3",
"created_at": "2011-09-08",
"created_by": "Michał Łomnicki"
View
3  questions/protected_method_in_ruby.json
@@ -1,7 +1,8 @@
{
"question": {
"nerd_level": 2,
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"text": "A protected method in ruby ...",
"a1": "is just a syntactic sugar",
"a2": "may be called only on an explicit self receiver",
View
3  questions/ps_save_for_web.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "grafix",
+ "sub_category": "grafix",
+ "category": "design",
"nerd_level": 1,
"text": "What is the photoshop shortcut to save a web-optimized version of an image (Win/Mac)",
"a1": "Ctrl-S",
View
7 questions/quo.json
@@ -1,8 +1,13 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 2,
"text": "What will 1.quo(2) return",
"a1": "1/2",
+ "a2": "1/4",
+ "a3": "1/8",
+ "a4": "1/1",
+ "right_answer": "a1",
"created_at": "2011-06-06",
"created_by": "juliancheal"
}
View
3  questions/rails_first_shown.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "rails",
+ "sub_category": "rails",
+ "category": "backend",
"nerd_level": 1,
"text":"When was Rails first shown to the public?",
"a1": "2003",
View
1  questions/rails_inventor.json
@@ -1,4 +1,5 @@
{ "question" : {
+ "sub_category": "culture",
"category": "culture",
"nerd_level": 1,
"text":"Who invented Ruby on Rails?",
View
3  questions/rake_about.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "rails",
+ "sub_category": "rails",
+ "category": "backend",
"nerd_level": 2,
"text":"What does rake about do?",
"a1": "Shows the README of the rails app",
View
3  questions/ranges_three_dots.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "What's the output of (1...5).to_a?",
"a1": "NoMethodError",
View
3  questions/release_date.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "css",
+ "sub_category": "css",
+ "category": "frontend",
"nerd_level": 1,
"text":"When was the release date of CSS1?",
"a1": "1994",
View
3  questions/return_value_or.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "What is the return value of nil || 'a' ?",
"a1": "true",
View
3  questions/roses.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "css",
+ "sub_category": "css",
+ "category": "frontend",
"nerd_level": 3,
"text":"Roses are #FF0000, violets are?",
"a1": "#F0F0F0",
View
7 questions/rspec_controller_render_views.json
@@ -1,8 +1,13 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 3,
"text": "Which command makes a rails controller spec also render the views?",
"a1": "render_views",
+ "a2": "views_render",
+ "a3": "render_json",
+ "a4": "soap-xml",
+ "right_answer": "a1",
"created_at": "2011-05-14",
"created_by": "Schorsch"
}
View
3  questions/run_time_of_bst.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "algorithms",
+ "sub_category": "algorithms",
+ "category": "backend",
"nerd_level": 2,
"text": "What's the average run time of a search in a Binary Search Tree?",
"a1": "O(n)",
View
3  questions/same_origin_policy.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "javascript",
+ "sub_category": "javascript",
+ "category": "backend",
"nerd_level": 4,
"text":"Why can't you just request files from external servers via XMLHttpRequest in a web-browser?",
"a1": "XSS",
View
3  questions/screen_image_resolution.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "grafix",
+ "sub_category": "grafix",
+ "category": "design",
"nerd_level": 1,
"text": "Which image resolution should be used for screen layouts/images?",
"a1": "150",
View
3  questions/simple_format.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "rails",
+ "sub_category": "rails",
+ "category": "frontend",
"nerd_level": 2,
"text": "Which one produces invalid HTML?",
"a1": "<p><%= auto_link(text) %></p>",
View
3  questions/spaceship_operator.json
@@ -1,6 +1,7 @@
{
"question": {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"right_answer": "a2",
"nerd_level": 4,
"text": "What is the spaceship operator?",
View
3  questions/square_numbers_in_list.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "python",
+ "sub_category": "python",
+ "category": "backend",
"nerd_level": 2,
"text": "Which one of these statements squares all the numbers in the list l?",
"a1": "l.sq_each()",
View
3  questions/strict_doctype.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "html",
+ "sub_category": "html",
+ "category": "frontend",
"nerd_level": 2,
"text":"Attribute that is not allowed in Strict DOCTYPE",
"a1": "bgcolor",
View
3  questions/string_clean_whitespace.json
@@ -6,7 +6,8 @@
"a2": "str.spit",
"a3": "str.split",
"a4": "str.strip",
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"right_answer": "a4",
"created_by": "Georg Leciejewski",
"created_at": "2011-06-27",
View
3  questions/string_object_coercion_internals.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "javascript",
+ "sub_category": "javascript",
+ "category": "backend",
"nerd_level": 4,
"text": "Which of these methods is an object run through first on type coercion with a string?",
"a1": "toString",
View
3  questions/sum_things_up.json
@@ -1,6 +1,7 @@
{
"question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text":"Which one will sum up an array of numbers?",
"a1": "[1,2,3].sum",
View
3  questions/symbol_identity_01.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "What are the outputs for a == b and a.equal?(b) with a = 'xy' and b = a?",
"a1": "true and false",
View
3  questions/symbol_identity_02.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "What are the outputs for a == b and a.equal?(b) with a = 'xy' and b = 'xy'?",
"a1": "true and false",
View
3  questions/symbol_identity_03.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "What are the outputs for a == b and a.equal?(b) with a = :xy and b = :xy?",
"a1": "true and false",
View
3  questions/symbol_string_ids.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "Where is a.id == b.id?",
"a1": "a = 'xy'; b = 'xy'",
View
3  questions/symbols.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text": "What are Ruby symbols?",
"a1": "Hash Keys.",
View
1  questions/the_cake.json
@@ -8,6 +8,7 @@
"a3": "was crushed by a giant robot",
"created_at": "2011-06-15",
"a4": "is a lie",
+ "sub_category": "culture",
"category": "culture",
"right_answer": "a4",
"id": ""
View
3  questions/the_difference_between_and_operators.json
@@ -9,6 +9,7 @@
"right_answer": "a3",
"created_by": "Michał Łomnicki",
"created_at": "2011-09-08",
- "category": "ruby"
+ "sub_category": "ruby",
+ "category": "backend"
}
}
View
1  questions/to_which_year_marty_mcfly_wants.json
@@ -8,6 +8,7 @@
"a3": "1885",
"created_at": "2011-06-14",
"a4": "1985",
+ "sub_category": "culture",
"category": "culture",
"right_answer": "a4",
"id": ""
View
3  questions/trace_something_in_as3.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "flash",
+ "sub_category": "flash",
+ "category": "backend",
"nerd_level": 1,
"text":"Which action script 3 command will print 'hello world' in the flash console?",
"a1": "print('hello world')",
View
3  questions/typeof_arguments.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "javascript",
+ "sub_category": "javascript",
+ "category": "backend",
"nerd_level": 3,
"text": "Whats the value of (function() { return typeof arguments; })()?",
"a1": "array",
View
3  questions/unless_wtf.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 1,
"text":"(1..4).reverse_each {|i| puts i unless i.equal?(i**i) } # Which of the following will not be printed?",
"a1": "1",
View
3  questions/valid_function_expression.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "javascript",
+ "sub_category": "javascript",
+ "category": "backend",
"nerd_level": 4,
"text": "Which of these Immediately-Invoked Function Expressions won't give you a NERD-ALERT?",
"a1": "~function(){ alert('NERD'); }();",
View
7 questions/weakref.json
@@ -1,8 +1,13 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 4,
"text": "Which library lets Ruby garbage collect an object, that is still being referenced",
"a1": "Weakref",
+ "a2": "Ref",
+ "a3": "Heap",
+ "a4": "Malloc",
+ "right_answer": "a1",
"created_at": "2011-06-06",
"created_by": "juliancheal"
}
View
3  questions/what_did_matz_say_about_ruby.json
@@ -1,7 +1,8 @@
{
"question": {
"nerd_level": 1,
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"text": "What did Matz say about Ruby?",
"a1": "It should be abandoned because PHP 5.3 is damn good",
"a2": "It was created to implement JAVA",
View
3  questions/what_do_array.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 2,
"text":"What is the result of [1,2,3] * 3?",
"a1": "[[1,2,3], [1,2,3], [1,2,3]]",
View
3  questions/what_do_string.json
@@ -1,5 +1,6 @@
{ "question" : {
- "category": "ruby",
+ "sub_category": "ruby",
+ "category": "backend",
"nerd_level": 2,
"text":"What is the result of \"hello\".tr_s('l','r')?",
"a1": "hero",
View
3  questions/what_does_gil_stands_for.json