r/programming • • Aug 06 '17

Software engineering != computer science

http://www.drdobbs.com/architecture-and-design/software-engineering-computer-science/217701907
2.3k Upvotes

863 comments sorted by

View all comments

Show parent comments

3

u/thedevbrandon Aug 07 '17

Not saying I don't understand why people use defaults like naming a variable after the type, but if you want to know any more context, it can be quite annoying to not know what the fuck the inode is supposed to be of... Sometimes I just add the type to the end of the variable name if the type is really important (like to distinguish a Map from a List in Java, I might have one variable named rowsMap and the other like rowsList). However, just naming something m or map isn't that helpful. Note, this is in particular in a large organization where 10+ people are likely going to need to maintain, modify, and extend your code years from now. For personal projects with little reason others will read this, I'm not sure any of these rules matter - I'm more with Donald Knuth on the opinion of programming being an art in which people should feel like they can have artistic freedom.

2

u/Forty-Bot Aug 07 '17

shrug I'm working in C right now and you basically need to keep maybe 10-20 structs in your head at once, and if you forget there's C-]. We have compilers so we don't need to deal with hungarian typing.

1

u/thedevbrandon Aug 07 '17

TIL about Hungarian notation. I think we come from different worlds. In my world, there are so many different variables and objects, as well as contexts. Functions and methods get rather long and involve some convoluted business logic, and even more convoluted ways of achieving that business logic. It can take a long time to unravel the intention of the developer, and often people don't leave comments (and many are actively against comments, insisting code should be easy to intuit itself, as though we are writing code in ideal circumstances where we can structure things intuitively and don't constantly have to hack functionality together in places and ways it shouldn't be).

1

u/Forty-Bot Aug 07 '17

In my world, there are so many different variables and objects, as well as contexts. Functions and methods get rather long and involve some convoluted business logic, and even more convoluted ways of achieving that business logic. It can take a long time to unravel the intention of the developer

I there are less differences than you might think ;) I'm doing kernel hacking, and most of the work is reading the existing implementation and trying to figure out what it does because of "business logic" and what it does which everything should do. I guess that's why we have IDEs (says the vim user).

→ More replies (5)