How To Think Like A Programmer

"How To Think Like A Programmer": Book Matters -- Discussions and Resources for the HTTLAP Book => Talk about it => Topic started by: secuaz on July 23, 2013, 09:48:50 AM



Title: Abstraction when facing html/css problems
Post by: secuaz on July 23, 2013, 09:48:50 AM
Hi all, I am reading the section on problem abstraction and would like to know how to think of html/css problems from a highly abstract perspective.

When I am given a task I very quickly tend to start thinking about css properties.

Any suggestions?

Thank you.

Secuaz


Title: Re: Abstraction when facing html/css problems
Post by: Paul Vickers on July 23, 2013, 10:00:34 AM
Hello and welcome to the forum. Can you say a bit more about the kinds of task you are given? Are they programming tasks, or are they web page design tasks? CSS is a style sheet language used to describe the look and layout of a web page rather than for dealing with functional proprties like a programming language does. Much the same goes for HTML. That said, because HTML and CSS are structured syntaxes some of the same discipline that you would use in programming applies here.

So, can you give an example of the sort of problem you are thinking about?


Title: Re: Abstraction when facing html/css problems
Post by: secuaz on July 23, 2013, 10:13:59 AM
The task doesn't involve programming, it's only css and html. It is about making one web page look like a reference one. This involves layouts, floating divs, adding percentages, modifying images etc.
I normally get to the answer eventually but by spending time tinkering until it looks how I want.

In the book i read there are three abstraction domains (Real world, algorithmic and computational), how could I think about a solution in html/css without getting in grips with the css and trial-error trials ?

I hope I disambiguated my question.

Thanks,

Secuaz


Title: Re: Abstraction when facing html/css problems
Post by: Paul Vickers on July 23, 2013, 12:07:36 PM
This page has some tips on how to approach stylesheet abstraction: http://chriseppstein.github.io/blog/2009/09/20/why-stylesheet-abstraction-matters/ (http://chriseppstein.github.io/blog/2009/09/20/why-stylesheet-abstraction-matters/)