My Hive Posts

    Written by Coding Defined who lives and works in India building useful things. You should follow him on Twitter

    Visual Studio Live Share for Remote Developers

    May 15, 2020

    In this difficult times, almost everyone is working from home but before this pandemic, there were number of people who were opting for work from home to reduce travel time or for their health, or it was the company's policy to mandatory work from home once or twice a week. Whatever is the case, with the increasing technological advancements as well as messaging and video conferencing apps it's possible to always connect with your teams. Now as a developer, we do messaging and video conferencing but that is just for the meeting. Now before going into focusing developers related productive apps, let us know how to be effective or productive while working from home. First and foremost, is to have a good working environment which includes a table, good Chair a Monitor and a quiet place so that you can focus and you don't get too much distraction. Since I used to do occasionally work from home, I did not have this setup and thus I am struggling a bit. Along with that we need to try to be as much as flexible with timings, now we are not doing 9-5 jobs and sometimes doing work from home can be overwhelming and we spend quite a bit of your personal time into your job. So if the situation demands you to go and do any work for half an hour in the morning or afternoon you should do it because you don't know when you will be free. These options are great for just doing your work or be productive, focussed, relaxed etc, but as a developer, we know that we are not alone in working since we are working in a team (most of us). Thus we need Collaborative tools so that we can do pair programming or can do review together. What we use is Visual Studio's Live Share which is Microsoft's real-time collaborative solution for both Visual Studio and Visual Studio Code. I work on .Net as well as Angular so mostly for work we use Visual Studio and Visual Studio Code and thus this Live Share helps us to have collaborative development. ![collaborative.PNG](https://images.hive.blog/DQmcZ9sQNqks8LsurdrGM5bjRZW5Nb98CgNvKskLzW1FSfg/collaborative.PNG) According to Visual Studio Live Share >Welcome to Visual Studio Live Share! Live Share enables you to collaboratively edit and debug with others in real-time, regardless of the programming languages you're using or app types you're building. You can instantly and securely share your current project, start a joint debugging session, share terminal instances, forward localhost web apps, have voice calls, and more! >Unlike traditional pair programming, Visual Studio Live Share allows developers to work together, while retaining their personal editor preferences (e.g. theme, keybindings), as well as having their own cursor. This allows you to seamlessly transition between following one another, and being able to explore ideas/tasks on your own. This ability to work together and independently provides a collaboration experience that feels much like in-person collaboration. This has enhanced our code review practice a lot, we don't have to go back and forth to have a code review session or we don't have to use a desktop sharing to show our code. We just do live share and thus, based on the review comments we update it then and there. There are other tools too, some are paid and some are free and based on your working ide's you can choose what to use and whatnot. I am liking my work from home setup, not because of the working environments but because we have so many tools out there for collaboration and thus you don't feel alone.

    Introducing Hive's Gatsby Plugin

    May 13, 2020

    Gatsby is a static site generator for React. Thus I thought of using it to show all my Hive posts as a blog which will be as fast as possible. Gatsby has a list of plugins which include Wordpress, Firebase, etc, thus I have created Hive Plugin so that anyone can create their Static site which will show the list of posts one has done. **Hive Posts using Gatsby** The project is a combination of Blog and Plugin which will be pulling your posts from api.hive.blog to Gatsby. You need to provide your hive account name and it will get all the posts. The plugin is embedded into the application under the plugins/gatsby-source-hive folder where you have two files gatsby-node.js and package.json. In gatsby-node.js we are querying api.hive.blog to get the posts based on the username. Repository: https://github.com/codingdefined/hive-blog Demo Site: https://codingdefined.github.io/hive-blog/ It takes all the posts which you have written till now, with the images pointing to hive.blog. Since its a static site generator, you need to build and deploy if you would like to see the new posts which can be automated using node.js. The site has Seo plugin as well as Google Analytics if you would like to see how many visitors are coming to your site. The site has been deployed to Github Pages, using the npm package gh-pages and thus I need to enable it. ![image.png](https://files.peakd.com/file/peakd-hive/codingdefined/Qq2App63-image.png) As of now, the comments are not enabled, but we can enable it using Disqus and get all the comments already on the Hive Blockchain. If you would like to create your own static site, then you need to change the tag to your username, on [gatsby-node.js](https://github.com/codingdefined/hive-blog/blob/master/plugins/gatsby-source-hive/gatsby-node.js) file. Index Page : ![image.png](https://files.peakd.com/file/peakd-hive/codingdefined/5n85QWna-image.png) Individual Blog Page: ![image.png](https://files.peakd.com/file/peakd-hive/codingdefined/F5vDZSbD-image.png) Full Page : ![image.png](https://files.peakd.com/file/peakd-hive/codingdefined/CVm5vMD7-image.png) The Graph QL query which is being used here is, where we are taking top 10 results and then querying then ```export const pageQuery = graphql' query($skip: Int!, $limit: Int!) { site { siteMetadata { title } } allHiveArticle ( limit: $limit skip: $skip ) { edges { node { id title author created(formatString: "MMMM DD, YYYY") permlink body, json_metadata } } } } ' ``` The initial code was generated using [Gatsby Starter Blog](https://www.gatsbyjs.org/starters/gatsbyjs/gatsby-starter-blog/)

    Bike Trip to Manchanabele Reservoir and Savandurga Hill

    May 12, 2020

    I had done the Bike Trip just before the lockdown started but could not able to post it. Today when I was checking my Camera photos, I stumbled upon the trekking photos and thus started writing about my experiment. Manchanabele Dam/Reservoir is situated in the Magadi taluk of Ramanagara district in Karnataka. This reservoir is built across river Arkavathi. It's located at a distance of 35 km from Bangalore and it's known for film shooting place because of its picturesque look. Savandurga Hill is among the largest monolithic hills in Asia and is located around 50 km from Bangalore. It is formed of two hills Karigudda and Biligudda. Route Taken - Bangalore -> Kengeri Bus Terminal -> Dodda Aladmara Road -> Donnenahalli Road -> Manchanabele Reservoir -> Savanadurga - Manchanabele Road -> Savanadurga Hill Google Map - [Bike Trip Google Route Map](https://tinyurl.com/vb4qvpe) I started from Bangalore around 10 AM. The ride was smooth throughout and around 11:30 AM I got the first glimpse of Manchinabele Reservoir and I pulled over for a couple of minutes to enjoy the scenic beauty. ![IMG_2108.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/K68Zsq6S-IMG_2108.JPG) Manchanabele Dam The visitors are not allowed inside the dam because of the frequent deaths happens there but the security guard will allow you to enter if you have BWSSB pass. The guard advised me to not enter in water as it is not safe. The scenic beauty from inside is spectacular too. Bluewater surrounded by lush green trees and mountains perfect for photoshoots. There is another entry to view the reservoir if you do not have a BWSSB pass. ![IMG_2114.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/lvR8yRrq-IMG_2114.JPG) Inside Manchanabele Reservoir After spending around half an hour inside the reservoir I headed towards Savanadurga Hill which is around 15 km from Manchanabele Dam. The Savanadurga - Manchanabele Road is excellent and the road was through Savanadurga reserved forest. I parked my bike at the foothills and walk-up the hill on the trek route. I also need to sign a register before starting the trek, in this way the forest department keeps track of every people. ![IMG_2121.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/2rrLSbxm-IMG_2121.JPG) Savanadurga Trek Starting The trek was not that difficult though the hills have gentle trek which can be climbed by first time trekker. The problem which I faced was that it got quite hot as the sun was on the top. Luckily I had water as well as few chocolates with me to keep my hydrated. At one point of time, the trek was very steep and thus I had to literally held my nerves to climb that. The initial stretch seems to be the toughest one for everyone because the slope was very steep which makes it hard to climb and thus it makes one exhausted while starting the trek itself and thus you need to keep yourself hydrated. Since the rock is steep, you need good grip shoes. Because of the nature of these slopes, the hill is named Savandurga (Savina = death + Durga = fort) which means the Fort of Death in Kannada. ![IMG_2125.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/j6s9sPDq-IMG_2125.JPG) The trekking had signs at which direction to go, but if you miss one of the signs you might able to get lost in the forest and a lot of time will be lost. After an hour or so I have reached the first fort wall from there the trek became relatively easy. ![IMG_2127.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/rvtp1aaY-IMG_2127.JPG) Once you reach the top, you will be astonished to see the beauty of the surroundings. There was forest cover just adjacent to the hill and you can actually see all those while standing on top. ![IMG_2147.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/R6IbDDx4-IMG_2147.JPG) ![IMG_2134.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/RdGGR7MK-IMG_2134.JPG) After crossing the first fort wall the slope becomes gentle and I can see a lot of people standing near the top and doing photoshoots. The second fort wall seems to be more beautiful than the first one and people tend to spend more time on this fort wall. ![IMG_2157.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/GU3s3rtm-IMG_2157.JPG) ![IMG_2158.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/5KagcnEY-IMG_2158.JPG) The final stretch is the quickest one, as well as the easiest one, where I have passed through the caves then, ascend very steep boulder. The clear blue sky and the expanse of green below it make for a mesmerizing sight. It is one of the excellent places for photography, as it provides a vantage point for landscape photography. ![IMG_2160.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/Rb1a21y1-IMG_2160.JPG) ![IMG_2169.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/sItOjREZ-IMG_2169.JPG) ![IMG_2164.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/E6Gwpxmy-IMG_2164.JPG) ![IMG_2171.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/qLhkXP6D-IMG_2171.JPG) Coming down was quite easy as the gravity did the rest of the work. ![IMG_2173.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/QBQyOTDy-IMG_2173.JPG) ![IMG_2175.JPG](https://files.peakd.com/file/peakd-hive/codingdefined/Fnsq14O2-IMG_2175.JPG)

    What is Better, Sunrise or Sunset?

    May 11, 2020

    Everyone has their priority and everyone loves to go for a Sunset or Sunrise but if you have to choose between any one of them, what will you choose and Why. I will choose Sunset, and for me, Sunset is much more beautiful than Sunrise. First of all for watching a sunrise I need to wake up early in the morning which I am not very fond of. Secondly, there are more dust, smog, and clouds at sunset and thus those elements diffuse the light, which makes it bigger and dramatic scenes. Whereas in the case of Sunrise, the sky is clean and clear most of the time, thus you see Sun and its light everywhere. One more thing everyone likes Sunset is that you can raise a glass to Sunset. Tea, Cofee, Alchohol, who drinks that at the time of sunrise, but most of the folks drinks it at the time of Sunset watching the scenes and enjoying the moment. Few Sunset Photos Clicked by me: ![image.png](https://steemitimages.com/DQmQF9MbrrdiL9MmYPg7AoTFt4euGmfbGmNdEqcpVsY19Vr/IMG_20171110_180303.jpg)


    ![image.png](https://steemitimages.com/DQmQEwmp4SFzZsfecjSSs49Zg3THPTu7Dq5THr7pjgUoAG6/IMG_20180216_181424_2.jpg)
    ![image.png](https://steemitimages.com/DQmQCFZ5ahBfFwEDRv4pR81EMfDF94wMY4poUAqG6vKnTKZ/IMG_20170301_182850802.jpg)

    Innovative Way to Ask People to Stay at Home

    May 09, 2020

    With the lockdown relaxation from 4th May had started where there was some relaxation for the Green and Orange Zones whereas in Red Zones the relaxation is much less. To Understand the post, let me explain Red Zone, Orange Zone and Green Zone. Red Zone is the district where there was an Active case found in last 7 days, Orange Zone is the one where no new case in last 7 days but the active corona cases where present. Green Zone is the one where no new cases found in last 14 days as well as there is no active cases. So from 4th May, Government of India divided whole India in these three zones and thus equivalent restrictions where imposed so that people will stay at Hone. The problem is Bangalore is in Red Zone, but still people are coming out of the home just like previous days. Some where chilling out, some are making weekends plan, so and so. The Police Department in Bangalore has put up a banner telling about Weekend Planners to take a quiz before heading out. ![xbtbtj.jpg](https://img.esteem.app/xbtbtj.jpg) PC- Google.com Now whatever number you choose after doing the mathematical calculation, it will always come as 9, that means Stay At Home instead of going out. This is innovative way to make people understand to stay at home. But my question remains the same, why people I'm Bangalore are coming out even though it is been marked as Red Zone, what is government doing. I know the small owners are the one who are the suffering the most but the government has to provide them some relief instead of opening up everything. Though, what I found out is that each one of the people on the road are wearing masks which is a good sign, I.e. a sense of responsibility. Hope this coronavirus pandemic ends soon. Be healthy, Be safe and Please stay at home and don't go out if there is no necessity.

    Github lanched Github Codespaces

    May 08, 2020

    GitHub Codespaces is a new online development environment launched and hosted by Github and its powered by Visual Studio Code. It includes everything that you need for a development environment, including a text editor, syntax highlighting, autocomplete, debugging tools, etc. It helps you to develop in the cloud instead of locally, thus you need not have to have a local development environment. ![image.png](https://images.hive.blog/DQmY53XMnp4yMsYZwsBCDT7rBi2YuhhdiXEUj2isNyV8S4K/image.png) As of now, the Github Codespaces will be available to a small group of Github Users, but over time more users will have access to it based on how the best tests go on. It will be free of cost as of now but it might be they will change it once it gains popularity. According to Github: >Each developer can create one or more codespace for any public repository, or for any private repository owned by their user account. During the beta, private repositories owned by organizations or any repositories owned by an organization that requires SAML single sign-on are not supported. Each codespace you create is only available to you. No one else can work in your codespace. >Each codespace is associated with a specific branch of a repository. You can create more than one codespace per-repository or even per branch. However, each user account has a five-codespace limit. If you've reached the limit and want to create a new codespace, you must delete a codespace first. For more information, see "Deleting a codespace." ![image.png](https://images.hive.blog/DQmZCVFNJmWSVN3NUDds6nQG6kZGxGMrRcFp4orTcAKAx9W/image.png) I have signed up, have you? ![image.png](https://images.hive.blog/DQmVsZnL8Q4YxDJMJH3gLBR3Jo4g6jHhSNaS7WBBtM8Raa2/image.png) ![image.png](https://images.hive.blog/DQmbh7haDYWt5GLF6WLtidMMp71bDwhW3bK5EjH2snGpS71/image.png)

    How to Stay Fit in Lockdown

    May 07, 2020

    Lockdown is taking a toll on everyone's health. I used to walk around 10000 steps daily before the lockdown, but now I can hardly walk 2000 steps. So, instead of activity, I am trying to stay healthy my changing my food habit like : ![image.png](https://images.hive.blog/DQmZmsn98N7kgDbjGxw4QuKaCpwcGhJErzaVwoPoevSkfQQ/image.png) PC: Pexels.com 1. Going Sugar-Free - I have to congratulate myself on going sugar-free from the last 1 month because I know sugar is that bad element that can hamper your health more than anything. Though I don't advise people to go full sugar-free but try to limit it because excess sugar is one of the primary reasons for weight gain. 2. Drink a lot of water - When I was in office I had a tendency to go and fill a 500 ml of water every 2 hours, thus I was easily drinking around 5 liters every day. Now at home, I try to keep that habit and keep myself hydrated. 3. Avoid Binge Eating - While at home, we do cook our food and thus eat a few fried food while cooking something special but I do try to avoid binge eating at any cost. How you are keeping yourself fit during a lockdown?

    Be a long term Investor

    May 06, 2020

    Now the recession is around the corner and everyone is asking what should people be doing with their investment, should they cash out and sit on the cash, should they keep invested as this time is short-lived or something else. ![image.png](https://images.hive.blog/DQmYFm7j3no4VNpo7k7Yyns9YViydwKh4DmqD8v45aZYGSb/image.png) PC: Pexels.com If we go by history we have seen a lot of ups and downs in the market, be it 2008 or 2013 or even in 2019. No one would have predicted this even the great Warren Buffet because you don't know the future. Let's go by the Quote of Warren Buffet which says >"We have long felt that the only value of stock forecasters is to make fortune-tellers look good." I'm amazed at how many investors take market forecasters seriously, even when they have no credible track records of success." Those who all are saying that they knew it, are just falsely trying to sell their narratives. You might be sitting on negative returns or the loss but right now the main goal is to email calm, buy the dip and hold it till the market goes back again. You might think of rebalancing your stocks, if you are too much into the bank or oil try to get Pharma or FMGC etc. You might be excited about the market fall but don't wait to get into the market by having loads of cash. Cash will not make you billionaire, people who take a little risk and invest in the right time are get rewarded. Those people get into trouble, who wants to outsmart the market and don't respect it. We need to be long -term investors who just see through the noise. Invest today for the long-term and you will be rewarded in the future..

    What has Lockdown taught You

    May 05, 2020

    Recently my Company has started a thread to know from the employees that what ha current lockdown taught you. Our company is situated in India, so most people have given the perspective with respect to the lockdown in India. The lockdown in India has started on 24 March 2020 for 21 days then extending it to 19 days and then again for 14 days. So we are still in Lockdown which might get over on 17th May. ![image.png](https://images.hive.blog/DQmUnucgdyca1HGydd4XgUUbGZXtJqWUPENbqBXQ3oxTnWq/image.png) PC: Pexels.com I am saying might because if the cases do not come down, we might see an increase in lockdown days. Though in the 3rd lockdown which has started on 4th May, we have got a lot more relaxed than the previous two, like the liquor shop was closed for almost 40 days but it was opened yesterday for people. So coming back to the point, a lot of employees have given the answers including me, I will just summarize those points in this post. An employee has written that the lockdown taught him to keep himself engaged in Reading books which helped him upgrading his skills along with getting a lot of knowledge. The two books which he will recommend is 1-Five Dysfunctions of the Team 2-Total Money Makeover-Financial Planning. Another employee has written that he is experiencing life skills, proactiveness, and Patience. He is also getting a deep insight into what our previous generation have enjoyed without all the buzz and hype like social media or smartphone. He also lists down some of the points which we all should follow in this lockdown 1. Restrict Negativity & add positivity by learning new things. 2. Ensure to connect with family members, friends & colleagues. 3. Appreciate small things 4. Respect Nature and Cherish the Silence 5. Health is Wealth 6. Curb indiscriminate Spending 7. Have patience 8. Indebted to people who put their lives at stake for others Another employee has given a perspective about all the countries which are facing this pandemic by saying that we humans are very vulnerable where a microorganism has put everyone including the developed countries on their foot. A micro virus can jail us for weeks in our own home like prisoners. Great and powerful nations have bowed down and their ego has shattered instantly. These countries have invested millions or billions to protect their land and boundaries in arms and ammunition but never anticipated that the enemy can be a form of Lilliput which cannot be seen through the naked eyes which can bring the complete shutdown and cost millions or billions. Threat and death can come anytime are the realization so its high time to be humble and be grounded till we inhale our last breath. He also lists down the positivity caused by the lockdown and they are 1. Rivers which were polluted have purified themselves 2. Air which was polluted have become cleaner 3. The ozone layer is said to be healing itself. 4. All religious places are at peace from humans. 5. Humans are trapped and animals are free-roaming outside. 6. Marriages that had become an event to show off prosperity have very few audiences now. 7. All luxury has come to a dead-end and Real necessity has taken the extra mile. 8. Work is happening from home without "Power dressing" where we all were mimicking west and had believed its the success mantra. 9. A simple cough, sneeze, and fever will threaten us of CORONA every moment in the days to come. ![image.png](https://images.hive.blog/DQmfZpK28j5ECW2SQbuzceYHkstnHHZn1Rhw62H7XEWTfsN/image.png) PC: Pexels.com The points made by other employees are like : 1. Lockdown taught me to understand the value of doctors, other healthcare officials, police, and emergency workers. 2. Lockdown taught me I can survive 50 days without going to any Restaurant, Malls to have food ( It is achievable) and finally I found who takes a major chunk of my credit card bill. 3. My family expense to lead a healthy life is less than 120$ remaining whatever I spent to date is luxury. 4. Lockdown taught me to respect the value of savings. I come from a middle-class family now this lockdown makes me understand the importance of a single penny. 5. Lockdown taught me to spend time with my parents and other family members which is almost an impossible task during normal life. 6. How fragile our healthcare system is and how much we have to prepare in case of an attack from an invisible enemy. 7. How underprepared our nation for a pandemic attack and how important is to prepare our system with healthcare infrastructure, medicine, and pharma equipment. 8. How important it is to be healthy and fit not just physically but also mentally! 9. It is possible to be at home and work efficiently with our global counterparts. 10. Last but not the least, Lockdown gave us a glimpse of our life post-retirement!! 11. . Reinvent your childhood dreams which you might have forgotten on your way to building a better career and a better lifestyle. Slow down and find yourself again 12. Learn to be calm amid chaos 13. When you can’t control the situation, control your emotion, and learn to be patient and wait. Surely something positive will come out of it. Just wait and Watch 14. There is nothing wrong in being considerate and sensitive about your fellow beings need and well being 15. Put a Control over your greediness, let others also live in Peace, or in other words be aware that there are others also living in this world with whom we need to share the land, air, water, and other basic necessities What Lockdown taught you?