I can ofcourse tell you about all the cool features Safari 4 has and why it’s the best browser to use, wether you’re on a Mac or a PC, but you’ll have to find out for yourself. Take a look at what’s new and decide for yourself.
Spicy detail is that Safari is the first browser fully passing all available Acid tests, including the required smooth animation of Acid3. The following video demonstrates the tests:
Today was quite an exciting day for us attendees of Scotch on the Rocks (SotR). One of the key parts of today’s sessions was Object Relational Mapping (ORM) in ColdFusion 9. If you are unfamiliar with what ORM really is (like I was, not so long ago), read about the basic principles on WikiPedia.
Now, to be completely honest, I was quite sceptical about this whole principle. We have experienced a couple of situations where our development server was very slow and saving time by giving ColdFusion more work to do didn’t really sounded like a great option.
After Adam’s last session giving more and more in-depth information about how ORM in CF9 works I got convinced that this technique is quite powerful. The argument that it gives CF more to do and on the long run, only slows the server down is somewhat tackled by the fact that CF9 introduces some advanced caching techniques, caching stuff from sessions, to query results, to specific parts of code. If carefully used this is said to make requests quite a bit faster – I’m not talking two or three times, but ten, twenty, thirty times, ofcourse depending on how you use it.
A valuable lesson we all learn at some point in our lives, if something sounds too good to be true, it usually is. Thruth is, that’s the only argument I’ve got left against usage of ORM. But as a developer, I love the OOP-nature of the whole idea. Let’s hope this feature is as great and wonderful as I’m affraid to believe it is!
Adobe Labs is introducing a Content-Aware fill method for Photoshop, that lets you remove parts of photographs. The best way to understand it is to see it (it really is amazing!):
Today was a big day for us “Adobe-minded” people: Adobe’s Scotch on the Rocks tour (SotR) made its very first stop in Amsterdam, at the Dutch Adobe division.
One very cool thing pointed out by Adobe ColdFusion Product Manager Adam Lehman during one of the sessions today, was that – believe it or not – you can abort after a cfdump from within the cfdump! Like so:
<!--- Instead of typing this: ---><cfdumpvar="#myVar#"><cfabort><!--- try this: ---><cfdumpvar="#myVar#" abort="true">
To make things even cooler, you don’t even need to include the “equals true” part, the following will render just fine:
<cfdumpvar="#myVar#" abort>
Having written hundreds, if not thousands of lines like the one above, this saves a lot of too-fast-typing, doing a couple of backspaces and correcting your spelling just to do a simple piece of debugging. Does this make life easier or what?
We had a strange problem in ColdFusion recently, using weeknumbers and dates. In ColdFusion, you can use the Week() function to determine what weeknumber the week of any given date has. A very useful function you’d say. However, January 1st 2010 will present a very weird problem.
The international ISO 8601, containing the international standard about date and time, states that the first week of the year with at least four days in it (weeks starting on Monday and ending on Sunday) is called week #1. However, if you try this in ColdFusion, then you’ll find that the weeknumber is going from 53 to 2. There is no week #1 in 2010 according to ColdFusion!
To solve this I wrote the function below, feel free to use it.
<cffunctionname="getWeekNumber" returntype="numeric" output="no"><cfargumentname="ts"type="date"required="true"hint="A Date object of which to determine the weeknumber."><cfsetvar local =structnew()><cfset local.refts =dateadd('d', 1, arguments.ts)><cfset local.weekyear =year(dateadd('d', 2, local.refts))><cfset local.getfirst =createdate(year(arguments.ts), 1, 4)><cfifdayofweek(local.getfirst)neq2><cfloop condition="dayofweek(local.getfirst) neq 2"><cfset local.getfirst =dateadd('d', -1, local.getfirst)></cfloop></cfif><cfset local.daysinbetween =datediff('d', local.getfirst, arguments.ts)><cfset local.weeknumber =fix(local.daysinbetween/7)+1><cfreturn local.weeknumber></cffunction>