Toto expertentipp

toto expertentipp

Datum, Heim, Auswärts, Erg. Tipp, Res. G, U, V, 1, X, 2 Richtige Tipptendenz, 30, %. Exakter Tipp, 5, %. Prognosewert, %. Gewinn, Units . Der aktuelle TOTO-Promi-Tipp für die 13er Ergebniswette der Fußballwette mit Jackpot: Bastian Hellberg tippt die nächste TOTO-Wettrunde!. Seit haben wir weitere Sportwetten Tipp Experten für die Bundesliga und andere Ligen und Sportarten an Bord geholt, deren Prognosen können Sie heute . I felt disappointed at the beginning, I wondered how high-paid engineers could write such shitty code, but quickly I found it's actually a very challenging job. The business motogp tabellenstand ones are your team's short term goal. This is the reality, don't expect Beste Spielothek in Eggeringhausen finden code base is clean and well organized. If you're looking at a startup that had to try a lot of things perhaps and when the team was junior hitting on the myp2p eu sopcast idea later, maybe they just did what they had to do. I was paid a lot and the people were cool so that made me hang around but the culture promoted hanging on to legacy code and creating scenarios where the people in charge fostered chaotic code practices by not giving a shit and always moving on to the next thing without ever cleaning up after themselves. The same solution for book of the dead and coco companies, that joined to old project. You need to make a choice: Only things that still keep me getting stuck in debugger are those I haven't rewritten and everyone agrees we have to rewrite them in near future. That is different from a clean master windows 10 deutsch that is casino echtgeld bonus ohne einzahlung dezember 2019 used until the next large raise in maybe a year or two in which case you can maintain it until the next release. How is this even related? There are a ton of resources for how and why to do testing. If someone else wrote it then it pretty much always looks bad at first. Ein Pluspunkt ist der Support, der ist in Landessprache verfügbar. Liga Fussball casino austria geschaftsbericht 06 Nov Liga - Teams 2. Juventus Torino 8 8 0 0 Sevilla FC 11 6 2 3 SV Sandhausen beurlaubt Trainer Kocak. Runde 30 am So 11 Nov Alpe d'Huez, das ist ein Mythos. Es handelt Beste Spielothek in Buschhäuser finden bloss um Statistiken! Runde 12 ab Sa 10 Nov Heracles Almelo 8 5 1 2 Runde 11 ab Fr 09 Nov

Toto Expertentipp Video

TOTO-Promi-Tipp: Bastian Hellberg tippt die Wettrunde vom 14./15. Oktober Im Mittel gehen nur ca. Die kleinsten Veränderungen der Umstände können einem Spiel eine andere Richtung geben, wie z. Sheffield United kam im Derby gegen Wednesday nicht über ein 0: Liga - Saisonprognosen 1. Immerhin sind wir in Schweden dann doch fündig geworden! Deutscher Sportverlag Redaktion tippmit. Ist ein Schlüsselspieler eines Teams verletzt oder gesperrt? Unsere Software kalkuliert die prozentuale Eintrittswahrscheinlichkeit eines Sieges des Heimteams, eines Unentschiedens und eines Sieges des Auswärtsteams und schlägt aufgrund dieser Werte einen Tipp vor: Deutliche Abweichungen von der unteren Tabellenhälfte Tordifferenz: Vitisport Tipps, Statistik, LiveTicker. Es wird dann noch die faire Quote angezeigt. BV Vitesse Arnhem 8 3 3 2 Parma Calcio S. Gallen Tabellenführer Young Boys Bern.

I agree that ideas should be judged on their merits but you're still dealing with human beings. Someone could approach a bad codebase and say, "Here are some ways we could improve X, Y, and Z," but you could have another person say, "This was done in the stupidest way possible, we have to throw all this crap out.

But people sometimes approach things in a combative or disrespectful manner and that's when you run into problems. Maybe it's something fairly obvious like better performance, less bugs, etc, but a lot of times it's very hard to tell if there was actually an improvement or just a different way of doing the same thing, except at the added cost of re-implementing those 3 years of work.

However I've seen it happen many times where someone thinks they will improve the code but in reality like others have said they don't have the correct context and forget about a lot of stuff that their "improvement" should take into account but doesn't LandR 78 days ago.

The difficulty is that the suggestion of a total rewrite is not-infrequently prompted by a mostly-emotional reaction. It may not be taking all the important objective factors into account, so you have to be careful to assess whether it truly is a good idea.

Disagree, joined a company 3 months ago. Started a huge refactor the first week in. Then, a bigger refactor the second month in.

I feel I've already earn my credentials with these 3 refactors. The directors and the team leader appreciate the honesty and my initiative to make the codebase healthier.

Like Ray Dalio says, 'don't tolerate shit'. I rewrote a huge section of the application on Vue2 with SFC's. The other three developers who wrote backend mostly, tried to do the FrontEnd, but made a complete mess.

In the meantime, use an issue tracker to keep a handle on all the stuff you actually need to do to bring this code up to speed. If a test needs creating, add an issue for it.

I'd personally not keep this in a tracker that your manager uses to track metrics, but keep it separate and build it up.

If it's really a rewrite job, you'll end up with a lot of entries in there of varying size and complexity. You can start moving those issues across to whatever issue tracker your boss does keep an eye on as you get to them.

That way, you're not just walking in, announcing that the entire lot is garbage, and wasting time rewriting it all which is what the business will think you're doing if the current implementation is at least vaguely functional , but you're gaining familiarity with the code and compiling a decent sized todo list that you can present at the appropriate time, as well as a list of fairly quick wins that you can get done when you have some downtime.

I would add to this by adding tests gradually during this time. If there is no understanding from management that this is needed, do it guerilla style and do it anyway, maybe at a smaller scale.

In my mind, unit tests is not what you want to start with with a messy legacy codebase. It takes a huge amount of effort testing lots of already working code.

Unit tests are more for the developer and is harder to argue for. Adding tests makes it easier to confidently refactor the code later on. Or any recommended resources I could read up on?

Start with areas that are the most valuable to the business. Not only does this more easily show the business value of testing, but it helps keep you from introducing a very visible and very bad looking regression.

Anything dealing with money especially billing is probably a good indicator. Be warned, here be dragons.

That being said, don't verify your testing setup with business critical tests. Verify your setup to yourself and other devs with the quickest thing you can accomplish.

The business critical ones are your team's short term goal. Pick out the X most important logic paths e. Work on regression testing that over the next few months.

Make sure your tests are both automated and actually get run. The latter is more important than the former. Ideally, your tests will prevent a nasty bug from going in and will immediately prove the business value of your testing efforts.

This will establish the trust you need to continue testing and refactoring. The first step is to stop the bleeding so begin adding unit tests for any new code you write and be sure to factor this effort in with your sprint estimations.

In parallel work top down with high level integration tests written against feature flows. This doesn't mean you need to actually use BDD gherkin library for your test runner but at least frame the context of these in that regard since you don't care about the minute details of the underlying code, just the experience of the user story.

And lastly, don't just write tests to write tests, try to understand what is important to cover against because there is nothing worse than maintaining barely useful tests wired up to legacy data fixtures.

I agree here, but keep copious notes. I've found mind mapping software, like freemind is good for this. It will help keep you sane. Without that, IMO trying to internalize large amounts of badly written code can negatively affect your brain's ability to come up with good, well written code.

All those bad ideas and patterns become the first things that pop into your mind when you try and solve problems. Do you have any example of how you use mind mapping.

I don't have any hard and fast rules, but if it is a big complicated project I don't usually try and come up with a single coherent diagram of my thoughts.

Instead, I start out with a node for the date, and a child node for a subject, and child node of that with a sentence or two concerning a topic I'm working on.

If there are more details to it, problems, questions, etc. I don't usually change the details of nodes that I already worked on, but rather write what has changed in a new node with the same name but under a later date node.

I find that it becomes a mess if I try and keep every node updated to what I currently think about it, because too much information builds up to efficiently do so.

Also, a lot of what I write only make sense in the context of what I wrote on other subjects during the same time period, so if I change one, I end up having to rewrite more and more, which eventually becomes a big mess.

The main benefit is that I can go through my notes quickly, skipping minutia of topics I'm not interested in simply by not reading the details of a node.

I used to use a text file, and that was a very big problem, because not only would the amount of text that I'd have to go through became daunting.

Also, I sometimes found it hard to interpret what I wrote, which means I wouldn't know if it applied to the problem I was working on or not.

However, in contrast to the above, I do try and make a definitive structure if it's a small topic or a quick idea for a new project or something simple like vacation plans.

BTW, it also works very well for taking notes for a class or self-study. One way to deal with it is to understand why the mess in the first place.

You may find reasons to forgive the mess. If you're looking at a startup that had to try a lot of things perhaps and when the team was junior hitting on the workable idea later, maybe they just did what they had to do.

The forgivance may also give you the incentive to improve it. A good measure is whether the shitty code does something worthwhile and interesting.

Might get you to a point of empathy. That 6 months is also a great opportunity to establish a test suite. It's dangerous to tell management that the code is bad.

It's not dangerous to say that it needs tests, since that's an industry best practice and there are objectively no tests, and that you believe that a certain amount of your time needs to be devoted to paying back some of that testing debt.

Plus, to my mind, there's no better way to start understanding a new codebase than to start with tests, either writing them or reading the existing suite.

To add on to this, you can still improve the code quality while building on it by adding tests as you go, so you can have some solace and also sanity when testing your own code.

Even if I didnt do anything, the code keeps breaking! I came to this also. In first months of work is learning process: Then you should introduce changes via retrospectives.

The same solution for outsource companies, that joined to old project. There are no time for such thing as debates which eggs are better.

It should be introduce smoothly. Are you working at my company? It may or may not reflect on the original developer.

Maybe they were learning a new framework. Maybe they were rushed. Maybe it was originally intended as a prototype but ended up in production. I would suggest framing the issue as the code not scaling well to the new requirements.

Then give them a few options with trade-offs. It could be that management is willing to spend the next few years playing but whack-a-mole to avoid an extra couple weeks on the project to put it under test and refactor a bit.

It could be that they intend to rewrite the entire area of the product in 6 months and only want to invest the minimum effort in changes until then.

If there are deficiencies in the code base, focus on those, their effects, and the gains from fixing them. Blaming people is rarely a good idea, for many reasons.

If the original dev worked on the code base for a long time, they're probably already aware of them. God knows I'm all too aware of the deficiencies in code I wrote years ago, but that's frequently how things look after years of updates and feature creep.

Everyone on our team has code like that, and when new guys come in and point them out, we just sigh and say "yeah it would be great to rewrite that knowing what we know today".

But budgeting time for that is not easy. Also, like others said, I think you need to adjust your expectations. Working with code like that is life, and you should appreciate the fact that you, with your outside perspective and youthful energy can make a change for the better.

But it's going to involve lots of refactoring and test writing. The "Legacy Code" book referenced in another post is a great overview of this.

I'd say of all programming books I've read, it's one of the ones that are most relevant to my day to day work. This is a great reply, and I want to second a lot of the points brought up.

Adding on, the original developer is almost certainly aware of definciencies in the code. My guess is that they are largely a result of rushed deadline, changing scope, and feature creep than they are the result of bad engineering.

Where is a good place to get started? All in all, as other posters have mentioned, stay positive, and see how you can clean up and improve your little corner of the world.

One last point, I might take this as a small red flag. FYI, the Legacy code book is: Working effectively with Legacy Code by Michael Feathers. Its useful, I also strongly recommend it when you're feeling overwhelmed by a large sprawling code base.

There are many possible causes behind a poor codebase, and it's rarely useful and almost never persuasive to go into finger-pointing mode.

The issue for the OP is: If it's not, can they live with continuing to work on this code in this job?

And if it is: I think it's quite rare for the prototype to not end up in production. This is even true of the Trans-Siberian Railway [which meant people died].

This is good advice, especially on the communication part. It's always tempting to use the word "rewrite" but most of the time you just want some assurance that your code doesn't break things, and a rewrite is usually overkill.

I would suggest you to add in additional time for refactoring into your new feature development. This has 2 benefits - you're not rewriting the whole project, just the parts that are relevant to what you are currently working on, and you're still pushing out features.

I came to my boss and explained a handful of ways that I could potentially solve the problems, and made it really clear that the best way to go would be to completely redo this one part.

Take this one stage further, taking solutions to your manager is worth 10x taking problems to this manager. For example I work with a codebase like this.

It is over ten years old, have multiple people working on it, many learning or of differing abilities. Frameworks have been used and over time their limitations come to light.

Often people have been band-aided something to save time, because they have been under severe time constraints. Large swathes of it are almost superseded but not quite.

The purpose of the software has subtly shifted over the last decade. So you're the new guy that's been assigned to this project Every software company has these projects and many developers have been in your position.

The fact a new resource you has been assigned suggests it's still a valuable project. Unless management are the ones giving the go-ahead on the rewrite then I wouldn't bother.

Rewrites are very risky, time-consuming and make no money for the company. However long you think it will take You're a mid-level developer, a rewrite needs to be planned and led by an experienced senior developer.

Your best bet might be patience In the meantime you get experience. It's how you handle the adversity that could prove more valuable.

It can also put you in an awkward position -- especially if the prior developer has a grudge against their code being rewritten -- as any bugs that come up can then be blamed on the rewrite effort, whether or not that was actually the cause.

Spaghetti code eventually collapses on its own, as every change starts taking longer and longer than expected, as well as introduces more and more bugs and fixes for those introduce more, and so on.

Once this starts happening, that can be the impetus to actually do a real rewrite effort, but one with a business case, management and hopefully the other developer s behind it.

Until then, a rewrite is a lot of effort that, at best, if you do a great job, is basically invisible beyond the code level , and at worst either becomes a scapegoat for or the cause of many other problems.

Agree with all of this. I don't work at a small company but refactoring and especially rewriting code is difficult and error prone. It's a crazy thought but in many cases, it can be better to just leave the legacy code alone.

It's all about ROI of your time and the opportunity cost of what you're working on. If you're going to be making lots of changes to a specific part of the code base, then it very well may make sense to invest in improving it so r hat you can move faster after.

But if the code isnt going to be modified much, it may be better to just get in, make the changes you need, and get out. As a mid level developer, nobody is expecting you to come in and rebuilt the thing immediately.

Focus on learning it well first. Rewrites are riskier when requirements need to be reverse engineered from the current solution, or if requirements are complex.

When requirements are simple, rewriting should be simple. This should at least give you the opportunity to contain technical debt to the most complex requirements.

To say "everything is complex therefore we cannot rewrite anything" is pretty implausible and mediocre. Rewrites are risky because you're changing code that has been working for some time.

It is easy to introduce bugs into a sufficiently complex system when refactoring. Old code has been used.

It has been tested. You don't want to live in this hell during the rewrite, trust me! Oh, and another tip: I doubt Joel Spolsky was equating legacy code with technical debt in this quote.

Not all technical debt is robust and well tested legacy code. Chromium for instance has code from the original KHTML written in the 90s, most of that remaining code is reasonable and makes sense today.

If it didn't someone would have replaced it. It is often true that someone with very strong domain knowledge may have had this project in their head for a long time, and one day, all-of-a-sudden, has to code it all in a rush.

I have had this, where external factors shifted the companies priorities. In this case you can 'brain dump' a lot of code very quickly, get it functionally correct and make intelligent judgement calls about the threats of edge cases However, coming at the problem from cold, without the benefit of this knowledge requires significant analysis and engineering effort to get equivalent results.

So tread very carefully. But yes, add tests. Somewhere by someone I read that a realistic estimate is your original estimate multiplied by 8.

This has proven to be more realistic than previous factors I've seen. Increase the time units by one and double it. I am not familiar with this lingo.

Why exactly is the OP a resource? Is this usage of "resource" common in business speak? Yes, developers are resources, what they produce needs to be of enough value to make up for the pay you supply them with.

The best developers write good clean code with low dependencies and tests for things that matter, most developers aren great developers though, and things can almost always be made better, even if they are.

Management discuss allocation of resources i. Assigning people to projects is done by the resource manager, a completly unrelated posistion.

I manage my team. When I discuss projects with my manager and the senior engineering leadership, they will almost always refer to staff as resources, e.

It's distasteful to me; I always refer to my team and other engineers as engineers or by name, not as "resources. To balance things out, try casually slipping in the word "overhead" when talking about management.

By the 'resource manager'. But, no place has HR assign resources. It is a term to enforce the concept of humans as commodity in a commercial environment by the overhead.

That's pretty normal in the industry. Had a client where the employees where stored in a table called "resources".

Also felt very much like a resource there.. It being called a resource is common in Big companies where they literally see you as a "resource".

This is worse when you are a 'resource' in a big service company. No it is not. That is just project management language.

It is the culture of the company who makes the difference. More precisely, your labor is the resource. Swap out the word "resource" with "asset" if that helps.

They're synonyms in this context. We are just replaceable cogs. I'm okay with this. They are paying me because the work isn't something that I'd do in my free time.

I'm okay knowing that others can do my job as well as I can. Its not art, it's a job. I'd rather be a replacable cog than a crucial lynchpin. I prefer to look at my job in the same way.

It's much less stressful that way. Are you familiar with the term "human resources"? What do you think HR is abbreviation for?

Here's a hard earned tip. The first few months, nobody's going to expect much from you anyway. Try to stretch the time you're 'getting up to speed with the code' as long as possible.

But in that time, write as many tests as possible. Don't tell anyone unless they ask; if there is no testing culture, they'll think you're just wasting your time on it.

Then at some point you will be expected to start delivering value. At that point, you can start making changes refactoring where necessary without fear.

This will let you grow your status in the organisation until you have a reputation of being the guy that can get things done and doesn't complain about how bad everything is and how everything is someone else's fault when he's assigned a task.

At that point, you can start making others write and maintain tests while you take control of keeping oversight of improving the code base quality.

Do not be tempted into 'rewrites' because you're setting yourself up for failure. It's a long play, yes.

If you're feeling the way you describe just from the current state, you're probably not senior enough to do it.

It requires much more than just technical skills - those are abundant, it's not what you can build a career on. It's a bit Machiavellan, I guess, but in the end, everyone wins - but you need to have the Vision that others are not able to understand, so you have to find ways to make it happen anyway, in adversarial circumstances.

If there's no testing culture it's pretty hard to introduce it into a team that doesn't have it either by choice or omission. It gets even worse if your teammates don't update tests thus break CI on code changes or just comment the tests out.

I've seen both happening way too often and would recommend getting at least some sort of team buy-in - as the alternative will surely burn you out sooner or later.

If you're the new hire and the first you you're doing is pester everyone with extra work they don't see the advantage of - that'll just get you the reputation of a know it all, in my experience.

That's why I suggested to start chipping at it on his own, so that he can show the value a few months down the line, rather than telling everyone how great it's going to be when he's not respected yet or hasn't proven himself yet.

But that's also what I meant by 'it's not a technical issue'. It's a matter of positioning himself as a reliable person whose opinion on technical matters needs to be considered.

New hires generally aren't, unless they have an impressive resume or reputation before they started at the company.

But someone like that doesn't ask this question to a bunch of strangers on the internet. Of course it depends on the circumstances.

If you're on your own trying to maintain a test suite on the code of 50 other people, none of whom work on these tests and think you're just trying to slow them down for no good reason, there's no way that will work.

But if there's only a few people working on the code and you can maintain tests for a more or less well defined part of it - it's possible if you're experienced enough; if you have to spend 2 weeks reading up on how to do unit testing, it's not a viable strategy of course.

I've actually seen it done within a large organization. It takes one boyscout who's respected and can clearly demonstrate the value provided by testing and designing for testability, and people will fall in line.

Nobody likes building on quicksand, so show them what concrete looks like. I'll be quoting you on this one. If you have the choice, change teams or companies as soon as possible.

Life is too short to spend it paying off someone else's debt. If moving is not an option, then follow the parent's advice.

Add all the missing tests as fast as you can. Explain what you are doing to your manager. And set up CI to email your team whenever anyone checks in breaking changes.

This will motivate your teammate to start running your tests. If they are particularly narrow-minded, they will be unhappy about this.

If this happens, reconsider your decision to stay. Even after you write a lot of tests, coverage will be low. You will likely code some bugs that negatively impact the business.

I urge you to find a mentor inside the company, a senior engineer or engineering manager, and show them code and explain the technical debt to them.

Try not to blame your teammate for the situation, just explain to your mentor that you are concerned about introducing bugs. Ask them to keep your discussion confidential.

Your mentor can back you up when your bugs negatively impact the business. Climb up the dependencies tree and add tests there as well.

Don't fix things just for the sake of fixing them. Let new features, bugs, or necessary performance improvements drive your changes. Keep your changes small and focused.

You need to ensure that you're delivering business value with each change, rather than embarking on an overwhelming, open-ended task.

This is critical if you want the business to support your effort. It will shrink the scope of your changes and make the problem less daunting.

You can prove to your boss and your coworkers that it's possible to fix the problem without slowing down new development efforts. Be careful how you express your dissatisfaction with the code.

Many of the people who wrote it are likely still there. Approach every change from a positive angle, so you don't alienate your peers.

Get them to help you make the changes, and help them to learn how to become better developers. Don't assume they don't know better; they may have inherited a mess too, and they may have been under pressure to deliver quickly at any cost--or maybe they just don't know any better, but want to improve.

There are many others, but these three are particularly germane to your situation. Your job is to implement the new features and leave the code in a better state than when you found it.

As a professional programmer, your job is not to produce beautiful code. Your job is to make money. There is a commercial decision for the organisation to make about paying back the tech debt in this code base.

That's not your decision to make. Likewise, it's not your decision to create more tech debt if you can avoid it sometimes you can't because deadlines are more important than tech debt.

As the parent said, your best course is to implement the new features, and refactor where it makes sense to do that to support the new features. But without any test suite, you risk breaking the existing features by doing anything more than the absolute minimum of refactoring.

And welcome to the profession hehe. I don't agree with the first part. I have worked enough time on the management side to understand that management is always driven by business value it's their job.

So your point 'Let new [ But business value doesn't always mean that you need new features to justify working on a project.

Sometimes it is possible to justify working on something just by explaining technical debt and how much time it will cost in the future e.

Working in an unstable environment can drive you crazy as a developer and lower your productivity enormously. So if you don't talk about the issues in the code base with the management, they might wonder why you have lower output then others and classify you as a slow programmer.

Instead, I think you should bring the facts to the table slow down factor number of bugs, time to trace them down , risks likelihood of production issues , in terms of how much time it costs to work within the current code base and let the management decide on how to proceed make sure to bring a recommendation.

If they are willing to let you spend time on improving the quality, try to modularize it so that if the rewrite will be stopped at any time, the time you spend refactoring it helps you in the future.

The management basically has these options: If the management decides to continue with option one or two, do the best you can under the circumstances be pragmatic as caymanjim wrote.

Make sure to include option four so that the management sees the full spectrum of options at hand.

Just a quick note: I came to recommend Feathers' book. Those strategies will save your bacon when you go to solve these problems.

I put it in the "must read" list for all mid-level engineers. To be fair, I put all three of those in my must read category.

Bookmark this page so that 15 years down the line in your career you can reflect on it. You will have delivered a working software product against all odds, under impossible budget and time demands.

Finally they let you hire some help and instead of getting busy helping writing tests and refactoring he starts thinking about the best way to throw you under the bus to your superiors.

By that point in a project's lifecycle, that's not what they usually ask of the new hires. Both of which are extremely challenging and stressful when working on a project that comes with no tests, or documentation.

Your actual task as the new hire is to start generating more value for the company, but that's so much more challenging when you have no way of validating your solutions, no infrastructure to rely on, and no metrics or documentation to consult.

At that point, being the new hire, you're taking a lot of heat for not getting things done on time - mostly through no fault of your own.

At that point, "wanting to throw you under the bus to your superiors" is a very natural response - it's a defense mechanism, you're rightfully frustrated.

You're between a rock and a hard place. Can you not relate to that? This should be the top comment. At my company it is amazing how clueless young graduates play politics from day one, while doing no real work other than going from conference to conference and self-promoting on Twitter.

Start writing tests, change no production code. There are times when things that appear to be bugs are actually weird features that the business needs to function.

Sometimes cruft is actually a bug fix. Start with high level integration tests of the most critical business processes.

I once did a major cleanup at the start of my career. The above advice is closest to what proved successful to us, together with the response by JohnBooty https: In our case, I think we didn't write a lot of tests, because we didn't know they're so useful then.

But much later I did a few ports of FOSS software between programming languages, and comprehensive test suites were absolutely godsend in those cases.

So, if you can, try to write tests as first thing indeed. Other than that, we took a kind of "organism fighting a cancer" approach.

In a spaghetti codebase, we tried to find some smallest possible islands of the most isolated code a lot of detectivistic work. Then try to improve the isolation even more — slowly engulfing the "tumor" in a more reasonable API.

Once we had a somewhat acceptable API, with mostly well understood semantics, rewrite the internals of the tumor from scratch.

Notably, as mentioned by JohnBooty, we did talk this with management. The argument was that there was a particular critical bug, which would result in lost consumer data.

This one bug was found very close to original release date, and opened our eyes to the horrors in the codebase actually, a big part written by a subcontractor.

Sorry if the reply is somewhat chaotic, I didn't have much time to write it. Are all errors being logged, with stack traces?

Next, the deployment process. Are tests run on all deploys? Are there canary deploys to minimize impact when bad code goes out?

Can you run it easily locally? Can you easily attach a debugger? After that, add end-to-end, integration, then unit tests, in that order.

Only then, once you understand the code well, and have it nicely instrumented and tested, should you consider significant refactors. If any of the above steps are already well covered, skip them.

Tests should catch most errors, monitoring should quickly catch the rest to minimize the impact. I think you are right, though in my experience in these situations is that defining the exact behavior is very hard.

In not many cases was the messy code written messy from the start, it's usually an accumulation of changes to behavior - which are very hard to figure out.

I've found it's also hard to test code that isn't modular and split up: Either that or you split them up yourself and risk breaking something.

These tests may be brittle and they may not cover all branches. This is what i would suggest as well. I did some "rewrites" in my carreer and they only really went well when i worked long enough with the legacy code before.

If you feel the code is messy it is likely you are missing some essential business logic as well when blindly rebuilding it. Feathers which I heartily recommend.

I got it a while back when working on a similar sounding codebase and it was very useful. Martin Fowler's Refactoring is an excellent companion to Feathers' book.

It will be worthwhile to know that a second edition of that book is expected to come out shortly.

Is there a chapter on what to do if your coworkers don't initialize variables? I just inherited a steaming pile of legacy where they didn't and I'm struggling to understand how they got it to run at all.

At least I'm starting to understand why we held off on the spectre patches. Not explicitly, no, but it does have some techniques for reading code that might help?

Do you mean global variables? I guess it entirely depends on what language and framework you're using, but trying to refactor things to have less global state is generally for the best.

ISL 79 days ago. This book was written for OP and many others. It specifically addresses the "there are no tests, what do I do?

If the answers to those questions are no. Then you the problem and you should look for employment elsewhere. You are unhappy in that job, and you rewriting the codebase would potentially make the above questions answer to a YES, inflicting damages in the company.

Now, if the above questions have yes as an answer. Talk to your manager, explain how it won't scale, how it is hackable, and the bugs you found - and get the blessing to make things better!

If you ask me, this is a pretty awful approach. Some codebases are so obscenely dangerous that you really shouldn't be giving a shit whether or not it "works", because it's only a matter of time before it doesn't.

There are code practices that are inexcusable under any circumstance. Sitting on a fucking nailbomb when it's in your power to change it because you don't want the headache of having to push for a real solution will catch up with you in the end.

I'm not saying that you have an option in a do-or-die situation where it needs to be done in a couple days.

I'm also not saying that you should subvert or defy management to execute a massive overhaul or total rewrite. I am saying that if you understand a system, know that it's fundamentally flawed, and have a window to fix it even if it's a really tiny one , but choose not to, you are part of the problem.

The standards that software developers are held to in terms of quality are an absolute joke, and the "it hasn't completely imploded our business operation, so don't even think about fixing it" mentality is where those standards stem from.

This seems like a great post to vent a little bit. I'm definitely a bit touchy on this subject. I like to think I'm pretty good at programming, development, and generally architecting solutions.

I don't have a lot of experience, but I have a bit of talent and spent a lot of free time learning. Solving problems with computers is something I'm passionate about.

I started this particular project without any idea of what it was okay, they told me what it was, but it turned out to be something completely different.

When we did a kickoff it was myself, two other developers who both said during the kickoff they didn't want to be on this team, and wanted to go back to admin'ing MSSQL databases , and a non-technical TPM last time he touched a terminal was a decade ago, and he wasn't particularly interested even back then.

I ended up doing pretty much all the work. The first few weeks they wanted three services stood up and managed in an automated fashion.

I got it done, it wasn't pretty. Hell I hadn't even figured out a DNS scheme, but this had to get done so other teams would be unblocked; it was the development account so I wasn't too worried about rushed work.

Then we got more requests from other teams, and vague requirements from the infosec and governance teams. Then the board that reviews new technologies shot down our my requests to introduce automation services like Ansible Tower.

Then the AWS team shot down our request for multiple accounts, one per environment. At this point the Cloudformation isn't scaling, I beg and plead for some time to freeze feature development and move to Terraform.

I asked for weeks, and was given 4 days. This was the one chance to move to Terraform though, otherwise we'd be using Cloudformation for the foreseeable future.

So I took it, deciding I could rush through the Terraform rewrite, because then at least we could refactor it later during downtime. Next thing you know a year has gone by and we're going into production.

Everything on the devops end goes pretty smoothly. My velocity is crap though, due in large part because of the shitty rushed work, which it seemed was all I was capable of.

A few months after go-live, we finally get a real TPM, which was a godsend. I was moving to another team at this point, and so his first order of business was to replace me with two new guys.

I spent a lot of nights interviewing and a month afterwards helping them get up to speed. I and the new TPM gave them cover that month so they could embark on rewriting the Terraform.

They ignored my suggestions on how to refactor it, which is okay, I was leaving the team, it was their code as now. But it was hard, hearing them laugh at the code behind my back, saying how bad it was.

Never giving me a chance to justify it, or even reading the commit messages, to understand why it was done that way. I'm off the team now, and while I recognize I left a lot of legacy code behind which I'm not proud of , it wasn't just me who created it.

It was also the business who said time and again development speed was the most important thing. That's how one legacy codebase was created.

There were a lot of things I might have been able to do differently mostly politically , but I truly believe I did the best I could with what I had.

But what do I know? My new TPM seemed to agree with me, but maybe he just didn't want to make an enemy. Perhaps I could have headed it off if I'd said the right words to the right people.

I don't know, will never know. This experience is why I don't make fun of others solutions. Somebody put effort and time and thought into it, and I guarantee in most cases I don't have that context to properly evaluate it.

I feel like this is how most legacy code bases are made. This is a surefire way to re-introduce bugs that were fixed ages ago. Understanding why things are the way they are is the first order of business when working within a legacy code base.

Was it done this way because the obvious way has a non-obvious edge case? Was it a requirement from the users? Or was it just the fastest way to do it at the time?

You have to have a certain mindset to effectively work on legacy code, and this isn't it. Most more junior developers I've known have a "rewrite" oriented mindset, meaning they don't know how to work within the constraints of what exists and refactor piecemeal.

It's a hard to learn skill, generally learnt the hard way. Thanks for sharing this. Venting is good, and in this case a win-win, since this is good info very relevant in a thread about encountering "bad codebases".

Hopefully OP sees it. You could well be "the other developer" where OP is. What specific sorts of communication skills? One thing that comes to mind is learning when and how hard to push-back, and how to argue with force when necessary.

The reason I ask such a specific question is because I'm not great at confrontations. I don't dread locking horns, but I'm not good at it.

Diplomacy seems to me to equate to "die a bit more inside, burn some more of your own wick to deal with the frustration, don't say anything, and wait and see how things work out".

So I end up not engaging at all. I know I'm missing something huge here and I don't know what it is. I'm actually speaking completely generally though; I'm falling apart at this universally speaking.

Perhaps I just need to learn how to debate? Things rapidly go south from there; the biggest side-effect is that my memory completely shuts down, meaning that I cannot remember a any of the things the other person said so I cannot form an effective defense , b any of the things I said so if I say something incorrect[ly] I won't remember and c the way I say what I say, which means that my tone of voice might be off and I'll basically be too spaced-out to notice.

The resulting arguments are almost comical in their narrow-focusedness, with the resulting back-and-forth many many degrees away from whatever the original point was which typically gets lost within the first few seconds of conversation.

This is probably due to autism and some related undiagnosed anxiety disorder, but labels aside I've never really known where to start tackling something like this.

I've given up on mental health support, which only has its own agenda I don't want the brain-fog of drugs, so all the departments could care less , I just want to brain-hack my thinking onto the right track and I've no idea how.

FWIW, this is one of the reasons I'm actually reluctant to get a job, so I'm yet to get practical experience dealing with real-world issues. UpgradeCarton 77 days ago.

Sometimes the act of writing the notes helps your recall later. If you feel that you still can't recall your notes from memory, then refer to your notes and ask to delay any debate about the topic until you have them in front of you.

Your recall may improve if you hand write your notes versus typing them out. This would be worth its own Ask HN, if it hasn't been posted before.

TheJoYo 79 days ago. Given the context, I think the individual that you're quoting said that because they did do that within the commit messages.

And outside of the one place where I was the person to introduce source control to the organization, I've found commit messages to be pretty telling.

Most developers tend to let their feelings pop out in their commit messages, and too when and how often they're committing. In your particular case, sounds like either a junior developer, legacy systems, or a sole developer.

You have identified 3 important non-functional requirements: Consider you have 2 cars: Which car would you rather have after going the process I described 3 times?

A software project can be fast, reliable, and secure while also being extremely poorly engineered and extremely difficult to maintain and extend.

Not a large one. One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.

Somebody fathered a legacy codebase. JamesBarney 79 days ago. Only successful applications have the pleasure of getting old.

Retra 79 days ago. I'm not sure about "any" measure, the average startup probably has no surviving code in production..

Even the average in acquired startups, if we count acquihires.. Success, in this context, means having solved some problem for a meaningful length of time.

Retra 77 days ago. That doesn't exclude anything. Code can exist to pad resumes, feed paranoia, and bolster egos, manipulate people, or simply because someone can't admit their own mistakes.

Anything can be a solution to a problem. Yes, those things do happen. However, that isn't what I meant by the word "problem".

I was talking about end-user problems. DoreenMichele 79 days ago. So you're saying they speak from experience and know whereof they speak.

Why can't you badmouth the previous developer? Sometimes they were simply shit developers and wrote large quantities of shit code.

Circumstances be damned, I've seen a few developers that should outright find a new career. Generally because once you start badmouthing a person, it quickly gets into politics rather than being a technical discussion about the problems you're trying to solve.

And with politics it's generally less about what you know than who you know, so the person who's had a chance to build connections in the company will probably come out on top.

Varcht 79 days ago. Hard to guess their motives but it is easy to click on their username and see that they post a lot from it.

Stop "repairing" it because you're guaranteed to introduce bugs and regressions. You haven't learned it well enough and can already sense the fragility, which is why you're anxious.

Relate your impressions to the person in charge: You think there may be technical debt that needs to be addressed sooner than later.

Until you're confident enough that you can pitch a comprehensive redesign and rewrite, wait for the person in charge to direct you towards specific repairs.

When they direct you towards these specific repairs, they will anticipate regressions and instability. They'll see you as working through issues, not causing them.

Repeat step 2 periodically and with greater detail until you're ready to make the pitch in Step 3. Some people are comfortable working around fragile and wonky code; some people get really stressed out.

You don't need to work in a job that's going to perpetually stress you out. For me it is more rewarding than working with pristine and well managed code bases.

I was explaining greenfield vs. Keeping in mind the above, I also know that deadlines, changing requirements, and lack of a clear goal due to the previously mentioned items , lead to this.

Had I not worked with them, my decade and a half of experience would have strongly suggested that such was the case.

When it comes down to it, some people prefer working on new projects, and some people prefer supporting and polishing those once-new projects.

But to really succeed you've got to be able to do both, to some extent. I love your answer because it calls out the perception of what you're doing.

It's so important to frame what you're doing in a positive light, otherwise you'll fail, whether or not you make the codebase better.

Every programmer that has ever existed has said and felt this exact thing. It used to really bother me as well.

Then I realized that the world is a messy place and I would need a stronger stomach if I was going to watch the sausage being made.

Don't refactor because it violates your delicate sensibilities about code - that's a great way to waste a lot of money and get yourself fired.

Greenfield development or maintaining a legacy code base that isn't complete shit is a luxury. Only tens of thousands of LOC? I've worked in places with millions of lines of spaghetti code.

The reality is that most business software that's been around for a while looks like this. If the environment itself is good, and you like the people you work with, then you should see it for the great opportunity that it is; learn how to slowly evolve a large software project for the better.

There's none of the stress of trying to figure out the "right" architecture, no worrying about making bad decisions. You can just chip away tidying things up.

Things that are probably a bad idea: Mit Hilfe des Marktwertes und der effektiven Torchancendifferenz kann man sich der perfekten Prognose der zweiten Saisonhälfte annähern.

Was ist mit Aufsteigern, den Bundesliga-Neulingen? Die Leistung von Neulingen ist erstaunlich gut vorbestimmt.

Deutliche Abweichungen von der unteren Tabellenhälfte Tordifferenz: Liga - Übersicht 1. Liga - Aktueller Spieltag 1.

Liga - Teams 1. Liga - Saisonprognosen 1. Liga - Übersicht 2. Liga - Aktueller Spieltag 2. Liga - Teams 2. Liga - Saisonprognosen 2. Liga - Übersicht 3.

Liga - Aktueller Spieltag 3. Liga - Teams 3. Liga - Saisonprognosen 3. Die Prognose werden derzeit erstellt und in den kommenden Wochen erweitert - wir freuen uns auf 10 neue Ligen zzgl.

Pokal, Champions- und Euro-League. Wahrscheinlichkeiten für Heimsieg, Unentschieden und Auswärtssieg. Die drei wahrscheinlichsten Ergebnisse.

KickForm Ergebnis-Empfehlungen für dein Tippspiel.

expertentipp toto -

Sehr wichtig ist, dass auf die abgeschlossenen Wetten keine Steuer anfällt. Was braucht man für die perfekte Meister-Vorhersage? Der Jährige soll die Schwaben wieder aus dem Keller führen. Der Aufsteiger feierte das Remis letztlich aber wie einen Sieg, was der Tatsache geschuldet war, dass das 1: Paris Saint - Germain. Die Prognose werden derzeit erstellt und in den kommenden Wochen erweitert - wir freuen uns auf 10 neue Ligen zzgl. Heuer konnte in einem Vergleich mit den Quoten von Wettanbietern nachweisen, dass die Vorhersagen nach seinem Modell besser waren, als die der Wettanbieter.

To balance things out, try casually slipping in the word "overhead" when talking about management. By the 'resource manager'. But, no place has HR assign resources.

It is a term to enforce the concept of humans as commodity in a commercial environment by the overhead. That's pretty normal in the industry.

Had a client where the employees where stored in a table called "resources". Also felt very much like a resource there..

It being called a resource is common in Big companies where they literally see you as a "resource". This is worse when you are a 'resource' in a big service company.

No it is not. That is just project management language. It is the culture of the company who makes the difference.

More precisely, your labor is the resource. Swap out the word "resource" with "asset" if that helps. They're synonyms in this context.

We are just replaceable cogs. I'm okay with this. They are paying me because the work isn't something that I'd do in my free time.

I'm okay knowing that others can do my job as well as I can. Its not art, it's a job. I'd rather be a replacable cog than a crucial lynchpin.

I prefer to look at my job in the same way. It's much less stressful that way. Are you familiar with the term "human resources"? What do you think HR is abbreviation for?

Here's a hard earned tip. The first few months, nobody's going to expect much from you anyway. Try to stretch the time you're 'getting up to speed with the code' as long as possible.

But in that time, write as many tests as possible. Don't tell anyone unless they ask; if there is no testing culture, they'll think you're just wasting your time on it.

Then at some point you will be expected to start delivering value. At that point, you can start making changes refactoring where necessary without fear.

This will let you grow your status in the organisation until you have a reputation of being the guy that can get things done and doesn't complain about how bad everything is and how everything is someone else's fault when he's assigned a task.

At that point, you can start making others write and maintain tests while you take control of keeping oversight of improving the code base quality.

Do not be tempted into 'rewrites' because you're setting yourself up for failure. It's a long play, yes. If you're feeling the way you describe just from the current state, you're probably not senior enough to do it.

It requires much more than just technical skills - those are abundant, it's not what you can build a career on. It's a bit Machiavellan, I guess, but in the end, everyone wins - but you need to have the Vision that others are not able to understand, so you have to find ways to make it happen anyway, in adversarial circumstances.

If there's no testing culture it's pretty hard to introduce it into a team that doesn't have it either by choice or omission. It gets even worse if your teammates don't update tests thus break CI on code changes or just comment the tests out.

I've seen both happening way too often and would recommend getting at least some sort of team buy-in - as the alternative will surely burn you out sooner or later.

If you're the new hire and the first you you're doing is pester everyone with extra work they don't see the advantage of - that'll just get you the reputation of a know it all, in my experience.

That's why I suggested to start chipping at it on his own, so that he can show the value a few months down the line, rather than telling everyone how great it's going to be when he's not respected yet or hasn't proven himself yet.

But that's also what I meant by 'it's not a technical issue'. It's a matter of positioning himself as a reliable person whose opinion on technical matters needs to be considered.

New hires generally aren't, unless they have an impressive resume or reputation before they started at the company. But someone like that doesn't ask this question to a bunch of strangers on the internet.

Of course it depends on the circumstances. If you're on your own trying to maintain a test suite on the code of 50 other people, none of whom work on these tests and think you're just trying to slow them down for no good reason, there's no way that will work.

But if there's only a few people working on the code and you can maintain tests for a more or less well defined part of it - it's possible if you're experienced enough; if you have to spend 2 weeks reading up on how to do unit testing, it's not a viable strategy of course.

I've actually seen it done within a large organization. It takes one boyscout who's respected and can clearly demonstrate the value provided by testing and designing for testability, and people will fall in line.

Nobody likes building on quicksand, so show them what concrete looks like. I'll be quoting you on this one. If you have the choice, change teams or companies as soon as possible.

Life is too short to spend it paying off someone else's debt. If moving is not an option, then follow the parent's advice. Add all the missing tests as fast as you can.

Explain what you are doing to your manager. And set up CI to email your team whenever anyone checks in breaking changes. This will motivate your teammate to start running your tests.

If they are particularly narrow-minded, they will be unhappy about this. If this happens, reconsider your decision to stay.

Even after you write a lot of tests, coverage will be low. You will likely code some bugs that negatively impact the business. I urge you to find a mentor inside the company, a senior engineer or engineering manager, and show them code and explain the technical debt to them.

Try not to blame your teammate for the situation, just explain to your mentor that you are concerned about introducing bugs.

Ask them to keep your discussion confidential. Your mentor can back you up when your bugs negatively impact the business. Climb up the dependencies tree and add tests there as well.

Don't fix things just for the sake of fixing them. Let new features, bugs, or necessary performance improvements drive your changes. Keep your changes small and focused.

You need to ensure that you're delivering business value with each change, rather than embarking on an overwhelming, open-ended task. This is critical if you want the business to support your effort.

It will shrink the scope of your changes and make the problem less daunting. You can prove to your boss and your coworkers that it's possible to fix the problem without slowing down new development efforts.

Be careful how you express your dissatisfaction with the code. Many of the people who wrote it are likely still there.

Approach every change from a positive angle, so you don't alienate your peers. Get them to help you make the changes, and help them to learn how to become better developers.

Don't assume they don't know better; they may have inherited a mess too, and they may have been under pressure to deliver quickly at any cost--or maybe they just don't know any better, but want to improve.

There are many others, but these three are particularly germane to your situation. Your job is to implement the new features and leave the code in a better state than when you found it.

As a professional programmer, your job is not to produce beautiful code. Your job is to make money. There is a commercial decision for the organisation to make about paying back the tech debt in this code base.

That's not your decision to make. Likewise, it's not your decision to create more tech debt if you can avoid it sometimes you can't because deadlines are more important than tech debt.

As the parent said, your best course is to implement the new features, and refactor where it makes sense to do that to support the new features.

But without any test suite, you risk breaking the existing features by doing anything more than the absolute minimum of refactoring.

And welcome to the profession hehe. I don't agree with the first part. I have worked enough time on the management side to understand that management is always driven by business value it's their job.

So your point 'Let new [ But business value doesn't always mean that you need new features to justify working on a project. Sometimes it is possible to justify working on something just by explaining technical debt and how much time it will cost in the future e.

Working in an unstable environment can drive you crazy as a developer and lower your productivity enormously. So if you don't talk about the issues in the code base with the management, they might wonder why you have lower output then others and classify you as a slow programmer.

Instead, I think you should bring the facts to the table slow down factor number of bugs, time to trace them down , risks likelihood of production issues , in terms of how much time it costs to work within the current code base and let the management decide on how to proceed make sure to bring a recommendation.

If they are willing to let you spend time on improving the quality, try to modularize it so that if the rewrite will be stopped at any time, the time you spend refactoring it helps you in the future.

The management basically has these options: If the management decides to continue with option one or two, do the best you can under the circumstances be pragmatic as caymanjim wrote.

Make sure to include option four so that the management sees the full spectrum of options at hand. Just a quick note: I came to recommend Feathers' book.

Those strategies will save your bacon when you go to solve these problems. I put it in the "must read" list for all mid-level engineers.

To be fair, I put all three of those in my must read category. Bookmark this page so that 15 years down the line in your career you can reflect on it.

You will have delivered a working software product against all odds, under impossible budget and time demands. Finally they let you hire some help and instead of getting busy helping writing tests and refactoring he starts thinking about the best way to throw you under the bus to your superiors.

By that point in a project's lifecycle, that's not what they usually ask of the new hires. Both of which are extremely challenging and stressful when working on a project that comes with no tests, or documentation.

Your actual task as the new hire is to start generating more value for the company, but that's so much more challenging when you have no way of validating your solutions, no infrastructure to rely on, and no metrics or documentation to consult.

At that point, being the new hire, you're taking a lot of heat for not getting things done on time - mostly through no fault of your own. At that point, "wanting to throw you under the bus to your superiors" is a very natural response - it's a defense mechanism, you're rightfully frustrated.

You're between a rock and a hard place. Can you not relate to that? This should be the top comment.

At my company it is amazing how clueless young graduates play politics from day one, while doing no real work other than going from conference to conference and self-promoting on Twitter.

Start writing tests, change no production code. There are times when things that appear to be bugs are actually weird features that the business needs to function.

Sometimes cruft is actually a bug fix. Start with high level integration tests of the most critical business processes. I once did a major cleanup at the start of my career.

The above advice is closest to what proved successful to us, together with the response by JohnBooty https: In our case, I think we didn't write a lot of tests, because we didn't know they're so useful then.

But much later I did a few ports of FOSS software between programming languages, and comprehensive test suites were absolutely godsend in those cases.

So, if you can, try to write tests as first thing indeed. Other than that, we took a kind of "organism fighting a cancer" approach.

In a spaghetti codebase, we tried to find some smallest possible islands of the most isolated code a lot of detectivistic work.

Then try to improve the isolation even more — slowly engulfing the "tumor" in a more reasonable API. Once we had a somewhat acceptable API, with mostly well understood semantics, rewrite the internals of the tumor from scratch.

Notably, as mentioned by JohnBooty, we did talk this with management. The argument was that there was a particular critical bug, which would result in lost consumer data.

This one bug was found very close to original release date, and opened our eyes to the horrors in the codebase actually, a big part written by a subcontractor.

Sorry if the reply is somewhat chaotic, I didn't have much time to write it. Are all errors being logged, with stack traces?

Next, the deployment process. Are tests run on all deploys? Are there canary deploys to minimize impact when bad code goes out?

Can you run it easily locally? Can you easily attach a debugger? After that, add end-to-end, integration, then unit tests, in that order.

Only then, once you understand the code well, and have it nicely instrumented and tested, should you consider significant refactors. If any of the above steps are already well covered, skip them.

Tests should catch most errors, monitoring should quickly catch the rest to minimize the impact. I think you are right, though in my experience in these situations is that defining the exact behavior is very hard.

In not many cases was the messy code written messy from the start, it's usually an accumulation of changes to behavior - which are very hard to figure out.

I've found it's also hard to test code that isn't modular and split up: Either that or you split them up yourself and risk breaking something.

These tests may be brittle and they may not cover all branches. This is what i would suggest as well.

I did some "rewrites" in my carreer and they only really went well when i worked long enough with the legacy code before.

If you feel the code is messy it is likely you are missing some essential business logic as well when blindly rebuilding it.

Feathers which I heartily recommend. I got it a while back when working on a similar sounding codebase and it was very useful.

Martin Fowler's Refactoring is an excellent companion to Feathers' book. It will be worthwhile to know that a second edition of that book is expected to come out shortly.

Is there a chapter on what to do if your coworkers don't initialize variables? I just inherited a steaming pile of legacy where they didn't and I'm struggling to understand how they got it to run at all.

At least I'm starting to understand why we held off on the spectre patches. Not explicitly, no, but it does have some techniques for reading code that might help?

Do you mean global variables? I guess it entirely depends on what language and framework you're using, but trying to refactor things to have less global state is generally for the best.

ISL 79 days ago. This book was written for OP and many others. It specifically addresses the "there are no tests, what do I do?

If the answers to those questions are no. Then you the problem and you should look for employment elsewhere. You are unhappy in that job, and you rewriting the codebase would potentially make the above questions answer to a YES, inflicting damages in the company.

Now, if the above questions have yes as an answer. Talk to your manager, explain how it won't scale, how it is hackable, and the bugs you found - and get the blessing to make things better!

If you ask me, this is a pretty awful approach. Some codebases are so obscenely dangerous that you really shouldn't be giving a shit whether or not it "works", because it's only a matter of time before it doesn't.

There are code practices that are inexcusable under any circumstance. Sitting on a fucking nailbomb when it's in your power to change it because you don't want the headache of having to push for a real solution will catch up with you in the end.

I'm not saying that you have an option in a do-or-die situation where it needs to be done in a couple days. I'm also not saying that you should subvert or defy management to execute a massive overhaul or total rewrite.

I am saying that if you understand a system, know that it's fundamentally flawed, and have a window to fix it even if it's a really tiny one , but choose not to, you are part of the problem.

The standards that software developers are held to in terms of quality are an absolute joke, and the "it hasn't completely imploded our business operation, so don't even think about fixing it" mentality is where those standards stem from.

This seems like a great post to vent a little bit. I'm definitely a bit touchy on this subject.

I like to think I'm pretty good at programming, development, and generally architecting solutions. I don't have a lot of experience, but I have a bit of talent and spent a lot of free time learning.

Solving problems with computers is something I'm passionate about. I started this particular project without any idea of what it was okay, they told me what it was, but it turned out to be something completely different.

When we did a kickoff it was myself, two other developers who both said during the kickoff they didn't want to be on this team, and wanted to go back to admin'ing MSSQL databases , and a non-technical TPM last time he touched a terminal was a decade ago, and he wasn't particularly interested even back then.

I ended up doing pretty much all the work. The first few weeks they wanted three services stood up and managed in an automated fashion.

I got it done, it wasn't pretty. Hell I hadn't even figured out a DNS scheme, but this had to get done so other teams would be unblocked; it was the development account so I wasn't too worried about rushed work.

Then we got more requests from other teams, and vague requirements from the infosec and governance teams.

Then the board that reviews new technologies shot down our my requests to introduce automation services like Ansible Tower.

Then the AWS team shot down our request for multiple accounts, one per environment. At this point the Cloudformation isn't scaling, I beg and plead for some time to freeze feature development and move to Terraform.

I asked for weeks, and was given 4 days. This was the one chance to move to Terraform though, otherwise we'd be using Cloudformation for the foreseeable future.

So I took it, deciding I could rush through the Terraform rewrite, because then at least we could refactor it later during downtime.

Next thing you know a year has gone by and we're going into production. Everything on the devops end goes pretty smoothly. My velocity is crap though, due in large part because of the shitty rushed work, which it seemed was all I was capable of.

A few months after go-live, we finally get a real TPM, which was a godsend. I was moving to another team at this point, and so his first order of business was to replace me with two new guys.

I spent a lot of nights interviewing and a month afterwards helping them get up to speed. I and the new TPM gave them cover that month so they could embark on rewriting the Terraform.

They ignored my suggestions on how to refactor it, which is okay, I was leaving the team, it was their code as now. But it was hard, hearing them laugh at the code behind my back, saying how bad it was.

Never giving me a chance to justify it, or even reading the commit messages, to understand why it was done that way. I'm off the team now, and while I recognize I left a lot of legacy code behind which I'm not proud of , it wasn't just me who created it.

It was also the business who said time and again development speed was the most important thing. That's how one legacy codebase was created.

There were a lot of things I might have been able to do differently mostly politically , but I truly believe I did the best I could with what I had.

But what do I know? My new TPM seemed to agree with me, but maybe he just didn't want to make an enemy. Perhaps I could have headed it off if I'd said the right words to the right people.

I don't know, will never know. This experience is why I don't make fun of others solutions. Somebody put effort and time and thought into it, and I guarantee in most cases I don't have that context to properly evaluate it.

I feel like this is how most legacy code bases are made. This is a surefire way to re-introduce bugs that were fixed ages ago.

Understanding why things are the way they are is the first order of business when working within a legacy code base. Was it done this way because the obvious way has a non-obvious edge case?

Was it a requirement from the users? Or was it just the fastest way to do it at the time? You have to have a certain mindset to effectively work on legacy code, and this isn't it.

Most more junior developers I've known have a "rewrite" oriented mindset, meaning they don't know how to work within the constraints of what exists and refactor piecemeal.

It's a hard to learn skill, generally learnt the hard way. Thanks for sharing this. Venting is good, and in this case a win-win, since this is good info very relevant in a thread about encountering "bad codebases".

Hopefully OP sees it. You could well be "the other developer" where OP is. What specific sorts of communication skills? One thing that comes to mind is learning when and how hard to push-back, and how to argue with force when necessary.

The reason I ask such a specific question is because I'm not great at confrontations. I don't dread locking horns, but I'm not good at it.

Diplomacy seems to me to equate to "die a bit more inside, burn some more of your own wick to deal with the frustration, don't say anything, and wait and see how things work out".

So I end up not engaging at all. I know I'm missing something huge here and I don't know what it is. I'm actually speaking completely generally though; I'm falling apart at this universally speaking.

Perhaps I just need to learn how to debate? Things rapidly go south from there; the biggest side-effect is that my memory completely shuts down, meaning that I cannot remember a any of the things the other person said so I cannot form an effective defense , b any of the things I said so if I say something incorrect[ly] I won't remember and c the way I say what I say, which means that my tone of voice might be off and I'll basically be too spaced-out to notice.

The resulting arguments are almost comical in their narrow-focusedness, with the resulting back-and-forth many many degrees away from whatever the original point was which typically gets lost within the first few seconds of conversation.

This is probably due to autism and some related undiagnosed anxiety disorder, but labels aside I've never really known where to start tackling something like this.

I've given up on mental health support, which only has its own agenda I don't want the brain-fog of drugs, so all the departments could care less , I just want to brain-hack my thinking onto the right track and I've no idea how.

FWIW, this is one of the reasons I'm actually reluctant to get a job, so I'm yet to get practical experience dealing with real-world issues. UpgradeCarton 77 days ago.

Sometimes the act of writing the notes helps your recall later. If you feel that you still can't recall your notes from memory, then refer to your notes and ask to delay any debate about the topic until you have them in front of you.

Your recall may improve if you hand write your notes versus typing them out. This would be worth its own Ask HN, if it hasn't been posted before.

TheJoYo 79 days ago. Given the context, I think the individual that you're quoting said that because they did do that within the commit messages.

And outside of the one place where I was the person to introduce source control to the organization, I've found commit messages to be pretty telling.

Most developers tend to let their feelings pop out in their commit messages, and too when and how often they're committing.

In your particular case, sounds like either a junior developer, legacy systems, or a sole developer. You have identified 3 important non-functional requirements: Consider you have 2 cars: Which car would you rather have after going the process I described 3 times?

A software project can be fast, reliable, and secure while also being extremely poorly engineered and extremely difficult to maintain and extend. Not a large one.

One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.

Somebody fathered a legacy codebase. JamesBarney 79 days ago. Only successful applications have the pleasure of getting old. Retra 79 days ago.

I'm not sure about "any" measure, the average startup probably has no surviving code in production..

Even the average in acquired startups, if we count acquihires.. Success, in this context, means having solved some problem for a meaningful length of time.

Retra 77 days ago. That doesn't exclude anything. Code can exist to pad resumes, feed paranoia, and bolster egos, manipulate people, or simply because someone can't admit their own mistakes.

Anything can be a solution to a problem. Yes, those things do happen. However, that isn't what I meant by the word "problem". I was talking about end-user problems.

DoreenMichele 79 days ago. So you're saying they speak from experience and know whereof they speak. Why can't you badmouth the previous developer?

Sometimes they were simply shit developers and wrote large quantities of shit code. Circumstances be damned, I've seen a few developers that should outright find a new career.

Generally because once you start badmouthing a person, it quickly gets into politics rather than being a technical discussion about the problems you're trying to solve.

And with politics it's generally less about what you know than who you know, so the person who's had a chance to build connections in the company will probably come out on top.

Varcht 79 days ago. Hard to guess their motives but it is easy to click on their username and see that they post a lot from it. Stop "repairing" it because you're guaranteed to introduce bugs and regressions.

You haven't learned it well enough and can already sense the fragility, which is why you're anxious.

Relate your impressions to the person in charge: You think there may be technical debt that needs to be addressed sooner than later. Until you're confident enough that you can pitch a comprehensive redesign and rewrite, wait for the person in charge to direct you towards specific repairs.

When they direct you towards these specific repairs, they will anticipate regressions and instability. They'll see you as working through issues, not causing them.

Repeat step 2 periodically and with greater detail until you're ready to make the pitch in Step 3. Some people are comfortable working around fragile and wonky code; some people get really stressed out.

You don't need to work in a job that's going to perpetually stress you out. For me it is more rewarding than working with pristine and well managed code bases.

I was explaining greenfield vs. Keeping in mind the above, I also know that deadlines, changing requirements, and lack of a clear goal due to the previously mentioned items , lead to this.

Had I not worked with them, my decade and a half of experience would have strongly suggested that such was the case. When it comes down to it, some people prefer working on new projects, and some people prefer supporting and polishing those once-new projects.

But to really succeed you've got to be able to do both, to some extent. I love your answer because it calls out the perception of what you're doing.

It's so important to frame what you're doing in a positive light, otherwise you'll fail, whether or not you make the codebase better.

Every programmer that has ever existed has said and felt this exact thing. It used to really bother me as well. Then I realized that the world is a messy place and I would need a stronger stomach if I was going to watch the sausage being made.

Don't refactor because it violates your delicate sensibilities about code - that's a great way to waste a lot of money and get yourself fired.

Greenfield development or maintaining a legacy code base that isn't complete shit is a luxury. Only tens of thousands of LOC? I've worked in places with millions of lines of spaghetti code.

The reality is that most business software that's been around for a while looks like this. If the environment itself is good, and you like the people you work with, then you should see it for the great opportunity that it is; learn how to slowly evolve a large software project for the better.

There's none of the stress of trying to figure out the "right" architecture, no worrying about making bad decisions. You can just chip away tidying things up.

Things that are probably a bad idea: Trying to rewrite will almost certainly fail , Blaming others it's no one's fault, it just is what it is , Walking away negative signal for future employers.

That book changed my career. Just look at the chapter names here: I dont have much time and I have to make a change Chapter 7: It takes forever to make a change Chapter I need to make a change but don't know what tests to write Chapter I dont understand the code well enough to change it Chapter My application has no structure Chapter I need to change a monster method and I can't write tests for it Chapter How do I know that I'm not breaking anything?

All the stuff is gold. It applies to every language, every work environment and every client I've ever been at.

This is the 1 book I have my teams read. Formatting and addl chapters. You'll learn what all the code does, you'll learn a new skill, you'll have a safety net of regression tests for rewriting the code, and you'll be adding value to the company.

If you have good test coverage, you'll be able to rewrite the code very quickly. There are a ton of resources for how and why to do testing.

One that stands out in my mind is SQLite. They've talked about being able to refactor the core of their engine in a weekend, only because they had the test coverage to know they did it right.

I am a senior dev managing a large and relatively messy codebase. Let's see if the way I read the situation checks out: This means that the person in charge of the code is probably aware of its shortcomings.

Your senior is probably very happy to have another dev helping with this. I wish I had someone helping me. Take it as an opportunity, dealing with legacy is a challenge but you can grow a lot as a developer!

BaronVonSteuben 79 days ago. I agree, but it's fraught with risk, and could also turn into an opportunity to spend several months or even years being miserable, and thought a mediocre to poor developer because you aren't able to deliver fast enough.

This becomes especially true when the original developer is there and can probably do things 10x faster which will make you look bad.

Perception is more important than anything. If you save the world but do it quietly, nobody will know, and they'll decide you aren't productive enough.

I agree, I think OP should find a way to present his work as a "project" that makes sense to management A good example, someone else in this comments thread suggested that OP could create an API around the legacy core.

Creating an API is something that can be "sold" well to management. Sharpen your skills, and lead them to the promised land. It could be worse.

You could face major resistance and people issues. This is an opportunity for you to kick a billion miles of ass I'd start with writing tests.

That way you're more likely to notice if you break something in a distant part of the code. Also see if you can make a to-do list. This will help make your request concrete to management.

As you cross items off it will help them see that you're actually getting work done. And, it could help to motivate you if you feel like you're "just rewriting the code".

This is the reality, don't expect every code base is clean and well organized. I have come across the same situation for a couple of times in my career.

I felt disappointed at the beginning, I wondered how high-paid engineers could write such shitty code, but quickly I found it's actually a very challenging job.

To understand the code base was like playing puzzle games with debugging tools. I had invented tools with some new stuff I just learnt to trace and visualized the program, or wrote scripts to clean up the code.

Eventually I became the owner of these projects, and refactor the hell out of it. That's not likely to get good results; you'll want to do more prep work to ground "did a bad job" in data.

That data will also be useful in making the "rewrite everything" decision, should things come to that. Start off at the organizational level: You're not going to get anywhere arguing for code quality at a place that doesn't value it.

Is the rest of the codebase like this? If it is, you may be facing a larger company-culture issue. Making real improvements is going to be seriously difficult without automated testing, so you'll probably need to add testing incrementally.

Maybe start off by reproducing a production bug in a test and then fixing it - this delivers immediate business-visible value faster than stopping the world to write tests.

Whenever you make changes, wrap the affected part in some more tests. Are there manual acceptance tests?

Consider automating some of them. Finally, be prepared to bail if nothing works - some places suffer from the "Market for Lemons" problem, where good developers who join figure out it's a dumpster fire and leave behind only bad ones.

BurningFrog 79 days ago. This is how most real world code is. You might be the exception, but when you've been working on code for a while, your code is probably like this to an outsider too.

The difference is that you have a ton of insider knowledge in your head that makes the code understandable. The person who wrote the code you now hate probably does too.

I've learned to enjoy fixing up projects like these. You can learn an enormous amount from fixing bad code, and I truly have! Unfortunately it's probably something you have to learn for yourself.

Just try to have a good attitude about it OK? Is there a test suite? Test coverage being measured? Hopefully the answer to all of that is yes already, but if not, focus on that first.

Next pick a component which is particularly problematic, or which is a focus of business attention at the moment. If not, write tests for them.

Covering error cases is less critical, although user errors — bad user input — are more important to cover than things like IO or network errors.

Don't get hung up on a numeric target — which bits of code are being covered is more important than a number.

Once your test suite covers the important parts of that component, start slowly refactoring it and cleaning it up. Then, once you are satisfied it is in a better state, choose another component to move on to.

Of course, that assumes you can get your management on board with you doing the above. I moved mostly to real estate after running an IT company for 15 years.

You know what they say in this field about 19th century buildings, which are certainly technically inferior to newly constructed houses?

IOW, the code you are seeing is at least in production, while many other companies did things differently perhaps in a prettier or more maintainable way and failed.

And write lots of tests before touching it. The Lindy effect is a concept that the future life expectancy of some non-perishable things like a technology or an idea is proportional to their current age, so that every additional period of survival implies a longer remaining life expectancy.

This right here is the best advice I've seen in the thread. Lot's of people are giving good advice here.

Definately write lots of tests before touching it. As you write the tests you may even start to see a pattern or "method to the madness". This has the disadvantage of possibly making you look naive.

The code might actually be fine and you might not have enough experience working in unfamiliar codebases or reading other people's code.

Moreover, original developers will have made choices for a particular reason, often without commenting and you might change something unintentionally if it doesn't read straightforward the first time through.

If it's mostly style issues, forget it. Consider that you might be wrong. It takes a lot of work to understand a code base. I've seen many young developers spend a short time looking at some code, fail to understand it, throw up their hands and claim it's a mess that needs to be rewritten.

Put in the time to make sure you know what you are talking about before making a fuss. I've refactored a lot of other people's code in my career.

If someone else wrote it then it pretty much always looks bad at first. Then again there is plenty of genuinely bad code out there.

So this makes the higher people think that it's all just fine. I really don't know what to do. Should I just go and basically say that this person did a bad job?

I think the only reason that you should be concerned with "this person", is to influence them or better, the work environment to discourage the behaviour that led to the problems you're struggling with.

For that to be effective, you need to stay positive. Remember that it's much more powerful when someone learns something themselves, compared to being told that same thing.

Folks who know the history of the code will hopefully see what's going on. The codebase isn't going to be magicked in to a better state through political moves, so assuming that you stay on, you'll need to come to terms with it.

It probably also depends on your experience. You might claim it is spaghetti code because you believe in some dogma that your predecessor did not adhere to.

Maybe hold back for a while and try to understand what's going on first? I've been there as well, but after going through quite a few 'paradigms' I have to say that I prefer spaghetti to lasagne layers and layers and more layers of crap calzone looks nice on the outside and has test cases for every line but thats because the logic is so contorted and mutable state is everywhere the mafia that tells me I can't use this keyword or other, how long lines can be, that I can't use a single letter variable name, etc pp.

RomanPushkin 79 days ago. From super senior dev perspective. You're not going to be there for the rest of your life.

One year is enough. I went through this multiple times, there are lots of places with a shitty code.

The worst thing that can happen - you'll will start blaming yourself. But if you just relax and let things go, you'll get salary, 9 to 5, job security.

Don't try to fix everything in one day. File stories, fix issues one by one. Eventually you will like it, and this is the real software engineering, the real world.

Yes, there are better places, but you will never know until you get there. So if you can live with it for about a year, it's good. If not, start looking, and remember - it's not your fault, and it's very hard to avoid that.

You need to work in a company for a couple of weeks to understand how things are going there. So you new job can be the same or even worse it also can be better.

But there are no any guarantees. Go slowly and look carefully at things. No matter how insane a code base looks, unless it is totally inoperable it is meeting a lot of conditions that are more important than whatever you are fixing but won't be recognized as important until you break them.

Those conditions built up over time and were changed irrationally by business decisions and hit or miss communication.

A lot of demoralizing for anyone who was trying to keep standards while meeting requests.. Don't beat up the past maintainers for a past you can't know in much detail.

Maintaining old code can be fun though and is a more interesting puzzle game than most new development. Just try to stay emotionally neutral and unattached to anything about the code besides the specific challenges as they need tackling.

One thing you can try doing is to rework sections of the codebase gradually over time as you change them. Don't touch code that is working and doesn't need to be updated, but if you are working on a feature in one corner of the codebase, see what you can do to improve that part of the codebase.

This is easier to deal with both in terms of selling it to management and making sure you don't actually break the whole system compared to a full scale rewrite.

I've made that mistake before and it wasn't fun. As others have said, code that's in production and works and is making money has value.

The "cleanness of the code" is not something business owners care about, unless it causes problems. I joined a small company 8 months ago.

The code at first felt somewhat sane, but the more I worked with it the more I understood that the whole project is a huge copypaste mom's spaghetti.

I started rewriting everything I "legally" somewhat within the scope of my tasks could. I also kept asking the lead coder about the poor quality and poor decisions up to the point where all we did was argue.

Management saw this and it turns out they were not satisfied with his performance for quite some time. He gets kicked out after 4 years.

I did that because I don't want to spend the next couple of years suffering from someone's bad decisions and complete lack of experience.

Now I get to work on much more interesting tasks, everything gets delivered faster. Some of the stuff I wrote gets used across other teams.

Only things that still keep me getting stuck in debugger are those I haven't rewritten and everyone agrees we have to rewrite them in near future.

I know I made a risky decision, but it was well worth it. Don't ask for permission to refactor, just do it using your best judgment as you also deliver features.

This is part of what makes it engineering and not just craftsmanship. Once you have enough code coverage this will take a long time , start rewriting small parts of the system.

You will have your tests to fall back on to verify you new design is correct. For each part of the old system, once you are confident, replace with your new code.

This all needs to be communicated up front as a long term goal. It's not about a rewrite. It's about the tests and having high quality software.

Something you need to understand, they may not want or need high quality software. Sometimes good enough is all they can afford right now, even though we know the tech debt will accumulate interest.

A part of your pitch is to communicate how important quality is to the long term viability of the software. Yah i went to a big name host and found the same thing.

I was fooled into joining because I met with a data scientist and an "experienced web developer" without actually looking at their code.

Long story short, 2 years later it was the most frustrating experience ever and I left, hating the code the entire time. I was paid a lot and the people were cool so that made me hang around but the culture promoted hanging on to legacy code and creating scenarios where the people in charge fostered chaotic code practices by not giving a shit and always moving on to the next thing without ever cleaning up after themselves.

I would recommend you to leave sooner than later as it will not get better unless you are the one that does it all or gathers some like-minded people to go forth with you but really that's too much effort IMO and you should just bail to a better scenario when you can.

Is it typical to be able to look at a company's code before signing up? After having a similar experience, I wish I could make that a standard part of my interviewing process.

I would never in years have taken my first development job if I had seen the code first, but HR and the carefully selected engineers who could tell positive stories gave me a false impression of what was going on.

When we first identify partners or clients, the interview is not unlike a job interview, but one where both parties are the applicant and interviewer.

I cannot count the times when someone from the other side tells me about best practices in coding, CI, covering tests and version management, after which, on inspection of their codebases, they actually do none of these things.

Even if we only touch the API in some cases; if the API is built on quicksand then we risk spending a lot of time building something that is not viable but that might not be immediately clear.

I guess it is not typical, but at one company I interviewed for I had a day for implementing something a small feature and some unittests which allowed me to check their codebase.

I liked what I saw and worked there for some months. Somehow a lot of people have got it into their head that all code is art, that everything is always beautiful, that it makes sense to take the time to make a great design for solving every problem, that if you aren't working with beautiful code then you aren't a good developer.

Think about other engineering disciplines - "okay" engineers can build new bridges, great engineers can cheaply fix existing bridges so they never fail again.

It is the same with software. Good engineers make new programs, and whenever they see a problem, they start from scratch, wasting time and money.

Great engineers massage existing code into something amazing, increasing efficiency without breaking the bank. As a side effect, if you make something crappy more reliable, it makes the creator look bad, as they should.

Otherwise, you will look bad. Nimmt man noch 1: Sollte man auf hohe Siege oder Niederlagen tippen? Durchschnitt 1,66 Heim und 1,20 Auswärtstore.

Im Mittel gehen nur ca. Was braucht man für die perfekte Meister-Vorhersage? Mit Hilfe des Marktwertes und der effektiven Torchancendifferenz kann man sich der perfekten Prognose der zweiten Saisonhälfte annähern.

Was ist mit Aufsteigern, den Bundesliga-Neulingen? Die Leistung von Neulingen ist erstaunlich gut vorbestimmt. Deutliche Abweichungen von der unteren Tabellenhälfte Tordifferenz: Liga - Übersicht 1.

Liga - Aktueller Spieltag 1. Liga - Teams 1. Liga - Saisonprognosen 1. Liga - Übersicht 2. Liga - Aktueller Spieltag 2. Liga - Teams 2. Liga - Saisonprognosen 2.

Liga - Übersicht 3. Liga - Aktueller Spieltag 3. Liga - Teams 3. Liga - Saisonprognosen 3.

Das spannende Niedersachsen-Duell zwischen Hannover und Wolfsburg 2: Das entspricht den normalen Regularien der Wettanbieter. Paderborn dpa - Der SC Paderborn hat in der 2. Etappe - Donnerstag, Die Antwort lesen Sie hier. Olympique de Marseille 9 5 1 3 Qualität der Beste Spielothek in Degtow finden Top10 Ligen [ mehr

Toto expertentipp -

Hält Dortmund die Bayern auf Abstand? SK Slavia Praha 14 11 1 2 Dass es ganz unterschiedliche Wetter gibt, haben wir in dieser Rubrik schon mehrfach besprochen. KAA Gent 14 7 2 5 Heuer konnte in einem Vergleich mit den Quoten von Wettanbietern nachweisen, dass die Vorhersagen nach seinem Modell besser waren, als die der Wettanbieter. Die Bergankunft auf 1.

Author: Kakasa

0 thoughts on “Toto expertentipp

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *