Coding Algorithm

Hello, how are you? i’m well fine in this sunday, first i apologize if there is any mistake any help or knowledge would be nice. From our last journey in the world of Coding syntax we take a little peak about syntax and it’s example we learn that variables are also part of the Coding syntax, and we also have IDEs that help us to start coding easily with it’s sytax helper. Now we’re about to talk the #3 thing which is the algorithm of Coding.

Have any of you here has heard about algorithm? if yes, give comment about how you define algorithm yourself. In the real world we do stuff like cycling to home, eating a cheese bread, travelling  etc… do you know or do you realise that what you’re doing does contain algorithm in it? well maybe some of you does realise, but for you that don’t here is my explanation,
algorithm is a set of steps or any problem solving to accomplish somekind of task.

Now let’s get back to one of our life routines, the cycling routines, cycling does contain algorithm in it can you guess how? here is how:

  1. get a bicycle
  2. start cycling
  3. cycle along the road that you know (or if you have a map than this is only optional)
  4. arrive at home

those 4 step for cycling to home is an algorithm, how? algorithm  is a set of steps to accomplish a task well those 4 are the steps to accomplish the task, we could make question to determine whether it is an algorithm or not. 1st what is the task? cycling to home, 2nd what is the steps? those 4 steps above. Now how do you feel, do you get more comfortable at algorithm or more confused? I hope you get more comfortable in this.

Well in Coding, it’s just the same but with a little change, here how it goes: algorithm in Coding or programming is a set of steps or any problem solving for a computer program to accomplish somekind of task. You see, it has the same definition ( without the “computer program” sentence), easy right? algorithm also puts the “Science” in “Computer Science” because it is rather considered science in computer. Now let’s make one of our own algorithm in solving something in Coding, let’s say that we want to make a game, what would be the algorithm, let’s just make it like this :

  1. create a name for the game = pong
  2. gather the idea for the game
  3. start writing codes
  4. (if there is an error in the codes, bonus algorithym) :
    1. find out what is the error
    2. find out the way to fix the error
    3. fix the error

  5. finish game and start playing or sell it 

Just like the cycling, we have task the steps and the problem solving, so we can say it’s an algorithm

    There are often many other different ways for a computer program algorithm to accomplish a task, each of the algorithm has an advantages and disadvantages to solve a problem. One of the most used algoritm is Sorting, you might wonder what is Sorting? here is a quick definition of Sorting in the wikipedia

    Sorting is any process of arranging items systematically, and has two common, yet distinct meanings:

    1. ordering: arranging items in a sequence ordered by some criterion;
    2. categorizing: grouping items with similar properties. “

    those definition is obtained from wikipedia

      Now i’m going to tell you 4 types of Sorting:

      • Bin sort
      • Merge sort
      • Bubble sort
      • Shell sort
      • Quicksort

      Now just imagine that you have 1.5 million integer between 1 and 15 and you need to sort those integer, well the right sorting algorithm to use is Bin sort, if you would have 2 million book titles for the best algorithms it goes with the Quicksort.


      • algorithm is a set of steps or any problem solving to accomplish somekind of task.
      • algorithm in Coding or programming is a set of steps or any problem solving for a computer program to accomplish somekind of task
      • example of algorithm: Sorting
      • 5 example of sorting:

        • Bin sort
        • Merge sort
        • Bubble sort
        • Shell sort
        • Quicksort

      Give comment, help you and me grow our knowledge together. Tips, Help and Knowledge would really be appreciated. Thank you, see you on another Article.


      Coding Syntax

      Hello, how are you? i’m well fine in this saturday, first i apologize if there is any mistake any help or knowledge would be nice. Resuming from my last article, last time we talk about Coding Variables, specifically Java Variables what a discussion we had last time eih?. Now, on this brightful day we will continue our discussion or talk for the #2 thing which is Coding Syntax. On the next article we’ll have a talk about Coding or Programming Algorithm.

      Ok, does any of you recognize the word “Syntax”? well maybe some of you already know Syntax, which is the arrangement of words and phrases to create well-formed sentences in a language. It’s a good answer but we need to more specify it a little bit, in computer science Sytax always refers to the grammar and spelling of a Programming or Coding language, now I have gathered information and make a conclusion that Syntax is:
      Syntax of programming language are the set of rules that define the combination of symbols in an exact form that the computer expects and considered to be correctly structured programs in that language itself . The expected form is called Syntax (in Computer Science, don’t get confused with general syntax).

      In the definition above you’ll see some sentence like “correctly structured” and “symbol“, what does this means? let’s say it that syntax is a certain layout of words and symbols. for example, if you want to acces a certain web page what would you type in the address bar? let’s pretend that you type , what would make you so sure that what you type would go to a web page instead to an email address? it’s because of the “www“(that stands for world wide web) and followed by a website domain “” and because it is considered to be correctly structured to the internet and to a web. Well in programming language it’s just the same, there are rules that are set in place when you obey them you will make some kind of functioning program, but beware if you don’t follow the rules and placement, xO error pops up.

      So, what about an example of a Syntax, well what about we use our last discussion as the base. In our last talk we make this Variable: 
      int first_number = 10;
      There are 4 parts of Syntax that needs to be explained here. First, the int, this part stands for the Integer type of variable, remember the String, Integer and Double we talk last time? Integer are suppose to contain whole number, nothing else. Second, the first_number, this part stands for the name of the variable, a variable name could use word and numbers but the only special character it could contain is ( _ ) an underscores, usually in the Java world variable name front letter are lowercase letter, well they don’t have to but that is usually the kind of accepted and sugested convention(in Java world). Third, value 10″ (don’t mind the quotes), this part of the sytax is use to place the value of the variable, since the variable is int then you can only use whole number only. Then, the last part of the Syntax the “;” a semicolon this special characters will always be at a Syntax, because it is the thing that mark some particular segment is complete for the computer to process. There are exception for what I said that semicolon will always be at a Syntax, that is controle structures they uses curly brackets to make the beginning and the end of a segment. Just imagine coding semicolon as a normal period writing, if we don’t put any period the writing will not be structured and will not be easy to read.

      When you enter the coding or programming world, you will likely see syntax as one of the biggest battle to master. But, as you see more and more code and introduced to more and more syntax you will get yourself finally comfortable, but this will not be a short journey it will take a step at a time. Well there is a great great good new for the people that see sytax tough, and for so a goe companies (group of enthusiasts, a.k.a nerd or noob (no offense i’m a noob too but slightly improved)). There is hope for us, now companies have made a tools to do sytax thing in coding, those tools are called IDEs or, Integrated Development Environments, which you can download onto your computer most are free like the Java Eclipse and Netbeans I mention in the last post, you can use it to create programs. ┬áThese IDEs have built in syntax checkers (much like the grammar checker in MS Word) that will let you know if your syntax is incorrect or correct, and will even give you hints with what it thinks you meant to put!.


        • ┬áSyntax is a structured combination of word or symbols

        • ┬áVariable example are Syntax example

        • ┬áSemicolon ended a segment except control structure

      Give comment, help you and me grow our knowledge together. Tips, Help and Knowledge would really be appreciated. Thank you, see you on another Article.


      Java Variables

      Hello, how are you doing? well i am very fine indeed in this fresh morning, first i want to tell you that i’m not the master of Coding because i’m still learning, excuse me if I made mistakes so any helpful knowledge would help. Now we’re going to talk about the base of Programming or Coding, specifically in Java. Program or Codes are based out of Variables, Syntax, Algorithm, etc.. (well that is more or less).

      Now i’m going to explain the #1 which is Variables.


      Variable are a symbolic name that contains or store information that are going to be referenced and used by the programs, The variable name usually represents what the variable contains. In Java there are 3 types of variable, that is: String, Integer and Double variable, These 3 variable uses different name because it contains different types of Data. The simple explanation is, if you wanna store your name in a variable, the type of variable you use is String. Or, maybe you wanna store you age in the variable, in that case you use Integer. Or even you wanna store how much money you make in a month, that type of data is stored as a Double. Don’t get confused here, you might ask, Why the heck does Java uses three variables instead of just one.Well, good question there, Java is a Strongly Typed Languange. Which means that Typing in Java will be absolute certainity that the information you stored in the variables are in a “certain way”.. so it will be very specific, it will give you error if the stored information does not match the type it suppose to be.

      String variable

      Just like I say before, if you wanna store your name in a variable which is a String, the informations that is stored would be like this, “Rafif Santika”, a String would make any data treated like an old plain English languange, a String would represents data as a Words (or specifically a Letter). It may come in your life as a programmer, that you would add two sentences or two Strings together. So, what does it means to add two sentences or two Strings together? You see, if you have 2 Strings variable, one of them contains the data “42” and the other one “3”, if you add them together what would you get? if you say “45” , then Great!!.

      You’re Wrong!. Remember when I say “a String would make any data treated like an old plain English languange”, it happens to any data that is stored whether it’s a word or a letter or even a number, so the right anwer is “423”. Just imagine if the two Strings contains “Hello” and “World!”

      what would happen to them if we add two of them? hopefully your natural instinct would say “Hello World!”(Haha!). The same thing happen to “42” and “3”.. Java behaves or treats the data differently because the different Type of variable.

      Integer variable

      Moving on to the Integer. Last time we say that if you want to store you age in a variable we use Integer, well that is because, Integer must contains data that is a number that doesn’t contain decimal in it, it would be a whole number like, 4 and 2 and 20 and 3 (that is a secret code about me, can you guess what those number means?) or maybe -4 and -1 and -20 and -3 (that is also a secret code), alll of the number I said up there, it all considered by Java as an Integer. So you need Integer variable to store them, so if you add an Integer to another like this: 42 + 3 it will make a result of 45 (not like how the String works) so if you do this:

      (This will be written in Java languange, you could write this in Java Eclipse or Netbeans)

      public static void main(String[] args) {

      int first_number, second_number, answer; /*first we started with empty Variable*/

      first_number = 10; /*then we fill the Variable*/
      second_number = 15; /*then we fill the Variable*/
      answer = first_number + second_number ; /*last we calculate them*/

      System.out.println(“Addition Total = ” + answer ); /*then we output them to the world*/


      The output result should be

      Addition Total = 25;

      if your output result is like that, Then you have Suceeded.

      Double variable

      Last thing, the Double variable. like we also say upthere, if you want to store how much money you make in a month, you uses the Double variable. Let’s just say you make $35.5 a month (it’s just an example) and you want to put it in your Code or Program, well you must know that you need to put it into somekind of variable right? what would you do? and then you wonder “let’s try and put it into the Integer variable” and you put it into the Integer variable, Great!! it’s Wrong!! you’ll get an error then you say “what is wrong? i put it into a variable, i mean it contains numbers right? and Integer are suppose to deal with number” well you’re right about one thing, Integer contains number data, But!! it has to be a specific whole number like 1,2,3… and it cannot contain another kind of data, well it’s right that there is a number you put that, but it contains another data type which is a $(dollar sign) and it contains decimal with two digits of accuracy. “then what am i suppose to do??” well you put it in a Double variable. for example(you could also write this in Java Eclipse and Netbeans) :

      public static void main(String[] args) {

      double first_number, second_number, answer; /*first we started with empty Variable*/

      first_number = 20.5; /*then we fill the Variable*/
      second_number = 20.8; /*then we fill the Variable*/
      answer = first_number + second_number ; /*last we calculate them*/

      System.out.println(“Addition Total = ” + answer ); /*then we output them to the world*/


      The output result should be

      Addition Total = 41.3;

      if your output result is like that, Then you have Suceeded at double variable.


      • Java is a Strongly Typed Languange
      • There are 3 types of Java variables
      • Store your name in a String variable (store any word or letter)
      • Store your age in an Integer variable (store any kind of whole number)
      • Store how much money you have in Double variable (store any kind of special number, like decimal, or any symbols like $)

      Give comment, help you and me grow our knowledge together. Tips, Counsel and Knowledge would really be appreciated. Thank you, see you on another Article.


      Experience and Steps to Begin Coding

       Morning!, Afternoon!, Evening! depending on when you read this post. You see, there is plenty ways or place for you to learn about code stuff, when I say plenty I mean A lot! A lot!. Now i’m going to tell you a story about how I  get myself to the world of Coding or Computer Programming.

      It all started in the late 2014, at that time I was at grade 5. It was a suny day, I was playing games at my laptop just like a typical gaming kid, enjoying the one day holiday i had. Then my dad gave me one game that was created by my dad’s friend, it was a simple bug shooting airplane game which was a lot of fun, I even made a review for it on Youtube. Back to the topic, Fortunately my dad and my dad’s friend was a programmer so he (My dad) said to me “Hey, you like playing that game. Well you can make one too!” since that time I got my atention to programming or coding, so I started wondering “How, how can i make games?”. Not long after that my question is answered, my dad gave me a book Called “Javascript for kids” well it was appropriate for a kid of my age.

      That book was a book teaching basic to adept Javascript for kids or even average adults, it has 3 parts and 17 chapters, it begins with simple coding like 2 + 2 = 4 and something like that, as you move through the book chapters it gets more and more complex coding. So, I started learning every single thing that was written in the book, at the first I had some trouble with the algorithym and the syntax but as the Chapters move I also began to Level Up I could say, my syntax, my algorithym and my knowledge grows more and more. I learn how to make basic simple games of treasure map until I finally get to make Snake game, remember that game ohh what a classic game. I finally finish making the game and as I finish making it, I also finish my Learning on that book. It took me about 6 months to finish that book and as I finish my book I also get to the next grade which is grade 6.

      After that, I started my research on Coding. I watch videos about it, I read programmers biography and one of the biography I read is Bill Gates, the founder of  Microsoft.
      Here is one of the video i watch on Youtube that was made by

      Video on Youtube by

       That video make my spirit even higher. You see, in that video they say “You don’t need to be a genius to write codes!” So there is an equal chance for everyone to learn code and SUCEED, it just depends on your passion and your desire. After that I started to take learning on (By the way it’s free for everyone) taking my skill to a higher level, in I start learning on the Hour of code it’s very unique type of  learning that i never see before, it even had courses for 3rd grade, wait it might be 2nd grade. In I learn so much, much more at that time. My knowledge improve, my syntax improve and my algorithym is improved.

      But, I learn at for not too long it’s about 3 month and I didn’t finish the learnings (Don’t you do that OK!) So, yea I quit it but not because any unreasonable things, it’s because I found another place to learn Coding or Programming, I found, Khanacademy doesn’t just contains coding but it contains everything else from math to history. I prefer Khanacademy more because, it has Coding Interface that makes you really are writing it yourself, at Khanacademy I learn Javascript, HTML and CSS Well mostly I learn Javascript, but the other 2 code are just to make my knowledge grow plus its a basic need in the world of Coding, like to make web page and stuff like that. And just like before I Level Up once more, it makes me get used to write code. I have made a couple of game at Khanacademy, wait, no it’s actually about 1. Now let me tell you, if  you’re ever stuck about anything in there, you have plenty of nice people you can ask about the problem solving.

       It takes me about a year now, to learn at KA and yet I still need to learn more because I need to master it. So, until now at grade 7 I still learn at KA, but!! besides learning at KA now I learn much more complicated coding at JAVA, i’m using Java EE Eclipse to write my code. Because I want to focus on making game, so I watch videos on Youtube on how to make games in java, now i am writing PONG games which is halfly done, and I will finished it and makes improvements soon.

      So, that’s my story about how I get to the world of Coding. Well maybe our experience and our story is different, but we have one similarity, we LEARN. Everything that I metioned up there is about how I learn, learn and learn!. Well learning on how to code will not be just a moment or two, it takes a lot of hour until you mastered it, so I am very grateful that i learn coding since I was just a boy so I can have a lot of times to Learn. That’s all of the story that I can tell you, hope you get something from our talk, and I recommend that you check the book and those 2 places. But in the end you need to pick one.Bye and see you next time!

      Do you have any other experiences? Give comment and share it with other people!


      Helloo, This is my first article for this blog, in this blog i will discuss about Coding, especially Java and Javascript. Inside this blog, I will write about Coding in the technic nor theory. The purpose of this blog is to improve yours and my Coding skills, we learn together.

      I hope this first article could tell you how I plan for the future of this blog and improve my coding skills because i’m still learning too. I hope throughout this blog I could give people knowledge and I hope through every single post I could be better and better.