The Dopefly Tech Blog

Join Nathan Strutz as he shoots the breeze on techie geeky web dev stuff.

July
  12345
6789101112
13141516171819
20212223242526
2728293031  

Pagination.cfc - a glowing review

posted under category: Browsers on April 10, 2008 at 11:55 pm by MrNate

Rick Faircloth, a long time CF-Talk member was introduced to my project, Pagination.cfc earlier today. He was looking for an easy way to upgrade his own pagination, more than just previous/next links.

The HouseOfFusion's CF-Talk list is great. Any answer you need, 15 minutes or less.

Rick got 2 links to my project, thanked the referrers, and three hours later had this to say:

Just wanted to let you know that I implemented your component and it went perfectly...and that was the first cfc I've ever used!

I haven't gone beyond the default settings, except for number of records per page, but I'm sure customizing will go well, too.

Nice clear instructions for the use of the component.

Much appreciated!

(3 comments)

Do you know your your code coverage percent?

posted under category: Browsers on March 19, 2008 at 6:34 pm by MrNate

Here's one that hits me excessively hard. What percentage of my code is covered with unit tests?

The reason I ask is because I know my code coverage percentage is abysmally low, easily in the single digits. It's hard to talk about because I'm a huge offender. However, even after looking in the mirror and viewing the plank in my eye, I know that this is typical in the world of ColdFusion developers. Most of you have never written a formal, automated test case. Ever. I know you. You don't. Admit it.

If you do it, kudos. Get yourself a cookie.

Now, code coverage. It's the measurement of how much of your application is covered by automated tests. I would argue that it is probably impossible to have 100% code coverage with things like environmental variables such as sessions, server operating systems, client browser dot versions and the types of input parameters your application can be given.

Let's take this simple function:

function add(p1, p2) { return p1+p2; }

How many test cases do you need to write to have this code fully covered? Unfortunately, probably a lot. Starting with 0+0, 1+1, 0+1, 1+0, sure, that's easy. What about approaching the upper limits of a java integer? negative numbers? doubles and floats? Will it unbox automatically? What about those pentium and java bugs from years back that would return floating points on simple arithmetic? Maybe that's absurd, but at least we're not using it...

"IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE CONTROLS, INCLUDING [...] THE DESIGN, CONSTRUCTION, MAINTENANCE OR OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL, AND LIFE SUPPORT OR WEAPONS SYSTEMS"
(what not to do, from the Coldfusion End User License Agreement 6.c)

So I think you can get 95% in just a few tests, zeros, small, medium and large sized numbers, as well as non-numbers and assert errors when it should throw errors.

(jump break, almost done)

(more on this subject) (3 comments)

The Dopefly family photos application

posted under category: Browsers on November 14, 2007 at 3:20 am by MrNate

I'd mentioned a couple years ago an application I wrote in .NET that my wife, Alanda, uses to update the photos on our family photos area. So, after much anticipation, I present the dopefly family photo uploader:

Dopefly uploader with Jude's birthday

This is actually version 3, for the record. I polished this one off early this year, and have made only a few tweaks since.

Not too bad, huh? Thanks to Visual Studio 2005's drag & drop interface, it's got all kinds of standard looking gadgets like menus and a status bar - heh, it looks like a real application. :D   It's not all that well architected, it's not as much MVC as I like to do in a web application, but with hardly any actual desktop application programming experience, I think it's not too bad.

Another thing that VS2k5 did that absolutely astounded me was that when I published my app to our media center PC (where we host our photos, it's always on), it created an installer, which Alanda ran from her tablet. It put shortcuts in the start menu and even made an uninstaller. After she did some first round testing and finding a couple bugs, I fixed them and republished - lo and behold, the next time she started the app, it prompted her to install the newest version. It was shocking how easy it was and how well it worked.

One problem that we had when Dopefly's photo management was strictly a web application was that it took forever to upload a 3+ megapixel image, and I had a form where she could do 10 at a time, so she would basically set-it-and-forget-it for half an hour at a time. This is the main reason why I wrote it, to resize the images on the client-side before they go up to the web, and .NET is especially good at this. This process has sped the process up dramatically.

Follow along for a shot of the admin and another one of the uploader tool...

(more on this subject) (3 comments)

Forta in Phoenix - May 2nd

posted under category: Browsers on April 26, 2007 at 12:55 pm by MrNate

If you're anywhere near the Phoenix area, you're going to want to be here for the ColdFusion event of the summer. I sit about 20 feet from the CFUG manager, Alan, so I have a pretty good source of information within yelling distance, and I heard a little talk about the event, and the giveaways we'll be having, including copies of Scorpio and Flex, certification exam passes, Adobe software bundles, expensive tech books, and the usual schwag, t-shirts, pens and so on. Plus I hear Ben's going to give some sort of talk about the future of ColdFusion - not sure about that part :D

If you can make it, register thyself at www.azcfug.org.

You know, I haven't been to an AZCFUG meeting in the last 9 months or so that I haven't won via raffle some kind of thing, be it a USB fan-light or an Adobe t-shirt, a tech book or a software package, free stuff is always cool, and these events are always worth going to. I've won enough cool stuff that my wife even encourages me to go now.

(3 comments)

Googlebot is not a fully supported GMail browser

posted under category: Browsers on February 15, 2007 at 12:40 pm by MrNate

Using the excellent Firefox User Agent Switcher extension by Chris Pedrick (of the Web Developer Toolbar fame), to test my plan to keep search engines from indexing some of my development sites.

I forgotten that I had my http_user_agent still set to Googlebot and logged into GMail to check the lists. To my surprise, I was set directly into the non-ajax mode with a little message about how my browser wasn't compatible.

Does that mean Googlebot can't index AJAX sites properly? I noticed the other day that it can read flash movies (well, flashpaper), but I wonder if it can handle remoting calls.

(1 comment)

The browser wars are back!

posted under category: Browsers on October 23, 2006 at 7:12 pm by MrNate

This weekend I installed IE7 at home, and it's good. A lot better. I'm really happy to see the better CSS support, tabs, the RSS integration and the same quickness that IE6 had. The standards support alone makes me want to install it everywhere and tell people to upgrade.

Today, I installed Firefox 2 (unofficially released). I've got to say, they're doing a lot more to make me happy. Things like google suggest in the search bar, spell checking (even while I type this), and RSS enhancements (yes, I've sold out to Google reader) are just so polished and sweet.

The way I see it, Microsoft had to seriously catch up after years of stalled work on the IE front, and they've done a great job. However, Mozilla has been busy making things easy and bringing out the little things that just bring a smile to my face.

I'm Really glad to see this battle continue. For me, so far, I'm keeping with Firefox.

(3 comments)

Firefox Extensions I Use

posted under category: Browsers on September 28, 2006 at 8:13 pm by MrNate

I'm a huge Firefox fan, by the way. Here's a rundown of all the extensions I use at work for my day-to-day work. The reason for posting this is actually to be a reference for my co-workers, who never can remember the name of "that one cool extension Nate had".

  • DOM Inspector - Install firefox in advanced mode to get this
  • Adblock - Essential for any browsing. I don't block everything, just the annoying ones. Innocent and helpful ads (google) or ads on sites I like always get to stay.
  • HTML Validator - Leave it off when you're not using it, as it can slow you down. Shows you live when pages validate and when you view source, why they don't.
  • ColorZilla - Perfect for grabbing colors. SO nice to have when working on HTML & CSS.
  • MeasureIT - Good for troubleshooting broken float and table designs. I wish it would remember boxes inbetween uses and allow changing box sizes after you draw it.
  • IE Tab - See what you're looking at in IE without searching for the blue -e- shortcut that you've probably deleted. Caveat: won't log you in if you're in a password-protected area.
  • BugMeNot - Skip logins for sites that you don't care about. New version automatically keeps trying until it finds a login that works.
  • Tabbrowser Preferences - Not sure if I still need this since Firefox 1.5, but it tweaks the tabs to work just the way I like.
Lots more after the jump...

(more on this subject) (1 comment)

The disappearing text bug in IE6

posted under category: Browsers on November 3, 2005 at 8:04 pm by MrNate

I know this is out there, but, at least for my own reference, I'm blogging it.

In a heavily CSS-driven layout, once in a while a block of text will disappear in IE, and come back partially when you highlight it. It has something do do with certain combinations of floats and positioning. The fix for it is to put everything that's not nailed down as position:relative;.

This one gets me from time to time. Worse yet, because I so heavily rely on Firefox, I can be almost done with building a site before I realize half of my text isn't showing up in IE!

On a side note, i'm whimsically thinking of starting a prayer group for web standards. Help me out and pray:

Dear God, please bring us CSS3 support to all major browsers and desktops. Amen
I really doubt there has been any previous movement in this direction. I can see my future bumper sticker now:
Pray for web standards!

(2 comments)

Windows Tablet PC Edition

posted under category: Browsers on September 11, 2005 at 9:50 pm by MrNate

I've been in heaven the last day or so playing with my wife's new toy, a Toshiba tablet PC. This thing os so cool and versatile, and it's so perfect for so many things.

There were a lot of little apps and toys that came with it (this is the boring part), the coolest of which are MS Journal, a freehand writing pad that is smarter than it seems, and the Tablet PC's input panel, which pops up whenever you hover your pen over a text area. The input panel also provides an easy mechanism for enabling the MS speech tools, which seem to be pretty good so far.

Now the fun part. I was amazed to see the effort that MS has put into the Tablet PC platform. They've done some really cool stuff, most of which you can download for free from the Microsoft site.

The MS Education Pack, though not so exciting for me, has my wife smiling about her future schooling plans.

The MS Experience Pack has got a lot of fun things, like a screen grabber, circle the part of the screen you want and send it straight to an email, write directly on your desktop with the Ink Desktop, and play crossword puzzles.

The Tablet PC PowerToys (you know, like TweakUI), were particularly astonishing. I count over 20 utilities, games, tweaks and apps, including a layered, pressure-sensitive painting program, animated drawing programs, at least 10 games, and my favorite, the easiest font creating tool I've ever seen, the My Font Tool. Want to download my handwriting font?

Microsoft has really done a great job on this OS. I'm really having fun with it. 5 stars, highly recommended. Thanks Bill!

(0 comments)

Did you SEE that thing?

posted under category: Browsers on June 1, 2005 at 1:22 pm by MrNate

Did anyone else take a gander at the Firefox 1.1 added web developer features? Allow me to summarize some of my favorites:

  • XML Events
  • SVG support
  • XForms support
  • A handful of CSS3 additions
That's ambitious, to say the least. I really wish IE would get on the ball and have a release cycle like this.

(0 comments)

Firefox 1.0

posted under category: Browsers on November 9, 2004 at 1:17 pm by MrNate

Firefox 1.0 is released. I don't really feel the need to say it, except for the whole community thing. The more people who promote it, the better it is for everyone.

For the record, I use Firefox. I like it. It took me probably 3 months to switch. I played with it as a toy, then tried to get serious, and finally, made the switch one day and never looked back. Now that it's a much more completed product, it would make it a lot easier to switch faster.

Why is it better for everyone? Well, an end to pop-ups and spyware is probably number 1 and 2. For me personally though, as a web developer, the winning argument is the support for web standards that Microsoft Internet Explorer just doesn't have.

If you don't have it, install it, you won't be disappointed.

(0 comments)

Firefox Release Candidate 2

posted under category: Browsers on November 4, 2004 at 11:12 am by MrNate

Firefox RC2 is out. If you're using the preview release or something before 1.0, you should upgrade. There's a few security and stability fixes, and it's just generally better. Also, the more people who use it, the better it gets.

The final 1.0 version is due for November 9th.

(0 comments)

New in FireFox 1.0RC (coming out soon)

posted under category: Browsers on September 7, 2004 at 12:20 pm by MrNate

Just stumbled upon this link to the Firefox 1.0 PR Release Notes (PR1 is not released yet), and noticed something that will relieve a LOT of headaches.

Undetectable document.all support for site compatibility and improved compatibility for keyboard accelerators further smooth the transition for IE users
This means there's no need to re-code a lot of your javascript to stay compatable with Firefox. Of course it's still good if you do it the 'correct' way, with the standard document.getElementById(), but this should alleviate a lot of corporate intranet headaches, where some complex sites rely on Microsoft's proprietary javascript extensions.

(0 comments)
Nathan is a co-manager for the Phoenix CFUG (AZCFUG) and a ColdFusion application developer for an aerospace company in the Phoenix East valley (Mesa). Aside from doing ColdFusion applications, Nathan enjoys playing with servers, hacking with a variety of other programming languages and managing his home theater PC. Nathan got his programming start writing batch files in DOS.
This blog is also available as an RSS 2.0 feed. Click your heels together and click here to email Nathan.