TECH GUIDE BLOG

Tech Guide Programming Tutorial Tips Tricks

Archive for August, 2009

Why PCs get More Viruses than Macs

Posted by Admin On August - 27 - 2009

mac-vs-pc

The simplest answer is the most obvious one- there are just more viruses out there for PCs. The question then becomes why are more viruses written for PCs than Macs? Do virus writers prefer to attack PCs? Is it easier to attack the windows operating system? Yes and yes. There are many perspectives from which you could analyze the question but the bottom line says it all. PCs occupy a significantly larger portion of the computer market and therefore provide more opportunity for an attacker to make money.

When deciding on a web hosting service a big consideration is whether they will handle all your security issues. Security leaks in Internet Explorer are a common way for malware (software designed to do bad things) to infect a computer and advertise on it. Ever see one of those ads that says, “Your computer might not be secure! Click here to test your protection?” I’d be loathing to try it, if I were you. With the rise of these types of security flaws, called social engineering exploits, there will always be a chance that any format, pc or Mac has a chance of exposure.

Virus protection software has included some new features over the years inspired by free anti-virus innovations. All lot of web hosting includes these software solutions to protect your valuable information. Some of the new anti-virus protection programs have a star graphic or check mark next to web search links to indicate the site you visit won’t be “phishing” for your information. This will also protect against the scariest threat of all on the internet- Identity theft.

There are so many different types of threats it can be really difficult to keep up. Rest assured if your web hosting keeps your operating system up to date, regularly update their anti-virus software, has a firewall ready, and uses some sort of ad-ware protection you can be confident that your service- pc or Mac is safe enough to do all of your daily business.

In the end, PCs are less expensive than Macs. They do basically the same things and work equally well in most respects. To prefer one over the other based on the fact one is less secure is more a reflection of your web hosting’s inability to protect you than on the inherent architecture differences. It makes more sense to say I like Macs because they look so much cooler than it does to say it’s because they are more secure.

Popularity: 25% [?]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • MySpace
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter

Validate XHTML YouTube Embed Video

Posted by Admin On August - 20 - 2009

What can I get by validating XHTML in my blog? Well, some people say it can help Uncle Google to read and crawl your site, because Uncle is older and older and more hard to do reading. Before I use this code, my blog home page is always not valid due to a reason, after I insert a video from YouTube, some warnings and errors always occur. I search and find some tips to make YouTube Embed Video that you’ve insert is valid. Let’s take a look first with YouTube default Embed Code.

<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/sJi6amKnNNE&hl=en&fs=1&"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/sJi6amKnNNE&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>
</object>

That code above is not valid by W3C XHTML validator. So you have to change that code into something different than above.

<object type="application/x-shockwave-flash" style="width:310px; height:260px;"
data="http://www.youtube.com/v/XFcLU7hOeQI&hl=en&fs=1">
<param name="movie" value="http://www.youtube.com/v/XFcLU7hOeQI&hl=en&fs=1" />
</object>

This format above now is valid by XHTML Validator, but as you can see now, every YouTube Embed Code are always have ‘&’ ampersand. This is another problem that make your Embed Video is still not valid by XHTML Validator. For this problem, you have to change every ‘&’ to ‘&amp;’

<object type="application/x-shockwave-flash" style="width:310px; height:260px;"
data="http://www.youtube.com/v/XFcLU7hOeQI&amp;hl=en&amp;fs=1">
<param name="movie" value="http://www.youtube.com/v/XFcLU7hOeQI&amp;hl=en&amp;fs=1" />
</object>

That’s it. It’s working on my blog, may this tips can help you to validate your site when you insert an Embed Video from YouTube. You can comment if you want to ask or share about this article.

Popularity: 12% [?]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • MySpace
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter

Recursion in Programming

Posted by Admin On August - 9 - 2009

What exactly recursion is in programming? Recursion is a function that calls the function itself. Thus, in the body of function there is a command that called the function itself. If you use it well, it can solve a problem much more simple and easy. Recursion itself uses a large amount of memory, so be aware not to use it if not necessary. To make a good recursion, of course the functions must have a condition that makes it stop, so the function will not do an infinite looping. I’ve tried it without a stop condition, I compiled it and wow, NOD32 detected my .exe as a virus, I don’t know if the NOD32 made a false detection or not, but if it’s true, then it’s not too difficult to make a virus, eh? Just a little mistake in a program that you’ve made for good reasons and you’ve made a virus.

This code below is an example of how recursion function is working.

#include <stdio.h>
#include <conio.h>

void letter(char alp)
{
	if (alp <= 'e')
	{
		printf("%c ", alp);
		letter(alp + 1);
	}
}

void main()
{
	char temp = 'a';
	letter(temp);
	getch();
}

We call the function and it will print letters from ‘a’ to ‘e’. From the start of the program at void main, we fill a variable with char type called temp with ‘a’. We then call the letter function with temp as parameter, into the letter function, the variable named alp will be filled with ‘a’. Here’s the stop condition, if alp is lower or equal than ‘e’, the function will continue its routine, the function will print what is in the alp variable. After the function printed what is in the alp variable, it call itself with alp + 1 as the parameter, thus this looks like the function is going down 1 level. This routine ended when alp variable is filled with ‘f’, it will go up to the upper level and so on until back to the top level.

It’s a little confusing for me, so I made a ‘level’ for this explanation. Every time a function (you can say function1) called another function (function2), I decided to make a function2 as level 2 function, below the level 1 function (function1). So when letter function with temp as parameter called a letter function with alp + 1 parameter, I set in my mind the letter function with temp parameter as level 1 function and letter function with alp + 1 parameter as level 2, letter function with (alp + 1) + 1 parameter as level 3 function respectively. I hope this tutorial can help.

Popularity: 7% [?]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • MySpace
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter