Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Hughlander
May 11, 2005

Gounads posted:

This would be ideal. Unfortunately I don't know where to send invoices yet.

It really isn't. I had that happen to me at the start of my career and it destroyed my work ethic for the next few years. I was paid 6 figures to play Everquest and go to the gym.

Adbot
ADBOT LOVES YOU

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

nelson posted:

What does ITIL stand for?
IT Infrastructure Library. It's a bunch of industry "best practices" around IT service management in a large organization. Only one small section of it deals with change management, but it's the one that gives the whole thing a really awful reputation because of how big a trainwreck it is when implemented whole-hog in most organizations.

Iverron
May 13, 2012

Hughlander posted:

It really isn't. I had that happen to me at the start of my career and it destroyed my work ethic for the next few years. I was paid 6 figures to play Everquest and go to the gym.

This is no joke. The game of coming up with increasingly creative ways to waste 8-9 hours each day is suffocatingly depressing.

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


Hughlander posted:

It really isn't. I had that happen to me at the start of my career and it destroyed my work ethic for the next few years. I was paid 6 figures to play Everquest and go to the gym.

This happened to me too, except it was a DoD contract and I was waiting on my security clearance, so my employer knew and didn't care, since my salary was coming out of the money the agency had to pay them anyway. The salary was entry-level, iirc mid-60s , and it was nearly a year before I was allowed on-site.

(at which point entirely new levels of agilefail were revealed, but ugh)

e: During this time, my dad said I should get a part time job bagging groceries or something, for the stated reason of extra money and the unstated reason of avoiding clinical depression. I didn't follow his advice, but luckily I kept my head, probably thanks to friends.

e2: please remember my tale anytime you hear about a government IT project going over budget

Doc Hawkins fucked around with this message at 11:57 on Oct 15, 2016

ChickenWing
Jul 22, 2010

:v:

Do any of you use linter information for code cleanup at work, and if so how helpful do you tend to find it? I spent the majority of today working on paying down tech debt as reported by Sonar and I got to wondering how much of this was stuff people actually worry about overmuch. I imagine it's at least partly domain-dependent - I'm working in java, so a lot of stuff I fixed was along the lines of "use isEmpty() rather than size > 0" or "use the diamond operator rather than redundantly respecifying generic parameters". However, stuff like reducing cyclomatic complexity seemed like it would be more widely applicable.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

ChickenWing posted:

Do any of you use linter information for code cleanup at work, and if so how helpful do you tend to find it? I spent the majority of today working on paying down tech debt as reported by Sonar and I got to wondering how much of this was stuff people actually worry about overmuch. I imagine it's at least partly domain-dependent - I'm working in java, so a lot of stuff I fixed was along the lines of "use isEmpty() rather than size > 0" or "use the diamond operator rather than redundantly respecifying generic parameters". However, stuff like reducing cyclomatic complexity seemed like it would be more widely applicable.

Ehh let's say we have 100 files that mostly just have a little bit of dumb poo poo like those isEmpty() shenanigans. Then you have one file that has hundreds of things going off in it. That file probably contains a cesspool that needs some attention. The rest can probably be ignored.

necrobobsledder
Mar 21, 2005
Lay down your soul to the gods rock 'n roll
Nap Ghost
For stable code that hasn't broken much and is not likely to be modified into the future, I'd put in linter exceptions on those lines and whoever starts messing with those files later will have to justify disturbing the peace. What it buys in the near-term is clean linter output and acknowledgement that nothing's perfect. I applied this principle for having to make all my crap pass HP Fortify rules (including some truly stupid stuff like "cannot emit anything derived from input to logging, even if you sanitized the input") and kept conversations on-point to recent work primarily.

Doc Hawkins posted:

This happened to me too, except it was a DoD contract and I was waiting on my security clearance...
DoD is a public works program that neoconservatives accept under the allusion of "protecting America." Accepting that made it easier for my brain to process the daily deluge of :psyduck: and made my decision to leave it behind permanently easier.

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


The largest and most expensive network of halfway houses in the world.

vonnegutt
Aug 7, 2006
Hobocamp.

Rocko Bonaparte posted:

Ehh let's say we have 100 files that mostly just have a little bit of dumb poo poo like those isEmpty() shenanigans. Then you have one file that has hundreds of things going off in it. That file probably contains a cesspool that needs some attention. The rest can probably be ignored.

IME teams/codebases that ignore low hanging fruit like linter stuff tend to have pretty bad overall code quality (horrible spaghetti code, lack of good exception handling, riddled with stupid bugs). It's the canary in the coal mine that the team either doesn't care or isn't given the time to clean up after themselves.

This assumes you have a sane linter, preferably configurable. I'm not above adding a linter exception or two to prevent some stupid refactorings.

ToxicSlurpee
Nov 5, 2003

-=SEND HELP=-


Pillbug

ChickenWing posted:

Do any of you use linter information for code cleanup at work, and if so how helpful do you tend to find it? I spent the majority of today working on paying down tech debt as reported by Sonar and I got to wondering how much of this was stuff people actually worry about overmuch. I imagine it's at least partly domain-dependent - I'm working in java, so a lot of stuff I fixed was along the lines of "use isEmpty() rather than size > 0" or "use the diamond operator rather than redundantly respecifying generic parameters". However, stuff like reducing cyclomatic complexity seemed like it would be more widely applicable.

Sonar is more of a reminder not to code like a dumbass. Cyclomatic complexity is a big one; you might think you'll remember what that horrifying mess of if statements, for loops, and switches does but come back to it a year from now. You won't. Worse yet somebody else might have to untangle that mess. Beyond a certain point it's best to refactor it somehow in combining if statements or just chunking it into functions that have a lower complexity. Keeping that stuff low makes code more maintainable and less bug prone.

Sometimes it's just plain unavoidable so you can tell Sonar "yeah just ignore that." In some cases a cyclomatic complexity of 15 to 20 is perfectly fine but as a general rule you should avoid getting above 10. Other stuff is just little reminders of better ways to do things; isEmpty() is a perfect example. Nested ifs and fors are another; going more than 3 deep is just ugly and unreadable. It will probably function but break that stuff apart.

Generally speaking the view should be "I'll not do these things in the future and will fix old code as I have time." But, like was said, a class that Sonar finds 50 problems with is probably a horrifying Codethulhu that will haunt your dreams and devour your soul.

Probably the most important thing that Sonar reminds you to do is thrown meaningful exceptions. Just throwing "exception" isn't a good idea; it should be an indicator of just what went wrong so that way when it does go wrong (remember, it's not if your program crashes it's when) you have a good indicator of just what did go wrong and have an easier time tracking it down.

You won't ever learn all of the rules and you do still have deadlines but Sonar is helpful.

ChickenWing
Jul 22, 2010

:v:

Okay that's sorta what I expected. I've gone through this stuff a couple of times and I will admit it's definitely instilled some better habits and helped me become more familiar with some of the java features I didn't know much about. Plus, figuring out how to deal with the cyclomatic complexity and overnested ifs/fors/etc has helped me stretch my brain a bit, which is nice because it's not like anything else is going to do that in banking :v:

spiritual bypass
Feb 19, 2008

Grimey Drawer
When you're writing software, do you find most of the challenge to be in code organization rather than algorithm development? Seems like everything I do is pretty easy. Getting things done while preventing or fixing a mess feels like the only part worth being proud of.

ChickenWing
Jul 22, 2010

:v:

Yeah, pretty much. My tech lead described it best: "honestly, all we're doing is taking this and putting it over here." Middletier server software is not very complicated - take input from frontend, translate it from view object to model object, put model objects in the database. Mostly, my satisfaction comes when I get to learn a new java feature that I haven't touched before (the first function I wrote after learning about Optionals, Streams and Lambdas was an unholy mess), or when I get to write something clever or elegant to replace big gross walls of spaghetti code.


I also get cathartic pleasure from ripping out core functionality and getting the bleeding remnants patched back into something functional again. I feel like one of those guys that mugs you and steals your kidney and leaves you in an ice-filled bathtub.

Space Kablooey
May 6, 2009


rt4 posted:

When you're writing software, do you find most of the challenge to be in code organization rather than algorithm development? Seems like everything I do is pretty easy. Getting things done while preventing or fixing a mess feels like the only part worth being proud of.

This has been my experience as well. Except for optimization or if it is something really specific to your problems, say business logic for report#6789 for startup#1234, I figure that the really interesting algorithms have already been abstracted away to libraries and such.

FlapYoJacks
Feb 12, 2009
Since 99% of my coding is in the Linux kernel, it's not the code; it's bullshit stuff like clocks being over-written, terrible vendor drivers, and power supply management that give me the hardest time. :v:

That and naming things.

smackfu
Jun 7, 2004

rt4 posted:

Seems like everything I do is pretty easy. Getting things done while preventing or fixing a mess feels like the only part worth being proud of.
The two most challenging things I do are performance improvements (when the easy way is just too slow) and tricky production debugging.

Gounads
Mar 13, 2013

Where am I?
How did I get here?

rt4 posted:

When you're writing software, do you find most of the challenge to be in code organization rather than algorithm development? Seems like everything I do is pretty easy. Getting things done while preventing or fixing a mess feels like the only part worth being proud of.

Does that include naming things? If so, then yes.

ChickenWing
Jul 22, 2010

:v:

More linter victories: I figured out how the :: operator works in java :sun:

Also one of the guys on my team checked out my code review and helpfully came over to teach me how the Stream.map() function works, helping me reduce 8 lines of janky code to 4 lines of halfway decent looking code.

Feeling good today :c00lbert:

Ice Fist
Jun 20, 2012

^^ Please send feedback to beefstache911@hotmail.com, this is not a joke that 'stache is the real deal. Serious assessments only. ^^

ToxicSlurpee posted:

Probably the most important thing that Sonar reminds you to do is thrown meaningful exceptions. Just throwing "exception" isn't a good idea; it should be an indicator of just what went wrong so that way when it does go wrong (remember, it's not if your program crashes it's when) you have a good indicator of just what did go wrong and have an easier time tracking it down.

This makes me feel pretty vindicated about all those exceptions I wrote that some of my team members roll their eyes at. I usually get the last laugh when there's a problem and VerySpecificNameForProblemException gets thrown and shows up in a log and I'm like :smug: "there's your problem"

necrobobsledder
Mar 21, 2005
Lay down your soul to the gods rock 'n roll
Nap Ghost
I liked my passive aggressive exceptions that never happened:

code:
try {
//
} catch (SomeCase a) {
    throw new CoworkerAWasRight(a);
} catch (SomeCaseB b) {
    throw new CoworkerBWasWrong(b);
} 
At one point I was thinking of changing the exceptions to point to URLs in the wiki chronicling the debates because it wasn't going to be the development team that's trying to figure out the problem initially, it'll be someone in support or a field engineer far into the future because we were all in the process of quitting the company.

ChickenWing
Jul 22, 2010

:v:

git is actual real magic

Gounads
Mar 13, 2013

Where am I?
How did I get here?

ChickenWing posted:

git is actual real magic

Place I started at a few weeks back has code under active development in svn and I had forgotten how horrible it was compared to git.

spiritual bypass
Feb 19, 2008

Grimey Drawer
"What's the problem? You can branch with svn"

KoRMaK
Jul 31, 2012



Gounads posted:

Place I started at a few weeks back has code under active development in svn and I had forgotten how horrible it was compared to git.
Oh god.

I was on a project that used perforce and that poo poo was impossible as well.


I still don't understand how to merge conflicts in svn. Like, is it like sourcesafe where two people just shouldn't work on the same file at the same time?


ChickenWing posted:

git is actual real magic
It's actually a graph!

http://think-like-a-git.net/

ChickenWing
Jul 22, 2010

:v:

oh god I shouldn't be allowed to touch code

I've been frazzled this week because I've been juggling about a billion tiny stories that have had wierd qa problems, integration support, and regular stories. It all came to a head today when I opened up a PR that contained the following snippet

code:
boolean <variable> = "Y".equals(customer.get<some indicator>()) ? true : false;
:shepface:

KoRMaK
Jul 31, 2012



We got our testing suite (nearly) merged into master and also got our CI running. People can start merging the testing branch into their features and are going to write automated tests starting this sprint.


Feels good.

baquerd
Jul 2, 2007

by FactsAreUseless

KoRMaK posted:

I still don't understand how to merge conflicts in svn. Like, is it like sourcesafe where two people just shouldn't work on the same file at the same time?

Use a third party tool. IntelliJ dealt pretty well with simple SVN conflicts in the mid 2000's. In general though, you're just in for a world of hurt if things have gotten at all complicated with files moving/renamed/etc.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



ChickenWing posted:

git is actual real magic

Powerful with arcane, often nonsensical incantations and prone to going inscrutibly wrong if you don't know what you're doing? Yeah, that checks out :v:

Yes, I know it's better nowdays. I'm still bitter Mercurial didn't win because its interface was actually ment to be used by someone other than Linus

comedyblissoption
Mar 15, 2006

KoRMaK posted:

I still don't understand how to merge conflicts in svn. Like, is it like sourcesafe where two people just shouldn't work on the same file at the same time?
You recreate your branch history in git, merge rebase it on top of trunk, then push your rebased commits to svn.

I've literally done this manually and it was a better experience than branch merging in svn. I didn't use git-svn because our svn repository was too big.

ChickenWing
Jul 22, 2010

:v:

I mean really all I did was revert a merge that happened last week, I was just amazed that it worked so well. I first learned git for a university course and we weren't "taught" so much as "told to use git and shown how to push/pull". This being a second year university course, our code was all jammed into one file. None of us knew how to merge. We ended up just using dropbox (because why bother even getting a notification when you're about to completely overwrite someone else's code :shepface: )

Now, every time I attempt something outside the realm of my understanding, I generally expect that I'm going to irrevocably destroy everything and have to start from scratch. This is not ameliorated by the fact that my first real dev job was at a bank that used SVN, and so sometimes just pulling would break everything to the point that I'd just wipe everything and start from scratch.

Gounads
Mar 13, 2013

Where am I?
How did I get here?
At least a day and a half trying to get an ancient hacked up version of ejabberd running on my machine.

Requires specific C compiler versions.
Requires a version of erlang so old there's no osx packages for it.
Requires a version of openssl so old insecure there's no packages for it.
Requires a version of erlang so old there's no packages for it.

Also, had to figure out each of those 4 points on my own since the documentation on how to build this assumes everything is right by default.

After getting all that built, esoteric erlang stack traces when I run it that I have no idea how to read.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

ChickenWing posted:

This is not ameliorated by the fact that my first real dev job was at a bank that used SVN, and so sometimes just pulling would break everything to the point that I'd just wipe everything and start from scratch.

My college never taught (and still doesn't!) any sort of source control, and my first job used Visual Source Safe 6.0. Atomic file locking to "check out" files. Need to change a file someone else has checked out? Send them a snippet of changes and ask them to put it in there while they're working. Tests? Why bother, you can just step through your debug print statements. I was the first person there to try using a debugger instead of just reading entrails logs.

At my next job, I asked the tech lead what happened when two people edited the same file at once with SVN, wouldn't someone's changes get overwritten? I think I just got a patronizing smile and "that doesn't really happen, don't worry about it."

I have spent a lot of time unlearning things.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Gounads posted:

At least a day and a half trying to get an ancient hacked up version of ejabberd running on my machine.

Requires specific C compiler versions.
Requires a version of erlang so old there's no osx packages for it.
Requires a version of openssl so old insecure there's no packages for it.
Requires a version of erlang so old there's no packages for it.

Also, had to figure out each of those 4 points on my own since the documentation on how to build this assumes everything is right by default.

After getting all that built, esoteric erlang stack traces when I run it that I have no idea how to read.

Wha? Why?

revmoo
May 25, 2006

#basta
Just got through to the end of the interview process at a company. Sat down today to sign the new hire paperwork and they shoved a contract in front of me that says if I quit within a year I have to reimburse the company's costs for the recruitment fee. That is a new low.

I got up and walked out.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

revmoo posted:

Just got through to the end of the interview process at a company. Sat down today to sign the new hire paperwork and they shoved a contract in front of me that says if I quit within a year I have to reimburse the company's costs for the recruitment fee. That is a new low.

I got up and walked out.

I guess they didn't come running after you? Did you attempt to strike that part of the contract before walking?

kedo
Nov 27, 2007

taqueso posted:

I guess they didn't come running after you? Did you attempt to strike that part of the contract before walking?

A company that thinks putting something like that in a contract is a good idea is going to be terrible to work for regardless as to whether or not they'd strike it.

Mezzanine
Aug 23, 2009

Rocko Bonaparte posted:

dumb poo poo like those isEmpty() shenanigans

Could somebody explain this, please? I use String.isEmpty() and also ArrayList.isEmpty()... am I a bad developer?

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

Mezzanine posted:

Could somebody explain this, please? I use String.isEmpty() and also ArrayList.isEmpty()... am I a bad developer?

I think the complaint was more about obsessively going through a codebase and changing all x == "" to x.isEmpty() because some coding tool told you to.

revmoo
May 25, 2006

#basta

kedo posted:

A company that thinks putting something like that in a contract is a good idea is going to be terrible to work for regardless as to whether or not they'd strike it.

Yes this. Plus anyone I would work with would have signed said contract. I like working with smart people not dumb ones.

Adbot
ADBOT LOVES YOU

Mezzanine
Aug 23, 2009

Skandranon posted:

I think the complaint was more about obsessively going through a codebase and changing all x == "" to x.isEmpty() because some coding tool told you to.

Ohh, gotcha. Thanks for clarifying!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply