My thoughts on management & time tracking

So I’ve talked about time tracking before, however that was much more a “Keep yourself on track / how to know what to bill per hour as a freelancer/contractor”. Today I’d like to share some thoughts on bigger companies and my feelings toward management and time tracking there.

I’ll preface all this with “these are my opinions, I’m not saying I’m entirely correct here, this is just how I personally feel“.

As a programmer I love my craft, I spend hours playing around with new technologies, learning new languages and wrapping my head around computer science concepts. I’ve always known programming would be my career from a young age, finding it amazing that people would pay me to do what I love to do anyway. 🙂

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.

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

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!

 

PyroCMS – CMS on the CodeIgnitor Framework

So lately I’ve been playing around with PyroCMS, for any of you who don’t know about Pyro, its basically an open source content  management solution thats based on the CodeIgnitor framework. What does that mean you ask?

  • MVC design pattern. (Model->View->Controller)
  • Security,  Cross-Site Request Forgery protection, XSS filtering and very secure password encryption.
  • Caching, in order to achieve maximum performance.
  • Translated into 16 languages!
  • Extremely lightweight!
  • Support for modules, themes, plugins and widgets!
  • Multi – Site Manager (In Pro Version £45 )

Really it takes the pain out of  making your standard websites, you’ll have an area where the client can update their website in a simple environment  and thanks to ‘permissions’ you can be sure they won’t mess anything up!

Of course there is always going to be a stage when your better off without a framework, but for projects that it will work for, PyroCMS will save you a BUNCH of time!

Installing PEAR in WAMP

So this evening I went about attempting to install PEAR on my WAMP installation, this should be as simple as opening up a command window navigating to C:/wamp/bin/php/*phpversion* and running “go-pear.bat”, however upon doing this I ran into the following errors:

phar “C:\wamp\bin\php\php5.3.0\PEAR\go-pear.phar” does not have a signaturePHP W
arning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha
r error: invalid url or non-existent phar “phar://go-pear.phar/index.php” in C:\
wamp\bin\php\php5.3.0\PEAR\go-pear.phar on line 1236

Warning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha
r error: invalid url or non-existent phar “phar://go-pear.phar/index.php” in C:\
wamp\bin\php\php5.3.0\PEAR\go-pear.phar on line 1236
Press any key to continue . . .

A couple of Google searches later I got the answer needed to fix my problem, simply running this command instead:

php -d phar.require_hash=0 PEAR/go-pear.phar

A couple of questions later PEAR was successfully installed and running, so if your running into the above error you now know what to do! 🙂