Being a PHP Developer in 2015

This is just some thoughts on being a PHP developer in 2015;

A standard web project before used to just require you to setup a local web server, and then you’d upload to a standard web host with some worries about PHP versions perhaps but little to no thought required for the server side of things.Frameworks were a new thing, CodeIgniter was (to me at the time) the best thing to happen to PHP,  introducing me to PHP MVC patterns, easily integrated vendor libraries (I never got into Zend Framework) and Twig.

Now a web project involves using programs such as Composer, Bower and Grunt just to manage project dependencies. Then you have PHP & JS frameworks like Symfony, Laravel,  AngularJS that have really made life so much easier for us developers. Of course this all comes at a cost of having to put in time into learning all these new frameworks and tools, but the benefits of doing so are just amazing; development time goes way down and you create much better products. I wish I could further go into the benefits of each but they all require posts of their own to really get across their individual uses, I’ll attempt to get to that!

Working with UNIX servers is pretty standard for most web developers now, myself included. I’ve been using DigitalOcean for all my hosting, they really are a great host and I recommend them to anyone searching. Anyway a tool I found lately for server management which I guess is what has caused this post is Ajenti, before this I was using ISPConfig for the aim of being able to manage my servers easier than via ssh, however I found it’s interface pretty clunky and just overall slow, always ending up in ssh. After testing Ajenti in a fresh droplet I changed completely over to it on my other servers, so far it’s been amazing, I’m still using ssh here and there but overall Ajenti has really solved my problem so thanks guys. The install was amazingly simple too I recommend anyone looking for a GUI for their server to check it out.

So there seems to be a lot more to PHP web development now in 2015 than there was just a few years ago, though I personally feel all of it is for the better, making my life easier. It makes me wonder what it will be like in another few years though, whats next? :D

Apache Localhost Rendering Slowly?

Is your localhost taking longer than expected to load?

A possible quick fix is to edit your httpd.conf file and set ‘ServerName’ to 127.0.0.1:80 . This can make the difference between millisecond load times and crying while Apache tries to load.


# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
ServerName 127.0.0.1:80

We’re Back / Moving Forward

So I’ve truly neglected here, my original space on the internet. . It’s been almost two years since my last post, which was really just a code snippet.

So moving forward I’m going to be blogging about completely different topics that I haven’t blogged about before. .

For my current subscribers (it’s hard to believe I still have subscribers) you may want to unsubscribe and decide if this is something you want to subscribe to moving forward.

So whats happened?

Well, a lot has happened since I’ve last posted on here. It’s even kind of hard to timeline the last two years myself. I started my own web development company in Kilkenny (coder.ie), I did that for around a year and a half.. Learned a lot of valuable lessons throughout doing that. Got myself the funds needed to get to Canada (barely), now I’m living in Vancouver and working at Motbot .

I love my new job, I don’t think I would go back to owning my own company anytime soon. Landing a job after landing in Vancouver was a breath of relief and I really lucked out ending up with a company that are doing some amazing stuff. My co-workers are really experienced in their respective fields and I don’t think a day goes by where I don’t learn something new. It’s so refreshing after the stress of working on my own for so long  and nearly losing my love for programming. I think that’s partly why I stopped posting on here, when I finished working the last thing I wanted to do is use the computer any further.

I can’t see myself returning to Ireland if I can work out staying here. Canada is an amazing country and Vancouver is just such a beautiful city.. So much is better here, its hard to even put into words, I’ll try over a series of articles! :P

What are my future plans? 

I think this works better in list format:

  • Improve as a poker player 
    Yes we’ve gotten very into poker in the last year playing mainly online tournaments, I won’t really get into this much here as there will be more content on it later.
  • Create a game using Unity
    Anyone who knows me knows I’ve always wanted to create a game, that’s what originally got me into programming. I’ve tipped my toes into a few games along my way, but I’ve never actually created my own game and had complete creative control. That’s the next plan. I’m going to create a 2D game over the coming months and document my progress here along the way.
  • Learn C#
    Kind of ties into “Create a game using Unity” since C# will be the language I use most.. I never did get around to learning Python, hopefully that doesn’t happen here, though its more unlikely since I’ll actually have a use for it.
  • Live Healthier
    I’m probably the picture of unhealthy living at the minute, I’ve been trying to make small changes to change this and hopefully all these small changes will turn into massive changes. Like quitting smoking, we’ve just been putting off doing that forever!!

So that’s all I have for now, I hope this clarifies what way content will be headed in future!

How To – Control Your Computer with an Xbox Controller


Today I’m going to walk you through setting up an xbox controller to work on your computer and control the mouse / keyboard.

First your going to need an Xbox Controller that works on Windows.  If you already have an Xbox controller you can just pick up one of these receivers. (Both links to Amazon, you can  find on  eBay cheaper).

Next you’ll need to install the drivers for the controller. You can find them on Microsoft’s website here.

Now you should be able to connect your controller to the computer and play any games using it. However you can’t use it to control the mouse yet. What we will need to do next is download JoyToKey from here. I went with the latest Beta version however you can also download the stable (v 4.6 at time of writing).

The second last step is to download my config and shortcut to the on-screen keyboard put the configuration in the folders shown and run JoyToKey.

The last step is to enjoy being lazy! ;)

WordPress – Shortcode in PHP files


So in WordPress with plugins etc. you end up using shortcode in posts to keep things simplier, an example would be if you want to display a gallery you would just use:
[galleries id="1"]
However trying to this when your outside of the “WordPress Loop” [in your theme files usually] you will hit the problem that WordPress won’t parse the shortcode. So whats the soloution? Super simple just append the following to your shortcode:
echo apply_filters('the_content', '[galleries id="1"]');
Presto, it works!

To read up more on shortcodes in WordPress click here.

Why I’m learning Perl

So this post may not be to everyones taste, its more a post to remind myself why I’ve decided to learn Perl. If anyone doesn’t know I already know PHP and some Java.

Perl is a programming language, It’s Object Oriented, simple to learn and very powerful. Perl stands for: “Practical Extraction and Reporting Language” but others have come up with many more interesting and colorful names for it;
Perl is “the little language that could” it’s designed to be able to do as many tasks as possible in as little time as possible.

“A good perl program is one that gets the job done before your boss fires you.”
Larry Wall, the creator of Perl.

Perl is an Interpreted language, so you don’t have to compile it like you do Java, C, C++ etc. For fast development work, that’s a godsend.

Perl has been successfully used for a lot of diverse tasks: text processing, system administration, web programming, web automation, GUI programming, games programming, code generation, bio-informatics and geneological research, lingual and etymological research, number crunching, and testing and quality assurance.

Perl Pros:

  • Cross Platform compatability. A perl script for linux/unix will work just as well in windows and vice versa, and the only exceptions to that rule are those dicticated by the operating system itself. (for example file paths are different in windows and unix.)
  • Online support. Perl has been around since the early 90’s, its exceptionally well known and thousands of tutorial and help sites abound on the internet.
  • CPAN.org, a massive collection of perl modules that can do almost anything, someone has usually done the work for you.
  • Taint mode, this helps you to write secure code by not trusting any data provided by the users until you have tested and declared it safe.

Perl Cons

  • Speed. Apparently with a very large program [Like word or something] the  sheer size of it would make it extrememly slow to compile at runtime.. This is the only Con I’ve found about Perl!