Credits

Tuesday, March 31, 2009

March's Top Entrecard Droppers

I thank the following top EC droppers for their constant visits and to all who visit this blog!

Do check them out for their interesting views and insights.

Dropper # of drops
Tech-Blog 29
Tech Spotlight 29
Free Free Free 29
Serian Man 27
Melissas Homeschool 25
Shortinfosec 24
Rambling Thoughts in SMK Serian 23
DJ Tammy Squels 22
OnMyComp.com 22
Heathen Homeschoolers 22

Saturday, March 28, 2009

Gaining Edge as IT Graduates

It is unquestionable that IT opportunities are everywhere. But it is with this idea too that the number of IT graduates are proliferating like mushrooms in any open area.



Thus the challenge among fresh graduates is to find the right job for their profession. However, this can be a very source of frustration if you don't possess the right skills, trainings and knowledge on any job the students are applying for.


It is then wise that students while at school must gain that add-on advantage by equipping themselves with valuable skills of communication, character-building, and leadership and organization.




[+/-] show/hide




Further, since IT graduates don't go through board or bar or licensure exams, it is is very wise then that they take certification exams. For one, all IT professionals particularly, in the Philippines are encouraged to take PHILNITS (Jitse), a Japan-sponsored examination that evaluates fundamental skills in IT and software engineering.

Other valuable examinations are the ones given by CISCO to test hardware orientation and software-vendor dependent exams like Microsoft, Linux, Novell or programming - language proficiency exams of the likes of JAVA.

Also, it will add to the students employment-worth if they volunteer or join IT Project Development or Implementation. Not only that their skills are applied and enhanced but this can be an avenue for employment opportunities in the future.

Getting the right job for fresh graduates is difficult and stiff but equipping them with the right tools and skills, they can indeed land on a very rewarding and fulfilling jobs after graduation.

Monday, March 23, 2009

Java's Data Type Cast

When we read from the keyboard, it is by default that we enter the inputs as a string. Thus, it makes a problem if we need to perform computations or calculations on this input.

This can be however remedied using type cast. Type cast function allows us to convert a given value to another data type.

We can convert an input or constants from int to char, float, byte, long and vice versa.

For instance:

[+/-] show/hide


char x='3',y='4';
int total;
String xtotal;
xtotal=x+y;
System.out.print("The sum of x and y"+xtotal); //this gives us a result of xy
total=int(x)+int(y);
Systm.out.print("the total is "+total); // this however results to 7
//where char is converted to int

In an IDE mode, if a text fields which are strings in values, are used for x and y and we perform the operation above and assign it to another text field defined as Result, it will appear as:

int total;
total=Integer.parseInt(x.getText())+Integer.parseInt(y.getText()); //converts the string to integer type
Result.setText(total+""); //displays the result of total


Saturday, March 21, 2009

New Blog Layout

With the old free template that this blog originally had, my sister, Tammy was kind enough to ask her good friend, Rose, who is a blog designer. I originally planned to do the blog design myself this summer, but I could not free my hands from school works.

Rose was just generous enough to offer this blog layout for free! Now, who says angels are only in heaven?

I did not know her at all since I was quite busy with projects lately, but she willingly gave her time on this blog. I just couldn't thank her enough!

To Rose, may all your wishes and heart's desires be heard always. Kind-hearted people are rare and hard to find. You are a blessing even to strangers like me! Muchisimas Gracias!

Thursday, March 19, 2009

Powerful Programming in NetBeans

With the emerging number of programming languages, programmers are normally lost in selecting a language that meets his unique needs at lower or no cost at all and is flexible in any platform.

Computer applications typically demand databases and user interactivity. Thus, to program in Java, one can find NetBeans IDE to be more agreeable, practical and easier to use. You can download this faster and for free.

NetBeans IDE provide an easier medium to write applications in the Java language, C/C++, and even dynamic languages such as PHP, JavaScript, Groovy, and Ruby.

With newer NetBeans 6.5, one finds more features and enhancements with other languages and their integration with MySQL and other free or open-source applications.

For Netbeans IDE Downloads, click here.

Sunday, March 15, 2009

Brain Twister in C and Java's Methods and Structures

With the previous knowledge on functions of C and methods in Java with advance data structures of C.

Create a C or a Java program that creates this sample input and output:

Click the link to view/hide more.

[+/-] show/hide



Input:
Item Code: 001
Item Description: ABC Pants
Unit Price: 400.00
Quantity: 2
Output:
Total Charges: 800.00
Cash:1000.00 /*must be encoded*/
Change: 200.00

Integrate a loop, so the user may input another item.

C's Interface with Assembly Language

Writing assembly codes is tedious and difficult. You have to be closely oriented with the language before you can actually write a running code.

We can use interrupt commands to request our processor to halt its current operation and work on the requested action we made.

We have two types of interrupts: hardware and software interrupts. Hardware interrupts are made by our peripheral devices like printer and mouse and keyboard while software interrupts are codes that we write.

We can write interrupts with assemblers or DEBUG command for simpler codes. We can however, embed assembly codes in our C program. Do check the sample code of interrupts written by Niloy Mondal.

Check the sample program.

Click the link to view/hide more.

[+/-] show/hide

#include dos.h /*Enclose this in <> . The dos.h allows us to generate interrupts*/
void main()
{
char *message = "Interrupt Programming$";
_AH=9;
_DX=(int) message;
geninterrupt(0x21);
}


Now compile and run this program the usual way you do it with other C programs. Take note that _AH=9 line assigns 9 to register AH and _DX line is to store the address of our message to register DX. The geninterrupt line is to create interrupt 21 where 0x denotes hexadecimal value.

C's File and Input Stream: Keyboard Reading

We have to be however flexible in writing our source codes. Thus, to improve the codes on writing to a file, we can use the fscanf() to read keyboard inputs and write them into our file.

Check the sample program.

Click the link to view/hide more.

[+/-] show/hide

#include stdio.h /*enclose this in <> */
main()
{
FILE *MYFILE;
char name[30];
if ((MYFILE=fopen("mysample.txt","w"))!=NULL) /*creating a file named mysample.txt*/
{
printf("Enter your fullname: ");
fscanf(stdin,"%s",&name);
fprintf(MYFILE,"%s",name);
fclose(MYFILE); /*closing the file*/
}
else

{printf("There is an error writing mysample.txt!\n");
getche();clrscr();

if((MYFILE=fopen("mysample.txt","r"))!=NULL)
{
if ((fgets(name,sizeof(name),MYFILE))!=NULL)
{
printf("Your name is %s",name);
fclose(MYFILE);
}
else
printf("Error reading mysample.txt!\n");
}

else
printf("Error opening mysample.txt!\n");
getche();
}

C's File and Input Stream: Reading

In the previous lecture on files and streams, we had written a sample program to write. But we have to open this file created in any text editor to view the file contents. But, reading from a file is also possible. We simply provide the file option "r" to indicate file reading.

Check the sample program in C.

Click the link to view/hide more.

[+/-] show/hide

#include stdio.h /*enclose this in <> */
main()
{
FILE *MYFILE;
char text[80]; /*holds the content of the file*/
if ((MYFILE=fopen("mysample.txt","w"))!=NULL) /*creating a file named mysample.txt*/
{ if (fgets(text,sizeof(text),MYFILE)!=NULL)
{
printf("Your file contains %s",text);
fclose(MYFILE); /*closing the file*/
}
else printf("There is an error reading mysample.txt!\n");
}
else
printf("Error opening mysample.txt!\n");
getche();
}

C's File and Input Stream: Writing

We can use the streams or a sequence of data and types of C to allow us to read and/or write records to a an external file. This allows us to write a more database-oriented applications.

We can use C's basic commands with files. Only affix f to these commands. For instance, to print to a file is to use fprintf(), to read is to use fscanf().Further, we instruct our C on the actions we shall perform with the file. We indicate "w" to write, "r" to read and "a" to append to a file.

Check the sample program.

Click the link to view/hide more.

[+/-] show/hide



#include stdio.h /*enclose this in <> */
main()
{
FILE *MYFILE;
if ((MYFILE=fopen("mysample.txt","w"))!=NULL) /*creating a file named mysample.txt*/
{ fprintf(MYFILE,"Welcome to file handling in C!\n"); /*writing to the file*/
fclose(MYFILE); /*closing the file*/
}
else
printf("Error writing mysample.txt!");
return 0;
}

Tuesday, March 10, 2009

Keyboard Input with Java

Sometimes, we need to write programs that would apply to real life scenarios. I have modified the JAVA program to accept more type of inputs.

Click the link to view the source code.

[+/-] show/hide




/* Keyboard input *using BUfferedREader/InputStreamReader*/

import java.io.*;
public class KeyboardInput{
publi static void main(string args[])
throws Exception{
double rate=120;
double hours;
String name;
InputStreamReader i = new InputStreamReader(System.in);
BufferedREader bufread=new BufferedReader( i );
System.out.print("\nInput your name: ");
String name=bufread.readLine();
System.out.print("\nInput your hours worked: ");
String shours=bufread.readLine();
hours=Double.parseDouble(shours); /*to convert a string to double data type*/
System.out.print("\nEmployee : "+name);
System.out.println("\nSalary: "+compute(rate,hours)); /*invoking method compute*/
}

public static double compute(double r,double h)
{return r* h;}

}

Sunday, March 8, 2009

Writing an Impressive Resume

Soon, the graduates will have to leave school and find a job. With the very stiff competition for employment and increasing unemployment rates, the battle for job placement is bloody (figuratively) and rigorous.

I had my fair share of job hunting. But take note that when you are a fresh graduate, you will have bigger pressure and stress when you apply since you are normally not confident with your skills. But having prepared your resume and equipped yourself with skills from school, you have every right to apply, to be interviewed and eventually to get that job.
But, what do we write on our resume? I have cited below few tips that can help you get that employer's positive impression and a chance for an interview.

1. Write your resume in a way that will contribute to the job you are applying for.
Focus on your strengths, your skills and capabilities. Should you have relevant related projects or working experiences, then write them.

2. State only factual information.
In as much as we want to have an impressive resume, we don't want to lie about them. Character is as important as skills. You don't want to cheat your way to employment right?Your facts can always be confirmed through other means. So, don't risk it.

3. Get Some Impressive Working Background.
With the stiffer job placements, your biggest challenge is experience. But if you are a fresh graduate and lack in this area, volunteer in related projects. You character is also evidenced if you do this.

4. Limit your resume to relevant information only.
Do not include all your working experiences or school functions or activities. Highlight only the ones that relate to the job you are applying for.

5. Include your job objective.
When you apply for a job, the vacant position you are applying for is quite specific. Connect your job objective to this. This shows that you have a clear direction and vision of the the job and its required tasks and your supporting skills.

6. Cite authorities who can strongly vouch for your competence.
Normally, companies seek recommendations from valuable persons whom you cited on your resume. Take note that you have to ask their permissions first. We don't want them to be surprised if a stranger calls about you and your performance. These third-party individuals can give you strong points. Thus, while you are in college, make wider connections, be socially active. Be known for your skills and character. You wont have hard times in getting or looking for a job.

7. Update your resume regularly.
If you have recently acquired summer jobs, trainings or certificates, update then your resume. Keep all supporting certificates.

8. Take note of the resume prints, format, grammar, and paper.
A resume is a formal document. Thus, it has to be in a formal and easy-to-read format and free from any smudge or grammar or typing mistake. We want to leave a positive impression. So, take extra careful on these.

9. Remember the content of your resume well.
Your resume is your ticket to the next step, the interview. Your interviewers normally base their questions on your resume. So, this leads us back to tip #2. Your main goal in writing resume is how you can convince your employer that you can be the right person for the job. So, make your resume as your marketing ticket. Make your resume as interesting as possible.

There are other resume-writing tips. I hope the tips above can further help you! Good luck!
For more articles on this post, read here.


Friday, March 6, 2009

College Schooling Practical Tips

I was asked to be the resource speaker to a Guidance Career Counseling week and the theme was, "Guide Me. . . " I was only glad to share these tips I had adopted when I was a younger student.

If you like to be an honor student or at least survive college with not-so bad grades, you may want to employ these:



1. Attend classes regularly.
A subject grade is based on exams and other requirements. If you always miss classes, you miss the chance too to earn that good or passing grade. Teachers are never merciful on chronic or regular absenteeism.

2. Manage your time well.
Schooling is never easy. Having graduated with honors from grade school to masters degree is all hard work and social networking. Start and finish your requirements ahead of time. Through that, you will have the chance join social events.

3. Make friends with the right people.
Having a wider network of contacts including smart and influential people (friends, administrators or teachers) may come handy at any time. They can also guide you through college schooling. Further, they can help you in looking for a job. Reference from other people gives you an extra edge over those who have no connections at all.

4. Improve your reading habits and skills.
Nothing beats acquiring information. Equipping yourself with valuable information can help you comprehend your lessons well. This is also proven by study to increase your IQ and to prevent mental diseases when you age.

5. Look for smarter partner.
We don't want our girlfriend or boyfriend to be dull because in the process, our mental facility becomes dull too. You may also seek the help of your smart partner on any class requirement.

6. Learn to take and keep notes.
You cannot recall everything with all the number of subjects. Having notes to review on may increase the likelihood to answer the questions for exams or requirements. You may photocopy your friends' notes and remember to read all the resources of your teachers. Having done this before guaranteed that I did not miss anything valuable.

7. Study for your exams at least days ahead.
For long and scheduled exams, I study one week ahead, at least to familiarize myself with the concepts. Throughout the week, I get to master them, and stay relax a day before the test. We don't want you to cram your learning all at one review-seating.

8. Find your learning style.
Some may study while music/tv is on or in a silent area. Whichever is the case, you should not at be distracted to study and concentrate.

9. Study privately or/and with groups.
I adopt these two ways. However, I have to study privately on new ideas then work with the groups for brainstorming. You must not however, study while lying down comfortably, since you will be tempted to sleep instead.

10. Prepare exam outlines.
In the course of your exam review, you may want to note only essential concepts like definitions, persons or formulas. Should you need to refresh your memory, you can use these outlines instead of rereading everything. Others suggest mnemonics, or shortcuts to remember.

11. Don't be too overconfident during exams.
By experience, being too confident made me careless and hasty that I ignored instructions and hints. When you have finished the exam ahead of time, review your answers. Don't mind those who finish earlier than you. You are graded not by the time you finish the test but by the quality of your answers.

12. Answer easy questions first.
When taking the test, answer the easy questions first. That way, you can budget your time on difficult ones. If you don't know the answers, just make a wild guess. Somehow, teachers still give extra score for tried questions.

13. Don't miss meetings for reviews.
Teachers are normally generous enough to give you tips and pointers and examples during reviews. Take note of them as they have the higher chance of being included in the test. Review your old test papers and quizzes too. Test questions somehow are reinstated or modified for long tests.

14. Hate the teachers but not the subjects.
There are terrible students like there are terrible teachers. And since, you cannot choose or avoid your teachers, just motivate yourself that the subject is temporary and you need it for graduation.

15. Do multitasking.
Whenever we had exams before, long ones or not, I reviewed my notes mentally while washing the dishes or riding on a bus. That way, I did not waste my time at all.

16. Have fun during breaks.
We don't want you to miss the fun in college. So, enjoy all that whenever you can. Having worked harder on your course deserves a break too. Treat yourself with your friends or loved ones. That way, you will remember your college days as entertaining and colorful.

I still have a number of improving study skills, perhaps, until the next post.

Sunday, March 1, 2009

More Pointer Sample

You can access the elements of array through pointers. Accessing element through pointers can give you a more flexible and powerful control on your program. However, improper use of pointers may bring unwanted results and may be difficult to trace.

Somehow, your use of pointers can make your program less in codes but more in application.



[+/-] show/hide




#include stdio.h /*enclose this in <> */
main
{
int num[]={2,3,4,5,6,7,8};
int *xnum,x;
xnum=num;
for (x=0;x<6;x++)
printf(" % d",num[x]); /* this displays 2 3 4 5 6 7 8 */

for (x=0;x<6;x++)
printf(" % d",*xnum++); /* this displays 2 3 4 5 6 7 8 */

for (x=5;x>0;x--)
printf(" % d",*(xnum+x)); /* this displays 8 7 6 5 4 3 2 */

for (x=5;x>0;x-=2)
printf(" % d",*(xnum+x)); /* this displays 8 5 3 */

getch();}

More Pointer Lectures

Reasons why pointers must be well understood:

1. Pointers provide the means by which functions can modify their calling arguments.
2. Pointers are used to support TC's dynamic allocation system.
3. The use of pointers can improve the efficiency of certain routines.
4. Pointers are commonly used to support certain data structures such as linked lists and binary trees.

Dangers of Pointer, however should not be ignored:

1. Uninitialized or wild pointers can cause the system to crash
2. Too many pointers may be difficult to trace or debug.

Check these sample programs that show wrong use of pointers.



[+/-] show/hide





#include stdio.h /*enclose this in <> */
main()
{
float x,y;
int *p;
x=123.45;
p=&x;
y=*p;
printf("%f",y); /* this is wrong since pointers only work on integers */
getch();
}

/*Another sample program*/
#include stdio.h /*enclose this in <> */
main()
{
int x,*p;
x=10;
*p=x; /* x is assigned to unknown memory address */
printf("%d",p);
getch();
}

/*Another sample program*/
#include stdio.h /*enclose this in <> */
main()
{
int x,*p;
x=10;
p=x;
printf("%d",*p); /* p does not hold 10, to correct this, add & to x*/
getch();
}

Output of all these codes: Runtime Error

Pointers of C

Pointers are more flexible and fast to manipulate than arrays although they are also dangerous if not properly
handled.

Compare the array and pointer definitions below:
char str[80],*p1;
p1=str; /* in this line, the value of the first element is passed to the pointer p1*/

to access the element,example, element 5, write your array and pointers statements like these:
array: str[4]; /*since the first element is indexed at 0*/
pointer: *(p1+4)

The operators used in pointers are * and & where
* is used to access the value while & on the memory address. Check the program below:



[+/-] show/hide



#include stdio.h /*enclose this in <>*/
main()
{
int x=10,y;
int *p1;
p1=&x; /*the memory address of 10 is assigned to pointer p1*/
y=*p1; /*the value of p1 is assigned to y*/
printf("The element %d is at location %p",y,p1);
getche();
}

The output of this is:
The element 10 is at location (not specific).

More Method Example in Java

We can call a method in one class from another class. Check the sample program below and see the result. Remember that if the class is defined as public, then the class name must be similar to the file name.



[+/-] show/hide



/*Calling a method in another class. This file is saved as SetupSite.java*/

public class SetUpSite{
public static void main(String [] args)
{ StatementofPhilosophy();}

public static void StatementofPhilosophy()
{ System.out.println(" This is an example of invoking a method in another class");}
}

/*THis is the invoking class. This file is saved as TestStatement.java*/

public class TestStatement{
public static void main(String [] args)
{ System.out.println("This is the calling class!");
SetUpSite.StatementofPhilosophy();}}

Stream Inputs in Java

The Java program below can be modified to accept numbers of float or characters. Simply modify the code to produce the required output.



[+/-] show/hide



/* Keyboard input *using BUfferedREader/InputStreamReader*/

import java.io.*;
public class KeyboardInput{
publi static void main(string args[])
throws Exception{

InputStreamReader i = new InputStreamReader(System.in);
BufferedREader bufread=new BufferedReader( i );
System.out.print("Input a digit: ");
String digit=bufread.readLine();
int x = Integer.parseInt(digit) + 3;
System.out.println("Your input is "+digit);
System.out.println("Result is "+x);
}}