Useful links for C programmers
Recently I’ve re-learning C, partly for fun but also in case I ever need it for work – at my current job or a later one. In the process I’ve come across some articles which may be of use to others who are already programmers but not C experts.
- CERT article on why your compiler might optimise away security functions
- Stackoverflow thread about whether using SecureZeroMemory() makes your program more secure
- Setting pointers to NULL after call to free() – Stackoverflow thread on avoiding dangling pointers
- Open source development using C99
- Visual Studio 2010 doesn’t support variable length arrays (and other parts of C99)
- Top 10 Ways to get screwed by the C programming language
- What is C For?
- Writing Insecure C, Part 1
- Writing Insecure C, Part 2
- Writing Insecure C, Part 3
- Linus Torvalds on Why C++ is a horrible language and C is the only sane choice (not sure I agree with everything he said, but it’s an interesting thread)
- A response to Linus Torvalds on C++
Feel free to leave a comment if I’ve missed off any particularly useful links.
Update: Jon has suggested www.python.org…
posted by Paul at 12:14pm on Sunday 16th October 2011 | Comments Off
Potential new home
After a few weeks of house hunting, I have found a property I like enough to put in an offer (which has been accepted by the vendor). It’s near to my parents and grandparents, on a reasonably quiet road and with elderly neighbours who keep their gardens in top shape and are unlikely to have late night parties. It needs a new boiler and a rewire, but there are no other major jobs which need doing before I move in.
I’m hoping to be in by Christmas, although that depends on everyone involved moving at a reasonable pace. I’ve also moved house often enough to know that nothing is certain until you actually have the keys in your hand (even after exchange of contracts, someone can still pull out), so I’m still keeping an eye on other properties should this sale fall through.
posted by Paul at 4:28pm on Monday 29th August 2011 | Comments Off
Back in Bury
As some people will already know, I’ve now moved back to my parents’ house in Bury. Partly this is because my flat was too small to live and work in, but also because I’ve decided that I’d prefer to buy a three bedroom semi on a nice estate in Bury than fork out for a one or two bedroom flat in Didsbury for the same price. I know how stressful moving is, so I’d rather jump straight into a house than buy a flat and then have to sell it a few years down the line when I’ve outgrown the space.
In terms of house hunting, it’s been a mixed bag so far. I saw one property which had a lot of potential on a good estate for a reasonable price with no chain, but unfortunately someone else got in with an offer before I could go back for a second viewing. Another property was far too small and a third had been taken off the market because the owners decided to rent it out instead of selling (they had already signed a tenancy agreement, so it won’t come back on for at least six months). On the positive side, there’s a good sized dormer bungalow with room for extension within my price range, and I have five other properties to see today which look promising from the initial descriptions.
posted by Paul at 11:48am on Saturday 20th August 2011 | Comments Off
Property hunting
For the past six months or so I’ve been seriously looking for a place to buy. Although there are no major problems with where I live now—the rent is reasonable and my landlord doesn’t give me any trouble—I’m starting to outgrow the space, especially as I work from home. There’s also the financial implications, if I bought a flat roughly the size as the one I’m in now, my monthly mortgage (repayments, not interest-only) would only be a bit higher than my current rent, and probably lower than the market rate.
So far my success has been mixed. I’ve more or less given up on buying a house in Didsbury, as the prices are outside what the banks will lend me, even if I can comfortably afford the repayments. I’ve looked at a few flats, one of which was a grotty student place with damp throughout, one was in reasonable condition but in a huge block mostly inhabited by students, and the other was similar to what I’m currently renting—albeit in Fallowfield. I’m considering putting in an offer on that one, although I need to scout round a couple of other areas which contain houses but might not meet my ‘desirable neighbourhood’ criteria.
posted by Paul at 11:47am on Friday 22nd July 2011 | Comments Off
Pub Gateway update
For the last couple of months I’ve been working on Pub Gateway, a guide to pubs within the British Isles. I’d spent too long attempting to create a perfect setup, trying out all the PHP frameworks, as well as Django (Python) and Catalyst (Perl). In the end I figured out it was quicker to put together my own PHP code than learn how any one framework did things—particularly because most of them make it difficult to bring in code from other sources (e.g. if I used symfony I’d also want parts of Zend Framework).
There’s still a lot of features to be added, such as pub ratings, a ‘find pubs near postcode’ feature (mostly done, just need to build the interface), forums and many more. However, the basic functionality of the site (register, suggest pubs, add comments) is done and ready to go.
I also need to find someone to produce a design and logo for the site, as a piece of paid work—please drop me a line if you know someone who is UK based and able to do this.
posted by Paul at 3:58pm on Thursday 21st July 2011 | 2 Comments »
Facebook Puzzles Solutions
I’ve recently been having a go at the Facebook Puzzles as a way of brushing up my skills in languages other than PHP (which I use every day at work). As I go along, I’m putting my solutions on GitHub, along with all the other code I’m releasing, in case anyone is interested.
posted by Paul at 9:25pm on Saturday 16th April 2011 | Comments Off
Release of FormFillFlatten
I’m pleased to announce the release of FormFillFlatten (FFF), a RESTful web service which allows you to submit a PDF with form fields and the values you want those fields to have. FFF will return a PDF with the form fields completed and ‘flattened’ so that they can no longer be edited. It’s a bit rough round the edges and needs some more documentation, but the code works as-is.
I initially wrote FFF as we need this functionality at work, although I had to put it together out of hours so that there were no issues with releasing the software under the AGPL. However, I would like to expand the functionality as a separate project over the next few months so that more of the iText functionality is available as a web service.
Before you ask: no, I couldn’t be bothered thinking of a more imaginative name. ![]()
posted by Paul at 8:56pm on Monday 11th April 2011 | Comments Off
quackjson
As part of my efforts to learn Python, I’ve started a small project called quackjson, which is intended to be a reimplementation of qUAck using the uaJSON interface. As with qUAck, it uses curses for writing output to the terminal, which is not too bad once you get used to things like having to manually call refresh() when you want the screen to update.
Currently the software allows you to login, view folders and individual messages, and supports a simple configuration file using JSON.
The code also includes a UAClient class, which could be inherited and used to implement a different interface, such as uaHTTP (this is on the TODO list).
posted by Paul at 4:16pm on Saturday 12th February 2011 | Comments Off
Charging for freelancing
In the past a number of people have asked me how I charge people for freelancing, both in terms of the amount and how I calculate it. This isn’t a comprehensive list, but should provide a rough guide of how I come up with prices.
Per project: If a project is fairly well-defined and has a short timespan—e.g. creating a simple website—I quote a price for the project. Whilst the price is based on a rough idea of the amount of time I will spend on the project, it has the benefit of letting the client know exactly how much the project will cost—assuming they stick to the specification—and gives me an incentive to finish it as quickly as possible.
Per day: For occasions when someone wants me for a set period of time, either to go through some ideas or get as many tasks done as possible within that time (a day is 9am-5pm, with 30 minutes for lunch). In the past I’ve done a day per week for clients, which has worked out well. I also offer a half day rate (9am-1pm or 1pm-5pm) which is slightly higher than half the daily rate.
Per hour: Generally I don’t bill by the hour, as it’s rare for anyone to ask me to take on a task which is less than half a day’s work, and unless I know the client beforehand the cost of billing (and the risk of not getting paid) makes hourly billing unattractive. However, I do offer the option of paying for a fixed number of hours per month, which I charge for regardless of whether the client provides enough work to fill those hours. The hourly rate is less than what my daily rate works out to, because I’m guaranteed a certain amount of income.
I don’t do as much freelancing as I used to—having a full-time job means I only have evenings and weekends free—but the structure above has served me well for the past eight years.
posted by Paul at 9:57pm on Wednesday 2nd February 2011 | Comments Off
PHP Developer
I’ve recently spun off the PHP part of my portfolio site into PHP Developer (alas, I couldn’t get the .co.uk). It still needs fleshing out a bit in terms of content, and I’m not really promoting it due to my full time job, but already I’ve received a few enquiries through it as a result of the keywords in the domain name.
Unfortunately I’m not the world’s best designer, so the site is still using the default WordPress theme, but I’m hoping to get a custom theme designed for my three freelance sites sometime in 2011.
posted by Paul at 9:38pm on Wednesday 5th January 2011 | Comments Off
