Please visit my new campsite listing site ukcampingmap.co.uk


I have shot ourselves in the foot

A word of warning for anyone not remotely interested in programming, the rest of this post will be a long, hard, meaningless slog, though not without some comic payoff.

Object oriented programming (OOP) is a major concept to grasp if you want to go places as a programmer. My problem for the last year or so is that I have got to grips with the concept pretty well, but was still no closer to being able to do it.

OOP is a bit like set theory and group theory, which I’m more than familiar with as I studied maths for a good many years, and I could easily come to grips with the 4 basic tenets of OOP, but despite this I was still mystified as to how all these web-pages (in my case, though OOP reigns supreme in any big software project) know what to do with all these classes you’ve set up; how it knows where to find their definitions in particular was the bit that mystified me.

I know have the answer. After posting a question on a forum I discovered it’s not actually part of OOP theory at all, it’s just that programming languages that support OOP tend to have some way of enabling you to very concisely specify where the classes are to be found. The obvious answer I suppose.

Using the new search term “autoinclude” I was able to find a decent how-to tutorial. The tutorial is very well put together, save for some pretty on the cheap editing. Someone at a late stage before its publication must’ve thought it could do with coming across as more personable. A quick find and replace later, and all the “we”‘s have gone, replaced by “I”‘s. Which has left such beautiful turns of phrase as:

I have shot ourselves n the foot

I are using two external constants

I have a million products in my database, and I are not going to tell you about any of them!

No related posts.

Tags: , , , ,

Leave a Reply

Security Code: