Oct 28

Definition of Repetition

Repetition means One or more instruction repeated for certain amount of time. Number of repetition can be predefined (hard-coded in program) or defined later at run time

There are 3 sets of repetition in programming : For, While, & Do While.

Repetition using For

There are two types of loops for… well… For

Infinite Loop

Loop with no stop condition can use “for-loop” by removing all parameters (exp1, exp2, exp3). To end the loop use break.

Nested Loop

Loop in a loop. The repetition operation will start from the inner side loop.

Repetition using While

The repetition statement provides the ability to execute a statement sequence repeatedly, either for a counted number of times (using the for…to clauses) or until a condition is satisfied (using the while clause). Both forms of clauses can be present simultaneously.

In while operation, statement block of statements may never be executed at all if exp value is false

Repetition using Do-While

In do-while on the other hand statement block of statements will be executed min once. It’s basically while with some modifications.

Oct 21

Today we’re gonna talk about Selections in Algorithms & Programmings

 

Selection Definition

in an algorithm implementation, an instruction or block of instructions may be executed (or not) with certain predetermined condition

Syntax:

–if

–if-else

–switch-case

IF

Syntax :

if (boolean expression) statement;

or

if (boolean expression) {

     statement1;

     statement2;

  ……

}

If boolean expression resulting in True, then a statement or some statements will be executed.

Selection: IF-ELSE

Syntax :

if (boolean expression) statement1;

else statement2;

or

if (boolean expression){

   statement1;

   statement2;

   ……

}

else {

   statement3;

   statement4;

   …

}

If boolean expression resulting in TRUE, then statement1 or  block statement1 will be executed, if FALSE then statement2 or block statement2 be executed.

NESTED-IF

  • Nested selection occurs when the word IF appears more than once within IF statement.

Syntax :

if (boolean expression) statement1;

if (boolean expression) statement2;

if (boolean expression) statement3;

or

if (boolean expression) statement1;

else

  if (boolean expression) statement2;

  else

  if (boolean expression) statement3;

SWITCH-CASE

Switch-Case Operation

This statement is used in exchange of IF-ELSE, when if-else nested number of level is enormous and difficult to read

Syntax:

switch (expression) {

  case constant1 : statements1; break;

  .

  .

  case constant2 : statements2; break;

  default : statements;

}

?: Operator

The operator ? : is similar to the IF statement, but it returns a value

Syntax:

  condition ? then-expression : else-expression

Using this operator, you can rewrite

if(a > b)

max_value = a;

else

max_value = b;

as

max_value = (a > b) ? a : b;

Oct 14

Today. we’ll talk about Operator, Operand and Arithmetic

  • Operator is a symbol to process values in result for a new value
  • Operand is part which specifies what data is to be manipulated or operated on
  • Example :

  C = A + B 

  (= and + sign are operators, A, B and C are operands)

  • Based on its operand number, operator can be divided into three:

–Unary operator  (needs one operand)

Binary operator  (needs two operands)

Ternary operator  (needs three operands)

Based on its operation type, operator can be grouped as:

–Assignment Operator

–Logical Operator

–Arithmetic Operator

–Relational Operator

–Bitwise Operator

–Pointer Operator

Assignment Operators

A binary operator

Used in assigning value to an operand

 

Left hand side operand (Operand1) should have (L-Value) such as variable

Right hand side operand (Operand2) can be constant, another variable, expression or function

Arithmetic Operators

Modulo

–Symbol : %

–Binary operator

–To find reminder of a division

–N % 2, can be used to find an odd or even number

  • N % 2 = 0 ® N is even
  • N % 2 = 1 ® N is odd
  • Increment and Decrement

–Symbol : ++(increment), –(decrement)

–Unary operator

–Increase (++) and decrease (–) the value of a variable by 1.

–Its position can be in the front (pre) or after (post) a variable.

Relational Operators

Use to compare to values with TRUE or FALSE result

FALSE in C language equals to the value of zero

TRUE on the other hand not equal to zero

TRUE set by a C program at run time equal to the value of one

 

Oct 7

Alright, so here I am today writing a few summaries about algorithms and programming.

Here we go.

Algorithms can be interpreted as a set of logical sets to solve a problem to produce of solution

Programming is a set of instructions that is put into the computer so that the computer can work according to the instructions.

So, Inside of algorithms and programming, there’s a… thing… called OOP or Object Oriented Programming. Now inside of OOP there are 5 more things, Encapsulation, Inheritance, Abstraction, Polymorphism, and Interface

In algorithms and programming there are compilers, assembler, and interpreter.

Compiler compiles source code to files that can be executed

Interpreter is computer program that executes programming instructions

Assembler is a program that translates assembly language to machine code.

here are some programming language from ranging from easy to hard

Assembler : Easy

C, Pascal, and Fortran = Medium

Java, C++, C# = Hard

Now, people have recommended us to use C as a programming language. Why use C? Because the C language are Flexible, Portable, Well Known, and Supported by a large number of libraries.

People also recommends us to use Flowcharts rather than a long writing. Why do people use flowchart so much and not writings? It’s because PICTURES ARE EASIER TO UNDERSTAND THAN FULL WORDS.

In algorithms and programming there are also pseudocode and Source code

Pseudocode are an artificial & informal language and helps develop algorithms

Source code are a collection of computer instructions written using some human-readable computer language, usually as text.

There is also a structure theorem, Structure theorem makes computer programming possible using three control structures : Sequence, Selection, and Repetition

Sequence are a series of consecutive commands / statements

Selection are number of statements / commands that allows a program to choose different actions, thus the selection that the program selects will run

Repetition are number of statements / commands that allows a program to repeat said actions

Well, that’s all that I’ve summarized about algorithms and programming, this is Blackcat signing off!

 

Sep 19

Hello, you beautiful people! I’m gonna tell you about the stuff that’s been happening in the FEP or Freshman Enrichment Program at Binus University which i participated from General Orientation to Academic Orientation. Let’s not dawdle any longer shall we?

General Orientation

The General Orientation(GO if it’s shortened) was the first batch in ABN16. I was actually late when I got in class because I actually got lost on the way to Syahdan T_T, as I got in class my classmates were already introducing themselves in front of the class. TBH, I was expecting the orientation to be like when you first start in Junior High/High School. BUT THANK GOD IT’S NOT LIKE THAT! Unlike a friend of mine who underwent an unforgiving orientation which I’m not gonna talk about any further. Here, you’re actually introduced to the seniors/senpais/BC (Buddy Coordinator) or whatever you want to call them lol, I just call them senpais :D. So we went through with the self introduction and got informed that we have to wear a white short sleeved shirt and black pants temporarily for the General Orientation. So it went on as usual with no problems at all although our class were struggling to create a Class Yell which we have to, we decided on using Captain Tsubasa’s song (I’m not joking, it was really fun lol) with the lyrics edited by the class obviously.

Bunga Rampai

Ahhh, yes… This is where the club gets shown one by one. We were lucky that our class got front row seat, best seat in the auditorium. And I was genuinely surprised… There’s A LOT of clubs! From religious club to sports club to hobby clubs! I was intrigued by a few of them and decided to join two clubs (Hope to GOD their club activities doesn’t have the same day, hours, minutes, seconds, milliseconds cause there will be problems!… for me anyway.)

Last day of GO

This happened at the last day of the General Orientation. We have to write a letter to our BC’s and give it to them (I wrote it in full English cause I’m not good at putting words together in Indonesian even though I AM Indonesian… Which is weird) So I meet up with my class near the ATM’s in Syahdan and waited for the others to arrive. After everyone’s there we went up to a room where you sign up for HTTP which I did sign up for. It’s worth it!!! so after all of that our BC let us walk around the campus freely and meet up before the last event starts. So I walked around, looked at all the stands (Well… not all of them, I think I missed a few) but there’s two that caught my eye, and that is the BGDC and Nippon Club (Yes, I’m a bit of a weeb) as I mentioned above, this is the two club that I joined. After we’re done looking around, we then head to the Gym I think? There was a basketball ring so I assumed it was a Gym. We then sat down with our class and perform our Class Yell. It was really fun with every class there’s always something you wouldn’t expect! After it ends we went home and then the next event came up which I’m gonna talk about..

Inauguration

This is the event that marks the beginning of a new generation of Binus Students (Why did I wrote it like that? I don’t know. Just played Dragon Age so… I don’t know :/) so this event takes place in JCC or Jakarta Convention Center where we officially gets acknowledge as a student of Binus University. There’s a lot of stuff that happened there.A Live Binus TV Broadcast, Performance by a few 2019 Binusian, and an Instagram competition (I don’t have an Instagram and my phone sucks so I didn’t participate =3) It was an awesome experience and it’s my first inauguration.

Academic Orientation

This is where we learned basic stuff mainly Algorithms for my class (I’m in GAT btw) and that’s where we meet our Sensei =3 Albertus Agung-sensei or AG-sensei using the initials, taught us the basics of algorithms where we use codes and commands to create a simple program. Not only that, but we also learned about how to make mindmaps and the importance of reading in college. I also learned about the course that you could take near the end of the semester, the GAT Club (I want in! PLEASE LET ME IN THE CLUB!), and the study tour in the GAT Program (I want to go to japan) on the last day of Academic Orientation which is a few days earlier, you have a test to show how well you understand algorithms overall. There’s also a theoretical question which I’m NOT gonna spoil but take my words. The written question was easy if you’re creative but the main problem lies with the Algorithm question and HOLY SALAMANDER CUTTLEFISH! It was hard… well for me at least, as I have no programming experience whatsoever. But I managed to solve two problems which is still incorrect according to the system (I typed the format wrong, my fault) but this actually gives you an idea of how the test are going to be at Binus University and begs you to practice more and more. Before I end this, there’s one more event that really blew my mind. And that is…

HTTP 2015

THIS! THIS IS THE EVENT THAT ONLY WE FROM SOCS GOT! AND IT WAS EPIC!!!! There’s like a ton of awesome stuff that’s happened during that event. A band performance, A talk show, a guest appearance by Rianti Duke, A drama, A dance, We get to see a movie, A Frickin’ DJ Show?! WHAT MORE DO YOU WANT! But in all seriousness as always it exceeded my expectations. The band performances were Awesome, the talk show was Inspiring, the DJ Show was a frickin’ blast! It’s probably my first time going crazy and just let loose! (Notice how a few of it was my first time experiencing something like DJ Show and stuff? Well… I’m kind of an Introvert so that answers your question lol) although it went on until night, I never felt tired at all! The DJ Show in particular pumped me up! When It was like 6PM or something I went to pray with my friends and I can still hear the music. Guess nothing stops music :D. So after it was over, we head back to Anggrek and parted ways (We got the third bus so it was late when I got home, considering that the distance between my house and Anggrek campus are more or less 10km) and that’s what I experienced through FEP. Overall there were some tough moments, happy moments and pure frustrating moments (you know what I’m talking about) and anyway that’s it for my experience at FEP if you read this through to the end… How did you put up with it lol. Anyway I appreciate you for reading this and this is Blackcat going dark!

Sep 19

Welcome to Binusian blog.
This is the first post of any blog.binusian.org member blog. Edit or delete it, then start blogging!
Happy Blogging 🙂