branch
, checkout
, merge
"As a software engineering student I want a dynamic webpage that does something useful so I can show off my Javascript and jQuery skills. Specifically, I want a nice looking webpage that uses text inputs, radio buttons, drop-downs, or whatever to take information from the user, do some calculations with Javascript and return the answer to the user by modifying and adding to what's on the page."
[Planning & Design] Think for a bit about what you'd like to do. You need to take input from the user, do some calculation and then provide the output/answer back to the user by modifying elements on the page and adding new elements.
Here's an example that is too easy: a page that lets the user convert a temperature in Celsius to Fahrenheit. In this example you'd need a text input for the Celsius temperature, a "Convert" button and a location for the output like a paragraph element with "Answer: " text. When the button is pressed, your Javascript callback function is executed which uses jQuery to retrieve the temperature, plain Javascript to calculate the correct temperature in Fahrenheit and then jQuery to change the text in that paragraph element.
This example, however, isn't good enough because it only uses two form elements and doesn't create a list or table element. (There's another example linked from the main class page that is a little closer. It generates a table but only uses one input element, doesn't use Bootstrap and can be broken -- try a date that is clearly out of range.)
Do something fun, not too complicated, and interesting.
container
, row
, and column classed elements to visualize your layout. (Remember that you can open a Bootstrap page, like this one, in a browser and visualize the HTML elements and styling with the inspector from the developer's tools, as shown in class.)[Test] Commit and push your work frequently on your feature branch but don't merge until you are happy with it and have tested it thoroughly. For example, it should not fail if you're expecting a number and the user types in an arbitrary string. A feature branch should continue until the feature is finished and tested before merging into any main release branch.
To make sure your feature branch shows up in the commit history, at some point make sure to put at least one commit on master
before merging. The actual work in the commit doesn't matter; you could just edit the README. This will advance that branch past the branching point and will leave it nicely visible.
merge
your feature branch back into master and push
to your remote repository.Now is the time to learn the correct workflow using Git. Don't execute Git commands without thinking about them. When you're just starting out it is very easy to get things into an unpleasant state. As long as you correctly added and committed your work in the past it is always possible to fix it. I'm just suggesting to go slow and double check your commands before hitting enter.
We're requiring you to use Git from the command line for a reason. By typing in the raw commands yourself you're learning exactly what you're asking Git to do. If you use Git from a GUI then you're just clicking buttons and don't really know what's going on.