<?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 Lloyd Rochester's Geek Blog</title><link>https://lloydroc.github.io/categories/programming/</link><description>Recent content in Programming on Lloyd Rochester's Geek Blog</description><generator>Hugo</generator><language>en</language><copyright>Copyright © 2025, Lloyd Rochester.</copyright><lastBuildDate>Fri, 31 Jan 2020 06:23:05 +0000</lastBuildDate><atom:link href="https://lloydroc.github.io/categories/programming/index.xml" rel="self" type="application/rss+xml"/><item><title>HTML Select List for All Timezones</title><link>https://lloydroc.github.io/post/programming/html_select_all_timezones/</link><pubDate>Fri, 31 Jan 2020 06:23:05 +0000</pubDate><guid>https://lloydroc.github.io/post/programming/html_select_all_timezones/</guid><description>&lt;h1 id="hahahugoshortcode80s0hbhb">HTML Select List for All Timezones&lt;/h1>
&lt;p>I needed an HTML &lt;code>select&lt;/code> for every Timezone and really couldn&amp;rsquo;t find what I was looking for. Here is an abbreviated version so you know what I&amp;rsquo;m talking about:&lt;/p>
&lt;h3 id="abbreviated-html-select-of-timezones">Abbreviated HTML Select of Timezones&lt;/h3>
&lt;p>A smaller HTML select with timezones which maybe a good starting point in the USA.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-html" data-lang="html">&lt;span style="display:flex;">&lt;span>&amp;lt;&lt;span style="color:#f92672">select&lt;/span> &lt;span style="color:#a6e22e">id&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;timezone&amp;#34;&lt;/span> &lt;span style="color:#a6e22e">name&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;timezone&amp;#34;&lt;/span> &lt;span style="color:#a6e22e">class&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;custom-select&amp;#34;&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">option&lt;/span> &lt;span style="color:#a6e22e">value&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Pacific/Honolulu&amp;#34;&lt;/span>&amp;gt;Pacific/Honolulu GMT-10:00&amp;lt;/&lt;span style="color:#f92672">option&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">option&lt;/span> &lt;span style="color:#a6e22e">value&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;America/Anchorage&amp;#34;&lt;/span>&amp;gt;America/Anchorage GMT-9:00&amp;lt;/&lt;span style="color:#f92672">option&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">option&lt;/span> &lt;span style="color:#a6e22e">value&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;America/Los_Angeles&amp;#34;&lt;/span>&amp;gt;America/Los_Angeles GMT-8:00&amp;lt;/&lt;span style="color:#f92672">option&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">option&lt;/span> &lt;span style="color:#a6e22e">value&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;America/Boise&amp;#34;&lt;/span>&amp;gt;America/Boise GMT-7:00&amp;lt;/&lt;span style="color:#f92672">option&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">option&lt;/span> &lt;span style="color:#a6e22e">value&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;America/Denver&amp;#34;&lt;/span>&amp;gt;America/Denver GMT-7:00&amp;lt;/&lt;span style="color:#f92672">option&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">option&lt;/span> &lt;span style="color:#a6e22e">value&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;America/Phoenix&amp;#34;&lt;/span>&amp;gt;America/Phoenix GMT-7:00&amp;lt;/&lt;span style="color:#f92672">option&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">option&lt;/span> &lt;span style="color:#a6e22e">value&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;America/Chicago&amp;#34;&lt;/span>&amp;gt;America/Chicago GMT-6:00&amp;lt;/&lt;span style="color:#f92672">option&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">option&lt;/span> &lt;span style="color:#a6e22e">value&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;America/Detroit&amp;#34;&lt;/span>&amp;gt;America/Detroit GMT-5:00&amp;lt;/&lt;span style="color:#f92672">option&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">option&lt;/span> &lt;span style="color:#a6e22e">value&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;America/New_York&amp;#34;&lt;/span>&amp;gt;America/New_York GMT-5:00&amp;lt;/&lt;span style="color:#f92672">option&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&amp;lt;/&lt;span style="color:#f92672">select&lt;/span>&amp;gt;&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h3 id="abbreviated-html-select-of-timezones-in-action">Abbreviated HTML Select of Timezones in Action&lt;/h3>
&lt;select id="timezone" name="timezone" class="custom-select">
 &lt;option value="Pacific/Honolulu">Pacific/Honolulu GMT-10:00&lt;/option>
 &lt;option value="America/Anchorage">America/Anchorage GMT-9:00&lt;/option>
 &lt;option value="America/Los_Angeles">America/Los_Angeles GMT-8:00&lt;/option>
 &lt;option value="America/Boise">America/Boise GMT-7:00&lt;/option>
 &lt;option value="America/Denver">America/Denver GMT-7:00&lt;/option>
 &lt;option value="America/Phoenix">America/Phoenix GMT-7:00&lt;/option>
 &lt;option value="America/Chicago">America/Chicago GMT-6:00&lt;/option>
 &lt;option value="America/Detroit">America/Detroit GMT-5:00&lt;/option>
 &lt;option value="America/New_York">America/New_York GMT-5:00&lt;/option>
&lt;/select>
&lt;p>What I especially liked about the &lt;code>value&lt;/code> field here is it standard across platforms and programming languages. The reason is because this the &lt;code>value&lt;/code> field if from the &lt;a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">tz database&lt;/a>. Other &lt;code>value&lt;/code>s you will see for the HTML &lt;code>option&lt;/code> have offsets and all sorts of different ideas. These usually fail because when dealing with time one has to account for the dreaded Daylight Savings Time.&lt;/p></description></item><item><title>Number of Programming Languages</title><link>https://lloydroc.github.io/post/programming/programming-and-spoken-languages/</link><pubDate>Fri, 21 Sep 2018 09:14:48 +0000</pubDate><guid>https://lloydroc.github.io/post/programming/programming-and-spoken-languages/</guid><description>&lt;h1 id="hahahugoshortcode81s0hbhb">Number of Programming Languages&lt;/h1>
&lt;p>What are the similarities and differences between spoken languages and programming languages?&lt;/p>
&lt;p>What are the effects of having a large number of programming languages?&lt;/p>
&lt;p>When I mow the lawn or drive to work I often listen to Podcasts if I don&amp;rsquo;t listen to audio books. I recently came across a Podcast &lt;a href="http://freakonomics.com/podcast/why-dont-we-speak-language/">Freakonomics - Why Don’t We All Speak the Same Language? (Earth 2.0 Series)&lt;/a> and being a programmer myself I related the discussion of human languages to programming languages. Here are the points from the Podcast relevant to this dicussion on human languages that I want to use to relate to my view on Programming Languages:&lt;/p></description></item></channel></rss>