The Science of Web Art, Design and Development

View posts for » Category "Tutorial"

The ISO value: Films and CCD sensors

The ISO value: Films and CCD sensors

This is the 4th part of a six-part tutorial about photography basics. So far we’ve seen

We have seen how it is possible to project an image on a surface, but we haven’t seen so far how to transform the projected image, into a photography that can be seen further in time.

In this post, we will see basics of how films and digital sensors work and how to use ISO value on your own advantage.

read full post…

Comments (1)

The lenses: Zoom, Focus and Aperture

This is the 3rd part of a six-part tutorial about photography basics. So far we’ve seen

We have seen in the previous post, that by isolating rays of light through a tiny hole, we can separate and project images of objects. The smaller the whole, the sharper and darker the image, and vice-versa.

It would be really great if we could find a way to widen the aperture of the camera and correct the rays of light and project all diverging rays of light the same point, isn’t it? That would provide a sharp image that is also very illuminated.

In this post, I’ll show you the lens basics and how to use focus and aperture to your advantage in pictures.

read full post…

Comments (7)

Some physics background related to photography

This is the 1st part of a six-part tutorial about photography basics.

Visual properties of objects

Every material, has some visual properties like color, brightness and opacity. Visual properties are directly related to what happen to incident rays of light.

Unordered Reflection Say you are on a room with white walls, illuminated by an light bulb. We see the walls because the light that is emitted by the bulb is made of light rays that, as they hit the walls, are reflected. The ability of reflecting the rays is a property of these walls.

But the wall is a rough surface, even a wall that is smooth to the touch has enough ups and downs to be rough to light dimensions. So, any point of it will reflect light like if there was a mirror, tangent to the wall in the very point of the incident ray.

read full post…

Comments (5)

Understanding Cameras and Photography

SRL camera diagramIn 2001 I was hired by a government sponsored project to teach a photography course with a very peculiar approach. I had to teach High School teachers so they could use photography as a tool in the regular classes like Physics, Chemistry (it wasn’t digital photography back then), History, Art, and so on.

As a part of the course I wrote a tutorial that was quite handy for some people over the years and now, in a time when film photography is almost extinct I thought it was time to refresh the text and make a handy manual on photography in six parts.

Every three days, on August 9th, 12th, 15th, 18th, 21th and 24th I will publish each one of the six parts of the manual, see the list below.

Comments (2)

Manage all your email accounts with Gmail

Since I first met Gmail, in the very beginning of the service, I became addicted to the interface and, this days, I can hardly imagine myself using something else.

Yet using public email addresses is a big problem because if one day you change to another service you will have the headache of telling everybody about your new address. Having your own domain and your email within it is much better.

You may also want to handle old email accounts within Gmail transparently.

In this article, I will show you how to configure Gmail to manage multiple accounts in a transparent way and using your own domain email address or any other you may like.

Update: See the sequel of this article and learn How to manage all your main in Gmail: Filters, Labels multiple Id’s and even backups

read full post…

Comments (99)

“Order By” in SQL queries and random selection of database items

Simple hint, how to select a number random items from a MySQL database:

SELECT *
FROM your_table
ORDER BY rand()
LIMIT 2;

The code above, selects all the fields from a database table named “your_table” orders the results randomically and gets the first two. Change two for your favourite number.

Recommended Reading

Want to see an example of this working? Just look to your right! On the sidebar, there is a section named “Recommended Reading”. This is a section with books I like and recommend. I keep a list of books on a database and I pick two six at random with a query like this, each time a page is loaded.

Maybe you did knew this command already, or at least you heard about the ORDER BY command, but do you exactly know how it works and how further you can go with it?

I’ll show you some nice things in this article.

read full post…

Comments (9)

Managing obsolete pages with one line of code

When I switched from Blogger to Wordpress I had to deal with the problem of how to deal with the old pages.

Blogger style of archiving was static. That means that for every post you created, the Blogger system created a static HTML page.

Wordpress on the other side creates pages dynamically, meaning that there is no .html file whatsoever, the page is created on the fly whenever you request it. A change in the database automatically reflects on the page.

Now, the problem is, the address of the new pages doesn’t match the address of the old ones.

read full post…

Comments (9)

How to build an events agenda with SQL

In my opinion, one of the coolest things of the site I’ve built to Paulo gazela is the event agenda on the navigation bar.

Of course there are many calendar programs around to add to your site and it’s also possible to integrate google calendar or a similar tool, but all Paulo needed was a way to show the events he was going to be in for the folowing, say, 15 days, and an easy interface to add them.

The solution is very simple. We’ve built a database with the date, time and details of the events and we created a SQL query to get all the events 15 days from the current date.

A single SQL query like the one below can handle everything


SELECT *
FROM event, place
WHERE event.place=place.id
  AND CURDATE() < = event.thedate
  AND DATE_ADD(CURDATE(),INTERVAL 15 DAY) >= event.thedate
ORDER BY
  event.thedate ASC,
  event.thetime ASC;

If you want to understand better what this is, to build the database tables and get some more detail, read on.

read full post…

Comments (0)