Professor takes points off for having lines wider than 80 characters

>professor takes points off for having lines wider than 80 characters

Other urls found in this thread:

catb.org/esr/faqs/smart-questions.html#formats
kernel.org/doc/html/v4.10/process/coding-style.html
twitter.com/NSFWRedditVideo

Awful teacher, you'll end up naming things badly to make it shorter

i hate entitled faggots like you, OP.

read the syllabus and the course instructions. stop being such a fucking needy bitch.

ayy hows middle school brah?

i'm a grad student. i'm sick of undergrads begging for points because they didn't read the instructions. it's one thing to spend office hours basically fishing for the answers; it's another to come in after the fact acting like you've been personally wronged just because you were too stupid to pay attention.

>lecturer takes off points for going past the 3000 word limit

Your professor is great, following a corporate style is the most important skill any programmer can learn. It is much more important than learning about algorithms and so on. Even if you don't know shit and make ineffective code, if you follow the corporate style then you are a great programmer and will be the first to be promoted.

Any lead programmer will appreciate code that conforms to the standard more than anything else. If the code works, then even better... But if it follows the standard then at least the code can be easily fixed later. The professor is just making you ready for industry.

wow ur so cool

>t. pajeeet java core training master mr. nahbuu

>OP wants to write un-maintainable spaghetti

you're taking a trivial point to a retarded extreme, which maybe(?) is intentional - like to drive home how stupid you think this rule is? - but

1) people will get fed up with your fucking shit if you don't adhere to established style guidelines (whatever they are - 80char, 100, whatever).

2) this is trivial. if your program is substantively changing because of this requirement, something has gone wrong on your end.

this is like requiring english papers to be written in MLA or APA or whatever format. half of the reason is to force you to practice adhering to a consistent style - something you'll have to do no matter what. another half of it is so that people reading your garbage don't additionally have to figure out what "clever" unique citation and formatting style you arbitrarily decided to use.

i've never met anyone on the other end of the education pipeline who was sympathetic toward students about this. there's tons of stupid shit you have to do in undergrad. this is barely a blip on the radar.

lol okay

I use 78 characters.

Well-groomed code can easily stay under 80 characters wide. Sadly, most languages make tall code look like shit.

Well groomed code in a terse language can easily stay under 72 characters, which is what Windows standardized on until Windows 10

I usually keep things under 57 characters, and then do line-comments from there 'til 80. Pretty comfy desu.

I take a trivial point to a retarded extreme because I actually like this rule and want to put emphasis on how important the rule is on a job.

Because what I am saying IS true. You can get very far as a shit programmer as long as you adhere to the style guidelines. That IS the most important skill because even John Carmack would get fired if he did not follow the style guidelines in pretty much any company. You won't get anywhere if you can't follow the style guidelines.

I use 79 characters because pep-8

I keep it at 78 characters because then I can always comment out each line with "# " without going over 80 characters.

yeah op, why try to be clear and concise when you can be descriptive when naming your classes, there's absolutely nothing wrong with
public class HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor extends AbstractPatternNodeVisitor {

>URL contained in the file that easily makes the line it's on exceed 80 characters
What do? Breaking it up looks like shit.

break it up in a reasonable way.

>professor takes points off for using methods other than the ones he showed in class
>even though my work is faster and more efficient than any of his examples

And thats how I quit university to focus on my job and jerking off.

#include
#include

int main(void){
char *domain = "longurls.com";
char *subsite = "this/url/is/prettylong";
char *file = "fuckinghellthisfilenameisprettylong.html";
char *urlargs = "v=237bgr0YH";
printf("%s/%s/%s&%s\n", domain, subsite, file, urlargs);
return 0;
}

90 character masterrace
for real though, pay attention cocksneeze. I'm sure he brought it up in class or even sent an email about it. Should have read the syllabus

>L-look mommy, I'm smart

I stand with you, cause this thread is infested with immature millenials that even care about grades. Who cares about grades really?! If they really want the highest mark they might as well do what's in their syllabus and shut their pieholes because their parents are paying.

I would have kicked you out

Smart... I should do that

I'm also a grad student. I don't give a fuck about the teachers rules when grading if it's something retarded like that. Grow a spine.

You are not doing your job very well. People are going to be surprised when they start working. You are not preparing them to do programming professionally.

Honestly, 80 is a lot more than I could ever need. I make a habit of using only very short functions and only use 1-3 character variable names. That way I usually keep it less than 14 characters long.

>80 character maximum length
That would be impossible in enterprise tier java with the huge fucking names for everything.

Nigger, who tf writes 80 chars in the industry anymore? Personally, and it seems to be popular, 120 or 132 characters. And strict limits are dumb, some lines can be over that and be fine. And do you really think kids are dumb enough to not be able to comprehend character limits and adapt?

The only place I know that has unbending coding standards is NASA. Fuck their standards too, that shit has serious 1991-syndrome.
>72 chars
>In verilog you can't use generate statements the reasoning being "they arent fully supported by every aynthesizer" even though it's in the standard
>With C trigraphs are allowed, but gotos are not

Strict rules are for people too stupid to apply some common sense.

>tfw to intelligent too use short lines

>prof requires lines to be less than 100 characters
>tabs have to be 4 spaces
>everything has to have spacing ie if ( x == y )
>everything has to be commented on the same line
>java

it may have to be done that way but it doesn't change that it's retarded

the problem comes when the requirement is to write retardedly descriptive names

>who tf writes 80 chars in the industry anymore
A ton of companies do so, sorry you lack proper professional experience. Look at most coding standards in clang-format for instance, they'll restrict you to 80 columns.

80 is enough unless you have shitty names or too many levels of indentation

>1-3 character variable names
Why would you do this to yourself?

>80 column and 132 column standards were decided by the number of typehammers fitted to a drum printer 65 years ago

>With C trigraphs are allowed, but gotos are not

of course because gotos are shit

>Nigger, who tf writes 80 chars in the industry anymore?
Everyone

>And do you really think kids are dumb enough to not be able to comprehend character limits and adapt?
Obviously your students and OP are too dumb. And they won't learn if they don't lose points.

they won't learn if they do, either. dumb rules just make people angry, hence this thread & the replies

>they won't learn if they do, either. dumb rules just make people angry
Then they should find something else to do... Following style guides is like 95% of what people need to be a good programmer.

>i lost points for not reading and or following directions wtf bros?!

>blackboard crashes again

It's harder to be const correct when you have a max of 80 chars

>professor takes points off for not using gender neutral pronouns in the comments

>in Java OOP design class
ForestBeanAbstractFactoryDecorator
just fuck my shit up

>professor takes points off for not using portable code

Cfag here, what the fuck is the point of OOP?

like why the fuck do you have all these problems when you can just use a function for the program and an array for the data

What’s better, having a chair that can be red or blue and normal or broken or having a red normal chair, a blue normal chair, a red broken chair and a blue broken chair?

> programming is just white-collar ditch digging

>You improve the professor's code about optimisation in class
Feels good to not be a brainlet

Python:
"xyz123123123123123.tld" \
"/foo/bar/foo/bar/foo/bar/" \
"index.html"


C
char *my_string = "Line 1 "
"Line 2";

It was a joke. But I do that sometimes for personal code when the function is obvious.

I like how you named those companies.

I worked for a web dev startup; they didn't give a shit. Worked for a NASA engineering contractor too. All intra-office programs had to be a MATLAB script or a DLL that MATLAB could open with a MATLAB wrapper. They didn't give a shit about code standards otherwise until NASA ran a code audit. They had to waste 2 months of my time refactoring a legacy programmer that they didn't use to meet NASA's standards. What a waste of time ans the outcome was really ugly. I worked for another company developing embedded systems with FPGAs. They had some simple standards: tabs not spaces, every module had to be commented explaining inoits, outputs, etc., sensible variable names, and no long ass lines (meaning break up instantiations onto multiple lines); otherwise, it didn't matter.

The only people I've met who are very strict about coding standards and will mark against you for not obeying them is government agencies and teetotaling faggot teachers and TAs.

Single digit IQ detected.

>Just follow outdated style rules that make no sense in modern times because somebody says you should
Found the retarded sheeple without any critical thinking ability.

>not side stepping this problem by using a rule based procedural natural language programming language such as inform 7 so that long drawn out human readable descriptions of record types are also the code for handling those types and all symbols can be overloaded on type not just function names and therefore there is therefore no need for descriptive names because the combination of name and type is both the description and the procedure

>outdated style rules that make no sense in modern times
The human visual system is not very good at reading long lines.
There's a reason why newspapers are printed in columns, and why books aren't set in 16:9 landscape format.

>Just follow outdated style rules that make no sense in modern times because somebody will give you credentials for it and you need credentials to get enough money to live reasonably well and therefore if you don't blindly follow these pointless rules over just the course of these few years then the entire rest of your life will be shitty and you'll die unfulfilled
wow yes you would be so smart to stand up against such a dogmatic idea as this
golly why don't we just ignore the fact that the people who make the stupid rules have total power over our future quality of life and just spit in their faces like monkeys nonetheless because we're so pathetically intellectually fragile we can't even put up with just four little years of being spoon fed shit
amazing critical thinking skills

>>everything has to be commented on the same line
Your code should not have inline comments and I personally dislike java but the rest is reasonable.

Why would you use any pronouns at all?
I would probably deduct points for talking about people too.

it's common courtesy to write in a readable manner
catb.org/esr/faqs/smart-questions.html#formats

100% of devices can display 80 columns.

That percentage drops with every increase.

OK then, you have your code/text use 200 columns.

Someone then wants to read it on a device that can comfortable read 150 columns.

What is the proper course of action.

Some guy like you wasted 30 minutes of lecture time this morning arguing with the professor "before" class over five fucking points because he didn't follow instructions and got them taken off. Just shut the fuck up and get your shit done correctly.

It makes readability and organization better in some situations, but when forced upon you is so fucking annoying.

>it's in the course description!!! JUST FOLLOW IT LOL!!!
Stupid rules and stupid laws deserve all of the scorn and hatred.

Literally not relevant to what I said.

A4 paper holds exactly 80 characters per line with a 12pt monospace font

Nuh uh what if I'm trying to grade code of a pocket pussy

>using paper in the year 2017
Are you in Somalia by any chance?

kernel.org/doc/html/v4.10/process/coding-style.html

Tabs are 8 characters

The limit on the length of lines is 80 columns and this is a strongly preferred limit.
Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen. The answer to that is that if you need more than 3 levels of indentation, you’re screwed anyway, and should fix your program.
Statements longer than 80 columns will be broken into sensible chunks, unless exceeding 80 columns significantly increases readability and does not hide information.

set tabstop = 4;
HOLY FUCK WHAT WAS THAT

Then you can't easily see when you're breaking the 80 character limit

>pajeet professor takes off points for not copy-pasting solutions for all partial problems from stackoverflow into a single spaghetticode class with one method

yes you can, write in 80 character wide lines

Tabs count towards the 80 char limit

where the fuck have you been working? india?

>>Nigger, who tf writes 80 chars in the industry anymore?
>Nobody
ftfy

>whats the point of modeling data after real world concepts such as physical objects instead of making a huge heap of all shit thrown together

some people actually still think this and for some reason they still havent had their worthless skulls bashed in yet

Make his life miserable!

>implying the only way to model data after real world concepts is OOP
literally just do this:
struct physical_object {
int (*a_material_affordance)(struct physical_object *);
void (*another_material_affordance)(struct physical_object *, int);
// ...
};

much cleaner and more versatile than OOP without compromising the intuitive design and organization

there's a reason editors have soft wraps/linebreaks you can configure to perfectly suit your specific vision

using linebreaks for width control in raw files should be illegal. i dont want to read your shitty adhd code of a crappy 80 cols wide. i find it easier to read long lines that only interrupt at their functional end. configure your editor to wrap the lines at 40 characters if your code reading skills are so bad. that way everyone gets what they want, instead of dinosaurs like you forcing your opinion on everyone else

I would do the same, even in pajeet languages like java, also if you are a retard who uses tabs instead two spaces to ident.

it's called soft line breaks and every editor or viewer since the 90s has it

I would like to reminder you guys that the 80 char limit by line was not a terminal thing (only really old shit had this kind of limitation). But it was actually a printer limitation. Old matricial printers only print 80 char long lines, and they are still around...

Yes, people used to print entire programs for some unknown reason...

Code over 80 characters wide is hideous, even on displays that can show it all at once. So are tabs that aren't 4 characters wide. A line longer than 80 characters is literally uglier than a line that isn't correctly indented.

>justifying a consequence of your shit idea by saying it is a necessity for your shit idea to work
just wow

Yeah but they're shit.
They're bad for the same reason tabs are bad: they take the visual presentation of the code out of your hands as the coder.
Same reason languages that consider indentation part of syntax are bad.

your 80 cols rule takes my control over the visual presentation of my code out of my hands a fucking lot more than soft wraps do

it's simple: unlinebroken code with soft wraps in an editor is flexible/responsive and can work in any situation: fullscreen, add a side panel, maybe split your screen in half to have 2 programs at once open, move the split to the other axis, resize some stuff to a different width for a sec, change your font settings, ...
it keeps working because it adjusts as needed and appropriate

x col code ONLY works well on x col displays. if you have more space, it's wasted because the code doesnt fill it. if you have less space, you still get either linebreaks or horizontal scrollbars

how the fuck can anyone justify fixed width text in today's responsive and adaptable graphical environments?

by the way, you can still use hard linebreaks even if you rely on soft wraps. You as the coder can still decide to break a line up somewhere if you feel it's necessary

soft wraps are better for the readers though.

with x col rule:
everyone is saddled up with it. People prefer a different value for x? Too bad, some dude forced this to be a rule and now everyone is saddled up with it

soft wraps:
that dude who likes 80 cols can set his editor to 80 cols and have his 80 cols. That guy over there likes 132 cols and can have them, and the last guy doesn't really care as long as the text just fills the available space to capacity and adjusts when he shrinks or enlarges the space

do you see how in both situations the x col dinosaurs get what they want, but in only one case EVERYONE gets what they want? Forcing an x col rule when not necessary for technical reasons like legacy systems is just being selfish and incapable of working with a team or adjusting to progress

>people used to print entire programs for some unknown reason.
it's not an unknown reason, it was a limitation of compute resources. when batch-processing was the norm and computers could only do one job at a time, static data would get output to the printer where you could pick it apart in your own time, instead of burning dollars per minute at the interactive terminal.

>poorfags without a 40" monitor butthurt because they can't see 80 columns without horizontal scrolling
lmao how pathetic can you be, my code has no width limit

>they take the visual presentation of the code out of your hands as the coder.
that's blatantly false, maybe if you use some godawful featureless text-editor but not in any modern development environment

You should get a zero for not respecting the assignment. Maybe next time you'll get it right.

That is the lead programmer's fault for not making the style guide to be less than 150. If the lead programmer don't do their job then you can have 900 character lines of code. Whole functions or classes in just one line. If there is no style guide with rules against it then it's not your responsibility.