Thursday, September 30, 2010

PHP ' become '

in PHP What happen when I output the string into text file is
The character ' become '

Copy this ' to create this '

' is a html character special code that represent ' symbol
Means it will display correctly as ' if you see it in web browser

Simply solving the problem by html_entity_decode( "'", ENT_QUOTES)

Note that html_entity_decode( "'") will not work
I found this solution in some page (didnt remember the site URL, sorry >.<)

So what is this html_entity_decode(...) function?
It is use to convert special html character into the normal character
Detail was in http://php.net/manual/en/function.html-entity-decode.php

The inverse of it was htmlentities(...)
Detail was in http://www.php.net/manual/en/function.htmlentities.php

Tuesday, September 28, 2010

Software Architecting Success Factors and Pitfalls

My boss give to my email so sharing it with myself

Software Architecting Success Factors and Pitfalls

The top critical success factors for the architecting effort that we have identified are:

The architecting effort must:

* address a strategic business objective of your key sponsor
* have a good lead architect with well-defined role and style
* have a lead architect and architecture team who are able to "sell" (lead); conversely, the organization must be willing to "buy into" (follow)
* contribute immediate value to developers (utilizers of the architecture)

The architecture is more likely to be successful if:

* there are architecture advocates at all levels of the organization
* architecture is woven into the culture
* there is customer involvement/pressure/demand

Critical Success Factors

* Interpersonal and team communication and ownership
* Leadership
* Vision
* Teamwork
* Availability of talent/resources
* Must have strong management sponsorship
* Market/business understanding
* Good match between technology and business strategy
* Customer focus
* Clear specifications including dependencies
* Simple architecture
* Deployed in phases/incrementally
* Architecture is understandable by all
* Solve at least the current problem
* Validation of requirements during each step of the process
* Project management

The architect must have the following skills:

* good domain knowledge
* good communicator/listener
* good persuader
* good project management skills

The architect must

* have a clear and compelling vision
* champion the cause
* provide constructive feedback

Pitfalls

* Poor leadership
* Thinking at too low a level
* Poor communication inside/outside the architecture team
* Not enough "selling"
* Lack of resources/talent
* Poorly designed roles and responsibilities
* Bad design/idea
* Lack of extensibility
* Doesn't solve the project team's problems
* Lack of control/authority
* Requirements unclear, not well-defined, not signed off, changing
* Architecture team loses touch with the product team's problems
* Product team believes "we can solve it better ourselves"
* Development management not penalized for "stalling"
* Politics

PHP display all error on server

If you do the programming in localhost (yours PC) the debugging might be easier
But when uploaded into the server, the error come out (even in localhost is okay)

So you need to debug at the server because only the server have the error. Mostly because of develop in Windows while server in Linux cause the error

So you need these code
Taken from http://www.wallpaperama.com/forums/how-to-display-php-errors-in-my-script-code-when-display-errors-is-disabled-t453.html

I write it here

ini_set('display_errors', 1);
ini_set('log_errors', 1);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
error_reporting(E_ALL);



I know these can be done in PHP cause I meet the code before, but until now still didnt find the 'easy copy paste' yet. So the tutorial really save my day

these code will display the error (Including Notice)
*Notice is not an error, program can still continue

Saturday, September 25, 2010

Antivirus software, comodo

Here Im going to give opinion about anti virus software
Im using comodo internet security (free)
From here http://www.comodo.com/

If you are using kaspersky (need to pay). Im going to say yes kepersky is better
I have try bitdefender before this, still kaspersky is the best

If you want to use free anti virus software which is comodo
I going to tell you comodo has several classification in security

1. Anti virus
2. Internet security
3. Smart Defence+

what is this 3 things?

Antivirus
Is detect and remove virus
Its detect the virus when you open a folder or while performing a scan
After detect they will remove it
Not good antivirus software will not be able to detect a virus
Personally these comodo dont have a good antivirus so I dont install it

Internet security
It is a whole large topic with a purpose protect from Internet harm such as Hack, Spam etc etc. There is alot of way these guys do to hack so does security do to prevent. I install these feature in comodo

Smart Defense +
This is a new term in computer security. The base idea was a spam and telling you that these program abc.exe is running. Do you want to proceed? then you may decide yes or no.
Comodo are good enough to tell you that the program is safe. But still is depend on the situation. For an example, I was installing some game and they telling me is it?. If you are not computer literate you may suspect the game is a virus but most of the case, you know that what you do so you know that that is a game Im about to install so that was not a virus.
Basically this is the most important feature I need in my computer and the main reason why Im using comodo

Friday, September 17, 2010

Zip file

I always forget bout this, so its for myself note
zip -r filename.zip files

Wednesday, September 15, 2010

Fedora Install LAMP

Lazy to write, so
http://techchorus.net/how-install-lamp

restart the LAMP
service mysqld start
service httpd start

How to install x-debug
http://paulslinuxbox.net/blog/linux/eclipse-php-and-xdebug

Install RMPFusion

Keywords
install RMPFusion
Fedora cant play mp3 file
Fedora packages: failed to install signature

What is RMPFusion

If you are new to Fedora. RMPFusion is a 3rd party software source list
Means all installer that is 'FREE' but 'NOT REALLY FREE' like flash player was listed here

Some EMO EMO
I create this tutorial because I cant play mp3 file because of failed to install the 3rd party software. The reason was not on the software source but on the signature key that not being teach during "how to install the 3rd party source list". Probably this is easy but IM USING WINDOWS!

Start the Tutorial
Go to http://rpmfusion.org/

1st step - Put RMPFusion in yor list
Download the .rpm file. These file is an installer to make RMPFusion as your 3rd party source list
Note you need to Install both Free and Non-Free

2nd step - Verify the Signature
Download the signature
Import the signature


This is the link where I learn how to install (import actually) the signature http://fedoraproject.org/wiki/Enabling_new_signing_key

To put it simply su -c 'rpm --import NAME_OF_THE_SIGNATURE_FILE'

In my PC it will be
cd Downloads
su
mypassword1234
ls
su -c 'rpm --import RPM-GPG-KEY-rpmfusion-free-fedora-13'
su -c 'rpm --import RPM-GPG-KEY-rpmfusion-nonfree-fedora-13'