Archive for May 2007

The Three Keys To Successful Self-Employment In Programming And Consulting: Introduction

Some of the more common questions in the Computers & Internet | Programming and Design category on Yahoo! Answers center on the business side:

  • What programming languages should I learn?
  • What do I need to know to start my own business?
  • Am I too old to change careers / Is the market saturated with my type of programming?
  • How much should I charge / How much money do designers or programmers make?

The problem is that these are the wrong questions to ask, because they’re exceedingly ancillary to business success; or, more accurately, they’re not the right way to think about being in business.

The most basic advice I can offer about being in business for yourself — and this applies to any trade — is that your success is entirely dependent on three things, in order of importance:

  1. Who you know. Your social network — people who know you and respect you, and the people who know and respect the people you know — is the single greatest key to doing well in business. You could be the greatest programmer since Linus Torvalds, but it won’t mean a thing if you can’t find and keep customers.
  2. Drive and attitude. Your social network is built, and strengthened, on your ability to put in effort and be positive at all times.
  3. Your skills and smarts. Yes, you do need to be able to do the work you contract.

But just so I can be thorough, let’s address those common questions.

Continue reading ‘The Three Keys To Successful Self-Employment In Programming And Consulting: Introduction’ »

Yeah, We All Have That Problem When Pamela Anderson Speaks

Recently seen and reported at the Cannes Film Festival:

Photographers at the Cannes Film Festival booed Pamela Anderson after she showed up late for a photo session Friday and only stuck around to pose for a few minutes.

Pamela Anderson and Dean Hamilton

Last things first. Yes, Dean Hamilton, those plastic boobies are absurdly huge. And yes, when Pamela speaks, you generally need to stare at her chest to take your mind off the drivel emanating from her pie hole. Such as this gem:

Earlier in the day, she had complained to AP Television News about the paparazzi, saying that Cannes was “a frenzy, it’s crazy, it’s silly.

“Even watching it on television this morning, seeing these people, it’s like the actors are prodded through like cattle, ‘turn this way, turn that way.’”

Except, as Pam well knows, the cows get bolts shot through their heads at the end of the line. She gets a gift bag worth more than the average person’s annual salary in exchange for five minutes, looking her best, posing for the same people who camp out a mile away from her home with telephoto lenses, taking unflattering shots of her aging face and body.

Then again, anyone who would consider Kid Rock a trade-up from Tommy Lee clearly has problems with making associations.

Continue reading ‘Yeah, We All Have That Problem When Pamela Anderson Speaks’ »

A Floating Jump Menu For Quick Page Navigation Via JavaScript / DOM

Recently asked on Yahoo! Answers:

HTML HELP creating a drop down box?

Hi, i want to create a drop down box, that when you select whatever choice is inside, it’ll bring you to a different part of the page. Get it ??? i don’t know if i explained it properly……

Yes, this is very clear; back in the day we called it a “jump menu” (who knows what the kids might call it today?).

Basically, you have a simple SELECT list that goes to a named anchor corresponding to one of its options. That’s easy enough to do in JavaScript; we just set the window.location.hash value to be the value of the selected item, and call that via the SELECT list’s OnChange event. (Link to sample code that does just that appears at the end of this article.)

The problem is that a fixed jump menu, in addition to being straight out of 1999, is also pretty useless; you have to scroll all the way to the top of the page to use it.

But what if the scroll box followed the page as it moved? You could go to any section you want at any time, without having to bother with traveling all the way back to the top of the page. Now, that would be something; and, thanks to some floating DIV code I found at javascript-fx.com, it’s a reality.

Continue reading ‘A Floating Jump Menu For Quick Page Navigation Via JavaScript / DOM’ »

The Value Of Relational Databases: A Case Study

Recently asked on Yahoo! Answers:

SQL / Access query?

I have a 1-table client database which, as well as all the usual name / address info, includes client ‘visit’ fields. Each client may have between 1 and 5 visits per week (Mon to Fri) and each visit can be at a different time, duration and frequency (weekly, fortnightly or monthly) e.g.

Cust XVisit 1 Day1 Hrs1 Time1 Freq1
Visit 2Day2 Hrs2 Time2 Freq2
Visit 3Day3Hrs3 Time3 Freq3etc…

Cust YVisit 1 Day1 Hrs1 Time1 Freq1
Visit 2Day2 Hrs2 Time2 Freq2
Visit 3Day3Hrs3 Time3 Freq3etc…

I want to generate a report that shows monthly visits - but not details of weekly or fortnightly calls the same customer may have. E.g. If Cust X has 1 weekly visit on a Mon, a fortnightly visit every other week on a Wed - and a visit on the last Fri of each month, I only want to see details of the Fri/monthly visit.

Hope this makes sense!!
Any assistance very much appreciated

My initial answer to the question prompted a reply from the questioner, who noted my suggested SQL query returned all visits for the client, and who also asked about relational databases and expressed some confusion.

I’ll explain why the questioner’s current design is bad, how to make the proper relationships and demonstrate, via a downloadable copy of the improved Access database, how to best generate queries such as this user wants.

Continue reading ‘The Value Of Relational Databases: A Case Study’ »

Displaying And Hiding Content Via JavaScript / DOM And The OnClick Event

Recently asked on Yahoo! Answers:

Question about web design?

I’m just wondering, how do you make a span list? like this site: {snipped url}
like when i click on the “bowman” all the guides appear below
thanks

The sample site that this question notes works fairly simply: You click on a heading DIV, and a content DIV below it displays; you click on the same heading DIV again, and the content DIV is again hidden.

Since setting CSS styles for XHTML Document Object Model (DOM) elements is fairly easy to do with JavaScript, this task is something you can knock out easily, quickly, and with great reliability / cross-browser support.

But best of all, because all the content we will display actually resides on the page, we won’t suffer the same problem of search engine indexing or old browsers not being able to see the content, had we used AJAX.

As always, at the end of this post I have a link to a working demo you can see and save for yourself.

Continue reading ‘Displaying And Hiding Content Via JavaScript / DOM And The OnClick Event’ »