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

alavaz

Trakanon Raider
2,001
713
I get what you guys are saying about the defense industry but I'm enjoying it. I landed myself a place really close to home writing interesting code and working with pretty nice guys. I mean they're all old as fuck and it's a baby boomer place but I like it. I'm not worried about major pay raises. I went up 25k in a one year time frame.

I guess I've been lucky enough to land on good contracts that actually have me doing some pretty impressive shit with cool people. I mean it's definitely not for everyone, right now I work directly with a lot of enlisted so it takes a certain personality/mentality to fit in. I could see a lot of IT folks I've worked with in state gov or private sector hating it.

It's also my worst nightmare to think about being stuck in some hipster city working for a big tech company, so to each his own.
 

chaos

Buzzfeed Editor
17,324
4,839
My experience is that contracts can be what you make of them. You can coast and do the minimum and probably get by, or push yourself and get into some shit. Probably the same with any private sector job. That said, I'm specifically rewriting my resume and focusing skill development to get away from the government sector because of some of the frustrations. Not that I think the private sector will be that much better, but it's worth a shot. The idea of giving up my clearance sucks. But at the same time, this post-Snowden and OPM horse shit of perpetual investigation kind of sovles that problem for me, if my clearance never gets adjudicated again and could be dropped at any time due to their incompetence, I might as well make the jump.
 

Noodleface

A Mod Real Quick
37,961
14,508
We use clear case here but I assume making a branch is pretty trivial. We don't have privs to do that so I asked the guy who does to do it. Basically ruined his day and he told me he wouldn't do it because it was a waste of time if it's something we aren't delivering.

There's my first annoyance....

Its a code base where multiple people need to work....
 

Louis

Trakanon Raider
2,836
1,105
That doesn't look too bad. What did you use to study from?

PS:

Working 147 hours in two weeks + 16 hours of holiday pay + 100 dollar bonus almost makes up for my shitty base pay.
I checked my drop box and google drive and didn't find any of the materials and just recently wiped my drive, so I'm not actually sure which book I used. If you aren't actually worried about learning and just want to tack it on your resume for the promo you can just braindump it. Questions are usually 1 to 1.
 

Cad

scientia potentia est
<Bronze Donator>
24,497
45,438
We use clear case here but I assume making a branch is pretty trivial. We don't have privs to do that so I asked the guy who does to do it. Basically ruined his day and he told me he wouldn't do it because it was a waste of time if it's something we aren't delivering.

There's my first annoyance....

Its a code base where multiple people need to work....

Merging branches back would take work, and he doesn't like work. So you work in head and you like it, fucker.
 
  • 1Like
Reactions: 1 user

a_skeleton_06

<Banned>
1,923
2,410
That doesn't look too bad. What did you use to study from?

PS:

Working 147 hours in two weeks + 16 hours of holiday pay + 100 dollar bonus almost makes up for my shitty base pay.

This isn't the thread to complain about your shitty life. You already have one of those.
 
  • 1Like
Reactions: 1 user

chaos

Buzzfeed Editor
17,324
4,839
I learned python pretty well, well enough to do some basic shit with, build simple tools, parse data, that kind of thing. Then I went on reddit to look at some of the daily programmer shit and how people were doing things. I then realized that I don't know python at fucking all.
 
  • 1Solidarity
Reactions: 1 user

Tenks

Bronze Knight of the Realm
14,163
606
That is because Python programmers are annoying hipsters who love writing unreadable code that does too much on one line
 
  • 2Like
Reactions: 1 users

chaos

Buzzfeed Editor
17,324
4,839
That is because Python programmers are annoying hipsters who love writing unreadable code that does too much on one line
Yeah wtf is that shit? Trying to cram as much as possible into as few characters as possible, but it just looks like garble.
 

Cad

scientia potentia est
<Bronze Donator>
24,497
45,438
That is because Python programmers are annoying hipsters who love writing unreadable code that does too much on one line

Yea... no shit. When I used to code I used to intentionally break complex things up into multiple statements so the monkey that came after me could understand what it's doing and not mangle it, and I'd get comments like "oh if you did a ternary operator here with a nested elseif you could get that all on one line!" ... fucking barbarians

It's not any faster because it's on one line, dumbasses, the compiler/interpreter breaks it all up anyway.
 

Deathwing

<Bronze Donator>
16,429
7,440
Odd, I like Python because it's verbose and readable. This seems more like a programming problem in general and Python enables it more than some other languages because of some of its constructs.

chaos chaos got some examples of what you thought was complex python? I've been doing this as part of my job for a few years and would like to measure my competency too.

What's wrong with "tuple" btw? What do you call an immutable collection of data?
 

chaos

Buzzfeed Editor
17,324
4,839
Odd, I like Python because it's verbose and readable. This seems more like a programming problem in general and Python enables it more than some other languages because of some of its constructs.

chaos chaos got some examples of what you thought was complex python? I've been doing this as part of my job for a few years and would like to measure my competency too.

What's wrong with "tuple" btw? What do you call an immutable collection of data?
I'm not a great coder, so it may be easier for you, I get by. But this is one I saw a week or so back that I was all "whaaa?"

Code:
task = lambda x: int(max(list(str(x:emoji_nose:)
bonus1 = lambda x: int(''.join((sorted(str(x)+'0'*4, reverse=True))[:4]))

def bonus2_raw(x, n):
    if x == 6174: return n
    return bonus2_raw(bonus1(x)-int(''.join(sorted(str(x:emoji_nose:), n+1)

bonus2 = lambda x: bonus2_raw(x, 0)

print(task(123))
print(bonus1(123))
print(bonus2(1004))
 

Asshat wormie

2023 Asshat Award Winner
<Gold Donor>
16,820
30,964
Amusingly enough, lambdas in Python are ridiculously neutered. The creator for some retard reason thinks they should be limited to a single line. Silly.
 

Deathwing

<Bronze Donator>
16,429
7,440
I'm not a great coder, so it may be easier for you, I get by. But this is one I saw a week or so back that I was all "whaaa?"

Code:
task = lambda x: int(max(list(str(x:emoji_nose:)
bonus1 = lambda x: int(''.join((sorted(str(x)+'0'*4, reverse=True))[:4]))

def bonus2_raw(x, n):
    if x == 6174: return n
    return bonus2_raw(bonus1(x)-int(''.join(sorted(str(x:emoji_nose:), n+1)

bonus2 = lambda x: bonus2_raw(x, 0)

print(task(123))
print(bonus1(123))
print(bonus2(1004))

I understand what the code itself is doing. I think lambdas, in this example, are pointless and just add to the confusion. On top of that, the names of some of the functions give you no clue as to what they do. Instead of 'task', how about 'find_largest_int_in_str', or maybe something a bit less wordy. But not 'task'.

I've found lambdas to have limited use. Most of the time I'll make a really simple one when a function I'm calling insists on a callable for one of it's parameters. Then, it might even be something as simple as 'lambda x, y: x + y'.
 

moontayle

Golden Squire
4,302
165
There's a fine line to tread between too verbose and too concise. If the conciseness of the code renders it unable to be deciphered, then that's just as bad as code that's so verbose and full of ceremony (looking at you, Java) as to be virtually unreadable.

Lambdas are a godsend in Android though. Them Google engineers love their anonymous inner classes for the front end UI stuff.