WdsClient: There was a problem initializing wds mode

After loosing a couple of nights trying to set up WDS, here comes the moment of truth. You have to deploy your first computer and you are hit with this stupid error message:

“WdsClient: There was a problem initializing wds mode.”

Sweet! What the heck does that mean?

After some googling around someone finally got the solution that i was looking for here
(http://social.technet.microsoft.com/Forums/en-US/winserversetup/thread/48058acd-3b99-40a0-b47b-8508a3c6f8f6/)

Honestly i have no idea why it fixed it for me but it does work.

change option 67 from :  PXEboot.com  to  wdsnbp.com

I will have to spend some time  later to find what the heck is the difference between PXEboot.com and wdsnbp.com but i will enjoy the solution for now.

Files that Starts with Underscores in PHP

Single Underscore (Drupal)
“If you need to define global variables, their name should start with a single underscore followed by the module/theme name and another underscore.”
http://drupal.org/coding-standards


Zend Framework

“For methods on objects that are declared with the “private” or “protected” modifier, the first character of the method name must be an underscore. This is the only acceptable application of an underscore in a method name. Methods declared “public” should never contain an underscore. ”

“For instance variables that are declared with the “private” or “protected” modifier, the first character of the variable name must be a single underscore. This is the only acceptable application of an underscore in a variable name.”
http://framework.zend.com/manual/en/coding-standard.naming-conventions.html

 

Double Underscore
Double underscores (__) means nothing in PHP  since it is not one of the reserved PHP keywords.
It’s meaning really depends on the project. Do not be surprise when it means something in wordpress and something else in zend framework or cakephp.
(WordPress)
http://codex.wordpress.org/Translating_WordPress#Localization_Technology

Curly Braces in Codes

Method 1

When I first started learning programming a few years ago, the curly braces style that i have always used was the “Allman Style”

The "Allman Style" puts the brace associated with a control statement on the next line.

“Proponents of this style often cite its use by ANSI and in other standards as justification for its adoption.” http://en.wikipedia.org/wiki/Indent_style

Method 2

Lately the style in vogue in almost all major PHP projects is the “One True Brace Style”

The "One True Brace Style" puts the brace on the same line.
http://en.wikipedia.org/wiki/Indent_style 

If you asked me, i still like the Allman style as it is more readable, but when such when large projects such as Drupal and WordPress (see images below) use the “One True Brace Style” it is hard not to use it.

Drupal

WordPress


Interesting links:
http://ycsoftware.net/coding-standards-quick-references/
http://gskinner.com/blog/archives/2008/11/curly_braces_to.html
http://programmers.stackexchange.com/questions/2715/should-curly-braces-appear-on-their-own-line

 

Split() Function is Replaced by What?

If you go to PHP.net looking for information about the split() function you are likely to see the following (at the time of writing):

Now logically, what should be the next question?
It should be : What has it been replaced by?

I have to go to the bottom of the page to locate a section called “Tip”  to give me an idea about what to use.

Why not saying: "This function has been deprecated and has been replaced by ..." and leave all the verbiage for the rest of the page.

To make a long story short

it has been replaced by the preg_split(), str_split() or the explode() function.

As a side note, I am running php version 5.3.3 and it is running fine there.


I thought that it was supposed to be deprecated as of 5.3.0. I am just saying …