SEC-S20W2 - How to Prepare Yourself for Programming?

in sec20w2sergeyk •  5 months ago 

Hello everyone!

I have joined a course by @sergeyk under the umbrella of the great Steemit Team. If you have not joined it yet and want to join then



Join Here: SEC-S20W2 - How to Prepare Yourself for Programming?



What should you have done before to become a programmer in the future?

In order to become a programmer it is necessary to start learning basic key skills. If the base is strong then the building will also be strong and long term. This thing we can apply to become a programmer. So if we start learning basics of programming and make our basics skills strong then we can move faster with strong determination and courage to become a programmer. I have already explored this question in the previous lesson but do not worry I will answer it here as well. Actually I have added some new points to be considered before becoming a programmer.

PROGRAMMER.png

Designed with Canva

So here are the key skills which we should learn before become a programmer in the future:

  • Develop a Strong Foundation in Mathematics and Logic: Programming is all about problem solving. And one should have grip on the mathematical concepts and logical thinking. These both things are essential. We should focus on basic algebra and logical reasoning. They help us to understand the algorithm and data structures in programming. It is my experience that if we learn to solve the analytical and logical reasoning then our mind will become able to solve the problems quickly.

  • Learn the Basics of Computer Science: As programming starts with the computers so one should have knowledge about the computers. We should be able to operate the machines. We should learn the working of the programming software as well as their advance features. We should have knowledge that how the systems work and how the databases are connected. Networking and data storage are also important to consider in this list.

  • Choose your First Programming Language: It is important to choose a programming language to start learning it if you are aiming at to become a programmer in future. It will help you to understand the basic scenarios and syntax of programming languages. Almost working of all the languages is same but there is only difference of syntax.

  • Explore Simple Programs: If you are aiming at becoming a programmer in future then it is necessary to develop interest in programming. You must start exploring simple programs at your own to understand their working and logic behind the functions.

  • Curiosity and New Technologies: Curiosity is the thing which drives the learning. If you become curious about the working of the programs and software then it will a good catalysis for you to become a programmer.

  • Learning Resources: We should take online classes related to programming to know what actually programming is and how one can have its deep knowledge and understanding. There are a number of courses avail online on many well known platforms so if you are aiming at to become future programmer then start exploring different learning resources.

  • Join Company of Programmers: If anyone wants to become a programmer then join the company of programmers. Find some with whom you can spend some time to develop your basics with the help of professional person. Because the things which a professional programmer can teach you no one can teach you.


Name a known one before or find some simple online game (logic or puzzle)

There are a number of games which can be helpful for the programmers because the games offer problems and they compels us to solve the problems. It increases our problem solving ability.

Here I have chosen Sudoku. It is the most famous and well known simple and logical game. It is puzzle game based on the number placement challenges. Sudoku gives a challenge to fill a 9x9 grid with the digits. It is expected to add the digits in such a way that each column , row as well as each of the nine subgrids contain numbers from 1 to 9. And most importantly there should not be any repetition in the numbers.

How Sudoku Can Help a Future Programmer

I have collected some important points from Sudoku game which can be helpful for the programmers.

Enhances Logical Thinking

Sudoku game put us to think logically to fill the boxes with the digits. Logical and systematical thinking is the basic skill in the programming. Similarly Sudoku requires our focus and attention on rows, column and subgrids to solve it correctly. It gives us brain exercise and enable us to think ways to solve the problems.

Problem Decomposition

In programming breaking down a complex problem into smaller problems is a key to solve the complex problem. Similarly in Sudoku game a problem is broken down into smaller units. This helps our mind to solve and decompose the programming problems with the same thinking.

Pattern Recognition

It is important to recognize the pattern in programming to understand the working and algorithm of a program. And here Sudoku game helps us again to give us a practice to find the exact patterns to solve the problem.

Improves Concentration and Focus

It is a well known fact that programming requires complete focus and attention. I can say it from my experience if you are building any logic and some disturbs you your logic may disappear and you have ti rethink about it again. So Sudoku game helps us to concentrate on any problem with consistency without loosing hope. It helps to do the tasks with focus and concentration. A single mistake in solving puzzle can invalidate the whole puzzle. It is the same in programming as well if we make any minor mistake of syntax or logic then our program will no work. So Sudoku reflects here as well.

Algorithmic Learning

When we solve Sudoku it involves the use of logic to find out the next step. Similarly in programming we have to think about the steps of an algorithm of a program for the next move and completion. This game can help us to practice building logic and strategies for developing algorithms in programming.

Patience and Persistence

In Soduko we have to be patient and persistent to solve the puzzle. Similarly in programming, debugging and troubleshooting the code we have need of patience. It can help us to control our frustration while doing programming.

Explanation with an example

Imagine while playing Sudoku you thought to write a program that will solve Sudoku automatically. You will utilize all the skills and understanding of the logic, pattern recognition and problem solving to write the algorithm for the program. So you will build your algorithm and logic to write the program which will solve the puzzle automatically by revising and understanding the patterns and the ways which you learnt to solve the puzzles. They will help you to build the correct logic. You will be able to eliminate the invalid moves and steps from the algorithm by carefully thinking the working of the game.

So by practicing logic games like Sudoku the programmers can develop necessary problem solving skills. Those skills will be helpful in every day coding.


Wolf, Goat, and Cabbage Puzzle

Problem

A man needs to transport a wolf, a goat, and a cabbage across a river in a boat that can only carry him and one of the three items at a time. He cannot leave the wolf alone with the goat or the goat alone with the cabbage.

Solution:

  • First of all take the goat from first bank to the other bank of the river.
  • Return alone and then take the wolf across to the other bank of the river.
  • Bring the goat back to the starting or first bank of the river.
  • Take the cabbage across the other bank of the river.
  • Return alone and take across the goat.

It is very famous puzzle and I am listening to it and solving it from my primary school. Once again here it was a good experience to solve this puzzle.

Two Men and Two Boys with a Boat

Problem

A couple of men who wanted to cross to the other side of the river approached the bank. They saw two boys nearby who were happily swimming in a boat. The men decided to ask the boys to help them cross, but it turned out that the boat was very small. He could handle either two boys at once, or just one adult. The adults wondered how they would get to the other shore if the boat was so small. The boys agreed to help and began to reason with them.

Solution:

  • Two boys cross the river.
  • One boy returns with the boat.
  • One man crosses the river.
  • The second boy returns with the boat.
  • Both boys cross the river again.
  • One boy returns with the boat.
  • The second man crosses the river.
  • The remaining boy returns with the boat.
  • Both boys cross the river one last time.

In this way both the men and both the boys crossed the river with the boat. It was indeed a complex task but with careful management and thinking it was done nicely.


Two Men and One Boat

Two men approached the river. A lonely boat stood near the deserted shore, in which only one man could fit. There were no people and boys nearby, as in the previous task. Nevertheless, both travelers crossed the river in this boat without any help and continued on their way. How did they do it? Think carefully!

This is very complex puzzle for me first of all I thought that the river must be dry or frozen and both the travellers crossed the river by walking on foot. But seeing the condition in the question that both of them crossed the river using the boat. So after thinking a lot I have made 2 cases for this puzzle.

Case - I: Considering both the travelers on opposite sides of the river.

For this case we can follow these steps:

  • The first man on one side of the river uses the boat to cross to the other side.
  • The second man who was already on the opposite side then takes the boat and crosses back to where the first man started.

So according to case I in this way both the travellers can cross the river and start their journey.

Case - II: Use of the rope

  • The two men can tie one end of the rope to the boat. And similarly the other end of the rope in the hands of the man or with any other support to hold the boat on the other shore.
  • The first man crosses the river in the boat. And the second man is on the opposite shore.
  • After the first man crosses the second man pulls the boat back using the rope.
  • Now the second man crosses the river in the boat and both men are on the other side.

This method allows both men to cross the river without violating the rule that only one man can fit in the boat at a time.


Blockly Maze section - Solve the last three and share in your post. If 8, 9, 10 do not work, solve 7, 8, 9. But the score will be less by (0.1) with each level.

I have completed all the 10 tasks of Maze section in Blockly. Here are the last 3 levels:

  • Level 8

image.png

Solution for level 8

  • Level 9

image.png

Solution for level 8

  • Level 10

image.png

Solution for level 8


Code.org Task to complete last 4 levels

Level 9

image.pngimage.png
Blocks SolutionCode
  • Level 10
image.pngimage.png
Blocks SolutionCode
  • Level 11
image.pngimage.png
Blocks SolutionCode
  • Level 12
image.pngimage.png
Blocks SolutionCode

image.png

Certificate of Completion

From 0 to 100
Did you learn to code?
Imagine that the calculator only has the operation '+1'.
now on the scoreboard 0.
describe how to get 100 on the scoreboard.

As currently there is only one operation on the calculator which is +1 and currently the scoreboard is 0. So in order to reach to the scoreboard of 100 I need to press the +1 operation button 100 times.

Now we have added one more operation 'x2'
as it is possible to get 100 on the scoreboard from zero as quickly as possible, in fewer steps.

Now we have another operation which is x2 so we can now use this operation to reach 100 in a more quick way. So here I have calculated some steps to reach 100 using all the available operations.

1+1+1+1+1+1 = 6 x 2 = 12 x 2 = 24 x 2 = 48 x 2 = 96 +1+1+1+1 = 100

By following the above scenario we need to perform only 14 steps to reach 100 on the scoreboard.


Find something similar to code.org and blockly.games, Write about it, solve three problems from there (similarly to p.3 and p.4

After searching and struggling a lot I have successfully found a game similar to blockly and code.org. It is a runmacro.com. The working of the game is to control the character to move through the ways with the help of the blocks of code. It is very interesting game. Believe me while playing it I started enjoying it even I am not a gaming person but it was all based on the problem solving.

I started from level one and I completed 15 levels in one sitting. At each new level complexity of the problem was increasing. But with the help of the blocks I became able to solve the problems and to move forward my character to reach the destination.

It can really very helpful for the programmers to build their logic and they can practice it from simple levels to complex levels. As far as I have observed there was the use of the basic programming concepts as well as loop concept.


It is nice to know that in the next lectures we are going to learn C++ language. I would love to learn it from you here in Steemit via your blog. But it would be better if we continue with a book.


I invite @alejos7ven, @suboohi, @patjewell to join this interesting contest.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
Loading...