13 March, 2013

PHP: A Few Changes To Go

I've been using PHP since 1998/99 and during that time, I've experimented with a lot of other languages every time I have come back to PHP.  Since PHP 5.3 there have been numerous changes that have greatly improved the language -- I am especially looking forward to changes in 5.5. PHP has grown as a language incredibly since 5.2 however, there are a few major changes that need to be addressed. It is time for PHP to pull up it's big-kid pants and grow-up as a language.

The list found below are a list of items which I would recommend considering for changes to the language. PHP is my preferred language; you will not find me bashing PHP nor hanging out with the Ruby on Rails fanboys who trash talk PHP and compare it to their framework as if it were an equal comparison [except for maybe the lack of a finally block -- which will be corrected in 5.5 (w00t!)]. I do have  a list of changes I feel would improve the language overall.

On to the list:
  1. "$haystack, $needle" or "$needle, $haystack"  - pick one and make it consistent across the board. Most of the array functions use $needle, $haystack while string functions like, strstr or strpos are $haystack, $needle 
  2. Pick a function naming method and stick with it - Underscore, all lower-and-crammed-together or camelCased. Examples:  in_array, isset, ReflectionParameter::getClass.
  3. Replace "use " with "import" for namespaces - I have no real citation or legitimate reason for this I just really don't like the use keyword for namespace/class importing.  Use is used for too many thing within PHP plus I have proposed use for use at my next point. Wow, that was a lot of the word use.
  4. Replace "use" with "has" for  traits - my biggest complaint is I feel like traits should be included on class declaration. (e.g. class Programmer extends Employee has Coder {...} ). Therein creates a separate problem where it leaves you needing to define Trait preference. I see no reason why these could not be stand-alone statements within the class itself. (e.g.

    class Programmer extends Employee [implements PersonInterface] has Coder
    {
       
      Coder
    ::getTitle as getJobTitle; 
      // or if you're hell-bent on the use keyword how-about...    
       
      use Coder
    ::getTitle as getJobTitle;
    // not a bad option
      // or just as an interface declaration 
      public function getJobTitle as Coder::getTitle;
    }

  5. Change String concatenation modifier from "." to "+"  - The plus-sign is generally used more often with String concatenation (as well as Math addition). Why do we need a separate modifier for String concat. I assume there was a reason this was done for a reason, I know Perl uses the dot for string concatenation.
  6. Replace back-slash "\" with period "." for namespace separators - why would you want to use your escape modifier to separate namespace paths?
These are issues in the language that I feel should be resolved. Obviously these are not trivial adjustments to the language. These are API breaking "features" which is why I feel that if these changes are adopted they would need to go in at a major release such as PHP 6 or PHP 7.  Any one of these proposed changes would require a developer to completely "seek and refactor" projects moving to a major release adopting these changes. Therein lies the key to this proposal. While this sounds like it would be a problem and slow-down developers, unfortunately PHP developers or perhaps sysadmins have been slow to adopt new versions. That I'm not here to debate, but I will use that to assist my proposal. 

Based on a presentation by Nick Belhomme dated 28 January, 2012, PHP 5.2 was still head-and-shoulders above all other versions of PHP 5 - despite the fact that PHP 5.3 was released 30 June, 2009  ( citation ). Two and a half years later and 53.6% more people were using and "old" version. If the adoption rate is this slow it stands to reason that this would allow for developers to ease into the new major release of PHP. I don't want to treat this like the ultimate solution to my proposed adjustments, this solution comes with some risk. Look to python for an example, python 3 was release 3 December, 2008 and it still doesn't have a wide adoption rate. The PHP community as a whole would have to have complete (read-as: majority) buy-in to move forward with the language. 

Finally, as stated previously these are just some changes I would like to see in PHP, changes which I feel would improve the language as a whole. Improvements that might make the transition to PHP from another language slightly smoother, ease recall of syntax and simplify reading.  Changes of this kind are not without growing pains for all developers converting to a version supporting these changes but changes which make the language clean and more consistent.

.::.  DruiD628 .::.

Labels: , ,

22 April, 2012

Crow

So, I've decided it's going to be better for me to just bring my blog back to blogspot.
Long story, I'll explain later.

So if you are used to tablet.druid628.com look for it to start using druid628.blogspot.com.

Labels: , ,

30 June, 2007

Book Progress - Update #2

I just had an epiphany.
I NOW have a name for Book one!
It is PERFECT!
I am not quiet ready to release the name yet but check back soon for updates!

ALSO, In the next few days, I will be creating a new Blog for the sole purpose of updating the status of my book(s).

I just wanted to share that with you.

Labels: , ,

25 June, 2007

Book Progress

As some of you know, I have started writing a book. The details I have to keep quiet for now but I figure I can at least update you on the progress. Well after a while of not doing much work -- other than in my head -- on my book, I have finally gotten back around to working on it. As many of you know, I have been planning this for a number of years. The content that I have in mind is more than I could successfully cram into one book and even one series, I had planned to do two series and four books in each however I have started to refine that down. The first series should be three books and a bridge into the second series which will probably be three books. Officially the first series will be four, but there will be about four to five years between book three and four.

Over the past two or three months I have been attempting to locate a landmark I needed to use in books one and three. Well I knew roughly where it was, I was just was slightly off. Well this weekend after taking a short road trip up to Monteagle Mountain on Saturday I took a brief detour where I found what I was looking for.

Now that I have found what I have been looking for, I have picked up writing again much more aggressively. I am nearing the point which I will need to go back refine the details for chapters written. Currently, I have of the twenty-one chapters I have defined I would say about fifteen are nearly to this stage. Granted, I will likely need to add about three more chapters just for progression but that is a bridge I will cross when I get there. So if I had to give a percentage of completion of the first book I would say I am around 50 percent. I am not even going to guess where I am on the series or whole series.

Depending on how much time I have to work on it over the next few months, I hope to be done with book one, that includes the detail for each chapter, and well on my way in book two.

I'll keep you updated.

Labels: , ,

05 February, 2007

It's been a while...

No I'm not fixing to break into Staind lyrics.

It has been a while since I posted. Since I last posted I've been to colder climates, the Cleveland/Akron/Canton Ohio area, yeah woke up one morning to 19 degree temps, that was fun. Since then I have, uh.. worked... and tried to play WoW when I could, tried being the operative word here. OH I know what probably the biggest news I have is, get this, Jaime and I have started going to the gym. We have joined the Rush. Yeah I have already noticed some improvement which is great! However, I know that the you notice effects at first then they seem not to be as noticeable, with that in mind, I have to make sure that I do not get discouraged.
Anyway yeah so the DruiD is finally trying to slim down and tone up.
[w00t]x2

Anyway, I'm going to bed!

Labels: , ,

09 November, 2006

Steers and...

Texas. An interesting place. I recently returned from Laredo Texas. Laredo is the first place I have seen that has an airport smaller than Chattanooga's! Although I heard that Joplin, MO had a pretty small airport.

DFW's airport was cool except for the dirty words bumping me off my flight back to Chattavegas!
Then saying, "well we can put you through Chicago then to Chattanooga." To which I replied, "I don't wanna go to Chicago." "Well we're having a weight issue with the plane so we've had to bump two passengers." "Well I'm having an I wanna go home issue, and I want to go home!" So after I head off to the Chicago gate, they call me back and ask me to wait for a moment. Twenty minutes later I boarded the plane to Chattanooga.
DADGUMIT!

c'est la vie

Labels: ,

06 September, 2006

Springfield Springfield it's a hell of a town!

Well my recent trip to Missouri was really a good one... except spending half the day in Cincinnati, Ohio on Friday September 1st. My trip started on Tuesday August 29th at about 12:30 departing from Chattavegas to Memphis, while in Memphis I was glad I was my usual observent and nosey self, I had just picked up a BBQ sandwich from... (somewhere) and picked up my favorite White Mocha from Starbucks... after finishing eating I was a little bored and decided to do some work on the computer... well after shamelessly attempting to "use" the Airport WiFi then a guy sits down behind me yacking on his phone. Well in the process of dropping eaves I hear that Lexington, KY has this wonderful restaurant with the "greatest BBQ" called Red Hot and Blue (which is funny because their site says they are none in KY) ... well after landing in Springfield (Springfield it's a hell of a town!) I proceded to get my bags, to get my rental car and to hop on the road headed to Joplin, Missouri where Not only did I find one of these restaurants (which I did eat at and enjoyed)... but get this Murfreesboro, TN... THEY HAVE A MAZZIOS!!!!

There was this place we ate at called Bella Peppers which had this dish called...
Penne from Heaven -- which lived up to its name believe-you-me.
So after all was said and done and half a day in Cincinnati -- which isn't really a bad airport to get stuck in -- I came home and had a Rock City Alumni Cookout. It went well as far as I am concerned. We laughed, ate, drank and had a merry ol' time.
Anyway I guess that's about it...

Labels: , ,

13 August, 2006

Salt Lag City

I just returned from my second week in Salt Lake City.
For anyone who has never been, I do recommend going to at least visit it.
A city with a neat history. Being someone who is very interested in religions and history... not to mention history of religions... I think it is definitely worth a visit. Also for the first time since I was in 8th grade (95/96), I could actually breath out of my nose it only took a couple days of nose bleeds... but a small price to pay for remembering how good it is to breath with ease.

My first complaint of Salt Lag City is that on my first return trip Friday, 4 August, 2006... I flew in to Atlanta and had my wife come pick me up (because I was un able to get a flight back into Chattanooga). I arrived all was good, I visited the carousel, my oversized bag (that I had on loan) spits out... I grab it. I wait for my bathroom bag... the carousel stops... there are about 8 or 9 of us on that flight still standing there. We go to talk to the nice Delta people, who obviously do not communicate very well. The lady explains that my bag was left in SLC. I explain that I am going to need that bag because I have another flight on Monday. She tells me that I will be able to come back by Saturday morning when the bag arrives [on the next flight in from SLC] I explain that I do not live in ATL and live near Chattanooga and she tells me that is fine that she will have it flown to Chatta-vegas and the Delta people from CHA's airport will bring it to me.
Awesome!!!!
No. ATL ships it via UPS very late in the day Saturday.... Grr... I fly out Monday, my bag arrives at my home... Tuesday... ARGH!!!!

SLC (Week 2) Everything went very smoothing getting out there my previous bathroom bag is at home, I'm making do with what I've got. Suddenly there's Blankity-Blanking terrorists in the UK. OMG! soooooooo.... Airports say get here 3hours early -- but my flights at 7!?! I call SLC Delta and after I FINALLY get to talk to a person I explain that my flight is @ 7 and wanted to know if she thought I should get there at, *gulp* 4 or not? "I would just to be on the safe side" *sigh* So I get there Saturday morning and it's 4 am.. the Delta ticket agents... aren't open...
the kiosks turn on at 4:30 so I finally get my tickets, my bags checked and to security... I look around there's no one around just me the lady in front of me and the nice people at TSA... so why did I have to be here at 4 again? oh look there's nothing open to give me Coffee!?! I NEED CAFFINEE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! oh look there's someone with a Starbucks cup, "excuse me where did you get that" so he tells me, "dammit it's 6:25 they're going to start boarding in 5 minutes...." *sigh* I'll just do with out...

All in all not bad trips... just normal mishaps
oh well c'est le vie!

Labels: , ,

10 July, 2006

DSC, SunGardHE, NY and Air Travel

DSC .::. SunGard HE
Some of you know, some of you may not. I am no longer at Dalton State, I have accepted a position with SunGard Higher Education, a company specializing in solution for Higher Education institutions. For more information visit: www.sungardhe.com

NY
New York, New York. I am currently in Rochester New York for a New Hire Orientation. I will be here until 14 July. I will be flying back into Chatta-vegas that evening.

Air Travel
Considering that some of you knew my diffidence for air travel. Well ya know, my first flight was fun. The flight from Chattanooga to Atlanta was a little shakey but... quick. For anyone like myself who has never been to the Atlanta Airport, it is it's own city. It is HUGE!! My flight from Atlanta to Rochester was smooth enough. Waiting on my luggage... *sigh* I was beginning to wonder if my luggage had been lost but finally, it appeared out the magic luggage mouth with the really long tounge.

Labels: , ,

18 August, 2005

Is there anybody out there...?

Not as many things truly get under my skin as sometimes appears to. One of the ones that truly does is someone asking your opinion and or what's going on and after you tell them they either don't listen to you, they blow you off, or they tell you that you are wrong.
HOW CAN MY OPINION BE WRONG!?!
THEN, WHY DID YOU ASK ME FOR MY OPINION!?!
Today we had a server problem. Well it escalated to more problems. After it was fixed my boss asked me what happened and I told him what I was pretty sure (and am still almost 100% certain) what the problem was and he basically dismissed everything I told him. I understand wanting to cover your own ass and that maybe my explanation was not the best technical reason; or maybe it just wasn't what he wanted to take to his boss. I can't help that. That's what happened. You can't just say, well if everyone wouldn't freak every time there's a fart on the network then maybe this shit wouldn't happen.

Anyway I want to go home.

Labels: ,

16 May, 2005

Tattooine or bust

Too Atlanta I will go.
I'm off to CPIP Developer Training this week in Atlanta. I'll be gone for the week. Which means I'll be away from home when Star Wars comes out... fear not young jedi padiwan... I will be there. Midnight showing at a movie theater not to far from the hotel which I will be staying. No I'm not telling where I'll be staying for fear of all you women beating down my door... plus I reserve my rooms under a pseudonym.
Anyway I plan to post after I get back from the movie that night.
l4t3r
-druid

Labels: , ,