Algorithm & Programming Session #05

Back again to another session of algorithm. In this post I’ll be talking(mostly typing) about Pointers and Arrays.

The sub topics are:

1. Pointer Definition

2. Pointer Concept

3. Pointer to Pointer

4. Array

&String

What is pointer?  Pointer is a variable used to keep an address of another variable.

Syntax :
*ptr_name;
Two operators mostly used in pointer : * (content of) and & (address of)

Example :

Initialize an integer pointer into a data variable:
int i, *ptr;
ptr = &i;
To assign a new value to the variable pointed by the pointer:
*ptr = 5; /* means i=5 */

 

Pointer to Pointer is basically the same like what a pointer does but instead you do it to another pointer. So it’s like pointerception or something like that.

Syntax:
**ptr_ptr ;

Example:

int i, *ptr, **ptr_ptr;
ptr = &i;
ptr_ptr = &ptr;
To assign new value to i:
*ptr = 5; // means i=5 ;
**ptr_ptr = 9; // means i=9; or *ptr=9;

Next is array. Array is data that is kept into a certain variable so we could access them for future usage. Usually array is used to make things tidier since it makes a variable with a lot of data instead of a lot variables.

Array has characteristics and those are:

Homogenous: All elements have similar data type
Random Access: Each element can be reached individually, does not have to be sequential

Arrays usually consist of these set components:
Identifier (name of array)
Dimensional value inside operator [ ]; Example : int x[50];

Arrays can be initialized with no dimensions example: int x[ ] = {1, 2, -4, 8};

The number 1 2 -4 8 means that the array has 4 elements.

Examples with dimension:

x[8]={1, 2, -4, 8};

That means the array has 8 elements but visualized like so:

1,2,-4,8,0,0,0,0

Notice there’s four zeros meaning the element has no data on it.

That was it for a dimensional array. Now let’s move to more than one dimension array.

For example there is a 2 dimension array.

Syntax 2D Array:
type name_array [row][col];

Example:

int a[3][4];

Next is string: is an array of characters  that ended with null character (”)

There types of string manipulation aka “things to do because you want to mess with words”. For example:

strlen()

Return a value of string length; excluded null char

strcpy(s1,s2)

Copy s2 to s1

strncpy(s1,s2,n)

Copy first n characters of s2 to s1

strcat(s1,s2)

Adding string s2 to the end of string s1

strncat(s1,s2,n)

Adding n characters of string s2 to the end of string s1

strcmp(s1,s2)

Comparing the value of string s1 and s2, if similar returning 0

–etc.

Well that’s about it. And like always, Thanks for reading

Algorithm & Programming Session #04

Back again to tell you the story of my journey in a place so called “class”. What kind sorcery that they have implanted into my knowledge? Let’s find out Shall we.

At that session, we talked about a topic called “Repetition” with these sub topics:

1. Repetition Definition

2. For

3. While

4. Do-While

5. Repetition Operation

6. Break vs Continue

So you might be wandering what is the definition of “repetition”. …. Wait seriously? You don’t know? Wow. Might as well explain. Imagine your life, Done.

But in programming the definition of repetition is, 1 or more set of instructions that is being repeated. Quite self-explanatory indeed.

There is three types of repetition/looping in programming:

– For, usually written in this kind of form:

for(expr1; expr2; expr3){
statement1;
statement2;
…….
}

expr1 : Initiation

expr2 : Condition

expr3 : Increment/Decrement

– While

while(exp){
statement1;
statement2;
…..
}

– Do – While

do{
;
} while(exp);

There are certain ways to tell the loop to stop. One of them is break.

Example on using break:

int main() {
int x = 1;
while (x<=10) {
printf( “%d\n”, x );
x++;
break;
}
return 0;
}

That means the program will only finish one loop.

Another Operator quite helpful is called Continue

Example of Continue:

int main() {
int x;
for(x=1; x<=10; x++) {
if (x == 5) continue;
printf(“%d “, x);
}
return 0;
}

That means the program will skip the number five.

Well that’s the end of my lecture. Thanks for reading ^^

 

Algorithm & Programming Session #03

Welcome again to my blog!

This time I’m going to talk about what I learned from my algorithm class at the 15th of October 2015.

The topic this time is Program Control Selection.

The Sub-Topics are :

–If : A type of instruction to tell the program to make a statement, if the statement is true, then the program will make it work

–If-Else :The same as the one above except it has 2 or more statements

–Nested If : occurs if the word IF appears more than the statement

–Switch-Case : A statement that can be used to replace if-else, usually used when you want to make alot of statements.

–?: Operator : Similar to if, but returns value.

 

–Error Types

There are several types of errors :

1. Compile-Time Error : Occurs if there is a syntax error

2. Link-Time Error : Usually caused when a file used to be linked to an object was lost.

3. Run-Time Error : Usually caused by numerical overflow.

4. Logical Error : caused by incorrect logic.

 

That basically it. Thank you for reading this pile of s-

Algorithm & Programming Session #02

In this post I’m going to talk about the lesson about Algorithm & Programming that took place at the 8th of October.

The topic for that day is : Operator, Operand, & Arithmetic.

There are three types of Operand :

1. Unary : A type of calculation using one operand

2. Binary : A type of calculation using two operands

3. Ternary : A type of calculation using three operands

There are also types of operator based on it’s operation type:

1. Assignment Operator, as told by the name, it is used mainly for assigning a type of data; ex: x=2, so the value of x is 2

2.Logical Operator, an operator using the true & false value using && and ||

3.Arithmetic Operator, mainly used for basic calculation such as addition +, subtraction -, multiply *, division /, modulo %, increment ++, decrement ++, priority ( ).

4.Relational Operator, using the true and false value, but with a certain functionality such as equality, not equal, less/more than, etc.

5.Bitwise Operator, used for calculating binaries from a certain data.

6.Pointer Operator

 

That’s basically it, so…. yeah :l

Thank you for reading ^^

 

Algoritma & Pemograman( Algorithm & Programming) Session #1

In this post I’m going to type about the meaning of Algorithm & Programming. If not I’ll get no scores JKPLSDONTKILLME.

What is algorithm? You might say algorithm are those codes thingamajic that programmers do. Well I guess it is those kind of things, but our activities can also be counted as a subject algorithm. For example your activities that you do from waking up to taking a cab to work is algorithm. BUT, it’s kinda stupid to call all your activities as algorithm, right???

Next is programming which you all probably know, But what is OOP? OOP stands for Object Oriented Programming. Seems self explanatory but let me explain so I can get more respect :3. Let’s think that objects that we use for programming are blueprints of a house, what we call programs are basically the characteristics of that house.Get it? No? THEN GET OUT.

Programming also has levels of difficulty!

1. Assembler are usually for low leveled coding.

2. Medium leveled consists of C, Pascal.

3. High leveled consists of C#,C++,Java.

Next is pseudocode (Which is kinda hard to pronounce), is a type of language that you use with algorithm.

That’s about it for my some sort of “review”.

And as always, Thank you for reading ^^

 

Organization Skills (OS)

This might be the last post on this blog. Or maybe not because blogging is kinda fun, KINDA.

So in this post we’re(mostly me) going to talk/type about OS. OS is simply just organization skills as in skills or technique that you need to conduct an organization/ groups you work/ socialize with. It’s quite obvious that this skill is quite crucial(why do I like to say that word) in the business world.

Where can we perform/ test this skillz? Why you can do it by joining clubs! Being an activist also helps alot in developing this skill. But overburdening yourself with clubs can actually make a fatal impact on your college life since it can disrupt your studies. Our lovely BCs told us that it is recommended if we only join 2 clubs so we won’t get overburdened.

Oh yeah! There’s also an organization made for certain major like for example since my major (GAT) is in SoCS, we are part in the HIMTI organization. Of course other major also have their own Organization, don’t remember it all tho :3.

Well that’s the end of my blog. For a long time.

Thank you for reading ^^

 

darn I must think of something else to say in the end of my blogs

Academic Orientation(AO)

In this post, I will talk/type about AO.

What is AO you asked? AO is basically a “simulator” for academic years. I say simulator cause it teaches/simulates all the stuff that you will suffer through college. Just think of it as a introduction.

Now let me tell you the tales of my journey through AO. As a student of GAT(Games App & Tech) and SoCS(School of Computer Science) we need to learn one thing that is crucial to have especially when you take this major. And that is PROGRAMMING. To tell you the truth I sucked at programming probably because our/my school never taught me about programming. Lesson for IT at my school was powerpoint and excel. And also Visual Basic. But I really want to know how to program even if I sucked at doing so. And the test for AO was an absolute atrocious for me ;-;. I was sure that I’m right about my answers as my logic is pretty spot on. But in the end it was just a fraud. I asked my friend about it and he said that I wrote to many lines and some of the lines aren’t even necessary. I was really bummed by that so i cri at the corner of mi room.

Well that’s it for my explanation of AO.

Thanks For Reading ^^ once again

HTTP(HIMTI Togetherness and Top Performance)

IS IT FINALLY THAT TIME? THAT ALL THE SENIORS TALKING ABOUT THIS EVENT? THAT EVENT THAT IS REALLY FUN?

To be honest, I’m more of an introvert so I don’t really enjoy this kind of event(I’m sorry). But I guess other people can enjoy.

So what is HTTP you asked? HTTP stands for HyperText Transfer Protocol. I’m just kidding, it stands for HIMTI Togetherness and Top Performance. As it was said in the title this event consists of togetherness between people from the School of Computer Science (SoCS). That means a bunch of nerds brought to one place justkiddingpleasedontsueme. In this event they took a theme called SHINE(Strengthening Harmony & Inspiring New Experiences). Gotta admit that title is really creative.

So this event was held on the 12th of september 2015. In a building called BPPT. Well since people who participated to this event are SocSs, of course they have to introduce us all our teachers from this Major. They also have a talkshow, band performance, and DJ (Which is the part I hate the most). And yeah that’s basically it. If this is a review I gave that event a 5/10. There are some parts of the show that I don’t like such as that last part (DJ). Wait nevermind, I changed my mind. I’m giving it a -420/10 because of that Dj.

Well that’s it for this post.

All I write here are quite messed up so it is probably better if you don’t take it too seriously.

Thanks for reading ^^

General Orientation(GO)

In this post I’m gonna explain the first step of FEP called General Orientation or in short: GO!

No wait I didn’t ask you to go, I was talking about GO! Now most of you probably know what GO is because my readers are probably going to be Binusians or Alumnus but there might be a slight chance that you don’t actually know what is this GO or you probably hit your head too hard and got amnesia or something. So, GO is some sort of activity that teaches new students (like moi) about the things that we are about to face in campus life. It’s basically like any other orientation hence that “General” from GO. This part of FEP lasts for 5 – 6 days, why 5 – 6 days? Because I don’t remember if it’s 5 or 6 days.

Well now you know how bad I am at being a professional guy. Now let me explain my days through this, General Orientation.

Day 1. First day of entering my campus. YAY. The suspense is real. I’m scared ;-;.

Like any other orientation the first day is usually used for briefing. And we were accompanied by a group of seniors who willingly take the job to teach new kids and they call themselves the Buddy Coordinator. They taught us about rules and your dos and don’ts. For example we have to have our cards with us all time when entering campus(which is probably a very cool feature that this campus have) and some other stuff like teaching us to sing some sort like a ceremony song of Binus. Day 1 is really fun because i got to meet some new friends, although there’s something off about my class(Which is DBN11).Hmmm what is it? Oh yeah, WE HAVE NO GIRLS IN OUR CLASS!. Well we technically have A girl in our class who is one of the BC of our class, and I’m actually quite fine with having no girls since I also have Gynophobia :D.

Day 2. Still no Girls.

Day 2 was used to explain what to be expected when entering an academy. Our lovely BCs talked about exams and registration and some other stuff that we need to do. We were forc- I, I MEAN LEAD to the auditorium which is one of the coolest auditorium I have seen in my life….because it was my first(it kinda looks like a cinema tho). Binus Way as the topic for the day and one of the most important person in BINUS was the one who speaks. Which I have forgotten the name….Just kidding. It was a rector who speaks and his name is Mr. Andreas Chang. He told us about the mission and the vision that Binusian must have. And that’s pretty much it for day 2 :l

Day 3. Binus Journey & Binus Maya

The title speaks for itself except for Binus Maya hence my title has no s. Binus Journey was once again spoken by our lovely BCs. They taught us about what is going to happen in this 4 years of academic years.  While the other topic explains about “Binus Maya”. ‘Hey James, What is this Binus Maya thingamajic that you said?’. Well let me explain that to you. Binus Maya is one CRUCIAL thing to be practiced if you wanna be in Binus. Sounds painful I know but this feature is also one of the coolest feature I have ever seen in campuses around Indonesia. All the stuff you need for your campus life(mostly) are here. Schedules, Homeworks, Studying Material, etc They have it here. It’s not like school is where you have to write down the schedules. Just simply open this site on your phone and you are good to go. Although there are some errors from the site that I am unhappy with >:l

Day 4. And still no girls.

This days topic were Academic Success (Sukses Kuliah), “Bunga Rampai”(Yes they simply call it that but I don’t really understand why), And lastly “kerohanian” (I don’t know the English for it :l). “Sukses Kuliah”  was once again taught by our lovely BCs. Where we were taught to be strong willed in order to be Successful. Next we were dragged into the auditorium to participate(mostly just watching) the “Bunga Rampai”. And from that day to this hour I still do not understand why they call it “Bunga Rampai” (lit. potpourri). I guess it means diversity???? I don’t even know. And I enjoyed looking at all the clubs using their seer might to make us interested to joining our club. Especially the martial arts section, although I didn’t join them in the end due to physical issues. There are also funny ones like Nippon Clubs performance which I have my eye on before even knowing it exist thinking “There must be a club where I can learn japanese language and have friends who play japanese games.”. After all the clubs(They call it UKM here) finished performing. We continue to go to the “kerohanian” part. I part ways with my friends since we mostly have different religions. And went to a room specifically used for Christian community. Religion are quite important in the Binus’ eyes and I respected that. And how well they treat our diversity well and equally makes me more “respectful” towards Binus.

Day 5. I’m so tired…

This is probably the day I was waiting for since that potpourri event and in this day we could choose our own club to join. There are many clubs to join but I ended up registering to BGDC, BNCC, Band, and the club I meant to join Nippon Club. It was quite a fun day although really tiring and what’s even tiring is we have and event called “Kebersamaan” (lit. togetherness). In this “event” we show off our “Yel-yel” (lit. shout things that represent us) and since we are all boys we ended up calling us the Spartans and have the most manliest “yel-yel” in that room(in my opinion). And then everything ended and I went back to Medan cause we have holiday for a week WOOOO!

Well that’s about it for this post!

Thanks for reading it ^^

Journey thru the (Center of the Earth) FEP

Welcome to my post where I will discuss my sufferi- I, I MEAN MY EXPERIENCE, from a certain orientation from a certain College. Wait why should I say certain it’s quite clear where i go for College and that is BINUS UNIVERSITY.  YES THAT BINUS UNIVERSITY, never heard it? THEN GET OUT!

Okay it seems we’re drifting away from the topic here, might as well start writing about my experience rather than my shenanigans.

So now we take on the topic, The Orientation of Binus University, or in quite creativity they call it the FEP/Freshmen Enrichment Program. Because calling it simply orientation is boring am i right???? In this FEP there are “parts”…..right? And those parts consist of:

  • General Orientation (GO)
  • Academic Orientation (AO)
  • HTTP (HIMTI Togetherness & Top Performance)
  • Organization Skill

That’s about it….I think…..right????

…Well I guess that’s it, For more information about all those above visit my other post as this post is some sort of a “hub” for  that activity. Thank you for reading this mess.