Wednesday, March 16, 2011
Monday, March 14, 2011
SELECTION
OUTPUT
SOURCE CODE
This program in Visual Basic 6.0 uses a selection structure because the results yield a true or false value.
Tuesday, March 1, 2011
Programming Practices
1. PROGRAMMING READABILITY
"In computer programming, readability refers to the ease with which a human reader can comprehend the purpose, control flow, and operation of source code."
Readability is an important phase in computer programming. It determines what language the machine can read and execute.
LOGIC STRUCTURE
"Logic is used in most intellectual activities, but is studied primarily in the disciplines of philosophy, mathematics, semantics, and computer science. Logic examines general forms which arguments may take, which forms are valid, and which are fallacies. It is one kind of critical thinking. In philosophy, the study of logic figures in most major areas: epistemology, ethics, metaphysics. In mathematics, it is the study of valid inferences within some formal language".
In computer Science, logic is somehow the basis for a program to execute properly.
In computer Science, logic is somehow the basis for a program to execute properly.
CODING PRACTICE
"Best coding practices for software development can be broken into many levels based on the coding language, the platform, the target environment and so forth. Using best practices for a given situation greatly reduces the probability of introducing errors into your applications, regardless of which software development model is being used to create that application."
source: http://en.wikipedia.org/wiki/Best_Coding_Practices
2. Program Documentation
"Program documentation includes hard-copy or electronic manuals that enable users, program developers and operators to interact successful with a program. User documentation normally consists of a user's manual. This manual may provide instructions for running the program."
2. Program Documentation
"Program documentation includes hard-copy or electronic manuals that enable users, program developers and operators to interact successful with a program. User documentation normally consists of a user's manual. This manual may provide instructions for running the program."
Like it said, a hard copy or a manual that contains set of instructions to interact successful with a program.
Program Listing
"A
Program Listing
is a verbatim environment for program source or source fragment listings. Program Listing
s are often placed in Example
s or Figure
s so that they can be cross-referenced from the text."Program Specification
"A statement of the precise functions which are to be carried out by a computer program, including descriptions of the input to be processed by the program, the processing needed, and the output from the program. "
MICROSOFT VISUAL BASIC 6.0
I chose this language for it is easy to use and it provides a GUI.
Friday, February 18, 2011
WEB BOWSERS AND WEB PLs SECURITY
So here's a review of the Top 5 Web Browsers
A.) INTERNET EXPLORER
FORMAT PROTOCOL
IE is created by Microsoft, therefore owned by Windows. Personally, I won't recommend this browser for it is quite slow and it's somehow non-responsive. Unlike any other browsers, IE includes lots of add-ons which I guess made it slower.
PERFORMANCE
I'm not satisfied with IE's speed. Like I said, it is slow and non-responsive because of its add-ons.
PLATFORM INDEPENDENCE
Basically owned by Windows, but it is available on most common operating systems including Mac OS.
POWER
IE's not that powerful, too. Because of its speed, power got compromised also.
B.MOZILLA FIREFOX
FORMAT PROTOCOL
An open source web browser, which means it's free for downloading (at least, it's free).
PERFORMANCE
Before, this was my choice. But as it upgraded, it did not improved its performance. It became slower and much like IE, it now requires some add-ons.
PLATFORM INDEPENDENCE
It is an open source browser, so I think it is available on most operating systems.
POWER
Like I said, before, Firefox is powerful because of its speed, but later on, it became more like of IE/
C.OPERA
FORMAT PROTOCOL
Another open source browser, and it includes a mobile phone version.
PERFORMANCE
Opera's speed is quite impressive considering it is usually used on mobile phones.
PLATFORM INDEPENDENCE
Its mini version is available on most newly released mobile phones today.
POWER
It is quite powerful(mini version) and capable of loading applications but not as fast as the PC version.
D.SAFARI
FORMAT PROTOCOL
Owned by Apple, but also available on most operating systems. It's quite fast, too.
PERFORMANCE
Impressive in terms of speed, but not as fast as Google Chrome.
PLATFORM INDEPENDENCE
Again, owned by Apple but it is also an open source browser and available on most operating systems.
POWER
Its capability of loading is good and pretty fast.
E.GOOGLE CHROME
FORMAT PROTOCOL
Owned by Google, its simplicity defines its speed. For me, it is the fastest browser so far.
PERFORMANCE
Superb speed and user-friendly because of its simplicity and easiness.
PLATFORM INDEPENDENCE
Owned by Google, but it is an open source browser which means everyone can enjoy its speed.
POWER.
Capability of loading is good. Also operates on tab mode, and even though a lot of tabs are opened, its speed is not compromised.
WEB PROGRAMMING LANGUAGES SECURITY
CGI
Or Common Gateway Interface, a web daemon which executes a program on the server and returns the results on the client. It is widely-used so I guess it is safe.
HTML
Even though it is widely used, it is still not safe because the binary codes are executed from an untrusted source.
CONCLUSION
A.) For me, the best Web Browser so far is Google Chrome because it is user-friendly and it is very simple to use, and of course, it is FAST. In terms of web PLs, HTML is quite dangerous to the security of the web. I think because it is simple to use and the code syntaxes are not that hard to remember.
A.) INTERNET EXPLORER
FORMAT PROTOCOL
IE is created by Microsoft, therefore owned by Windows. Personally, I won't recommend this browser for it is quite slow and it's somehow non-responsive. Unlike any other browsers, IE includes lots of add-ons which I guess made it slower.
PERFORMANCE
I'm not satisfied with IE's speed. Like I said, it is slow and non-responsive because of its add-ons.
PLATFORM INDEPENDENCE
Basically owned by Windows, but it is available on most common operating systems including Mac OS.
POWER
IE's not that powerful, too. Because of its speed, power got compromised also.
B.MOZILLA FIREFOX
FORMAT PROTOCOL
An open source web browser, which means it's free for downloading (at least, it's free).
PERFORMANCE
Before, this was my choice. But as it upgraded, it did not improved its performance. It became slower and much like IE, it now requires some add-ons.
PLATFORM INDEPENDENCE
It is an open source browser, so I think it is available on most operating systems.
POWER
Like I said, before, Firefox is powerful because of its speed, but later on, it became more like of IE/
C.OPERA
FORMAT PROTOCOL
Another open source browser, and it includes a mobile phone version.
PERFORMANCE
Opera's speed is quite impressive considering it is usually used on mobile phones.
PLATFORM INDEPENDENCE
Its mini version is available on most newly released mobile phones today.
POWER
It is quite powerful(mini version) and capable of loading applications but not as fast as the PC version.
D.SAFARI
FORMAT PROTOCOL
Owned by Apple, but also available on most operating systems. It's quite fast, too.
PERFORMANCE
Impressive in terms of speed, but not as fast as Google Chrome.
PLATFORM INDEPENDENCE
Again, owned by Apple but it is also an open source browser and available on most operating systems.
POWER
Its capability of loading is good and pretty fast.
E.GOOGLE CHROME
FORMAT PROTOCOL
Owned by Google, its simplicity defines its speed. For me, it is the fastest browser so far.
PERFORMANCE
Superb speed and user-friendly because of its simplicity and easiness.
PLATFORM INDEPENDENCE
Owned by Google, but it is an open source browser which means everyone can enjoy its speed.
POWER.
Capability of loading is good. Also operates on tab mode, and even though a lot of tabs are opened, its speed is not compromised.
WEB PROGRAMMING LANGUAGES SECURITY
CGI
Or Common Gateway Interface, a web daemon which executes a program on the server and returns the results on the client. It is widely-used so I guess it is safe.
HTML
Even though it is widely used, it is still not safe because the binary codes are executed from an untrusted source.
CONCLUSION
A.) For me, the best Web Browser so far is Google Chrome because it is user-friendly and it is very simple to use, and of course, it is FAST. In terms of web PLs, HTML is quite dangerous to the security of the web. I think because it is simple to use and the code syntaxes are not that hard to remember.
Tuesday, February 8, 2011
Sample Code (PERL)
use Win32::AdminMisc; use Mail::Sendmail; use strict; my ($total, $free, %mail, $machine, $drive, $low, $to, $from, # Email addresses ); $machine = 'DBSQL01'; $drive = "c:/"; $low = 50000000; # 50MB $to = 'notify@address.com'; $from = "$machine\@address.com"; my $VERSION = 0.1; while (sleep 43200) { # Check every 12 hours ($total, $free) = Win32::AdminMisc::GetDriveSpace($drive); print "$free bytes remaining\n"; if ($free < $low) { %mail = (To => $to, From => $from, Subject => "$machine low on disk space", Message => "$machine is low on disk space again. ($free bytes remaining.)" ); sendmail(%mail) or die $Mail::Sendmail::error; } # End if; } # Wend
source: http://www.rcbowen.com/imho/perl/disklow
Java Vs. Perl
On equal footing JavaScript will almost always be slower than PERL -
JavaScript carries a lot of baggage and is not as optimized for RegEx's as
Perl is. However in practice Perl runs on the server and is doing many more
tasks while the client is sitting spinning it's wheels - so JavaScript seems
much faster (it has a whole machine sitting there to do this little script
while the server might be doing dozens, or hundreds of requests at the same
time).
So - purely from a performance standpoint - JavaScript may be "faster". You
may eliminate a server request and provide the interface "instant feedback"
(although remember that you'll be delivering more script to the client which
slows things down some).
However it's not safer. Script can be disabled - which would eliminate your
checking completely. Since it runs on the client-side it can also be
modified to return incorrect results. In general you should consider
validations at every level of your application.
source: http://bytes.com/topic/javascript/answers/164154-javascript-vs-perl-regexp
JavaScript carries a lot of baggage and is not as optimized for RegEx's as
Perl is. However in practice Perl runs on the server and is doing many more
tasks while the client is sitting spinning it's wheels - so JavaScript seems
much faster (it has a whole machine sitting there to do this little script
while the server might be doing dozens, or hundreds of requests at the same
time).
So - purely from a performance standpoint - JavaScript may be "faster". You
may eliminate a server request and provide the interface "instant feedback"
(although remember that you'll be delivering more script to the client which
slows things down some).
However it's not safer. Script can be disabled - which would eliminate your
checking completely. Since it runs on the client-side it can also be
modified to return incorrect results. In general you should consider
validations at every level of your application.
source: http://bytes.com/topic/javascript/answers/164154-javascript-vs-perl-regexp
5 non common web based programming languages
TRAC
"Pasternacki, Maciej Paweł(21,22), is Polish CS student, on fourth year of five-year Masters program at University of Gdansk(23). For last four years works half-time as a programmer and technical writer. Earlier he was administrating Linux systems for about a year. Since 2005 works for Polish-Japanese company Sentivision(24). Up to mid-2007 his job was developing Common Lisp programs. These were closed, proprietary programs, details of which cannot be shared, but he was cooperating with authors of Open Source implementations and libraries his company was using."
source: http://trac.common-lisp.net/cl-openid/wiki/OriginalProposal
AJAX
(Asynchronous JavaScript and XML) "Though technically not a programming language, AJAX uses XHTML or HTML, JavaScript and XML to create interactive Web applications."
source: http://www.eweek.com/c/a/IT-Management/10-Programming-Languages-You-Should-Learn-Right-Now/
PERL
"Perl is an open-source, cross-platform, server-side interpretive programming language used extensively to process text through CGI programs.Perls power in processing of piles of text has made it very popular and widely used to write Web server programs for a range of tasks. "Learning some form of scripting language, such as Perl or PHP is critical if you are doing Web apps," said Duquaine."
source: http://www.eweek.com/c/a/IT-Management/10-Programming-Languages-You-Should-Learn-Right-Now/
RUBY and RUBY ON RAILS
" Ruby is a dynamic, object-oriented, open-source programming language; Ruby on Rails is an open-source Web application framework written in Ruby that closely follows the MVC (Model-View-Controller) architecture.With a focus on simplicity, productivity and letting the computers do the work, in a few years, its usage has spread quickly. As a bonus, many find it easy to learn."
source: http://www.eweek.com/c/a/IT-Management/10-Programming-Languages-You-Should-Learn-Right-Now/
PYTHON
"An interpreted, dynamically object-oriented, open-source programming language that utilizes automatic memory management. Designed to be a highly readable, minimalist language, many say it has a sense of humor (spam and eggs, rather than foo and bar), Python is used extensively by Google as well as in academia because of its syntactic simplicity."
source: http://www.eweek.com/c/a/IT-Management/10-Programming-Languages-You-Should-Learn-Right-Now/
"Pasternacki, Maciej Paweł(21,22), is Polish CS student, on fourth year of five-year Masters program at University of Gdansk(23). For last four years works half-time as a programmer and technical writer. Earlier he was administrating Linux systems for about a year. Since 2005 works for Polish-Japanese company Sentivision(24). Up to mid-2007 his job was developing Common Lisp programs. These were closed, proprietary programs, details of which cannot be shared, but he was cooperating with authors of Open Source implementations and libraries his company was using."
source: http://trac.common-lisp.net/cl-openid/wiki/OriginalProposal
AJAX
(Asynchronous JavaScript and XML) "Though technically not a programming language, AJAX uses XHTML or HTML, JavaScript and XML to create interactive Web applications."
source: http://www.eweek.com/c/a/IT-Management/10-Programming-Languages-You-Should-Learn-Right-Now/
PERL
"Perl is an open-source, cross-platform, server-side interpretive programming language used extensively to process text through CGI programs.Perls power in processing of piles of text has made it very popular and widely used to write Web server programs for a range of tasks. "Learning some form of scripting language, such as Perl or PHP is critical if you are doing Web apps," said Duquaine."
source: http://www.eweek.com/c/a/IT-Management/10-Programming-Languages-You-Should-Learn-Right-Now/
RUBY and RUBY ON RAILS
" Ruby is a dynamic, object-oriented, open-source programming language; Ruby on Rails is an open-source Web application framework written in Ruby that closely follows the MVC (Model-View-Controller) architecture.With a focus on simplicity, productivity and letting the computers do the work, in a few years, its usage has spread quickly. As a bonus, many find it easy to learn."
source: http://www.eweek.com/c/a/IT-Management/10-Programming-Languages-You-Should-Learn-Right-Now/
PYTHON
"An interpreted, dynamically object-oriented, open-source programming language that utilizes automatic memory management. Designed to be a highly readable, minimalist language, many say it has a sense of humor (spam and eggs, rather than foo and bar), Python is used extensively by Google as well as in academia because of its syntactic simplicity."
source: http://www.eweek.com/c/a/IT-Management/10-Programming-Languages-You-Should-Learn-Right-Now/
Monday, February 7, 2011
Subscribe to:
Posts (Atom)