<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Programming on Josiah Wood</title><link>https://josiahwood.com/categories/programming/</link><description>Recent content in Programming on Josiah Wood</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 06 Nov 2018 23:17:18 +0000</lastBuildDate><atom:link href="https://josiahwood.com/categories/programming/index.xml" rel="self" type="application/rss+xml"/><item><title>Project Euler Problem 2: Even Fibonacci numbers</title><link>https://josiahwood.com/project-euler-problem-2-even-fibonacci-numbers/</link><pubDate>Tue, 06 Nov 2018 23:17:18 +0000</pubDate><guid>https://josiahwood.com/project-euler-problem-2-even-fibonacci-numbers/</guid><description>&lt;p&gt;&lt;a href="https://projecteuler.net/problem=2"&gt;Project Euler Problem 2&lt;/a&gt; instructs:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:&lt;/p&gt;&#10;&lt;p&gt;1, 2, 3, 5, 8, 13, 21, 34, 55, 89, &amp;hellip;&lt;/p&gt;&#10;&lt;p&gt;By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;They&amp;rsquo;ve already given you the definition of the Fibonacci sequence (except it is usually written as starting with 0,1 or 1,1). So the first thing to figure out is how do we find the sequence of even-valued terms.&lt;/p&gt;</description></item><item><title>Project Euler Problem 1: Multiples of 3 and 5</title><link>https://josiahwood.com/project-euler-problem-1-multiples-of-3-and-5/</link><pubDate>Wed, 25 May 2016 10:34:00 +0000</pubDate><guid>https://josiahwood.com/project-euler-problem-1-multiples-of-3-and-5/</guid><description>&lt;p&gt;&lt;a href="https://projecteuler.net/problem=1"&gt;Project Euler Problem 1&lt;/a&gt; instructs:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.&lt;/p&gt;&#10;&lt;p&gt;Find the sum of all the multiples of 3 or 5 below 1000.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;This ends up being a basic math problem, so no code is needed yet.&lt;/p&gt;&#10;&lt;p&gt;I think the easiest way to think of this is as a variation on triangular numbers. Triangular numbers are the sums of the first &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;n&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class="katex-html" aria-hidden="true"&gt;&lt;span class="katex-base"&gt;&lt;span class="katex-strut" style="height:0.4306em;"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; natural numbers. Which is a very similar description to our problem statement. The initial formula for triangular numbers is:&lt;/p&gt;</description></item><item><title>Ethereum Truffle and Testrpc with Cloud9</title><link>https://josiahwood.com/ethereum-truffle-and-testrpc-with-cloud9/</link><pubDate>Wed, 16 Dec 2015 22:18:31 +0000</pubDate><guid>https://josiahwood.com/ethereum-truffle-and-testrpc-with-cloud9/</guid><description>&lt;p&gt;Here are the steps I&amp;rsquo;ve performed to get &lt;a href="https://github.com/ConsenSys/truffle"&gt;ConsenSys&amp;rsquo;s Ethereum Truffle&lt;/a&gt; working on &lt;a href="https://c9.io/"&gt;Cloud9&lt;/a&gt;.  Note that I am new to a lot of the things being used here, so if you see something that I&amp;rsquo;m doing wrong or &amp;ldquo;the hard way&amp;rdquo; then let me know!  I hope this post helps someone else, but I also hope that I get some good feedback.&lt;/p&gt;&#10;&lt;h2 id="installation-script"&gt;Installation Script&lt;/h2&gt;&#10;&lt;p&gt;After creating your Cloud9 workspace run this script (we&amp;rsquo;ll break it down afterward):&lt;/p&gt;</description></item></channel></rss>