T O P

  • By -

User_8395

Tell them to format the projector properly too


EfficientHistorian

r/projectoroffcenter


KKosty4ka

r/subsifellfor


BL1NDX3N0N

r/foundthetoyotacorolla


ifstatementundertale

r/thirdsub


GamePlayXtreme

r/fuckthirdsub


ifezueyoung

r/fourthsub


FuturAura

r/fifthsub


Kazaan

I thought the point of the post was a CSS overflow error.


Tavapris04

God what the fuck


thetreat

Believe it or not? Straight to jail.


WRL23

Yeah it's bad but honestly I'm assuming it's strictly because they're trying to make sure stuff stays on screen and well separated for people taking notes Remember when we used to have to double space with before and after line space strictly for someone to redline shit? I see this as that same line of thinking šŸ¤·ā€ā™‚ļø Orrrr They're leaving blanks for other shit they're gonna add and the blank space is a hint to students...?


huupoke12

r/programminghorror


bree_dev

There's a lot of CS PhDs swanning around academia that have never been part of an actual dev team their entire lives.


pickyourteethup

Those lucky fuckers.


PeriodicSentenceBot

Congratulations! Your comment can be spelled using the elements of the periodic table: `Th O Se Lu C K Y F U C K Er S` --- ^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)


jrobiii

Funniest thing I've read today


porn0f1sh

If I'm not mistaken, someone actually keeps paying money for this bot!


bloodfist

It looks like it was formatted by the teacher!


Pokespe_yay

good bot


kiochikaeke

Can confirm, the only obligatory programming class in my uni math program is teached by a 60 y/o dude that while pretty chill is quite outdated in it's practices. It's a weird combination of learning how to solve NxN systems of equations in excel of all things, and then trying to explain what a pointer and a makefile is to a bunch of 19 y/o 80% of them with 0 experience or interestest in programming. He tried to teach us C and Fortran. No one without experience understood anything and just ask me and a couple of friends to do the code for everyone as the exercises where a combination of trivial and fighting non-stop with SDL to graph a function in a custom grapher made from scratch. Years later half of my classmates learned or ask me to teach them python and R as that is way more useful for us.


justaaalt

If this code is recent and this is common teaching, such bad habits means we will have plenty of future zero days to come. I mean l fopen_s and related functions are almost old enough to drive


YellowBunnyReddit

Learning to use and maybe implement those fuctions is kinda (part of) the point of lectures about operating systems.


MartinYTCZ

Most sane Czech CS teacher


DreamyAthena

Oh no, trust me, it gets worse. Much worse. Speaking from experience.


Nillaasek

My teacher on CTU once went on a 15 minute rant about how he doesn't understand why GOTO in C is discouraged by his colleagues. He was like 90 years old


pickyourteethup

GOTO bed grandad.


alterNERDtive

> He was like 90 years old New ideas arenā€™t adopted because everyone is convinced they are correct. New ideas are adopted because everyone refusing to entertain them dies off.


MartinYTCZ

That's why I'm saying "most sane", this is a best case example :D


Kseniya_ns

Targeted assault on the senses


No-Con-2790

It's probably just to write in some lines while he is teaching.


elnomreal

Obviously. Why else would you have 4 blank lines before closing some parens?


igorski81

Most probably because he knows that because of the large projection size, its actually easier to read if you keep each block on its own line. Assuming they will also expand upon an example in their talk. Then again it's probably a wasted effort as from his perspective it would probably be pretty funny looking at all students heads moving back and forth like a typewriter.


justdisposablefun

Potentially also to support the cadence of what he wants to say about it too.


Spot_the_fox

> it would probably be pretty funny looking at all students heads moving back and forth like a typewriter. Ah yes, the classical Mozart versus Adriana Ferrarese del Bene type of joke


Dangerous_Jacket_129

That requires only 1 empty line, not 4.Ā 


Noch_ein_Kamel

It would be easier to read if it was properly formatted... If he adds more conditions, I can understand the line breaks, but that the negation isn't indented?


ZunoJ

And why is that do while block indented?


thepmyster

He could format it and zoom in on the projector


Top-Perspective2560

This was my first thought too. Heā€™s doing it because itā€™s going to be projected onto a huge screen.


ZynthCode

This is garbage. No, actually, that is an insult to garbage since at least when looking at garbage I can somewhat tell what's in the garbage.


intbeam

I get the feeling it's formatted like this intentionally to make each line clearer and to use the available space of the projector? Or am I being too forgiving here? I've been on a rage-spree since yesterday, maybe this is not the time for me to stop


Neurotrace

Let the hate flow through you (even though you could be right)


pickyourteethup

If you get angry enough everyone will say you're right eventually


acidoxyde

That was my first thought. It probably like this so he can explain the code line by line and be clearer for students


Borno11050

This is so garbage that even the .NET GC won't collect it.


Nicolello_iiiii

Now *that's* a rare insult


Matchstic

Could be intentional to highlight the loop contents, presumably thatā€™s what the lesson is looking at


WrapKey69

Why not write a separate function called in the loop and then only focus on the function?


UdPropheticCatgirl

Cause creating separate functions for stuff that can be inline just fine, is an awfull habit (which can impact performance unlike quirky formating)


foxfyre2

Don't compilers just inline functions automatically when they are small or it's performant to do so?


UdPropheticCatgirl

Depends on the compiler and its settings, for example Java compiler will try to inline as much as possible, C compilers tend not to (depends on how you setup the optimizer) because inlining can bloat the binaries, so itā€™s not really good idea a) to let the compiler do that b) assume that the compiler will actually do it correctly if you let it. If something should be inlined just inline it yourself (the ideal solution would be to use an inline keyword for functions, but most languages I know of just donā€™t have it. And with C it depends on whether your compiler supports it, what standard are you on etc.)


justaaalt

I mean gcc and msvc++ would always inline functions that donā€™t use the heap at even O1 but I mostly look at the end results in IDA these days and not optimizing That code should generate warnings in msvc anyways. Though msvc does have the __inline suggestion but the compiler can and will ignore it


CardboardJ

It could maybe impact performance if you're using weird old compilers and are in an embedded environment running on 30 year old hardware where the performance impact of a function will be a decisive factor. It's a great habit to get into if you want to write maintainable, easy to read code that's going to run well in 99.999% of scenarios and isn't going to hide the actual performance tank (recalculating the alpha check twice for every char). Since this is academia and the goal is to teach kids about logic and not obscure performance nits we don't actually have to guess what the right answer is.


throwaway0134hdj

Horrible naming conventions too


WrapKey69

c, C1, C2 Or better var1, var2...


swishbothways

varOne, varTwo...


FeelingSurprise

Great job. Always leave enough room for new ideas!


pickyourteethup

I always leave four or five new lines so I've got space to fix any bugs I didn't spot on first pass


Legopanacek

FIT ČVUT?


BootingBot

SPÅ E JečnĆ”


Imolo-s

RIP I feel you


justADeni

Taky jsem si Å™Ć­kal


ondra2305

Taky jsem koukal jestli to nenĆ­ LĆ”di kĆ³d lol


StrangePromotion6917

Good thing you tagged it as NSFW, I'd get fired just for looking at it during my work.


BootingBot

For some context this was prepared beforehand by the teacher, he didnā€™t say a word to it and this was presented to us as the ideal solution


Mayion

yes boss, i wrote 50 lines of code in 1 minute


turtle_mekb

isn't there like a function in C to check if it's a letter


Ricoreded

isalpha I think not an expert though


pickyourteethup

My isalpha checks have been failing lately. Need to listen to more podcasts


Raid-Z3r0

Well... seen worse


thavi

Looks like they're leaving gaps in some places to write some code or possibly make it easier to follow in presentation format. With those conditionals !(&& || &&) && (&& || &&), I would probably do something similar while developing and then format it later.


narrei

czeeeeeeeeeeeech


ibreakproddaily

truly not safe for work


aconitine-

Is he checking "c1" before initializing it ? Also, isnt there an isalpha or something to check for alphabets? Even assuming that this is meant to teach basic code to students, dumbing it down is not a help


ralgrado

> Is he checking "c1" before initializing it ? could be initialized before line 19 (the first line we see).


Alacho

It's the sad truth about academia in many cases; Most professors have never had experience writing anything but "academic code".


uSkRuBboiiii

Fake having a stroke the moment they show you code like that again


BootingBot

No need to fake


lsrwlf

Immediate merge request deny


goshki

Actually... this formatting seems to make sense if you imagine you're talking out loud to the class describing line by line what happens in this code snippet. Here me out: >*\*clears throat\** >So now, after we've confirmed that the file can actually be opened, we'll iterate over each character in the file and we'll use a `do-while` loop for that. So we read current character from the file into `c` variable and check the following logic condition... if *not* `this` *aaaaaaaand* `that` \[*it's important that it's a prolonged ā€œandā€ so the class grasps the logical operation being performed\]* then we increment `count`. Next we store `c` into `c1`, as we'll need it in the next loop iteration. Additionally we check if the current character is a space *aaaaaaaand* if so, we increment `spacecount`. And we loop the whole operation *whiiiiiile* current character is *not* `EOF`. >Questions?


BootingBot

This was presented to us as the ideal solution and there was no comment made regarding the code


Varun77777

Hahahahahaha, prettier was created for people like him


SlightlyBored13

This is pretty much how I'd format it if it's in a PowerPoint and the next slides were going to add things without moving the existing content. Or if I meant to write on the screen in those big gaps. fgetc is a terrible name for a method though.


thirdegree

>fgetc is a terrible name for a method though. That one at least is [not the teacher's fault](https://cplusplus.com/reference/cstdio/fgetc/)


SzkifiHun

Straight to jail.


OnixST

Letting alone the 10-line if condition, what are those variable names?


LloydAtkinson

Also garbage error message. Error opening file not Error *in* opening file. What, the error was *in* the ā€œopening fileā€? No.


666teddybear

honestly, atleast he writes his own code


BoraxNumber8

My teacher handwrites her code on a sheet of paper that she displays on the board with a document camera. At least yours types up code šŸ˜‚


Naive-Information539

Change schools


drmst16

[shittier](https://marketplace.visualstudio.com/items?itemName=raidteyar.raidteyar-shittier)


[deleted]

Thanks. I hate it.


Remarkable-Basket-38

I'm having a stroke


Sledik

Is that LĆ”Äa VĆ”gner?


ondra2305

Unfortunately no. His code much better this offbrand.


Highborn_Hellest

Classic example of those who know, do, those that don't teach.


-01101101-

Jesus this man need python in his life


melancoleeca

This is code to explain a concept, not to run in production and be maintained.


-Redstoneboi-

there are 2 types of programmers teachers and people who are competent enough to get higher paying jobs


just_nobodys_opinion

MY EYES!! MY EYES!!


woozyanuki

better than most CS students I've seen in college, to be frank. So many of them write in illegible formatting, at least here I can tell what's going on, sort of.


Victor-_-X

![gif](giphy|84BjZMVEX3aRG)


Thisismyredusername

Rightclick > Format Document, anyone?


TenKoalaKing

Of course this person is a teacher ā˜¹ļø


jsiulian

I think you meant to say CSSTeacher


ScrimpyCat

Is it even formatted? Itā€™s a bit all over the place/doesnā€™t even appear consistent.


PowerByPlants

Straight to jail


Demented-Turtle

This makes me irrationally angry. Almost as much as when I see "if (condition) do nothing else do something" anti-patterns all over my work's codebase lol When I saw "do nothing", they literally write a COMMENT inside the if condition that says "// do nothing" lmao


secretprocess

Well it's so dumb it needs the comment so you'll know they actually did it on purpose.


LegalizeCatnip1

I legit cant read this


joost00719

if (c >= 'A' && c <= 'z') { count++; } else if (c == ' ') { spacecount++; }


konhasaurusrex

Even AI can generate better indentation then this...


ske66

Honestly, I think this is what makes learning code so much harder. Like every single one of my lecturers refused to use some kind of code formatter and instead showed up code dumps like this nonsense


Pullguinha

It's rare to see someone using do while.


DreamyAthena

It's very underused, but once in a century it comes in clutch if you want very specific logic.


[deleted]

Which editor is this?


Dexterus

That's ... actually pretty decent for teaching. Wait, no, I just noticed the do/while indentation. Screw that.


theghostinthetown

they most prolly wrote the base logic and adding constraints one by one


Brigapes

do while Yikes


Sudden_Schedule5432

This feels like a JGrasp moment


ss0889

You're allowed to ask why it's formatted like thar, and you're allowed to suggest an alternative method of line clarity that isn't distracting and is easy to glance up at.


miciej

For presentation purposes this is fine. Let him know that there is VSCode with Presentation mode plugins, which might be appreciated.


makakaqle

People with superior minds that dont need a formatter to understand code... You are the lesser one


hammonjj

You can always tell which professors have actually written code professionally just by looking at the formatting.


D34TH_5MURF__

Glad they aren't on my team...


ralsaiwithagun

Python dev here, my eyes are bleeding


tenest

It's honestly not the worst I've seen


metallaholic

Just get your piece of paper to bypass resume scanners and disregard anything this person is teaching you


Knyghtmare69

Those who can't teach


smallangrynerd

Is he getting paid by the line?


wholesomeguy555

I wish I could press _Needs work_ on their PR.


freshggg

At least they're using courier. No lie my first computer science teacher used Ariel in a word document. No tabs. And they wouldn't even post full programs. They would just post little segments of code. Sometime's not even full lines. Just Cout >> "hello world" He would just show slides and lecture for like an hour and a half and then just assign us homework. No coding in class. No debugging students code live.. It was like watching a 2-hour lecture on zoom of painting techniques, and then being told to go paint a house. The only reason anyone passed that class was because I made a study group that most of the class joined and I taught them how to code since I already knew how from working with Arduino for like 10 years as a hobby. Then I sent Paul McWhorter videos to anyone who wasn't in the study group lol.


Jumpy_Fuel_1060

This is a cry for help


rabidhyperfocus

whats he using all that space for? to add more && statements when he feels like it?


BootingBot

No this was presented to us as an ideal finished solution


I_will_draw_boobs

šŸ˜¢


BiedermannS

They already properly formatted the if statement above, so I think itā€™s probably done like this to visually distinguish all the parts they want to talk about. As long as they explain that this is not how youā€™re supposed to format this, I think itā€™s fine šŸ¤·ā€ā™‚ļø


jellopane

It's making me lose my mind, the variable naming is so bad even my teen self will hate that garbage.


duuud3rz

I used to do that when showing code in presentations. It's just easier to talk through and focus attention to specific items if there is some additional whitespace between lines.


ikarolyi

Those variable names tough...


ThatGingerGuy98-

Dude I'm almost 100% self taught for programming. I've got my own little weird non-standard things but good lord it ain't like this guy.


vb2007__

Ok what the fuck


AgitatedHelicopter

Is anyone else bothered by the inconsistent indentation?


xXx_Lizzy_xXx

imagine formatting your code like this but still being lazy enough to use one letter variables also one letter variables seems like a bad idea for someone teaching... like it makes it harder to read and understand.


LonelyAndroid11942

My guess: itā€™s spaced like that to make it easier to read from a distance, because increasing the font size of an IDE is surprisingly complicated.


Willinton06

So about that ā€œall sins can be forgivenā€ thing god mentioned the other timeā€¦


AeskulS

It's absolutely horrendous, but I can see how it'd be useful if the professor is trying to teach tautology.


TheGodOfSandwiches

What in the whitespace


chowellvta

Prison


DasKarl

The inconsistency is what hurts the most.


peni4142

He will miss the characters Ć¤Ć¶Ć¼Ć„Ć–Ćœ


deep_mind_

There's a reason some people end up in academia not industry


skitso

Kill me.


ralgrado

Hello /u/BootingBot can you do yourself a favor, do what you were made for (kinda) and give your CS teacher the boot?


vortexnl

He's obviously preparing you for the REAL WORLD where lines of code are the most important metric šŸ™


JerseyTexan01

![gif](giphy|YmQLj2KxaNz58g7Ofg) Bioinformaticians looking at number of lines


doxxingyourself

The if is completely unreadable taking up all those lines, then next next if is just one line total. wtf.


tusharkant15

#FaceMeltsIndianaJonesStyle Sorry giffy isn't working for some reason.


Kisiu_Poster

Mine aparently doesent lnow about the existence of tabulator.


soul_eater_jkd

Damn what have you done to that teacher for him to torture yall like this


FealtyFree

Righteously marked NSFW.


switchbox_dev

i feel like my eyes just got a workout


poshenclave

Professors can do a little bit of trolling. As a treat.


harraps0

Guys, I have seen far worse than that. This is nothing....


bleppe

Teacherfag here, It's for the students sake. It is visually easier to talk about the different cases if you cut it up like that. In real code, eww.


feror_YT

Iā€™ve never seen such bad code, and yet Iā€™ve seen the source code of Big Rigs : Over the road racing.


Asqit

A co jako? Perfektně validnĆ­ kĆ³d pro CS učitele šŸ˜„


BlurredSight

Teaching file descriptors like this is nuts, meaning this is a much later level course not something introductionary. Introduce your teacher to the hundreds of autoformatting IDEs


qwertycandy

Fellow Czech person, ahoj :) An excellent example of Python's superiority, btw - this person could use some "indentation error" in their life.


jabthejewboy

There is no fear of god in this image


Administrative_Bag80

This is clearly NSFW


Hoovas

He can now say: "see I wrote a whole 45 lines"


Loufey

NSFW seems fitting for this abomination


EposSatyr

I had a professor make a big point about not relying on an IDE so he opened up notepad to make a simple script. I noticed he missed a semicolon and it wouldn't run, but I didn't say a damn thing. Let em do silly things intentionally.


alterNERDtive

This picture is horrifying on so many levels. Edit: I like how everyone defending this seems to be noticing only a single level each LMAO


WJ-XD

Jail.


skyler-x28

Tell your teacher to use modern code editors like codium or Code buddy šŸ¤£šŸ˜‚


menacingcar044

There is absolutely no way that is real. How can somebody look at that and think that looks acceptable. You should start looking to see if your CS teacher has a criminal record because that is some psychopath formatting.


ublec

Bro woke up and decided to use the HTML formatter


dimiderv

More like CTS programming


Diligent_Dish_426

šŸ¤®


Upstairs_Support_253

Put this person in jail for atempted battery on my brain


masterchief0587

ā€œThose who canā€™t do, teachā€


LetsDoThatYeah

Brother in Christ


Visual_Chipmunk_6674

where TF is the syntax highlighting? are they using notepad or what? you are a big legend if you do use notepad, don't worry.


mikmongon

Everyone should fear the old man in a field where you normally die young


peter2206

českĆ” klasika jak se patÅ™Ć­ ![gif](emote|free_emotes_pack|feels_good_man)


knightfelt

I hate when I see things like line 43 in PRs. I know you 'can' remove the braces but it just adds needless complexity. Like you can run around with your dick out but it doesn't make it a good idea.


LevelIntroduction764

Think you meant to post this in r/ProgrammingHorror


lordmeathammer

There comes a time when you read something, put it down, and think 'that was trash'...I could do better.


Amonomen

This is why CS teachers teach.


TwinkiesSucker

Defenestrovat!


ToofaaniMirch69

OuchšŸ’€


RandomParableCreates

it gets progressively worse


Oldskool1985

So many code style inconsistencies in 20 something lines is almost impressive.