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

B-Nasty posted:

Of course, D.R.Y. can cut both ways also. Changing that reused function may have unintended consequences in a whole other area of code you weren't even dealing with. Being too strict with DRY can also lead to over-complicated or over-engineered functions that would be better as simple copy-pastes without unnecessary options or genericized concepts.

Like most things, it's a judgement call. If you feel like you're being 'tricky' or 'clever', that's probably when you should step back and rethink the implementation.

A painful lesson to learn is to shut down the temptation to think like, "I need to do this thing that's really close to this other thing so if I just add a boolean flag here..." NOPE You will regret it or the person that follows you will regret it.

Adbot
ADBOT LOVES YOU

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Use the same style that the language uses. If your workplace has a different style, feel ashamed for them then do it their way while you're there.

I'm a little surprised that there's no language that allows spaces in identifiers, as long as you don't use a reserved keyword.

zerofunk
Apr 24, 2004

Xarn posted:

This sounds a lot like "I don't want to think for myself and have responsibility". I know that you think about yourself as a junior, but that shouldn't preclude you from having some initiative.

This is especially true if you want to move into more senior roles.

Capri Sun Tzu
Oct 24, 2017

by Reene

Volmarias posted:

I'm a little surprised that there's no language that allows spaces in identifiers, as long as you don't use a reserved keyword.
That would be insanely difficult to read, don't you think?

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

Hughlander posted:

A painful lesson to learn is to shut down the temptation to think like, "I need to do this thing that's really close to this other thing so if I just add a boolean flag here..." NOPE You will regret it or the person that follows you will regret it.

I like thinking of it along a continuum. You can repeat nothing, or couple nothing. They are both virtues that are diametrically opposed to each other, and you need to find the right balance between the two.

Mniot
May 22, 2003
Not the one you know

Volmarias posted:

Use the same style that the language uses. If your workplace has a different style, feel ashamed for them then do it their way while you're there.

I'm a little surprised that there's no language that allows spaces in identifiers, as long as you don't use a reserved keyword.

Yes! Also, allow spaces to mean function call arguments.

code:
code block = {
  data = read from database
  clean data
  validate data
  write to database data
}
revert if error = get env "REVERT_ERR"
try:
  attempt to run code block
except:
  if revert if error:
    revert database
  else:
    re-raise exception

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

You guys are great, the last 50 posts are gold.

To Pollyanna, if you make a change and the whole house falls down, it sounds like a business case for some unit tests.

The Fool
Oct 16, 2003


Mniot posted:

Yes! Also, allow spaces to mean function call arguments.

Powershell does this.

code:
function Get-UserInfo($ID) {
    return $stuff
}

$user = Get-UserInfo 1234

Pollyanna
Mar 5, 2005

Milk's on them.


Keetron posted:

To Pollyanna, if you make a change and the whole house falls down, it sounds like a business case for some unit tests.

Believe me, that’s the first thing I’ll be pushing for in the new year.

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

Pollyanna posted:

Believe me, that’s the first thing I’ll be pushing for in the new year.

Maybe you should approach this more gently? If you are unsure of removing some dead code from a module, how can you be so confident in telling your new employers their entire workflow sucks balls and you have the answer? Maybe just start writing some unit tests for your stuff and see how that goes.

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

I must say, in a project where I was the only one who wrote unit tests it quickly went down like
code:
mvn clean compile -DskipTest
A different project was found.

Ither
Jan 30, 2010

Volmarias posted:

Use the same style that the language uses. If your workplace has a different style, feel ashamed for them then do it their way while you're there.

I'm a little surprised that there's no language that allows spaces in identifiers, as long as you don't use a reserved keyword.

Nah, don't just silently take something.

If you think one way is correct and they don't, have a discussion about it.

Communication is the bedrock of all relationships. Business or otherwise.

Volguus
Mar 3, 2009

Keetron posted:

I must say, in a project where I was the only one who wrote unit tests it quickly went down like
code:
mvn clean compile -DskipTest
A different project was found.

They skipped the tests because they broke them? The tests that you wrote?

Hughlander
May 11, 2005

Volguus posted:

They skipped the tests because they broke them? The tests that you wrote?

"Them tests take too drat long, I just want it to compile drat it!"

Volmarias
Dec 31, 2002

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

Ither posted:

Nah, don't just silently take something.

If you think one way is correct and they don't, have a discussion about it.

Communication is the bedrock of all relationships. Business or otherwise.

Refactoring the codebase and effectively obliterating the per-line history for the sake of changing the writing style would and should get you laughed out of the meeting. For new projects it's a good idea, but A) you don't want to be the guy who replaced EVERYTHING because you thought it looked better and B) if they managed to do this already, it's a big code smell, and you'll probably have some strong optioned troglodyte blocking using the "right" style in a new project.

I mean, sure, talk about it, but be prepared for disappointment unless you already have upper level support to change things up

Volguus
Mar 3, 2009

Hughlander posted:

"Them tests take too drat long, I just want it to compile drat it!"

That is a valid problem though and the only solution is to not do too much poo poo, or too complicated poo poo in normal unit tests. In integration tests, sure, go a bit more crazy, but the tests taking a long time do have such an "skipTests" effect.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
In style issues the only right way is the consistent way. Flavour for aesthetic taste when establishing a project and then leave it. I don’t think I’ve ever had aesthetics actually be a detriment to authoring or reading, only code structure. While yes, choosing to one liner or destructure or nest ifs or whatever can venture into style guide territory, usually it’s in the realm of something that can be argued for and against without arriving at a purely personal and subjective aesthetic preference.

redleader
Aug 18, 2005

Engage according to operational parameters

Mniot posted:

Yes! Also, allow spaces to mean function call arguments.

code:
code block = {
  data = read from database
  clean data
  validate data
  write to database data
}
revert if error = get env "REVERT_ERR"
try:
  attempt to run code block
except:
  if revert if error:
    revert database
  else:
    re-raise exception


code:

CREATE PROCEDURE [Please do the needful] (@piss int, @poo poo varchar) AS ...

EXEC [Please do the needful] @gently caress, @whatever

JawnV6
Jul 4, 2004

So hot ...

Volmarias posted:

I'm a little surprised that there's no language that allows spaces in identifiers, as long as you don't use a reserved keyword.

The gnarliest identifiers I've dealt with are Verilog's escaped identifiers. Begin with a \, break on whitespace, any printable ascii character valid in between. It seems really cool, you can have all kinds of descriptive names: \foo , \bar , \foo+bar|baz , \!foo^(baz/\boo)

Then I had a coworker tearing his hair out for a week because of the assignment operator getting snarfed up by \escaped_identifier_foo=

It's worse dealing with some subsets of testing environments. FPGA compilers aren't as good as the mainline synthesis tools, so they'd flatten out structures which can include modules. When they could handle escaped identifiers, the name would be mangled beyond what I'd expect C++ to do to a symbol

geeves
Sep 16, 2004

Volguus posted:

That is a valid problem though and the only solution is to not do too much poo poo, or too complicated poo poo in normal unit tests. In integration tests, sure, go a bit more crazy, but the tests taking a long time do have such an "skipTests" effect.

It depends what you're using. I know in Java, you can configure surefire with Maven (I think with gradle, not sure - it might use something else) to run a subset of tests of what I'm working on. You can do similar things with Jest. I'm sure other languages have tools to support this as well.

It's not too difficult, and doesn't really take too long to setup - might take a while to get it totally right for your team. (I had to go this route, because I'm also one of the few consistent unit testers in my office and I've been slowly going back through our codebase and trying to parse out things that involve calculations, etc. CRUD stuff, I'm not too worried about mocking up legacy code.)

Setting this up, you can have some params for your local build (what you're doing) another setting for builds that happen throughout the day and a full suite for nightly builds. We have several builds designed in gradle to handle just that.

Chamook
Nov 17, 2006

wheeeeeeeeeeeeee

Volmarias posted:

I'm a little surprised that there's no language that allows spaces in identifiers, as long as you don't use a reserved keyword.

F# let's you do this by wrapping the name in double backticks. It's not always that good, but it's really nice for tests:


code:

let ``The thing does stuff`` () = 
    ...

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

Volguus posted:

They skipped the tests because they broke them? The tests that you wrote?

Yes and Yes. It was a special place.


geeves posted:

It depends what you're using. I know in Java, you can configure surefire with Maven (I think with gradle, not sure - it might use something else) to run a subset of tests of what I'm working on. You can do similar things with Jest. I'm sure other languages have tools to support this as well.

It's not too difficult, and doesn't really take too long to setup - might take a while to get it totally right for your team. (I had to go this route, because I'm also one of the few consistent unit testers in my office and I've been slowly going back through our codebase and trying to parse out things that involve calculations, etc. CRUD stuff, I'm not too worried about mocking up legacy code.)

Setting this up, you can have some params for your local build (what you're doing) another setting for builds that happen throughout the day and a full suite for nightly builds. We have several builds designed in gradle to handle just that.

This and using the failsafe plugin of maven to run integration tests.
In general I have found that people will disable tests if they are red to much, whatever the reason for that is. Oh and that I get asked to fix unit tests they broke because one day long ago I wrote them.

CPColin
Sep 9, 2003

Big ol' smile.
One of my coworkers at this place I'm leaving has repeatedly not let me know when she's not going to be in the office, so I don't realize I need to ask her something, say, Thursday afternoon, because she's planning to be out Friday. Well she took that to its logical conclusion, because she's out on vacation, starting today and ending after I leave forever. She left before I did yesterday without saying a word.

Also my supervisor and nominal Product Owner was out all day yesterday at Scrum training and just emailed the team to say she'll be out the rest of the week with it. This is her third round of Scrum training. She hasn't prioritized a single backlog item.

T-7 days!

Pollyanna
Mar 5, 2005

Milk's on them.


Nothing gives you confidence quite like a bunch of your users trashtalking your work. :shepicide: I know I shouldn’t take it too personally, but it’s still disheartening.

CPColin posted:

One of my coworkers at this place I'm leaving has repeatedly not let me know when she's not going to be in the office, so I don't realize I need to ask her something, say, Thursday afternoon, because she's planning to be out Friday. Well she took that to its logical conclusion, because she's out on vacation, starting today and ending after I leave forever. She left before I did yesterday without saying a word.

Also my supervisor and nominal Product Owner was out all day yesterday at Scrum training and just emailed the team to say she'll be out the rest of the week with it. This is her third round of Scrum training. She hasn't prioritized a single backlog item.

T-7 days!

They clearly don’t give a poo poo and are just coasting through the job. Just proves you made the right choice to leave.

CPColin
Sep 9, 2003

Big ol' smile.

Pollyanna posted:

Nothing gives you confidence quite like a bunch of your users trashtalking your work. :shepicide: I know I shouldn’t take it too personally, but it’s still disheartening.

What kind of stuff are they saying?

Pollyanna posted:

They clearly don’t give a poo poo and are just coasting through the job. Just proves you made the right choice to leave.

Yep. I need to go over my reasons with my boss's boss, because with coworkers like that, there's a little more to it than "the work is uninteresting." I might not, though, because I might not really care enough to have such an awkward conversation.

Pollyanna
Mar 5, 2005

Milk's on them.


CPColin posted:

What kind of stuff are they saying?

"What the gently caress are these UI changes", "why do they keep changing things without telling us", "what's the point of this new change", "I hate this new behavior", "this thing is buggy/broken", "do they ever listen to us", "I wish there was an alternative", etc. I've never really worked with direct feedback from users before, but it seems pretty dire to me.

Gounads
Mar 13, 2013

Where am I?
How did I get here?

Pollyanna posted:

"What the gently caress are these UI changes", "why do they keep changing things without telling us", "what's the point of this new change", "I hate this new behavior", "this thing is buggy/broken", "do they ever listen to us", "I wish there was an alternative", etc. I've never really worked with direct feedback from users before, but it seems pretty dire to me.

People happy with the changes don't say anything, so
It's almost always negative.
It's almost always change-averse.

Che Delilas
Nov 23, 2009
FREE TIBET WEED
Also remind yourself that you as a developer generally don't have the final say on what the UI looks like (marketing) or what bugs are important enough to fix (product owner). You have an opinion you should voice to those groups of people, but most of the feedback you listed was to them, not to you.

CPColin
Sep 9, 2003

Big ol' smile.

Pollyanna posted:

"What the gently caress are these UI changes", "why do they keep changing things without telling us", "what's the point of this new change", "I hate this new behavior", "this thing is buggy/broken", "do they ever listen to us", "I wish there was an alternative", etc. I've never really worked with direct feedback from users before, but it seems pretty dire to me.

Oh, nice. Tale as old as time!

geeves
Sep 16, 2004

Currently in progress in our sprint (yes, we schedule and pointed this)

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Have you groomed the story yet? What are the acceptance criteria?

geeves
Sep 16, 2004

Volmarias posted:

Have you groomed the story yet? What are the acceptance criteria?

Actually we did discuss if we wanted to watch the new ones or maybe throw in one of the OT. Then our CTO came in and decided for us, just like what happens during normal grooming and planning. :v:

ChickenWing
Jul 22, 2010

:v:

geeves posted:

Actually we did discuss if we wanted to watch the new ones or maybe throw in one of the OT. Then our CTO came in and decided for us, just like what happens during normal grooming and planning. :v:

Machete order or bust





Someone convince me why I should or should not switch from a windows work PC to a mac.


Pros: Macs get away from domain restrictions, meaning I won't have lovely enterprise mcafee and mandated bitlocker making my builds take 3 years and intellij hang all the drat time (allegedly. current coworkers on macs say they do not have these issues)

Cons: Windows4Lyfe

Volguus
Mar 3, 2009

ChickenWing posted:

Machete order or bust





Someone convince me why I should or should not switch from a windows work PC to a mac.


Pros: Macs get away from domain restrictions, meaning I won't have lovely enterprise mcafee and mandated bitlocker making my builds take 3 years and intellij hang all the drat time (allegedly. current coworkers on macs say they do not have these issues)

Cons: Windows4Lyfe
You should switch to a Linux box and get everything macs have plus a usable UI.
While some desktop environments on Linux do tend to go the idiotic Mac way, you can run whatever you want
And make it look and behave however you want.

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

ChickenWing posted:

Machete order or bust





Someone convince me why I should or should not switch from a windows work PC to a mac.


Pros: Macs get away from domain restrictions, meaning I won't have lovely enterprise mcafee and mandated bitlocker making my builds take 3 years and intellij hang all the drat time (allegedly. current coworkers on macs say they do not have these issues)

Cons: Windows4Lyfe

The look and feel of a MacBook Pro (2016 model) including build quality, is the best ever. Super smooth usage, the overall experience is like nothing I have seen.
If you ignore all that, if you ignore how your every day tool feels, looks and behaves... There is very little difference between Windows and Mac, provided neither is mistreated by your IT department. If you have enough memory and speedy parts, they are both fast.

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me
The Surface Book 2 is out now, and seems to be getting really good reviews.

Taffer
Oct 15, 2010


ChickenWing posted:

and intellij hang all the drat time (allegedly. current coworkers on macs say they do not have these issues)

Something else is going on, OS won't determine that. Maybe it's trying to index an enormous amount of stuff or something.

geeves
Sep 16, 2004

ChickenWing posted:

Machete order or bust

Someone convince me why I should or should not switch from a windows work PC to a mac.

Pros: Macs get away from domain restrictions, meaning I won't have lovely enterprise mcafee and mandated bitlocker making my builds take 3 years and intellij hang all the drat time (allegedly. current coworkers on macs say they do not have these issues)

Cons: Windows4Lyfe

Well, we're not watching John Wick 2. We can get away with violence,,, some of Machete wouldn't fly.

I switched from Windows to Mac 10 years ago. I have a kickass PC that I built, but it still lacks some features in programs that I run, despite its superior power. If you could get McAfee to ignore your development directories, that would probably help a lot because of all the files that are generated that McAfee automatically starts to scan every loving time. We had a similar problem with Sophos on the mac and we were able to get /opt/dev ignored and it's kind of the honor system that that path is only for our git repo.

IntelliJ hang is probably because you have something that's not ignored correctly with your project and it constantly re-indexes on build on npm updates / install etc. I usually get a re-index lag if I checkout wildly different branches or if something new has been introduced to the repo (we have a single repo for all of our apps). The other reason may simply be you don't have the correct memory settings. So if you have the RAM to spare, increase the default settings.

As for everything else Mac is closer to Linux environments. The thing that sucks is that Apple neuters quite a few things for their own reasons.

Terminal is great (tho almost everyone I know and I use iTerm for more customizability) and say what you will about Apple's file system vs. Windows, searching in Finder is nearly instantaneous vs Win Explorer.

If you do photography, Windows cannot open multiple Camera Raw files at the same time unlike MacOS, which can make en-masse photo editing a lot slower - this sucks when you have say 20 photos that are similar temperature and you want to do some basic adjustments.

Gounads
Mar 13, 2013

Where am I?
How did I get here?
To set a new release live, this company I'm working for has a web form where you type in a path to the release.
The form is submitted when focus leaves the input box.
Can't wait until the day when a calendar reminder pops up mid-typing.

Adbot
ADBOT LOVES YOU

Pollyanna
Mar 5, 2005

Milk's on them.


Gounads posted:

To set a new release live, this company I'm working for has a web form where you type in a path to the release.
The form is submitted when focus leaves the input box.
Can't wait until the day when a calendar reminder pops up mid-typing.

I'm surprised that hasn't already happened.

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