IT/Software career thread: Invert binary trees for dollars.

moontayle

Golden Squire
4,302
165
This place...

In the middle of my refactoring project and I run across a method from one of the internal libraries but there's no documentation. I hate black box shit so I go to the repo and look at the code. Method doesn't exist. I bring this up to senior dev and she also doesn't have it on her local pulldown. Go to former manager's computer, he also doesn't have it. It looks like the former android dev pulled down (but didn't check out) the library and modified it but never went through the process of updating the repo. Waiting on IT to put out a fire so I can get access to her machine.
 

Noodleface

A Mod Real Quick
38,242
15,023
What do you mean no documentation? Surely there's a random database somewhere with a document from 2006 just waiting for you. Oh maybe that's just here.
 

Tenks

Bronze Knight of the Realm
14,163
607
Recently I've been a commenting fiend. I've realized that I far prefer reading code which is well documented including the thought process instead of trying to imply it. Anymore I have almost just as much commenting as I do actual code in a class.
 

Noodleface

A Mod Real Quick
38,242
15,023
Yeah I had a boss here that believed if your code didn't say what it was doing, then it wasn't good code - comments were for pussies.

I like to comment a lot to save people time. Nothing worse than firing up a module and having no clue what the code is doing. Our vendor's code is a nightmare... they use two letter variables...........................
 

Voyce

Shit Lord Supreme
<Donor>
8,100
28,563
I put questions in my code.

* how's your day going?

* Did you have a good breakfast?

Just kidding.

I do put questions in my code, which being a pre OOP language is structured with SOA design philosphy.

How do I get x for y, where z ?

The routine below, is the solution.

I really dont know if this is a good idea. But I only really make subatantial comments when the code gets chunky and, and dirty. Or at the top of the program in my variables, again pre OOP, so no local variables. When I write a routine I have to answer the question myself, so as a reader follows my structure he's following the solution to each problem as I solved it. /shrug
 

Tenks

Bronze Knight of the Realm
14,163
607
My rule of thumb is anytime I do something non-intuitive I comment it. Lets say I have a requirement to change the 4th character of every word to the letter 'c'. Naturally the code you write could do that pretty easily. But the WHY is not clear even in the least. So say something like "We change the 4th letter to 'c' because that means this record has been updated to the downstream processor." Now the next person to read the code doesn't have to figure out why the fuck you did this seemingly random thing.
 

moontayle

Golden Squire
4,302
165
I've started to do that as well. There's no guarantee I'll always be the sole coder for the project (which is how it stands now), so I want to be sure anyone coming after me will be able to both tell what I was doing as well as why I was doing it that way. This is especially important because I'm using RxAndroid to do a lot of stuff and that shit is heady.
 

Tenks

Bronze Knight of the Realm
14,163
607
I think its just one of those lessons you learn after being thrown on various projects that you see code that does a very specific but seemingly unnecessary or random thing. You know they did it for a reason. You know it wasn't just for fun. But you have absolutely zero clue why.
 

Cad

scientia potentia est
<Bronze Donator>
25,336
48,483
I used to like to comment my code but it pissed me off to no end when some dindu hindu would come behind and change my code due to whatever reason and not change the comment, then it'd look like I was a retard who had no idea what I did because my comment didn't really relate to how the method worked.
 

Tuco

I got Tuco'd!
<Gold Donor>
46,815
78,427
I prefer minimal comments in code I read, the people who decide how much to comment all their code then just eventually shit bricks of useless comments bother me more than the guy who comments nothing and I have to figure out what's going on by reading through code.
Anyone have days at work where it feels like your brain just goes on vacation? I had one of those today. Around 1 in the afternoon my brain just wasn't having any of it. I was reading emails and I was like "Yep this is probably English." I discussed and clarified requirements with someone for about 15 minutes and sent him a unit test showing my understanding of the requirement and I got it completely wrong. Even when he said what I did wrong it was one of those "Oh duh" moments not a "I completely did not understand that" issue. Good thing I didn't have very much to do today.
I used to, but for the last few years I haven't had this happen.
 

Dumar_sl

shitlord
3,712
4
I think the TL;DR of this thread should probably be:

Majoring in compsci? If your concern is primarily money, don't. It's unnecessary. If you actually want to work long hours writing code for someone else, then it's a marketable major.
 

Vinen

God is dead
2,789
495
I think the TL;DR of this thread should probably be:

Majoring in compsci? If your concern is primarily money, don't. It's unnecessary. If you actually want to work long hours writing code for someone else, then it's a marketable major.
Huh? Getting a decent Development job without a degree is even more difficult. I've personally came across a total of 1 Programmer who is worth their shit who has no degree.

Also. If you want Money you need to pick the right startup or work your way up in a company that gives Restricted Stock Units as part of their compensation. I get 50% salary about in RSU's each year.
 

Dumar_sl

shitlord
3,712
4
That's what I meant: don't get a development job - get an IT consultancy job if your concern is money. You make more, and you do MIS or some kind of soft-IT degree. You don't need CS. Companies don't care if you can actually write code. Only reason to do CS is if you actually want to write code for someone else.
 

WhatsAmmataU_sl

shitlord
1,022
0
I'm confused
Dumar has a point. I also have some hard earned life lessons that I would like to share:

Don't go to law school unless you plan to be someone else's lawyer.
Don't get a degree in accounting unless you plan to do someone else's taxes.
Don't train to be a pilot unless you plan to fly someone else's airplane.
And never, ever become a teacher unless you just really like teaching other people's kids.

Seriously, don't be a teacher.
 

Dumar_sl

shitlord
3,712
4
My point was that you don't need -- and oftentimes shouldn't get -- a CS degree to get into tech for the most money. I have a CS degree and work in IT consultancy. I worked in product dev previously. Everyday I meet people in this industry who majored in not just something that's not CS, but other things like history or polisci.

So the advice I was trying to give was that to only get a CS degree if you actually want to code. There are better, easier ways to make more money in tech without computer science, which is something many people aren't aware of.
 

Noodleface

A Mod Real Quick
38,242
15,023
Oh ok. I think most people here do it because they enjoy it, at least for me it's been a passion since I was a kid. The fact that I make money to come in and play with computers all day is awesome.

The income talk is just natural, you just want to maximize your income while you can.