<?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: Tasin Ishmam</title>
    <description>The latest articles on DEV Community by Tasin Ishmam (@tasinishmam).</description>
    <link>https://dev.to/tasinishmam</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%2F448660%2F6e634bcd-578e-4a51-9765-a2e676daf2ce.jpeg</url>
      <title>DEV Community: Tasin Ishmam</title>
      <link>https://dev.to/tasinishmam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tasinishmam"/>
    <language>en</language>
    <item>
      <title>Cracking Google's Foobar Challenge </title>
      <dc:creator>Tasin Ishmam</dc:creator>
      <pubDate>Fri, 28 Aug 2020 10:26:59 +0000</pubDate>
      <link>https://dev.to/tasinishmam/cracking-google-s-foobar-challenge-2c7k</link>
      <guid>https://dev.to/tasinishmam/cracking-google-s-foobar-challenge-2c7k</guid>
      <description>&lt;p&gt;I've recently finished Google's coding challenge, &lt;a href="https://foobar.withgoogle.com/" rel="noopener noreferrer"&gt;Foobar&lt;/a&gt;. This has honestly been a really fun programming game, and I wanted to share my experience!&lt;/p&gt;

&lt;h3&gt;
  
  
  What is it?
&lt;/h3&gt;

&lt;p&gt;Foobar is a invite only coding challenge hosted by google. The prize for completing? A chance to be recruited. Once you pass a certain level, you have the option to submit your solutions and personal info to a google recruiter. Getting an interview isn't guaranteed however and not everyone gets a response from the recruiters. However I'd recommend not to focus on that too much and just have fun. If you really want to apply to Google, there's usually easier ways. &lt;/p&gt;

&lt;h3&gt;
  
  
  Great, where do I sign up?
&lt;/h3&gt;

&lt;p&gt;Since this is invite only, directly going to the &lt;a href="https://foobar.withgoogle.com/" rel="noopener noreferrer"&gt;foobar website&lt;/a&gt; won't help as there's no registration option. There's two ways you can get an invite.  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Getting an invite directly from google. This actually isn't super hard, you need to search for certain keywords like "arraylist java" or "mutex lock" on google multiple times to trigger the invite mechanism. The full mechanism is explained &lt;a href="https://codeforces.com/blog/entry/50841" rel="noopener noreferrer"&gt;here&lt;/a&gt;. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbombyiecs858mcl4jlz6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbombyiecs858mcl4jlz6.png" alt="Up for a challenge"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Get an invite directly from someone who is already participating. Each participant, gets a maximum of two invites upon completion of certain levels in the challenge. So if you know someone who's already doing the challenge, you could ask them as well. &lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Story So Far
&lt;/h3&gt;

&lt;p&gt;Upon starting you are greeted with a unix shell  interface. You can interact with the shell using standard unix commands like "ls", "cat" and "cd". You find a journal entry at the very beginning which explains the situation to you. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgy83yo2s1thux4cjh7kc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgy83yo2s1thux4cjh7kc.png" alt="Starting"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A bunny themed Star Wars fanfic story that you have to code your way through. Sounds too good to be true ;)&lt;/p&gt;

&lt;h3&gt;
  
  
  The programming challenges
&lt;/h3&gt;

&lt;p&gt;In order to progress in your mission you need to perform a slew of programming challenges, from fixing Commander Lambda's wardrobe to rescuing bunny prisoners from the space station. These challenges are divided into 5 progressively more difficult levels. The tasks are similar to ones you find in competitive programming websites. Foobar especially has a lot of Dynamic Programming and math problems. A brief description of the levels: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Level 1&lt;/strong&gt;: 1 problem.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level 2&lt;/strong&gt;: 2 problems. Upon completion, invite a friend.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level 3&lt;/strong&gt;: 3 problems. Upon completion, option to provide information for recruitment by Google.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level 4&lt;/strong&gt;: 2 problems. Upon completion, invite another friend.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level 5&lt;/strong&gt;: 1 final problem. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The solutions can be submitted in Java and Python 2.7 (yikes!). There's even an integrated code editor you can use. In my experience, the difficulty starts ramping up around level 3. However, difficulties tend to vary even amongst problems from the same level. One of my level 3 problems was about Markov Chains and it took me over 2 days to finish, whereas I finished the rest of level 3 in a few hours. &lt;/p&gt;

&lt;h3&gt;
  
  
  Grand Finale
&lt;/h3&gt;

&lt;p&gt;At last, you've bested Commander Lambda's evil plans, rescued all the bunnies and saved the galaxy! You are now greeted with a mysterious encrypted message. What could it be?&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqv4rizubvgqqi7k069si.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqv4rizubvgqqi7k069si.png" alt="Encrypted"&gt;&lt;/a&gt;&lt;br&gt;
After some next level &lt;del&gt;hacking&lt;/del&gt; googling, I found out it's a simple XOR encryption. The message is XOR'd with my google username and then encoded to base64. So you can decrypt it by reversing this process. Let's use a python script to do just that&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Script source: https://vitaminac.github.io/Google-Foobar-Decrypt-Message/
import base64
from itertools import cycle

message = "L0YAHA0qFhseRk1uQVQOHCwSHEpNTXMCHAUCLBIPGARKdFtTTgs6Bw0IDAgwRl9JSSwVDgITGSdG U1NObhoGDhMIMAgRBQtuX0hKAA48CBYfCyQWBhlGTW5BVBwAJRwLBgQJc01TThwoEQoEFR5zQUlJ SToSDghGQXRGFQYBblNSTUYaPQ9SThM="
key = bytes("TasinIshmam", "utf8")
print(bytes(a ^ b for a, b in zip(base64.b64decode(message), cycle(key))))

# Output: 
# {'success' : 'great', 'colleague' : 'esteemed', 'efforts' : 'incredible', 'achievement' : 'unlocked', 'rabbits' : 'safe', 'foo' : 'win!'}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Advice
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Take your time&lt;/strong&gt;. Google gives you plenty of time to finish each problem (Over 20 days in case of the level 5 problem). So there's no need to hurry, research the problems thoroughly and design a optimized solution. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Know thy standard library&lt;/strong&gt;. For a lot of the combinatorics type problems, the python standard library was absolutely godsend. Don't code up functions that are already provided by Python/Java's standard library.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Take a break between problems&lt;/strong&gt; There's no time restriction between problems, so you can take as much time as you want before requesting a new problem. Some of these problems need a lot of time to finish, so don't rush in requesting new problems unless you're sure you have the spare time to invest on it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Do Foobar to learn, not for a job&lt;/strong&gt; Foobar probably isn't the most efficient way to get a interview at google. It's completely uncertain if and when a recruiter will respond. So instead of worrying about that, do Foobar to learn, that way you'll be under a lot less pressure.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Foobar is a great way to dip your toes into the world of programmatic problem solving. The whole thing is set up in a way so that you can learn as you go. I personally learnt a lot about Markov Chains, Backtracking and Cellular automata while doing these problems.&lt;/p&gt;

&lt;p&gt;And if you need some more motivation, here are all the bunnies you'll be rescuing ;) &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmbhmvwbyhjg95sl0ntsw.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmbhmvwbyhjg95sl0ntsw.gif" alt="Bunny Gif"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>google</category>
      <category>tutorial</category>
      <category>challenge</category>
    </item>
    <item>
      <title>Awesome Command-Line tools to boost your productivity
</title>
      <dc:creator>Tasin Ishmam</dc:creator>
      <pubDate>Fri, 07 Aug 2020 13:47:18 +0000</pubDate>
      <link>https://dev.to/tasinishmam/awesome-command-line-tools-to-boost-your-productivity-22n8</link>
      <guid>https://dev.to/tasinishmam/awesome-command-line-tools-to-boost-your-productivity-22n8</guid>
      <description>&lt;p&gt;If you're on a Unix system you probably have to constantly interact with the terminal, one way or another.So, the more you can speed up your terminal workflow, the more efficiently you can get work done. I want to share my personal favorite command line tools that will boost your productivity and help you save time. Let's begin - &lt;/p&gt;

&lt;h2&gt;
  
  
  1. &lt;a href="https://github.com/rupa/z"&gt;z.sh&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Z is a command line tool that allows you to jump quickly to directories that you have visited frequently in the past, or recently -- but most often a combination of the two (a concept known as "frecency"). It works by keeping track of when you go to directories and how much time you spend in them. It is then in the position to guess where you want to go when you type a partial string, e.g. "z src" might take you to ~/src/zsh.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use case&lt;/strong&gt;: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quickly going to the right directory in your local machine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KRwfDYoo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jqyctomb5n12sufgcvpu.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KRwfDYoo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jqyctomb5n12sufgcvpu.gif" alt="z-sh"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. &lt;a href="https://github.com/tmux/tmux"&gt;tmux&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Tmux is a terminal multiplexer: Essentially this means that tmux lets you tile window panes in a command-line environment. This way, you can run and track multiple programs from the same terminal, saving you the hassle of constantly having to shift terminal windows. Tmux also lets you "detach" your terminal sessions and get back to them later without the session being interrupted, a lifesaver for long running server tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easily traverse multiple command line windows&lt;/li&gt;
&lt;li&gt;Keep a terminal session or task alive for a long time without keeping your computer open.&lt;/li&gt;
&lt;li&gt;Easily manage tasks on a remote server&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--miEcalPX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9ciyx17cks164hz1givw.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--miEcalPX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9ciyx17cks164hz1givw.gif" alt="tmux"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. &lt;a href="https://github.com/santinic/how2"&gt;how2&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;how2 is a command line utility to quickly search up programming tasks in natural language. It's like Stackoverflow, but for the command line. Using Stackoverflow and Google API, how2 immediately gives you the most likely answer. You can also go into the interactive mode and search through all the results. How2 saves me a lot of time because I don't have to switch to the browser to search for simple things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Cases:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quickly find a code snippet to execute a shell task&lt;/li&gt;
&lt;li&gt;Find code snippets for common problem in programming language of choice.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eJuQLp-d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zv3fyiinwj1vqzyhycwi.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eJuQLp-d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zv3fyiinwj1vqzyhycwi.gif" alt="how2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. &lt;a href="https://github.com/junegunn/fzf"&gt;fzf&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;fzf is a fuzzy text finder for pretty much anything in your system. fzf can help you find files in your computer, previous commands in your shell history, results from a search or anything else. fzf is incredibly flexible because it supports searching through the results of any other unix command. All you need to do is pipe the results to fzf. Eg -&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;ls | fzf&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 &lt;a href="https://www.youtube.com/watch?v=qgG5Jhi_Els"&gt;This video&lt;/a&gt; does a great job in explaining all the cool things you can do with fzf. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Cases:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Search for files in your system or in a directory&lt;/li&gt;
&lt;li&gt;Search through results of another command like

&lt;code&gt;ls&lt;/code&gt;

or

&lt;code&gt;grep&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_HVRAQ9r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mk65bd1hq7wv6vd0r2h8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_HVRAQ9r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mk65bd1hq7wv6vd0r2h8.gif" alt="fzf"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. &lt;a href="https://github.com/tldr-pages/tldr"&gt;tldr&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;tldr is an attempt to simplify verbose &amp;amp; lengthy &lt;a href="https://en.wikipedia.org/wiki/Man_page"&gt;man pages&lt;/a&gt; for common unix commands and tools. tldr pages are simple, approachable and prioritizes the common use cases. This makes tldr ideal to quickly get an idea about any new command.&lt;/p&gt;

&lt;p&gt;Let's look at an example. Want to know how to do a grep in case insensitive mode? tldr it!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7NpXdM9j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0zl92jx6k1rb80lxy5ns.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7NpXdM9j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0zl92jx6k1rb80lxy5ns.gif" alt="tldr"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;These are the five tools that I felt have saved me a ton of time in doing my work as a developer. They're also general purpose enough to be utilized and enjoyed by a wide range of professionals and hobbyists. What unix programs has been the most helpful in your experience? Feel free to share your favorites with me!&lt;/p&gt;

&lt;p&gt;If you liked this article, do check out &lt;a href="https://tasinishmam.com/posts/"&gt;my blog&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Acknowledgements
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;This article was inspired by the post: &lt;a href="https://news.ycombinator.com/item?id=22849208"&gt;Ask HN: Programs that saved you 100 hours?&lt;/a&gt; on Hacker News. &lt;/li&gt;
&lt;li&gt;The credits for the gifs belong to their respective creators. &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>linux</category>
      <category>bash</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
