<?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>DEV Community: Code Hunter</title>
    <description>The latest articles on DEV Community by Code Hunter (@code-hunter).</description>
    <link>https://dev.to/code-hunter</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%2F1269324%2Faad25f56-15dc-4528-aa64-36a08ff81aef.png</url>
      <title>DEV Community: Code Hunter</title>
      <link>https://dev.to/code-hunter</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/code-hunter"/>
    <language>en</language>
    <item>
      <title>Is Fiverr, Upwork, Freelancer just clickbait?</title>
      <dc:creator>Code Hunter</dc:creator>
      <pubDate>Wed, 31 Jan 2024 11:30:22 +0000</pubDate>
      <link>https://dev.to/code-hunter/is-fiverr-upwork-freelancer-just-clickbait-128m</link>
      <guid>https://dev.to/code-hunter/is-fiverr-upwork-freelancer-just-clickbait-128m</guid>
      <description>&lt;p&gt;Something is just not right. I cant put my finger on it. Just like 'smelly code', you know it will trip you over but you cant see why (yet).&lt;/p&gt;

&lt;p&gt;For some time now I am having that same feeling with Fiverr, Upwork, Freelancer and many other job sites. Suddenly it hit me, they are just 'clickbaiting' us. Let me explain.&lt;/p&gt;

&lt;p&gt;This morning I was reading several posts here on Dev and than I switched back to my email inbox. There was a email from Malt (another freelance platform). It said: &lt;em&gt;'Now the freelance projects on Malt are covered by a new insurance company, so now you can work with piece of mind'&lt;/em&gt; I am thinking: '&lt;em&gt;This is not right&lt;/em&gt;'. If you work as a freelancer and have to pass the ownership of your fruits of labor to the customer, THEY become the owner, so if something goes wrong, it is THEIR responsibility! If that company is not able to take on that responsibility -due to lack of knowledge in that field- than they should not hire a freelancer, they should contract another company as a service. Than that company can get the ownership of any problem. The company that owns the product/service/code is liable. It is a simple rule. Incorporated companies are based on that rule. &lt;/p&gt;

&lt;p&gt;It seems that we live in a time, that all responsibilities are getting pushed down to the people that had no stake in the decisions but are made responsible for EVERYTHING. &lt;/p&gt;

&lt;p&gt;We get 'baited' all day long and have to 'click' to accept insane conditions. It is like getting strip-searched just to enter a plane. &lt;/p&gt;

&lt;p&gt;Why this need to humiliate us all day long? So finally it hit me, this is what Fiverr, Freelancer and Upwork are actually doing. Want work? (bait), than click here and accept our (crappy) terms. But they dont deliver. They dont give answers, they dont solve problems. Anything that is not in your favor is ALWAYS YOUR FAULT. &lt;br&gt;
Their fees and conditions are crazy. Many times I think the posted projects are posted by their own AI to give the illusion that there is lots of work.&lt;/p&gt;

&lt;p&gt;Couple of weeks ago gigs on Fiverr where finally ramping up and out of the blue I get an email from Fiverr saying that they suspect me of identity fraud. I have been on Fiverr for 12 years as a buyer and seller, never a payment problem and 5 star ratings. So I get that email. My account gets blocked and that is it. One email and you are out. No why or how or what. Nothing. &lt;/p&gt;

&lt;p&gt;Upwork does it different. I can work there, but for '&lt;em&gt;my own safety&lt;/em&gt;' they will never transfer my earned funds to my bank account. Who dreams up these crazy excuses? &lt;/p&gt;

&lt;p&gt;There is tons of work out there but due to the limited flow of official money people can not hire other people. Did you know that the American economy &lt;strong&gt;exploded&lt;/strong&gt;, when they kicked out the British and started their own currency. Dont take my word for it, this is what Benjamin Franklin talked about a lot when he was the ambassador for the USA in the UK. It is still true today.&lt;br&gt;
The last example is the wealth that the crypto boom created. The clickbait governments/organizations dont allow you to spent them. &lt;/p&gt;

&lt;p&gt;We need to empower ourselves and stop baiting what the people in power have dreamed up for us. It is leading us nowhere. A case in point: Why are there no job marketplaces that DONT reek all over like power hungry humiliators? &lt;/p&gt;

&lt;p&gt;We all deserve more. Tips/suggestions, please leave them in the comments.&lt;/p&gt;

</description>
      <category>freelance</category>
      <category>career</category>
      <category>community</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Bash libraries as a repo for your most awesome code</title>
      <dc:creator>Code Hunter</dc:creator>
      <pubDate>Tue, 30 Jan 2024 13:05:09 +0000</pubDate>
      <link>https://dev.to/code-hunter/bash-libraries-as-a-repo-for-your-most-awesome-code-5hd7</link>
      <guid>https://dev.to/code-hunter/bash-libraries-as-a-repo-for-your-most-awesome-code-5hd7</guid>
      <description>&lt;p&gt;If you are doing something long enough you build up a cool library of code snippets that you want to reuse in your projects over and over again. For bash coders this is no different. I write A LOT of networking related bash scripts (like really a lot). In these scripts many things repeat over and over again, like: &lt;em&gt;What is the IP subnet?&lt;/em&gt;, &lt;em&gt;what is my gateway?&lt;/em&gt;, &lt;em&gt;what is my Internet exit IP?&lt;/em&gt; They are all one line of code, but here is the rub: The more advanced the networking scripts get, the more ninja the forces become to break your one-liners. So a simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl ifconfig.me
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;grows into a bash function that deals with things like /etc/resolv.conf being eaten 'by some mysterious force', or 'ifconfig.me' being down. More likely than ifconfig.me being down, is some cloud AI thinking you are neferious. No problem we just ask 'ipinfo.io/ip' or '&lt;a href="https://ident.me/"&gt;https://ident.me/&lt;/a&gt;'. The Internet being what it is, lets place curl inside a firejail to pro-actively mitigate any future exploits (again) of curl. Now your one-liner has grown into:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;${FIREJAIL} --profile=/usr/local/etc/firejail/curl.profile \
     --net=${NIC} --dns=${FULL_GW} --defaultgw=${FULL_GW} \
     ${CURL} -m 2 ${PUBLIC_IP_LOOKUP[${X}]}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This way a simple ping becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#=== Check if GW router is up ------------------------
${FIREJAIL} --profile=/usr/local/etc/firejail/ping.profile \
     --net=${NIC} --defaultgw=${FULL_GW} ${FJ_NET_ARGS} \
     ${PING} -c 1 -W 1 ${DNS_IP} &amp;gt; /dev/null 2&amp;gt;&amp;amp;1
if [[ $? -eq 1 ]]; then return 1; fi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see things grow and grow. In one script I learn one thing, in another bash script project I learn something else like: '&lt;em&gt;Wow things can get really screwy&lt;/em&gt;'. So my ninja code gets more ninja. I move on to other things and months later I remember that I had this cool code but cant remember all the details but I know &lt;strong&gt;I WANT that code&lt;/strong&gt; in this project. &lt;/p&gt;

&lt;p&gt;Believe me when I say: copy-and-pasting of this code is NOT a good idea! Why? All the time you learn something new, adjust the code, change it some more and all that you remember is that you have this awesome code snippet that deals with 'X'.  The way to keep your future self happy it to place all your battle hardened code into a library that you can link to from all your scripts. So when you update your code in your library, ALL your scripts will benefit from it instantly!&lt;/p&gt;

&lt;p&gt;Now for my &lt;strong&gt;secret sauce&lt;/strong&gt;🔥😝  to do this well:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#=== Load my battle hardened code library ------------------
CFG_DIR="${HOME}/mycode/libs/"
LOAD_LIB=0
. ${CFG_DIR}/networking.lib
if [[ ${LOAD_LIB} -ne 1 ]]; then \
   echo 'Abort: Missing  Library'; exit 9; fi

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before I explain how it works, you HAVE to add the following line to the END of your library file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LOAD_LIB=1
#===[EOF]===
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So it works like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;CFG_DIR&lt;/code&gt; is just a variable with the path to your bash library files&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;. ${CFG_DIR}/networking.lib&lt;/code&gt; this is the bash command for loading/including your additional source code. In this case your networking library. Nothing too special. The magic happens next.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;LOAD_LIB=0&lt;/code&gt; &lt;strong&gt;this is key&lt;/strong&gt;. You set the value to -say- &lt;code&gt;0&lt;/code&gt; and you added LOAD_LIB=1 to the end of your library file, so when bash loads you library file, it parses all the lines. Right at the end it comes across &lt;code&gt;LOAD_LIB=1&lt;/code&gt; and set the value to 1. It will never reach to that line if there is an error within the library file. We use this for the next step&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;if [[ ${LOAD_LIB} -ne 1 ]]; then&lt;/code&gt; So if all goes well, bash has loaded and parsed all lines and update the LOAD_LIB variable. All we have to do now is to test for it, LOAD_LIB being &lt;code&gt;1&lt;/code&gt;. If not, abort, abort, abort.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now all the functions in your library are available to your script. You can free your mind from many details and focus on your new code. You only have to remember the simple call from your script &lt;code&gt;WhatIsMyIP&lt;/code&gt;. You can forget about all the hard work to make this happen. Your function is there for you, dealing with all the real world obstacles to get to the answer. You can count on it that it will deliver. It is a  gift from your past-self to your current-self. With the library you are creating this awesome team of you, your past-self and your future-self. Your past-self has your current-self covered and both of you are working on gifts for your future-self. Coding is VERY rewarding.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some words on bash and why I love it so much. Bash has no ego. Bash is glue, glueing compiled code together into something bigger. Bash is really a very simple programming language but &lt;em&gt;it requires skill to appreciate this simplicity&lt;/em&gt;. Bash is easy and terse at the same time.  When you start to appreciate its simplicity, you reach that guru level that will keep your future-self always happy. It is not uncommon for me come across my own bash scripts that have been in production for 10 or even 15 years, still doing their thing as fresh as on the first day. This why I love Linux and (Free)BSD so much. It allows you to build a legacy that Windows always steals away from you. &lt;br&gt;
From more articles from the trenches, drop me some comments. Thx&lt;/p&gt;

</description>
      <category>bash</category>
      <category>script</category>
      <category>productivity</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
