If you want to put Lorem Ipsum text passage in Microsoft Word, just type anywhere:
=lorem()
Also, you may type:
=Rand()
This function provides localized sample text. There are two parameters available also for this. First parameter is the line count and second parameter is the amount of sections:
=Rand(10, 5)
Monday, January 19, 2015
Sunday, January 11, 2015
Paper Rock Scissors Rope javascript game
This is how to do a "paper rock scissors rope" game in javascript. Just right-click the browser, then open "Inspect element" and go to Console tab to see the choice of the computer and the winner.
$(document).ready(function () {
var userChoice = prompt("Do you choose rock, paper, scissors or rope?");
var computerChoice = Math.random();
if (computerChoice < 0.25)
{
computerChoice = "rock";
}
else if(computerChoice <= 0.5)
{
computerChoice = "paper";
}
else if(computerChoice <= 0.75)
{
computerChoice = "scissors";
}
else if(computerChoice <= 1)
{
computerChoice = "rope";
}
console.log(computerChoice);
var compare = function (choice1, choice2) {
if (choice1 === choice2) {
console.log("The result is a tie!");
}
else if (choice1 === "rock") {
if (choice2 === "scissors") {
console.log("rock wins");
}
else if (choice2 === "paper") {
console.log("paper wins");
}
else {
console.log("rope wins");
}
}
else if (choice1 === "paper") {
if (choice2 === "rock") {
console.log("paper wins");
}
else if (choice2 === "scissors") {
console.log("scissors wins");
}
else {
console.log("rope wins");
}
}
else if (choice1 === "scissors") {
if (choice2 === "rock") {
console.log("rock wins");
}
else if (choice2 === "paper") {
console.log("scissors wins");
}
else {
console.log("rope wins");
}
}
else if (choice1 === "rope") {
if (choice2 === "rock") {
console.log("rope wins");
}
else if (choice2 === "paper") {
console.log("rope wins");
}
else {
console.log("rope wins");
}
}
}
compare(userChoice, computerChoice);
});
$(document).ready(function () {
var userChoice = prompt("Do you choose rock, paper, scissors or rope?");
var computerChoice = Math.random();
if (computerChoice < 0.25)
{
computerChoice = "rock";
}
else if(computerChoice <= 0.5)
{
computerChoice = "paper";
}
else if(computerChoice <= 0.75)
{
computerChoice = "scissors";
}
else if(computerChoice <= 1)
{
computerChoice = "rope";
}
console.log(computerChoice);
var compare = function (choice1, choice2) {
if (choice1 === choice2) {
console.log("The result is a tie!");
}
else if (choice1 === "rock") {
if (choice2 === "scissors") {
console.log("rock wins");
}
else if (choice2 === "paper") {
console.log("paper wins");
}
else {
console.log("rope wins");
}
}
else if (choice1 === "paper") {
if (choice2 === "rock") {
console.log("paper wins");
}
else if (choice2 === "scissors") {
console.log("scissors wins");
}
else {
console.log("rope wins");
}
}
else if (choice1 === "scissors") {
if (choice2 === "rock") {
console.log("rock wins");
}
else if (choice2 === "paper") {
console.log("scissors wins");
}
else {
console.log("rope wins");
}
}
else if (choice1 === "rope") {
if (choice2 === "rock") {
console.log("rope wins");
}
else if (choice2 === "paper") {
console.log("rope wins");
}
else {
console.log("rope wins");
}
}
}
compare(userChoice, computerChoice);
});
Wednesday, January 7, 2015
Kata: Bowling Game

The game consists of 10 frames as shown above. In each frame, the player has two opportunities to knock down 10 pins. The score for the frame is the total number of pins knocked down, plus bonuses for strikes and spares.
A spare is when the player knocks down all 10 pins in two tries. The bonus for that frame is the number of pins knocked down by the next roll. So in frame 3 above, the score is 10 (the total number knocked down) plus a bonus of 5 (the number of pins knocked down on the next roll).
A strike is when the player knocks down all 10 pins on his first try. The bonus for that frame is the value of the next two balls rolled.
In the tenth frame a player who rolls a spare or strike is allowed to roll the extra balls to complete the frame. However no more than three balls can be rolled in the tenth frame.
Coding Dojo
A Coding Dojo is a methodology for improving the quality and performance of a software developer team. The methodology defines an environment for a group or a single software developer to practice writing program code. Hence a Coding Dojo is a framework for practicing writing software in a formal environment.
This framework cannot only be used for practicing writing code; it can also be used for practicing other known and established methodologies such as Pair Programming orTest-Driven Development (TDD).
Kata
Kata is a Japanese word referring to detailed choreographed patterns of movements practiced either solo or in pairs.
In a programming Kata, the movements needed to solve a programming problem are being practiced. The goal is not to practice solving the problem – the solution is already known – but to practice how to write lines of code in a perfect manner and how to assemble these lines of code into a smooth and fluent, easily readable piece of code.
Depending on the kind of Coding Dojo, one person is coding (Driver); another person is assisting (Navigator). The other team members are watching how the small step of the Kata is solved.
Since the Coding Dojo is time-boxed, the Dojo ends when time is up. It doesn’t matter if the problem is solved or not. In the next Dojo it’s important that the same Kata is done again. This time, the team will be able to focus more on “How to write code more efficient” rather than in how to solve the specific problem of this Kata.
* The goal of a Coding Dojo is not to write the perfect code; it’s more to write code perfectly (efficiently)
Sprint Review
Overview
At the end of each sprint, the Scrum team and stakeholders review the resulting product increment. This meeting is called a sprint review and should be time boxed one hour per week of the sprint. So if the sprint lasts two weeks, the recommended timebox for the sprint review is two hours.
The main point of discussion is the product increment completed during the sprint. Since the stakeholders are those who have a "stake" in the results, it's a good idea, and helpful too, for them to attend this meeting. During the meeting, the team members look at where they are and collaborate on how they might move forward. Everyone has input at the sprint review. And naturally, the product owner makes the final decisions about the future, updating the product backlog as appropriate.
Teams will find their own way to conduct the sprint review. Some common components of the meeting include:
- An overview of the product increment
- A demonstration of the product increment
- A discussion of what team members observed during the sprint, or perhaps product ideas that came to mind
- A discussion about the state of the product backlog, possible completion dates, and what might be done by those dates
- An update of the product backlog
Sprint Retrospective
Overview
At the end of each sprint, the Scrum team meets for the sprint retrospective, which is timeboxed for about an hour per week of the sprint duration. During the sprint retrospective, the team members review how the process went, including the intrapersonal relationships and the tools used. They talk about:
- What went well?
- What went wrong?
- What can be improved?
Then they come up with a plan for improving those things in the future. Remaining true to the Scrum framework, the Scrum team improves its own process versus relying on others to provide direction.
Planning Poker
Overview
Planning Poker is an estimating technique used by many agile software development teams.
Start with a set of planning poker cards. Each card has one of the numbers in your chosen range of story points (0, 1, 2, 3, 5, 8, 13, 20, 40, and 100). Every participant is dealt a "hand" that contains the full range of available story points.
After the cards are distributed, the game begins.
- The Scrum Master presents the top item in the product backlog to the team.
- The team discusses what the story is.
- The product owner clarifies questions, assumptions, and unknowns – as well as acceptance criteria.
- Each team member privately decides how big this story is relative to a reference story, a series of reference stories, or all of the stories on the product backlog.
- At the count of three, everyone shows his chosen card simultaneously.
If everyone played the same card, the team can log the estimate and move on to the next story.
If there is a wide variance, then the team spends time discussing the story. To focus the discussion, have the low bidder and the high bidder both explain their reasoning for their estimates. The conversation is valuable here, not the number, because that's where the learning occurs and any assumptions are uncovered. After a brief 30-second to one-minute discussion, the team repeats steps 4 and 5. This continues until the team agrees on an estimate for the story.
Further Information
Sprint Planning
Overview
Sprint Planning meeting is a negotiation between the team and the product owner about what the team will do during the next sprint.
It is sometimes divided into two sessions:
- During the first session, the product owner and all team members agree on a set of sprint goals, which is used to determine which product backlog items to commit to the sprint.
- During the second session of the meeting, the team will then excuse the product owner from the room and break the sprint backlog items down into tasks. Each task on the sprint backlog is also estimated.
Daily Scrum
Overview
On each day of a sprint, the team holds a timeboxed (15 minutes) daily meetings. Meetings are typically held in the same location and at the same time each day. Ideally the daily scrums are held in the morning as they help set the context for the coming day's work. This inspect-and-adapt activity is sometimes referred to as the daily stand-up because of the common practice of everyone standing up during the meeting to help promote brevity.
All team members are required to attend the daily scrum. Anyone else, (for example, a departmental VIP, a salesperson, or a developer from another project) is allowed to attend but is there only to listen. This makes the daily scrums an excellent way for a Scrum team to disseminate status information – if you're interested in hearing where things are at, attend that day's meeting.
During the daily scrum each team member provides answers to the following three questions:
- What did you do yesterday?
- What will you do today?
- Are there any impediments in your way?
The daily scrum is not a status update meeting in which a boss is collecting information about who is behind schedule. Rather, it is a meeting in which team members make commitments to each other. In cases where the Scrum Master cannot remove these impediments directly himself (e.g., usually the more technical issues) he still takes responsibility for making sure someone on the team does quickly resolve the issue.
Further Information
Scrum Process
Overview
Scrum is an agile framework to manage a software development project.
Why is it called Scrum?
When Jeff Sutherland created the scrum process in 1993, he borrowed the term "scrum" from an analogy put forth in a 1986 study by Takeuchi and Nonaka, published in the Harvard Business Review. In that study, Takeuchi and Nonaka compare high-performing, cross-functional teams to the scrum formation used by Rugby teams. (In Rugby - scrum is an ordered formation of players, used to restart play, in which the forwards of a team form up with arms interlocked and heads down, and push forward against a similar group from the opposing side. The ball is thrown into the scrum and the players try to gain possession of it by kicking it backward toward their own side.)
The scrum process:
- A product owner creates a prioritized wish list called a product backlog.
- During sprint planning, the team pulls a small chunk from the top of that wish list, a sprint backlog, and decides how to implement those pieces.
- The team has a certain amount of time – a sprint (usually two to four weeks) – to complete its work, but it meets each day to assess its progress (daily scrum / daily stand-up)
- Along the way, the Scrum Master keeps the team focused on its goal.
- At the end of the sprint, the work should be potentially shippable: ready to hand to a customer, put on a store shelf, or show to a stakeholder.
- The sprint ends with a sprint review and sprint retrospective.
- As the next sprint begins, the team chooses another chunk of the product backlog and begins working again.
Further Information
Angular js
Video Tutorial: Angular js
We had our Hack Sessions in the office and I need to learn Angular js because it was the tool to be used in the application. We were given this video tutorial (see above) and when I watched it, I learned Angular js in 20 minutes. It is really easy to understand and I was able to follow its different capabilities. Some of them are Directives, Filters, Data Binding, Modules, Controllers and Routes. For example, we just added a directive "ng-app" in the html tag, then added a simple "ng-model" in an input control, then put some "{{ }}" for the data-binding and (voila!) we already have a working code that shows what I written in the input control. That was the fastest record of creating a simple application and actually worked.
We had our Hack Sessions in the office and I need to learn Angular js because it was the tool to be used in the application. We were given this video tutorial (see above) and when I watched it, I learned Angular js in 20 minutes. It is really easy to understand and I was able to follow its different capabilities. Some of them are Directives, Filters, Data Binding, Modules, Controllers and Routes. For example, we just added a directive "ng-app" in the html tag, then added a simple "ng-model" in an input control, then put some "{{ }}" for the data-binding and (voila!) we already have a working code that shows what I written in the input control. That was the fastest record of creating a simple application and actually worked.
<!DOCTYPE html><html ng-app><head> <title>Angular App</title></head><body> <h1>AngularJS</h1> <div> Search: <input type="text" ng-model="searchText" /> {{ searchText }} </div> <script src="Scripts/angular.js"></script></body></html>
Subscribe to:
Posts (Atom)

