Tuesday, February 26, 2013

No-Frills Guide to GitHub


“Being too busy to worry about backup, is like being too busy driving a car
  to put on a seatbelt.”
  — T.E. Ronneberg

Looking for a no-frills tutorial on using Git to make repositories of your code
available on GitHub?

You came to the right place. GitHub is a great place that allows you to back up your code,
display your work, and allow for collaboration. Backing up code is the key to never
losing any work. Ready to get started?

Note: This guide assumes you have a GitHub account and already have Git setup.

Go to GitHub and make a new repo called Project1. Now you want to minimize that
window and open up the Git Bash command line tool.

To begin, create a folder where your project can be saved.
For example reasons, we will call it ‘Project1’ for now.

Using Git Bash, navigate to the directory where you want to save it to.

Ex: cd c:/Users/Michael/

From there we can make the folder for the project using Git

Ex: mkdir Project1

Now we navigate into that folder and initialize Git.

Ex: git init

This will create an empty repository in that folder.

The next step would be the actual start of coding your project. All files should be
placed under the folder we created: Project1. You can even save them anywhere
and just copy and paste them into the Project1 folder when you’re ready to contiune.

When you are ready to add files to your Git repo run this add command.

Ex: git add .

Note: Using the . after add will add every file found in the folder.

If you want you can add files one at time but specifying.

An example would be: git add main.cpp

Have all your changes made and ready to make your 1st commit? Run the Git
commit command to commit changes you’ve made.

Ex: git commit -m “initial commit”

Where “initial commit” is your comments for the commit.

This will commit your code. Ready to see your code live on your GitHub page?
The next step will make your code available under the repositories part of your page.

This is called pushing. To push your code you must run this command first from
the Git Bash command line.

Ex: git remote add origin git@github.com:username/Project1.git

Where username is your GitHub account name.

The next command will actually push the code into the repo.

Ex: git push origin master

Now go to your GitHub profile page and you should see the code come up under
Project1.

If a push doesn’t want to work, you can force a push through using the following
command. Please be certain that you want forced pushed changes to occur before
pushing though.

To force a push use this command:

Ex: git push origin master --force

Now that you’ve gotten some code on GitHub you can explore the other commands
and options available. I just wanted to give you a quick idea of how to get code up and
running to display personal projects that you’ve completed. If you are looking for further practice or learning more about Git, you can try this site that teaches you about Git in 15 minutes.



~Michael




Saturday, February 23, 2013

So You Want to Develop an App?

“All things are created twice; first mentally; then physically.  The key to creativity is to begin with the end in mind, with a vision and a blue print of the desired result.”
—Stephen Covey

So you want to develop an app?

Ok.

Will you develop on Windows, Mac, or Linux?

Will you code it in C, C++, Java, Python, Ruby, or another language?

What framework or library will you use?

Will you make your app run on the latest mobile devices?

Have all of your choices made?

Good.

You might be too late.

There are so many considerations to make when deciding to make a project. It is a task in itself to get everything ready and decided. There are numerous programming languages and many frameworks/libraries for each. You must also take into consideration that a lot of people are ditching laptops for phones and tablets. Will your app work well on those platforms?

Worrying too much about these factors can be a downfall. Debating between C++ and Java can waste precious development hours. Trying one framework only to scrap it hours later is costly too. There’s a good chance that if you dwell on something for too long, it will come to the front above everything else.

How do you solve this problem? Develop your app before you develop it.

Wait, what?

Developing the app first by planning things out can save lots of hours. The first thing to figure out is what problem is the app trying to solve? Take the time and build from that question. You might find that another app solves the problem already. You might realize along the way that there is a better solution than your initial one.

Rushing into code happens more often than not. I know many that have thought of a problem or app idea and started coding within five minutes of thinking about it. They rush to their machines only to churn out some flakey code that is often scraped or abandoned. We all know we have been guilty of this a time or two.

If proper planning is done, the other parts will fall into place. With proper planning, you’ll realize what would be a good language and framework to use as you step through the problem solving part. In the long run, you’ll be saving yourself valuable time.

Questions to ask yourself before writing any code should include:

      1. What problem am I trying to solve?
      2. Who has this problem and why? (Users)
      3. What steps do I need to take to solve this problem?
      4. Has anybody already tried to solve this problem? Results?
      5. What features, tasks, and graphics do I want the app to have?

Once all of those have been answered, the coding part will become a lot clearer. You owe it to yourself to make the job easier for you. Planning things out in advance will give you an advantage over anyone who rushes into coding their projects. It is also a lot harder to back out of a project when you set yourself up with a clear path towards the goal.

Happy Coding!