Figuring out the best deal with If()

It’s pretty easy to figure out the best deal between equivalent items that are priced differently (e.g. different sizes of the same brand & type of food, or the same item at different stores). You just have to divide the cost by some common unit (e.g. price per pound, ounce, square footage, hour, etc.).

So, where does if() come in? Well, you can eyeball for the best ratio, but you can also use a quick if() statement to highlight it for you.
Continue reading Figuring out the best deal with If()

Creating a simple database (presenting data online)

Before getting sidetracked with refinements such as using if() and choose(), I was talking about using spreadsheets to write HTML, to make it easier to post data online. But when you do that it’s very not easy to change the data, except by completely overwriting it with a new table. So if you’ll want to update the data regularly, for example once a month, setting up a simple database and a PHP script to interpret and display the data. Continue reading Creating a simple database (presenting data online)

Using choose() for timesheets

Traditionally, many businesses created timesheets as blank forms with the days grouped into weeks, and employees were expected to fill in the dates, times, and other relevant information. In this situation the employee is the one responsible for getting the correct dates on the correct days of the week. The employee was also often responsible for adding up the hours, though of course any sensible employer would spend some time double-checking the addition.

Nowadays, with email and the Internet making it easy to transmit and store electronic documents, some companies have switched to having employees enter their hours into a spreadsheet — often the same spreadsheet that had previously been printed out and photocopied. Sometimes, however, employers will go to the effort of having the form pre-populated with dates, and if they do that then choose() can be helpful.

I made an example timesheet that does exactly that, and a few other nifty things besides. Continue reading Using choose() for timesheets