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
geeves
Sep 16, 2004

necrobobsledder posted:

Depending upon the development culture and median level of maturity in the organization, your level of difficulty is somewhere between "difficult" and "impossible" because in the worst case you will actually never get it done and be able to put it on your resume before the company closes shop. Be careful trying to adopt most of the patterns espoused by Martin Fowler because his clients have tended to be really old, crotchety software organizations that typically have more money than engineering talent along with some fairly decent amount of time compared to what most smaller organizations have. His primary espoused approach is the Strangler pattern. You should also avoid accidentally creating a distributed monolith in the process of breaking apart concerns.

One approach I've advocated for a Grails application that I was modernizing recently was to convert the architecture into what it really is - a workflow pipeline with strict SLAs on jobs executing to completion that includes file transfers over unreliable links. To begin with, we need to start removing things from the primary, monolithic database (meaning, starting from the persistence layer) and one way to do it would be to use something like Bottled Water to turn Postgres updates into Kafka messages. The end state of application architecture would be that services would read events from various topics and because our services are typically completely terrible and crashed frequently using JMS or ActiveMQ for task queuing would be risky.

From the services side the application had grown to performing server configuration duties in the same database so after that concern was moved toward a separate datastore like Zookeeper or Etcd (trying to use Postgres as a service discovery mechanism is super awkward in tooling for starters) we can use something like SmartStack to help configure stateful node configurations as components change. If you're a big boy, after this you can use Eureka and Archaius (if you're on the JVM) to do something similar but with greater amounts of control given to the application to react to configuration changes as a lifecycle.

I mostly gave up on this general effort when I realized that most of the developers don't have basic troubleshooting skills for the existing system in the first place and really couldn't help me migrate service components without swamping me with a barrage of menial questions despite all the training and support I've offered. I mean seriously, is it that hard to lookup docker exec?

Thank you this is great!

The Strangler Pattern seems to bolster what I mentioned to my boss the other day about building around our current one piece by piece.

Our app is in struts2, Jersey and angular 1.3. It's a nightmare. There is no checkstyle, no unit tests (and the few that exist are more functional tests than unit tests). With struts having several serious vulnerabilities, I'm hoping that in an of itself is planting the seeds that in time we need to move away from it and legacy that poo poo.

I rather like Jersey, but we're writing a new API from scratch for another project and using Spring and Kotlin and while I'm not working on it directly, I have done some code reviews and I really like what I see. I'm hoping that eventually the API will be the backbone of new development in time.

Adbot
ADBOT LOVES YOU

necrobobsledder
Mar 21, 2005
Lay down your soul to the gods rock 'n roll
Nap Ghost
I forgot about this article by the Nginx folks with some detail on component refactoring. Normally when people talk about breaking apart a monolith it usually involves some talk about microservices, and they are not mutually exclusive at all. You can have a series of monoliths each acting as a "microservice" (relatively speaking). In fact, if you don't have all the good stuff needed, I recommend splitting out only one module to a service and pick something somewhat used and important. People tend to try to pull out something low-risk, learn the wrong lessons about running a new service (ie. oh gosh, that was easy, we don't need monitoring! derp) and continue to repeat mistakes of bad design.

I also hope you're trying to use Spring Boot rather than a framework that's not aware of the needs of 12F applications. Like it or not, containerization is the direction everyone and their dog is going. The good news is that a decently built 12F app should be super easy to build, test, and understand compared to most n-tier type applications. You can almost certainly deploy a 12F app into a J2EE application container, virtualenv, or other classic deployment methods, but you really cannot do it the other direction. For some of the anti-patterns that people tend to make with 12F apps, see 12 Fractured Apps.

With any kind of massive refactoring effort I really, really need to stress that it's hard to do and not necessarily because whatever you're trying to migrate to is difficult or bad. Most places I've had problems refactoring were because we had deficiencies in more basic things like good / valid tests, documented and understandable configurations / knobs, etc. and fixing those problems tend to dominate the so-called "refactoring" efforts. Technical debt is a bitch and addressing it right while refactoring and delivering features while not going insane and/or burning out is almost a holy grail of software engineering.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
At my current job we're actually building an opinionated library on top of Spring Boot. First, to codify best practices, i.e. preconfigure Spring Boot (things like Jackson serialization settings etc). Second, to provide clean Springesque abstractions on top of our (partially custom) infrastructure components. Third, to help people fall into the "pit of success" when they just use our defaults. By just including a parent pom the service will build, create a docker container and be fully deployable.

Hiding this behind a set of libraries does mean that it's trickier to build or debug than when you're just copy/pasting features you like from other services, but it's gradually picking up steam and becoming more stable. The people that are just using the library are quite happy with it and the more adventurous developers are also starting to contribute to the library itself.

TheBlackVegetable
Oct 29, 2006

necrobobsledder posted:

Depending upon the development culture and median level of maturity in the organization, your level of difficulty is somewhere between "difficult" and "impossible" because in the worst case you will actually never get it done and be able to put it on your resume before the company closes shop. Be careful trying to adopt most of the patterns espoused by Martin Fowler because his clients have tended to be really old, crotchety software organizations that typically have more money than engineering talent along with some fairly decent amount of time compared to what most smaller organizations have. His primary espoused approach is the Strangler pattern.

Cool, now I have a name for what I'm doing - I was calling it parasite-oriented development. I'm the sole developer on a 10 year old legacy app that's always evolving and due to the spaghetti nature and terrible architecture of the code, it's easier to code new features from scratch and host them inside the guts of the winforms client / windows service server, than to extend the existing code to support the new requirements.

The goal is to add features and replace existing ones piecemeal until all that remains of the original code is "int main ()"

Jo
Jan 24, 2005

:allears:
Soiled Meat

geeves posted:

I rather like Jersey, but we're writing a new API from scratch for another project and using Spring and Kotlin and while I'm not working on it directly, I have done some code reviews and I really like what I see. I'm hoping that eventually the API will be the backbone of new development in time.

Keep us posted on this. I enjoy Kotlin and have been thinking about building my next app in Spring.

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

geeves posted:

Thank you this is great!

The Strangler Pattern seems to bolster what I mentioned to my boss the other day about building around our current one piece by piece.

Our app is in struts2, Jersey and angular 1.3. It's a nightmare. There is no checkstyle, no unit tests (and the few that exist are more functional tests than unit tests). With struts having several serious vulnerabilities, I'm hoping that in an of itself is planting the seeds that in time we need to move away from it and legacy that poo poo.

I rather like Jersey, but we're writing a new API from scratch for another project and using Spring and Kotlin and while I'm not working on it directly, I have done some code reviews and I really like what I see. I'm hoping that eventually the API will be the backbone of new development in time.

Eek! How do Angular 1.3 apps still exist? Hit me up on PM and I can show you how to use Angular 1.5/6 with TypeScript that will make your life so much easier.

necrobobsledder
Mar 21, 2005
Lay down your soul to the gods rock 'n roll
Nap Ghost
I really, really hope Kotlin doesn't turn into Dart or Groovy where most of the software community just doesn't get behind it after doing some toy apps with it. There's too many things that remind me of what Groovy tried to do and now it's mostly relegated to Jenkins scripted jobs these days (because Grails is... not popular). We have enough dead languages and platforms on the JVM these days and it's just getting frustrating almost now.

Volguus
Mar 3, 2009

necrobobsledder posted:

I really, really hope Kotlin doesn't turn into Dart or Groovy where most of the software community just doesn't get behind it after doing some toy apps with it. There's too many things that remind me of what Groovy tried to do and now it's mostly relegated to Jenkins scripted jobs these days (because Grails is... not popular). We have enough dead languages and platforms on the JVM these days and it's just getting frustrating almost now.

It needs to provide something really really really amazing for the masses to try to switch. And, in my personal opinion, it doesn't. Kotlin is (at least right now) at most a big "meh".

Skandranon posted:

Eek! How do Angular 1.3 apps still exist? Hit me up on PM and I can show you how to use Angular 1.5/6 with TypeScript that will make your life so much easier.
They were written when 1.3 was da bomb. Angular 1.5 brought in a bunch of new things and broke a bunch of others. Since in the JS world the concept of "backwards compatibility" doesn't exist even for minor versions (and everyone is guilty of that, which makes me wonder if all of those developers are just toddlers playing with legos? they surely behave that way), either you work 100 hours per day just to keep things afloat or say gently caress it and stay put on a version that at least works. One has a product to make and ship not fiddle around with 100 versions that break in the most unexpected and bizarre ways. And you cannot do both.

Taffer
Oct 15, 2010


necrobobsledder posted:

I really, really hope Kotlin doesn't turn into Dart or Groovy where most of the software community just doesn't get behind it after doing some toy apps with it. There's too many things that remind me of what Groovy tried to do and now it's mostly relegated to Jenkins scripted jobs these days (because Grails is... not popular). We have enough dead languages and platforms on the JVM these days and it's just getting frustrating almost now.

Google supporting it officially for Android is a big step. Being fully Java interoperable and JVM compatible makes it applicable to a lot of stuff right out of the gate compared to something like Dart. And the fact that it's developed by jetbrains and plugs in perfectly smoothly to some of the best tooling out there makes it a much easier transition.

Time will tell obviously, but I think it has a few key benefits over other shiny new languages that give it a good leg up. I personally use it daily and absolutely love it. I really hope the Kotlin Native stuff pans out because that could make my day job a LOT easier.

Main Paineframe
Oct 27, 2010

Volguus posted:

It needs to provide something really really really amazing for the masses to try to switch. And, in my personal opinion, it doesn't. Kotlin is (at least right now) at most a big "meh".

They were written when 1.3 was da bomb. Angular 1.5 brought in a bunch of new things and broke a bunch of others. Since in the JS world the concept of "backwards compatibility" doesn't exist even for minor versions (and everyone is guilty of that, which makes me wonder if all of those developers are just toddlers playing with legos? they surely behave that way), either you work 100 hours per day just to keep things afloat or say gently caress it and stay put on a version that at least works. One has a product to make and ship not fiddle around with 100 versions that break in the most unexpected and bizarre ways. And you cannot do both.

This is where those "oh god, we need to update this code for a new browser/OS but it has a dependency on a library that hasn't been updated in ten years" situations come from. Sooner or later, you (or your successor) are going to have to deal with upgrading. The only choice you get to make is whether to do it sooner (when you're a minor version or two behind) or later (when you're so far behind that you're basically rebuilding the whole thing).

Volguus
Mar 3, 2009

Main Paineframe posted:

This is where those "oh god, we need to update this code for a new browser/OS but it has a dependency on a library that hasn't been updated in ten years" situations come from. Sooner or later, you (or your successor) are going to have to deal with upgrading. The only choice you get to make is whether to do it sooner (when you're a minor version or two behind) or later (when you're so far behind that you're basically rebuilding the whole thing).

Hey, we're talking about web/JS here, right? While in the past IE required a special branch for itself, nowadays the situation is not so dire (chrome is taking IEs place with its monopoly and deviation from standards but it's not so bad yet), so "new browser/OS" shouldn't be a thing anymore. And the upgrade choice will always be never since, as I said before, they break poo poo all the time so you either babysit it constantly or you don't. 10 years from now (hell, 10 months from now) the landscape will be completely different anyway (from libraries, frameworks to build tools and hopefully package managers) so ... it's really not a thing to worry about : you will have to rewrite it later. Or ... you don't and the new interns that will be hired 5 years from now (they work for pickles and they're perfect for JS development) will hate your guts. But, that's on them , you're in management now and get to yell at them for being lazy pricks.

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

Volguus posted:

Hey, we're talking about web/JS here, right? While in the past IE required a special branch for itself, nowadays the situation is not so dire (chrome is taking IEs place with its monopoly and deviation from standards but it's not so bad yet), so "new browser/OS" shouldn't be a thing anymore. And the upgrade choice will always be never since, as I said before, they break poo poo all the time so you either babysit it constantly or you don't. 10 years from now (hell, 10 months from now) the landscape will be completely different anyway (from libraries, frameworks to build tools and hopefully package managers) so ... it's really not a thing to worry about : you will have to rewrite it later. Or ... you don't and the new interns that will be hired 5 years from now (they work for pickles and they're perfect for JS development) will hate your guts. But, that's on them , you're in management now and get to yell at them for being lazy pricks.

I try to force upgrades whenever possible, because otherwise it does become never. However, for the specific example of Angular 1.3 -> Angular 1.5, nothing broke and it made things unconditionally better. It easily paid for itself.

geeves
Sep 16, 2004

Skandranon posted:

I try to force upgrades whenever possible, because otherwise it does become never. However, for the specific example of Angular 1.3 -> Angular 1.5, nothing broke and it made things unconditionally better. It easily paid for itself.

This is how we are. We have a couple of plugins that break when attempted to update to jQuery 2 (we're hilariously stuck on 1.8).

What stopped us from going from Angular 1.3 to 1.5 at the time, was some unit tests were breaking with regard to Angular Translate. It worked regardless, but I got a lot of pushback by one person not to disrupt the (worthless) tests. Since the guy is no longer there, I have removed that test. I just never got the "okay" to upgrade. We're in a better place now to handle the upgrade as we have more coverage on functional tests, etc. to handle this for us.

But, it's not worth it to be as the big problem we have isn't so much that we're not using 1.5/6 or Typescript, it's that we only use Angular in the Angular way in a handful of places.

I wasn't involved with the introduction to angular and missed a couple of months of work due to an accident I had. When I returned, everything was still jQuery like before; I was confused before realizing the two cockless wonders whose idea this was just wrapped jQuery and all of our JS into Angular Controllers that were tied every to Struts Action via Sitemesh's templating system. They made 2 actual directives in 8 months. :wtc: Then they both quit within a month of each other right after this project went live.

I nearly quit, I probably should have given the hell the last 2 years have been trying to course correct.

Now my company's gun shy about any other frameworks and I'm really soured on Angular to the point that I just write VanillaJS unless absolutely necessary.

So I'm hoping that this Strangler / Containerization is accepted going forward or else I'm probably out of there.

Main Paineframe
Oct 27, 2010

Volguus posted:

Hey, we're talking about web/JS here, right? While in the past IE required a special branch for itself, nowadays the situation is not so dire (chrome is taking IEs place with its monopoly and deviation from standards but it's not so bad yet), so "new browser/OS" shouldn't be a thing anymore. And the upgrade choice will always be never since, as I said before, they break poo poo all the time so you either babysit it constantly or you don't. 10 years from now (hell, 10 months from now) the landscape will be completely different anyway (from libraries, frameworks to build tools and hopefully package managers) so ... it's really not a thing to worry about : you will have to rewrite it later. Or ... you don't and the new interns that will be hired 5 years from now (they work for pickles and they're perfect for JS development) will hate your guts. But, that's on them , you're in management now and get to yell at them for being lazy pricks.

IE may still require a special branch for itself - at least, if people about five years ago followed this exact logic to decide to just turn on compatibility mode to keep their old IE6 code working forever instead of wasting precious dev time "upgrading" to new IE versions. :shepicide:

Pollyanna
Mar 5, 2005

Milk's on them.


Team lead got promoted to Director, so now he's extra unavailable. :shepface:

Edit: he still has time to nitpick my PRs to death, though. My fault for just wanting to get my work and PRs out the door, I guess. I'm rushing everything.

Pollyanna fucked around with this message at 14:58 on Sep 19, 2017

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

Pollyanna posted:

Team lead got promoted to Director, so now he's extra unavailable. :shepface:

Edit: he still has time to nitpick my PRs to death, though. My fault for just wanting to get my work and PRs out the door, I guess. I'm rushing everything.

Get your rear end out the door. How are you not spending at least 20 hours/week finding a new job?

Pollyanna
Mar 5, 2005

Milk's on them.


Skandranon posted:

Get your rear end out the door. How are you not spending at least 20 hours/week finding a new job?

I am :confused: I'm just being picky/passively looking. This is all gossip at this point.

Pollyanna fucked around with this message at 17:03 on Sep 19, 2017

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

Pollyanna posted:

I am :confused: I'm just being picky/passively looking. This is all gossip at this point.

Sure... but your situation seems to be getting worse and you don't seem sufficiently motivated. If I was making the same complaints you have been, I'd be out of there ASAP (or I would slap my past self for not moving faster).

Munkeymon
Aug 14, 2003

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



Skandranon posted:

Sure... but your situation seems to be getting worse and you don't seem sufficiently motivated. If I was making the same complaints you have been, I'd be out of there ASAP (or I would slap my past self for not moving faster).

I don't think motivation is the issue so much as fear of the unknown.

CPColin
Sep 9, 2003

Big ol' smile.
A Jeopardy! clue last night, in the "Y in the middle" category was "An excessively cheerful or optimistic person." The response, which nobody got, was "Pollyanna." I laughed.

Anyway, I went home sick yesterday and crossed my fingers I'd have an email from one of our vendors waiting for me today, saying they'd fixed the latest bug that came up during testing. Nope! Looks like it's another day of thumb-twiddling for me! (Everybody who's supposed to be "training" me is out.)

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

Munkeymon posted:

I don't think motivation is the issue so much as fear of the unknown.

That's why you need to get hell behind you and not in front of you. Pollyanna, spend some time thinking about how bad your life will be with your new Team Lead as Director, picking apart your PRs, making even worse architecture decisions, and not documenting them. Think about how bitter and miserable you will be if you don't get up off your rear end and find a better job right now. Write it down.

geeves
Sep 16, 2004

Skandranon posted:

That's why you need to get hell behind you and not in front of you. Pollyanna, spend some time thinking about how bad your life will be with your new Team Lead as Director, picking apart your PRs, making even worse architecture decisions, and not documenting them. Think about how bitter and miserable you will be if you don't get up off your rear end and find a better job right now. Write it down.

Working in Development: Pollyanna's Existential Crisis

Pollyanna
Mar 5, 2005

Milk's on them.


Trust me, I know. But job hunting takes time and I gotta pay the bills while I find a new place.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
Gotta love it when you have to refactor some code by moving it around into new files, and then get smashed in the code review based on the contents of that moved code that you never actually touched.

Pollyanna
Mar 5, 2005

Milk's on them.


Two more original members of the office bite the dust. Only a handful of us left. How am I still here? Do they seriously think I'm valuable?

Rocko Bonaparte posted:

Gotta love it when you have to refactor some code by moving it around into new files, and then get smashed in the code review based on the contents of that moved code that you never actually touched.

"Getting smashed in the code review" would be so much better if it involved alcohol instead.

Munkeymon
Aug 14, 2003

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



Pollyanna posted:

Two more original members of the office bite the dust. Only a handful of us left. How am I still here? Do they seriously think I'm valuable?

How do you know they were laid off?

Pollyanna
Mar 5, 2005

Milk's on them.


Munkeymon posted:

How do you know they were laid off?

One was laid off, the other found a new job (and has been very vocal about it).

CPColin
Sep 9, 2003

Big ol' smile.
You might be valuable enough, relative to your pay, that they're okay with keeping you on while they slash away elsewhere. Management is always stupid like that. Like how I kept saying my last company desperately needed to address its technical debt, the company continued not to allow teams to do so, I rewrote my job description to include addressing technical debt as a priority, they accepted the new arrangement, and finally decided they didn't need a position dedicated to such a thing.

Volmarias
Dec 31, 2002

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

Rocko Bonaparte posted:

Gotta love it when you have to refactor some code by moving it around into new files, and then get smashed in the code review based on the contents of that moved code that you never actually touched.

Ah, the "while you're here" review comment. It doesn't require refactoring code out, just touching it at all. Bitter code review linting tools don't care that you just fixed a typo in a comment.

Pollyanna posted:

"Getting smashed in the code review"

Don't you dare steal the title of my next erotic novella

geeves
Sep 16, 2004

Volmarias posted:

Don't you dare steal the title of my next erotic novella

Finally! Everyone should read some real S&M, not some vampire fanfic.

Vulture Culture
Jul 14, 2003

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

Volmarias posted:

Ah, the "while you're here" review comment. It doesn't require refactoring code out, just touching it at all. Bitter code review linting tools don't care that you just fixed a typo in a comment.


Don't you dare steal the title of my next erotic novella
Honestly surprised this isn't already a Michael Warren Lucas title for Kindle

MisterZimbu
Mar 13, 2006
I hate systems that seem to think we want to know a relative time something happened rather than an actual exact timestamp. Yeah, Bitbucket, I wanted to know that that commit was "about four hours ago" or "three days ago" or "sometime this year maybe" instead of something useful.

JIRA, Bitbucket, and Octopus Deploy off the top of my head all do this - all things where I actually want precise information.

#1 pet peeve, after everything else about development.

CPColin
Sep 9, 2003

Big ol' smile.
Even worse is when such systems don't put the actual timestamp in a tooltip. I'm looking at you, previous company! A bunch of us protested that "feature" when it was being thought of and the PO just shrugged and did it anyway.

Rubellavator
Aug 16, 2007

MisterZimbu posted:

I hate systems that seem to think we want to know a relative time something happened rather than an actual exact timestamp. Yeah, Bitbucket, I wanted to know that that commit was "about four hours ago" or "three days ago" or "sometime this year maybe" instead of something useful.

JIRA, Bitbucket, and Octopus Deploy off the top of my head all do this - all things where I actually want precise information.

#1 pet peeve, after everything else about development.

We have a funny problem with our jira server inexplicably being 10 minutes ahead, so you get things like "Jason commented in ten minutes: not reproducible".

Gounads
Mar 13, 2013

Where am I?
How did I get here?

MisterZimbu posted:

I hate systems that seem to think we want to know a relative time something happened rather than an actual exact timestamp. Yeah, Bitbucket, I wanted to know that that commit was "about four hours ago" or "three days ago" or "sometime this year maybe" instead of something useful.

JIRA, Bitbucket, and Octopus Deploy off the top of my head all do this - all things where I actually want precise information.

#1 pet peeve, after everything else about development.

It's often done because timezones are hard and this solution is easy. (not an excuse)

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
Has anyone moved SRE/infrastructure teams to a 1-week sprint cadence? How did it work for you?

CPColin
Sep 9, 2003

Big ol' smile.
Why in the poo poo does Visual Studio not flag unused code by default? I'm trying to figure out what the hell this class does and apparently half of its private members are completely unreferenced. Say what you will about Eclipse, but at least it warns you pretty quickly when stuff isn't used!

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

CPColin posted:

Why in the poo poo does Visual Studio not flag unused code by default? I'm trying to figure out what the hell this class does and apparently half of its private members are completely unreferenced. Say what you will about Eclipse, but at least it warns you pretty quickly when stuff isn't used!

I will say about Eclipse it is a steaming pile of poo poo.

Munkeymon
Aug 14, 2003

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



CPColin posted:

Why in the poo poo does Visual Studio not flag unused code by default? I'm trying to figure out what the hell this class does and apparently half of its private members are completely unreferenced. Say what you will about Eclipse, but at least it warns you pretty quickly when stuff isn't used!

2017 Pro does and I'm pretty sure I'm using default settings for the most part

Adbot
ADBOT LOVES YOU

CPColin
Sep 9, 2003

Big ol' smile.
Good thing we're on 2015 because ???

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