Free Ebook: Getting Hired

Posted by Stuart Herbert on November 12th, 2012 in 1 - Beginner, Toolbox, Training.

From the Introduction:

“This e-book will hopefully show you how to put yourself across to a prospective employer in a way that makes it easy for them to spot what you have to offer them, to increases your chances of successfully finding a job in the United Kingdom’s computing industry.

“Recruitment processes vary from employer to employer. I’ll take you through the most likely steps that you need to get through. I’ll explain the process from the employer’s perspective first, and then from your point of view as someone applying for a job. A better understanding of what the recruitment process is, and why, will help you avoid the common pitfalls along the way.

“The second part of the book is more about you, about what you need to do to be prepared for when you join the industry, either during an industrial placement year or when you graduate and leave academia. Ours is a multi-disciplined industry where things change rapidly, so to help you prepare, I’ve finished off the book with some lists of the fundamental skills that industry expects you to have before you start your first job.”

Getting Hired is a free ebook released under a Creative Commons licence. I hope you find it useful.

2 comments »

Introducing phix

Posted by Stuart Herbert on March 21st, 2011 in 1 - Beginner, phix, Toolbox.

In my Beyond Frameworks talk, I explained how a component-based architecture can help answer some of the important (i.e. expensive!) questions you might face when creating long-lived apps that rely on a PHP framework. In this series of blog posts, I’m going to look at how to go about creating and working with components.

This page has been updated with the latest information about phix.

phix is a small command-line tool for PHP applications. I created it to fix (pun intended) the problem of how to easily automate the tasks involved in creating and (especially) maintaining components. These tasks aren’t built into phix; they are commands that ship with the phix distribution. You can create your own commands to run inside phix too, and it’s easy to do so.

Installing phix

There are full installation instructions for phix on the phix project’s website.

What Can phix Do?

Running phix without any command-line parameters gives us a basic overview of what it can do:

phix 0.13.2 - http://www.phix-project.org
Copyright (c) 2011 Stuart Herbert and contributors
Released under the BSD license

SYNOPSIS
    /usr/bin/phix [ -?dhv ] [ --? --debug --help --version ] [ -I<path> ] [ 
    --include=<path> ] [ command ] [ command-options ]

OPTIONS
    Use the following switches in front of any <command> to have the following
    effects.

    -? | -h
        display a summary of the command-line structure

    -I<path> | --include=<path>
        add a folder to load commands from

        phix finds all of its commands by searching PHP's include_path for PHP
        files in folders called 'PhixCommands'. If you want to phix to look in
        other folders without having to add them to PHP's include_path, use
        --include to tell phix to look in these folders.

        phix expects '<path>' to point to a folder that conforms to the PSR0
        standard for autoloaders.

        For example, if your command is the class '\Me\Tools\PhixCommands
        \ScheduledTask', phix would expect to autoload this class from the 'Me
        /Tools/PhixCommands/ScheduledTask.php' file.

        If your class lives in the './myApp/lib/Me/Tools/PhixCommands' folder,
        you would call phix with 'phix --include=./myApp/lib'

    -d | --debug
        enable debugging output

    -v | --version
        display phix version number

    --? | --help
        display a full list of supported commands

COMMANDS
    help                    # get detailed help about a specific phix command
    pear:expand-package-xml # expand the tokens and contents of the
                              PEAR-compatible package.xml file
    pear:register-channels  # register the channels for the dependencies
                              listed in the PEAR-compatible package.xml file
    php-library:init        # initialise the directory structure of a
                              php-library component
    php-library:status      # check the status of a php-library component
    php-library:upgrade     # upgrade the structure of a php-library component
                              to the latest version

    See /usr/bin/phix help <command> for detailed help on <command>

phix ships with easy-to-use commands for creating and maintained packaged components of PHP code. Additional commands will be added in the future!

You can add your own commands to this list with minimal effort, something we’ll look at in a later blog post. By default, phix searches your PHP include_path for new PhixCommands namespaces to load; you can also use the -I flag to tell it to search a specific PSR-0 compatible class tree if needed.

And the best thing of all is that phix is framework-agnostic; it isn’t going to break as you upgrade or change frameworks – an important requirement for creating and working with components!

Self-Documenting

phix comes with a built-in help command to show you what any single command can do. And best of all, it automatically tells you where the code is for that command, so if something isn’t working or you want to enhance it, you don’t have to wonder where phix is getting the code from:

$ phix help php-library:init
NAME
    /usr/bin/phix php-library:init - initialise the directory structure of a
    php-library component

SYNOPSIS
    /usr/bin/phix php-library:init <folder>

OPTIONS
    <folder>
        <folder> is a path to an existing folder, which you must have
        permission to write to.

IMPLEMENTATION
    This command is implemented in the PHP class:

    * Phix_Project\ComponentMaker\PhixCommands\PhpLibraryInit

    which is defined in the file:

    * /usr/share/php/Phix_Project/ComponentMaker/PhixCommands/PhpLibraryInit
.php

Where To Find Further Information

The Phix Project website is the official homepage for the project. Hopefully you’ll be able to find everything you need from there.

Stuart’s PHP Components blog posts provide a step-by-step look at using phix to create and maintain packaged components of PHP code.

7 comments »

Whether you’re looking at your own code before (or after!) you have shipped it, or you’re picking up someone else’s code after they have shipped it, tracking down and fixing bugs is a fundamental part of programming. If you know the code well, perhaps you can make an intuitive leap to immediately jump to where the bug is. But how do you go about tracking down a bug when intuition doesn’t help?

The nature of all code is that larger systems are built from smaller underlying systems and components. They in turn are also constructed from smaller components. The bug you are tracking down will have a cause in one of these systems, and will have symptoms that are visible in other systems. The remaining systems work fine (as far as the bug you’re looking for is concerned), and you can use this to quickly and reliably find where the bug is.

Divide your larger systems down into smaller systems at logical points, such as different server stacks, APIs, major interfaces, classes, methods and if necessary individual lines of code. Test both sides of the divide, with your tests focusing on the data that crosses the divide. If one side works as expected, the bug is not in there, and you can eliminate that side from further testing. Continue testing the remaining systems and components, which you have now isolated, by dividing those up into smaller systems and components. Keep going until you’ve reached the smallest testable system, component, unit, or lines of code that show the fault. Congratulations: you have isolated the fault.

Apart from being a strategy that allows you to work on code you’ve never seen before, this approach also has the advantage that it is evidence-based. This approach eliminates guess work, and it forces developers’ assumptions about how their code actually works in practice to be challenged. The data never lies, but be aware that it can be mis-interpreted!

The approach is iterative, and you’ll find that you’ll often go back and forth between your code and your tests, making your code easier to test and your tests have clearer and more targeted test domains and results. Fix the tests that are relevant to the bug you are tracking down, and make a list of any other issues you find along the way for you to come back and address at a later date. Stay on target, and park potential tangents and distractions for another time.

Although this sounds like a slow process when described on paper, with practice it can be executed at high speed during an emergency situation. However, the need to restore service in a timely manner isn’t always compatible with this approach, and you’re normally better off returning to your test environment where you can study the fault without inconveniencing your customers any further.

3 comments »

I’m speaking at the PHPNW ’08 conference in November, and I’ve just been contacted for advice by someone understandably excited at going to her very first conference. Thing is, I’ve never been a conference newbie (I’ve always been either speaking or running a conference) so I’m not the best person to offer advice on this.

What would you add to this list?

  • Arrange with on-line friends to meet up either the night before or before the presentations start on the day.
  • Look for social groups (e.g. PHP Women) you can join before the conference, to see if anyone like-minded is going.
  • If the conference has more than one presentation going on at once (== multiple tracks), work out in advance which presentations you’d like to go and see. You can always change your mind afterwards :)
  • Bring a laptop – a lot of the conversation at the conference happens online (such as on Twitter).
  • Bring a mobile broadband card with you too (do you have mobile broadband outside the UK?), as conference wireless systems can be incredibly unreliable.
  • Be yourself, but don’t bullshit – the folks you’re trying to impress could be prospective customers, work colleagues or employers.
  • Stay for the after-conference drinks & food, where you can socialise and network.

9 comments »

… as recommended by readers of Planet PHP :)

Most Recommendations

There were six Firefox extensions that folks repeatedly recommended …

  1. ColorZilla – advanced eyedropper, color picker, page zoomer and other colorful goodies.
  2. FireBug – live DOM & CSS inspector. The single greatest web developer add-on for Firefox.
  3. Live HTTP Headers – view HTTP headers of a page and whilst browsing.
  4. Web Developer Toolbar – adds a menu and a toolbar with various web developer tools.
  5. YSlow – Yahoo’s tool for analysing web pages and telling you why they are slow. Requires Firebug.
  6. Zend Studio Toolbar – debugging assistance for Zend Studio 5.5 and earlier. Isn’t mentioned on the Zend Studio 6 pages, so does that mean it is now obsolete?

… and after that, there was a lot of variety amongst the other extensions that were recommended.

Also Recommended

  1. Cache Status – easy cache status & management from the status bar.
  2. ChatZilla – IRC client for Firefox.
  3. Duplicate Tab – clone a tab along with its history.
  4. Edit Cookies – edit your cookies right in Firefox.
  5. Fasterfox – performance and network tweaks for Firefox.
  6. Firefox Accessibility Extension – test your web pages for functional accessibility features based on the iCITA HTML Best Practices.
  7. FirePHP – print to your Firebug console using a simple PHP function call.
  8. FireShot – take screenshots of web pages, and a whole lot more.
  9. Google Toolbar – Google’s famous in-browser search toolbar.
  10. GreaseMonkey – customise the way a web page displays using your own Javascript add-ons. See also Lifehacker’s Top 10 Greasemonkey User Scripts, and their Better GMail and Better Flickr add-ons to get an idea of just what can be done with Greasemonkey as a Firefox extension tool.
  11. HTML Validator – add HTML validation to your browser.
  12. IE Tab (Windows only) – open Firefox tabs using IE’s rendering engine. See also the popular IE View alternative.
  13. LocationBar2 – adds additional features to Firefox’s address bar.
  14. Lorem Ipsum content generator – Generate “Lorem Ipsum” dummy text, for when you need to fill a page with content for testing purposes.
  15. MeasureIt – draw out a ruler to get the pixel width and height of any element on the web page.
  16. NagiosChecker – see the status of your services and servers in Firefox’s status bar. You do monitor your servers, right? ;-)
  17. PrefBar – power user toolbar for Firefox.
  18. Regular Expressions Tester – testing tool for regular expressions with colour highlighting.
  19. RefSpoof – easy spoofing of the HTTP referrer header.
  20. ReloadEvery – reloads a web page every so many seconds.
  21. Save Session – save your current browser windows & tabs for the next time you open Firefox.
  22. Scrapbook – save web pages locally and easily manage collections. (Like OS X web archives, as supported by Together, DevonThink, and so on, but cross-platform).
  23. Selenium IDE – record, edit and debug tests for Selenium, the automated UI testing tool for web developers. See also PHPUnit’s support for Selenium. You do have reproducible testing for you web apps, right? ;-)
  24. Stylish – fix ugly sites, customise the look of your browser or mail client by using your own CSS files. Stylish is to CSS what Greasemonkey is to Javascript.
  25. Tab Mix Plus – tab management on steroids.
  26. Tamper Data – view and modify HTTP/HTTPS headers and POST parameters.
  27. TimestampDecode – treats the selected number as a timestamp and displays a decoded date/time.
  28. TitlebarTweaks – tweak Firefox’s titlebar text.
  29. User Agent Switcher – Adds a menu and a toolbar button to switch the user agent of the browser.
  30. Venkman – Javascript debugger for Firefox.

Stu’s Recommends

To round off the list, here are a few extensions that I find useful, but which weren’t recommended. If you haven’t heard of these before, give them a try.

  1. Flagfox – display a country flag in the status bar for the location of the current website’s server.
  2. Server Switcher – easily switch between development and production servers.
  3. Show MyIP – display your current external IP address.
  4. SQLite Manager – Manage any SQLIte database on your computer.

Are you a web developer? Got a favourite Firefox extension that isn’t on this list? Let us know in the comments below.

23 comments »
Page 1 of 212

This Month

July 2014
S M T W T F S
« Jan    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Recent Comments