Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Dumbing down code so it can be maintained by junior devs

Dumbing down code so it can be maintained by junior devs

Scheduled Pinned Locked Moved The Lounge
csharpjavascriptpythonlinqcom
107 Posts 50 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Marc Clifton

    Peter Shaw wrote:

    Do I get a pay rise and a position in your office if I'm working the same job as you?"

    :laugh: Good one!

    Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

    P Offline
    P Offline
    Peter Shaw
    wrote on last edited by
    #76

    I'm not known for my Tactfulness, that's for sure :-) Blunt as a brick, and straight faced with it too.

    1 Reply Last reply
    0
    • abmvA abmv

      Usually the management should be in agreement that in-house training ( or sessions) for developers should be conducted periodically by the senior devs or the software architect, how boring they may be , but it is in they interest of the company to do so.Say the senior dev is on vacation.This could be pro-actively arranged and attendance recorded.This could be done with each major release or milestone of the project. Pluralsight videos or online tutorial are for people starting to code or learning and not even for junior devs.

      Caveat Emptor. "Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long

      J Offline
      J Offline
      Jim_Snyder
      wrote on last edited by
      #77

      My small team is highly vertically stacked. Our new management declared we would cross train each other. It is all great on paper, but the stress of learning a departed developer's undocumented code in every silo is palpable. In-house training sessions would be a joy in comparison.

      1 Reply Last reply
      0
      • D DerekT P

        Conversely, how does having first-class code help the business, compared to having "mediocre" code? If the end result works, and doesn't require massively more expensive hardware to run at an appropriate speed, then why not? "Simple" code helps the business by reducing staff costs, increasing the pool of potential recruits, reducing "up to speed" time for new joiners ... all these things are helping the business far more than using Linq where it's not necessary. Each new language feature or concept is another thing to learn and get expert in - or not. Keeping things "simple" with a smaller subset arguably allows all staff members to become "expert" in the entire gamut of techniques, and therefore able to pick up and work on any bit of the code, regardless of their seniority / experience. Maybe playing devil's advocate a bit here, but if you look at things from management's point of view, there's something to be said for it. And if it means experienced (expensive) developers leaving in frustration - to be replaced by cheaper juniors - that's yet another win for the bottom line.

        S Offline
        S Offline
        sdedalus
        wrote on last edited by
        #78

        The examples given of technologies to avoid are actually in the language to reduce code complexity and do a fantastic job of that. This won't make the code more readable for junior devs it will model the bad habits of the previous generation of programmers for the new generation. More likely this is a policy put in place by a manager who wants to micromanage developers and does not want to keep up with the new language features.

        1 Reply Last reply
        0
        • U User 12331290

          1. It would be unprofessional to write anything but the most efficient code possible. 2. How would a junior programmer ever progress if not presented with more challenging code. 3. It would not be possible to determine exactly what each junior programmer was capable of until they were presented with something they could not cope with alone. So how would you know how much to dumb down. 4. If I were a senior programmer on this team, I would take this as my cue to look for another job. 5. If I were a junior programmer on this team, I would take this as my cue to look for another job.

          L Offline
          L Offline
          Leng Vang
          wrote on last edited by
          #79

          5. If I were a junior programmer on this team, I would take this as my cue to look for another job.

          If I were a junior programmer on this team and I refuse to learn that more efficient paradigm, I should change career. :^)

          1 Reply Last reply
          0
          • M Munchies_Matt

            You havent answered the question. Is a carpenters job to make furniture, or to use the latest saw, plane, and screwdriver?

            L Offline
            L Offline
            Leng Vang
            wrote on last edited by
            #80

            You're not going to carve that table legs by hand with a rusty blade and charge customers 40 hours for each leg, are you? Hey it's made by hand and antique so the cost would be expensive. Most customers wouldn't pay for it. :)

            M 1 Reply Last reply
            0
            • M Marc Clifton

              DerekTP123 wrote:

              If a junior programmer can understand and maintain every part of the company's codebase, there is no requirement for learning and no requirement for senior (expensive) programmers.

              Because eventually, no senior dev will want to work for the company, leaving junior devs to maintain a code base that is metastasizing into an umaintainable, bug ridden slimy blob. At which point management contracts an outside job shop to come in and rewrite the software because a) it's broken and b) it can't support the demands of the users.

              Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

              J Offline
              J Offline
              Jim_Snyder
              wrote on last edited by
              #81

              ...and then management changes as the management cannot build the product, and new management begins the process all over again. :((

              1 Reply Last reply
              0
              • G GKP1992

                If you are told not to make use of good LINQ or extension methods, I do not think the resulting code would be any easier to understand. If in these cases the code is well commented, it is, in fact, compact and easier to understand. OTOH I agree with reflection (people tend to steer clear from it stating it is too powerful for its own good :laugh: ) since not many people know it. Asking developers to "dumbed down" code shows the lack of trust(maybe they have their reasons) in the new recruits. I do not think the code is the problem here. I would suggest educating the newer members of your team at least the "features" that are commonly used in the project.

                I am not the one who knocks. I never knock. In fact, I hate knocking.

                J Offline
                J Offline
                Jim_Snyder
                wrote on last edited by
                #82

                Even those of us knowing reflection normally avoid it if the performance hit is unacceptable.

                J 1 Reply Last reply
                0
                • M Munchies_Matt

                  Why does the latest C++ 7 features make for a better product?

                  R. Giskard Reventlov wrote:

                  You set out to write code that is not robust?

                  I asked you to define robust, in reference to a robust product. Do so before making assumptions.

                  R Offline
                  R Offline
                  R Giskard Reventlov
                  wrote on last edited by
                  #83

                  Munchies_Matt wrote:

                  Why does the latest C++ 7 features make for a better product?

                  I never said that it did.

                  Munchies_Matt wrote:

                  I asked you to define robust, in reference to a robust product. Do so before making assumptions.

                  There was no assumption - just an inference based on your patronizing. The point here is to encourage engineers to write the best, most robust possible code. That does not necessarily mean using the very latest but most engineers will make it their business to both know about the latest developments and how they might fit it into their programming. You are welcome not to do that or to scoff at the idea of writing code that may cause junior devs to actually have to think and learn but they will not improve unless they challenge themselves. Writing dumbed-down code is dumb.

                  Keep your friends close. Keep Kill your enemies closer. The End

                  M 1 Reply Last reply
                  0
                  • M Marc Clifton

                    soulesurfer wrote:

                    So, for balance, let's look at the other side.

                    You definitely have a point, and I will definitely veer toward maintainability. However, it really isn't about code (even though my subject line says "code") but about a lack of training, much with regards to what has been around in the .NET framework for years. Even common practices like DRY, writing small functions, decoupling, etc., those are things, as you say, a junior dev learns through code reviews (not just their own code but the code the senior devs produce) but such code reviews are completely lacking. :sigh:

                    Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                    J Offline
                    J Offline
                    Jim_Snyder
                    wrote on last edited by
                    #84

                    It has been 20 years since I worked at a company that allowed code reviews. $$$

                    1 Reply Last reply
                    0
                    • M Marc Clifton

                      Ever been asked to do this? I seem to be encountering this more and more -- the last company I worked for, I left because that was stated explicitly by the CTO as the new policy. What would you do if you were told to do that? And by dumbing down, I mean doing things like avoiding LINQ (except for basic things), metadata, reflection, extension methods, and any of the C# 7.0 language features. It seems that long gone are the days when companies actually invest in keeping developer skills up to par with the technologies the company uses. Or even more amusingly (not) keeping those technologies up to date.

                      Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                      S Offline
                      S Offline
                      Slow Eddie
                      wrote on last edited by
                      #85

                      This sounds like a "Negative Brag" to me. You are SOOOO MUCH SMARTER than the other guys you work with (please read sarcasm into this statement). Working as a successful employee includes more than being good at your particular skill, which I am certain that you are. No sarcasm intended. Working as a successful employee, please include contract labor, independent contractor, etc. in this category, involves much more. It includes being a team player, communicating well with others, following requests from your superiors willingly and cheerfully, and yes, that last means "doing it their way". What good is writing code using the "latest and greatest", "Most Robust" tools, frameworks and techniques, that no one else can understand, when in our industry as you well know most of those things will have the life span of Mayflies? Where will the company employing you be when you have moved on to your next contract, or job, and they are left with code you developed, that few programmers / developers understand? They aren't paying you to be a great programmer, they are paying you do get the job done the way they want it done.

                      "Newer" is NOT automatically better, only Different. (And more complex and bug ridden when it comes to all of the "boutique" languages / frameworks out there) It's a random chance Universe and we are all out there surfing waves of probability... Schrödinger's Cat

                      1 Reply Last reply
                      0
                      • L Leng Vang

                        Nice try. Unless the company doesn't plan to stick around long. Sooner rather than later that simple saving will come back to bite the rear end good. Happens all the time. Think it is expensive to invest in good engineering, try a bad one. :wtf:

                        S Offline
                        S Offline
                        sasadler
                        wrote on last edited by
                        #86

                        Yeah, I agree. Unfortunately you see it out there a fair amount. I've always been of the opinion that newbie engineers need to be mentored by a senior engineer. Unfortunately, that doesn't seem to happen much.

                        1 Reply Last reply
                        0
                        • U User 12331290

                          1. It would be unprofessional to write anything but the most efficient code possible. 2. How would a junior programmer ever progress if not presented with more challenging code. 3. It would not be possible to determine exactly what each junior programmer was capable of until they were presented with something they could not cope with alone. So how would you know how much to dumb down. 4. If I were a senior programmer on this team, I would take this as my cue to look for another job. 5. If I were a junior programmer on this team, I would take this as my cue to look for another job.

                          D Offline
                          D Offline
                          DerekT P
                          wrote on last edited by
                          #87

                          Member 12364788 wrote:

                          It would be unprofessional to write anything but the most efficient code possible.

                          Really?? Agreed, "efficiency" is certainly in the mix of attributes that a professional coder should aim for; but as the overriding consideration (implied by "most efficient possible") is surely not right. I would certainly be reluctant to deliver the "most efficient" code if it meant that it was virtually undecipherable by anyone but a guru-level developer; or was so rigid that a minor change to requirements would result in a total re-write. And coding purely for efficiency can certainly sometimes result in these types of solution. There are of course (at least) two sorts of "code efficiency": execution efficiency (minimising elapsed time and/or other resources during the usual execution route) and source efficiency (minimising the lines of code / method calls etc). These days hardware resources are typically very cheap compared to developer / maintenance costs so businesses will often opt to develop a simple, maintainable, and/or quickly-developed solution and offset any inefficiency by buying a few extra MIpS or MBytes. As a (freelance) professional, part of my (unspoken) remit is to fully understand the client's requirement - do they need something mega-efficient (maybe to fit on an embedded chip), very quick to develop, something very flexible to maintain in the future, something that could easily be easily ported to another system (so maybe using a common subset of a tool or language), etc..etc..; and then to develop to meet those requirements. In practical terms, "efficiency" can sometimes mean not adding a dependency to yet another external assembly (or to a specific newer version of an assembly). When I create a new VS solution, the LINQ modules are usually included by default. If a solution requires LINQ then I'll use it, but I'll try and avoid just a single usage of LINQ as that adds not only a dependency on an extra assembly, but a dependency that any future maintainer knows LINQ. (LINQ used simply as an example here). Also, "more challenging" may mean a more sophisticated technique or concept; but sometimes it just means a new or different syntax. It may "challenge" the developer to learn that additional syntax, without actually "improving" the developer's skills. Instead of learning "better" ways, they just learn "more" ways to do something. It adds to the buzzwords on their CV but just gives them brain-bloat and I've seen j

                          1 Reply Last reply
                          0
                          • J Jim_Snyder

                            Even those of us knowing reflection normally avoid it if the performance hit is unacceptable.

                            J Offline
                            J Offline
                            Jon McKee
                            wrote on last edited by
                            #88

                            The times I've found a reason to use reflection have mainly been when using attributes. You can statically load the information into the type itself so you only incur the expense a single time for each class. Works for generics too (cost will be once per unique T). It's really not as bad as people think if you aren't reflecting constantly.

                            J 1 Reply Last reply
                            0
                            • J Jon McKee

                              The times I've found a reason to use reflection have mainly been when using attributes. You can statically load the information into the type itself so you only incur the expense a single time for each class. Works for generics too (cost will be once per unique T). It's really not as bad as people think if you aren't reflecting constantly.

                              J Offline
                              J Offline
                              Jim_Snyder
                              wrote on last edited by
                              #89

                              Excellent. The times I was using reflection was in conjunction with OpenXML, and it was once per run, so little impact. My comment on performance degradation comes from StackOverflow, not personal use.

                              1 Reply Last reply
                              0
                              • M Marc Clifton

                                Maximilien wrote:

                                Is it more a question of using the latest language tricks versus making the code more readable ?

                                I agree, though I have no problem reading those examples. But I didn't know (and nothing comes up in google) that a ^ is what you use to index from the end of the array. If that's actually the case, I wish they'd just done what Ruby and Python do -- use negative numbers. But really, I'm not talking "tricky" code -- I'm talking about simple things like knowing how to use reflection, or how extension methods work and guidelines on when to use them, or basic things like threading -- async/await, Task, TPL, even Thread.

                                Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                Richard DeemingR Offline
                                Richard DeemingR Offline
                                Richard Deeming
                                wrote on last edited by
                                #90

                                Marc Clifton wrote:

                                But I didn't know (and nothing comes up in google) that a ^ is what you use to index from the end of the array.

                                The future of C# : Build 2018 - YouTube[^] - coverage of "ranges" starts at 55 minutes. Apparently, using negative numbers was ruled out in a language design meeting:

                                Champion "slicing" / Range · Issue #185 · dotnet/csharplang · GitHub[^]:

                                If we use negative numbers, we could make it work for ranges in cases like a[1..-1]. However, we would not be able to make a[-1] work since it already has a meaning in the language. In fact, it would be a pretty a scary breaking change to try and introduce that since it would no longer throw a runtime exception and would instead start returning unexpected values.


                                "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                                1 Reply Last reply
                                0
                                • M Marc Clifton

                                  Ever been asked to do this? I seem to be encountering this more and more -- the last company I worked for, I left because that was stated explicitly by the CTO as the new policy. What would you do if you were told to do that? And by dumbing down, I mean doing things like avoiding LINQ (except for basic things), metadata, reflection, extension methods, and any of the C# 7.0 language features. It seems that long gone are the days when companies actually invest in keeping developer skills up to par with the technologies the company uses. Or even more amusingly (not) keeping those technologies up to date.

                                  Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                  L Offline
                                  L Offline
                                  Lost User
                                  wrote on last edited by
                                  #91

                                  People have been asked to dumb down their answers around here on occassion ... so "everyone" will understand. As if "more questions" are to be discouraged on a particular topic. My first supervisor said I asked "too many questions". I stopped asking.

                                  "(I) am amazed to see myself here rather than there ... now rather than then". ― Blaise Pascal

                                  1 Reply Last reply
                                  0
                                  • M Marc Clifton

                                    Ever been asked to do this? I seem to be encountering this more and more -- the last company I worked for, I left because that was stated explicitly by the CTO as the new policy. What would you do if you were told to do that? And by dumbing down, I mean doing things like avoiding LINQ (except for basic things), metadata, reflection, extension methods, and any of the C# 7.0 language features. It seems that long gone are the days when companies actually invest in keeping developer skills up to par with the technologies the company uses. Or even more amusingly (not) keeping those technologies up to date.

                                    Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                    G Offline
                                    G Offline
                                    Greg Lovekamp
                                    wrote on last edited by
                                    #92

                                    I don't recall being specifically asked to do this; however, that has always been my goal: to take the complex and make it simpler. As a senior developer, my primary job is to create code that can be maintained by others; not code that is the most efficient, nor the flashiest, nor bleeding edge. While those may occasionally be side effects, the PRIMARY goal is to generate maintainable code. Maintainable by people paid less than me, junior programmers who keep the simple systems running and modify as needed. If every system must be maintained by senior developers, the business will go bankrupt pretty quickly. To your last point about "keeping developer skills up to par with the technologies the company uses", it appears the company has simply chosen to use technologies requiring less skills. I don't see a problem with that though usage of such technologies may make you prefer to find a different employer.

                                    1 Reply Last reply
                                    0
                                    • M Marc Clifton

                                      GKP1992 wrote:

                                      I would suggest educating the newer members of your team at least the "features" that are commonly used in the project.

                                      Two things I've been noticing. There also seems to be a lack of motivation to learn from the senior people, and management is clueless so any "motivation" from that direction doesn't happen either. It seems that the young people nowadays have a different focus. The days of the "computer club" where people got together to learn things are long gone. Maybe in places like Google or Microsoft that kind of culture still exists, but I don't often see it in the "meat and potatoes" companies.

                                      Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                      G Offline
                                      G Offline
                                      GKP1992
                                      wrote on last edited by
                                      #93

                                      Marc Clifton wrote:

                                      The days of the "computer club" where people got together to learn things are long gone.

                                      Ahh the truth. It's usually unpleasant. But that's what CP is for, isn't it? :)

                                      I am not the one who knocks. I never knock. In fact, I hate knocking.

                                      1 Reply Last reply
                                      0
                                      • R R Giskard Reventlov

                                        Munchies_Matt wrote:

                                        Why does the latest C++ 7 features make for a better product?

                                        I never said that it did.

                                        Munchies_Matt wrote:

                                        I asked you to define robust, in reference to a robust product. Do so before making assumptions.

                                        There was no assumption - just an inference based on your patronizing. The point here is to encourage engineers to write the best, most robust possible code. That does not necessarily mean using the very latest but most engineers will make it their business to both know about the latest developments and how they might fit it into their programming. You are welcome not to do that or to scoff at the idea of writing code that may cause junior devs to actually have to think and learn but they will not improve unless they challenge themselves. Writing dumbed-down code is dumb.

                                        Keep your friends close. Keep Kill your enemies closer. The End

                                        M Offline
                                        M Offline
                                        Munchies_Matt
                                        wrote on last edited by
                                        #94

                                        R. Giskard Reventlov wrote:

                                        I never said that it did.

                                        But that is what this thread is about.

                                        R. Giskard Reventlov wrote:

                                        Writing dumbed-down code is dumb

                                        Try working in the Kernel.... I write the simplest code I can. Laid out in the clearest fashion possible. Writing dumbed down code is clever. KISS, every heard of that? Throwing the latest 'must have' in the code, and making it unmaintainable by anyone without knowledge of that 'must have' is dumb. And it isnt just junior devs who fall foul of this stupidity, it is ANY dev who hasnt used that particular 'must have'. Like so many devs you evidently fall into the trap of believing the code is the product. It isnt. It is a representation of machine code. That is all. All languages produce machine code. Of course to remind you that at the end of the day VB achieves just the same as your precious wont be welcome, but that's a fact.

                                        R 1 Reply Last reply
                                        0
                                        • L Leng Vang

                                          You're not going to carve that table legs by hand with a rusty blade and charge customers 40 hours for each leg, are you? Hey it's made by hand and antique so the cost would be expensive. Most customers wouldn't pay for it. :)

                                          M Offline
                                          M Offline
                                          Munchies_Matt
                                          wrote on last edited by
                                          #95

                                          Is C++3 a rusty blade?

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups