Your Ad Here

cac

Friday, November 9, 2007

CSS studies going well

Halfway through a CSS book I picked up at the library, I now have a pretty good handle on cascading style sheets. I was able to pick up an old jsp page and create a css file for it. The page now looks much prettier.

When it became pretty, I went ahead and created some java script for it as well. The old page would show a date and time of when it was last displayed in the browser. It is important to the functionality of the page. But now I have a js file that will help show how old the page is. I am not calculating hours/days etc, because after an hour the page is useless anyway and the contents need to be refreshed.

Here is the code from the js file.
// elapsed time calculator. Calculates the elapsed time in minutes.
// note that in js, a declaration with var is for a local, no var is global. in this case starttime is global.
function startTimer() {
starttime = new Date();
}

function updateAge() {
var now = new Date();
var elapsedtime = Math.abs(Math.round((starttime-now)/60000))
document.getElementById("elapsedtime").firstChild.nodeValue = elapsedtime;
}

In the generated html, I included the js in the section like this
<script language="JavaScript" src="elapsedtimecalculator.js"></script>

Then I modified the <body> tag to
<body onload="startTimer(); setInterval('updateAge()', 1000 )">


At the position where the updated time should show, I created a span element as a place holder for the updateAge function to refresh every minute. Like so:
<div id="ageofpage">Updated <span id="elapsedtime">0</span> minutes ago. </div>

That's not bad for a start. I will continue to read the CSS book, then brush up on some JS, then dive into PHP. I noticed that google pages are using strict html and not transitional. I will use strict too.

Tuesday, November 6, 2007

Next steps. Learning the infrastructure.

I have started to brush up on HTML, and learn more CSS. I will next look into JavaScript and PHP.

So far, figured out that I there is transitional and strict xhtml. I will try to use Strict (and validate it that way with a validator) but then specify the pages to be transitional xhtml.

I have learned that CSS has a selector, declaration and values if memory serves me right. I am trying to read two books at the same time.

Friday, November 2, 2007

Should I even try the temporary file storage website?

Does it really make any sense? After all Google provides virtually unlimited shared documents access. Sure, it is limited to four or five formats, but that is what most people use anyway. Today I saw the Google Analyst day video which showcased many of their products. I don't stand a chance against them.

Of course, Google is not the only competition out there. Every month Google is buying companies who they could not compete against. I am scaling down my business to see if I can figure out how to use php successfully. I will still continue to use this business concept as the basis for my learning.

Some of the Google products I like are Trends and iGoogle (especially the feeling lucky part of "add new tab")

Thursday, November 1, 2007

Follow your heart says Steve Jobs. Everything else is secondary.

Today I stumbled on what I think is a fascinating speech by Steve Jobs, one of the greatest businessmen alive. He talks about his birth, his college days (after which he dropped out), his philosophy of "connecting the dots" which he says will give you the confidence to do what you want to do; his starting of Apple with Woz, his getting fired from Apple, his confidence and his love for what he does.

He shows why getting fired from apple was one of the best things that happened to him.
This led to the most creative period of his life when he met his wife, started pixar, and started NeXT. Apple later bought Next, bringing him back to apple. He says don't settle - keep looking.

He also talks about living each day as though it was his last day. He says follow your heart and intuition.

"Stay hungry, stay foolish."