• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How good do I have to be...

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
Originally posted by: Hyperblaze

spaces.

in quanta I have an option to turn tabs into spaces.

by the way, what's your feedback on my sql example?

by the backticks, it looks like you copied it from phpmyadmin
using select * is ok as long as that user table doesn't have a ton of columns
i usually put the column name in the select though

its hard to get picky on simple queries
 
Originally posted by: troytime
Originally posted by: Hyperblaze

spaces.

in quanta I have an option to turn tabs into spaces.

by the way, what's your feedback on my sql example?

by the backticks, it looks like you copied it from phpmyadmin
using select * is ok as long as that user table doesn't have a ton of columns
i usually put the column name in the select though

its hard to get picky on simple queries

In my opinion, select * is never ok.

the main reason: What if later on in life some folks end up adding more columns in the user table for some reason? Do you REALLY want EVERYTHING to be selected when trying to take a few pieces of information? Talk about a waste of mysql load.

Let's say you end up adding 10 new fields in the user table 4 month later (let's say you moved on from the project and someone else is coding at that point).

some text field carrying massive amounts of information. You REALLY want the statement to do a SELECT *?

And to answer your statement. No I did not copy it from phpmyadmin. The way I typed it out was clean and concise. Very easy to read. I do not want to spent more time then I have to reading and understanding the statement.

Edit: I should also mention, I'm freaking anal about how I type code. If it doesn't look clean, it is not acceptable
 
good points!!
now for the real deal - do you use tabs or spaces to indent code?

Spaces. I hate tabs 🙂. It's funny the stuff that is left over from old manual typewriters (and possibly it goes back to typesetting for all I know). Probably some of you guys have never even seen a manual typewriter.

On the main point: I think once we get into debating exactly what sort of technical task constitutes a "developer" we're just arguing semantics. There are too many fine shades of skill combinations.

But if I wanted my own elitist definition, I would say you're not a developer unless you have coded in assembly, know what a linker does, remember 16-bit segments, can do pointer arithmetic in your head, don't have to think about the phrase "call stack," have spent an hour reading an entry in the "Obfuscated C" contest, and know which interrupt vector channel 0 of the 8254 PIC points to.
 
Originally posted by: Hyperblaze
Originally posted by: troytime
Originally posted by: Hyperblaze

spaces.

in quanta I have an option to turn tabs into spaces.

by the way, what's your feedback on my sql example?

by the backticks, it looks like you copied it from phpmyadmin
using select * is ok as long as that user table doesn't have a ton of columns
i usually put the column name in the select though

its hard to get picky on simple queries

In my opinion, select * is never ok.

the main reason: What if later on in life some folks end up adding more columns in the user table for some reason? Do you REALLY want EVERYTHING to be selected when trying to take a few pieces of information? Talk about a waste of mysql load.

Let's say you end up adding 10 new fields in the user table 4 month later (let's say you moved on from the project and someone else is coding at that point).

some text field carrying massive amounts of information. You REALLY want the statement to do a SELECT *?

And to answer your statement. No I did not copy it from phpmyadmin. The way I typed it out was clean and concise. Very easy to read. I do not want to spent more time then I have to reading and understanding the statement.

Edit: I should also mention, I'm freaking anal about how I type code. If it doesn't look clean, it is not acceptable

certainly good reasoning

you type queries with backticks instead of single quotes?
 
Originally posted by: troytime
Originally posted by: Hyperblaze
Originally posted by: troytime
Originally posted by: Hyperblaze

spaces.

in quanta I have an option to turn tabs into spaces.

by the way, what's your feedback on my sql example?

by the backticks, it looks like you copied it from phpmyadmin
using select * is ok as long as that user table doesn't have a ton of columns
i usually put the column name in the select though

its hard to get picky on simple queries

In my opinion, select * is never ok.

the main reason: What if later on in life some folks end up adding more columns in the user table for some reason? Do you REALLY want EVERYTHING to be selected when trying to take a few pieces of information? Talk about a waste of mysql load.

Let's say you end up adding 10 new fields in the user table 4 month later (let's say you moved on from the project and someone else is coding at that point).

some text field carrying massive amounts of information. You REALLY want the statement to do a SELECT *?

And to answer your statement. No I did not copy it from phpmyadmin. The way I typed it out was clean and concise. Very easy to read. I do not want to spent more time then I have to reading and understanding the statement.

Edit: I should also mention, I'm freaking anal about how I type code. If it doesn't look clean, it is not acceptable

certainly good reasoning

you type queries with backticks instead of single quotes?

here is how I would code an sql statement in php

let say $db would be my database object.

$sql = 'SELECT `vcUser`, `vcPassword`
FROM `tblUser`
WHERE `pkiUserId` = \'' . $this->user_id . '\'';
$results = $db->query_assoc($sql);

note: query_assoc is a function inside the db class which grabs an associates array using the sql query. Could always have a second argument in the function to indicate if it was to limit the amount of rows to one or many.
 
Originally posted by: Markbnj
good points!!
now for the real deal - do you use tabs or spaces to indent code?

Spaces. I hate tabs 🙂. It's funny the stuff that is left over from old manual typewriters (and possibly it goes back to typesetting for all I know). Probably some of you guys have never even seen a manual typewriter.

On the main point: I think once we get into debating exactly what sort of technical task constitutes a "developer" we're just arguing semantics. There are too many fine shades of skill combinations.

But if I wanted my own elitist definition, I would say you're not a developer unless you have coded in assembly, know what a linker does, remember 16-bit segments, can do pointer arithmetic in your head, don't have to think about the phrase "call stack," have spent an hour reading an entry in the "Obfuscated C" contest, and know which interrupt vector channel 0 of the 8254 PIC points to.

No way! You're not a true developer unless you've built your own computer with vacuum tubes and punch cards!
 
Back
Top