<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by yhyow on Medium]]></title>
        <description><![CDATA[Stories by yhyow on Medium]]></description>
        <link>https://medium.com/@deusclovis?source=rss-295c01c54df3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*aK1hLdsoR0mO5-jO.jpeg</url>
            <title>Stories by yhyow on Medium</title>
            <link>https://medium.com/@deusclovis?source=rss-295c01c54df3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 15:16:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@deusclovis/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Extremely stupid ways to do a join]]></title>
            <link>https://medium.com/@deusclovis/extremely-stupid-ways-to-do-a-join-63b71464a1ab?source=rss-295c01c54df3------2</link>
            <guid isPermaLink="false">https://medium.com/p/63b71464a1ab</guid>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[yhyow]]></dc:creator>
            <pubDate>Mon, 01 Feb 2016 14:03:55 GMT</pubDate>
            <atom:updated>2016-02-01T14:04:29.812Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>Whut??</li></ol><pre>def format(path)<br> arrows = []<br> (path.size-1).times { arrows &lt;&lt; ‘ --&gt;‘ }<br> path.zip(arrows).compact.join<br>end</pre><p>2. Mega-whut?</p><pre>def format(path,n)<br> n &gt; 1 ? format_2(path,n-1) + “ --&gt;#{path[n-1]}” : “#{path[n-1]}”<br>end</pre><p>3. Ah, that’s better</p><pre>def format(path)<br> path.map(&amp;:to_s).join(‘ --&gt;’)<br>end</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63b71464a1ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing Ruby’s each, map, reduce, min, max, find, filter, swap in Javascript for Fun]]></title>
            <link>https://medium.com/@deusclovis/implementing-ruby-s-each-map-reduce-min-max-in-javascript-6c6649f48d5e?source=rss-295c01c54df3------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c6649f48d5e</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[es6]]></category>
            <dc:creator><![CDATA[yhyow]]></dc:creator>
            <pubDate>Fri, 27 Nov 2015 04:24:30 GMT</pubDate>
            <atom:updated>2016-05-25T07:54:38.879Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>each — Let’s implement Ruby’s each in Javascript. In Ruby, each returns self so we shall do the same here and return arr. The function takes an array as an argument, and a function which is called inside each’s iterative loops. (We should check for hasOwnProperty(), but that’s not the purpose here, so we shall skip those). At the end, arr is returned, and return values of each loop are discarded, unless you store them somewhere.</li></ol><pre>function each(arr,fn) {<br> for (var i in arr) {<br>  console.log( fn(arr[i]) );<br> }<br> return arr;<br>};<br>console.log(each([1,2,3,4,5],function(a) {<br> return a-1;<br>}));<br>//Output=&gt;<br>//0<br>//1<br>//2<br>//3<br>//4<br>//[1,2,3,4,5]</pre><p>2. map — almost like each, but returns your results in a new array. Like each, the return value of each iteration depends on the function you pass in. At each iterative loop, we push the return value into the res array, which is returned at the end. If the return value is undefined, we ignore them.</p><pre>function map(arr,fn) {<br> var res = [];<br> for (var i in arr) {<br> if (fn(arr[i]) != undefined) {<br>  res.push( fn(arr[i]) );<br> }<br> }<br> return res;<br>}</pre><pre>//let&#39;s try it out!</pre><pre>var timesSelf = function(a) { return a*a; }</pre><pre>console.log(map([1,2,3,4,5,6],timesSelf));</pre><pre>//Output=&gt;[ 1, 4, 9, 16, 25, 36 ]</pre><pre>var expo3 = function(a) { return Math.pow(a,3); }</pre><pre>console.log(map([1,2,3,4,5,6],expo3));</pre><pre>//Output=&gt;[ 1, 8, 27, 64, 125, 216 ]</pre><p>Above, we pass in different anon. functions — timesSelf and expo3 to see how it works.</p><p>But we should be able to write map using each, instead of re-writing the for-in loop.</p><p>3. reduce — Let’s try reduce (or inject). reduce lets you keep a ‘running’ value, which is returned at the end. This is powerful, and you can write the min, max and other functions based on this idea. Our reduce takes three arguments — an array, an initial value to begin with, and a function.</p><p>If you pass in a negative number as the initial value, the starting value is the first element in the collection. Otherwise, the starting value is what you pass to start. Of course, if start is the first element of the array, then we should not iterate through the first element again! But we shall not deal with that here.</p><pre>function reduce(arr,start,fn) { <br> if (start &lt; 0) { <br>  var acc = arr[0];<br> } else {<br>  var acc = start;<br> }</pre><pre> for (var i in arr) {<br>  acc = fn( acc,arr[i] );<br> }<br> return acc;<br>}</pre><p>You see that acc stores the running value we are interested in, and after each iteration, acc is updated. At the end of the iteration, acc is returned. Normally, you are able to pass in arrays and objects as the initial value, and use it kind of like map.</p><p>4. sum — takes an array as an argument, and sums up the elements. Let’s use reduce to do this. Remember what acc does in reduce: acc is simply running value, so we can use it to store the running summations as we iterate through the array.</p><pre>function sum(arr) {<br> return reduce(arr,0,function(a,b) { return a + b; } );<br>}</pre><pre>console.log(sum([1,2,3]));</pre><pre>Output=&gt;6</pre><p>The crucial thing here is the function you pass into reduce which determines the return value to be stored in the running value acc as we iterate through the array. The function you pass into reduce takes two arguments — the first is the running value, and the second is the next element in the array.</p><p>No surprises what happens when you add each value in the array to the running value. The final running value ends up being the summation of the array!</p><p>5. min — You can implement min using reduce too. Keeping a running value is really helpful. acc does not need to keep a running summation. You can simply use it to store a value which depends on a check in the function you pass into reduce. Let’s see how:</p><pre>function min(arr) {<br> return reduce(arr,-1,function(a,b) { <br> if (b &lt; a) {<br>  return b;<br> } else {<br>  return a;<br> }<br> } );<br>}<br>console.log(min([3,2,1]));</pre><pre>Output=&gt; 1</pre><p>We pass in -1 as the initial value because we do not require one, and don’t want the value to be considered. The crucial thing here is the if-else block. In it, we check if the current value in the array is less than the current running value. If so, we return the current value in the array. As you can guess, acc in this case stores the current minimum value. You can guess how a function which returns the maximum value using reduce would look like!</p><p>6. join — we can use reduce to help us with this. First, we consider that a join is simply concatenating all items in a collection, albeit with something in between each pair. Sounds like something we can do with the map or reduce we came up with.</p><pre>var join = function(a, b) { return a+&quot;, &quot;+b };</pre><pre>reduce([1,2,3,4], -1, join);</pre><p>7. find — a function which takes an array and a search term s, and returns the element which matches your search term s. If no matches are found, null is returned. We use the map function to help us.</p><pre>function find(arr,s) {<br> var res = null;<br> map(arr,function(a) {<br> if (a == s) {<br>  res = a;<br> }<br> });<br> return res;<br>}<br>console.log(find([1,4,2,3,4,5,6],8));</pre><pre>Output=&gt; null</pre><pre>console.log(find([1,4,2,3,4,5,6],3));</pre><pre>Output=&gt; 3</pre><p>8. filter— let’s try to return all elements from an array which passes some test — for example, all even numbers in the array. To do this, we’ll use the map function we already have.</p><pre>function filter(arr) {<br> return map(arr,function(a) {<br> if (a % 2 == 0) {<br>  return a;<br> }<br> });<br>}</pre><pre>console.log(filter([1,2,3,4,5,6]));</pre><pre>Output=&gt; [2,4,6]</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c6649f48d5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scraping and Constructing an Email Newsletter using Ruby and Nokogiri]]></title>
            <link>https://medium.com/@deusclovis/scraping-and-constructing-an-email-newsletter-using-ruby-and-nokogiri-109ef27871b8?source=rss-295c01c54df3------2</link>
            <guid isPermaLink="false">https://medium.com/p/109ef27871b8</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[yhyow]]></dc:creator>
            <pubDate>Fri, 23 Oct 2015 09:12:02 GMT</pubDate>
            <atom:updated>2015-11-03T10:49:26.690Z</atom:updated>
            <content:encoded><![CDATA[<p>Here’s a little simple program to scrape content off URLs to build a HTML email newsletter using Ruby and the Nokogiri gem.</p><p>We require the necessary gems and files. ‘entries’ is where our input urls will be, inside a module. ‘constants’ will be where we put our user-agent string, bits of static HTML of the newsletter, and other stuff you want to keep separate from your logic.</p><pre>require ‘nokogiri’<br>require ‘open-uri’<br>require_relative ‘entries’<br>require_relative ‘constants’</pre><p>We build a base URL class with ‘name’ and ‘entries’ attributes. We will store the URL string itself in the ‘name’ instance variable, and initialise entries to an empty array, which will later be populated with scrapped data.</p><pre>class Url <br> attr_accessor :entries, :name<br> def initialize(name)<br> <a href="http://twitter.com/name">@name</a> = name<br> <a href="http://twitter.com/entries">@entries</a> = []<br> end<br>end</pre><p>Let’s now build out the different child classes for each different type of URL, where each type requires different treatment to scrap the required data. For my case, I need 5 child classes which inherit from our base URL class. You can argue there isn’t a huge need for the base URL class except to abstract out the attr_accessors. We call super in our child initialisers to do this.</p><pre>class Hp_url &lt; Url<br> def initialize(name)<br>  super<br> end<br> <br> def process<br>  doc = Nokogiri::HTML(open(name, ‘User-Agent’ =&gt;   Constants::USER_AGENT), nil, “UTF-8”)<br> <br> doc.xpath(“//h1”).each_with_index do |link,i|<br>  <a href="http://twitter.com/entries">@entries</a> &lt;&lt; link.text if i == 3 #conversations with …<br> end</pre><pre> doc.xpath(“//h4”).each_with_index do |link,i| #Intro<br>  <a href="http://twitter.com/entries">@entries</a> &lt;&lt; link.text if i == 1<br> end</pre><pre>doc.xpath(“//div[<a href="http://twitter.com/class">@class</a>=’full-banner-img hidden-xs’]/@style”).each_with_index do |link,i| #Image<br>  <a href="http://twitter.com/entries">@entries</a> &lt;&lt; link.to_s[23..-3] #image<br> end</pre><pre> doc.css(“.rotated-title”).each_with_index do |link,i|<br>  <a href="http://twitter.com/entries">@entries</a> &lt;&lt; link.text #cat<br> end</pre><pre><a href="http://twitter.com/entries"> @entries</a> &lt;&lt; name</pre><pre> puts ‘waiting …’<br> sleep 5<br> end<br> <br>end</pre><pre>class Trend_url &lt; Url<br> def initialize(name)<br>  super<br> end<br> <br> def process<br>  doc = Nokogiri::HTML(open(name, ‘User-Agent’ =&gt; Constants::USER_AGENT), nil, “UTF-8”)</pre><pre> doc.xpath(“//h1”).each_with_index do |link,i|<br>  <a href="http://twitter.com/entries">@entries</a> &lt;&lt; link.text if i == 2 #conversations with …<br> end</pre><pre> doc.xpath(“//h4”).each_with_index do |link,i| #Intro<br>  <a href="http://twitter.com/entries">@entries</a> &lt;&lt; link.text if i == 1<br> end</pre><pre> doc.xpath(“//img/@src”).each_with_index do |link,i| #Image<br>  <a href="http://twitter.com/entries">@entries</a> &lt;&lt; link if i == 54 #image<br> end</pre><pre> doc.css(“.rotated-title”).each_with_index do |link,i|<br>  <a href="http://twitter.com/entries">@entries</a> &lt;&lt; link.text #cat<br> end</pre><pre> entries &lt;&lt; name</pre><pre> puts ‘waiting …’<br> sleep 6<br> end<br> <br>end</pre><pre>class Story_url &lt; Url<br> def initialize(name)<br>  super<br> end<br> <br> def process<br>  doc = Nokogiri::HTML(open(name, ‘User-Agent’ =&gt; Constants::USER_AGENT), nil, “UTF-8”)</pre><pre> doc.xpath(“//h1”).each_with_index do |link,i|<br>  <a href="http://twitter.com/entries">@entries</a> &lt;&lt; link.text if i == 3 #title<br> end</pre><pre> doc.xpath(“//p”).each_with_index do |link,i|<br>  <a href="http://twitter.com/entries">@entries</a> &lt;&lt; link.text if i == 2 #content<br> end</pre><pre> doc.xpath(“//div[<a href="http://twitter.com/class">@class</a>=’banner’]/@style”).each_with_index do |link,i|<br>  <a href="http://twitter.com/entries">@entries</a> &lt;&lt; link.to_s[23..-3] #image<br> end</pre><pre> doc.xpath(“//h1/a”).each_with_index do |link,i|<br>  <a href="http://twitter.com/entries">@entries</a> &lt;&lt; link.text #cat<br> end</pre><pre><a href="http://twitter.com/entries"> @entries</a> &lt;&lt; name</pre><pre> puts ‘waiting …’<br> sleep 7<br> end<br> <br>end</pre><pre>class Bp_url &lt; Url<br> def initialize(name)<br>  super<br> end<br> <br> def process<br>  doc = Nokogiri::HTML(open(name, ‘User-Agent’ =&gt; Constants::USER_AGENT), nil, “UTF-8”)</pre><pre> doc.xpath(“//h1”).each_with_index do |link,i| #Intro<br>  <a href="http://twitter.com/entries">@entries</a> &lt;&lt; link.text if i == 3 #title<br> end</pre><pre><a href="http://twitter.com/entries"> @entries</a> &lt;&lt; name</pre><pre> puts ‘waiting …’<br>  sleep 6<br> end<br> <br>end</pre><pre>class Lc_url &lt; Url<br> def initialize(name)<br>  super<br> end<br> <br> def process<br>  doc = Nokogiri::HTML(open(name, ‘User-Agent’ =&gt; Constants::USER_AGENT), nil, “UTF-8”)</pre><pre> doc.xpath(“//h1”).each_with_index do |link,i| #Intro<br>  <a href="http://twitter.com/entries">@entries</a> &lt;&lt; link.text if i == 3 #title<br> end</pre><pre><a href="http://twitter.com/entries"> @entries</a> &lt;&lt; name</pre><pre> puts ‘waiting …’<br> sleep 8<br> end<br> <br>end</pre><p>The scrapping logic will not work for you as the child classes are specific to my use case.</p><p>Now that our ‘entries’ instance variables can be populated, let’s construct a DataLoader class (below) which will create the URL objects for us. We check if the inputs are empty before doing so.</p><p>We also intitialise a few arrays to store different varieties of data you need, depending on the design of your HTML newsletter. In my case, I need 3 different collections of them because we have 3 different bits of designs.</p><p>These data arrays are later iterated over to ‘clone’ the bits of HTML I need, which is done with the build_* methods which take the corresponding data as an argument.</p><pre>class DataLoader<br> <br> attr_accessor :story_data, :bp_data, :lc_data<br> def initialize<br>  @@url_instances = []<br>  <a href="http://twitter.com/story_data">@story_data</a> = []<br>  <a href="http://twitter.com/bp_data">@bp_data</a> = []<br>  <a href="http://twitter.com/lc_data">@lc_data</a> = []<br> <br>  if not URLS::HP_URLS.empty?<br>   URLS::HP_URLS.each{|url| @@url_instances &lt;&lt; Hp_url.new(url) }<br>  end<br> <br>  if not URLS::TREND_URLS.empty?<br>   URLS::TREND_URLS.each{|url| @@url_instances &lt;&lt; Trend_url.new(url) }<br>  end<br> <br>  if not URLS::STORY_URLS.empty?<br>   URLS::STORY_URLS.each{|url| @@url_instances &lt;&lt; Story_url.new(url) }<br>  end<br> <br>  if not URLS::BP_URLS.empty?<br>   URLS::BP_URLS.each{|url| @@url_instances &lt;&lt; Bp_url.new(url) }<br>  end<br> <br>  if not URLS::LC_URLS.empty?<br>   URLS::LC_URLS.each{|url| @@url_instances &lt;&lt; Lc_url.new(url) }<br>  end</pre><pre>   p @@url_instances<br>end<br> <br> def stage<br>  @@url_instances.each do |url_instance|</pre><pre>  # This populates entries for each url object with scrapped data</pre><pre>  url_instance.process<br> <br>  case url_instance.class.to_s<br>  when “Hp_url”<br>   <a href="http://twitter.com/story_data">@story_data</a> &lt;&lt; url_instance.entries<br>  when “Trend_url”<br>   <a href="http://twitter.com/story_data">@story_data</a> &lt;&lt; url_instance.entries<br>  when “Story_url”<br>   <a href="http://twitter.com/story_data">@story_data</a> &lt;&lt; url_instance.entries<br>  when “Bp_url”<br>   <a href="http://twitter.com/bp_data">@bp_data</a> &lt;&lt; url_instance.entries<br>  when “Lc_url”<br>   <a href="http://twitter.com/lc_data">@lc_data</a> &lt;&lt; url_instance.entries<br>  else<br>   raise “#{url_instance.class} is unknown to us.”<br>  end<br>  end<br> end</pre><pre> def build_lc(lc_data)<br>  story_snippets = “”<br>  lc_data.each do |entry|<br>  story_snippets &lt;&lt; %Q{<br>  &lt;div mc:edit=”lc_item”&gt;<br>  &lt;blockquote&gt;<br>  &lt;p&gt;&lt;a href=”#{entry[1]}”&gt;#{entry[0]}&lt;/a&gt;&lt;br&gt;<br>  &lt;span class=”red-texts”&gt;&lt;/span&gt; <br>  &lt;/p&gt;<br>  &lt;/blockquote&gt;<br>  &lt;/div&gt;<br>  }<br>  end<br>  story_snippets<br> end<br> <br> def build_bp(bp_data)<br>  story_snippets = “”<br>  bp_data.each do |entry|</pre><pre>  story_snippets &lt;&lt; %Q{<br>  &lt;div class=”company-info”&gt;<br>  &lt;blockquote&gt;<br>  &lt;p&gt;&lt;a href=”#{entry[1]}”&gt;#{entry[0]}&lt;/a&gt;&lt;br /&gt;<br>  &lt;span class=”blue-texts”&gt;&lt;/span&gt;&lt;br&gt;<br>  &lt;/p&gt;<br>  &lt;/blockquote&gt;<br>  &lt;/div&gt;<br> }<br>  end<br>  story_snippets<br> end<br> <br> def build_stories(story_data)<br>  story_snippets = “”<br>  story_data.each_with_index do |entry,i|<br>  if i == 0 <br>  <br>  story_snippets &lt;&lt; %Q{<br>  &lt;div id=”featured”&gt;<br>  &lt;div class=”full” mc:edit=”featured_article”&gt;&lt;a href=”#{entry[4]}”  target=”_blank”&gt;&lt;img class=”full” src=”#{entry[2]}”&gt;&lt;/a&gt;<br>  &lt;div class=”full-content”&gt; &lt;a href=”#{entry[4]}” target=”_blank” alt=””&gt;&lt;img class=”hnworth-logo”  src=””&gt;&lt;/a&gt;<br> &lt;h4&gt;#{entry[3]}&lt;/h4&gt;<br> &lt;h1&gt;&lt;a href=”#{entry[4]}” target=”_blank”&gt;#{entry[0]}&lt;/a&gt;&lt;/h1&gt;<br> &lt;p&gt;#{entry[1]}&lt;/p&gt;<br> &lt;/div&gt;<br> &lt;/div&gt;<br> &lt;/div&gt;<br> } <br>  else<br>  story_snippets &lt;&lt; %Q{<br>  &lt;div id=”featured”&gt;<br>  &lt;div class=”full” mc:edit=”featured_article”&gt;&lt;a href=”#{entry[4]}” target=”_blank”&gt;&lt;img class=”full” src=”#{entry[2]}”&gt;&lt;/a&gt;<br>  &lt;div class=”full-content”&gt; <br>  &lt;h4&gt;#{entry[3]}&lt;/h4&gt;<br>  &lt;h1&gt;&lt;a href=”#{entry[4]}” target=”_blank”&gt;#{entry[0]}&lt;/a&gt;&lt;/h1&gt;<br>  &lt;p&gt;#{entry[1]}&lt;/p&gt;<br>  &lt;/div&gt;<br>  &lt;/div&gt;<br>  &lt;/div&gt;<br> } <br>  end<br>  end<br>  story_snippets<br> end<br> <br>end</pre><p>Next, we put it all together with the Newsletter class, which instantiates the DataLoader class, which creates all the URL objects we need.</p><p>The stage instance method then passes the process method to each of the URL objects we have created stored in the @@url_instances class variable. This populates the entries instance variables. In the case statement, we populate the data arrays depending on what type of URL the caller is.</p><p>Next, we construct our Newsletter class, which ties everything up into a little bundle of joy. The build method spins up all the necessary URL objects by creating a new instance of the DataLoader class. Sending the stage method to it starts scraps and pigeonholes the data into the right array before it’s iterated over.</p><p>We append the bits of HTML into our html instance variable before creating the file.</p><pre>class Newsletter</pre><pre>attr_accessor :html, :file_name<br> def initialize<br> <a href="http://twitter.com/html">@html</a> = “”<br> <a href="http://twitter.com/file_name">@file_name</a> = “”<br> end<br> <br> def build<br>  puts Constants::INTRO_ART<br>  content = DataLoader.new<br>  content.stage<br>  <a href="http://twitter.com/html">@html</a> &lt;&lt; Constants::NEWSLETTER_INTRO<br>  <a href="http://twitter.com/html">@html</a> &lt;&lt; content.build_stories(content.story_data)<br>  <a href="http://twitter.com/html">@html</a> &lt;&lt; Constants::NEWSLETTER_STORY_END<br>  <a href="http://twitter.com/html">@html</a> &lt;&lt; content.build_bp(content.bp_data)<br>  <a href="http://twitter.com/html">@html</a> &lt;&lt; Constants::NEWSLETTER_BP_END<br>  <a href="http://twitter.com/html">@html</a> &lt;&lt; content.build_lc(content.lc_data)<br>  <a href="http://twitter.com/html">@html</a> &lt;&lt; Constants::NEWSLETTER_END<br>  create_html<br> end<br> <br> def create_html<br>  name = Time.new.strftime(“%b%d%Y”)<br>  file_name = “newsletter_”+name+”.html”<br>  file = File.open(file_name, ‘a:UTF-8’) do |file|<br>  file.write(<a href="http://twitter.com/html">@html</a>)<br> end<br>  puts “EDM generated.”<br> end<br> <br>end</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=109ef27871b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>