tag:blogger.com,1999:blog-118114812024-03-08T18:04:13.526-06:00JamesJavaMy thoughts as an enterprise Java developer.James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.comBlogger155125tag:blogger.com,1999:blog-11811481.post-13477925024564264212022-06-18T09:48:00.002-05:002022-06-18T09:48:28.068-05:00NetFlix: Active-Active for Multi-Regional Resiliency<p> </p><p class="MsoNormal"><span style="font-size: 11.0pt;"><a data-saferedirecturl="https://www.google.com/url?q=https://netflixtechblog.com/active-active-for-multi-regional-resiliency-c47719f6685b&source=gmail&ust=1655649054974000&usg=AOvVaw2Ia_8ULYcO8XTo7AR90Xpn" href="https://netflixtechblog.com/active-active-for-multi-regional-resiliency-c47719f6685b" target="_blank">https://netflixtechblog.com/<wbr></wbr>active-active-for-multi-<wbr></wbr>regional-resiliency-<wbr></wbr>c47719f6685b</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">All services available in region so no cross-region requests<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">Direct to region by location instead of latency to maintain control<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">Service to direct request: Zuul<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">Error request at start when downstream won’t be able to handle. Dynamic with scaling.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">Test abilities of new services with production load<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">Writes need to tell all caches to invalidate. Can a new request happen before the data is synced?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">Tools to deploy the same code to multiple regions<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">Multiple levels of chaos: service, availability zone, region, region connection. Some levels will cause total loss of service<u></u><u></u></span></p><p>
<span style="font-size: 11.0pt;">Automatic failover</span></p><p><span style="font-size: 11.0pt;">Even though this is 9 years old, it is still rare.</span></p><p><span style="font-size: 11.0pt;">Does the type of Netflix data change make it easier for them? If a customer gets stale data it probably doesn't have a large impact.<br /></span></p>James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-63300493838637138562022-02-20T07:12:00.000-06:002022-02-20T07:12:14.907-06:00Minimize scope<p> "Minimizing the scope of your objects gives the highest chance for escape analysis to be applied and avoid creating objects in the heap, creating them on the stack instead, which avoids the GC overhead of the object."</p><p><a href="http://www.javaperformancetuning.com/news/newtips254.shtml">http://www.javaperformancetuning.com/news/newtips254.shtml</a></p>James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-2934111961754762462022-01-22T11:17:00.004-06:002022-01-22T11:17:39.360-06:00Capture, Compute, Create<p>These are my notes from a talk.</p><p>Examples of coming technology:<br /></p><ul><li><span style="font-size: 11.0pt;">Shoes customized to person, foot, and purpose</span></li><li><span style="font-size: 11.0pt;">Machine Learning to produce chair based on requirements</span></li><li><span style="font-size: 11.0pt;">Machine Learning </span><span style="font-size: 11.0pt;">to learn about Rembrandt paintings and creating new painting base on attributes requested</span></li><li>
<span style="font-size: 11.0pt;">Self-driving car aggressively driving</span></li><li>
<span style="font-size: 11.0pt;">Watson computer on Jeopardy. Now better at disease diagnosis and fits in a watch.</span></li><li><span style="font-size: 11.0pt;">Machine Learning </span><span style="font-size: 11.0pt;">creating non-disclosure agreements</span></li><li><span style="font-size: 11.0pt;">Machine Learning </span><span style="font-size: 11.0pt;">creating music base on requested parameters</span></li><li><span style="font-size: 11.0pt;">Machine Learning </span><span style="font-size: 11.0pt;">to generate person model for catalogs. 5 faces, 10 poses for $800</span></li><li><span style="font-size: 11.0pt;">Machine Learning </span><span style="font-size: 11.0pt;">to design a building customized to each person’s preferences. Some table rotated at a weird angle which gave more daylight.</span></li><li>
<span style="font-size: 11.0pt;">E-Rosery to track prayers by sign of cross</span></li><li>
<span style="font-size: 11.0pt;">Augmented reality to allow buying anything in a concert (in Japan?)<br /></span></li></ul><p class="MsoNormal"><span style="font-size: 11.0pt;"> Success in the past can limit future creativity</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> Flow: clear goals, skill == difficulty, feedback, concentrate</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> Good question, diagram, activity</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> “Things will never move as slowly as today”</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span><span style="font-size: 11.0pt;">Facebook meetings limited to 30 minutes</span><br /><span style="font-size: 11.0pt;"></span></p><p> </p>James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-75839107293802677312021-03-06T11:13:00.005-06:002021-03-06T11:13:22.247-06:00Code Review Suggestions<p class="MsoNormal"><span style="font-size: 11.0pt;">Goal: identity significant problems so they can be fixed before deployment.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">Ensure the code is:</span></p>
<ul style="margin-top: 0in;" type="disc"><li class="m_-2652206580704243661MsoListParagraph" style="margin-left: 0in;"><span style="font-size: 11.0pt;">Bug free (for bugs with a significant chance of happening)</span></li><li class="m_-2652206580704243661MsoListParagraph" style="margin-left: 0in;"><span style="font-size: 11.0pt;">Generally meets the goals of the change</span></li><li class="m_-2652206580704243661MsoListParagraph" style="margin-left: 0in;"><span style="font-size: 11.0pt;">Has appropriate automated testing</span></li><li class="m_-2652206580704243661MsoListParagraph" style="margin-left: 0in;"><span style="font-size: 11.0pt;">Doesn’t cause unexpected problems</span></li><li class="m_-2652206580704243661MsoListParagraph" style="margin-left: 0in;"><span style="font-size: 11.0pt;">Doesn’t decrease security, scalability, robustness, etc</span></li><li class="m_-2652206580704243661MsoListParagraph" style="margin-left: 0in;"><span style="font-size: 11.0pt;">Maintainable and understandable by future developers</span></li><li class="m_-2652206580704243661MsoListParagraph" style="margin-left: 0in;"><span style="font-size: 11.0pt;">Code technique generally fits with the rest of the code in the repository.</span></li><li class="m_-2652206580704243661MsoListParagraph" style="margin-left: 0in;"><span style="font-size: 11.0pt;">No unreasonable risks</span></li><li class="m_-2652206580704243661MsoListParagraph" style="margin-left: 0in;"><span style="font-size: 11.0pt;">Answers important “why” questions. Code inspection often easily answers “What” but look for important unanswered “Why” questions</span></li></ul>
<p class="MsoNormal"><span style="font-size: 11.0pt;">Reviewers aren’t expected to:</span></p>
<ul style="margin-top: 0in;" type="disc"><li class="m_-2652206580704243661MsoListParagraph" style="margin-left: 0in;"><span style="font-size: 11.0pt;">Find all bugs</span></li><li class="m_-2652206580704243661MsoListParagraph" style="margin-left: 0in;"><span style="font-size: 11.0pt;">Enforce style (formatting, way of doing things, etc) as long as it fits reasonably with the rest of the codebase</span></li></ul>
<p class="MsoNormal"><span style="font-size: 11.0pt;">Suggestions:</span></p>
<span style="font-size: 11.0pt;">It is good to make optional suggestions as long as it is clear that they are optional and don’t affect approval.</span><p> </p>James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-23718014144286504962021-02-18T17:01:00.000-06:002021-02-18T17:01:03.818-06:00Command line tool Introduction<p> </p><h1>Goal</h1>
<p>Introduce some command line tools and how that can work together to solve common problems.</p>
<h3 id="m_-5710292859049860982CommandlinetoolIntroduction-Notes">Notes</h3>
<p>There are many commands included with a *nix system that are useful
for research. The commands may have differences on different systems so
the following works on Mac OS X.</p>
<p>Read the links to learn more about the tools – they can do much more than is presented here.</p>
<p>There are more efficient ways to achieve the same results as some of
these example but the examples were chosen to be a simple introduction
that focuses on how the tools can be used together.</p>
<p>Sample files based on <a href="https://www.w3schools.com/xml/cd_catalog.xml">https://www.w3schools.com/xml/cd_catalog.xml</a>.</p>
<p> </p>
<h2 id="m_-5710292859049860982CommandlinetoolIntroduction-Findingthingsinfiles">Finding things in files</h2>
<p><a data-saferedirecturl="https://www.google.com/url?q=https://www.gnu.org/software/grep/manual/grep.html&source=gmail&ust=1613769162086000&usg=AFQjCNEHqqjBck4N9bTwhI-Wuljvvy8E-A" href="https://www.gnu.org/software/grep/manual/grep.html" target="_blank">grep</a> searches files for lines that match a pattern. It uses
<a data-saferedirecturl="https://www.google.com/url?q=https://en.wikipedia.org/wiki/Regular_expression&source=gmail&ust=1613769162086000&usg=AFQjCNESp88FZO5LpeHwFkYZue4qEyzTDA" href="https://en.wikipedia.org/wiki/Regular_expression" target="_blank">regular expressions</a>.</p>
<p>Example: Find XML values of "EU"</p>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="padding: 0in 0in 0in 0in;">
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">grep ">EU<"</span></code>
<code><span style="font-size: 10.0pt;">*.xml</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog2.xml: <COUNTRY>EU</COUNTRY></span></code></p>
</td>
</tr>
</tbody>
</table>
<h2 id="m_-5710292859049860982CommandlinetoolIntroduction-Linkingmultiplecommandstogether">Linking multiple commands together</h2>
<p>A command line <a data-saferedirecturl="https://www.google.com/url?q=https://www.geeksforgeeks.org/piping-in-unix-or-linux/&source=gmail&ust=1613769162086000&usg=AFQjCNH-kicHpTRXNLy9Dbnze2RCgWPcyA" href="https://www.geeksforgeeks.org/piping-in-unix-or-linux/" target="_blank">
pipe</a> allows you to pass the results of one command to another
command. This allows you to link many simple programs together to
complex solutions in the same way that 26 letters can be put together to
make millions of words.</p>
<p>Example: Find XML values of "EU" that also are in the N1 segment</p>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="padding: 0in 0in 0in 0in;">
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">grep ">EU<"</span></code>
<code><span style="font-size: 10.0pt;">*.xml | grep "<COUNTRY>"</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog2.xml: <COUNTRY>EU</COUNTRY></span></code></p>
</td>
</tr>
</tbody>
</table>
<p> </p>
<h2 id="m_-5710292859049860982CommandlinetoolIntroduction-Checkyourcommandbylookingatthefirstfewresults">
Check your command by looking at the first few results</h2>
<p><a data-saferedirecturl="https://www.google.com/url?q=https://man7.org/linux/man-pages/man1/head.1.html&source=gmail&ust=1613769162087000&usg=AFQjCNHBSOU-k3thJwrIReVuWpfQvtHSRg" href="https://man7.org/linux/man-pages/man1/head.1.html" target="_blank">head</a> shows only the first 10 results.</p>
<p>Example: Find XML values of "EU" and look at the first few results.</p>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="padding: 0in 0in 0in 0in;">
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">grep ">EU<"</span></code>
<code><span style="font-size: 10.0pt;">*.xml | head</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <COUNTRY>EU</COUNTRY></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog2.xml: <COUNTRY>EU</COUNTRY></span></code></p>
</td>
</tr>
</tbody>
</table>
<h2 id="m_-5710292859049860982CommandlinetoolIntroduction-Makechangestoresults">Make changes to results</h2>
<p><a data-saferedirecturl="https://www.google.com/url?q=https://www.gnu.org/software/sed/manual/sed.html&source=gmail&ust=1613769162087000&usg=AFQjCNFUM74NyLQItDxbr_w1FZfXtF5jpg" href="https://www.gnu.org/software/sed/manual/sed.html" target="_blank">sed</a> allows you to change lines. I use the search and replace feature that uses
<a data-saferedirecturl="https://www.google.com/url?q=https://en.wikipedia.org/wiki/Regular_expression&source=gmail&ust=1613769162087000&usg=AFQjCNFI7qs351i8WZOXr1jbZaD6TXBNYA" href="https://en.wikipedia.org/wiki/Regular_expression" target="_blank">regular expressions</a>.</p>
<p>Example: Find all file names with an XML value of "EU".</p>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="padding: 0in 0in 0in 0in;">
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">grep ">EU<"</span></code>
<code><span style="font-size: 10.0pt;">*.xml | sed "s/:.*//"</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog2.xml</span></code></p>
</td>
</tr>
</tbody>
</table>
<h2 id="m_-5710292859049860982CommandlinetoolIntroduction-Runacommandagainstmanyfiles.">Run a command against many files.</h2>
<p><a data-saferedirecturl="https://www.google.com/url?q=https://en.wikipedia.org/wiki/Xargs&source=gmail&ust=1613769162087000&usg=AFQjCNFluwcpuTAkCAVbNBoS0xagZ4Z-Fg" href="https://en.wikipedia.org/wiki/Xargs" target="_blank">xargs</a> allows you to run a command against many files.</p>
<p>Example: Find all file names with an XML value of "EU" and find all YEAR XML nodes in those files (different lines from the EU).</p>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="padding: 0in 0in 0in 0in;">
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">grep ">EU<"</span></code>
<code><span style="font-size: 10.0pt;">*.xml | sed "s/:.*//"</span></code> <code><span style="font-size: 10.0pt;">| xargs grep "<YEAR>"</span></code>
<code><span style="font-size: 10.0pt;">| head</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1985</YEAR></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1988</YEAR></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1982</YEAR></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1990</YEAR></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1997</YEAR></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1998</YEAR></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1973</YEAR></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1990</YEAR></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1996</YEAR></span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1987</YEAR></span></code></p>
</td>
</tr>
</tbody>
</table>
<h2 id="m_-5710292859049860982CommandlinetoolIntroduction-Sorttheresults">Sort the results</h2>
<p><a data-saferedirecturl="https://www.google.com/url?q=https://en.wikipedia.org/wiki/Sort_(Unix)&source=gmail&ust=1613769162087000&usg=AFQjCNHWGYYlJfHSrxfHmx4zsFIUTwEm7A" href="https://en.wikipedia.org/wiki/Sort_(Unix)" target="_blank">sort</a> allows you to sort your results.</p>
<p>Example: Find all file names with an XML value of "EU" and find all years in those files.</p>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="padding: 0in 0in 0in 0in;">
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">grep ">EU<"</span></code>
<code><span style="font-size: 10.0pt;">*.xml | sed "s/:.*//"</span></code> <code><span style="font-size: 10.0pt;">| xargs grep "<YEAR>"</span></code>
<code><span style="font-size: 10.0pt;">| sed "s/:.*\">/:/;s/<\/.*//"</span></code> <code>
<span style="font-size: 10.0pt;">| sort | head</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1968</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1968</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1968</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1968</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1968</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1971</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1971</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1971</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1971</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1971</span></code></p>
</td>
</tr>
</tbody>
</table>
<h2 id="m_-5710292859049860982CommandlinetoolIntroduction-Removeduplicates">Remove duplicates</h2>
<p><a data-saferedirecturl="https://www.google.com/url?q=https://en.wikipedia.org/wiki/Uniq&source=gmail&ust=1613769162087000&usg=AFQjCNGuAHVIQj4rEXx3QYVtdeOZaiAqoQ" href="https://en.wikipedia.org/wiki/Uniq" target="_blank">uniq</a> allows you to remove duplicate results (that are right next to each other). This is often used after sort.</p>
<p>Example: Find all file names with an XML value of "EU" and find all unique sorted years in those files.</p>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="padding: 0in 0in 0in 0in;">
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">grep ">EU<"</span></code>
<code><span style="font-size: 10.0pt;">*.xml | sed "s/:.*//"</span></code> <code><span style="font-size: 10.0pt;">| xargs grep "<YEAR>"</span></code>
<code><span style="font-size: 10.0pt;">| sed "s/:.*\">/:/;s/<\/.*//"</span></code> <code>
<span style="font-size: 10.0pt;">| sort | uniq | head</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1968</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1971</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1973</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1982</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1983</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1985</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1987</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1988</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1990</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">cd_catalog.xml: <YEAR>1991</span></code></p>
</td>
</tr>
</tbody>
</table>
<h2 id="m_-5710292859049860982CommandlinetoolIntroduction-Countduplicates">Count duplicates</h2>
<p>uniq also allows counting duplicates</p>
<p>Example: Find all file names with an XML value of "EU" and count years per file.</p>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="padding: 0in 0in 0in 0in;">
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">grep ">EU<"</span></code>
<code><span style="font-size: 10.0pt;">*.xml | sed "s/:.*//"</span></code> <code><span style="font-size: 10.0pt;">| xargs grep "<YEAR>"</span></code>
<code><span style="font-size: 10.0pt;">| sed "s/:.*\">/:/;s/<\/.*//"</span></code> <code>
<span style="font-size: 10.0pt;">| sort | uniq | sed "s/:.*//"</span></code> <code>
<span style="font-size: 10.0pt;">| uniq -c15 cd_catalog.xml</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">3</span></code> <code><span style="font-size: 10.0pt;">cd_catalog2.xml</span></code></p>
</td>
</tr>
</tbody>
</table>
<h2 id="m_-5710292859049860982CommandlinetoolIntroduction-Copyintermediateresultstoafile">Copy intermediate results to a file</h2>
<p><a data-saferedirecturl="https://www.google.com/url?q=https://en.wikipedia.org/wiki/Tee_(command)&source=gmail&ust=1613769162087000&usg=AFQjCNEtiv_S1lUUDzTeVdrXiCAQMfxwmA" href="https://en.wikipedia.org/wiki/Tee_(command)" target="_blank">tee</a> allows you to store the results of a command while still copying the results to the next command</p>
<p>Example: Find all file names with an XML value of "EU", count unique years per file, and store in yearCounts.txt.</p>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="padding: 0in 0in 0in 0in;">
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">grep ">EU<"</span></code>
<code><span style="font-size: 10.0pt;">*.xml | sed "s/:.*//"</span></code> <code><span style="font-size: 10.0pt;">| xargs grep "<YEAR>"</span></code>
<code><span style="font-size: 10.0pt;">| sed "s/:.*\">/:/;s/<\/.*//"</span></code> <code>
<span style="font-size: 10.0pt;">| sort | uniq | sed "s/:.*//"</span></code> <code>
<span style="font-size: 10.0pt;">| uniq -c | tee yearCounts.txt15 cd_catalog.xml</span></code></p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">3</span></code> <code><span style="font-size: 10.0pt;">cd_catalog2.xml</span></code></p>
</td>
</tr>
</tbody>
</table>
<h2 id="m_-5710292859049860982CommandlinetoolIntroduction-Countthenumberofresults">Count the number of results</h2>
<p><a data-saferedirecturl="https://www.google.com/url?q=https://en.wikipedia.org/wiki/Wc_(Unix)&source=gmail&ust=1613769162087000&usg=AFQjCNEdy3BCoc56xxOBgQDh7fw3ksr_Yg" href="https://en.wikipedia.org/wiki/Wc_(Unix)" target="_blank">wc</a> allows you to count the results.</p>
<p>Example: Find all file names with an XML value of "EU", count how many have exactly 3 unique years.</p>
<p class="MsoNormal"><code><span style="font-size: 10.0pt;">grep ">EU<"</span></code>
<code><span style="font-size: 10.0pt;">*.xml | sed "s/:.*//"</span></code> <code><span style="font-size: 10.0pt;">| xargs grep "<YEAR>"</span></code>
<code><span style="font-size: 10.0pt;">| sed "s/:.*\">/:/;s/<\/.*//"</span></code> <code>
<span style="font-size: 10.0pt;">| sort | uniq | sed "s/:.*//"</span></code> <code>
<span style="font-size: 10.0pt;">| uniq -c | tee yearCounts.txt | grep "^ *3 "</span></code>
<code><span style="font-size: 10.0pt;">| sed "s/^ *3 //;s/\.xml$//"</span></code> <code>
<span style="font-size: 10.0pt;">| tee 3years.txt | wc -l</span></code></p>
<code><span style="font-size: 10.0pt;">1</span></code>James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-31016230746627889842021-02-18T15:59:00.004-06:002021-02-18T17:01:18.606-06:00Educational Pivot Points<p class="MsoNormal"><span style="font-size: 11.0pt;">Looking back at what brought me to where I am, there are many events that were important.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">My older brother had
trouble learning to read and I got the same 1st grade teacher as he
had. She assumed I also would have trouble learning to read and refused
to teach me. The special education reading teacher
tested me and found that I didn't need to be in a special class. Since
there was no place for me to learn to read, the special education
reading teacher taught me individually. That individual instruction was
better than the normal options and by the 3rd grade
I was tested to be reading at the 10th grade level. My 1st grade
teacher's negative attitude looked like it would hurt me, but someone
else helped me do better then she could have likely done!</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">In 3rd grade, I
remember being taught about rounding numbers. While it was being
explained, I wondered what to do about the number 5. I was told to
always round it up but in college (chemistry or physics),
I was told to round 5 to get to an even number so that the rounding
errors for 5 are canceled out. Over time you will find that it becomes
more complex for figure out the right thing to do.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">In 4th grade, I
became friends with a boy who was interested in computers and did a
little programming. I found that I also liked computers and programming.
Seemingly accidental events can lead you on interesting
paths.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">In 6th grade, my
teacher would sometimes play football with us during recess. Even though
I never was a great athlete, he still occasionally threw the ball to
me. I really appreciated that and you never know
when a small act of kindness is meaningful.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">At the start of 7th
grade, we moved to a new state. I had been in an advanced math class but
the new school wouldn't do that so I was bored with many of my classes
that year. Sometimes you need to deal with
setbacks.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">In 7th or 8th grade,
I started volunteering in the computer lab and was unofficially allowed
to bring a computer home for the summer and got a summer job cleaning
computers.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">In 8th grade, they
let me take 9th grade math. If you deal with setbacks well, that may
open up doors. In that math class, I met a friend that I still talk with
occasionally. He also introduced me to Boy Scouts
which I enjoyed doing for many years and helped me become a lifeguard. </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">In 9th grade they
upgraded the computer lab and installed the first computer network at
that school. I volunteered to help install that and learned a lot. The
computer coordinator even took me out of classes
so I could learn when someone was brought in to teach him. Once that
trainer told me to copy a file and I had to ask how to do that. Everyone
starts with 0 knowledge so don't be embarrassed to ask for something to
be explained. That new lab and network wasn't
used for a semester so I got to explore it and help figure out how to
use it. Because I had much more free time, I soon knew much more about
it than the computer coordinator and he allowed me to have full
administrative privileges. This included the ability
to see and change any grades that teachers stored on the network but I
never exploited that. With great power comes great responsibility. How
you use power shows a lot about your character. I also learned a lot
because I always stayed 2 hours after school
in the computer lab working on homework, learning, and helping other
students. I had to learn how to meekly help train my teachers and help
them with any of their problems. I know some of the teachers and school
administrators didn't like that I had that much
power so I had to meekly show them that I was only doing good.
Sometimes in classes in the computer lab, I had to lead part of the
class or tell the teacher what to do. Some of my class homework was done
with computers when none of the other students used
computers. I suspect that my work somewhat dazzled the teachers and got
better grades that other students who had better content. Don't be
dazzled by flashy presentation that lacks good content. I also took 10th
and 11th grade math, 10th grade science, and
a German class usually taken by 10-12th graders so I had to learn to be
humble to not make the students in higher grades feel bad. In my
biology class, I was at a table with a student who didn't do well in
that class. He used to gleek on me but I knew he must
feel bad about looking bad compared to someone in a lower grade.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">In 10th grade, my
math class was for seniors and even had my older brother in it. That
class was quite a bit different than my other math classes and at first I
didn't do great so I had to put in a lot more
work and studying than I used to.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">In 11th grade, I was
done with all of their math classes so they gave me a calculus textbook
and put me in an Algebra 2 class (that I had taken 2 years ago). It was
really hard to concentrate when the teacher
was lecturing so I made very slow progress that year. Because of my
good work with computers, the computer coordinator went to bat for me
against the school board who didn't like my access.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">For 12th grade, we
asked the school board to pay for me to take a math, science, and
computer science class at a nearby university but they only approved the
computer science class. The district already had
a policy allowing seniors to skip the last semester if they had
completed enough work so I started college full time my last senior
semester. When I took college calculus 1, my previous self study helped
me for a few weeks but I had to work harder after that.
When I started college, I looked at their computer network and found
that it was the same type as I had used in high school (but more
complex). While looking around, I found 1 department didn't have a
password on the account with full privileges so I sent
them a message warning them about that. They replied with a job offer!
The department was the same department with my major so it was very
convenient to mix working with my school work. While I was good at
English, I wasn't interested in advancing that area
so I signed up for the easiest English class required. After the first
week, my teacher told me that I could take the honors English class and
that it would involve less writing so I switched to that class.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">When I was a
sophomore, Mayo Clinic called the department looking for a summer
intern. Because of my work in the department, they recommended me. That
turned into summer and part time work the rest of my college
career and a job offer after. During the first few weeks I had to speak
up in a meeting to tell others I barely knew that they were wrong about
a technology decision. You have to be meek and knowledgeable to make
that work!</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">As a junior while
working at Mayo I started using a new programming language that is still
my primary language. Even though I never took any classes on that
programming language, my first job was in that language.
The class that was the most useful to my job programming was actually a
math class with no programming -- it was about proofs and I've found
that the proof process has been very useful when I program. One class
had a semester project and I decided to use the
new programming language. Because I liked programming and the new
language had many features, I made quick progress. A few weeks into the
class, the teacher gave help in the old language that I didn't use for
problems that I had already addressed! Working
on interesting problems can cause you to spend a lot of time on them
and make quick progress.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">It took me 4.5 years
to graduate from college but I went a little slower because of working a
lot at Mayo. That slowdown actually allowed me to start looking for a
job with 2 years of experience. Since I lived
at home during college, had the side jobs, and was frugal, I was able
to graduate with no debt. When I was looking for a job, there were 3
related job types that I considered. One of those types doesn't exist
anymore so I'm glad I didn't choose that.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">When I interviewed
at SPS Commerce, I interviewed for 2 different departments. After some
thought, I picked one and the other was sold to a different company a
few years later. After a few months, my manager
gave me a problem that we didn't know how to reproduce, only happened
in the production environment, only happened sometimes, and then left
for a week to go to a conference. I had no idea how to fix it but I knew
a step that I could take that might help. After
a few times of just taking the next step, I finally was able to find
the cause of the problem and figure out a fix. You don't need to know
how to solve all problems if you just know the next step and continue
taking each next step. A few months after starting,
my manager asked if I would like to be moved to a new responsibility
(production support). I wasn't sure if I would like that but I decided
to give it a try. A few years later the company went through layoffs but
the production support developer is the last
person to be laid off so I was spared from all layoffs. After a year, I
was promoted.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">Early on I led a
small team. Because I have a long-term focus, and don't want to get the
same problem twice, I was able to eventually handle production without a
team while handling new features. I have worked
on small teams, and led small teams, but normally work alone. Because
of this, I handle everything from architecture, design, coding,
debugging, and research to working with quality assurance, customer
support, and product management. I long ago decided that
I didn't want to go into management because I saw that they usually
couldn't spend much time solving technical problems and I really enjoy
that. I like working on more complex and harder problems and features.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">A decade ago, I
started working on my master's degree. It took me a while to find a
program that I thought would be applicable to my job and teach me new
things. I stopped after taking only 2 classes because
I couldn't find more useful classes.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">Of my 22 years at
SPS Commerce, 20 of them have been working on the same service but no
one else has worked on that service for more than a few years. That
level of experience allows me to know the service
very well, quickly give very authoritative answers to questions about
the service, see the service go through huge changes, make and execute
long term plans for the service, quickly find problems, quickly make
changes, help other developers efficiently work
with the service, and advise others about their work in relation to the
service (e.g. I often work with product management to improve their
suggested changes). I am now an extreme outlier in my industry where
most people only stay 3-5 years at a job.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;">When I started, most
of my time was spent coding features or fixes that others gave to me
but now I code 5% of my time. I now spend my time researching and
planning changes, training others, and researching
complex problems/questions others have about the service. In real life
it is almost impossible to make something 1,000 times better, but I can
occasionally make something literally 1,000 better (e.g. take a process
that takes hours for customers and make it
take seconds). Most of my time at SPS, I have telecommuted 1-3
days/week so I have actually enjoyed the move to 100% telecommuting
during COVID-19. For me, the commuting time savings is equivalent to an
extra 8 weeks of vacation annually! I live in a sparsely
populated area so staying away from people isn't very constraining.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt;"> </span></p>
<span style="font-size: 11.0pt;">I would say that I'm
almost addicted to learning. After formal education ended, I still
sought out information on improving my skills but that information gets
harder to find as my level of knowledge deepens.
Looking back, the most useful parts of my education often weren't
obvious until much later so it would be hard to know how to go back and
be sure that a change would improve that. The things I liked best where
when I could explore a new area -- from first
learning programming to learning the computer network at school to
learning a new service at SPS Commerce to learning new ways to solve
problems.</span><p> </p>James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-68171042319621642082021-01-22T17:36:00.001-06:002021-02-18T17:08:21.913-06:00Naming variables<p></p><p class="MsoNormal"><span style="font-size: 11.0pt;">It isn’t very useful
to name variables based on information that can be easily determined on
the declaration line. It is useful to name variables based on the
purpose of the variable. Otherwise the purpose
may be spread out across the usage of the variable.</span></p>
<span style="font-size: 11.0pt;">In code it is often easy to answer “what” but hard to answer “why” so the code should be written to answer “why”.</span>James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-84448089598092170612020-07-24T19:31:00.004-05:002020-07-24T19:31:28.998-05:00Technology-as-a-Service Playbook NotesMy notes from reading <a href="https://www.amazon.com/Technology-as-Service-Playbook-Profitable-Subscription-ebook/dp/B01FG3TDA8">Technology-as-a-Service Playbook</a>:<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial",sans-serif; font-size: 11.0pt;">Chapter 3:</span></div>
<div class="MsoNormal">
<span style="font-family: "Arial",sans-serif; font-size: 11.0pt;">Page 77: Report to customer on all benefits, features used, etc so they are less likely to stop service.</span></div>
<div class="MsoNormal">
<span style="font-family: "Arial",sans-serif; font-size: 11.0pt;">Page 94: “We don’t need to explain why these are important.”</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial",sans-serif; font-size: 11.0pt;">Chapter 7:</span></div>
<div class="MsoNormal">
<span style="color: black; font-family: "Arial",sans-serif; font-size: 11.0pt;">Page 199: levels of adoption to measure</span></div>
<div class="MsoNormal">
<span style="color: black; font-family: "Arial",sans-serif; font-size: 11.0pt;">Page 213: cost for new customer vs upsell or renew</span></div>
<div class="MsoNormal">
<span style="color: black; font-family: "Arial",sans-serif; font-size: 11.0pt;">Page 216: measured->managed</span><span style="font-family: "Arial",sans-serif; font-size: 11.0pt;"></span></div>
<div class="MsoNormal">
<span style="font-family: "Arial",sans-serif; font-size: 11.0pt;">Page 233: Customer business objectives often not passed to customer success.</span></div>
<div class="MsoNormal">
<span style="font-family: "Arial",sans-serif; font-size: 11.0pt;">Page 235: Customer outcome chain</span></div>
<div class="MsoNormal">
<span style="font-family: "Arial",sans-serif; font-size: 11.0pt;">Page 237: Deeply understand how most successful customers are successful and help all customers copy</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial",sans-serif; font-size: 11.0pt;">Chapter 10:</span></div>
<span style="font-family: "Arial",sans-serif; font-size: 11.0pt;">Page
331: “If the customer is not ready to do what they need to do to
succeed with you Xaas offer, then you should not take the deal.” They
must be willing to adapt their business
processes, train their end users, utilize their expertise, and run the
customer success playbook given to them. Frontline sales must identify
and spend little time on unwilling customers.</span>James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-36561366221210403332020-05-20T20:00:00.004-05:002021-02-18T17:09:31.619-06:00Logging<table border="0" cellpadding="0"><thead>
<tr>
<th>Level</th>
<th>When to use</th>
<th>Example</th>
<th>Alert</th>
<th>Response</th>
<th>Environments</th>
</tr>
</thead><tbody>
<tr>
<td><b>Fatal</b></td>
<td>The system can't run</td>
<td>Can't connect to main DB</td>
<td>Immediately</td>
<td>Immediately address</td>
<td>All</td>
</tr>
<tr>
<td><b>Error</b></td>
<td>There is a system problem</td>
<td>Unable to run a DB query</td>
<td>If the count passes a small threshold</td>
<td>Keep current on all errors with plan for addressing and escalate as appropriate</td>
<td>All</td>
</tr>
<tr>
<td><b>Warning</b></td>
<td>There is a problem that isn't a system problem</td>
<td>A specific request took longer than expected to process</td>
<td>If the count passes a big threshold</td>
<td>Generally stay current with most common logs and optionally create plan and/or escalate as appropriate</td>
<td>All</td>
</tr>
<tr>
<td><b>Info</b></td>
<td>Something happened that isn't a problem but is noteworthy</td>
<td>Unable to process request because the request was invalid</td>
<td>Optionally if the count passes a huge threshold</td>
<td>Occasionally review to look for patterns that may need to be addressed</td>
<td>Probably prod. Usually test. Always Dev.</td>
</tr>
<tr>
<td><b>Debug</b></td>
<td>Something not noteworthy but useful for inspecting how the system is running</td>
<td>A specific query took x milliseconds to run</td>
<td>Never</td>
<td>None</td>
<td>Prod only rarely for some loggers. test rarely. Dev often.</td>
</tr>
</tbody></table>
James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-43867619061355001132016-12-23T18:56:00.002-06:002021-02-18T17:09:23.991-06:00Better show that a password is being enteredTerminals need a better way to show that a password is being enter in order to reduce the chance that a password would be accidentally entered somewhere incorrect. <br />
The whole screen should have some indication that a password is being
entered. I.e. Dim everything but the password field. This would reduce
the problem of accidentally typing your password into chat when you
thought another window was active.James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-58382239549645525872016-12-23T18:48:00.004-06:002021-02-18T17:09:39.833-06:00To log or not to logTo log or not to log?<br />That is the question.<br />Whether is nobler to in the Sumo to suffer ups and downs of outrageous quantity, or to take out logs against a Sea of repetition.<br />James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-80381399859983398642016-08-10T09:38:00.001-05:002021-02-18T17:09:50.917-06:00Tight scoping of constants<p dir="ltr">How do you declare constants that are only needed in a small scope (function or smaller)? I declare them in the tightest scope as final with an all-caps name. I.e.:</p>
<p dir="ltr">final int THRESHOLD = 1000;<br></p>
<p dir="ltr">That coveys the intent that it is a constant but minimizes scope.<br>
</p>
James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-80245308050405132892016-08-10T07:31:00.001-05:002016-08-10T07:31:10.134-05:00Disable new UI components until the user has had time to react to them<p dir="ltr">How often do you use a program, decide to take an action (I.e. Press Return), and then have something popup and use your action before you even have a chance to read the popup? I hate when that happens because I don’t even know what I told the computer to do.</p>
<p dir="ltr">Input on a new UI element should be disabled for a short time to ensure that the user actually wants to take action on the new UI element. The delay has to be just long enough for the user to realize that the action may do something differently and not too long to slow down users who know that the popup is coming. So the delay should probably be a few hundred milliseconds.</p>
James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-2893560146522731082016-07-23T09:34:00.003-05:002016-07-23T09:34:48.104-05:00devopsdays 2016<em>There was a lot of useful info but these are the things that stuck out to me.</em><br />
<a data-saferedirecturl="https://www.google.com/url?hl=en&q=http://www.devopsdays.org/events/2016-minneapolis/program/&source=gmail&ust=1469370408633000&usg=AFQjCNGzfdsrcqEehGMBLmA8UMWqXlfPvA" href="http://www.devopsdays.org/events/2016-minneapolis/program/" rel="nofollow" target="_blank">http://www.devopsdays.org/<wbr></wbr>events/2016-minneapolis/<wbr></wbr>program/</a><br />
<h3>
Overall</h3>
As a developer it seemed that vast majority of the content was for
people with an ops focus. We need to help with better content for the
dev side of devops. Based on a raise of hands
the split was about even for conference attendees.<br />
<h3>
Working with Marketing and Sales:</h3>
<ul>
<li>Invite to demos. Record video and details in documentation so they can review later</li>
<li>Roadmapping meetings with representives from all groups</li>
</ul>
<ul>
<li>Get rid of the game of telephone and bring everyone together. Talk
to other groups directly instead of depending on others to always filter
their content.</li>
<li>Know other groups: from goals to pains</li>
</ul>
<h3>
Making good choices with software</h3>
<ul>
<li>Code is the enemy</li>
<li>Resist software sprawl</li>
<li>Control/friction for new things on critical path</li>
<li>Correlate risk with startup timeline and use risk on differentiators</li>
<li>Replacement plan must prioritize getting rid of the old</li>
<li>Use humans for core features</li>
<li>Celebrate removal, deprecation, and refactoring because celebrated patterns will be repeated</li>
</ul>
<h3>
Open Spaces</h3>
We need more developer focused discussions.<br />
I started a discussion on monitoring for developers. Others used
different tools like Datadog and Splunk that may be interesting to check
out. Some developers had much less access to production – especially if
production had sensitive data and needed to
have PCI compliance. It is important to use both tools and provide
instrumentation monitoring in code.<br />
In internal discussions another
developer-focused topic thrown out was how development deals with ops
scripts. They aren't our main focus and are often written differently
than a developer would write them.<br />
<h3>
Bias</h3>
I'm interested in both the methodology and outcome of <a data-saferedirecturl="https://www.google.com/url?hl=en&q=https://implicit.harvard.edu/implicit/takeatest.html&source=gmail&ust=1469370408633000&usg=AFQjCNFasUCDSpBoYOalcemsZ-ryTXpWXA" href="https://implicit.harvard.edu/implicit/takeatest.html" rel="nofollow" target="_blank">
https://implicit.harvard.edu/<wbr></wbr>implicit/takeatest.html</a>James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-50574128952429374752015-02-13T08:57:00.002-06:002015-02-13T08:57:52.309-06:00Literary Hex? = 2B || !2BJames A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-18631082514944016672014-02-20T13:34:00.001-06:002014-02-20T13:34:36.387-06:00CodeCombat<a href="http://codecombat.com/">CodeCombat</a>: "Learn to Code JavaScript by Playing a Game"<br /><br />
<br />James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-91836473460716039132014-01-14T13:23:00.001-06:002014-07-26T20:58:20.200-05:00Preferences/Settings should be minimizedAllowing a user to change how an application works by only going into preferences/settings should be avoided.<br />
<br />
<ul>
<li>Most users won't even look there so features will be underused which is a waste of development resources.</li>
<li>Try to prompt the user to change their preference when they do a related action. i.e. if there is a preference for the number of items to show on a page and the user changes the dropdown to show a different number of items on the page then ask the user if they would like to update the preference to the new value.</li>
<li>When prompting the user, avoid making the user click an extra time. Instead of doing a popup, just add text that prompts the user.</li>
</ul>
James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-5373804835932430242013-12-10T11:21:00.001-06:002014-07-26T20:58:20.198-05:00More interesting wait screenI have seen many wait screens that do the job but are boring. I think it might work a lot better to make a wait screen that displays something interesting. Maybe draw a fractal or present a simple game. If there is something interesting, the user shouldn't mind the wait as much.James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-67628050979341983082013-12-06T12:20:00.001-06:002013-12-06T12:20:11.415-06:00U.S. Supreme Court to decide whether software can be patented | Reuters<a href="http://www.reuters.com/article/2013/12/06/us-usa-court-software-idUSBRE9B50QJ20131206">U.S. Supreme Court to decide whether software can be patented | Reuters</a>: "The U.S. Supreme Court on Friday agreed to decide on a key software industry issue of which kinds of computer-related software are eligible for patent protection."<br />
<br />
James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-50002593314324002342013-10-17T14:43:00.003-05:002014-07-26T20:58:20.197-05:00The type of work that I like to do<div class="MsoNormal">
I like working on detailed, complex, and/or interesting
problems on a product that I know well, has a large codebase, and has to support
high load. I call those “guru-level” problems.<o:p></o:p></div>
James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-32758356059666996922013-10-15T08:43:00.001-05:002014-07-26T20:58:20.193-05:00Change comments to logs?It seems that almost all of the time, comments in a method work better as logging statements.<br />
Reasons:<br />
<br />
<ul>
<li>The log statements still give clues to the developer about what is happening</li>
<li>The log statements also give that information to someone looking at the logs</li>
<li>Since log statements will be seen more, they are more likely to to kept current</li>
</ul>
James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-23638096054053866642013-10-10T11:18:00.001-05:002013-10-10T11:18:36.190-05:00Sitting Too Much Could Be Deadly, Experts Say | Fox News<a href="http://www.foxnews.com/story/2010/01/20/sitting-too-much-could-be-deadly-experts-say/">Sitting Too Much Could Be Deadly, Experts Say | Fox News</a>: "Scientists are increasingly warning that sitting for prolonged periods — even if you also exercise regularly — could be bad for your health. And it doesn't matter where the sitting takes place — at the office, at school, in the car or before a computer or TV — just the overall number of hours it occurs."<br />
<br />
" "After four hours of sitting, the body starts to send harmful signals," Ekblom-Bak said. She explained that genes regulating the amount of glucose and fat in the body start to shut down."<br />
<br />
One idea that comes to my mind is to setup a standing height desk. The computer would be setup with remote desktop so that employees using it could connect back to their workstation and do work as if they were at their desk. That cube could then be reserved like a conference room so that employees could use it for a few short periods during the day. Optionally, the cube could have a tread mill right in front of the computer so that employees could also walk while working.James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-3831846224315553372013-10-03T14:07:00.001-05:002013-10-03T14:07:47.299-05:00A Simple Rule to Eliminate Useless Meetings | LinkedIn<a href="http://www.linkedin.com/today/post/article/20130701022638-22330283-a-simple-rule-to-eliminate-useless-meetings?ref=email">A Simple Rule to Eliminate Useless Meetings | LinkedIn</a>: "materials that would typically have been presented during a meeting be sent out to participants at least 24 hours in advance so people can familiarize themselves with the content"<br />
<br />
"begin each meeting by providing attendees roughly 5-10 minutes to read through the deck"<br />
<br />
"Once folks have completed the reading, it's time to open it up for discussion.There is no presentation. It's important to stay vigilant on this point as most people who prepared the materials will reflexively begin presenting."<br />
<br />
"If the material has been well thought out and simply and intuitively articulated, chances are the need for clarifying questions will be kept to a minimum."James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-53909365155123274942013-10-03T12:19:00.002-05:002013-10-03T12:19:37.863-05:00XSLT example to iterator through a comma separated list<pre><?xml version="1.0" encoding="UTF-8"?>
<comma>1,2,3,4,5,6,7,88,99,100</comma>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xsl:call-template name="splitcommas">
<xsl:with-param name="comma" select="comma"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="splitcommas">
<xsl:param name="comma"/>
<xsl:choose>
<xsl:when test=" not(contains($comma, ','))">
<value><xsl:value-of select="$comma"/></value>
</xsl:when>
<xsl:otherwise>
<value><xsl:value-of select="substring-before($comma, ',')"/></value>
<xsl:call-template name="splitcommas">
<xsl:with-param name="comma" select="substring-after($comma, ',')"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
</pre>
James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0tag:blogger.com,1999:blog-11811481.post-3522745262544144522013-10-02T16:19:00.000-05:002014-07-26T20:58:20.195-05:00Keeping sensitive data out of logs<p>When a product has logging there is a risk that sensitive data(i.e. passwords) will make it into the logs. How do we reduce that risk?</p>
<p>Logging an object or adding toString to a class might not obviously leak sensitive data so it is probably better to make sensitive data obvious. i.e. If sensitive data is stored in a Properties object, as soon as the properties object is obtained, it should move sensitive data to a separate location (i.e. a separate String variable in the class) and remove the sensitive data from properties so it is obvious that there is sensitive data.</p>James A. N. Staufferhttp://www.blogger.com/profile/02455585046613669065noreply@blogger.com0