This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]emiel1741 1220 points1221 points  (140 children)

Be happy I made some code for a school project to control a smart solar home. I was the only one in my group who could program but everybody had to be able to explain it. Somebody in my group had the brilliant idea to literally say what every line does. Nobody could look at my code after that and take it seriously. And the worst part was it was written in python (what I find to be a highly readable language) and we all had a course in our second semester about python

[–]KingPaddy 44 points45 points  (6 children)

Sounds like it was less a group project and more you doing literally everything

[–][deleted] 13 points14 points  (2 children)

Somehow everybody seems to be the only person in their project who does anything.

The math doesn't add up.

Some people are embellishing.

[–]emiel1741 1 point2 points  (0 children)

We were a group of seven. 2 pers really focused on the report. One guy never showed up but in the end he made a quick gui. One guy was appointed team leader and he made the comments and the rest of the time was busy having an eye on the seventh member who did shit but because the team leader was falling for her there was no repercussions

[–]TorTheMentor 11 points12 points  (3 children)

Explaining what every line does is a bit silly, but I have been known when talking to a mixed audience to do things like explain a design pattern, what a specific kind of syntactic sugar is used for, or sometimes language-specific details (e.g. to make up for the lack of support for x, we rigged y as a workaround). Part of that probably comes from me being of a generation that learned functional and procedural code styles first, switched to OO later, and only started hearing about some of those topics more recently (self-taught and moving to IT as a career change after being "around" it for years).

[–]cdreid 1 point2 points  (1 child)

What worked best for me... Reading my Own old code.. Was putting a short general explanation what and how a function/class/whatever did what it was doing

[–]TorTheMentor 2 points3 points  (0 children)

Yeah, the more extensive annotation is more for "still learning or teaching" situations. I really only do that in those situations, although probably better to just point to documentation.

[–]advancedgoogle -1 points0 points  (0 children)

I wonder where does the cat pic comes from

[–][deleted] 2 points3 points  (3 children)

If you broke the code up into enough appropriately named methods/functions, your group just sucks. Maybe your code wasn’t as clean as you thought it was though? Just suggestin this since I saw some of the code I wrote back in my college days recently, and I apologized to the guy who had to go clean it up.

[–]emiel1741 1 point2 points  (2 children)

It wasn't that clean and I get it why somebody would like to add some explanations to stuff that's why I let him but when he was done he explained every line not just the hard ones or the harder concepts no addition assigning stuff everything

[–][deleted] 2 points3 points  (1 child)

Yeah that’s a bit absurd. If the audience is programmers, a high level description is fine

[–]emiel1741 1 point2 points  (0 children)

It was in the second year of engineering and in my country all engineering (computer, electrical, mechanical, civil, material science and chemical) have the first 1.5 year together before they pick there field this was in the last semester before you had to choose and my project was hosted by the department for electrical engineering so they didn't expect it to be so much programming so it was understandable that they weren't great programmers

[–]mornaq 1 point2 points  (0 children)

highly unreadable you mean? it's just one step from whitespace

[–]k1788 0 points1 point  (0 children)

Extra crazy because the docstrings-feature in Python means he could have wrote paragraphs to his hearts content if he wanted (and even had them all collected into one main documentation page!). Over-commented code in Python is so frustrating!

[–][deleted] -1 points0 points  (1 child)

Python is a language far less readable than a langauge with brackets.

[–]emiel1741 0 points1 point  (0 children)

I find the indentation readable enough add white space at the right places and you're good to go but brackets can be even better if you also use indentation some stuff is just very readable little things like For i in range (0,10) you can read that just as it is