G'day:
I released this ("PHP: a survey about date data handling") on Friday, which is a bit of as rubbish day for me to ask for ppl's input as they've generally got better things to think about. Whereas on Monday people might be looking for something to do other than work.
I've got 55 responses, which ain't bad given how anonymous both myself and this blog is in the PHP world, but I wouldn't mind a few more. So if you've got an opinion on PHP timestamps vs DateTime objects, I'd be keen to hear it. Or if you can fwd it on to other people who are in the PHP world, that'd be cool too.
I'll post the analysis tomorrow. Spoiler: there's not much in it.
Cheers.
--
Adam
Monday, 24 November 2014
Weekend code puzzle: my answer (Python version)
G'day:
This is a companion exercise to my earlier articles:
I'll be using exactly the same logic as in those two, just working within Python's constraints. I freely admit to not knowing Python from a bar of soap - indeed this is the third bit of Python I have ever written - so I would not vouch for this being anything other than a comparison to the other two pieces of code, and not a demonstration of what a Python dev might consider "good code". This is not a Python tutorial.
This is a companion exercise to my earlier articles:
I'll be using exactly the same logic as in those two, just working within Python's constraints. I freely admit to not knowing Python from a bar of soap - indeed this is the third bit of Python I have ever written - so I would not vouch for this being anything other than a comparison to the other two pieces of code, and not a demonstration of what a Python dev might consider "good code". This is not a Python tutorial.
Labels:
Code Examples,
Code Puzzle,
Python
Sunday, 23 November 2014
Weekend code puzzle: Dave's answer (Python)
G'day:
I'm continuing to look at each person's submissions for the code puzzle ("Something for the weekend? A wee code puzzle (in CFML, PHP, anything really...)").
Dave's done a Python version. Like Chris just before him, Dave got his answer in before I varied the rules slightly, so his answer just finds the first longest subseries within the threshold from within the series; it does not check same-lengthed subseries for which has the highest within-threshold total. "Within" three times in a sentence. Sorry about that.
I'm continuing to look at each person's submissions for the code puzzle ("Something for the weekend? A wee code puzzle (in CFML, PHP, anything really...)").
Dave's done a Python version. Like Chris just before him, Dave got his answer in before I varied the rules slightly, so his answer just finds the first longest subseries within the threshold from within the series; it does not check same-lengthed subseries for which has the highest within-threshold total. "Within" three times in a sentence. Sorry about that.
Labels:
Code Examples,
Code Puzzle,
Dave White,
Python
Saturday, 22 November 2014
The Adobe ColdFusion Team are doing a bloody good job at the moment
G'day:
I know I am the first (and loudest, and most repetitive...) to whinge about Adobe's ColdFusion lads (/ladesses), but... fair's fair... there's very bloody little to complain about at the moment.
I know I am the first (and loudest, and most repetitive...) to whinge about Adobe's ColdFusion lads (/ladesses), but... fair's fair... there's very bloody little to complain about at the moment.
My answer to a question on Stack Overflow about DI
G'day:
I'm re-posting this here, hoping to get feedback from the DI doyens like Sean, Brad and Luis. Plus it's an easy article to post whilst I get together my article about Dave's Python code (from the quiz: "Something for the weekend? A wee code quiz (in CFML, PHP, anything really...)").
The question is here: "Dependency injection is only for testing?", and I'll reproduce it here (I'll ask the OP if this is OK, and remove/summarise if not):
I'm re-posting this here, hoping to get feedback from the DI doyens like Sean, Brad and Luis. Plus it's an easy article to post whilst I get together my article about Dave's Python code (from the quiz: "Something for the weekend? A wee code quiz (in CFML, PHP, anything really...)").
The question is here: "Dependency injection is only for testing?", and I'll reproduce it here (I'll ask the OP if this is OK, and remove/summarise if not):
Labels:
StackOverflow,
Theory
Friday, 21 November 2014
PHP: a survey about date data handling
G'day:
I'm just going to regurgitate the intro paragraph to the survey (https://www.surveymonkey.com/r/XV9ZP8W) here:
I'm just going to regurgitate the intro paragraph to the survey (https://www.surveymonkey.com/r/XV9ZP8W) here:
I'm in the process of teaching myself PHP, having come from a CFML background. One topic that came up in conversation yesterday was how to store dates in memory (ie: in a variable). In CFML we'd use a date object. It seems in PHP there are a number of common options: using an integer in the guise of a "Unix timestamp" or using a DateTime object being two options. I'm just wondering what people tend to do here.
Thursday, 20 November 2014
Railo "unexpected" behaviour: opinions solicited
G'day:
This will be one of those really quick ones as I have precisely 19min of lunchtime left to write it.
Ryan Guill found some oddness with Railo yesterday, with code like this:
(his example wasn't in Maori, but hey).
Can you spot what's wrong with it?
This will be one of those really quick ones as I have precisely 19min of lunchtime left to write it.
Ryan Guill found some oddness with Railo yesterday, with code like this:
function tikiOtinga(required string s required numeric i){
writeDump(arguments);
}
(his example wasn't in Maori, but hey).
Can you spot what's wrong with it?
Labels:
Bugs,
CFML,
Railo,
Ryan Guill
Subscribe to:
Posts (Atom)