MSN Messengar: Quickening@live.com
Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Tuesday, March 10, 2009

Losing Internet, Now Asking For (Greedy) Broadband

To sum up my week, it was one of those blazing hot Malaysian days where private companies everywhere in Kuala Lumpur put their air-conditioners to minus-bajillion degrees Celsius, making caffeine-powered morning cups form ice cubes by themselves or said drinker becomes an iceberg, whichever freezes first. Indoor plants at the window seat are confused; blooming spring flowers on one branch and growing winter icicles in the other.

But I’m not here to talk about work. As much as I love my neighbour’s router, my conscience is creeping up on me about getting my own internet service provider so I can surf at my own time and discretion (not that I’m planning any online in-discretion anyway, midnight or daylight). After all, there’s only so much waiting and hoping and limited deep-fried crinkle-cut potatoes to keep me company during the waiting and hoping.

Pushing aside my inner-Jiminy Cricket, two factors against me were the more obvious reasons to get an ISP, pronto. Motherly gossip from the Surau Aunties speaks that my neighbour’s son is having major exams this year so there’s no more mindless surfing in the late nights anymore (thus ends one similarity between us, kiddo). So his unsecured router is off on most days of the week and as a result, I’m having Internet withdrawal symptoms.

Internet withdrawal: A pathetic state of mind which an Internet addict goes through when he/she is deprived of all the virtual conveniences of online gaming, surfing, googling/wiki-ing, etc. Symptoms vary from addict to addict but common signs include pacing mindlessly, excessive consumption of unhealthy beverages, blogging, drooling while sleeping, annoying little nephews, blogging, counting ticks in an hour, memorizing the entire works of Tennyson’s, excessive hot showers, blogging…

In between scarping my face off the bedroom carpet and text-messaging CASH to triple-three-double-nine (when the Fly.FM radio says cue to call), my dear, beloved older brother Abang Arsenal called me by my cellphone for the first time in an eternity to ask how’s my internship. The out-of-the-blue “Hello Liza!” was quickly explained when he requested than he wanted his laptop back by the end of April.

What da f---??!!

My baby toy who I have come to depend on during neighbor’s router and McDonald’s food trips turns out to have been misunderstood about the terms after the adoption and now original parent wants it back. I thought it was a gift. Abang Arsenal thought it was a loan. Since that he’s the man who bought the Acer notebook, I have to concise it as a loan.

To concise it further, this means my internet capability will be reduced to utter null after my internship (I had hoped to make regular trips to school before convocation to enjoy school’s wireless). That’s hell on my not-so-new online mmorpg, Celestial Destroyer. I’ve already joined an in-game family and an elite guild, with the emphasis on nighttime play.

They’re all really nice but most of the active players are Singaporeans. Gamers, go figure... (hehehehehehe!)

So! Leaving me with my long-time friend, HP Pavilion PC in the house, I sing to the tune of the primary school kid’s musical team-picking song; “Which-broadband-is-the-greedy-broadband~? Please-go-out-and-buy-your-greedy-broadband~... So-greeddiiiiiiiiie~... Sent-for-OUT! (The song is which-shoe-is-the-dirty-shoe, in case my generation gap is at fault to your confusion).

Said greedy broadbands in question on my mind are big-shots Maxis, Digi and Celcom. In case you’re wondering, Telekom’s Streamyx can’t afford me because I’m too cool to reconstruct my faulty previous home renovation blunder to install a fixed line.


Current name on cellphone chip.



Been considering for a while.



Familial recommendation.


I’m looking for an unlimited broadband on a monthly basis, particularly downloading the upgrades on various softwares I use for work and play, maximum under RM1000 installation fee and hopefully not-so-big penalty fee after I decide to hate the service. After I do more research on these three, I’ll post an update. In the meantime, I do appreciate if you could throw all your ISP frustrations at me so I know what kind of trouble I’m asking for.

So-greeddiiiiiiiiie~...

Monday, March 2, 2009

My Pretty Face of Berita Harian... Sort-of.

A few weeks ago, sometime before Tour de Langkawi caused a massive traffic jam between LDP and Taman Tun Dr. Ismail's residential roads, a couple of nosy reporters armed with a camera invaded the space where I'm undergoing my internship. Predictably, they were interviewing the said company, a games development with a contract with Astro TV and Blue Hyppo for as long as cellphone TV-games had been around Malaysia.

Well, I'm not too big on reporters, even though I had aspired to join their club back when my Bahasa Melayu was better than my English (and reporting job was less dirty back then too). But when Berita Harian finally printed the centerfold story (coloured too~!), the interns' picture had more or less reminded me the nature of my position in this shoe box.

I know I hardly put the full picture of my face in this blog for reasons of security, but in the one area I would have been happy to smile for the camera was *ahem*ahem* blocked by Bun's arm. Awww damn-it, I'm the intern programmer in between the 3 graphics guys. I'm the REAL game builder!
... ...


Picture I 'borrowed' from Berita Harian: Ekonomi.


The picture is dated Monday, second of Match 2009 (today!). Haha, but for the laughs, that's the nature of many work environments. The joy is better in the job itself than the distraction that follows it, which in this case, a photographer who could have shown that girls can be game developers too.

Anyways, let me introduce you to my fellow interns. The boss in the coffee-chocolate shirt is Boss Bun himself. Bun is not his real name, naturally, but it was a nickname way back in university in United Kingdom. So everyone in the company calls him Bun. And yes, he's as big a gamer as the rest of us (occasionally helps with the music score on his guitar, so I've heard, hehehehe...).

Intern in far right is 3D artist no. 1, Zubs. Zubs is part of his real name but most folks around here call him Zubs (again, my secretive blogging nature, *squeak!*). Picture in his computer monitor is the texturing he's working, on a 3D model of a pot/vase/barrel/some other object, depending on his range of attention. He's one of the two older interns, fellows from the previous batch who came in the company a month early than me and Dinnie.

The Chinese guy in the red shirt squirming under Boss Bun's hovering presence is LM, another 3D artist. He's the youngest intern and most inexperienced. But oh-my-God he plays Devil May Cry 4 like it had been designed for him. Everyday, not a noon-hour goes by without a hacking-and-slashing hell-monsters with great sound effects.

See the pretty blue laptop, half-closed? Probably to hide his Dante-inaction (hehehehe!). LM's the only non-university intern. He's only here for a short job while wating for his SPM results.

Then there's me, sitting next to LM, just behind Boos Bun's arm/ You can't see my face but yes, I'm the girl with white headscarf and red shirt, covered by a coffee-chocolate sleeved arm. There's no pretty graphics on my monitor, even if you could have seen it. As programmer, I command piles of codes and written in a sequential order. And according to a chart my Supervisor-Nizam had on his cubicle (wow, a freaking dreaded box!), programmers are at the bottom of the developers' chain.

Nice... as an intern programmer, no wonder I'm invisible.

For the short of the blog message, the other 2 interns are another 3D artist, Dinnie, and a games designer, Nadia. Dinnie is the guy sitting on my right (you can see his head in a profile in the photo) and he came in at the same time I did. Dinnie is the 3rd 3D artist and is buddies with Zubs, coming from the same university and all.

The lady-not-in-the-picture is the only other female intern than myself, named Nadia. She's also from the previous batch as Zubs, specialty in game designing. Her table is somewhat on the wall facing the cameraman so she's completely covered by Boss Bun (Boss Bun was never a small guy or liked sitting small, I noticed). Like LM, she brings her own laptop to work, a powerful Acer which I totally envied.

There you go, the people of my station who I work with. The environment is great, as long as you understand that pizza and fizzy drinks are the main source of fuel in the company. Maybe if I stay a little longer than my internship, I'll finally get a real photo capture someday *winks*.

Monday, January 12, 2009

A Wayward Pimpernel... Wannabe Games Programmer

I’m not going to scream or shout anything big like a set of capitalized word like “I’M BACK!!!” mainly because I’m doing this on my company clock and I aim to stay here after I graduate (for reasons that they have excellent internet connection and at the rate of the recession nowadays, I probably be falling into that clichéd ‘jobless undergraduate’).

Wow, so many words under one sentence. I guess my bad habit of talking about myself to myself still hadn’t abated. Then again, what is a blog if you don’t extend excessive bragging rights to the immense void of the World Wide Web? Har, har. Okay, keeping it short and simple (which is really said since I hadn’t updated my secret space for over half a year), my last post speaks of my short break from school.

In April.



Not that I’m actually going to feel any better after this since hitting myself maybe seen as sexy in remote parts of Africa, but here in Malaysia, it ain’t mature..

I may dust up a few parts around this place, getting rid of those widgets that don’t really mean a thing and fixing both Photobucket and Imageshack profiles. Particularly the lasy bit because one of the main reasons I had to quit was the excessively annoying firewall of my university is that they hate Imageshack and I don’t like to rely too much on Photobucket.

As some might remember, I’m a graphics whore and I love to post images I might find from looking around stuff (see sidebar to details). Now that I have a faster internet line that doesn’t require $RM2 an hour, namely company’s PC, I guess this is a chance to redeem myself back into the Community of Self-Bragging.

And so where do I start updating about myself? Hmmmm...

Well I did say I’m working now. Though it’s just practical training, I hope to stick around here for much longer than the 3 months stipulated. Actually, it’s 4 months by university requirements but at $RM500 a month, I suppose the programme’s budget can only make it so far. It’s not that I love the job too much, I’m just more in love with what I can do.

I’m a games programmer. In training.

Hahaha, shouldn’t be a surprise there for my former readers, since I make massive games review like an illegal downloader on guilt pills. Really, I wouldn’t have had this opportunity if it weren’t for one of my lecturers who was moderator of my final project, which is entirely a whole other story so more on that later, someday.


MYGO Solutions


Apparently, there’s this programme by MDEC trying to make Malaysia a happier place for delinquents and school-skippers by jumping into the internationally and grossly profitable industry that’s 3 times bigger than the movies. By sugar-coating it as ‘Information Creative Technology’, the programme aims to produce ‘knowledge-workers’, aka Cyberjaya minions.

These workers should be capable of hypnotizing dead beat working-class citizen into parting their money and their youth to be hooked to a monitor that glows and makes random beeping noises. Often, these unsteady-income individuals would be connected by miles of wires that link human-machine interaction by on sound system and multiple touch-sensitive devices that jack up adrenaline stimulation of their living bodies, just to make sure it’s still living.

And every so often, a whole new method would be developed, fresh off the experimental lab, and is inserted into the machine, just to see how the stationary human would react (take note that a loud fart is NOT considered as a sign of life).

So what’s the difference between game developers and sleazy doctors who treats institutionalized coma patients? Health insurance, I think.

Well, that’s what I wanna be by the end of 3 months. This place is great, really. Closer to home so it takes less petrol consumption for my car to take me here. It’s also got great clients and had managed to stay afloat for a good handful of years. Not to mention a really cool massive project coming out sometime between August and September this year.

I’ve just started on the first Monday of 2009 so I can’t report of any real experience yet. Wish me luck, though, as they’ve stressed that they do expect a lot from me. Gotta to end here for now (my boss is haranguing me on MSN messenger), more on this later of what are the changes to my blogging lifestyles later.

Oh, one last thing.

“I’M BACK!!!”

Sunday, March 16, 2008

Simple Java Programming: Sorting An Array

This is the Java program, MyList, an interactive system which allows users to input the size of an array and the desired elements for the array. The array is then sorted using the java.util package.

It contains the following functions:
- showAscending: using for-loop, it shows the elements in an ascending order
- showDescending: using for-loop, it prints the array in reverse, from last to first
- showMax: it selects the last element in the sorted array
- showMin: it selects the first element in the sorted array
- showPrime: calculates each element in the array using a Boolean expression by selecting an odd number value and divides it within a while-loop. Shows only prime numbers


Flowchart


---START---

public class MyList{

//Main insertion sorting
static void insert(int[] array, int free_pos, int val) {
int pos = 0;
for(; pos < free_pos; ++pos) {
if(array[pos] > val) {
break;
}
}

for(int i = free_pos; i > pos; --i) {
array[i] = array[i - 1];
}

array[pos] = val;
}
//Array command for insertion sort
static void sort(int[] array) {
for(int i = 1; i < array.length; ++i) {
insert(array, i, array[i]);
}
}

//Main Command
public static void main(String args[]){

int x=Integer.parseInt(args[0]);
int[] y;
y = new int[x];

for(int i = 0; i < x.length; ++i) {
int y=Integer.parseInt(args[i]);
}

System.out.println("The ascending is: " +x);

System.out.println("The descending is: ");

System.out.println("The max number is: ");

System.out.println("The min number is: ");

System.out.println("The prime numbers are: ");

}
}

---END---


Output Screenshot *click to see*


References:
J. R. Hubbard, Ph.D, Schaum’s Outlines: Programming with Java, Second Edition, McGraw-Hill, USA, 2004.

Simple C Programming: Alternative to Merge Sort By Using Insertion Sort

Note: Purely informative; just in case this might come up in your exams or something. Sometime ago, I was asked by the lecturer to write and compile a simple C-program.

The backbone of the labtest was to re-create the structure of the Merge Sort, but it was so bloody difficult coding that, with me running out of time, I exploited a loophole in the question.

It didn’t specifically said Merge Sort. I instead used an more extensively memorized Insertion Sort... with extra coding. *hehehe!*

Question: Write a c program to merge two ordered lists of numbers and store the result in a third list.

Answer:

---START---

#include
#include
#define MAX 6
#define MAXTWO 12

//Three lists (listOne, listTwo and listMerge)
//Insertion Sort function
//Merge Sort function


void insertion (int list[],int size);
void merge (int list01[],int list02[],int list03[],int size);

void main()
{
int listOne[MAX];
int listTwo[MAX];
int listMerge[MAXTWO];
int i, j=MAX, size=MAX;

printf("Enter 6 set of numbers for the First List: \n");
for(i=0; i{

scanf("%d", &listOne[i]); //Enter for listOne

}
insertion (listOne, size); //Insertion Sort for listOne
printf("\n\n");

printf("Enter 6 set of numbers for the Second List: \n");
for(i=0; i{
scanf("%d", &listTwo[i]); //Enter for listTwo
}
insertion (listTwo, size); //Insertion Sort for listTwo
printf("\n\n");

for(i=0; i{
printf("%d ", listOne[i]); //Display ordered listOne
}
printf("\n");

for(i=0; i{
printf("%d ", listTwo[i]); //Display ordered listTwo
}
printf("\n\n");

size=MAXTWO; //change size from MAX to MAXTWO

for(i=0; i//Merging listOne and listTwo into listMerge
{
listMerge[i]=listOne[i];
listMerge[j]=listTwo[i];
j++;
}
insertion (listMerge, size); //Insertion Sort for ListMerge

printf("Merged list: ");
for(i=0; i{
printf("%d ", listMerge[i]); //Display ordered listMerge
}
printf("\n\n");
}

void insertion (int list[], int size) //Insertion Sort function
{
int a, b, tmp;

for(a=0; a{
tmp = list[a];
for(b = a-1; b >= 0 && tmp < list[b]; b--)
list[b+1]=list[b];
list[b+1]=tmp;
}
}

void merge (int list01[],int list02[],int list03[],int size) //Merge Sort function
{
int a=0, b=0, c;
//int a = listOne counter
//int b = listTwo counter
//int c = listMerge counter

for(c=0; c{
if(list01[a]{
if(a==6)
{
list03[c]=list01[a];
}
else
{
list03[c]=list01[a];
a++;
}
}
else
{
if(b==6)
{
list03[c]=list02[b];
}
else
{
list03[c]=list02[b];
b++;
}
}
}
}
//Weakness: There maybe some repeating values.

---END---


Output Screenshot *click to see*


It was only after I got passed my semester that somebody finally posted the C-programming codes to Merge Sort on Wikipedia. I’ve already passed and moved on to Java (my lecturer, a good sport she was, complimented me on ingenuity, but she still could only give me an A- score for that).

Maybe someday when C-programming becomes compulsory as a primary school subject, I can tell my little grandchildren how to take advantage of exam question loopholes.

Source: Insertion Sort, Merge Sort

More Weeds...

Add to Technorati Favorites Blogroll.net Bloggapedia, Blog Directory - Find It! Blog Flux Directory blog directory Blog Directory & Search engine Show off your blog Blogarama - The Blog Directory BlogGod Webloogle Blog Directory Blogging Fusion Blog Directory All Malaysian Bloggers Project