<?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 Steve Zwart on Medium]]></title>
        <description><![CDATA[Stories by Steve Zwart on Medium]]></description>
        <link>https://medium.com/@spzwart?source=rss-546eceb4582d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ymXVOr9fvqPksqvP.jpg</url>
            <title>Stories by Steve Zwart on Medium</title>
            <link>https://medium.com/@spzwart?source=rss-546eceb4582d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 07:09:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@spzwart/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[What if Republicans had more to say than “No”?]]></title>
            <link>https://spzwart.medium.com/what-if-republicans-had-more-to-say-than-no-576764c53338?source=rss-546eceb4582d------2</link>
            <guid isPermaLink="false">https://medium.com/p/576764c53338</guid>
            <category><![CDATA[republican-party]]></category>
            <category><![CDATA[america]]></category>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[united-states]]></category>
            <category><![CDATA[change]]></category>
            <dc:creator><![CDATA[Steve Zwart]]></dc:creator>
            <pubDate>Mon, 03 May 2021 23:37:39 GMT</pubDate>
            <atom:updated>2021-05-03T23:37:39.791Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Girl with “halt” hand up!" src="https://cdn-images-1.medium.com/max/1024/1*YjPatNx7N9UWjkwfNvEqbw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@isaiahrustad?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Isaiah Rustad</a> on <a href="https://unsplash.com/s/photos/no?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>The Republican party has no coherent response to Democrats’ ideas except to vote against them. A simple vision is needed to unify the party going forward:</p><p><strong><em>Republicans will promote government policies that lead to long-term opportunity and success across our population</em></strong>.</p><p><em>Opportunity</em> has to be available across the whole population, rich and poor, black and white, rural and urban. Planning to deliver opportunity with a pragmatic focus and fiscal discipline will deliver our best future.</p><p><strong><em>Republican policy actions</em></strong>:</p><ol><li>Limit US Federal debt to 100% of GDP</li><li>Focus on opportunity and success</li><li>Reduce wealth inequality</li><li>Reform politics</li><li>Reform immigration</li><li>Provide basic healthcare</li><li>Let the States govern where possible</li><li>Pursue diplomacy and dialogue in foreign relations to avoid war</li><li>Reform the military-industrial complex</li><li>Boost economic competitiveness by modernizing infrastructure and education</li></ol><p><strong>Limit US Federal Debt</strong></p><p>A major policy objective is to limit Federal debt to 100% of GDP to ensure the Federal government that has the fiscal capacity to handle inevitable future crises such as war or pandemic.</p><p><strong>Due to the COVID-19 pandemic, our Federal debt will explode from 80% of GDP at the end of 2019 to 102% by the end of 2021.</strong></p><p>This ballooning debt is not a major concern to the current administration. As one of many ballooning debt scenarios, the FY2022 discretionary request includes $24.7B for NASA, a 6.3% increase from 2021 that “Supports Human Exploration of the Moon, Mars, and Beyond”. That’s not pragmatic and doesn’t show fiscal discipline.</p><p>According to the Congressional Budget Office 2021 Long Term Budget Outlook:</p><p>“By the end of 2021, federal debt held by the public is projected to equal 102 percent of GDP. Debt would reach 107 percent of GDP (surpassing its historical high) in 2031 and would almost double to 202 percent of GDP by 2051. Debt that is high and rising as a percentage of GDP boosts federal and private borrowing costs, slows economic output growth, and increases interest payments abroad. A growing debt burden could increase the risk of a fiscal crisis and higher inflation as well as undermine confidence in the U.S. dollar, making it more costly to finance public and private activity in international markets.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/0*FxUZEIM4Jj2ab20r" /></figure><p>The report shows accelerating, growing interest payments kicking in about 2026.</p><p>The US should use modern financial spending review techniques to better manage expenditures and outcomes on an ongoing basis for all Federal programs. Other countries performing these spending reviews are Denmark, the UK, and Sweden.</p><p><strong>Opportunity and Success</strong></p><p>“We may have democracy, or we may have wealth concentrated in the hands of a few, but we can’t have both.” Justice Louis Brandeis</p><p>The bottom 50% of American families own just 1% of the wealth while the top 10% own 76% of the wealth. One in ten American families has a negative net worth. Strategies to improve and equalize opportunity and wealth:</p><ol><li>Increase individual income tax and capital gain rates for the top 10%</li><li>Review estate taxation policies for the top 10%</li><li>Use tax revenues for affirmative action programs:</li></ol><ul><li>Financial education programs: investing, wealth management, business development, and real estate</li><li>Skilled trades scholarships</li><li>Expand the scope of Registered Apprenticeships</li><li>Pell grants</li></ul><p>We need to lift each other with compassion and build a spirit of individual accountability and responsibility. To bolster opportunity Americans need to <strong>participate</strong> in their society. Public knowledge of government and awareness of the benefits of civic participation is lacking. Only 1 in 4 Americans can name the three branches of government. Participation in community organizations is dropping, and voter participation is sometimes less than 50%. A renewed focus on American civic education and its benefits for families and communities is required. Policies shall promote compassion and healthy winning families. This mindset and attitude should act as the basis of the new Republican platform.</p><p><strong>Reform Politics</strong></p><p>We need nationwide, transparent political reform. The first element is Campaign Finance Reform. In a 2010 case called Citizens United v. Federal Election Commission, the U.S. Supreme Court ruled that independent political expenditures by unions and corporations (including non-profit corporations such as Planned Parenthood, the National Rifle Association, and the ACLU) are protected under the First Amendment and are not subject to restriction by the government. This was a misguided decision that gave organizations undue influence. Along with Political Action Committees (PACs) and their unlimited political spending, politicians aren’t chosen on ideas and merit, but influence and money. As an example of excessive influence, look no further than The Senate Leadership Fund PAC which raised and spent $475 million in the 2020 election cycle.</p><p>We support a constitutional amendment as proposed by Move to Amend: “We, the People of the United States of America, reject the U.S. Supreme Court’s ruling in Citizens United and other related cases, and move to amend our Constitution to firmly establish that money is not speech, and that human beings, not corporations, are persons entitled to constitutional rights.”</p><p>Individual campaign contributions should be limited to $3,000 from any person to one candidate for office.</p><p>A second element in reforming politics is to modernize voting. We support automatic voter registration and convenient voting with integrity. No one should stand in line for hours on election days.</p><p>The third element is term and age limits. A US constitutional amendment shall provide a maximum of two six-year terms for Senators and six two-year terms for members of the House.</p><p>An airline pilot must retire at age 60. Since the Chief Executive has great responsibilities that require physical and mental vitality 24x7, a constitutional amendment should be introduced to ensure a US President must be between age 35 and 60 at the first inauguration.</p><p>A fourth element is for Republican politicians to re-engage the public with transparency and honesty. It seems politicians are always scheming and hiding the truth from the public when what we need are honest assessments and recommendations.</p><p><strong>Let the States govern where possible</strong></p><p>A dysfunctional US Congress is unable to lead meaningful policy initiatives at the Federal level. Meanwhile, States have implemented successful programs while balancing their budgets.</p><p>The government closest to the people is the best equipped to govern and manage programs. As stated by Supreme Court Justice Louis Brandeis, “It is one of the happy incidents of the federal system that a single courageous state may, if its citizens choose, serve as a laboratory; and try novel social and economic experiments without risk to the rest of the country.” Also, States have varying needs. What’s best for New Hampshire isn’t always the best for New Mexico.</p><p>We advocate block grants and program management run by the states wherever practical in order to reduce the federal deficit, increase government efficiency, improve accountability, and allow for flexibility.</p><p>At the Federal level, guns, marijuana, and abortion should be legal by statute and managed by the States.</p><p><strong>Reform Immigration</strong></p><p>Federal legislation is needed to modernize the immigration system. We support the passage of a DREAM Act to provide a pathway to legal status for undocumented immigrants.</p><p>Birthright citizenship should remain in effect.</p><p>The refugee admissions ceiling should allow 60,000 yearly and the asylum admissions ceiling should allow 50,000 yearly.</p><p>The US should prioritize the importance of the English language in immigration policies as English proficiency leads to more successful immigrant career and social outcomes. Public schools will be taught in English and ESL classes will be offered. English fluency will remain a requirement for citizenship.</p><p><strong>Provide Basic Healthcare</strong></p><p>The goal is to optimize quality of life by providing free basic universal coverage for citizens and legal permanent residents.</p><p>Due to our healthcare system’s inability to manage cost, the Federal government spends 6% of GDP on healthcare and it is projected to rise to 9%.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/0*fygWzRKthiDTsJ7z" /></figure><p>Even with all of this spending, more than 500,000 Americans are forced to file for bankruptcy every year as they can’t repay their healthcare-related debt.</p><p>We must benchmark other countries and borrow successful techniques in managing care and cost. One immediate step to control cost is to permit Medicare to negotiate prescription prices.</p><p>One source of funding for universal basic coverage could come from a reallocation of 15% of the $740B national defense budget, which provides $111B annually, or $335 per capita. This is in addition to the existing healthcare outlays for Medicare, Medicaid, CHIP, and subsidies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/0*jHGpbU05dVkZf9w1" /></figure><p>Provide block grants to states to provide universal <strong>basic </strong>healthcare coverage:</p><ul><li>Basic healthcare includes preventative care (annual physicals, dental cleanings, well-child checkups, gynecological care, preventative screenings, immunizations, insulin, and contraception)</li><li>Two no-charge office visits yearly</li><li>Inpatient hospitalization and surgery</li><li>Mental health services provided by Community Mental Health Services Block Grant</li><li>Maternity and newborn care not included</li><li>Other prescriptions not included</li></ul><p>Those with private insurance should receive a premium subsidy. Continue to allow customized private healthcare plans for specialized care and needs.</p><p>To address the public health impact of gun violence, we support the creation of local community violence prevention groups.</p><p><strong>Pursue diplomacy and dialogue</strong></p><p>“Tact is the art of making a point without making an enemy.” — Isaac Newton</p><p>The US should pursue cultural exchange and dialogue with all nations who are willing to engage and project a new attitude of <em>respect and humility</em>.</p><p>At first glance in mid-2021, the US seems to be intent on re-launching the Cold War with Russia and China. Working with the UN, the US should build diplomatic channels with an aim to maintain a close, persistent, and transparent dialogue with China, Russia, India, and the EU to maintain world peace. Other strategic countries requiring a close relationship are Mexico, Canada, and Brazil. We should not engage in nation-building exercises. One dollar spent on cultural exchange projects might be more valuable to national security than $20 spent at the DoD.</p><p>The US is not a global police force or ideological sage. We are a nation among other nations working with each other to secure future success.</p><p><strong>Reform the military-industrial complex</strong></p><p>“By simply shoveling money at the Pentagon, Congress actually hinders good military thinking. Free-flowing money provides service leaders license to pursue excessively complex weapons programs with the mistaken belief that wars can be won simply by having more technology than our adversaries.” (Dan Grazier, Project on Government Oversight)</p><p>Starting in the mid-1980’s defense systems’ complexity and expense grew to the point of them being non-functional and not providing value for taxpayer dollars spent. For example, the B2 bomber and F35 fighter are not functional aircraft and have wasted billions. DoD staff and officers make unrealistic and lofty requirements for systems without cost consideration. DoD contractor firms have predictably had cost overruns and schedule delays in attempting to meet the unrealistic requirements. As a result of this and an incredible DoD bureaucracy, the US public is only receiving approximately 10% defense value from defense outlays. Our military is not capable and spending more makes it less capable.</p><p>An independent audit should be conducted on the DoD and recommendations made within a hard budget cut of 15% annually for five years. The first year cut will be re-allocated to fund healthcare as discussed above.</p><p>The audit should identify areas of obsolescence and opportunities for new capability.</p><p><strong>Boost economic competitiveness</strong></p><p>Secure and repair infrastructure per the 2021 Senate GOP $568B infrastructure proposal.</p><p>Eliminate the Federal Department of Education, while keeping Pell grants in place for higher education. In the area of student test scores (PISA), the US is stagnant, showing no improvement in reading, math, or science. The transfer of any Department of Education responsibilities to States and other Federal agencies should occur over 5 years using a 20% budget cut yearly until the Department is eliminated.</p><p>Encourage local school districts to leverage new K-12 educational techniques documented by experts at the Brookings Institution.</p><p>At the local level teach Civics and motivate students to build a spirit of American competitiveness and achievement.</p><p>The government should work with educational institutions to find ways to manage costs, to not exceed a $5,000 yearly tuition expense at a public 4 year University.</p><p>The US should launch a competitiveness initiative to compete with China’s “Made in China 2025” program. China spent $300B in 2018. Similar investment may be required here. It should build on President Biden’s 2/24/2021 “Executive Order on America’s Supply Chains”:</p><ol><li>Identify domestic critical goods production, including semiconductors, batteries, pharmaceuticals, machine tools and robots, vehicles, energy-producing components, computers, ships, aircraft, and factory production equipment</li><li>Identify future technology needs and staff research organizations as required</li><li>Identify international competitive challenges</li><li>Secure supply chains for key materials required</li><li>Initiate needed production and provide ongoing reviews</li></ol><p><em>Adopting these policy actions is a starting point for a brighter future</em>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=576764c53338" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Effective Communications with Mattermost and Zoom]]></title>
            <link>https://spzwart.medium.com/effective-communications-with-mattermost-and-zoom-49c3d87482a8?source=rss-546eceb4582d------2</link>
            <guid isPermaLink="false">https://medium.com/p/49c3d87482a8</guid>
            <category><![CDATA[zoom]]></category>
            <category><![CDATA[mattermost]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[remote-working]]></category>
            <dc:creator><![CDATA[Steve Zwart]]></dc:creator>
            <pubDate>Thu, 30 Apr 2020 18:44:07 GMT</pubDate>
            <atom:updated>2020-04-30T18:44:07.311Z</atom:updated>
            <content:encoded><![CDATA[<h3>A low-cost, effective approach for remote communication</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SFP9r1n2_vOB9fxGTSijBg.png" /><figcaption>Remote communication needs</figcaption></figure><h4>Communication needs</h4><p>I’m outlining a low-cost solution (<strong>less than $30 monthly in hosting costs</strong>) for an organization or team that works remotely with 5 to 100 users. Features we need are:</p><ol><li>Direct and group chat messaging from desktop and mobile (Windows, Mac, iOS, Android).</li><li>Screen sharing for remote team members and customers to review documents and work together.</li><li>Conference calling along with direct one-on-one calls, with available video.</li><li>For internal communications, we need to instantly update project status and coordinate tasks without using email. The use of email slows teams as they get bogged down and distracted.</li></ol><p>This solution is designed for customer communication in a high-touch customer environment with frequent ongoing communication and interaction. If your business doesn’t need this you can still use the solution for internal communications.</p><p>Ingredients:</p><ol><li>Each user will require an email address, a basic Zoom account, and an Internet connection</li><li>The implementer needs IT skills: Linux, hosting, and networking</li><li>Mattermost Team Edition (free, open-source, and self-hosted) — check out the <a href="https://docs.mattermost.com/help/getting-started/welcome-to-mattermost.html#what-is-mattermost">Welcome to Mattermost</a> or the <a href="https://www.youtube.com/watch?v=FuDvrkrqRzg">Mattermost demo video</a></li><li>A Linux server to host Mattermost</li></ol><h4>Mattermost Server Build</h4><p><a href="https://docs.mattermost.com/guides/administrator.html#installing-mattermost">Administrator&#39;s Guide - Mattermost 5.22 documentation</a></p><p>I installed Mattermost on a server running Ubuntu 18.04 with MySQL 5.7.</p><p>The hardware requirements from Mattermost state “1–1,000 users — 1 vCPU/cores, 2 GB RAM”. To save on hosting costs I deployed with 1GB RAM and added a Linux paging space to provide 2GB virtual memory.</p><p>The server hosting provider is <a href="https://www.vultr.com/">Vultr</a>:</p><p>Choose server: Cloud Compute</p><p>Server Type: 64 bit OS — Ubuntu 18.04</p><p>Server Size: 25GB SSD, 1 CPU, 1024MB Memory, 1000GB Bandwidth = $10 monthly</p><p>As root, configure the paging space:</p><pre><br>fallocate -l 1G /swapfile<br>chmod 600 /swapfile<br>mkswap /swapfile<br>swapon /swapfile<br>(Add line    /swapfile swap swap defaults 0 0<br>to /etc/fstab)<br># swapon --show<br>NAME      TYPE  SIZE USED PRIO<br>/swapfile file 1024M 7.8M   -2</pre><p>If you want backup protection for the Mattermost server use this <a href="https://docs.mattermost.com/administration/backup.html#backup">reference</a>.</p><h4>Network configuration</h4><p>Reference the <a href="https://docs.mattermost.com/_images/network2.PNG">Mattermost Network Diagram</a>.</p><p>If needed, get an Internet domain from a domain registrar. I obtained one from <a href="https://namecheap.com/">NameCheap</a> for $5 for one year.</p><p>Once the domain was obtained, I configured DNS to be managed in Vultr as described <a href="https://www.vultr.com/docs/introduction-to-vultr-dns">here</a>.</p><p>I set up Mattermost using TLS with a “Let’s Encrypt” certificate following this <a href="https://docs.mattermost.com/install/config-tls-mattermost.html">procedure</a>.</p><p>According to <a href="https://docs.mattermost.com/install/smtp-email-setup.html">Mattermost</a>, you need SMTP configured for systems using email-based authentication. I used the free service from <a href="https://www.mailjet.com/feature/smtp-relay/">Mailjet</a>. The number of email messages generated by Mattermost is quite low.</p><p>I followed the procedure to set up DomainKeys and SPF from Mailjet in my DNS records at Vultr per this <a href="https://app.mailjet.com/support/how-to-setup-domainkeys-dkim-and-spf-in-my-dns-records,84.htm">procedure</a>. In order to use the Mailjet relay, you configure a Postfix relay on the Linux server as described <a href="https://www.linuxbabe.com/mail-server/postfix-smtp-relay">here</a>.</p><p>To protect the Mattermost server, I used Vultr’s firewall support to create a rule that allows port 22 (SSH) from only my home and port 443 (https) from anywhere.</p><h4>Zoom plugin configuration</h4><p>Mattermost <a href="https://github.com/mattermost/mattermost-plugin-zoom/blob/master/README.md">documentation</a> states: “You will need a paid Zoom account to use the plugin.”, and “To generate an API Key and API Secret requires a Pro, Business, Education, or API Zoom plan.” However, I am able to follow the procedure for a free, basic Zoom account.</p><p>In Zoom, be sure this checkbox is selected in your Profile settings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*mUS4WbtZtQ8jwro9KQFJVA.png" /></figure><p>From the Mattermost main menu, select Plugin Marketplace:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/251/1*bFqftUl_Dc-XkcgImIPGoA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*Zsl-3UDq0FJgiilbxNoAug.png" /></figure><p>Configure the plugin. Before you click “Save”, press “Regenerate” to get a fresh Webhook Secret. Then click “Save” and immediately after paste the webhook URL in your browser and navigate to it. There should be no response or error, and setup is complete.</p><p>To test Zoom from Mattermost, click the icon to start a Zoom meeting:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*HC6buPM_g4Frwj2hTdJ3xw.png" /></figure><p>Now click on “join meeting” and a Zoom meeting will launch on your computer. You should see your Personal Meeting ID displayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*g7EG9dRN0hZ01bHup3lP1w.png" /></figure><p>In the Zoom meeting, you can share screens and enable video as desired.</p><h4>Optimizing Communication</h4><p><strong>Using channel headers</strong>: You can customize a channel header to provide links to helpful resources. Suppose we have a customer ACME Metals that we ship to with UPS and Old Dominion freight. We can make a team for ACME Metals and within that team a channel for “Shipping Issues”. We customize the channel header with trackers for UPS and Old Dominion for handy reference:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*bxC-DrcxKQENM-IweqhtWA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*LRiE2YQOJUSewCyUyVOHoQ.png" /><figcaption>The channel header</figcaption></figure><p><strong>Tracking project tasks</strong>: You can Pin a post to a channel that has a list of tasks or milestones. Anyone with access to the channel can update the post and mark tasks complete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*Lg3xJgmzYhT9k7GfgRzO2Q.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49c3d87482a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Photo Word Finder app]]></title>
            <link>https://medium.com/flutter-community/flutter-photo-word-finder-app-d27570e27e24?source=rss-546eceb4582d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d27570e27e24</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Steve Zwart]]></dc:creator>
            <pubDate>Wed, 18 Sep 2019 22:01:02 GMT</pubDate>
            <atom:updated>2019-09-18T22:01:02.779Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*eL37jXV6K3PUWBBcxwTDqA.png" /></figure><h3>Find words in photos on the go and search for them in the web</h3><p>Have you ever just entered a new place and want to learn about it quickly? Perhaps you’re in a new school, workplace, or town. The Photo Word Finder app is a tool to assist you by extracting words from your photos and searching for them.</p><p>The app recognizes text in the photo regardless of the alignment or orientation of the image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*yQiYItCpvZlp_wMPZaC_JQ.png" /></figure><p>The app benefits from the intuition and intelligence of Google search. As you can see in this example, the search hones in on a law office found in a building:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*Os4Y_nS9q-VXBr3I7DxUDg.png" /></figure><p>For convenience, the app provides a copy to clipboard function for words that are discovered, for use in other apps:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*NFqgUlT4m11KpFIJWAzBmA.png" /></figure><h3>Development Notes</h3><p>This app is written in Flutter using these technologies:</p><ol><li>The <a href="https://flutter.dev/docs/development/ui/widgets"><strong>Flutter UI Toolkit</strong></a> for crafting the user interface.</li><li>The<strong> </strong><a href="https://developers.google.com/ml-kit/vision/"><strong>Google Machine Learning Vision kit</strong></a><strong> </strong>using Text Recognition (Optical Character Recognition). This is provided for Flutter in the package <a href="https://pub.dev/packages/firebase_ml_vision">firebase_ml_vision</a>.</li><li>The <a href="https://pub.dev/packages/image_picker"><strong>image_picker</strong></a> package to access your device’s photo gallery.</li><li>The <a href="https://pub.dev/packages/url_launcher"><strong>url_launcher</strong></a> package to enable web searching from the app.</li><li>The <a href="https://pub.dev/packages/flutter_tags"><strong>flutter_tags</strong></a> package to allow editing of the words found in your photos prior to searching for them.</li></ol><p>Versions of packages used:</p><pre>Flutter 1.9.1+hotfix.2</pre><pre>firebase_ml_vision: ^0.9.2+1<br>image_picker: ^0.6.1+4<br>flutter_tags: ^0.4.3<br>url_launcher: ^5.1.2</pre><p>The code is available <a href="https://github.com/s859/image_ml">here</a>. The app is 7.3MB is size when built in release mode.</p><h4>User Interface</h4><p>The app has a horizontal 3 tab user interface. The first tab is used for selecting the image, the second tab is used for editing the words that are found, and the third tab is used for searching. These tabs can be selected by pressing the visible text at the top of the app screen or by swiping from side-to-side.</p><p>The contents of each tab can be scrolled vertically as needed. The tab for editing the words has an expansion tile that allows setting the font and scroll direction of the words. This layout functionality is enabled by the <a href="https://api.flutter.dev/flutter/widgets/NestedScrollView-class.html">NestedScrollView</a> widget.</p><h4>Flutter Widget hierarchy</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*vWvz8tdhBCFe8QVSUsrqvQ.png" /><figcaption>Flutter Widget Hierarchy</figcaption></figure><h4>Notes on image processing</h4><p>When selecting an image for text extraction, I could have used <em>ImageSource.camera</em> to use the active device camera, but I decided to use <em>ImageSource.gallery</em> as it provides a better user experience by presenting thumbnails of existing photos to select for processing.</p><p>I experimented with the maxHeight and maxWidth settings of <em>ImagePicker.pickImage</em> to balance app performance with the quality of text recognition. A native photo on my LG K20 phone is 4160 x 3120 and is 6MB in size. Specifying a maxHeight and maxWidth of 2000.0 in the app provides good performance and accurate text recognition. Depending on orientation, these settings usually result in a photo size of 2000 x 1500 processed by the ML Vision kit.</p><blockquote>As stated in the “<a href="https://firebase.google.com/docs/ml-kit/android/recognize-text">Input Image Guidelines</a>” Ideally, for Latin text, each character should be at least 16x16 pixels. For Chinese, Japanese, and Korean text (only supported by the cloud-based APIs), each character should be 24x24 pixels. For all languages, there is generally no accuracy benefit for characters to be larger than 24x24 pixels.</blockquote><h4>Google ML Kit Vision processing</h4><p>In order to use image recognition, you must create a FireBase project and follow these <a href="https://codelabs.developers.google.com/codelabs/flutter-firebase/#6">configuration steps</a>. I opted for a free Firebase Spark plan. I did not need a Cloud Firestore database for this app.</p><p>The following code performs text recognition on the selected image:</p><pre>List _items = [];<br>File pickedImage;<br>FirebaseVisionImage ourImage;</pre><pre>...</pre><pre>Future readText() async {<br>    TextRecognizer recognizeText = FirebaseVision.instance.textRecognizer();<br>    ourImage = FirebaseVisionImage.fromFile(pickedImage);<br>    VisionText visionText = await recognizeText.processImage(ourImage);</pre><pre>// flush list as it might be a subsequent image being processed<br>    if (_items.length &gt; 0) {<br>      _items.removeRange(0, _items.length);<br>    }</pre><pre>for (TextBlock block in visionText.blocks) {<br>      for (TextLine line in block.lines) {<br>        // Same getters as TextBlock<br>        for (TextElement element in line.elements) {<br>          if (element.text != null) {<br>            _items.add(element.text);<br>          }<br>        }<br>      }<br>    }</pre><pre>if (_items.length == 0) {<br>      _items.add(&quot;No text returned from ML Vision for this image.&quot;);<br>    }<br>    setState(() {});<br>}</pre><p>When running the app, I can see console messages that indicate images are processed in about 25 milliseconds:</p><pre>I/native  (19950): timer.cc:71 PhotoOcrEngine::Init (recognizer): 21.2633 ms (elapsed)<br>I/native  (19950): timer.cc:71 Init: 24.7678 ms (elapsed)</pre><h4>On-device text detection</h4><p>I am able to perform text detection with wifi and mobile data turned off. As advertised, an ideal use case for the on-device API is “<a href="https://firebase.google.com/docs/ml-kit/recognize-text">Recognizing sparse text in images</a>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*sug7NJgumAeYZX8gRe081Q.png" /></figure><p>That’s magical!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X6j2PEXg4Xw3PbHxSMJQ1w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@almosbech?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Almos Bechtold</a> on <a href="https://unsplash.com/search/photos/magic-trick?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>Some caveats on the Magic</h4><p>My testing was performed on Android only (no iOS).</p><p>Sometimes the text recognition works when not expected, and vice versa. I had limited success in recognizing hand-drawn block letters. However, handwriting recognition is available as a paid feature of the Cloud Vision API.</p><p>As of this writing, the Firebase ML Kit is still in beta status and the API might change. This is also the case with flutter packages firebase_ml_vision, image_picker, and flutter_tags.</p><p>I hope these development techniques are useful in the Flutter community!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d27570e27e24" width="1" height="1" alt=""><hr><p><a href="https://medium.com/flutter-community/flutter-photo-word-finder-app-d27570e27e24">Flutter Photo Word Finder app</a> was originally published in <a href="https://medium.com/flutter-community">Flutter Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Ten Worlds and the American Dream]]></title>
            <link>https://spzwart.medium.com/the-ten-worlds-and-the-american-dream-20c404384af7?source=rss-546eceb4582d------2</link>
            <guid isPermaLink="false">https://medium.com/p/20c404384af7</guid>
            <category><![CDATA[life]]></category>
            <category><![CDATA[buddhism]]></category>
            <category><![CDATA[american-dream]]></category>
            <category><![CDATA[happiness]]></category>
            <category><![CDATA[society]]></category>
            <dc:creator><![CDATA[Steve Zwart]]></dc:creator>
            <pubDate>Fri, 09 Aug 2019 19:12:34 GMT</pubDate>
            <atom:updated>2019-08-10T21:47:54.872Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="A picture of the statue of LIberty with a bright sun in the background." src="https://cdn-images-1.medium.com/max/949/1*syNr4t1zOGgeqn8kWLipKQ.png" /></figure><h3>Introduction</h3><p>You don’t need to be a Buddhist to benefit from the wisdom of Buddhist philosophies and teachings, as they offer great insight into understanding life and resonate with our modern world.</p><p>I learned about the Nichiren Buddhist principle of the Ten Worlds in <a href="https://www.goodreads.com/book/show/37569.The_Buddha_in_Your_Mirror"><em>The Buddha in Your Mirror</em></a>. The Ten Worlds principle provides a brilliant logical blueprint and insight into the ever-changing feelings and emotional states we experience in life.</p><p>Allied to the Ten Worlds is the concept of “<a href="http://sokahumanism.com/nichiren-buddhism/Practical_Meaning_of_Ichinen_Sanzen.html">Ichinen Sanzen</a>” which teaches that “at each moment in our lives, we can shape our future and the world around us”. We can change ourselves, others, and society by taking meaningful actions. To do that, we need perspective to understand our life state and emotions.</p><p>In mapping the Ten Worlds to today’s life in the United States, I see unhealthy influences that direct us to undesirable places. I also see opportunities to re-orient our aspirations in a more meaningful direction.</p><p>Let’s introduce the Ten Worlds, first with the Six Lower Worlds.</p><h4>The Six Lower Worlds</h4><figure><img alt="The six lower worlds slide, Hell, Hunger, Animality, Anger, Humanity, Heaven." src="https://cdn-images-1.medium.com/max/864/1*0nJQg4_iNZV_XCsQbG3PgQ.png" /></figure><p>When you find your life state in the Six Lower Worlds, you’ll find your emotional state can change many times daily. One minute you’re living in tranquil Humanity and suddenly you receive some bad news and you’re in the world of Hell.</p><p>Many of us strive towards the ideals of <em>the American Dream</em>, having expectations of material success:</p><ol><li>A career with opportunities for advancement</li><li>Homeownership</li><li>Upward mobility and success for our children</li><li>Possession of fashionable clothing, nice cars, and capable smartphones</li></ol><p>We expend tremendous effort in this pursuit. The American Dream maps closely to the world of Heaven where we realize some joy and happiness in reaching our goals.</p><blockquote>Is it wise for us to have a driving ambition for temporary happiness?</blockquote><h4>The Four Upper Worlds</h4><figure><img alt="The four upper worlds slide: Learning, Realization, Compassion, Enlightenment." src="https://cdn-images-1.medium.com/max/857/1*CBlo5V3lt4gVNu3yJBvf7Q.png" /></figure><p>In contrast to the Six Lower Worlds, reaching the Four Upper Worlds requires effort and intention. Being in these worlds provides you with strength and perspective to better handle life’s inevitable challenges. And you’re better positioned to affect the future in a meaningful way.</p><p>When we take an action there is a multiplier effect. If you sincerely wish someone a good day with a smile, you likely lift their mood, and they will spread some good cheer as well.</p><figure><img alt="Pillsbury doughboy pushing dominoes and spreading good cheer." src="https://cdn-images-1.medium.com/max/720/1*wRON56E4tvpMyIO30XYycA.jpeg" /><figcaption>The Pillsbury Doughboy spreading good cheer</figcaption></figure><p>Based on our personalities and tendencies, most of us are drawn to one or two worlds more than the others. Are there dominant worlds in your life? Mine are Hunger and Learning, and of the two I greatly prefer Learning.</p><h3>The Ten Worlds in the United States</h3><h4>A view from 115 years ago</h4><figure><img alt="An 8 horse team plowing a field." src="https://cdn-images-1.medium.com/max/1023/1*byZT-TKzXlUex6n09LO3qQ.jpeg" /><figcaption>Photo credit: <a href="https://visualhunt.co/a3/24e02a">drofmit4108</a> on <a href="https://visualhunt.com/re5/c1007f0c">Visualhunt.com</a> / <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/">CC BY-NC-SA</a></figcaption></figure><p>Before modern advances like indoor plumbing, electricity, tractors, and automobiles, life was simpler and more rhythmic in following the seasons. A day in the life on the farm in the early 1900s as described by my Nebraska relatives:</p><ul><li>The lady of the house started a fire from corn cobs in the stove to bake bread, which was kneaded and risen from the last evening. Her day is spent taking care of babies, cleaning the house, and preparing food.</li><li>The older children woke up to water and feed chickens and pigs, milk the cow, fetch water and more corn cobs.</li><li>The man of the house started by putting collars and harnesses on a seven-horse and one-mule team for plowing a field. The prep time for plowing could be up to two hours, then he might spend 8 or 9 hours plowing in the field.</li><li>The family assembled for dinner at noon and supper at six.</li><li>After supper, the man and children mucked the barn and cleaned the harnesses and collars with saddle soap and water to prepare for the next day, while the lady prepared more bread and other food for the next day.</li><li>At the end of the day, everyone was bone-tired and slept like a rock, because they did physical work all day long.</li></ul><p>They were in a predictable situation primarily living in the world of Humanity. I believe they were also in the worlds of Compassion and Realization. From family accounts, these were some very happy times. They enjoyed humor, music, and storytelling. They were pursuing the American Dream but had patience and modest expectations.</p><p>Other family members lived in St. Louis, Missouri at this time. This was a time and place of great optimism, where the World’s Fair was held in 1904. “<a href="https://www.sos.mo.gov/archives/mdh_splash/default.asp?coll=muellis">The Fair</a> showcased the grandiose ambition of the gilded age, forming a kind of collective tribute to the nineteenth century’s international understanding of the furtherance of peace, prosperity, and progress.” Family stories from that time reveal great ambition in pursuing higher education and starting businesses. They were chasing the American Dream in a big way.</p><p>Although there were hope and optimism in my family at that time, life was much more difficult than today. The average life expectancy in the US was only 47 years and aspirin wasn’t available until 1915. Infant mortality was roughly 10% in the first year of life. Think of the pain parents suffered from losing their babies. The workplace was about 30 times as dangerous as today. And if you did make it to old age, poverty was widespread for older Americans as there was no Social Security.</p><p>At this time, about 15% of houses had a bathtub and adults typically washed their hair monthly with borax or egg yolks as shampoo.</p><p>Life was much more difficult but Americans had two things that gave them hope:</p><ol><li>Strong faith in their families and institutions: churches, businesses, schools, governments, and the press</li><li>A belief that progress would be making life better all the time</li></ol><h4>A Ten Worlds view in the present</h4><p>“Compared with their grandparents, today’s young adults have grown up with much more affluence, slightly less happiness and much greater risk of depression and assorted social pathology.” — Hope College psychologist David G. Myers, Ph.D.</p><p>According to Chapter 5 of the 2019 World Happiness Report, “The years since 2010 have not been good ones for happiness and well-being among Americans. Even as the United States economy improved after the end of the Great Recession in 2009, happiness among adults did not rebound to the higher levels of the 1990s, <strong>continuing a slow decline ongoing since at least 2000</strong> in the General Social Survey.”</p><p>Why is our level of happiness and well-being on the decline?</p><ol><li>We seek the American Dream instead of the Upper Worlds, and the American Dream is becoming more difficult to attain.</li><li>High levels of debt raise our anxiety level. US consumer debt is at an all-time high of $14 trillion and we are hard-pressed to pay student loans and medical debt.</li><li>Modern life often provides material affluence but this affluence can easily feed the three poisons of greed, anger, and delusion.</li><li>Americans have lost optimism and faith in their institutions:</li></ol><ul><li>Our faith in the Federal government has been dropping in earnest since the mid-1960s starting with the Vietnam War. The Federal government is no longer for the people but represents special interests who have no limits on their lobbying efforts and influence.</li><li>Faith in corporations to take care of their employees has dropped, as more resources are directed to executives, shareholders, and technology than workers.</li><li>Parents and students are anxious about school safety, and 4th graders have to participate in active shooter drills.</li></ul><p>Now let’s examine some specific insights for each World.</p><h4>Hell</h4><p>All of us experience Hell at some point, being in a hopefully temporary state of misery. Forces capable of putting us in Hell:</p><ul><li>physical injuries, chronic pain, hormonal imbalances, catching the stomach flu, mental illness</li><li>guilt and disappointment</li><li>failure in reaching our goals</li><li>loss of a loved one</li><li>someone else’s anger</li><li>long periods of exposure to toxic people, especially when they’re bosses or family members</li></ul><p>A lot of these forces are unavoidable. We need to temper expectations and brace ourselves emotionally for some rough times. The best way to prepare is by maintaining a support network with good friends, as Compassion and friendship can pull us out of Hell.</p><p>As humans, we only have limited reserves of strength and patience. We need to keep track of these reserves and ensure they’re not wiped-out by toxic people and situations.</p><h4>Hunger</h4><p>These forces are helping drive Americans into the world of Hunger:</p><ol><li><strong>Social isolation: </strong>When you’re alone, there’s nothing to distract you from your desires.</li><li><strong>Corporate Marketing</strong>: Advertising campaigns continue stimulating the desire for things we don’t need. Corporations are overbuilding products to raise profit margins and increase consumer debt. Compare a 1965 Ford pickup truck against a 2019 model (they both can haul a half-ton):</li></ol><figure><img alt="1965 Ford pickup truck, simple and practical." src="https://cdn-images-1.medium.com/max/481/1*6zGlHLQ6GclcuFt25WKPAg.png" /><figcaption>1965 pickup truck: simple and practical</figcaption></figure><figure><img alt="2019 Ford pickup truck, big, gaudy, overbuilt" src="https://cdn-images-1.medium.com/max/990/1*YUIeKUdkSoSxWs9OVDDlyg.png" /><figcaption>2019 pickup truck: expensive and overbuilt</figcaption></figure><p>3. <strong>Intoxication</strong>: If we don’t have faith in the future we are more inclined to seek the temporary relief of intoxication. Also, many of us are self-medicating to deal with pain, depression, and anxiety.</p><p>4. <strong>Immediate gratification</strong>: our culture is geared towards instant gratification, where we buy the latest merchandise with credit cards and now…one-day shipping.</p><p>A few techniques in deflecting the world of Hunger:</p><ul><li>Make a list of what you’re grateful for</li><li>Exercise</li><li>Spending time with worthwhile friends</li><li>Meditation and prayer</li></ul><h4>Animality</h4><figure><img alt="Old Roman tile work depicting a standoff between cobra and mongoose." src="https://cdn-images-1.medium.com/max/800/1*Gk8wGwdxRw2wo_H5nf-j2Q.jpeg" /><figcaption>Photo credit: <a href="https://visualhunt.co/a3/39cf6bbe">mharrsch</a> on <a href="https://visualhunt.com/re5/65247236">Visual hunt</a> / <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/">CC BY-NC-SA</a></figcaption></figure><p>Behaviors include the domination of others and psychological displacement where negative feelings are transferred to those who are weaker. Animality breeds negativity and darkness.</p><p>These forces are helping drive Americans into the world of Animality:</p><ol><li>Failure to achieve unrealistic expectations of success</li><li>A general lack of manners and restraint in how we treat others. This is often a failure to think before we act.</li><li>Social media gives teens a convenient platform for bullying, where 59% of teens have experienced some form of <a href="https://www.pewinternet.org/2018/09/27/a-majority-of-teens-have-experienced-some-form-of-cyberbullying/">online harassment</a>. It also can polarize adults.</li><li>Embracing <a href="https://en.wikipedia.org/wiki/The_Rise_of_Victimhood_Culture">victimhood</a></li></ol><h4>Anger</h4><blockquote>Holding on to anger is like grasping a hot coal with the intent of throwing it at someone else; you are the one who gets burned. — Buddha</blockquote><figure><img alt="Glowing red hot charcoal in a pan." src="https://cdn-images-1.medium.com/max/1024/1*XM0_aJp6wqPPJiuF31U2tw.jpeg" /><figcaption>Photo by Armando Ascorve Morales on Unsplash</figcaption></figure><p>Anger has become the biggest threat to our well-being.</p><p>“I think if you look at the tenor of our dialogue and conversations, you look at what you see on social media, you cannot help but believe that we see a lot more anger. Maybe it was always there just below the surface, and we are just seeing it more because it is more available and accessible to us.” — David Schanzer</p><p>Social media breeds anger by directing people into specific camps where existing opinions are reinforced, and new more extreme views are introduced.</p><p>The “FCC fairness doctrine” required broadcasters to present controversial issues in an equitable and balanced manner from 1949 until it was eliminated in 1987. An interesting comment from Senator Jeff Bingaman (D-NM) in 2008:</p><blockquote>I would want this station and all stations to have to present a balanced perspective and different points of view. All I’m saying is that for many, many years we operated under a Fairness Doctrine in this country, and I think the country was well-served. <strong>I think the public discussion was at a higher level and more intelligent in those days than it has become since</strong>.</blockquote><p>We need to bring more class, intelligence, and respect in public discussions and bring back the fairness doctrine.</p><p>Another fuel to fire-up anger are political messages like this one: “The reason you have no jobs here is the xyz party took them from you.” Instead of presenting a positive message of what you can do, portray a negative message of the opposition and polarize the public. These tactics are widely used, they’re insulting to our intelligence, and stir up unneeded anger.</p><p>It’s very sad to see mass shootings, where Anger propels the shooters to Hell to carry out their evil deeds.</p><p>Anger is so destructive that we need to be ultra-vigilant to contain it in our lives. If this is our native world, then we should at least try to channel it to fight against injustice and wrongdoers.</p><h4>Humanity</h4><p>Although Humanity is considered a lower world I believe it is a good place to be. It can be a refuge from the other lower worlds. In times past, people had to spend more time here from necessity. I find everyday cooking, gardening, dishwashing, and exercising to be relaxing and therapeutic.</p><p>With the right attitude, these everyday activities can raise our level of peace and comfort with ourselves. Some observations:</p><ul><li>It’s fun to be average — much lower stress than being a superhero</li><li>Anonymity is peaceful</li><li>People-watching can be quite amusing</li></ul><h4>Heaven</h4><p>We can enter the world of Heaven when we attain a goal or receive some great news. Scoring the winning run in a baseball game or perhaps just getting on base. Receiving a well-deserved promotion. Getting the part you wanted in your high school play. We experience temporary euphoria and satisfaction in Heaven.</p><p>Achieving the goals of the American Dream can also put us in Heaven. There’s nothing wrong with living comfortably and experiencing some success.</p><p>However, our material expectations have risen considerably in the last 100 years. When family sizes were larger in 1920, the average size of a new single-family home was 1,048 square feet. In 2014 the size increased to 2,657 square feet for much smaller families. We expect a lot in everyday comforts: air conditioning, fast wi-fi, and lots of recreational activities.</p><p>Perhaps the best approach to the world of Heaven is taking a hard look at what we truly need, and take satisfaction from achieving modest goals. Realize that dwelling on material success too much is fraught with dangers like getting carried away with greed or becoming a narcissist.</p><blockquote>The good life in the Upper Worlds</blockquote><figure><img alt="Six people jumping for joy on a mountain ridge." src="https://cdn-images-1.medium.com/max/1024/1*TW4rHdyA5oQ30Iq0PqUeCw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@derstudi?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Timon Studler</a> on <a href="https://unsplash.com/search/photos/friends?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>Learning</h4><p>Learning can be a great refuge from Anger and Hunger. There are more Learning opportunities than ever before. There are YouTube instructional videos on countless “how-to” topics, such as the best way to cut a pineapple. Free computer programming classes are available. New online training techniques can teach complex topics with speed and precision.</p><p>The study of history can give us deep insights into human nature that help us understand the world and facilitate our interactions with others.</p><p>Another opportunity in Learning is to hone skills in observation. Try to carefully listen to others and study your surroundings. You might be surprised by what you find.</p><p>The practice of introspection (self-examination) can help us learn about ourselves to provide direction:</p><ul><li>study your thoughts and emotions to see where you are</li><li>identify strengths and weaknesses</li><li>discover your motivations and desires and tie them to a significant goal or purpose</li></ul><h4>Realization</h4><p>Realization can be seen in two ways. First, it can be seen as the development of wisdom and the discovery of truths. You can develop unique wisdom by appreciating nature, traveling, and enjoying the company of others.</p><p>Second, Realization involves creative pursuits and practices. These pursuits include music, art, and writing. A variant of creative pursuit is the expert practice and development of a craft, like making a beautiful stone patio or a quilt. Given the right circumstances, we can get lost in creativity and have a wonderful time in Realization.</p><p>If we’re fortunate to have the chance, finding Realization in the workplace by mastering a skill and applying it is healthy and rewarding.</p><p>We can experience another form of Realization by teaching our craft and sharing our knowledge with others. As with Learning, spending time in Realization might inform you of a worthwhile goal or purpose.</p><h4>Compassion</h4><figure><img alt="Two hands interlocking pinkies in friendship." src="https://cdn-images-1.medium.com/max/874/1*tJWC7V5RPtL71gMQ6FOD1Q.png" /></figure><p>We are in the world of Compassion when we appreciate another’s sufferings and want to help without getting anything in return. When we show empathy and concern for others, it may open a path to Enlightenment.</p><p>When we are focused on the welfare of others, our anxieties and issues seem to diminish.</p><p>Opportunities in Compassion:</p><ul><li>Call a friend or send an unexpected and uplifting text message</li><li>Give someone the pleasant surprise of a handwritten note or a card</li><li>Participate in volunteer opportunities at churches, veteran’s organizations, food pantries, and other community causes</li><li>Grow your relationships by tending to them with kindness and gentleness</li><li>Make a new friend</li><li>Give money to a worthy cause</li></ul><p>Pursuing Compassion is much better for our overall well-being than chasing the American Dream.</p><h4>Enlightenment</h4><p>Unlike the other worlds, the concept of Enlightenment varies greatly based on one’s view of Buddhism as a philosophy or as a specific religious tradition. In the various Buddhist traditions, you can see a discussion of these concepts in <a href="https://en.wikipedia.org/wiki/Enlightenment_in_Buddhism">Wikipedia</a>. Enlightenment can be seen as synonymous with self-realization or reaching one’s maximum potential.</p><p>In any case, Enlightenment contains a sense of strength, completeness, and contentment. It is a result of pursuing the other 3 upper worlds and continuously supports you when you find yourself in another world.</p><p>In <a href="https://www.nichirenlibrary.org/en/dic/Content/B/75">Nichiren Buddhism</a>, “The word <em>enlightenment</em> is often used synonymously with Buddhahood. Buddhahood is regarded as a state of perfect freedom, in which one is awakened to the eternal and ultimate truth that is the reality of all things. This supreme state of life is characterized by boundless wisdom and infinite compassion.”</p><p>I’ve personally visited the other nine worlds but the one described here by Nichiren seems several light-years away from me. That’s OK. As long as I have Humanity, Learning, Realization, and Compassion open to visit I have plenty of opportunities for fulfillment, sharing, and growth.</p><figure><img alt="Water droplet in a pond spreading smooth ripples." src="https://cdn-images-1.medium.com/max/1024/1*Qlhe9U2zmMRHuzyPC38ymw.jpeg" /><figcaption>Influence the world with brightness</figcaption></figure><p>I sincerely hope we can restore some of the American optimism of the past. And may your life’s journey bring you vitality, purpose, and happiness!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20c404384af7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writing a Flutter data entry form app for a rental agency]]></title>
            <link>https://medium.com/flutter-community/writing-a-flutter-data-entry-form-app-for-a-rental-agency-e5a7dab20596?source=rss-546eceb4582d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5a7dab20596</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Steve Zwart]]></dc:creator>
            <pubDate>Sun, 28 Jul 2019 18:04:04 GMT</pubDate>
            <atom:updated>2019-08-10T21:54:20.003Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GkQgY5cWP62sWl4fzvl8IQ.jpeg" /><figcaption>Courtesy rawpixel.com</figcaption></figure><h3>Application Objectives</h3><p>I’ve developed a prototype data entry form application using the Flutter UI Toolkit. I wanted to validate that it builds to a reasonable size and delivers snappy performance. I’m pleased with the results.</p><p>The target customer for this app is a US property rental agency that processes rental applications on paper forms. By deploying the app on an Android or iOS tablet, the rental agency can enable prospective clients to enter their application data without using paper forms.</p><h4>Form Design Goals</h4><ul><li>The Material data entry form should be scrollable, work in both portrait and landscape modes, and not have excessive interference from the device’s virtual on-screen keyboard.</li><li>Allow the user to take a picture as part of the form.</li><li>Prepopulate a form with external data when available.</li><li>Avoid cumbersome date pickers and long drop-downs.</li><li>Provide formatting and validation as the user types data into a form field. Specifically, provide support for United States phone numbers, Social Security numbers, Zip Codes, States and dates.</li></ul><p>The prototype code is available <a href="https://github.com/s859/rental_app">here</a>.</p><h4>The (empty) form</h4><p>The form contains ten fields plus optionally an image for the applicant’s driver license. This screenshot is from the tablet in portrait mode:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FhsyvH_8U2wpd2BLi60uTQ.png" /><figcaption>Initial empty form</figcaption></figure><h4>Form with errors</h4><p>When pressing the “Save” button, the form is validated. Notice the red highlighting of any fields in error:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*leIZDtyNjIY3uj4iRRqbKg.png" /><figcaption>Form with errors</figcaption></figure><h4>Completed Form</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dWMXa9PYcMpZDr-A67BRSA.png" /><figcaption>Completed form</figcaption></figure><p>The “Apply” button is used to send an email to the rental agency with the form data.</p><p>Internally, the form is used to create an Applicant object with load, save, and processing methods:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/db62839404beab608459697adcc9a871/href">https://medium.com/media/db62839404beab608459697adcc9a871/href</a></iframe><h4>Input decoration for form fields</h4><p>This InputDecoration provides the form fields with a blue, rounded rectangular frame and highlights a field when it receives focus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*Ng381j8DhFoWrFMCeDQpyA.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b44e67d5ba964a8790ad53e87e83fffd/href">https://medium.com/media/b44e67d5ba964a8790ad53e87e83fffd/href</a></iframe><h4>Making the form scrollable</h4><p>The following widget hierarchy enables the scrollable form. A key player is the ListView:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*L4OrOAaNLKEy2yB8gXmn7w.png" /><figcaption>Form Widget Hierarchy</figcaption></figure><h4>Taking a picture</h4><p>I initially used the camera plugin following this <a href="https://flutter.dev/docs/cookbook/plugins/picture-using-camera">procedure</a> from the Flutter cookbook. Although the camera plugin worked, I experienced much better results using the <a href="https://pub.dev/packages/image_picker">image_picker</a> package which can take a new picture with the camera and includes the native camera app controls. It worked well on both the phone and the tablet.</p><p>When capturing an image of a driver’s license (or another form of ID card) it is useful to note that the height is 63% of the width. Specifying a width of 400.00 with a height of 252.0 (63%) displays the image well on the phone and tablet. These settings do not override the device camera settings used to take pictures, they only reflect in the size of the displayed image in the Flutter app. The following is image_picker code (based on the plugin sample) using these settings.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/093026aac51feab219ae99644e23df2e/href">https://medium.com/media/093026aac51feab219ae99644e23df2e/href</a></iframe><h4>Prepopulating the form with saved data</h4><p>To provide persistence across app launches, I store the form data in JSON format in a local device file. Even though the data is stored locally, obtaining the app documents directory location has to be performed asynchronously, as specified in the path_provider package:</p><pre>import &#39;dart:io&quot; as io;</pre><pre>Future&lt;bool&gt; loadApplicant() async {<br> bool status = false;</pre><pre>directory = <strong>await</strong> getApplicationDocumentsDirectory();<br> pathName = directory.path + “/save.json”;<br> applicantFile = io.File(pathName);</pre><p>To load the data into the form, it requires an override of initState that invokes a <strong>getApplicant</strong> method to load the data at screen initialization:</p><pre><a href="http://twitter.com/override">@override</a><br> void initState() {<br> super.initState();<br> <strong>getApplicant</strong>();<br> }</pre><pre>getApplicant() async {<br>    Future&lt;bool&gt; loaded;<br>    loaded = applicant.loadApplicant();<br>    <strong>loaded.then</strong>(<br>      (value) {<br>        _nameTextController.text = applicant.name;<br>        _cellPhoneNumberTextController.text = applicant.cellPhoneNumber;<br>        _workPhoneNumberTextController.text = applicant.workPhoneNumber;<br>        _emailTextController.text = applicant.email;<br>        _birthdayTextController.text = applicant.birthday;<br>        _ssnTextController.text = applicant.ssn;<br>        _streetTextController.text = applicant.street;<br>        _cityTextController.text = applicant.city;<br>        _stateTextController.text = applicant.state;<br>        _zipTextController.text = applicant.zip;<br>        <strong>setState</strong>(() {});<br>      },<br>    );<br>  }</pre><p>The “loaded.then” registers a callback to execute the text field assignments and setState, which make the form fields populate with data. Before I implemented “loaded.then”, the app would display the form if built in debug mode, but not if built in release mode. Timing is <em>everything</em>!</p><h4>Formatting and Validation of Form Fields</h4><p>These properties are used to provide proper formatting and validation of TextFormFields:</p><ul><li><strong>keyboardType</strong>: Helps the user enter the right characters, for instance using the numeric keyboard for phone numbers.</li><li><strong>TextEditingController</strong>: Uses a TextInputFormatter to provide as-you-type formatting, for instance formatting a telephone number 1234567890 as (123) 456–7890.</li><li><strong>validator</strong>: Ensures the data is complete and valid. The “Save” button makes sure all form fields validate before saving the form. Using regular expressions in the validators provides effective matching.</li></ul><pre>if (_formKey.currentState.<strong>validate</strong>()) {<br>   // The save method saves the form so you can access the fields.<br>   _formKey.currentState.<strong>save</strong>();<br>   applicant.saveApplicant();</pre><ul><li><strong>inputFormatters</strong>: restrict field lengths and prohibit entry of certain characters</li></ul><h4>Input formatters</h4><p>The following set of TextInputFormatters provides as-you-type formatting for United States phone numbers, Social Security numbers, Zip Codes, and dates:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/12c0e2fa2715e3ef1031ace9309c0c78/href">https://medium.com/media/12c0e2fa2715e3ef1031ace9309c0c78/href</a></iframe><p>The following are code snippets for specific fields.</p><h4>US Phone Number</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ac3fd4f06a5ebf1d0b4dc2aea9926230/href">https://medium.com/media/ac3fd4f06a5ebf1d0b4dc2aea9926230/href</a></iframe><h4>US Social Security Number</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/90c0d64ac8c8edaf54eacbfa29e9d611/href">https://medium.com/media/90c0d64ac8c8edaf54eacbfa29e9d611/href</a></iframe><h4>US State abbreviations</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8da8f6fa9f3c807e47c11d3e8a418097/href">https://medium.com/media/8da8f6fa9f3c807e47c11d3e8a418097/href</a></iframe><h4>US Zip Code</h4><p>The Zip Code format can be either 5 digits or Zip+4 format.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6fac74e7275be427fb90439d46612771/href">https://medium.com/media/6fac74e7275be427fb90439d46612771/href</a></iframe><h4>US Date</h4><p>Format mm/dd/yyyy with the year being from 1900 to 2099.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a4be83244972b7f5f9bb3e779ee2979c/href">https://medium.com/media/a4be83244972b7f5f9bb3e779ee2979c/href</a></iframe><h4>Deployment Size and Performance</h4><p>The phone device used in testing is an LG K20V running Android 7.0. The tablet is an Acer Iconia One B3-A50FHD running Android 8.0.</p><p>When building in release mode, the .apk size is 8MB, which is reasonable. Flutter itself occupies 5.5MB in the .apk.</p><p>On initial load, the app starts in 0.75 seconds on the phone and 1.25 seconds on the tablet. The form screen appears in 0.5 seconds and there is no lag navigating between form fields.</p><p>There are two minor usability issues:</p><ol><li>Error messages for form fields are sometimes truncated on the phone, especially in portrait mode.</li><li>There isn’t a tab function to jump to the next form field. There is an open flutter issue (#32778) concerning this.</li></ol><h4>Package dependencies</h4><p>The form itself didn’t require any external packages, only native Flutter widgets. Other packages were used to add functionality to the prototype:</p><pre>rflutter_alert: ^1.0.3<br> <br> Used to deliver a screen alert when the form is saved or sent</pre><pre>image_picker: ^0.6.0+16</pre><pre>Takes a picture.</pre><pre>path_provider: ^1.1.2</pre><pre>Provides a local device path for the picture.</pre><pre>flutter_mailer: ^0.4.1+1</pre><pre>Sends the form application by email.</pre><h4>Summary</h4><ol><li>The Flutter UI Toolkit provides the capabilities to build a functional and performant data entry app.</li><li>A helpful reference article in developing the app: “<a href="https://medium.com/flutter-community/realistic-forms-in-flutter-part-1-327929dfd6fd">Realistic Forms in Flutter — Part 1</a>”</li><li>I hope the formatting and implementation techniques described here are useful in the Flutter community!</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5a7dab20596" width="1" height="1" alt=""><hr><p><a href="https://medium.com/flutter-community/writing-a-flutter-data-entry-form-app-for-a-rental-agency-e5a7dab20596">Writing a Flutter data entry form app for a rental agency</a> was originally published in <a href="https://medium.com/flutter-community">Flutter Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>