Seb Duggan
Member since Dec 11, 2008
- Profile: /members/1345-seb-duggan.htm
- Comments: 28
Recent Blog Comments By Seb Duggan
-
ArraySlice() Has An Exponential Performance Overhead In Lucee CFML 5.3.8.201
Posted on Apr 22, 2022 at 12:03 PM
Nice work! 🔥 One of the most satisfying things in development is optimisation, whether it's code or SQL. It's one of the things I like about Advent of Code: the first half of a task often seems simple, but then you end up having to re-think it when the problem scales up by orders of magnitu... read more »
-
Phill Nacelli's SQL Tip Is Making My CFQuery Upgrades In Adobe ColdFusion 2021 Easy
Posted on Nov 15, 2021 at 2:21 PM
To (maybe) answer my own question, I think in this case there's no difference, as you're specifying NULL in the query. But the null-safe operator would be better if one or both of the values could be null or not...... read more »
-
Phill Nacelli's SQL Tip Is Making My CFQuery Upgrades In Adobe ColdFusion 2021 Easy
Posted on Nov 15, 2021 at 2:17 PM
Not seen that null-safe comparison operator before. Is it any different from saying :id IS NULL ? Because if not, I find that much more readable...... read more »
-
Performing An In-Place Natural Sort On An Alpha-Numeric Array In Lucee CFML 5.3.6.61
Posted on Aug 6, 2020 at 6:21 AM
Hey Ben - I'd suggest that the numbers after a decimal point should not be padded - otherwise 3.003 would be seen as the same as 3.3, and 3.11 would be seen as greater than 3.9...... read more »
-
Behavior Change Of AutoComplete = "Username" In Recent Chrome Update
Posted on Apr 8, 2020 at 7:12 AM
Hey Ben - are you sure this isn't a choice that Chrome is making based on type="email" ? What did your "default" example use? I'd guess that this might be more likely if they've changed how email addresses are suggested...... read more »
-
Very Strange Script-Based Behavior For CFParam In ColdFusion
Posted on Nov 1, 2013 at 8:42 AM
@Adam, Agreed, it shouldn't be necessary. Would be interesting to see if it resolves the odd behaviour though...... read more »
-
Very Strange Script-Based Behavior For CFParam In ColdFusion
Posted on Nov 1, 2013 at 4:51 AM
Shouldn't you really be referring to arguments.rc in the methods, rather than just rc? What happens if you do that?... read more »
-
JsonSerializer.cfc - A Data Serialization Utility For ColdFusion
Posted on Aug 8, 2013 at 4:51 AM
@Ben - great stuff. It's a very different approach to serialisation, but I can see its benefits! Neater than my current method of deep-looping through a data structure and forcing all the variable names to lower case before serialising... One question: arrays. If I have an array: MYLUCKYNUMBERS = ... read more »
-
Branching Logic vs. Guard Logic When It Comes To Function Control Flow
Posted on May 17, 2011 at 10:00 AM
As usual, Ben, some food for thought! I must confess that I have used both in the past without actually drawing a mental distinction between them. But I do like the concept of the guard-logic, which apart from anything else can do away with many nested if/else statements. Although if you have that... read more »
-
Using GMail's Plus-Style Addressing To Track Bounce Back Email Meta Data
Posted on Apr 16, 2010 at 10:32 AM
Besides, I'd be very surprised if foobar@yahoo.com doesn't actually exist!... read more »
-
Using GMail's Plus-Style Addressing To Track Bounce Back Email Meta Data
Posted on Apr 16, 2010 at 10:25 AM
Yeah, Postmark aren't kidding when they say: "You should not have to worry about this stuff, it's an entire industry on its own"... read more »
-
Converting An IP Address To An Integer Using MySQL (Thanks Julian Halliwell)
Posted on Jan 30, 2010 at 6:33 AM
Here are two MS SQL functions to do the conversions: (hope the pre tags work in these comments...) <pre> ALTER FUNCTION [dbo].[ip2number] ( @ip varchar(15) ) RETURNS bigint AS BEGIN DECLARE @numrep bigint DECLARE @start int, @end int, @exp int SET @exp = 3 SET @start = 1 SET @numrep... read more »
-
Converting An IP Address To An Integer Using MySQL (Thanks Julian Halliwell)
Posted on Jan 29, 2010 at 9:49 AM
I've come across this IP address conversion recently in the free GeoIP database. Makes it easy to convert your IP into a number, and find which range of IPs it lies in using BETWEEN. Of course, I'm using MSSQL, so had to write my own function (actually, a stored procedure) to do the conversion.... read more »
-
Using CAPTCHA In ColdFusion 8
Posted on Jan 15, 2008 at 4:52 AM
I've been using CAPTCHAs generated by cfimage recently, and came across a problem, which I've detailed on my blog (I've finally got round to setting one up!): http://sebduggan.com/posts/cfimage-generating-unreadable-captchas Basically, cfimage CAPTCHAs are PNGs with alpha transparency on their b... read more »
-
Exercise List: Designing The Database Schema
Posted on Oct 22, 2007 at 7:52 AM
I second Zac's comment; I've also recently started prefixing foreign key fields with "frn_" - for example, if referring to joint_id from another table, I would name the column frn_joint_id. Just makes it clearer you're referring to another table...... read more »
-
Nylon Technology Presentation - Some Of The Forgotten Functions
Posted on Jun 15, 2007 at 8:27 PM
The really useful one I'd forgotten about until recently is ValueList(). Saves all that unnecessary query looping!!... read more »
-
Learning ColdFusion 8: CFImage Part I - Reading And Writing Images
Posted on Jun 12, 2007 at 12:31 PM
Don't know much about it myself - just what I deduced from poking and prodding!... read more »
-
Learning ColdFusion 8: CFImage Part I - Reading And Writing Images
Posted on Jun 12, 2007 at 11:19 AM
Yes, you can call the images directly from the URL, but not if you stop the CF application service...... read more »
-
Learning ColdFusion 8: CFImage Part I - Reading And Writing Images
Posted on Jun 12, 2007 at 11:02 AM
A couple of notes on the generated images and CFFileServlet... The images are created in <cf8root>/tmpCache/CFFileServlet/ - and then either in _cf_image/ or _cf_captcha/ (when you get on to your CAPTCHA tutorial!). Images are cleared out of the temp directory 5 minutes after they are create... read more »
-
Lenny And Bo, ColdFusion Programmers (Vol. 3)
Posted on Mar 30, 2007 at 12:51 PM
Hmmm... not sure what it is, but there's something a bit similar between all three cartoons so far... ;-)... read more »