back from the dead

currently_:
_feeling: apathetic
_listening: alizée – la isla bonita [psychédélices]
_watching: the devil wears prada [2006]
_reading: hacking for dummies, 3rd edition

-
been a long time since i posted anything here. i’ve always been bad about follow through on things like this, blogging, social media, keeping in touch etc. too lazy to be bothered, i guess.

as i stated before, i’m trying to get rid of these bad habits, and as a start, i’ve given up one of my bigger and time consuming vices – reading fan fiction. of course, i’ve got worse vices, those that are addictive and affect my health, but i’ll get to those later.

having originally started my blog for more tech related stuff, i feel a little odd posting such personal topics, but i just want to get some stuff off my chest, and other than ranting about it to my friends [and annoying them in the process], i can’t think of a better way.

this semester we started java, html, css, xml, xslt, javascript, php and windows system administration. so far its been slow going, and even with my mid-semester exams over, i don’t feel that we’ve covered a lot. in my previous semester, we covered quite a few algorithms – searching, sorting etc. i had wanted to code those in c++ and post them here during my 2 month long vacation, but i was just too busy watching tv. however, before i became that giant slob, i had programmed a few other programs, including a ridiculously time consuming one of a binary search tree – it was only about 400 loc [lines of code].

i’ll try to get it up sometime soon, as i see from my stats that people are actually visiting my blog. it would be nice if the people who benefited from my posts left a comment, a simple ‘thanks’, or a ‘ty’ would have been nice, just so that i know it was helpful. but i can’t really complain, i’m not one to leave comments myself unless its absolutely necessary.

bye.
_lolex

what’s going on

currently_:
_feeling: lazy
_listening: that which remains – closing under pressure
_watching: white oleander [2002]
_reading: hacking for dummies

-

i haven’t posted anything here recently, because i’ve been on vacation and been too lazy to post. i have however, been finishing up some programs, which will be posted here as soon as i’m back in india. but that’s probably only in july.

till then, ciao.
_lolex.

visitors, gather

currently_:
_feeling: happy
_listening: takanashi yasuharu -  girei // [naruto shippuden original soundtrack ii]
_watching: amélie [2001]
_reading: naruto manga chapter 490 – the truth of the nine tails

-

i’ve never really checked my blog stats before, but today, for some reason i decided to check it out. it said that [at the time of writing this] 17 people have visited me on april 09, 2010. i’m kinda happy that my blog is getting some exposure out there.

for some time, i wondered if anyone was even getting the link to my blog, and now i’ve found out that, yes, in fact they have. a comment or two would’ve been appreciated, but it doesn’t really matter. as long as my work is being found useful, i suppose i don’t really care. i’m not a comment whore.

a few new posts will probably be up next week – programming in c++. can’t say for sure, because my exams are starting on the 19th, and i have to prepare for them. i’ll try my best though.

off to eat dinner now. sayonara.

p.s. can’t stop listening to this song. fucking epic.

_lolex.

how awesome am i? not at all.

currently_:
_feeling: humble
_listening: farida – entao eu vou // [erotic lounge 5 - secret affairs]
_watching: g.i. joe: the rise of cobra [2009]

_reading: introduction to hashing

-

our second assignment for database management systems this semester included writing two programs in pl/sql – one using cursors and the other utilizing triggers.

not having had any proper classes on even the basics of pl/sql, all of us were struggling to even understand the basics of these two concepts. i looked up references on the web, but could not make heads or tails of it. even so, i stepped up, and took it upon myself to finish these programs. and i did it. i managed to get them to compile successfully. my classmates were quite surprised, and heaped praise on me. and i let it go to my head. i even updated my status on facebook and twitter reflecting how awesome i thought i was. it was only later that i realized that pride goes before a fall, and i was feeling extremely proud.

this morning i went to class, where in my data structures & algorithms class, i was assigned a seminar topic of hashing. i immediately went online to look up what hashing was all about, when i stumbled upon this post.

The first interview was on the 10th of September with the recruiter. He explained the Google recruitment process to me and we went through my skill set. I had to rank myself from 0 – 10 in a bunch of areas such as C programming, C++ programming, Python programming, networking, algorithms and data structures, distributed systems, Linux systems administration, and others.

i read through it and – yes you guessed it – i fell off my high horse. how can i consider myself to be an awesome programmer/computer geek when i don’t even know half of what he was talking about? yes, i have logic, i can code for assignments, but to implement coding/data structures for a real life situation? i don’t even know where to start. i never considered a career in google because, well you know…it’s google. now however, it seems to be much farther than anything i could hope to reach for.

however, this has taught me a valuable lesson. i need to improve my skillset, and not only with programming. i’ve decided to learn more about systems administration with both windows and linux, and try my hand at developing a usable everyday software. however, i have exams in just under two weeks, followed by a month-and-a-half long break, so i’m hoping to get started during that time.

wish me luck.

_lolex.

programming in c – recursive function to print star pattern 2

currently_:
_feeling: tired
_listening: high and mighty color – ichirin no hana // [gou on progressive]
_watching: naruto shippuden [153] season 7 episode 12 – following the masters shadow
_reading: help with pl/sql

-

the second star pattern is as follows:
*****
 ****
  ***
   **
    *

as with the previous program, this one also asks for user input as to how many lines are needed.

code:
#include <stdio.h>
#include <conio.h>
int space, count, line = 0
void star(int);
int main()
{
int x;
system("cls");
printf("enter the number of lines: ");
scanf("%d", &x);
count = x;
star(x);
getch();
}
void star(int x)
{
int i;
for(i = x; i > 0; i--)
printf("*");
x--;
printf("\n");
space = 0;
while(space <= line)
{
printf(" ");
space++;
}
if(line < count)
line++;
if(x > 0)
star(x);
}

_lolex.

programming in c – recursive function to print star pattern 1

currently_:
_feeling: sleepy
_listening: delays – this towns religion // [you see colours]
_watching: naruto shippuden [152] season 7 episode 11 – somber news
_reading: help with pl/sql

-

this program uses a recursive function to print the star pattern shown below.
*******
 *****
  ***
   *

the number of lines are to be inputted by the user.

code:
#include <stdio.h>
#include <conio.h>
int j, count, t = 0;
void star(int);
int main()
{
int x;
system("cls");
printf("enter the number of lines: ");
scanf("%d", &x);
count = x;
star(x);
getch();
}
void star(int x)
{
int i;
for(i = x + x - 1; i > 0; i--)
printf("*");
x--;
printf("\n");
j = 0;
while(j <= t)
{
printf(" ");
j++;
}
if(t < count)
t++;
if(x > 0)
star(x);
}

_lolex.

programming in c – recursive function to calculate factorial

currently_:
_feeling: satisfied
_listening: scandal – shōjos // [best★scandal]
_watching: bleach [264] season 14 episode 9 – battle of the females? katen kyōkotsu vs. nanao!
_reading: bleach manga chapter 398 – back from blind

-

the first c language program is a little one on recursive functions. more specifically calculating the factorial using recursive functions.

code:
#include <stdio.h>
#include <conio.h>
long int factorial(int);
void main()
{
int num;
long int x;
system("cls");
printf("enter the number whose factorial value you wish to find: ");
scanf("%d", &num);
x = factorial(num);
printf("the factorial value is %d\n", x);
getch();
}
long int factorial(int num)
{
long int x = 1;
if(num == 1)
{
return(1);
}
else
{
num--;
x = factorial(num);
x = x * (num  + 1);
return(x);
}
}

_lolex.

8085 programming part 5 – sort into ascending order

currently_:
_feeling: mildly pleased
_listening: elliott smith – angeles // [either/or]
_watching: how to rob a bank [2007]
_reading: dan brown – the lost symbol

-

this is the final installment of my 8085 programming series. the final program is to sort a given set of numbers in ascending order. virtually the same as my previous post, except for one minor change.

code:
LDA 2500
MOV D, A
DCR D
begin:
LXI H, 2501
MOV C, D
loop:
MOV A, M
INX H
CMP M
JC ahead
MOV B, M
DCX H
MOV M, B
INX H
MOV M, A
ahead:
DCR C
JNZ loop
DCR D
JNZ begin
HLT

note: address location 2500 has how many numbers are in the list. address locations 2501 onwards store the numbers. after execution, the sorted list is stored in address locations 2501 onwards.

_lolex.

8085 programming part 4 – sort into descending order

currently_:
_feeling: bored
_listening: dido – thank you // [no angel]
_watching: bleach [263] season 14 episode 8 – imprisonment?! senbonzakura & zabimaru
_reading: the white board in my classroom

-

its monday and i’m in class. i hate mondays.

the fourth part of my installment in the 8085 programming series brings forth a program to arrange a set of numbers in descending order. enjoy.

code:
LDA 2500
MOV D, A
DCR D
begin:
LXI H, 2501
MOV C, D
loop:
MOV A, M
INX H
CMP M
JNC ahead
MOV B, M
DCX H
MOV M, B
INX H
MOV M, A
ahead:
DCR C
JNZ loop
DCR D
JNZ begin
HLT

note: address location 2500 contains how many numbers there are to be sorted. the numbers are to be stored in address locations 2501 onwards – one number per address location. the sorted list will be available after execution in address locations 2501 onwards.

next: 8085 programming part 5 – sort into ascending order

_lolex.

8085 programming part 3 – palindrome check

currently_:
_feeling: sleepy
_listening: god is an astronaut – all is violent, all is bright // [all is violent, all is bright]
_watching: bleach [262] season 14 episode 7 – haineko cries! the tragic sword fiend
_reading: the newspaper

-

its sunday, and i’m up before noon to post this. wtf. appreciate my sacrifice.

today you get to see my program to check whether a given string is a palindrome or not. quite simple really.

code:
LDA 2500
DCR A
LXI H, 2100
XCHG
LXI H, 2100
MOV C, A
label1:
INX D
DCR C
JNZ LABEL 1
MOV C, A
label2:
MVI A, 01H
STA 2501
MOV A, M
XCHG
MOV B, M
XCHG
INX H
DCX D
DCR C
JZ EXIT
CMP B
JNC LABEL 2
MVI A,00H
STA 2501
exit:
HLT

note: in order for the program to run correctly, the length of the string has to be stored in address location 2500. the string itself is stored in address location 2100 onwards – at the rate of one digit per address location. if the given string is a palindrome, the value 01 is stored in address location 2501, else 00 is stored.

next: 8085 programming part 4 – sort into descending order

_lolex.

Follow

Get every new post delivered to your Inbox.