Skip to content

Moving a project from Bitbucket to Github

Both Bitbucket and Github are excellent choices to store your code; this isn’t a post about which one is best. Instead, the goal of this post is to document the steps I followed to move one of my projects from Bitbucket to Github, and what I did to wire up Github to Azure to automate the deployments of said project.

When I first started working in this project, I needed to use a cloud-based repository as a backup and to have it accessible from any computer at any time. I’ve been using Bitbucket’s free private repositories for a while now, and most of my projects are still there.

About Bitbucket

“Bitbucket is more than just Git code management. Bitbucket gives teams one place to plan projects, collaborate on code, test, and deploy.”

The text below is the description from bitbucket’s website. It is, in fact, a complete solution for code management. Just like Github, it does offer an easy-to-use interface and workflows to make building and deployment of your code a breeze.

However, one of Bitbucket’s advantages until recently was the unlimited free private repositories. For individuals with many projects like myself, paying for an external repository for each software experiment I create it’s just not feasible. Bitbucket understood this from the start, and this is the reason many developers, and probably small companies use their free private repositories.

About Github

“GitHub is a development platform inspired by the way you work. From open source to business, you can host and review code, manage projects, and build software alongside 31 million developers.”

The paragraph above is from Github’s website. While Github became very popular among the open source community, it just wasn’t a feasible solution for individuals or small companies looking to use private repositories and without resources to pay for them, at least not until now. You see, Microsoft acquired Github on October 2018 and this, perhaps, allowed them to expand their offerings and offer free private repositories. Regardless of the reason, it was a great move by Github, and I’m sure some people have switched to Github from other places now that they are offering free private repositories.

How do you move your code to a different remote repository?

Moving your code from one cloud repository to another is in fact, very simple if you are only moving a self-contained application like the one I moved. Technically, you don’t move your existing repository; you change the settings in your local repository to point to a new remote repository. For example, my project’s source lives in my laptop, under a folder labeled c:\repos\iai and since this folder is already set up as a Git repository, all I had to do is execute the following Git command:

 git remote set-URL origin https://github.com/ricardodsanchez/iai.git 

The command above allowed me to change the URL from one remote Git repository to another one, instead of removing and re-adding.

IF my code weren’t set up with a remote Git repository yet, I would have needed to use the following command to add the new remote Git repository:

git remote add origin https://github.com/ricardodsanchez/iai.git
git push -u origin master

That’s all, after you execute the command above, your local repository will be connected to the new Github remote repository.

Setting continuous deployment in Azure with new Github repository

Fortunately, this was also very easy, and Azure enables you to set up your application with continuous deployment by connecting to one of the following source control options:

  • Azure Repos
  • Github
  • Bitbucket
  • Local Git

Since I had already connected my web application with Bitbucket in Azure’s deployment center, all I had to do was disconnect it from Bitbucket, and then connect it to Github. To do this, you have to log in to the Azure portal, click on the App Services you want to change, and then go to Deployment Center under Deployment. Once you are there, you disconnect any existing repositories and then go through the steps to connect a new one.

After re-connecting my application to a new remote repository (Github), continuous deployment was again active and set up to automatically run every time I merge any code to the project’s Master branch in Github.

Below is a screen shot of the log after finishing the move and merging new changes to my project:

Screenshot for Azure app services continuous deployment

If you try browsing to the Github URL shown in the screenshot above you’ll get a 404 (Page Not Found) error, this is because this is a private repository.

The application for which code I moved from Bitbucket to Github is called Interns and Internships, and while it isn’t 100% complete yet, you can visit it here:

https://internsandinternships.com/

Happy Coding!

A Saturday on Stevens Pass

It’s been two weeks since it last snowed (surprisingly) in Seattle and my family and I were already missing it. Truth is that snow days aren’t a common thing within Seattle city limits, but if you drive a little outside of the city limits then you’ll find plenty of powder. My wife, Felly and I are not strangers to snow having lived in Minnesota for about ten years. This past weekend, we finally got ourselves in the car and drove to Stevens Pass, which is an excellent place for winter sports such as snowboarding and skiing.

Stevens Pass is about 80 miles east from downtown Seattle, so it took us about one hour and a half to get there. It is beautiful, Stevens Pass that is. While the day was a bit cloudy, it was still a very scenic place, we weren’t prepared to go snowboarding or skiing yet, but we’ll be coming back soon to do that.

Our next visit to Stevens Pass will be less photos and more snowboarding or skiing, and we’ll be visiting all of the other mountains soon as well. So much stuff to do out there!

A note about impostor syndrome

Impostor syndrome is when a person doubts their accomplishments, feels that they don’t deserve it, or think that their achievements (a promotion, a raise, etc.) are the result of luck. The impostor syndrome can affect anyone, especially women and minorities who fear they owe their accomplishments to affirmative action.

What if we do the following when the impostor syndrome surround us?

What if we pretended we didn’t feel it?

What if we acted as though we were more confident and more competent?

What if we showed appreciation for what we’ve accomplished and behaved as we thoroughly deserved it?

What if we told our friends and family how happy we are about our accomplishments and how the result was expected due to all of our hard work and persistence?

It takes a lot of work to do this, it takes a lot of effort, more so than any of us is able to cope with.

But what if we did it every time the impostor syndrome shows up?

It’s possible that after doing the above for a while and acting as if we deserve our accomplishments, perhaps we would teach ourselves to take what we deserve and see the outcome we have always hoped for.

 

A snowy day in Seattle.

Last month, my family and I moved to Seattle, Washington after living in Austin, Texas for thirteen years.

Moving to Seattle was something my wife and I have been talking about for years, and last year we finally decided to sell our home in Austin and move to Seattle. One of the main reasons for the move was the milder weather in Seattle, and also the beautiful nature of Washington.

Well, it has snowed twice in Seattle since we moved in last month, and everyone tells us that this is very uncommon for the area. We don’t mind, at least not yet. My wife and I are fortunate to work from home, so we don’t have to deal with the traffic or icy roads out there.

Today, my kids and I decided to go explore and play on the snow at Denny Park in downtown. It was beautiful, the snow-covered trees and people playing with their dogs and kids just made it even more special. Here are some photos of our snowy Seattle day.

A note about Analytical skills

I’m focusing on helping my kids learn analytical skills, everything else they need to learn will be more accessible to them than this, now and in the future. STEM, leadership, and other career-specific skills are often (but not always) learned while working, most adults would agree with that.

A big difference between poor kids and rich kids are the options they are given from an early age. Kids from a low-income family are often given directions to do things, instead of analyzing things and make decisions on their own; they have little or no choice about the things they can do.

When people are given options from an early age, they learn to analyze them; they learn to compare and choose what option(s) are better for them. They learn critical thinking skills and use this knowledge to solve problems and make decisions.

One of the most significant differences in early education between different social classes, in my opinion, is the access to options and the ability to make decisions about those options.

Allowing kids to think and showing them that they can pick their homework, their chores, their schedule, etc. based on the information they have at hand, and letting them discover the output based on these decisions is critical.

Analytical skills will prepare them better for life, and this, in fact, might have a more significant impact than learning technical skills for example. This is one of a thousand things that can help with the inherited disadvantage.

STEM skills should be taught, but not instead of analytical skills, especially to those kids in disadvantaged households. Most technical and job-specific skills are learned while working. So, while it is great to bring attention to the gap in STEM education for example, I believe it is just as important if not more, to teach our kids analytical skills to teach them how to think, how to make decisions, and how to have a perspective on the things that they will encounter in their future.

 

Ideal Workspace for Developers

Before becoming a software developer, I had no clue what this job required or what did a developer did through the day. Many years later, I have a pretty good idea about the workload and can share some advice on what the ideal workspace for someone that writes code is.

First of all, let’s get something clear, software developers do not write code all day, it isn’t the same as writing a blog post or anything else. Working as a software developer is something like 20% code writing and 80 problem-solving. This 80% involves thinking about a problem or a new feature. Sometimes this is a back and forth exercise where the input of other developers or other collaborators might be needed. It isn’t until you have a pretty good understanding that what can be done that you actually get to write software. And because of this, a quiet place with little or no distractions is needed to be productive.

A quiet and distraction-free place

Image credit: https://stackoverflow.blog/

A quiet place is preferred and often required if you want to focus on a problem and a solution. Many companies have resourced to open office spaces with the idea that this sparks collaboration and communication between employees. I can tell you from experience working for years at an open plan office, it doesn’t work for thinking, focusing, or getting things done. When you walk into an open plan office the first time you’ll notice is people wearing headphones, and if you look closely, many of them will be wearing noise-canceling headphones. Software developers need a quiet place to work, private offices, a spacious cubicle, or a desk at home are ideal places for this type of work.

A distraction-free work area is also important, this isn’t to minimize or avoid collaboration, the idea is to not let co-workers or other people or situations have access to a software developer unless there are a clear need and an intention to do it. And don’t worry, people can still just chat or hang out at times when walking on a hallway or via an electronic communication channel.

A comfortable chair and a good size desk

Image credit: Autonomous.ai

While it is OK to use any coffee shop chair or your couch at home, any longer-term seating setup needs to include an ergonomic chair and a stand-up desk preferably. Anyone who spent hours in front of a computer screen will benefit from a good ergonomic chair and a stand-up desk. The right size desk should fit at least two large computer monitors and a laptop, this is a very common setup for software developers.

If you are looking for a good quality desk and chair at a reasonable price I recommend the Autonomous.ai standing desk and chair. I’ve owned both for a while, and I’m pleased with it.

When working from home

If you are a remote worker, having a quiet and distraction-free place is also necessary. This isn’t difficult to achieve, most people working from home will enjoy from a quiet home during working hours as kids go to school and spouses will be at an office, or working at home and focus on their own tasks.

If you work from home and don’t have a spare room or office to work from, find a quiet corner away from the front door and the kitchen (which tends to be a place for families to hang out). Your bedroom might be the perfect place for it, that is if your partner allows it and you are disciplined about working and non-working hours.

When working from a coffee shop or other public space

Ideally, you’ll find a place with comfortable seats, good internet connection, and great coffee and reasonably priced snacks. This isn’t always possible, but if you spend enough time to find the right place(s), you’ll be surprised at how accommodating public spaces can be for you to get stuff done. You’ll need to be prepared to work at these places and to do it successfully I recommend you read this blog post which includes tips and advice about working successfully at coffee shops, etc.

Conclusion

The ideal workspace for software developers continue to be a private office and having the option to work remotely whenever needed. This gives the software developer both a quiet place and a chance to work the hours that are more convenient for her/him. The private office can only help so much avoiding distractions, the best thing to avoid distractions is to form a culture of independence where people collaborate when necessary, without interrupting a co-worker, especially if it isn’t without a purpose

The advice above is by no means a recommendation to isolate software developers. However, to do their job and do it well, software developers need the time and space to focus and work on hard problems and to create solutions. Software developers will always be able to interact with others whether in person or online when needed to collaborate or just to socialize. What’s important here is to have that quiet place when you need it.

 

How to successfully work from a coffee shop, or from anywhere!

I have been a software developer for many years now, and for the last 5 years, I’ve been working remotely 100% of the time. What does this mean? It means I’ve been working primarily from home, but it doesn’t mean I’m always home; instead I try to balance my time between multiple places inside my house AND more importantly, I go out and about when I can and when the weather permits it.

Working from a place other than your home is essential in my opinion, having a different environment, a different view, and a different location to code is stimulating, and if I might say it, empowering and motivating too. Many times I will walk outside my home and just pick a random direction, but I’m lucky to live in Seattle (just moved here recently) where I know I’ll find a coffee shop (and a good one that is) in almost every block.

What happens if you don’t live in the city you might ask, well, the majority of my time as a remote software engineer I lived in the suburbs of Austin, TX. Of course, my options were much limited than now, but none the less, I was always able to get in my car and drive to a coffee shop or any other place with a good WiFi and simple food and beverages at reasonable prices, like Panera Bread for example.

OK, so enough about my own experiences and on with the tips. Below is a list of things that will help you be more successful when working outside of your home, at a coffee shop, at the airport, at a restaurant, etc.

Here’s what you are looking for

  • Portable power
    • This is by far the most essential item to have, never assume that your laptop or tablet will have enough power to last as long as you need. Invest in a portable battery that can charge both your laptop and other devices such as your phone or tablet. Personally, I use an Anker portable battery, and it is enough to fully charge my laptop once + my phone.
  • Good headphones (ideally noise canceling + mic)
    • Why? Well, as a programmer I need to focus on my code, and public places tend to be full of noise. While I don’t use them all of the time, they are definitely a handy item to have when working outside of your home and in a noisy environment. Also, if you collaborate with other people, make sure to get headphones that include a mic so you can have a conversation with your team when needed. I use the Bose QuietComfort headphones, and while they aren’t cheap, they were a good investment for me.
  • A good cell phone plan (with unlimited data preferably)
    • I cannot say this enough, you need to make sure you can provide yourself with a good, fast AND secure internet connection to your laptop or tablet when working outside of your home. Yes, nowadays coffee shops and most public spaces do offer free WiFi, but most of the times the speed and the security of these WiFi connections is questionable. If the free WiFi at your local coffee shop is enough for you then fine, but for me, it is not. I recently switched from Verizon to T-Mobile which has an unlimited data plan (and it even works internationally!). It costs me less per month, and it works much better for my family and me. I often turn on my Personal Hotspot to share my data connection with my laptop, it has saved me from poor free WiFi connections many times.
  • A newer laptop/tablet
    • While it isn’t required of course, with a more modern device you’ll benefit from the longer battery life, and while you’ll want to carry a portable battery, it is still a good idea to have a laptop or tablet that has a great battery life, if possible. I recently got a Microsoft Surface Book 2 from work and the battery life is pretty good. Tablets in general also enjoy a great battery life as many other light laptops do such as the MacBook Air, etc.
  • A great backpack
    • This is important, while any backpack will do to carry your laptop, portable battery, multiple charges, and other cables, headphones, etc. I do recommend getting something that can help you organize these items quickly and also comfortably. I have been using this backpack for a few years, and while small, it can carry all of my devices, a 15″ laptop, an iPad Pro, a mirrorless camera and a Kindle along with my cables, portable battery, and a few other things. The backpack is compact and very comfortable, and this is the reason I like it. I can walk for miles with it, and it doesn’t bother me, and at the same time, it’s small enough to place it by my feet anywhere I land. It also fits perfectly under airplane seats.

This is all folks, these are the most important things I can think of that has helped me be very productive while working remotely and outside of my home. If you have other tips, please share them below in the comments.