At the beginning of the sprint, the testers have nothing to do. At the end of the sprint, the devs have nothing to do.
Monday, 21 December 2020
The Agile Testing Paradox - reconciling manual testing with agile methodology
At the beginning of the sprint, the testers have nothing to do. At the end of the sprint, the devs have nothing to do.
Friday, 18 December 2020
Error Patterns - mistakes so common they become a pattern
What's wrong with this pseudo code?
"We need to get all entries for a given date, or today if the date isn't specified"
@controller
EntriesDto getEntries(Date searchDate=Date.now()){}
I made this mistake a couple of times before it properly sank in, and I just ran into it again. If you're still looking at it thinking "nope, can't see a problem", it's the assumption that the consumer and the api are in the same locale. This will work a lot of the time, but around midnight on certain days in certain months the result could be a day earlier than you expect, as daylight saving switches over.
Another daylight saving error I've run into more than once is:
"if we consistently use UTC we don't need to worry about daylight saving".
It's better, but you still do need to think about it. Because although you might be using UTC consistently you can be certain your end user isn't. Somewhere around there will have to be some conversion. I usually try to do that conversion at the view, because obviously, but where you're using some variant of Date.now() in end user client side code (e.g. browser) you're going to run into problems, because the client machine will have a locale setting convenient for the user.
I couldn't see that this class of error has a name, so I'm referring to them as 'Error Patterns', code errors that happen repeatedly in a consistent way.
Saturday, 13 May 2017
Getting into the software development business
Hardly a month goes by when I don't get asked "( I | a friend | a colleague ) wants to move into software development from (some totally unrelated field), how should ( I | they ) go about it?". This post aims to consolidate my answers to that question.
Everything that follows is my own opinion. But bear in mind, I (and other devs like me) am the one who decides whether you get an interview or not based on your training & experience.
First of all, be realistic. Yes, there are jobs out there paying big money for good developers. They require experience - lots of experience. You really aren't going to get a 50k GBP job (2017 Northern England rates) based on no experience and a boot camp course.
Speaking of boot camps, there are lots of companies out there doing introductory software development courses of very varied cost and quality. I saw one charging 6k for a syllabus that made no sense to me, and another at half that price that was much more coherent. RESIST THE SALESPEOPLE! Make an informed decision - I'm guessing if you want to get into dev then you're maybe in a lower paid job, so you can't afford to throw money away.
Here's my list of most important pointers:
1. If you regard learning new things as a chore, forget it altogether. You cannot function as a developer without learning new things all the time. If you don't enjoy that, you will hate it.
2. Experience is everything, and you don't have any. So get some: write websites for yourself, friends, clubs, local charities. Look at getting involved in open source projects, maybe do some documentation for them if your coding isn't good enough to contribute code.
3. Don't try and learn everything at once, pick a coherent direction and follow it. I've seen courses promising to teach 'full stack'. IMO learning to be a full stack developer takes time and experience.
Coherent directions might be:
- Java
- Javascript, Node.js, Catalyst
- PHP
- Python
- C# and Visual Studio
- some other language and context
4. If you're going to shell out a load of cash on a training course, choose carefully. Ask for advice, assess whether the syllabus looks coherent or will just give you a smattering of widely different topics.
5. There is a lot more to it than just being able to write code. Any jobbing developer has a working knowledge of the following
- Libraries and frameworks (jQuery, Catalyst, Spring, Hibernate etc etc etc, depends on what they're working on and in what language)
- Unit testing (and writing code that's easy to test)
- Agile methodologies (e.g. scrum
- Algorithms
- Continuous integration and build tools (Jenkins, maven, teamcity..)
If you can talk sensibly about these things in an interview, I'm going to take you more seriously whether you have commercial experience or not. You can get experience of them by downloading and experimenting with open source code.
6. LEARN AN IDE! It doesn't matter much which one, choose whatever is in widespread use for your language/platform. The important thing is to learn about:
- the debugger - most languages have one, they allow you to pause the code and see what's happening in real time. You won't realise how important that is until you've done it.
- code completion - the IDE will give you hints about what to type next, this can save you a lot of time
- code navigation - moving around a complex project with hundreds of source files is painfully slow without an IDE, and instantaneous with.
- build tools - the IDE normally has build and run tools built in, this will save you time and also help you to learn the build tools.
OK, so all that was probably a bit intense and daunting. Here's the lighter side: I've been working in the computer industry now for about 25 years, 15 as a developer. I'm learning new things every day, and having an enormous amount of fun at it. A lot of software development is about financial systems, or ecommerce sites, but software permeates every aspect of life. I've been lucky enough to work in ethically valuable fields for many years, but even before that I contributed to open source projects, including software to make the lives of severely disabled people easier. Writing code can be great fun, and it can be a worthwhile thing to do.
Good luck :)
Friday, 1 July 2016
Key programming books
Pragmatic Programmer
The Mythical Man Month
Perl Testing, a developers notebook
UML in 24 hours
The Design of Everyday Things
I'll blog details of each one later, in particular 'The Design of Everyday Things' which isn't an obvious 'programming' related book.
Monday, 13 June 2016
Dangerous design flaw in wordpress
Add to this the fact that as previously complained about, the whole thing is stored in the database, so you are logging into a dev machine with the same user account as live, and the potential for catastrophe is huge.
Monday, 6 June 2016
fun with recursive chown and dotfiles
rm -rf .*
chown -R codehare:codehare .*
This has a very unexpected effect. A very bad, very unexpected effect. It chowns everything that matches .* (i.e. hidden directories) in the current directory, then it starts in the parent directory and recurses through all subdirectories of that.
This is not good news. Especially if you do it as root/sudo. Especially if you do it in a home directory. Especially if you use key based authentication.Well that was a fun start to the week...
Tuesday, 10 May 2016
Wordpress - yet more 'everything done in live' horror.
It turns out that all URLs are absolute, and written into the database. Tools apparently exist to traverse the database changing all these entries.
This really is appallingly noddy and unprofessional. It's no wonder web development as a discipline has such a dreadful reputation.



