Posted on Leave a comment

Another attempt at jQuery modals

Not long ago, I attempted to use jQuery to ease the pain of creating a modal popup for editing user data. One challenge is that the user data is edited from a tabular list of users. Since the page is not refreshed after the update, the changes must be dynamically reflected in the table. That’s an interesting challenge but not a huge problem. The problem I ran into was the jQuery modal plugins I tried using to make my cross-browser programming faster and easier was that none of them seemed to accommodate my lengthy forms.

jQuery has dozens of modal plugins and options including Dialog built into the UI. Which is your favorite? Have you had success with a modal allowing scrolling and still supporting IE6?

Update: jqModal, Facebox, SimpleModal, and Thickbox, direct link to SimpleModal, and Dialog. Think I’m going with Dialog.

Posted on 5 Comments

LOST Characters Find Twitter

Note: There’s been an onslaught of people copying the SpoilerTV concept resulting in many duplicate names. I’ll update this post later to reflect the originals versus the imitators.

If you are a LOST fan, you’ll love being able to interact with Jack Shephard, Kate Austen, Sayid Jarrah, Sun Kwon, and Hugo ‘Hurley’ Reyes. They are each on Twitter now!

You may want to follow @abcinnercircle also. You can follow me on Twitter @djuggler.

Update: Apparently this post created some attention for Sayid. His response:

@djuggler Your link boosted my followers. A suspicious number of them, in fact. If I notice anything else… I might have to pay you a visit about 18 hours ago from twhirl in reply to djuggler

Update: In case anyone is curious, the LOST Twitters are part of a role playing game started on Spoiler TV.

Oceanic Six Twitter Project

Postby Gideon on Tue Dec 30, 2008 4:28 pm
All right guys, I know I’m new around here, but I had a pretty cool idea that I think some of you may want to participate in. Essentially, Twitter accounts will be created for the Oceanic Six (minus Aaron, obviously), and we’ll use them to follow the events off-island in this season as if we were those characters. Need for information? Keep reading!

What’s Twitter?
Twitter is a social network/micro-blogging service that is absolutely free to sign up for. You can see the example I’ve set up here. The amount of characters you can input for one "post" is limited to 160. This means sometimes you have to be smart to say all you want to say.

Who can participate?
Anyone can participate! Just post here with the character you’d like to post as, and I’ll help you set up an account if you need any help. I would like for you to make a commitment to this, however, and continue with your character at least until he or she makes it back to the island.

So what/when do I post?
Just post whatever happens to the character on the show! Act as if you are the character, not yourself commenting on the character. Think of it as role-playing. You can post whenever you like, whether on Wednesdays after the show or any time throughout the week, but please do not post more than once a day, simply because people will be "following" you and we don’t want to flood and annoy them. Also, please post at least once a week.

[Source, Spoiler TV, Oceanic Six Twitter Project]

Sayid is being played by Dreyesbo. Kate is being played by Jess. Sun is being played by Mellow. Hurley is being played by PenguinJosh. I’m not sure who claimed Jack but I am guessing Gideon. Charles Widmore is being played by DarkUFO. Vincent the dog is being played by bigsimpsin. Desmond is being played by RobinTWP. Frank_Lapidus is played by Anis Ben Amor. mhawking is being played by ???. Benjamin Linus is being played by ???. Claire Littleton is being played by ???. James Ford is being played by ???. John Locke is being played by ???. Miles Straume is being played by ???. The second Kate Austen is being played by ???. The Island is being played by ???. Jack Shephard (the second) is being played by ???. Juliet Burke is being played by ???. Sayid_Jarrah the second is being played by ???. Walt Lloyd is being played by ???.

See also. Here’s hoping ABC doesn’t make the Mad Men mistake.

Posted on 2 Comments

Always more to learn

No matter how long you do something, there is always more to learn. You’d think that since I’ve been doing HTML coding since around 1993, I’d pretty much know every in and out and every little tag and peculiarity regarding HTML. Not so. See, we form habits. We get into patterns. Specs change but we retain earlier hacks and assumptions. Today I learned an absurdly simple thing. Maybe I knew this and forgot. I rarely use tab orders on my forms. Most of the forms I create are very top down so the natural tab order is sufficient. In computing, counting starts at zero. But in HTML tab order, zero means exclude that form element from the tab order.

To exclude an element from the tab order, set the value of tabindex to 0. [Source, Webcheatsheet.com, How to Control Tab Order in HTML]

Because of my computer science studies, programming in PHP, JavaScript, C and so on, my inclination is to always begin with zero. Of course, my favorite web application language is ColdFusion and it always starts at one. I can only assume the Allaire brothers were originally targeting non-programmers.

HTML is about to become HTML 5. Funny enough I just traded my HTML 3.2 book at McCay’s a few weeks ago. Maybe I should have kept it and re-read it.

Update Jan 12, 2009: Ian Tempest noted in the comments that zero does not exclude an element but rather moves it to the end of the tab order. From the W3C HTML 4.01 specification:

Those elements that do not support the tabindex attribute or support it and assign it a value of “0? are navigated next. These elements are navigated in the order they appear in the character stream. [Source, W3C, 17.11.1 Tabbing navigation]

Posted on Leave a comment

Start the year off with professional development

Is training and professional development something you are going to get around to one day? Why not make it today? Resources abound for honing our career skills. iTunes has free podcasts from iTunes University. A quick Internet search should produce abundant articles and videos useful to whatever your line of work.

I am taking the next 30 minutes for professional development. In my case, I am going to begin learning Eclipse so that I can move away from Notepad++ and CFStudio5. This will be a step toward moving my development environment to a portable hard drive so that I can work on any machine anywhere I go. I know learning to use an editor sounds silly. In my case, shouldn’t "professional development" be about learning about new software testing techniques, algorithms, or another programming language? Not necessarily. Anything that you learn which makes you more efficient in your career or makes you more valuable to your company is professional development. Even if you already know and use Eclipse, watching these videos make teach you something you don’t realize you are overlooking. Retraining on a tool you already use and know can help break bad habits or reveal better ways to use the tool.

Update: See Darren Schall’s discovery on Eclipse workspaces as an example of using a tool for awhile and then discovering its hidden power.

Posted on 4 Comments

Follow the bouncing ball part 2

So for nearly a decade, I have ignored the dripping faucet in the downstairs bath despite having a brand new faucet in a box beside the sink. On December 28th, I actually broke down, removed the old faucet, and put on a new one. Only, I didn’t reattach the drain or the hot and cold water feeds. So now, when the washing machine runs, it backs up into the cabinet under the sink. A one gallon bucket catches all the water from one wash load. Since this is getting old, today’s task was to replace the galvanized steel pipe with PVC pipe. Off to Home Depot!

Now, Home Depot and I have a love/hate relationship. I will actually swoon while walking its majestic aisles. Once I went to return something and ended up spending $100. For that matter, $100 is my magic number for Home Depot. See, I believe every store has a magic number. For instance, Kroger’s magic number is 50; I can’t go into Kroger without spending $50. Home Depot used to be 100. I couldn’t drive past Home Depot without a C-note blowing out the window. I love walking through Home Depot and imagining all the great things I could do if I only had the time, and the money, to spend on the materials.

Tommy made arrangements to be at a friend’s house at 2pm so that gave me an excuse to go get my PVC pipe. I walk into Home Depot and immediately see some pretty flowers that I think will make Cathy’s day if I plant them near the front door. Done. Remarkably, I find the plumbing aisle next and realize I didn’t collect enough information to make an informed purchase so after consulting with the expert employee, who this time actually knew his stuff, I was ready to replace all galvanized and wrought iron plumbing in the house; a total plumbing upgrade! Wisely, I decided that would require more planning. Next I explore the fire place supplies to see if they sell the wire brushes I need to clean the flue. Nay. I find myself in the insulation aisle pondering using solid foam on the cider block in the basement than losing living space by adding studs and R-13 or R-whatever. Skip. Finally I arrive at the dry wall aisle. Standing Home Depot rule: Don’t leave without drywall board if you are alone and have the van. That’s the nice thing about a Dodge Grand Caravan; it holds a 4×8 piece of board perfectly with the seats folded down and the driver’s seat slid all the way to the dashboard. Makes for interesting driving too. I head to the exact opposite end of the store and buy 25 pounds of grass seed, the plants, and the drywall and totally skip the reason I went there in the first place. I couldn’t leave the parking lot without buying 4 yellow LEDs from Radio Shack.

Got home and Evan and Amy helped me plant. I had some organic planting soil stored away and a bag of mulch from last season that was never opened and still in great shape. In 7 days, our muddy pit might actually have grass!

Posted on Leave a comment

Follow the bouncing ball

I was on the computer and decided I need to accomplish something for the house. Something tangible. We bought a glow in the dark basketball net for the neighborhood kids (our kids never use our basketball goal) so I thought I’d take a few moments and hang it. So I went in the bedroom to get my pocket knife since there is tape holding part of the old net on. Seeing the Roomba I decided that it would be good to have it cleaning the floors while Evan is away wife the grandparents and I am outside. This required cleaning the Roomba and because the Christmas ornaments are on the kitchen table I had to do it on the kitchen counters which reminded me that I haven’t had breakfast. So I started cooking bacon for Cathy, Tommy and myself and remembered I needed something downstairs. Once I got downstairs I couldn’t remember what it was so I decide to write this post. Oh! It was the MP3 player so I could either listen to A Buddhist Podcast or some music. Since I’m down here I suppose I should get the Christmas buckets upstairs so we can put those ornaments and tree away. Now what was that tangible thing I was going to do?

Posted on Leave a comment

Is Yellowstone about to kill a lot of the world’s population?

Well, maybe

it’s been 600,000-ish years since Yellowstone’s supervolcano has gone off full blast…
Picture 1,000 Mount Saint Helenses…
A supereruption could kill tens of millions.
More than half the U.S. will experience ashfall, potentially fatal if inhaled.
…could devegetate a third of the lower 48 (including some of the world’s most productive farmland) for years or decades, leading to mass starvation…
Within 10 to 50 miles of the next Yellowstone vent, you’ll be Pompeiiized…
What’s the chance of a supereruption anywhere in the world in the next 50 years? Estimates range from one chance in 1,000 to one in 10,000 — hardly cause for panic.

[Source, The Straight Dope, Is Yellowstone Park sitting on a supervolcano that’s about to blow?]

Posted on 4 Comments

Today’s Technical Brain Cloud

Having a stupid moment and maybe you can help. I’m trying to count how many times an employee is scheduled using MySQL. I would like to have a column that for George says "3" and for Lucy says "2" but if I group on EmployeeID and use count(e.EmployeeID) I end up with 2 rows instead of 5. How do I retain the 5 rows of data and still get a count of 3 for George and 2 for Lucy? My output will show that George has schedule Sat-Mon, Tues-Fri, and Wed-Sun and will say "George is scheduled 3 times."

CompanyID AffiliateID EmployeeID EmployeeName Schedule
1   23   11   George   Sat-Mon
1   23   11   George   Tues-Fri
1   23   11   George   Wed-Sun
1   23   15   Lucy   Sun-Mon
1   23   15   Lucy   Thur-Fri

SELECT c.CompanyID,
     a.AffiliateID,
     e.EmployeeID,
     e.EmployeeName,
     s.Schedule
FROM companies c
LEFT OUTER JOIN subscription s
     ON c.CompanyID = s.CopmanyID
LEFT OUTER JOIN affiliates a
     ON a.AffiliateID = s.AffiliateID
LEFT OUTER JOIN employees e
     ON ae.AffiliateID = a.AffiliateID
LEFT OUTER JOIN schedules s
     ON s.EmployeeID = e.EmployeeID
          AND s.CompanyID = c.CompanyID
          AND s.AffiliateID = a.AffiliateID
WHERE (s.StartDate <= FROM_UNIXTIME(1227243599)
     AND s.EndDate >= FROM_UNIXTIME(1227157200))
     AND c.CompanyID = 1
ORDER BY c.CompanyName, s.AffiliateID ASC

I know this is not a complex SQL problem. I’ve done this in the past but today I am being dense and am stumped.