2,129 reputation
1921
bio website gordiansolution.co.uk
location United Kingdom
age
visits member for 3 years, 11 months
seen 4 hours ago

I'm a professional PHP programmer with almost a decade of professional experience and considerably more as a hobbyist programmer. I've also had some exposure to Java, Object Pascal and am interested in learning objective C

I've started work on a PHP framework, though it's still at a very early stage and not yet really useful. The current source is available on GitHub.

I've also begun development of a CSS3 elastic grid for use on my own projects and had published that on GitHub as well.


2d
answered Lesser of two evils regarding return types
2d
asked Lesser of two evils regarding return types
Apr
27
comment Why were frames deprecated in HTML5, but not iFrames?
Because frames were a terrible idea from the start but iframes do have a few legitimate use cases?
Mar
18
comment What's so bad about creative coding?
Act in haste, repent at your leisure. I deal with some codebases that are full of things that seemed like a good idea at the time to some developer. Had they taken a few hours to think about what they were going to do they could have avoided a lot of pain for me!
Mar
18
comment How can QA staff test caching logic that they can't see?
Well generally a cache is meant to speed up an operation by storing results in memory that would otherwise come from another source (db, remote server, computationally expensive method, etc). Therefore measuring the time things are supposed to take when hitting the cache seems like the simplest way. Also check for stale cache problems (updates to the actual data not appearing because the previous version is still cached)
Jan
8
comment Will a profound knowledge of C++ help you in learning other languages faster/easier?
depends on how like C++ the other languages are. The more they deviate the less helpful it will be.
Jan
8
answered How does a developer code in anticipation of change?
Jan
8
comment Best practice for using namespaces in my PHP libraries
In Java the common practice is to start with a vendor name as your topmost package (or a URL in reverse such as com.apple). You can then create anything you like inside that package without having to worry about it colliding with other similar generic names in other packages. You can do the same thing in PHP namespaces (and I'm pretty sure that it's starting to become standard practice to do so, \com\apple in the above example)
Jan
8
comment Why does PHP allow sending mail from any address
Because the specifications for email as a whole allow it. There's no authentication in email addresses.
Nov
27
comment Determining a class structure
I haven't had time to look at this in a while but to be brief a ProductBundle is basically a collection of products that are to be treated as a single unit addressed by a distinct SKU. Its price is the sum of all the prices of its bundled products, its weight is the sum of those products, its stock is equivalent to the stock of the bundled product with the least stock, etc. This is a bit different from a component because while a component can be purchased separately, a component is implicitly already assembled into its product, which is a single unit.
Nov
3
awarded  Great Answer
Oct
28
comment Determining a class structure
The adaptor idea sounds interesting, but I'm not sure it's right as weight would be part of the business logic rather than just a presentation thing. For example the total shipping weight could determine how much delivery is going to cost.
Oct
28
awarded  Curious
Oct
27
comment Determining a class structure
I'm glad you mentioned Magento and that EAV tables can be a pain to work with. :) That's the kind of design I'm trying to avoid if at all possible (assuming that this project sits purely on an SQL database and not entirely or partially on another storage mechanism, a decision I've not made yet). It's not just a matter of storing inapplicable data though, it's also a case of what constitutes a "clean" design, and putting stuff in the superclass because some subclasses might need it feels like a very wrong approach.
Oct
27
asked Determining a class structure
Sep
24
awarded  Autobiographer
Sep
21
comment Is my work on a developer test being taken advantage of?
You're being taken for a ride. Even if they do offer a job I doubt it's going to be one you really want. Drop them and make it very clear why.
Sep
11
awarded  Necromancer
Jun
23
awarded  Yearling
Jun
23
comment Do objects maintain identity under all non-cloning conditions in PHP?
@RPM That hasn't been true since PHP 5.0.0. Class instances are always passed by reference (with some caveats, php.net//manual/en/language.oop5.references.php)