<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: sunflowerseed</title>
    <description>The latest articles on Forem by sunflowerseed (@sunflower).</description>
    <link>https://forem.com/sunflower</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F317960%2F5b8c03f1-8aaf-42af-8996-9197134315b1.png</url>
      <title>Forem: sunflowerseed</title>
      <link>https://forem.com/sunflower</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sunflower"/>
    <language>en</language>
    <item>
      <title>A 5 minute guide to nvm</title>
      <dc:creator>sunflowerseed</dc:creator>
      <pubDate>Sun, 28 Mar 2021 11:58:53 +0000</pubDate>
      <link>https://forem.com/sunflower/a-5-minute-guide-to-nvm-414d</link>
      <guid>https://forem.com/sunflower/a-5-minute-guide-to-nvm-414d</guid>
      <description>&lt;p&gt;To have multiple versions of &lt;code&gt;node&lt;/code&gt; and &lt;code&gt;npm&lt;/code&gt; on our machine, we can use &lt;code&gt;nvm&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The official docs of &lt;code&gt;nvm&lt;/code&gt; is on: &lt;a href="https://github.com/nvm-sh/nvm"&gt;https://github.com/nvm-sh/nvm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we only need one version of &lt;code&gt;node&lt;/code&gt; and &lt;code&gt;npm&lt;/code&gt;, then we may not need &lt;code&gt;nvm&lt;/code&gt;, but to solve the problem of the write permission, we can use: &lt;a href="https://dev.to/sunflower/don-t-run-sudo-npm-install-g-the-simplest-way-to-make-it-work-30e5"&gt;https://dev.to/sunflower/don-t-run-sudo-npm-install-g-the-simplest-way-to-make-it-work-30e5&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a quick start guide:&lt;/p&gt;

&lt;h1&gt;
  
  
  To install &lt;code&gt;nvm&lt;/code&gt;
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh &lt;span class="nt"&gt;-o&lt;/span&gt; install_nvm.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or because Ubuntu doesn't have &lt;code&gt;curl&lt;/code&gt; by default, we can also use &lt;code&gt;wget&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh &lt;span class="nt"&gt;-O&lt;/span&gt; install_nvm.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and we can look at &lt;code&gt;install_nvm.sh&lt;/code&gt; -- I usually don't like to &lt;code&gt;curl&lt;/code&gt; and directly pipe it to &lt;code&gt;bash&lt;/code&gt;, because it is like we don't even know what was running. So then we download it, and can run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash install_nvm.sh
&lt;span class="nb"&gt;source&lt;/span&gt; ~/.profile     &lt;span class="c"&gt;# no need to do it after reboot&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Useful commands
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvm ls-remote       &lt;span class="c"&gt;# to see all available versions&lt;/span&gt;
nvm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--lts&lt;/span&gt;   &lt;span class="c"&gt;# install the latest LTS (long term support) version&lt;/span&gt;
nvm &lt;span class="nb"&gt;install &lt;/span&gt;node    &lt;span class="c"&gt;# install the latest&lt;/span&gt;
nvm which current   &lt;span class="c"&gt;# tells the path of current node&lt;/span&gt;
nvm &lt;span class="nb"&gt;ls&lt;/span&gt;              &lt;span class="c"&gt;# tells what are all the node versions we have&lt;/span&gt;
nvm &lt;span class="nb"&gt;ls &lt;/span&gt;current      &lt;span class="c"&gt;# tells the version we are using&lt;/span&gt;
nvm use             &lt;span class="c"&gt;# use the .nvmrc specified version if any&lt;/span&gt;
nvm use 14          &lt;span class="c"&gt;# use the version 14.x.x&lt;/span&gt;
nvm use 15          &lt;span class="c"&gt;# use 15.x.x&lt;/span&gt;
nvm use &lt;span class="nt"&gt;--lts&lt;/span&gt;       &lt;span class="c"&gt;# use the latest LTS&lt;/span&gt;
nvm use node        &lt;span class="c"&gt;# use the latest&lt;/span&gt;
nvm use system      &lt;span class="c"&gt;# use the system's version of node&lt;/span&gt;
nvm &lt;span class="nb"&gt;alias &lt;/span&gt;default 14.16.0   &lt;span class="c"&gt;# set the default version to use&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As of 2021 March, all we need to do is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--lts&lt;/span&gt;   &lt;span class="c"&gt;# install the latest LTS (long term support) version&lt;/span&gt;
nvm &lt;span class="nb"&gt;install &lt;/span&gt;node    &lt;span class="c"&gt;# install the latest&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and then depending on which one we want to use (version &lt;code&gt;14.16.0&lt;/code&gt; which is LTS, or version &lt;code&gt;15.13.0&lt;/code&gt;, which is the latest), we can just use&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvm use 14     &lt;span class="c"&gt;# or&lt;/span&gt;
nvm use 15
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to switch between them.&lt;/p&gt;

</description>
      <category>nvm</category>
      <category>node</category>
    </item>
    <item>
      <title>Don't run `sudo npm install -g` -- the simplest way to make it work</title>
      <dc:creator>sunflowerseed</dc:creator>
      <pubDate>Sun, 28 Mar 2021 05:06:33 +0000</pubDate>
      <link>https://forem.com/sunflower/don-t-run-sudo-npm-install-g-the-simplest-way-to-make-it-work-30e5</link>
      <guid>https://forem.com/sunflower/don-t-run-sudo-npm-install-g-the-simplest-way-to-make-it-work-30e5</guid>
      <description>&lt;p&gt;When we do&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--global&lt;/span&gt; something
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;we may get permission errors.  Some solution is to use &lt;code&gt;sudo&lt;/code&gt; with that line, but it can be dangerous to let go of the full control of your computer to some &lt;code&gt;npm&lt;/code&gt; install process.&lt;/p&gt;

&lt;h2&gt;
  
  
  There is one simple solution
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; ~/.my-npm-global
npm config &lt;span class="nb"&gt;set &lt;/span&gt;prefix &lt;span class="s1"&gt;'~/.my-npm-global'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and then, add this line to both your &lt;code&gt;~/.profile&lt;/code&gt; and &lt;code&gt;~/.bashrc&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# add to both .profile and .bashrc&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;~/.my-npm-global/bin:&lt;span class="nv"&gt;$PATH&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and then, either quit the Bash shell or just start a new one by typing &lt;code&gt;bash&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;And now we can do the installation line above, the shorthand:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i &lt;span class="nt"&gt;-g&lt;/span&gt; something
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Some notes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;We actually should only add to &lt;code&gt;.profile&lt;/code&gt;, instead of &lt;code&gt;.bashrc&lt;/code&gt;. But if we don't care about remote login, that's ok.  We can even just add it to &lt;code&gt;.bashrc&lt;/code&gt; in that case. (see reference 2 below)&lt;/li&gt;
&lt;li&gt;Otherwise, if we care of make it all perfect, then that line should be only added to &lt;code&gt;.profile&lt;/code&gt;, but then we will need to reboot our computer&lt;/li&gt;
&lt;li&gt;Or we can add it to our &lt;code&gt;.bashrc&lt;/code&gt; also, and then remove it next time after a reboot&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Reference:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/33725639/npm-install-g-less-does-not-work-eacces-permission-denied"&gt;https://stackoverflow.com/questions/33725639/npm-install-g-less-does-not-work-eacces-permission-denied&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://superuser.com/questions/183870/difference-between-bashrc-and-bash-profile"&gt;https://superuser.com/questions/183870/difference-between-bashrc-and-bash-profile&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>npm</category>
      <category>node</category>
    </item>
    <item>
      <title>The only two values in JavaScript that is a === b, but operation using them give different results</title>
      <dc:creator>sunflowerseed</dc:creator>
      <pubDate>Tue, 16 Mar 2021 07:28:06 +0000</pubDate>
      <link>https://forem.com/sunflower/the-only-two-values-in-javascript-that-is-a-b-but-operation-using-them-give-different-results-8gj</link>
      <guid>https://forem.com/sunflower/the-only-two-values-in-javascript-that-is-a-b-but-operation-using-them-give-different-results-8gj</guid>
      <description>&lt;p&gt;This is the quiz for today...&lt;/p&gt;

&lt;p&gt;&lt;code&gt;a === b&lt;/code&gt; gives &lt;code&gt;true&lt;/code&gt;&lt;br&gt;
yet if you use them for the same operation, they give different results.&lt;/p&gt;

&lt;p&gt;What are they?&lt;/p&gt;

&lt;p&gt;The answer is...&lt;/p&gt;

&lt;p&gt;Scroll down to see it...&lt;/p&gt;

&lt;p&gt;Or do you want more times to think about it.&lt;/p&gt;

&lt;p&gt;It is not a trick question.&lt;/p&gt;

&lt;p&gt;And the answer is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;   &lt;span class="c1"&gt;// gives true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;but  &lt;code&gt;1 / a&lt;/code&gt; and &lt;code&gt;1 / b&lt;/code&gt; give different results. &lt;br&gt;
The first one is &lt;code&gt;Infinity&lt;/code&gt;. The second one is &lt;code&gt;-Infinity&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>How to get data from API and show static data from server using NextJS?</title>
      <dc:creator>sunflowerseed</dc:creator>
      <pubDate>Thu, 11 Mar 2021 03:31:41 +0000</pubDate>
      <link>https://forem.com/sunflower/how-to-get-data-from-api-and-show-static-data-from-server-using-nextjs-2l7i</link>
      <guid>https://forem.com/sunflower/how-to-get-data-from-api-and-show-static-data-from-server-using-nextjs-2l7i</guid>
      <description>&lt;p&gt;It'd be simple to write a React app in 3 minutes to get the weather data from &lt;a href="https://api.weather.gov/gridpoints/TOP/31,80/forecast"&gt;https://api.weather.gov/gridpoints/TOP/31,80/forecast&lt;/a&gt; and show it on the page, except we cannot show the data if it is a search engine looking into our page.  &lt;/p&gt;

&lt;p&gt;Example: &lt;a href="https://codesandbox.io/s/quizzical-hooks-wdd9u?file=/src/App.js"&gt;https://codesandbox.io/s/quizzical-hooks-wdd9u?file=/src/App.js&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In other words, if we &lt;code&gt;curl&lt;/code&gt; our page, we won't be able to see the weather info.  Anybody know how to do it in 5 minutes using NextJS?  Any other alternatives other than NextJS?  Many thanks.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>question</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Do we really use useContext() in React?</title>
      <dc:creator>sunflowerseed</dc:creator>
      <pubDate>Wed, 03 Mar 2021 14:32:19 +0000</pubDate>
      <link>https://forem.com/sunflower/do-we-really-use-usecontext-in-react-4i5h</link>
      <guid>https://forem.com/sunflower/do-we-really-use-usecontext-in-react-4i5h</guid>
      <description>&lt;p&gt;It was once said that we either just React and state, or React with Redux or MobX, and that we really don't use Context.&lt;/p&gt;

&lt;p&gt;The reason was that any change in Context may cause every single component to be re-rendered, versus, if we use Redux, then the global store passes the value in as props, so that only the "affected" components get re-rendered.&lt;/p&gt;

&lt;p&gt;Is that still the case with useContext() or Context API?&lt;/p&gt;

&lt;p&gt;I read the &lt;a href="https://reactjs.org/docs/hooks-reference.html"&gt;React Hooks docs&lt;/a&gt; and it said that the 3 most used Hooks are &lt;code&gt;useState&lt;/code&gt;, &lt;code&gt;useEffect&lt;/code&gt;, and &lt;code&gt;useContext&lt;/code&gt;, so it kind of get me puzzled that I thought Context is rarely used.&lt;/p&gt;

</description>
      <category>react</category>
      <category>hooks</category>
      <category>question</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Why do programmers say when they use tmux, their productivity shoot up the roof?</title>
      <dc:creator>sunflowerseed</dc:creator>
      <pubDate>Wed, 08 Apr 2020 13:18:31 +0000</pubDate>
      <link>https://forem.com/sunflower/why-do-programmers-say-when-they-use-tmux-their-productivity-shoot-up-the-roof-bl8</link>
      <guid>https://forem.com/sunflower/why-do-programmers-say-when-they-use-tmux-their-productivity-shoot-up-the-roof-bl8</guid>
      <description>&lt;p&gt;Isn't &lt;code&gt;tmux&lt;/code&gt; just a tool so that when you get disconnected, you still can come back to the process or command you were running, such as a Rails or Django server?&lt;/p&gt;

&lt;p&gt;That's it?  How come then people say when they have &lt;code&gt;tmux&lt;/code&gt;, it is like their productivity has shot up the roof?&lt;/p&gt;

&lt;p&gt;If they start a day's work and the &lt;code&gt;ssh&lt;/code&gt; never disconnected, isn't it all the same?&lt;/p&gt;

</description>
      <category>tmux</category>
      <category>discuss</category>
      <category>question</category>
    </item>
    <item>
      <title>Sharing a story how chaotic your small company was?</title>
      <dc:creator>sunflowerseed</dc:creator>
      <pubDate>Fri, 27 Mar 2020 09:17:44 +0000</pubDate>
      <link>https://forem.com/sunflower/sharing-a-story-how-chaotic-your-small-company-was-3b9j</link>
      <guid>https://forem.com/sunflower/sharing-a-story-how-chaotic-your-small-company-was-3b9j</guid>
      <description>&lt;p&gt;In the old days, a hi-tech company was really a hi-tech company. These days, I found that it can be a soft drink and potato chip delivery service and now it is a hi-tech company.&lt;/p&gt;

&lt;p&gt;Do you have some story to share about how chaotic your hi-tech company was?  You can just call it the "E" company or "XYZ" company to hide the identity.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>startup</category>
    </item>
    <item>
      <title>It is better to write something complicated that people find it hard to understand</title>
      <dc:creator>sunflowerseed</dc:creator>
      <pubDate>Tue, 24 Mar 2020 07:28:40 +0000</pubDate>
      <link>https://forem.com/sunflower/it-is-better-to-write-something-complicated-1d29</link>
      <guid>https://forem.com/sunflower/it-is-better-to-write-something-complicated-1d29</guid>
      <description>&lt;p&gt;I found that if I don't understand something that well, I can write some blog post, and people find it hard to understand, and they say, "this guy is good. He knows many complicated concepts."&lt;/p&gt;

&lt;p&gt;But if I invest extra time to understand it really well, and write it and explain it even a 15 year old can understand, then some people come and read it, and conclude "it is so simple. This guy is just basic. There is nothing really that great." And they lose respect for you.&lt;/p&gt;

&lt;p&gt;But I think it is just one of the IIJTWII: It is just the way it is.&lt;/p&gt;

&lt;p&gt;Let me add the background to this story:  I was interviewing with a company, and the VP Engineering wanted to hire me even as a director of front end.  And we were talking, and the VP had me talk to the CEO and COO.  Along this time, I was writing something, and I can make it complicated, but I made it so simple that even a 15 year old can understand it. Possibly the CEO and the COO searched on the Internet and saw those newest posts, they actually later on retracted and wanted to only hire me as a consultant or contractor to try for 3 months first, instead of being the director of front end.  These events all happened about the same time, so I think it could be due to the CEO and COO seeing something so simple, they lost the respect for it.  It may be like, when people cannot understand relativity or quantum mechanics, they have a lot of respect for it, but let's say somebody is so good in them and can explain them so that they can be understood as easily as Newtonian physics, then people would lose respect for it.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>I noticed being a contractor earn 40% to 50% less, and no 401K, no ESPP, no insurances, no vacations</title>
      <dc:creator>sunflowerseed</dc:creator>
      <pubDate>Tue, 24 Mar 2020 06:55:59 +0000</pubDate>
      <link>https://forem.com/sunflower/i-noticed-being-a-contractor-earn-40-to-50-less-and-no-401k-no-espp-no-insurances-3ib1</link>
      <guid>https://forem.com/sunflower/i-noticed-being-a-contractor-earn-40-to-50-less-and-no-401k-no-espp-no-insurances-3ib1</guid>
      <description>&lt;p&gt;So who wants to be a contractor really?&lt;/p&gt;

&lt;p&gt;I noticed there are some cases but beyond that I don't understand:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Programmers who hop from job to job for 4 months and sometimes 6 or 8 months... but by the time they are familiar with the system, they move on. (and why does the company not want to keep them longer?)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Apple hires many contractor programmers, maybe perhaps programmers don't mind getting paid less but having the Apple name on their resume? But after 1 year of being paid 50% less, do you still want to work there? It can be like taking away $50,000 or $60,000 away from you.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I noticed I should not say "no vacation, holidays, sick days, bonuses, stock bonus"... that's because all those already got factored into the salary difference already. Actually, I guess holidays do... because contractor and Full Time Employee both take them, with the final salaries being compared. But vacation and sick days... if contractor decide to take 3 weeks off, then no pay -- meaning a pay cut. But if Full Time Employee take them, it is included as part of their package every year and there is no pay cut.&lt;/p&gt;

&lt;p&gt;So the final version should be: 50% less pay, and also no 401K, no ESPP, no insurances (health, life, vision, dental), no vacation, no sick days. (about 3 weeks or 120 hours each year).&lt;/p&gt;

</description>
      <category>salary</category>
      <category>contractor</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Why delete my comment?</title>
      <dc:creator>sunflowerseed</dc:creator>
      <pubDate>Thu, 19 Mar 2020 15:40:01 +0000</pubDate>
      <link>https://forem.com/sunflower/why-delete-my-comment-1fgo</link>
      <guid>https://forem.com/sunflower/why-delete-my-comment-1fgo</guid>
      <description>&lt;p&gt;Once I wrote something and it worked well in Chrome and Firefox, but Internet Explorer had some behavior that made it not work well, so I tweaked it, and add the comment there, saying it is done this way or else it won't work well in IE.&lt;/p&gt;

&lt;p&gt;So my coworker saw the code, and out right removed every single word of the comment.&lt;/p&gt;

&lt;p&gt;If I ask her why she removed it, she'd answer something like, "it is no use". And if I say, "it needs to say why we do it this way but not the more obvious way." And she'd say something like "we write code, not comment". Together, she would throw in some tone, some attitude, and some temper.&lt;/p&gt;

&lt;p&gt;I really don't understand why useful comments would be removed.  So another programmer can see my code, spend 20 minutes refactoring my code, and then commit it, and now it is 20 minutes wasted, to introduce a bug back into IE.&lt;/p&gt;

</description>
      <category>comment</category>
    </item>
    <item>
      <title>One of the most evil things: let the user type for 15 minutes and blank out his textbox</title>
      <dc:creator>sunflowerseed</dc:creator>
      <pubDate>Wed, 18 Mar 2020 05:12:58 +0000</pubDate>
      <link>https://forem.com/sunflower/one-of-the-most-evil-things-30co</link>
      <guid>https://forem.com/sunflower/one-of-the-most-evil-things-30co</guid>
      <description>&lt;p&gt;That's one of the most evil thing a webpage can do to a user.&lt;/p&gt;

&lt;p&gt;Let the user type for 15 minutes for the blog, and then when somethings is wrong: maybe a JavaScript error, or server error, then simply blank the whole textbox out, and let the user re-type the whole content.&lt;/p&gt;

&lt;p&gt;Have you had that experience here or in other website?&lt;/p&gt;

&lt;p&gt;Funny thing, sometimes I mentioned that in an interview, and the interviewer sounded like they don't care at all.&lt;/p&gt;

&lt;p&gt;And this kind of things are still happening, including dev.to&lt;/p&gt;

&lt;p&gt;I think it happened to me because of some server error, or somebody pushed the wrong JS to the site causing a temporary bug.&lt;/p&gt;

&lt;p&gt;Tell us if you have similar experiences, or what you consider one of the most evil things a webpage can do to you.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>bug</category>
      <category>devto</category>
    </item>
    <item>
      <title>Should Web API be limited to RESTful?</title>
      <dc:creator>sunflowerseed</dc:creator>
      <pubDate>Tue, 17 Mar 2020 03:26:34 +0000</pubDate>
      <link>https://forem.com/sunflower/should-web-api-be-limited-to-restful-cej</link>
      <guid>https://forem.com/sunflower/should-web-api-be-limited-to-restful-cej</guid>
      <description>&lt;p&gt;Actually, should Web API be limited to RESTful?&lt;/p&gt;

&lt;p&gt;I remember in 2008, it was more like custom-made API made by our backend team, and it can be anything.&lt;/p&gt;

&lt;p&gt;But around 2010, it was RESTful every where, and it seemed all Web API was RESTful.&lt;/p&gt;

&lt;p&gt;Today in 2020, GraphQL tend to be "custom-made" or "anything".&lt;/p&gt;

&lt;p&gt;Should we design Web API today as RESTful or just "anything" or "custom made"?  Can we have an API that is partly RESTful and just about anything?  Then it will be RESTful together with something similar to GraphQL that can return custom data.&lt;/p&gt;

</description>
      <category>restful</category>
      <category>webapi</category>
      <category>graphql</category>
    </item>
  </channel>
</rss>
