
Are you a QOTWer? Do you want to start a thread that isn't a direct answer to the current QOTW? Then this place, gentle poster, is your friend.
( , Sun 1 Apr 2001, 1:00)
« Go Back | See The Full Thread

You just need to say it out loud, like if you want to have a grid with 3 columns, like a table, I just say to myself.
"Ok, make X = 1. Then go through the loop, if X is 1, then we do a row start. Then we put in the cell with all the stuff we want in there. Then after that, if X is 3, we'll close the row and make X = 1, otherwise, we increase X by 1."
but in code, all that looks like is
$x = 1;
foreach($products as $product) {
if ($x == 1) { echo "NEW ROW"; }
echo "ALL THE STUFF WE WANT FOR A CELL;
if ($x == 3) { echo "END ROW"; $x = 1; } else { $x = $x + 1;}
}
It's easy.
$x = 1..... means you're make X be 1
$x == 1.... means you're seeing if X is 1.
( , Tue 24 Jul 2012, 9:39, 3 replies, latest was 13 years ago)

( , Tue 24 Jul 2012, 9:45, Reply)

I was more covering the "maths is easy in code bit" really
( , Tue 24 Jul 2012, 9:48, Reply)

i don't thinkk he was saying he was covering all of maths in his job, badge.
do you find simple things difficult?
( , Tue 24 Jul 2012, 9:49, Reply)

but what you said is not the same as what he said, now is it?
( , Tue 24 Jul 2012, 9:50, Reply)

he did not say 'I DO ALL OF THE MATHS AND FIND ALL OF IT EASY' at any point.
Its not wonder our universities are going to shit with people like you working there
( , Tue 24 Jul 2012, 9:52, Reply)

stupid prick
( , Tue 24 Jul 2012, 9:53, Reply)

( , Tue 24 Jul 2012, 9:54, Reply)

( , Tue 24 Jul 2012, 9:55, Reply)

I don't even really lecture that much, I'm mostly research.
( , Tue 24 Jul 2012, 9:56, Reply)

"fuck about on google all day"
( , Tue 24 Jul 2012, 10:11, Reply)

Cancer would be cured YEARS ago, possibly on a spaceship, if you had performance reviews and deadlines that mattered.
( , Tue 24 Jul 2012, 10:17, Reply)

Deadlines in academia are if anything more brutal than in industry, because it's someone elses money you're justifying spending.
( , Tue 24 Jul 2012, 10:19, Reply)

Pull the other one. Michelin star restaurants to sweet talk into a contract that would make millionaires out of everyone if the PROFIT was shared out.
( , Tue 24 Jul 2012, 10:30, Reply)

therefore I spend more time doing research than teaching.
I mean, obviously, Gove does have a lot to answer for, but my laziness isn't down to him.
( , Tue 24 Jul 2012, 10:09, Reply)

(in geneneral, I mean you could be doing War Studies at Kings, most 5 year olds I know could piss that).
Universities are also places of research as well as teaching.
Age doesn't specifically come into it, but you need teh equivalent of school qualifications to get into University.
( , Tue 24 Jul 2012, 10:40, Reply)

it's apparently our schools. Do try and keep up, Q.
( , Tue 24 Jul 2012, 9:53, Reply)

you were wrong and i was right.
for once
( , Tue 24 Jul 2012, 9:53, Reply)

like knowing how things flow and effect other things. Like if you wanna center something on the screen, you'll have to know where to place the top left point of that object. Or creating a chart with a veriable number of bars at different levels.
( , Tue 24 Jul 2012, 9:48, Reply)

But give me some chemistry maths and I'll be right.
( , Tue 24 Jul 2012, 9:45, Reply)

Unless you're talking about the mol of substance, in which case to calculate it you either need the Ideal Gas Equation, the Concentration and volume, or the mass and molar mass of the substance in question.
( , Tue 24 Jul 2012, 9:51, Reply)

I'm ashamed of myself. Bully.
( , Tue 24 Jul 2012, 9:52, Reply)

but the only thing that really translates from maths into code is algebra
and logic, to satisfy Bartleby, but I'm never convinced logic is really maths. see also: statistics.
( , Tue 24 Jul 2012, 9:50, Reply)

Or knowing how to handle resources in that 8,16,32,64 etc stuff, whatever that progression is called. Or counting the seconds (or miliseconds sometimes) since The Epoch (1st Jan 1970 00:00:00).
I don't really know about different types of maths to tell you the truth, my point is, if you learnt how to code before you did maths, then you'd be able to do maths a lot easier.
* You're a mug if you do this today though; so many bits of code you can knick to do this for you, and they'd animate it.
( , Tue 24 Jul 2012, 9:58, Reply)

is that it *isn't* maths.
In maths saying
a=10
b=20
a=b
is just wrong. In programming it's the whole point.
( , Tue 24 Jul 2012, 9:45, Reply)
« Go Back | See The Full Thread