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

Vinen

God is dead
2,783
490
Man I gotta say dealing with writing code around security in firmware is absolutely bullshit. I have to write some stuff about self-encrypting drives and the things we need to do to make it 'right' are absurd. And there's no documentation on any of this shit because they don't want it to get into the wrong hands, so you basically piece it together through their code or put in a request and wait months for an answer. I mean, I can see your key right there in plain text in the code, but you won't give me documentation on the protocol you use to access the disk.
Security by obscurity is an excellent solution.

The reason hardware firmware is hacked less is it tends to be behind a DMZ and deep in nested security zones.
 

Tuco

I got Tuco'd!
<Gold Donor>
45,452
73,542
rant on:
I get annoyed when bad programmers complain about the bad programming of other people and then hope I agree with them. I think the people who complain about bad programming have programming skills that easily fall within the bottom 50 percentile.
 

Noodleface

A Mod Real Quick
37,961
14,508
I don't complain about anyone's coding, I try to learn about what the older guys do in their code. I only complain in my head about the intern because it makes me go O_O to read his code. Capitalization discrepancies between variable definitions, doing what seems to me to be the longest route to a solution, thinking he knows everything, etc.

I try to teach him on his code review, but this senior guy always approves his code reviews before I can.
 

Asshat wormie

2023 Asshat Award Winner
<Gold Donor>
16,820
30,964
This is why i fucking hate it when the school makes me do pairs programming. I am not an expert but god damn it why the fuck are people taking graduate data structures classes with 0 ability to code.
 

Noodleface

A Mod Real Quick
37,961
14,508
This is why i fucking hate it when the school makes me do pairs programming. I am not an expert but god damn it why the fuck are people taking graduate data structures classes with 0 ability to code.
Well then you'll be prepared for the real world! Except in the real world everyone is an expert and won't take any criticism.
 

Asshat wormie

2023 Asshat Award Winner
<Gold Donor>
16,820
30,964
Well then you'll be prepared for the real world! Except in the real world everyone is an expert and won't take any criticism.
I am not going to be writing software. Just programming some scientific mumbo jumbo. Hopefully I can avoid such situations.
 

ShakyJake

<Donor>
7,641
19,281
rant on:
I get annoyed when bad programmers complain about the bad programming of other people and then hope I agree with them. I think the people who complain about bad programming have programming skills that easily fall within the bottom 50 percentile.
What's "bad programming"?

I don't consider myself a mastermind or anything, but the people around me who (apparently) have way more experience are HORRIBLE coders in my opinion. And that's the thing: "In my opinion." -- I'm starting to wonder is it just me? Is it just a "style" people adopt and, to me, it looks like shit? Maybe my stuff looks like shit to them. I'm not sure.
 

Deathwing

<Bronze Donator>
16,426
7,437
What's "bad programming"?
That's exaggeration, but I do test and support for a company that makes a product that will catch bad programming like that. Yes, your compiler will let you do that. Or more commonly, you'll take a tainted value and divide by it without checking.

Buffer overruns, memory leaks, null pointer dereferences, casting signed into an unsigned, the list goes on and on. Good programmers will do that kind of stuff less.
 

Lendarios

Trump's Staff
<Gold Donor>
19,360
-17,424
Example of bad programming, using exceptions as the normal expected behavior of your applications.
I saw that one on our code base and I wanted to punch the guy.

On other news today is my last day at this job. Ill be moving on after five years!!!

If you want to be a better c# programmer, install Resharper and follow most of its suggestions. It will teach you how to program defensively, and a lot of other stuff. I highly recommend it.
 

Khane

Got something right about marriage
19,839
13,357
Example of bad programming, using exceptions as the normal expected behavior of your applications.
I saw that one on our code base and I wanted to punch the guy.

On other news today is my last day at this job. Ill be moving on after five years!!!
I understand what you're saying here but you need to give more context around something like this. There are many scenarios where swallowing errors that are not deemed as fatal to improve usability is perfectly acceptable.
 

Tenks

Bronze Knight of the Realm
14,163
606
Clearly everytime you encounter any exception your program should crash to desktop and send out an automated email to the entire company
 

Khane

Got something right about marriage
19,839
13,357
Clearly everytime you encounter any exception your program should crash to desktop and send out an automated email to the entire company
Better yet it should send out emails on every success as well. That way it's all just noise and gets ignored by everyone even when it fails!
 

Cad

<Bronze Donator>
24,489
45,418
I understand what you're saying here but you need to give more context around something like this. There are many scenarios where swallowing errors that are not deemed as fatal to improve usability is perfectly acceptable.
I think what he's getting at is you should maybe catch the ParseException not all Exceptions and handle those differently?

But if he's just saying "RAWR FUCK THIS GUY FOR USING EXCEPTIONS" ... thats how you handle things that don't parse. It throws an exception. Not sure what else you're supposed to do there.
 

Noodleface

A Mod Real Quick
37,961
14,508
I'm trying to imagine how really shitty our servers would be if they hard crashed on every exception
 

Deathwing

<Bronze Donator>
16,426
7,437
Good programmers think ahead and test inputs for every possible bad case so they can give valuable feedback to the user!


That's only half sarcasm. Honestly, I'd just be happy the guy thought he might get a value that doesn't parse and at least prevented bad behavior(directly). The exception swallowing might or might not be warranted. The "comes from something" is more annoying to me. He took the effort to comment, but commented uselessly.
 

ShakyJake

<Donor>
7,641
19,281
I do know you're not supposed to use exceptions to determine program flow. I don't see any of that, but I have witnessed huge swaths of code wrapped in try/catches. That annoys me.

The problem with several of my team's engineers is that they will mindlessly hammer out dozens (literally!) of If/Else statements without stopping to think, "Maybe I should do this differently?". Pretty dumb. Most have to be shown how to do something first. Very few can come up with creative solutions on their own. I am not sure if that's a special trait or typical of most developers.

Oh, definitely a huge thumps up for Resharper. I'm the only developer that uses it on my team. So, when I do code reviews their stuff lights up like a Christmas tree. Some of that is just variable naming conventions -- which is usually a source of great annoyance for me. But I realize that's a personal preference to some degree and we were never told explicitly which style to use.

Speaking of variable names, several of our devs have the habit of prefixing variables with "my". Like "myInt" and "myString". Only place I've ever seen that used is in coding examples. Weird.
 

Obtenor_sl

shitlord
483
0
Lol, we follow a strict code format and we use Rubocop (Ruby tool) to comb our code.

I think people should after learning the basics get one of those books that actually talks about patterns and common solutions and mistakes (Eloquent Ruby for example, Effective Java is another).
 

Tenks

Bronze Knight of the Realm
14,163
606
I think the issue is context. Like what if the method above comes from a webservice where the default for the number is 0 so it just tries to parse the null and set to default or if any random garbage was sent in the business rules also state that should just default. It would be annoying if your webservice responded with an error code everytime someone messed up some of the parms.
 

Lendarios

Trump's Staff
<Gold Donor>
19,360
-17,424
I think the first sentence gave away the context. Exceptions are not part of a normal flow of a program. He should have used try parse instead. Exception handling on a try catch is very resource intensive. Protecting yourself against a timeout or a unforeseen situation is recommended, using exceptions as a crutch for something that can be handled without an exception, is not good programming.