You can see my C# education has rubbed off a bit on my PHP programming, for example the use of Libraries and more comments than I would have previously used
My first experiance of programming was making dynamic web pages for Worldwide Lighthouses Version 2. Essentially all my project did was provide an uploader for images and data, which was then input to a database, and several different types of pages used to display information about different types of aids to navigation by pulling information from the database and formatting it in a specific way.
At the time I thought the language I was using to do this — PHP — was great, the syntax was simple and there was plenty of documentation avaliable online for free. I hadn’t had any formal tutoring, nor did I need it in order to get on with what I was doing, I taught myself and things worked… most of the time. Of course having no formal tuition I didn’t work under best practices and everything was absolutely linear, I had no concept of Object Orientation. These were the days when I loved PHP.
In fact, when I first started learning C# I thought it was downright stupid that you had to declare what type a variable contained, “Why can’t the stupid thing work out that ‘2’ is a number?” is a choice quote from myself.
Recently I’ve had to go back to PHP for a few projects, including 5Hives. I cannot stand it. Compared to C#, PHP is massively inconsistant — heres some examples:
- Built in Methods – Some use Under_Score() naming, some use camelCase, some use number2syntax, some use numberToSyntax. This means you can never guess what a method you need might be called, especially annoying when dreamweaver and expression web don’t have very good intellisense.
- Sometimes it prints errors to the browser, sometimes it puts them in an error log. Oh, and it doesn’t tell you where said error log is.
- Some functions return null if they failed, some throw an exception causing the program to stop, some print errors… etc etc
- If you forget the $ sign before a variable, rather than telling you it uses the name of the variable as if it was a string
- Don’t even get me started on sessions…
There are so many reasons that PHP isnt the nice “work place” that C# is that I cannot sum them all up — I’ll leave that to this much more in depth post, which I enjoyed reading and agreed with on the whole.
Just the other day Nick was saying how everyone loves the first language they learn, be that prolog, python or VB (ok, maybe not VB ;)) but I cannot count myself among this group. I can program in PHP quite well, I can tolerate it and I know there are some situations where it is one of the best tools to use (simple upload forms are still a joy to make in PHP) but I cannot say I’m its biggest fan.
Today is my final Wednesday in Dunstable for a few months, and possibly the last wednesday where dunstable is my perminant residence. This is both exciting and unnerving, a relief and a worry. Though I’ve moved house once before I’ve always lived in Dunstable so this will be one of the biggest changes I’ve ever gone through. As well as change of location I’m moving away from my Family, Girlfriend and Friends — all of whom are incredibly important to me.
The last two years of my life have certainly been the best so far, I’ve made some incredible (hopefully lifelong) friends, met my girlfriend and generally had a great time, so moving on without these people with me is daunting, however I can’t wait to meet new friends and discover more about what it is to be an independent adult – as well as have great fun and learn more about Computer Science.
So, I have two days and nights left before I leave at 7am (ish, depending on my ability to wake up) Saturday morning and I intend to make the most of them, spending lots of time with those dearest to me (even though a lot of my close friends moved away last weekend).
This all sounds gloomy, even though it is in reality the start of possibly the 4 most exciting years of my life! So in other good news I spoke to the bee keeper man again today and provided him with some examples of my previous work — namely http://www.semiskinned.co.uk and http://www.worldwidelighthouses.com Hopefully he’ll get back to me either tonight or tomorrow and ask me to carry on with the project, which will be great news!
Thats all for now – thanks for reading,