<?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 Mohamed Abdul Latheef on Medium]]></title>
        <description><![CDATA[Stories by Mohamed Abdul Latheef on Medium]]></description>
        <link>https://medium.com/@mohdlatche?source=rss-2e44bb206288------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*8m-LrBF5D0_UifCo</url>
            <title>Stories by Mohamed Abdul Latheef on Medium</title>
            <link>https://medium.com/@mohdlatche?source=rss-2e44bb206288------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 02:19:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mohdlatche/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[Adding some bling to your Android terminal]]></title>
            <link>https://medium.com/@mohdlatche/customizing-termux-fd6719dda989?source=rss-2e44bb206288------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd6719dda989</guid>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[termux]]></category>
            <category><![CDATA[zsh]]></category>
            <category><![CDATA[oh-my-zsh]]></category>
            <dc:creator><![CDATA[Mohamed Abdul Latheef]]></dc:creator>
            <pubDate>Wed, 26 Aug 2020 16:31:01 GMT</pubDate>
            <atom:updated>2020-08-27T03:26:02.091Z</atom:updated>
            <content:encoded><![CDATA[<h4>Customizing Termux</h4><figure><img alt="Termux application running on an android device" src="https://cdn-images-1.medium.com/max/1024/1*HTaURkpfA_CtGYiKFhnz_Q.png" /><figcaption>Background image by <a href="https://www.pexels.com/@markusspiske?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Markus Spiske</a> from <a href="https://www.pexels.com/photo/creative-internet-computer-display-2004161/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><p><a href="https://medium.com/swlh/web-programming-on-android-e3954bb49358">After installing Termux</a> and playing around with it for a while, you might be tempted to adjust the look and feel of Termux. Possibly you have in the past, worked on some Linux distro and been accustomed with adding eye candy to it by using themes, and would like to do the same here. Or you are not comfortable with the bland default setup that Termux provides out of the box.</p><p>A possibility to customize Termux would be to buy the <a href="https://play.google.com/store/apps/details?id=com.termux.styling">styling add-on available from the store</a>. Doing some of the things covered in this article is a bit easier that way and you support the app developers. It’s a win win.</p><h3>Setting up dark mode</h3><p>You might be wondering, well, Termux is already dark enough. Termux, even though not obvious initially because the terminal itself is set to using a dark palette by default, is using light mode. This is obvious when you open the side panel housing all the Termux sessions. Open this side panel by swiping from the left edge of the screen and you’ll see that it’s distinctively white.</p><figure><img alt="Termux with light theme showing up in the side panel" src="https://cdn-images-1.medium.com/max/1024/1*3X2bCrnlAjCJJVF5ZyH8LQ.jpeg" /><figcaption>Termux, using default light theme</figcaption></figure><p>Let’s fix that. If it doesn’t already exist, create a file called <strong>termux.propeties</strong> within the Termux config folder</p><pre>touch ~/.termux/termux.properties</pre><p>Open this file in your favorite editor. Throughout this article I’m using Vim.</p><pre>vim ~/.termux/termux.properties</pre><p>Add the following line to this file</p><pre>use-black-ui = true</pre><p>Save and exit the file. Restart your Termux session completely. Now if you open the side panel, you will find it that it’s appealingly black in appearance and consistent with the terminal itself.</p><figure><img alt="Termux with dark theme showing in the side panel" src="https://cdn-images-1.medium.com/max/1024/1*MYVQa-6HwdLIk_Nhj2GgRQ.jpeg" /><figcaption>Using the dark theme in it’s interface</figcaption></figure><h3>Some usability hacks</h3><p>To create and switch between sessions, you’ll find yourself increasingly opening and closing the side panel. This becomes a menial task quickly, specially as your app becomes bigger and more complicated. Wouldn’t it be easier to use a shortcut to do these tasks?</p><p>If you skipped the first step, create the config file used by Termux and open it in your editor of choice (vim in my case)</p><pre>touch ~/.termux/termux.properties</pre><pre>vim ~/.termux/termux.properties</pre><p>Add the following lines to the config</p><pre>...<br>...<br>shortcut.create-session = ctrl + t<br>shortcut.next-session = ctrl + 2<br>shortcut.previous-session = ctrl + 1</pre><p>Exit the editor and Termux. Restart it and now to create a new session, hit Ctrl-T. To switch back and forth between the sessions hit Ctrl-1 and Ctrl-2. The Ctrl key is within the Termux interface, at the very bottom.</p><h3>Change the default shell to zsh</h3><p>Bash is the default shell in Termux, but not the only option available. You can also switch it use zsh or fish. This article focuses on using zsh. Zsh let’s you do a lot of useful things that is not possible with bash. You can have syntax highlighting of your input command, auto suggestions, type ahead auto completion, customizing the prompt and enabling vi-mode, just a few selection of things that can be done in zsh which will be covered in this article.</p><p>Install zsh and set it to be your default shell by running the following commands</p><pre>pkg install zsh<br>chsh zsh</pre><p>To customize zsh you’ll need to create zsh config file in your home directory, if it doesn’t already exist.</p><pre>touch ~/.zshrc</pre><h3>Install Oh My Zsh</h3><p><a href="https://github.com/ohmyzsh/ohmyzsh">Oh my zsh</a> is a community maintained plugin framework that helps to customize zsh easily. To cite the developers own tongue in cheek description:</p><blockquote>Oh My Zsh will not make you a 10x developer...but you may feel like one. — oh-my-zsh developers</blockquote><p>Oh my zsh, it’s plugins and themes are not found on the Termux repos so the following steps are required manual installation. If you don’t already have it, you’ll also need to install wget</p><pre>pkg install wget<br>sh -c &quot;$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)&quot;</pre><p>The installation script should take care of everything, including adding some lines to your zsh config file. You can inspect the changes by using the less command</p><pre>less ~/.zshrc</pre><p>All your zsh related scripts are now housed in the oh-my-zsh folder, hidden in your home directory. Oh-my-zsh will prompt you for updates every once in awhile, useful to keep the framework, it’s themes and plugins updated.</p><h3>Get syntax highlighting</h3><p>After installing zsh, you might have expected the commands you input to be colorful. It won’t, it’ll be still a dull white. You might have expected it to be so after installing oh-my-zsh but alas, still no. Still bland. To get that feature, you’ll need <a href="https://github.com/zsh-users/zsh-syntax-highlighting">an unofficial plugin</a> (unofficial as it’s not maintained either by zsh or by oh-my-zsh)</p><p>Now would be a good time to install git, if you don’t already have it. If you are doing some serious programming, you’ll will need it anyway, now is a good time as any.</p><pre>pkg install git</pre><p>To use the unofficial plugin along side oh-my-zsh, run the following code</p><pre>git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting</pre><p>Now that it’s inside the oh-my-zsh’s plugin folder, you need to specify, zsh to use it. While doing that, also add the git plugin, since it’s a plugin that’s already installed along with oh-my-zsh framework. Open up zsh config file in vim (or text editor of your choice)</p><pre>vim ~/.zshrc</pre><p>Scroll down to the plugins section, which in a standard installation, should be empty. Let’s update it to use the aforementioned plugins¹.</p><pre>...<br>...<br>plugins=(<br>  <strong>git<br>  zsh-syntax-highlighting</strong><br>)<br>...<br>...</pre><p>Notice that there are no commas, or any other delimiters at the end of the plugin names. Save your file and source your config file to see the effect.</p><pre>source ~/.zshrc</pre><p>Your input commands should now show some syntax highlighting. To read about the git plugin and what it does you can go <a href="https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git">here</a></p><ol><li><em>Just make sure that this plugin is always the last one sourced in the plugin section</em></li></ol><h3>Type ahead hinting</h3><p>This is a great feature to have, and useful too while adding some subtle eye candy. Grab the needed plugin <a href="https://github.com/zsh-users/zsh-autosuggestions">zsh-autosuggestions</a>. The plugin addition goes in a similar manner to the previous plugin we added</p><pre>git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions<br>vim ~/.zshrc</pre><p>Add the zsh-autosuggestions plugin to the zsh config file, in the plugin section. If you followed along from the previous section, the plugin section should like this now</p><pre>...<br>...<br>plugins=(<br>  git<br>  <strong>zsh-autosuggestions</strong><br>  zsh-syntax-highlighting<br>)<br>...<br>...</pre><p>To see the changes in effect open a new terminal session (from the side panel in Termux or Ctrl-T if you have setup the shortcut), or source the modified zsh config file</p><pre>source ~/.zshrc</pre><p>Now, as you type, you would get suggestions on the fly in a way that’s not obstructive, based on your command history. To accept the suggestion, hit the tab button on your Termux interface.</p><figure><img alt="Termux with type-ahead hinting enabled in zsh shell" src="https://cdn-images-1.medium.com/max/1024/1*OyxRwmaforiijCIDny7-wQ.jpeg" /><figcaption>Type ahead hinting enabled.</figcaption></figure><h3>Changing the zsh theme</h3><p>By default, zsh comes with a theme ‘robbyrussel’ enabled. If you went through the zsh config file, you would have seen the ZSH_THEME variable that controls this.</p><p>oh-my-zsh comes with a <a href="https://github.com/ohmyzsh/ohmyzsh/wiki/Themes">handful of themes</a> with it’s standard installation. Some themes require use of special fonts, others may even require separate packages to be installed. After finding the one that suites you, change the ZSH_THEME variable to the name of the theme. For example, to change to <a href="https://github.com/agnoster/agnoster-zsh-theme">agnoster</a> theme, just change the variable to</p><pre>ZSH_THEME=&quot;<strong>agnoster</strong>&quot; </pre><p>To view the changes, source the modified .zshrc file again, or open a new terminal session</p><pre>source ~/.zshrc</pre><p>If you do change the theme to agnoster, just note that it may not look so good as it requires patched Vim-Powerline fonts. Not all themes looks great on the form factor we are working on either. I stick with the default in my configuration because for my purpose, it looks good</p><h3>Enabling Vi-mode</h3><p>If you don’t use vim, or hate vim in general, you can skip this section all together. zsh by default is setup to use the emacs-mode, which is good but I’ve fallen head over heels to vim so enabling <strong>vi-mode</strong> is the natural next step for me.</p><p><a href="https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/vi-mode">vi-mode</a> is a plugin available in the standard installation of oh-my-zsh. Enabling it is simple; add it to the plugin sections of your zsh config file</p><pre>plugins=(<br>  git<br>  <strong>vi-mode</strong><br>  zsh-autosuggestions<br>  zsh-syntax-highlighting<br>)</pre><p>Source the modified config file to see the change in effect</p><p>source ~/.zshrc</p><p>Zsh always open in insert mode. To go to visual mode, hit ESC on the Termux interface and make changes to the written command. To go back to insert mode, press i</p><p>vi-mode isn’t perfect and it isn’t for everyone. It also conflicts with the zsh-autosuggestions plugin so after getting the command hint, you will have to go to visual mode and hit the l-key (the direction key).</p><h3>Customizing startup prompt</h3><p>Termux comes with a startup prompt with useful information about itself, basic commands to help a first time user. But it gets boring real quick. Let’s replace that altogether with something fancy and useful</p><p>To remove the default startup messages is easy; create an empty file called .hushlogin in your home folder</p><pre>touch ~/.hushlogin</pre><p>Now new sessions of Termux should open without any messages. To add a more useful and at the same time, colorful startup message we are going to make use of <a href="https://github.com/dylanaraps/neofetch">neofetch</a></p><p>Install neofetch by issuing the following command</p><pre>pkg install neofetch</pre><p>Once it pulls in all the needed packages append the neofetch command to the the end of the zsh config file</p><pre># ~/.zshrc</pre><pre>...<br>...</pre><pre>neofetch</pre><p>New sessions of Termux now opens up with a nice ASCII art logo of android and useful system information. The nice thing about neofetch is how well it fits inside the form factor we are using.</p><p>To customize the information in neofetch, you will need to open the neofetch config file</p><pre>vim ~/.config/neofetch/config.conf</pre><p>For example, to show your public and local ip address just uncomment the following lines in the config file</p><pre>print_info() {<br>  ...<br>  ...<br>  <strong>info &quot;Local IP&quot; local_ip<br>  info &quot;Public IP&quot; public_ip</strong><br>  ...<br>  ...<br>}</pre><p>You have a fine tuned control of different aspects of neofetch in this file, including the ASCII art and the colors used. Have a look at the documentation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tgglY2UqezrP6GEwy9lBdQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ifWYKoud82flWibDmICOeQ.jpeg" /><figcaption>Before and after comparison with default Termux welcome screen (left) and neofetch enabled (right)</figcaption></figure><h3>Conclusion</h3><p>Now that Termux looks nice and is useful, it’s time to create your next great application, right on your phone.</p><p>Good luck</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd6719dda989" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running MongoDB Server on Android]]></title>
            <link>https://medium.com/swlh/running-mongodb-server-on-android-da7e7de3d24c?source=rss-2e44bb206288------2</link>
            <guid isPermaLink="false">https://medium.com/p/da7e7de3d24c</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[termux]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Mohamed Abdul Latheef]]></dc:creator>
            <pubDate>Thu, 13 Aug 2020 10:22:49 GMT</pubDate>
            <atom:updated>2021-03-23T06:01:53.405Z</atom:updated>
            <content:encoded><![CDATA[<h4>NoSQL right on your mobile</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*41XdNXjzj9oEfSPt1wu-3w.png" /><figcaption>Background image by <a href="https://www.pexels.com/@markusspiske?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Markus Spiske</a> from <a href="https://www.pexels.com/photo/creative-internet-computer-display-2004161/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><p><a href="https://www.mongodb.com/">MongoDB</a> is a popular, if not, the most popular NoSQL databases out there. It’s the M in the MEAN stack, at my preferred go to databases for any NodeJS development. Recently, I have had some time to experiment with <a href="https://medium.com/swlh/web-programming-on-android-e3954bb49358">development on a mobile device thanks to Termux</a>. If your server end happens to be NodeJS, than there is high probability that your poison of choice is MongoDb. Without some research, if you are using Termux as a development environment, you will stumble upon a problem.<a href="https://github.com/termux/termux-packages/issues/249"> There is no MongoDB in the official Termux repos</a>.</p><p><a href="https://wiki.termux.com/wiki/Package_Management#Official_repositories">Termux repos</a> are similar to repositories that you may be familiar with when using a Linux distribution like Ubuntu or Arch. The absence of MongoDB in the official Termux repos had me initially scrambling for solutions to perfect <a href="https://medium.com/@mohdlatche/misusing-project-contingency-39b4e2363e4">my development environment in my phone</a>.</p><p>A solution I initially opted for was using an Android native application called <a href="https://www.appbrain.com/app/dory-mongodb-server/io.tempage.dorymongo">Dory MongoDB server</a>, which just about worked. Development on the app has since stalled, and the app has since been pulled out of play store. As of writing this post, there seems to be no app on the store that seems to boast the server capability of MongoDB, and only a few handful client apps written to connect to an external server</p><p>Using MongoDB through a Playstore app like that has many pitfalls. You have to start the app manually every time you start Termux and there was still no way to connect to the server from within Termux. The only possibility to connect was through use of one of those previously mentioned MongoDB clients, such as <a href="https://play.google.com/store/apps/details?id=com.innodroid.mongobrowser&amp;hl=en">Mongo Explorer</a>, meaning you have to run an additional app just to check the data inside MongoDB.</p><p>Developing like that was very unproductive. But it still worked.</p><p>Another option would have been to host the server somewhere else. I did use my PC and even a <a href="https://m.do.co/c/3fe3e1b1416d">DigitalOcean</a> droplet to do so, but now my stack is fragmented across many devices. On top of that, I still needed to connect with a dedicated client to check my database during testing and troubleshooting.</p><p>When things got just too frustrating with that setup, I switched to using <a href="https://github.com/louischatriot/nedb">NeDB</a>, a file based, noSQL database. NeDB is a great way to get to developing apps quickly inside Termux and using NodeJS. It closely emulates MongoDB database, with documents being stored as files in the file system that can be opened to check entries themselves. Problem solved… until you come across <a href="https://github.com/louischatriot/nedb/issues/105">issues of concurrency</a>.</p><p>NeDB is not concurrent. The most updated version of the database files are available to the process currently using those files. If I were to try do something more complicated, like say, access those same database files from within another NodeJS process, I get a previous version of the database. The database files are updated once my first process closes.</p><p>And that’s just touching the tip of an iceberg with problems related to NeDB. NeDB just doesn’t compare to the golden standard that MongoDB has achieved today in terms of features. NeDB lacks some basic features that’s expected with any database, <a href="https://github.com/louischatriot/nedb/issues/305">such as aggregations</a>. NeDB is <a href="https://github.com/louischatriot/nedb/issues/476">also not scalable</a> and, I’m sure this will be the real deal breaker…, <a href="https://github.com/louischatriot/nedb/issues/492">NeDB is not under active development</a>. I don’t want to spend so much time talking about the deficiencies of NeDB. By the time you want to push your code to production, you would want to switch to something more feature full, like MongoDB.</p><p>Thankfully there is a way to run the database server, native inside Termux. Hurrah!</p><h4>Prerequisites</h4><ol><li>Termux, <a href="https://medium.com/@mohdlatche/web-programming-on-android-e3954bb49358">up running on your phone</a>.</li><li>The need for MongoDB¹.</li></ol><h4>Adding third-party repository</h4><p>Similar to the other Linux distributions, there is a way to add third party sources of packages inside of Termux. Luckily, the particular repo we are targeting provides a simple shell script that makes it even easier to add the repository²</p><pre>pkg install curl<br>curl -LO https://its-pointless.github.io/setup-pointless-repo.sh<br>bash setup-pointless-repo.sh<br>pkg update</pre><h4>Install MongoDB</h4><p>MongoDB is now available as a pkg for installation now</p><p>pkg install mongodb</p><p><strong>[Update 2021 March 22]</strong></p><p>Something has broke since the last update to the package and the following folder and file needs to be created manually</p><pre>mkdir $PREFIX/var/log/mongodb</pre><pre>touch $PREFIX/var/log/mongodb/mongodb.log</pre><p>Execute the server for MongoDB to check if everything is running as expected</p><p>mongod</p><p>The previous command will not exit silently and exiting via Ctrl-C means the server is terminated. For now we will keep the server running in it’s own dedicated window. We will fix this later on. Open a new terminal window in Termux, by swiping from the left edge, across the screen. This should give access to the window list of all terminal instances running in Termux. Think of this as your tabs. You will need to access this pane to switch between terminal windows and to create new sessions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3X2bCrnlAjCJJVF5ZyH8LQ.jpeg" /><figcaption>Sliding from the left side should give you a list of all your running terminal windows</figcaption></figure><p>Open a terminal window by clicking the ‘New Session’ button. Within the new terminal window, check if the client is able to connect to the server by running the native Nongo shell</p><p>mongo</p><p>You should be able to connect to the server without any other additional arguments for now. You should be able to connect the server just fine using <a href="https://github.com/mongodb/node-mongodb-native">native MongoDB driver</a>s, or from the popular ORM derivative, <a href="https://mongoosejs.com/">mongoose</a>, in your NodeJS projects. For now just exit the shell by pressing Ctrl-C</p><h4>Securing MongoDB server (optional)</h4><p>At the moment, MongoDB server doesn’t ask for any authentication because by default, MongoDB server runs without requiring any user credentials. Since you are developing locally (on your phone), this could be a trivial matter. But it’s bad practice, even during development, to leave things as it is. You could leave the connection string without authentication parameters for now, but once you push to production, leaving MongoDB insecure is asking for trouble.</p><p>Securing MongoDB on Termux is no different from securing MongoDB on any other Linux distribution. It’s outlined in detail on <a href="https://docs.mongodb.com/manual/tutorial/enable-authentication/#start-mongodb-without-access-control">MongoDB official online documentation</a>. But the basic essence of that documentation, simplified a bit, is by running the following commands</p><p>Ensure you have MongoDB running . It should be running unless you closed the first terminal window from the steps before or maybe you exited the server by hitting Ctrl-C or one of the dedicated shutdown commands. If you did, just run the following command again</p><p>mongod</p><p>… and switch to a dedicated terminal window. Run the Mongo shell by issuing</p><p>mongo</p><p>Run the following statements, line by line.</p><pre>use admin<br>db.createUser(<br>  {<br>    user: &quot;<strong>myUserAdmin</strong>&quot;,<br>    pwd: passwordPrompt(),<br>    roles: [ { role: &quot;userAdminAnyDatabase&quot;, db: &quot;<strong>admin</strong>&quot; }, &quot;readWriteAnyDatabase&quot; ]<br>  }<br>)</pre><p>Even though there is a lot going on here, for now just take note of the texts in bold. The first is the <strong>username </strong>and the second is the <strong>authentication database</strong>, both to be values of your choosing. These are important argument values to be used later on. You should be prompted for a password once the last statement is entered into the shell³. Pick your super strong password and enter it.</p><p>The server needs to be restarted now. Either switch over to the first terminal window with the server running and hit Ctrl-C or within Mongo shell issue the following command</p><pre>db.adminCommand( { shutdown: 1 } )</pre><p>Switch back to the first window terminal and restart the MongoDB server with authentication enabled</p><pre>mongod --auth</pre><p>Back in the second window check if you are able to connect without any authentication arguments by running the same Mongo shell command</p><pre>mongo</pre><p>You are able to connect, but fret not, you don’t have any admin privileges now. Try to issue a command, such as one for listing databases</p><pre>db.adminCommand( { listDatabases: 1 } )</pre><p>You will be treated to an error message reminding that you need authorization now to access the authentication enabled MongoDB server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lemiyLMPXs04564xtjW6Ag.jpeg" /><figcaption>Not authorized. Not accessible</figcaption></figure><p>Exit the shell by running the exit command or Ctrl-C. Rerun the shell command⁴ with authentication arguments using values you set earlier</p><pre>mongo --authenticationDatabase &quot;<strong>admin</strong>&quot; -u &quot;<strong>myUserAdmin</strong>&quot; -p</pre><p>In bold is the authentication database value and the username you set earlier. When prompted for password, enter the password you entered before. You should be able to run the previous command without problems now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EUWRm3eYLNToDoqHEjrVGA.jpeg" /><figcaption>Working just fine with authenticated shell session</figcaption></figure><p>Your MongoDB server is ready!</p><h4>Starting MongoDB during startup (optional)</h4><p>So far we have been starting MongoDB in it’s own dedicated window, pretty useful for debugging and logging, but otherwise useless during development. To startup the server like that is an additional menial task, specially if you shutdown Termux regularly.</p><p>A better option would be to have the process running at startup. Termux, being a really hacked Linux distribution, lacks a proper service manager⁵ such as systemd that you might be more familiar with. Hence we are going to go old school and enter it as a startup script.</p><p>Depending on your shell, you might have to customize the solution, but for bash and zsh, just tack on the following commands at the end of the .bashrc or .zshrc file (if it doesn’t exist just create the file and place it in your home directory)</p><pre>if pgrep -x &quot;mongod&quot; &gt;/dev/null<br>  then<br>    echo &quot;mongodb is running&quot;<br>  else<br>    mongod --auth --fork<br>    logpath =$PREFIX/var/log/mongodb/mongodb.log &gt;/dev/null<br>    echo &quot;mongodb started&quot;<br>fi</pre><p>This ensures that if a new terminal window is opened and if MongoDB server is not running, the server is started while outputting some useful hint on screen. If the server is already running (on another terminal window, for instance) it outputs something saying so on the screen. Irrespective of the outcome, it also exits silently, so that you can use the terminal window for something else now. You will have to accommodate for a minute delay while this logic is run by Termux every time you open up a new terminal window</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tgglY2UqezrP6GEwy9lBdQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cUtzHrIHr931MLLmzX--8A.jpeg" /><figcaption>The last output on the terminal gives you an idea about whether MongoDB is starting anew or if it’s already running.</figcaption></figure><ol><li>If you are not using NodeJS, then its likely MongoDB is not a requirement</li><li>Adding third-party repositories <a href="https://askubuntu.com/questions/35629/are-ppas-safe-to-add-to-my-system-and-what-are-some-red-flags-to-watch-out-for">has been frowned upon , in Linux distributions</a></li><li>You can <a href="https://docs.mongodb.com/manual/tutorial/enable-authentication/#create-the-user-administrator">also enter your password in plain text</a>, without using ‘passwordPrompt()’ command</li><li>You can also <a href="https://docs.mongodb.com/manual/tutorial/enable-authentication/#connect-and-authenticate-as-the-user-administrator">login from the Mongo shell itself, after initializing without authentication details</a>.</li><li>You could also give <a href="https://github.com/termux/termux-services">termux-services</a> a try, which I couldn’t get MongoDB to work with.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da7e7de3d24c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/running-mongodb-server-on-android-da7e7de3d24c">Running MongoDB Server on Android</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Misusing project contingency]]></title>
            <link>https://medium.com/@mohdlatche/misusing-project-contingency-39b4e2363e4?source=rss-2e44bb206288------2</link>
            <guid isPermaLink="false">https://medium.com/p/39b4e2363e4</guid>
            <category><![CDATA[budget]]></category>
            <category><![CDATA[contingency]]></category>
            <category><![CDATA[risk]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[management]]></category>
            <dc:creator><![CDATA[Mohamed Abdul Latheef]]></dc:creator>
            <pubDate>Tue, 11 Aug 2020 05:16:02 GMT</pubDate>
            <atom:updated>2020-08-11T05:16:02.065Z</atom:updated>
            <content:encoded><![CDATA[<h4>An unfortunate project management practice</h4><figure><a href="https://www.pexels.com/photo/numbers-money-calculating-calculation-3305/"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zQM1B3qKZ71pfTSmkpFKQw.jpeg" /></a></figure><p>Contingency is a set amount of money¹ added to the total project estimate to arrive at a project budget, during the initiation and planning phase of a project. It is also one of the least understood and usually misused item of a project. The reason for adding a contingency at the very beginning of the project is easily explainable</p><h4>Estimates are not accurate</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LxsfVQ2bjTr049a43dhR0g.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@hasanalbari?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Hasan Albari</a> from <a href="https://www.pexels.com/photo/close-up-photo-of-dart-pins-on-dartboard-1424745/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><p>Estimating is a guess work at best and only accurate to a certain degree. They more closely resemble the possible actual cost that might be encountered at the time they are made and varies greatly if the work that the estimate is attached to is being done towards the end of the project, say, five to ten years down the line. Estimates are subjective, with the estimators own bias and experience playing an important factor in deciding the accuracy of the estimate.</p><p>Good project management practices always requires estimates to be attached with a probability value of achieving that estimate, usually called a accuracy percentage but a more technically true term for this would be a “<strong>confidence level</strong>”. Depending on the type of estimating done for a project, this confidence level is attached with either the whole project (<strong>top down estimates</strong>) or with the individual work packages of the work breakdown structure (<strong>bottom up estimates</strong>).</p><p>Even though project management usually calls for a confidence level of P80 or P90 (“I’m 80% or 90%sure that this certain item can be finished in $ XXX ”) for important projects, it’s rarely stated along side project estimates. This is an important information lost from the cost base line during project initiation discussions, and have a detrimental effect on the way projects perform on the cost objective later on</p><p>The fluctuations expected in estimates are also a type of uncertainty called <strong>accomplishment uncertainty</strong>. They are therefore directly tied down to risks²</p><h4>Events that might need to be mitigated</h4><blockquote>“If something can go wrong, it will” — Murphy</blockquote><figure><a href="https://www.pexels.com/photo/red-and-yellow-hatchback-axa-crash-tests-163016/"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4tD0dSdMsKMPfiflRiAZxw.jpeg" /></a></figure><p>Murphy’s law is especially applicable to project risk management. There are uncertain events, always attached with a project, that could possibly occur and have consequences on the project objectives of time, cost and quality</p><p>The domain of risk management in projects in something rarely pondered upon. Project planners would want to quickly jump to the execution phase and risk management is a tedious process that involves lot of research. However, there is always acceptance that there might be “things that could go wrong in the project”, irrespective of the industry, because that event has happened so frequently before in other projects. These events fall into a type of uncertainty called <strong>event uncertainty</strong>, and requires setting a certain part of the budget ready to handle them or to prevent them from occurring in the project</p><h3>Therefore contingency is for…</h3><p>Based on this discussion, it’s very clear that contingency is for <strong>risk management</strong> of the project. It’s for handling uncertainties in the project. Given a proper study of the project scope at the planning stage, contingency should allow for a project to finish within the budget. At the end of the day, your project should at least achieve the project cost objective.</p><p>And yet they never do.</p><p>For reasons that can be associated with deficiencies in the project planning stage, contingency has historically not been associated with risks and risk management. Contingencies were not calculated based on the “proper study of scope” and “looking at uncertainties” of the project. Instead, to save time (cough… deficiencies of project planning…cough), it is expected that the final project estimate (without contingency) will need an “add-on”, to handle any variations to it. Usually this “add-on” value had been between 5% and 10% of the total estimate. 5% for less important projects and 10% for the more important ones. The science behind the percentage values is murky, it’s based on historical performance of projects and is not industry specific.</p><p>This traditional way of handling contingency and the use of the word “<strong>variation</strong>” in the above discussion, has unfortunately lead way to contingencies being used for something else entirely</p><h3>Misusing contingency</h3><p>From ye’ good‘all’ days gone of bad project management practices, we have become accustomed to using contingencies to handle project variations. A variation is the unofficial term used to describe the effects of <strong>scope change</strong>, additional work added on to the project.</p><p>It is very tempting to use contingencies to handle scope changes, logical even! I have a certain amount of money in the project, called a contingency, not associated with any work. Why not just use that and take care of the additional cost coming in from scope changes. This way of thinking, is a by-product from our inefficient and ineffective project management days. It is due the fact that we don’t believe project planning is an ongoing process, that it is one time step “tacked” at the beginning of the project. In order to handle scope changes, the correct approach to handle the cost objective would be to reiterate the planning process for the additional work</p><ol><li>Study the change in scope and revise the work breakdown structure, come up with the additional work packages</li><li>Come up with estimates for the additional work packages, associating a confidence level</li><li>Find out the event and accomplishment uncertainty associated with the work packages</li><li>Find out the real variation required for the scope change.</li><li>Revise the project budget and get official endorsement on from the funding entity</li></ol><p>At the end contingency is still untouched or if possible should be enhanced. In either case it’s not used up.</p><p>But why do all those planning stages? It’s just easier to use the contingency. It’s not a fault of project managers alone to do this. Sponsors of the project also would push for this. “You have a contingency, use that, for god sake. Why are you asking us for more money?!”</p><p>Due to this malpractice being so common, projects tend to use up their contingencies quickly. This is specially true for projects that outsource or subcontract parts of the projects to specialized firms. These firms come in fully knowing that projects have a contingency that can be used to handle additional work and therefore suggests changes to the project to ensure that they get the additional money.</p><p>It’s unlikely that this practice will disappear completely any time soon but know that anywhere you see this being done, there are issues with project management in these corporations.</p><ol><li>Even though the term contingency is used to describe the contingency used in project budget, contingencies also arise project schedule (usually called a buffer) and project quality</li><li>This description of inaccuracy doesn’t mean that uncertainty is always negative. It possible to encounter positive uncertainty and positive risks in projects</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39b4e2363e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Programming on Android]]></title>
            <link>https://medium.com/swlh/web-programming-on-android-e3954bb49358?source=rss-2e44bb206288------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3954bb49358</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[termux]]></category>
            <dc:creator><![CDATA[Mohamed Abdul Latheef]]></dc:creator>
            <pubDate>Mon, 10 Aug 2020 08:42:24 GMT</pubDate>
            <atom:updated>2020-08-12T07:36:26.383Z</atom:updated>
            <content:encoded><![CDATA[<h4>Using Termux, Vim and the development stack of your choice</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BY78nA2FzH5BTwD-yqqbRw.png" /><figcaption>Background image by <a href="https://www.pexels.com/@markusspiske?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Markus Spiske</a> from <a href="https://www.pexels.com/photo/creative-internet-computer-display-2004161/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><p>This article is a short foray into how I setup my development environment in on an Android phone to do some web programming.</p><h3>Before we begin</h3><p>A question that I had to deal with initially was whether the need is there to do such a thing. We live in an world where my virtual server at a place like <a href="https://m.do.co/c/3fe3e1b1416d">DigitalOcean</a> is an ssh connection away from being accessed. Why setup a complete, standalone server on my phone at all?</p><p>The intrigue. The possibility. That’s all I can offer for an answer. It’s not a novel idea at all. But the usability of such a setup has not really been explored. How far you can get development on a phone? What can be done on a form factor that is rarely considered a development device? My initial experience was very rough around the edges. Moving from an IDE like VS Code was difficult. Moving from a physical keyboard to a less than programmer friendly touchscreen keyboard was a hassle. Moving from a window desktop environment to the command line was not that bad but had to have some getting used to.</p><p>All in all, it’s great for a hobbyist web programmer like me. I been using this setup for a couple of months now and prefer to work on the comforts of my bed and as a way to pass time while I use public commutes. It sure beats carrying a laptop around.</p><p>Even though I use the term ‘phone’ extensively through out this discussions an Android Tablet can also be used for this same setup.</p><h3>Setting up Termux</h3><h4>The greatest terminal emulator</h4><p>If you are Linux enthusiast, than <a href="https://play.google.com/store/apps/details?id=com.termux&amp;hl=en">Termux</a> is really a godsend. The main distaste I had for Android phone is that even while using the Linux kernel (or patched kernel), it doesn’t feel linux-ey. Not at all. While this may have worked out in it’s popularity for the mainstream, it left an unscratched itch for people like me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*yJBizmI0KogYKlN_RGk5Qw.jpeg" /><figcaption>Termux, with Webpack compilation process running</figcaption></figure><p>Sure, there were terminal emulators from the beginning but they were very basic. It was also possible to get a full Linux distribution running on a rooted phone but I’ve not been comfortable rooting devices (voiding warranty has never been my cup of tea).</p><p>Termux successfully satisfied all the needs that plain Android and it’s terminal emulators never could.</p><p>Termux is a like a patched Linux distribution for your Android. Well it’s not even that. According to the developer’s description:</p><blockquote>“Termux provides a package ecosystem similar to the one in Linux distributions. However you should be aware that Termux is just a regular application running on Android OS” — <a href="https://wiki.termux.com/wiki/Getting_started#Is_Termux_the_same_as_Linux.3F">Termux Wiki</a></blockquote><p>Don’t let that distress you. Great thing about Termux, compared to other terminal emulators available on Android is the list of packages made available to you. If that list is exhaustive, you can even install <a href="https://wiki.termux.com/wiki/FAQ#Can_I_run_other_Linux_distributions_in_Termux.3F">a full Linux distribution, on top of your android system, even without a root device</a>.</p><p>First install <a href="https://play.google.com/store/apps/details?id=com.termux&amp;hl=en">Termux from Playstore</a>. If you would like to support the developer it’s a good idea to buy the <a href="https://play.google.com/store/apps/developer?id=Fredrik+Fornwall&amp;hl=en">couple of extensions</a> that are available.</p><p>After installing Termux and reading up on how it’s package management works, it’s time to decide your development stack. PHP? MySQL? Apache? Ruby on Rails? NodeJS? It’s all there in the Termux repos. <a href="https://wiki.termux.com/wiki/Main_Page">Termux wiki</a> gives a straightforward installation guide to most of these packages and whether there is any Termux specific tasks that need to be done.</p><p>Irrespective of your programming language, libraries and frameworks you choose, you’ll probably want to install the following anyway.</p><ol><li>Git (for version controlling and pushing code to production site)</li><li>OpenSSH (ssh connections back and forth from your phone)</li></ol><p>You might also want to change the default shell (bash) to something more feature full such as zsh or fish. Oh-my-zsh and Oh-my-fish packages are also works just as well as they do in Linux distributions.</p><h3>Setting up Vim</h3><h4>The greatest editor?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U_KTm9W8UghK_qwWoMbvcQ.jpeg" /><figcaption>Vim with some Vue code</figcaption></figure><p>Vim deserves all the accolades of praises it gets, at least in my book. But the text on my book might vary from what you follow, so it’s fair to suggest that this step is not really a requirement. You can go for another text editor available in the repos:</p><ol><li>Emacs</li><li>Nano</li><li>Vi</li><li>The list really goes on…</li></ol><p>Another possibility is to hookup your development files to a directory that’s also externally available on your Android system¹. Then you can get a <a href="https://play.google.com/store/apps/details?id=com.foxdebug.acodefree&amp;hl=en">code editor from PlayStore</a> and get on developing from there. Your development is still local to the phone.</p><p>I prefer Vim. The use of an external code editor outside of the command line may seem appealing to some, specially those coming to Termux after using an IDE or even a code editor like VS Code or Sublime. Much about Vim has already been said before elsewhere by more competent developers than me so I’ll not go into that discussion. To install Vim on Termux run the following.</p><p>pkg install vim</p><p>After installation of all the dependencies and the main packages you are good to go. Just type the command as you would on any other terminal.</p><p>vim</p><p>Vim is extensible with loads of plugins but after some research I decided to keep vim as vanilla as possible. The type of plugins you would use depends on your workflow and the language you are going to use. It may seem appealing to go and install some fancy plugins that are out there such as <a href="https://github.com/preservim/nerdtree">NERDTree</a> and <a href="https://github.com/ycm-core/YouCompleteMe">YCM</a>² but note that some of these plugins are not really for mobile use.</p><p>Setting up Vim to be the way you like it may take some time and if you have no experience using Vim, the learning curve will surely be steep but its worth the while.</p><p>The plugins I use for Vim in my development are</p><ol><li><a href="https://github.com/VundleVim/Vundle.vim">Vundle</a> (plugin manager)</li><li><a href="https://github.com/jiangmiao/auto-pairs">AutoPairs</a> (for bracket completion)</li><li><a href="https://github.com/posva/vim-vue">Vim-vue</a> (syntax highlighting for Vue.js)</li><li><a href="https://github.com/garbas/vim-snipmate">Snipmate</a> (for snippet suggestion) and some additional dependent extensions</li><li><a href="https://github.com/honza/vim-snippets">Vim-snippets</a> (snippet engine that supports Snipmate)</li></ol><p>All of those plugins are really only for my use case. If you don’t use Vue, for example, you would not need Vim-vue. If you have a preference for a plugin manager other than Vundle, for example <a href="https://github.com/tpope/vim-pathogen">Pathogen</a>, you would use that instead.</p><h3>Handling some caveats</h3><h4>Web developer tools</h4><p>There is one caveat to web development on your android phone which needs to be addressed. If you open up Chrome (or any other mobile web browser for that matter) you will find that none offers web developer tools. No access to a console, no debugging tools, not even a way to check the HTML code! This was all for naught, you might be thinking.</p><p><a href="https://developers.google.com/web/tools/chrome-devtools/remote-debugging">Chrome web browser does offer a remote way of checking mobile pages on the desktop browser’s web developer tools</a>. I’ve never used it. It beats my purpose of doing all my development and debugging on my phone. It may not be the case for you so a small research should help you decide if that’s the path you would go.</p><p>A better and more preferable choice for me was to use <a href="https://github.com/liriliri/eruda">Eruda</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8udj5H9c2qHmqvIKRrvqxw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*At24u_wKp5-QdUmugNHLsQ.jpeg" /><figcaption>Left: Eruda floating button, neatly tucking everything away. Right: Eruda developer tools</figcaption></figure><p>A web developers tool bar directly integrated into your web application, courtesy of JavaScript. It offers pretty much everything I need, and is neatly tucked away from view with the use of a hover button to activate and deactivate it. Needless to say, without Eruda, my foray into web development on mobile would have been a total failure. To put it simply, as of now, Eruda is a must for me and probably for you as well.</p><h4>Keyboard</h4><p>Another difficulty is the keyboard. All your useful brackets are usually hidden away, and finding the caret is a pain. One option is to use a more <a href="https://play.google.com/store/apps/details?id=com.gazlaws.codeboard&amp;hl=en">programmer friendly keyboard</a>. These keyboards, although useful, was not the best experience, as they needed to be switched out constantly when you are using your phone for not programming, like any normal person. The button sizes are also another inconvenience.</p><h3>Where to next?</h3><p>With the setup in place, you have a powerful and capable, development environment directly in your hand, literally. Both the front end and back end development within your grasp. How you would use it depends on what you are trying to create. You could:</p><ul><li>Install LAMP stack or LEMP stack. Install composer and use <a href="https://laravel.com/">Laravel</a>, in a manner you would usually do so on your PC.</li><li>Install MEAN stack and use one of the many libraries (<a href="https://sailsjs.com/">sails.js</a>, <a href="https://feathersjs.com/">feathersjs</a>, <a href="https://emberjs.com/">ember.js</a>, <a href="https://reactjs.org/">react</a>) alongside Webpack³</li><li>Install Ruby and go ahead with development using <a href="https://rubyonrails.org/">Ruby on Rails</a></li></ul><p>You will encounter problems that you will need to sidestep and create solutions for. Termux, is not a fully fledged Linux distribution so all the packages that you get have been patched in one way or the other to work on your Android device. I’ve had problems getting some NPM packages that relied on other programs that could not be ported to Termux. Such instances have been very minimal in my experience.</p><p>Irrespective of the experience, this is the most fun I’ve had in web programming in a long time.</p><ol><li><em>Termux files are not accessible from the Android system, but the </em><a href="https://wiki.termux.com/wiki/FAQ#How_do_I_access_the_device_storage_in_Termux.3F"><em>Android SD card can be accessed from Termux</em></a></li><li><em>To get YCM (You-Complete-Me) to work, you will need to go about a lot of hassle and install vim-python instead of vim. I was not able to get it working after many attempts</em></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3954bb49358" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/web-programming-on-android-e3954bb49358">Web Programming on Android</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Overestimation and project delays]]></title>
            <link>https://medium.com/@mohdlatche/mystery-of-overestimation-and-project-delays-72ada3535912?source=rss-2e44bb206288------2</link>
            <guid isPermaLink="false">https://medium.com/p/72ada3535912</guid>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[delay]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[mystery]]></category>
            <category><![CDATA[estimations]]></category>
            <dc:creator><![CDATA[Mohamed Abdul Latheef]]></dc:creator>
            <pubDate>Sun, 09 Aug 2020 07:45:25 GMT</pubDate>
            <atom:updated>2020-08-12T04:11:19.198Z</atom:updated>
            <content:encoded><![CDATA[<h4>Solving a project management mystery</h4><p>Projects just run late. They are always so damn late. I could probably work that statement into a meme.</p><figure><img alt="Rent is too damn high guy meme. Saying Number of projects running on delay are too damn high" src="https://cdn-images-1.medium.com/max/600/1*_QJshxN62bsSaIC6d5Iipg.jpeg" /></figure><p>However researches have proven that project duration, estimated based on a work breakdown structure work packages, are always over estimated. Which in plain layman terms means that tasks of a project at the project initiation and planning stage are always given duration that are more than really required. Often overzealous project managers cunningly also include buffers into the critical path of a project schedule during planning stage to make sure that they have some allowable leeway so that even if one task is runs late, the project still finishes on time. Given that:</p><ol><li>Projects have overestimated tasks</li><li>Project managers include lags into the schedule</li><li>Projects have additional contingencies added to schedule</li></ol><p>… projects then should finish on time in most cases or even ahead of time. They never do. Sigh</p><figure><img alt="Person running with briefcase, likely at an airport" src="https://cdn-images-1.medium.com/max/1024/1*KOthO862j3c2cn6rwuAMnA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@andybeales?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Andy Beales</a> on <a href="https://unsplash.com/s/photos/running-late?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>This situation really defies logic. Projects invariably run late. A lot of project managers blame changes to the scope of the project for this logic defying trend. “Wrong!”, I say. Changes to scope or variations can be handled by adding estimates (both cost and time)for the additional tasks involved, into the initial baseline. Even then, projects run late. In fact projects without any change in scope runs late.</p><p>The next excuse used by project managers is that they run into “unexpected situations”. Risks and uncertainty. “Wrong again!”, I would bellow. That should have been taken care of, at least to some reasonable degree, by risk management. Sadly, a lot of project managers don’t even know what that is. Known known and unknown unknowns are all the same to them. You, sir/madam, are then not a good project manager for the 21st century. With proper project management, such matters should be covered by a contingency. Contingency to both schedule and budget. In practice, even with all those measures projects still run late.</p><p>Huh? So what’s really going on? Even with project management best practices they still run late? So are we doing something wrong? Is there some unexplained forces at play? Voodoo? Black magic? Dark matter and energy? It would seem so. Projects with over estimated tasks, even with changes in scope adding additional tasks with their own over estimates to the baseline, and with an additional contingency to take care of some foreseen risks… still run late?! Why?</p><p>Today, the only explanation offered for any project I’m involved in is to blame it on Covid-19. Which is a good excuse, since it’s not covered by project risk management, being an unknown unknown. This explanation doesn’t cover for the good days gone by and the good days sure to come. An explanation as to why projects run late, is then therefore a necessity.</p><p>Projects today are managed according to systems theory. Take a large part and systematize it using processes involving inputs, tools and techniques, outputs and expect it to function properly like a well oiled machine. Without hiccups, faults and flaws. Project management today is a factory, the project manager is a robot and his team are miniature robots, expected to behave without any of the human flaws and bias that are inherent in us. The reason for over estimated projects running late can be explained in a couple of reasons that are not applicable to robots but to human beings.</p><h3>Parkinson’s law</h3><h4>Why work to complete a task that you already given safety in the estimate?</h4><figure><img alt="A person with head disintegrating into puzzle pieces" src="https://cdn-images-1.medium.com/max/1024/1*jvrkgyrIO6gtUFYG1PyITw.jpeg" /><figcaption>Image by <a href="https://pixabay.com/users/geralt-9301/">Geralt</a> on <a href="https://pixabay.com/photos/dementia-alzheimer-s-dependent-3051832/">Pixabay</a></figcaption></figure><p>Projects are usually run by people involved, to some level, at the initiation and planning process. They themselves give estimates that are easily achievable. Once execution starts, the estimators already know about this overestimated task duration. So why not do this incredibly important within-the-critical-path task tomorrow? Why not chill and spend sometime gossiping with your mates tomorrow when you can still do it after the weekend after you are all fresh again? Monday comes, and oh… there is another task scheduled to start that you really like to do compared to the task you really should be halfway through but still… enough time available for that yeah? Yeah. So you got a new task at hand but… wait… duration for the new task has also been over estimated. You can still relax. Start both tomorrow than. Or day after. Whatever. Day after arrives soon, the latter task is finished now and… wait… what was that super important task that you forgot? Never mind. One task is complete. Moving on.</p><h3>Self protection</h3><h4>Even if work is finished early, workers tend to sit on completed work without reporting to superiors because…?</h4><figure><img alt="Bored person with chin resting on desk, looking at a laptop" src="https://cdn-images-1.medium.com/max/1024/1*Xu3rmuG_OzTC3_zsrBK_DA.jpeg" /><figcaption>Image by <a href="https://www.pexels.com/@olly">Andrea Piacquadio</a> at <a href="https://www.pexels.com/photo/bored-formal-man-watching-laptop-at-desk-3760811/">Pexels</a></figcaption></figure><p>I really love the answer for this. Because it’s logical and yet illogical at the same time. It only applies to a workplace and no place else, humans and no other species.</p><p>Why would you report that you finished a task to a superior (in our case the project manager)? Do you really want more work? Do you really want him/her to expect you to finish other remaining works earlier than estimated? Is it not more worthwhile to finish a task and spend some time stalking your ex’es Facebook page on corporate time? Or raid someone’s base or CoC? Make some virtual coins and spend some real money on a silly game? Of course it is worthwhile, it’s not work! You are still a competent worker if you report your task complete on time. A good days work done. A shining example of a model worker you are, yes sir.</p><h3>Dropped baton</h3><h4>Completion of work early is not useful if the next person to carry out the dependent task is not available</h4><figure><img alt="Runners running at relay run, passing the baton to one another" src="https://cdn-images-1.medium.com/max/1024/1*3KvYs7zJxE2QltPCtWUACg.jpeg" /><figcaption>Image by <a href="https://pixabay.com/users/domeckopol-610494/">domeckopol</a> at <a href="https://pixabay.com/photos/athletics-sport-relay-649647/">Pixabay</a></figcaption></figure><p>Complementing the previous reason. Why should you even try to finish work early at all? Mark, from the developer team, is still working on something, so you cannot give your awesome UX designs for him to start doing some front end coding. It’s possible that Mark has already finished his work, but didn’t report it. It’s possible that Mark is raiding your base on CoC or Mark is chatting with your ex. It’s possible that Mark is doing all those things while not even having started work on his current task. Damn you, Mark. Damn you. But oh well… it is what it is. Have to wait till Mark finish his current task so back to CoC and FB stalking it is for you. All in the name of streamlined efficiency.</p><h3>Multitasking</h3><h4>Having workers work on multiple projects is normal. Multitasking makes workers stupid</h4><figure><img alt="Person working on both a tablet and laptop at the same time, using both hands" src="https://cdn-images-1.medium.com/max/1024/1*JR4rYykJdvDis50Cx4zWDQ.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@ketut-subiyanto?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Ketut Subiyanto</a> from <a href="https://www.pexels.com/photo/crop-faceless-female-entrepreneur-doing-multitasking-work-on-different-devices-4474033/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><p>This is a well researched problem. Multitasking makes you stupid. But multitasking is unavoidable. Multitasking lowers your productivity by a couple of notches, and more so with every additional task. Sadly, corporates are forced to take on work more than their workers can handle and multitasking is the way to go because it is still leaner on the corporate wallets. Hiring dedicated staff for a single project is expensive, compared to a project running late. The ends justifies the means.</p><p>If there is any takeaway from this, you could either work on your task, play game and maybe it’s time to let Mark have a go with your ex and time for you to finally move on. Handling all 3 tasks is not really going to be very effective. Same advice to you, Mark. Get on with your current task and finish it please, whichever one it is you prioritize.</p><h3>Resource bottleneck</h3><h4>Resources are not available to carryout tasks</h4><figure><img alt="Aerial view of a crossroad interjusction" src="https://cdn-images-1.medium.com/max/1024/1*Up79iQoiDCnq4dQ4_gvA-w.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@darshan394?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Deva Darshan</a> from <a href="https://www.pexels.com/photo/aerial-photo-of-city-street-and-buildings-1044329/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><p>“Fine!”, you could say. You are ready to finish your current task, way ahead of it’s estimated time, all in the name of finishing this one project on time. You’ll even report it to your PM, knowing well that the repercussions of doing so far greatly outweighs the rewards. He/she will expect that same performance from you, forever. No excuses. Still, this one project is not going to be delayed, not because of you, dammit! It can be because Mark is busy with… god knows what. But not because of you. You are ready to move on, move on with your life, move away from games that barely pass as a strategy game, move on from connections that remotely passes as a relationship, move on to the… NEXT TASK! Glory be to the project! BRING ON THE NEXT TASK! You will steam roll it, be done with it, and the next one, and the one after that. You will usher in a era of productivity and timely finished projects that has never been heard of, dreamt of or spoken of. Bringforth the super computer needed for your next task.</p><p>What? Somebody else is busy using it? Who? MAAARK¹!!!??? God dammmiiit!!!</p><h3>Student syndrome</h3><h4>Also known as…. procrastination</h4><figure><img alt="A number of antique pocket watches, hanging wiht their watch faces on screen" src="https://cdn-images-1.medium.com/max/1024/1*Dqd9Z1KPJIbwRuBjIL2mTg.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@giallo?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Giallo</a> from <a href="https://www.pexels.com/photo/assorted-silver-colored-pocket-watch-lot-selective-focus-photo-859895/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><p>So you got a deadline to meet. But not for another couple of days. You know that you’ll not be able to meet it if you delay any longer. Big deal. You’ll just burn the midnight oil, work from home and get it done. You will just sacrifice your social life and finish everything. In one day. There are more important things to attend to.</p><p>There is a bit more to explain, but I’ll get around to it… later.</p><ol><li>No Marks were harmed in writing this article</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72ada3535912" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>