To do
I was not expecting to start a blog today, but after reading some other blogs from people that have already pass through MA (i.e @Hamza or @Amy), I decided to create my own. I am one of the students of Ronin, the online version of the course that MA propose for becoming a Junior Web developer in 16 weeks. Yes, I know, you might be thinking that is too short, that is impossible to learn to code “as a pro” in almost 4 months. Well, let me tell you that the agenda of the course and the workload seem a real challenge.
Topics to prepare
- RSpec
- RegExp
- DataMapper
- JavaScriptBelow you can see a piece of code. The purpose was testing how to paste some preformatted text in WordPress keeping the indentation and the highlighted text.
class OmajulNumerals ROMAN_NUMERALS = { 1 => "I", 4 => "IV", 5 => "V", 9 => "IX", 10 => "X", 40 => "XL", 50 => "L", 90 => "XC", 100 => "C", 400 => "CD", 500 => "D", 900 => "CM",1000 => "M" } ROMAN_NUMERALS = ROMAN_NUMERALS.sort.reverse.to_h def self.convert(number) roman_numeral = "" ROMAN_NUMERALS.each do |k,v| (number / k).times do roman_numeral << v number -= k end end roman_numeral end end
Et voilà, the code is now as I expected. Special thanks to ToHTML.