2336025560_c66cf58f0b_b
Image

Scrum unsucked

[Photo credit: darkmatter]

I’d never really read much into Scrum beyond that it was split into sprints. But reading it closer recently it just seems like a horrible corruption of an inspirational idea, that could much more easily be integrated into normal project practices.

Agile

I love the agile principles. I’m repeating them here for my own benefit, I like a good list as much as the next.

  1. Customer satisfaction by rapid delivery of useful software
  2. Welcome changing requirements, even late in development
  3. Working software is delivered frequently (weeks rather than months)
  4. Working software is the principal measure of progress
  5. Sustainable development, able to maintain a constant pace
  6. Close, daily cooperation between business people and developers
  7. Face-to-face conversation is the best form of communication (co-location)
  8. Projects are built around motivated individuals, who should be trusted
  9. Continuous attention to technical excellence and good design
  10. Simplicity—the art of maximizing the amount of work not done—is essential
  11. Self-organizing teams
  12. Regular adaptation to changing circumstances

Each principle makes sense, even if, perhaps, it isn’t attainable.

Their manifesto is harder to figure out, but still has a great aspirational feel to it.

We value this Over this
Individuals and interactions Processes and tools
Working software Comprehensive documentation
Customer collaboration Contract negotiation
Responding to change Following a plan

However importantly note that the second column is still valued, but just not as much as the first.

Scrum

Now read the Scrum Guide™ (TM!). Scrum just seems like a conversion of agile concepts into sucky word project management.

I realised I’d already got it wrong with what a sprint was – I thought it was two weeks work. They suggest that it should be a month’s worth of work – which makes sense, but why not just call it a month’s worth of work – or if it’s going to be less just call it an increment.

Anyway I read through the Scrum Guide and here’s my unsucked version of their main concepts.

Scrum Guide™ Unsucked agile guidelines™
The Scrum Team The whole team
The Product Owner The business / customer
The Development Team The developers
The Scrum Master The Project Manager
The Sprint Month / Increment / Project – Sprint isn’t actually that bad a word
Sprint Planning Planning
Daily Scrum Talk / meeting
Sprint Review Month / Increment end / Project update
Sprint Retrospective Month / Increment end / Project review
Scrum Artifacts Documents
Product Backlog Issues
Sprint Backlog Month / Increment / Project issues
Increment Completed issues
Artifact Transparency Bullshit elimination
Definition of “Done” Happy Business / Customer

Can I have a word…

Scrum style

“Shall we go over the Sprint Review later? I’m not convinced that the Product Backlog contains all that we require for the definition of done. The Daily Scrum this morning wasn’t great as the Scrum Master had to get the Development Team to better explain their progress to The Product Owner. We need to make the Sprint Backlog artifact more transparent as The Product Owner feels we haven’t followed what we agreed at the last Sprint Retrospective.”

vs sane

“Shall we go over the month end update later? I’m not convinced that the issues contain all that we require for the customer to be happy. The talk this morning wasn’t great as the Project Manager had to get the developers to better explain their progress to the business. We need to eliminate the bullshit from this month’s issues document as the business feels we haven’t followed what we agreed at the last month end review.”

Please let the first type of conversation cease.

New Relic monitoring for Server, Virtual Host PHP and WordPress

New Relic offers completely free server monitoring (CPU, RAM, Network I/O etc) and limited (24 hour retention) PHP application performance monitoring (detailed error logs, PHP vs MySQL load times etc). Its far better than monitoring tools I’ve seen and very useful for trying to figure out any problems with WordPress which can be quite heavy in different areas CPU vs RAM vs Database.

Server monitoring

New Relic have excellent docs on the server installation, but this is a summary of the commands, N.B. the YOUR_LICENCE_KEY needs to be changed:

sudo sh -c 'echo deb http://apt.newrelic.com/debian/ newrelic non-free > /etc/apt/sources.list.d/newrelic.list'
wget -O- https://download.newrelic.com/548C16BF.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install newrelic-sysmond
nrsysmond-config --set license_key=YOUR_LICENCE_KEY
/etc/init.d/newrelic-sysmond start

PHP monitoring

There’s again useful New Relic installation notes:

sudo sh -c 'echo deb http://apt.newrelic.com/debian/ newrelic non-free > /etc/apt/sources.list.d/newrelic.list'
wget -O- https://download.newrelic.com/548C16BF.gpg | sudo apt-key add -
sudo apt-get update

This is all repeated from the Server section, so the only actual line required is:

sudo apt-get install newrelic-php5

This asks you to give an Application Name – the best format to use is [vhost domain];[server domain] where the server domain is used as a kind of parent filter for all vhost domains.

PHP vhosts applications

This doesn’t quite work for Plesk installations as we want a per-directory application performance indicator. This assumes that we’re using the Apache php mod rather than FastCGI as we’re putting PHP ini settings in apache config files.

Plesk

This guide (http://blogs.reliablepenguin.com/2015/02/11/plesk-new-relic) was the perfect starting point. The application names they suggest are really useful e.g.

[vhost domain];[server domain]

Changing the application name

If you make a mistake with the application name you can change it. Just follow this document (https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/renaming-applications).

Apache Virtual Hosts

I have a manual setup on a dev server – so I needed to modify the /etc/php5/conf.d/newrelic.ini file to comment out the appname.

I could then add the variables into the /etc/apache2/sites-available/* apache config files with

php_value newrelic.appname "vhost.example.com;server.example.com"

WordPress W3 Total Cache

W3 Total Cache offers a basic integration with New Relic through its API.

There’s a couple of links for this:

W3 Total Cache assumes that you’ve setup the PHP application. What is non-obvious is that you need an API key and not your licence key. Via a WordPress SE answer, you can then enable API access (Select (account name) > Account settings > Integrations > Data sharing > API access) and use the generated API key in WordPress Admin > W3 Total Cache > General Settings > Monitoring section (wp-admin/admin.php?page=w3tc_general#monitoring).

SAMSUNG
Image

Second hand bicycles

In response to a blog post ‘Why I keep fixing my bike‘ about the risks of buying a dodgy second hand bike, I wrote the following comment. It’s something I’m quite passionate about so worth storing on my own blog…

I have bought at least 7 bikes second hand through either ebay or gumtree all without problem. Every bike has been exactly what I was looking for. I wouldn’t buy off an ebay seller with only a small repuatation – and almost all sellers I have seen when searching ebay have 100+ reputation.

I think the chances of getting a lemon are quite small, but you always have to be careful.

With a bicycle you are predominantly paying for a decent frame as the rest can be replaced. Its fairly unlikely that the frame will have been damaged. So buy bikes that have well made frames e.g. Cannondale. I’ve purchased a Specialized, Cannondale, Merkx, Orange, Klein and Marin bikes. Most of the bikes I bought would have had a new value in excess of $1000. I’d be most wary of buying a Specialized bike as they are the most common and the current Specialized bikes I’ve seen have very poor welding on the frames.

Certainly don’t go buying cheap branded bikes new bikes e.g. and shop’s own brand. If you’ve got very little money you can pick up old retro racing bikes for less than $100.

Limit your search to only bikes that are near buy (i.e. 30 minute drive) so that you don’t waste much time.

There are many things you can look for:

  1. Has the bike been stored inside – if you see a photo of it hanging up in a garage on its own rack its a pretty good bet that it has
  2. Buy ‘fixed’ bikes without suspension as the suspension can be expensive to replace
  3. Look at the type of gears that it has
  4. Check how detailed the spec of the bike is – does the person list exactly all the components – this gives an indication of how much the person cares about the bike
  5. Do they state where they bought it from
  6. Do they display high quality images of close ups of the gears, the joins of the frame where cracks appear
  7. What have they been using the bike for
  8. How often do they clean the bike
  9. Ask what year the bike is from as well as the exact make and model – then hopefully you can find a reference to how much the bike was when it was new.
  10. Check the welding on the bike frame – how clean are the welds. You shouldn’t be able to see the welds – as that means it was a cheaply made bike by machines and never finished off.
2015-05-13 23_43_44-Make me a sandwich
Image

Dos command history

One of the nice things of Linux is the command history – it stores typically the last 1000 commands or so and its saved every time you log out.

DOS does have this through the doskey /history command and you can relatively easily append this to a file:

doskey /history >> %USERPROFILE%\history.txt%

The tricky bit is having this done for you on log out.

Via a Stack Overflow question on bash_history you can get close, using doskey macros which appends to a file on exit.

This only works for the current session though so you need to create a shortcut that runs the command each time with the following Target:
(my apologies if this is missing backslashes, WordPress keeps deleting them!)

%windir%\system32\cmd.exe /K doskey exit=doskey/history$g$g%USERPROFILE%\history.log$texit $1 $2

Then you just have to remember to type exit each time…

Shortcut target

Shortcut target

Update

I also found three useful commands – but they’re only for your current session. Hat tip to Nifty Computer Tricks:

F3
get last command
F7
current list (use left/right arrow keys to paste to the command line)
F8
auto-complete (type the first few letters)

Update 2 – Some extra love for the DOS prompt…

If you’ve got this working then I’ve added some extra basics. First you need to install Gow (and I suggest you do it using the Chocolatey package).

Then download my bang.bat / history.bat gist, extract it completely and put the bang.bat and history.bat into the Gow bin directory e.g. C:\Program Files (x86)\Gow\bin. These assume you are saving the history to %USERPROFILE%\history.log.

Then you’ll be able to do commands like history | grep mysql to list all your mysql commands in history.log with their line numbers. Then call bang 123 to execute the specific line of the history.log file.

OpenVPN connects to VPN but no internet

For those stumbling down a similar path…

tldr; Check that your Windows Firewall is turned off.

My setup

  • OS: Windows 8.1 64-bit laptop
  • OpenVPN: OpenVPN 2.3.4 x86_64-w64-mingw32

My OpenVPN has been working for at least 4 months without problem.

First thing to remind yourself is: When you get the VPN working – copy the OpenVPN log of a successful connection and the ipconfig /all to file so that you know what to compare when it breaks next time.

Notes

  • The VPN connection stopped working yesterday 17/10/2014
  • Not exactly sure when
  • It had been working at my office
  • My Windows 7 desktop has a working VPN setup so I can compare the settings
  • The OpenVPN gui suggests a connection has been made but no sites can be pinged (see commands below)
  • All attempts at inconfig /renew, ipconfig /flushdns nothing worked
  • Only differences between Desktop/Laptop I could find in ipconfig /all and OpenVPN logs was that laptop had IPv6 for the WiFi connection turned off and the following extra fail message UDPv4: No Route to Host in the log
  • I tried turning IPv6 back on but that didn’t change anything
  • Now the UDPv4 message disappeared – but didn’t reappear when I turned off IPv6 again – so that was a red herring
  • Possible suggestion from my history when first setting up my VPN (http://www.rickygao.com/troubleshooting-general-failure-in-ping-or-tracert/) was to turn off IPv6 which is what I’d probably done before – but IPv6 is no problem on my Windows 7 desktop
  • Pinging even a specific IP address does not work – this confirms its not a DNS issue
  • Pinging localhost 127.0.0.1 does work
  • Pinging the IP Address of the connected VPN does work
C:\Users\Ian>tracert google.com
Unable to resolve target system name google.com.

C:\Users\Ian>ping google.com
Ping request could not find host google.com. Please check the name and try again.

Solution

Eventually found a solution that was to turn off the windows firewall, which came from this unbuntu forums post which eventually spotted that it was an iptables firewall issue.

Post mortem

  • I thought I’d turned off my firewall and it doesn’t explain why the VPN stopped working
  • Best guess is a Windows update changed something in the firewall the caused the problem
  • The only Windows updates I received on 17/10/2014 were
  • A failed update for Windows Malicious Software Removal Tool for Windows 8, 8.1 and Windows Server 2012, 2012 R2 x64 Edition - October 2014 (KB890830) – this was successfully installed the next day but didn’t help
  • A successful Definition Update for Windows Defender - KB2267602 (Definition 1.185.3528.0)

Google Docs to Markdown to WordPress

I’ve started a fairly standard process of writing a Google Doc when I’m trying to learn something technical that I don’t understand and then if its half useful posting it to WordPress.

I know I could then copy paste the code from there to WordPress – but I’m a fan of writing WordPress posts in Markdown. For one reason, I need to switch all the titles to be one level lower in WordPress than Google Docs and its simpler to do that in Markdown. Also and code I put into Courier font in Google docs gets converted to code in Markdown, but gets lost when copying and pasting.

So I’ve found that there’s a script to export Google Docs. There is an annoying issue in that you have to re-do the steps everytime you want to export a document to Markdown. To get around this, I suggest that you just have one document that you use for converting to Markdown and copy/paste each Google Doc into that. Upon running the script from the Script Editor you get emailed a markdown version of your document.

2014-10-04 19_40_06-ConvertToMarkdown

Then copy & paste the markdown syntax into WordPress.

Windows Netbeans Composer notes

This is for installing the main packages that Netbeans suggests in the Tools > Options > PHP (tab)

I’m running the following setup currently [21st April 2015]:

  • Windows 8.1 (64-bit)
  • Netbeans 8.0.2
  • The version of Composer doesn’t really matter
  • PHP 5.3.28 (It’s sooo last decade, I know…)

tldr;

Just the commands:

composer global require "phpunit/phpunit=4.6.*"
composer global require "phpunit/phpunit-skeleton-generator=*"
composer global require "squizlabs/php_codesniffer=*"
composer global require "phpmd/phpmd=@stable"
composer global require apigen/apigen:~2.8

Then the files to call are in C:\Users\[username]\AppData\Roaming\Composer\vendor\bin\

Global packages

running composer global installs the packages into %APPDATA%\Composer (or ~/.composer/ in Linux)

PHPUnit

From the installation instructions (https://phpunit.de/manual/current/en/installation.html) do:

composer global require "phpunit/phpunit=4.6.*"

This installs PHPUnit to C:\Users\[username]\AppData\Roaming\Composer\vendor\phpunit and puts the binary to use in Netbeans in C:\Users\[username]\AppData\Roaming\Composer\vendor\bin\phpunit.bat

Then put C:\Users\[username]\AppData\Roaming\Composer\vendor\bin\phpunit.bat into Netbeans Tools > Options > PHP (tab) > Frameworks & Tools (tab) > PHPUnit section.

Skeleton Generator

From the installation instructions (https://github.com/sebastianbergmann/phpunit-skeleton-generator) run:

composer global require "phpunit/phpunit-skeleton-generator=*"

Then put C:\Users\[username]\AppData\Roaming\Composer\vendor\bin\phpunit-skelgen.bat into Netbeans Tools > Options > PHP (tab) > Frameworks & Tools (tab) > PHPUnit section.

PHP_CodeSniffer

composer global require "squizlabs/php_codesniffer=*"

Then put C:\Users\[username]\AppData\Roaming\Composer\vendor\bin\phpcs.bat into Netbeans Tools > Options > PHP (tab) > Code Analysis (tab) > Code Sniffer section.

Mess Detector

composer global require "phpmd/phpmd=@stable"

Then put C:\Users\[username]\AppData\Roaming\Composer\vendor\bin\phpmd.bat into Netbeans Tools > Options > PHP (tab) > Code Analysis (tab) > Mess Detector section.

apigen

composer global require apigen/apigen:~2.8

For me this failed see apigen issue #316. The answer to that was to use ~4.0, but that requires PHP >= 5.4

Then put C:\Users\[username]\AppData\Roaming\Composer\vendor\bin\apigen.bat into Netbeans Tools > Options > PHP (tab) > Code Analysis (tab) > ApiGen section.