Signs your code is unmaintainable



  • @Lorne-Kates said in Signs your code is unmaintainable:

    1. open the solution
    2. do a global search
    3. Look for a function name

    The code is unmaintainable if only ONE of the following is true:

    • You only get back the function definition itself
    • You only get calls to the function

    So... You shouldn't use libraries?

    Get yourself dotPeek and integrate it with VS. Function definitions anytime, anywhere, right under Ctrl-Click.


  • Winner of the 2016 Presidential Election

    @dkf Hell no, and thank $deity for that. But we have to integrate with Hadoop, although it makes no fucking sense, because customers demanded it.

    Did you know that Hadoop depends on at least 3 different versions of Guava? And that its dependencies on its own modules have version conflicts in them?


  • Discourse touched me in a no-no place

    @asdf said in Signs your code is unmaintainable:

    Did you know that Hadoop depends on at least 3 different versions of Guava?

    At once? Oh the Fun you'll have!

    Do things get better if you use a <dependencyManagement> section to force which version is present? That's vital if you don't want to go crazy with this sort of thing, but can take quite a bit of testing to see that you're not forcing incompatibilities on the build by accident. I also find that it helps me to use Eclipse's m2e for browsing the dependency graph when figuring this out.


  • Winner of the 2016 Presidential Election

    @dkf said in Signs your code is unmaintainable:

    Do things get better if you use a <dependencyManagement> section to force which version is present?

    We are using the Gradle equivalent to that. It took a whole day to figure out the correct versions for everything and eliminate all version conflicts.



  • @Luhmann said in Signs your code is unmaintainable:

    1. Your application(s) are health care related.

    I'm just entering that snake pit. Health-care related, safety class C (= can kill the patient if it fails so that it misconfigures the hardware). Quite a bit of legacy code around too, so I am pretty sure I'll have a couple :wtf:s in a few weeks.



  • I expect you know better than to sign off on any drivers for hardware that doesn't have hardware-based passive safety interlocks on all safety-critical actions, right? Seriously, if the EEs and MechEs can't be bothered to do it right, why should you be the one to take the blame for their fuck-up?

    Oh, and double-check all the possible race conditions, those are a bitch to get right.

    Filed Under: Linky, just on the off-chance someone here doesn't know that story already. Unlikely, given it's infamy, but possible.



  • @AgentDenton That sounds, apart from a couple important differences, like where I work. *sigh*



  • @Lorne-Kates said in Signs your code is unmaintainable:

    1. open the solution
    2. do a global search
    3. Look for a function name

    The code is unmaintainable if only ONE of the following is true:

    • You only get back the function definition itself
    • You only get calls to the function

    So situations where you have a one project which only contains the code for a DLL, the compiled version of which is used in a half dozen other projects? I see no problem with that since it provides a great way to reuse code.

    @Maciejasjmj said in Signs your code is unmaintainable:

    Get yourself dotPeek and integrate it with VS.

    I hadn't heard of that. Yoink!


  • Considered Harmful

    I had a coworker do an HTML page for our website. When I was reviewing his code, I pointed out a couple of misspellings in his classes and IDs.

    "Oh, I did that on purpose so it wouldn't conflict with any of your existing classes."

    I thought I heard him wrong.

    I wish I heard him wrong.

    Almost every class was slightly misspelled in different ways. Several different permutations for each word. "baner" "hitelight" "highlight" "hilite" ""cotent" "shdow" "selct"



  • @error why not give it a proper name? Also people should really be told straight away about the practice of OOP CSS techniques (before they learn things like SASS/LESS/Stylus/{Insert CSS transpiler}).

    Anyway we all know my feelings about IDs ... lets not go back there.


  • Trolleybus Mechanic

    @Maciejasjmj said in Signs your code is unmaintainable:

    So... You shouldn't use libraries?

    Caveat being they are your functions.

    I'm thinking more along the lines of dynamic code, eval and other janky shit.



  • @Lorne-Kates Eval should be called Evil.


  • Impossible Mission - B

    @lucas1 It is, by plenty of people.



  • @Lorne-Kates said in Signs your code is unmaintainable:

    dynamic code, eval and other janky shit.

    Oh, yeah, that's evil as fuck. Sometimes necessary, though.

    Reflection is also a dangerous tool when used willy-nilly - you can make it work and stay maintainable and strongly-typed, but not everyone goes that extra mile required not to just plop a string with a method name in the middle of your codebase.


  • Impossible Mission - B

    @Maciejasjmj said in Signs your code is unmaintainable:

    Reflection is also a dangerous tool when used willy-nilly - you can make it work and stay maintainable and strongly-typed, but not everyone goes that extra mile required not to just plop a string with a method name in the middle of your codebase.

    AFAICT the use of reflection almost invariably means one of two things.

    1. You're trying to interface with external code that invokes your codebase using class/method names from your codebase.
    2. What you really need is metaprogramming but your language doesn't support it.

  • Winner of the 2016 Presidential Election

    @masonwheeler said in Signs your code is unmaintainable:

    1. You're trying to interface with external code that invokes your codebase using class/method names from your codebase.
    2. What you really need is metaprogramming but your language doesn't support it.

    Examples for both can be found in our code base. (Technically, we don't use reflection directly for (1), but use ServiceLoader for that.)



  • I once inherited a codebase for which the "functional" documentation only explain the limits of the system (you can't do X + Y + Z because raisins), but it did not say a thing about what the system can or should do. Furthermore, there was no technical documentation nor any architecture documentation.

    The program itself was a big ball of mud. The website was VB.Net vAncient and used code behind extensively (Button12_Click was doing database inserts). There was no error handling (except for a try/catch on page level) and the business rules were hardcoded. There were separate console applications which would process some tasks, triggered by the Task Scheduler.

    There was no architecture. There was no consistency in how the parts were designed, nor in how they were implemented.

    • The web site used EF.
    • Console application #1 used raw hardcoded SQL queries.
    • Console application #2 used stored procedures to push data into SQL Server, where a boatload of stored procedures contained all the application logic.
    • Console application #3 relied on SOAP-based web services that were part of the web site.
    • Console application #4 invoked a "dynamic report generator". This meant that the application called a stored procedure, providing it with the name of a "report" to generate. This in turn read the SQL from a table and used the SQL Server variant of eval to get the data.

    This entire thing has eventually been "refactored".


  • Notification Spam Recipient

    @AlexMedia said in Signs your code is unmaintainable:

    Console application #4 invoked a "dynamic report generator". This meant that the application called a stored procedure, providing it with the name of a "report" to generate. This in turn read the SQL from a table and used the SQL Server variant of eval to get the data.

    šŸ‘‹ I recently finished the bare bones work for this!



  • Entity Framework is total shite. It takes so fucking long to do basic queries compared to other light weight ADO.NET wrapper libs that are soo much better than do like 75% of what EF does.



  • @Tsaukpaetra said in Signs your code is unmaintainable:

    @AlexMedia said in Signs your code is unmaintainable:

    Console application #4 invoked a "dynamic report generator". This meant that the application called a stored procedure, providing it with the name of a "report" to generate. This in turn read the SQL from a table and used the SQL Server variant of eval to get the data.

    šŸ‘‹ I recently finished the bare bones work for this!

    What is wrong with you?!

    @lucas1 said in Signs your code is unmaintainable:

    Entity Framework is total shite. It takes so fucking long to do basic queries compared to other light weight ADO.NET wrapper libs that are soo much better than do like 75% of what EF does.

    In my view Entity Framework is okay, but you have to get a really good understanding of how EF works and why it works in the way that it does.

    If you leave everything to its default settings (lazy loading, proxy creation enabled, and so on) it will produce monstruous queries that take ages for SQL Server to process, and later on EF needs quite some time to 'materialise' the resultsets back into objects. If you do proper statements, EF shouldn't be much slower compared to plain old ADO and doing the mapping to/from objects yourself.



  • @AlexMedia said in Signs your code is unmaintainable:

    If you leave everything to its default settings

    That is the problem most people do. I rather use something that uses something that is a light abstraction over ADO.NET where understanding it is required I think that is better for the community as a whole.


  • Notification Spam Recipient

    @AlexMedia said in Signs your code is unmaintainable:

    @Tsaukpaetra said in Signs your code is unmaintainable:

    @AlexMedia said in Signs your code is unmaintainable:

    Console application #4 invoked a "dynamic report generator". This meant that the application called a stored procedure, providing it with the name of a "report" to generate. This in turn read the SQL from a table and used the SQL Server variant of eval to get the data.

    šŸ‘‹ I recently finished the bare bones work for this!

    What is wrong with you?!

    Oh right, you weren't here for my topic on this...



  • @Maciejasjmj said in Signs your code is unmaintainable:

    So... You shouldn't use libraries?

    I assume he is talking about C, where its possible to call a function without its header file, or worse, with a wrong header file with the signature wrong. You usually get a warning for that with a decent compiler.

    You can also have the same function declared in several places with extern.

    The code at my work has all of these things.



  • @blakeyrat said in Signs your code is unmaintainable:

    Your dependency graph is unreadable if printed on a single piece of 8.5x11 paper.

    8.5x11cm is pretty small, that's just a postcard.

    What kind of dependencies? Libraries (Transient too)? Build system? Runtime? External systems? Databases?

    What kind of toy systems do you work on? Your expectations of system complexity here in the real world are unrealistic.


  • Notification Spam Recipient

    @another_sam said in Signs your code is unmaintainable:

    Your expectations of system complexitygood software here in the real world are unrealistic.

    Lets be honest here.



  • @another_sam said in Signs your code is unmaintainable:

    8.5x11

    ...inches, I believe. Making it roughly A4 for those of us who like their units well-defined.


  • Winner of the 2016 Presidential Election

    @Tsaukpaetra said in Signs your code is unmaintainable:

    Lets be honest here.

    Nope. Simply no. This is one of those software engineering rules which are correct in most cases, but simply wrong in others. I hate those general "max. X dependencies" / "max. Y lines of code per Z" rules, because they completely ignore the reasoning behind a decision.

    Yes, you should try to minimize your external dependencies. As I've said elsewhere, each dependency is a (small) risk and you should never add one without a good reason. But there is software out there, like ours, which has dozens of dependencies and actually needs them. The list of all our transitive dependencies printed out in a 10pt font would be at least 2 pages long. And there is not a single dependency on that list that we can or should remove. (Well, the libraries we depend on could have a few less dependencies themselves, but that's outside our control.) I know because I personally went through that huge list and removed anything we don't actually need.


  • Notification Spam Recipient

    @asdf said in Signs your code is unmaintainable:

    @Tsaukpaetra said in Signs your code is unmaintainable:

    Lets be honest here.

    Nope. Simply no. This is one of those software engineering rules which are correct in most cases, but simply wrong in others. I hate those general "max. X dependencies" / "max. Y lines of code per Z" rules, because they completely ignore the reasoning behind a decision.

    Yes, you should try to minimize your external dependencies. As I've said elsewhere, each dependency is a (small) risk and you should never add one without a good reason. But there is software out there, like ours, which has dozens of dependencies and actually needs them. The list of all our transitive dependencies printed out in a 10pt font would be at least 2 pages long. And there is not a single dependency on that list that we can or should remove. (Well, the libraries we depend on could have a few less dependencies themselves, but that's outside our control.) I know because I personally went through that huge list and removed anything we don't actually need.

    I'm not sure why you're replying to me.



  • @Maciejasjmj said in Signs your code is unmaintainable:

    @another_sam said in Signs your code is unmaintainable:

    8.5x11

    ...inches, I believe. Making it roughly A4 for those of us who like their units well-defined.

    I'd always wondered what those other weird paper sizes were. A4 is ~5.9 mm narrower and ~17.6 mm longer than the 8.5"x11" paper size. TIL


  • Discourse touched me in a no-no place

    @Maciejasjmj said in Signs your code is unmaintainable:

    Reflection is also a dangerous tool when used willy-nilly

    I have what I think is a good use of it--I have a method that needs to call a method on a class in another assembly. But there's two versions of the assembly in the wild, and each one has a different version of that method (differentiated by the number of out parameters) so I use Reflection to figure out which version is available and then call that, because I only need the return value, not the information coming back out via parameters.

    ETA: well, maybe not necessarily a good use, but the least bad way I could come up with to solve the problem. The 3rd party software I interface with distributes my product and CBA to do things like keep track for each of their customers which version of my assembly they should give if I were to write two versions of it.


  • Winner of the 2016 Presidential Election

    @Tsaukpaetra said in Signs your code is unmaintainable:

    I'm not sure why you're replying to me.

    Not enough sleep/coffee. Also NodeBB on mobile.


  • Notification Spam Recipient

    @asdf said in Signs your code is unmaintainable:

    @Tsaukpaetra said in Signs your code is unmaintainable:

    I'm not sure why you're replying to me.

    Not enough sleep/coffee. Also NodeBB on mobile.

    You're not wrong.



  • @AlexMedia said in Signs your code is unmaintainable:

    Button12_Click was doing database inserts

    This brought back memories of a support call I had to help out with many years ago. Written by the boss of the company before I started there, and now us mere mortals had to support it. Trouble is, it was littered with sh!t like Button12, Combobox7, Textbox6 and the like.

    Of course, nothing was done with some form of business objects. Everything was driven with control values.

    Man, did I hate that. I couldn't understand why the normal support guys didn't refactor the names. One of them actually had a printed copy of the design view with the control names penciled in šŸ˜®


  • Discourse touched me in a no-no place

    @groo said in Signs your code is unmaintainable:

    You usually get a warning for that with a decent compiler.

    The compiler tends to be limited as to what it can complain about there in C, as it doesn't know what the truth really is; the compiler doesn't usually see the libraries that you are actually linking against. Of course, if it did then it would have other problems as you'd most likely end up being pinned against a specific library revision and unable upgrade anything at all. :( Getting the balance right between these extremes is very difficult.



  • Signs your code as unmaintainable :

    Version: SKS 1.1.5
    Comment: Hostname: pgp.mit.edu
    
    mQINBFNIX2cBEAC826WKIi1ICuaCHRzWPCVEVoSHzIgswVUXpmzwOE7nq5Xzuyjnp0BFQxde
    nanHqrqitjrG5Pk+RzhGZUyLOdU072hze7IketD6+iGMUwT1OCUgFYD7JMIX1oM/VrlzwL6r
    ZZN5D/pXr6OFk36ghj5K/VgBNfgBwKAsuaAe6iA9UZQXg4w1nbkh+R9H+s98AbbwCi7lAWud
    Wt30FXgK+l7qlosNyGuDAttuVDrd3vcC6ct+6LdI+rO9IU3dXZ21nMzagcm0Fzz3N79iyD/i
    ecQh9Gkn9ufbYXHdHZofdqpT7rzvufCXSrSjPycC+aJ1s31uZ/NgbYAllJxoVLm1vZWPG8oW
    nvRf4ZxsPWbrzKjOF7b7nlmcZKeYhbWlzhtf7iPr/cjkANrGrLLPQqGZJf+Bi+rf+EOUORpj
    YDp3J8sCO6brGs0UcA1Qmd2o5Vl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gl0/fxfv+R1CkaFYQuTI/GQxra93og/oOQlfOthqPCC2nxwD6Un1NsBzi5AxVF
    DDBheML0kMUSFxu/9X4sjJK5jZh9ztk1sElfqgr4RiTP0BDbGEQPq2U5wbU2LXdMZxxdXKhO
    irIxWOjxbmDpfIORYvAk/0xvjnxLncUbx95sKC4rBEY+/NUPerCBk4myNZLVZinlz+H63HgS
    GDxiw8B8WiNAWax4wbMoMwnWkKTkEvXhthDoyCNBZzNJsIGkF+AK34NZkGQ0YThIyv0DBqQX
    Z0xv/YmkkMvw2uLw5UqF599yPJixWBiA9g17o5CuWuz5MNd2qshdyJf/MlD+9U4nTU9+5uLv
    LqPw0gA+qG4xb0HK86j5KYg2srfPHeUfTzkDJ1sgQG8NIaF08tmGjIvLEe2WAxAHgeCrS++x
    RCyQh+BArOEQ4HdTPuobpuos4+mFvXkpjaClVpAsuB20a8emg6Sxep7f4KhJ4X6q2TbtaKQL
    R2h7EW8vfWl2v5+Pb1zVbHHyaas8rELE8OFf/pwhp6JJTp7pf4XsVxEGjTsrN2UuecDM
    =3ksD
    -----END PGP PUBLIC KEY BLOCK-----
    


  • @djls45 said in Signs your code is unmaintainable:

    I'd always wondered what those other weird paper sizes were. A4 is ~5.9 mm narrower and ~17.6 mm longer than the 8.5"x11" paper size. TIL

    The ISO paper sizes are defined by an aspect ratio of sqrt(2), which makes them great for scaling. Increasing the number by 1 while keeping the letter halves the area of the sheet. The A series is defined by A0 being 1Ā mĀ², the B sizes are the geometric mean between adjacent A sizes (B0 being larger than A0) and the C sizes use the geometric mean between A and B sizes with the same number.


  • FoxDev

    @Khudzlin said in Signs your code is unmaintainable:

    A0 being 1Ā mĀ²

    A-1 being 2Ā mĀ²
    A-2 being 4Ā mĀ²
    A-22587608 is big enough to wrap the entire Earth in a papery cocoon of DEATH


  • kills Dumbledore

    @accalia said in Signs your code is unmaintainable:

    A-22587608 is big enough to wrap the entire Earth in a papery cocoon of DEATH

    yeah, but could you fold it more than 7 times?


  • FoxDev

    @Jaloopa said in Signs your code is unmaintainable:

    @accalia said in Signs your code is unmaintainable:

    A-22587608 is big enough to wrap the entire Earth in a papery cocoon of DEATH

    yeah, but could you fold it more than 7 times?

    assuming you could manipulate it sufficiently to gift wrap a planet..... probably.

    Mythbusters used a sheet of paper the size of a football field and got 11 folds to make a very uncomfortable twin size matress..... so theoretically it's possible to do it with a sheet of paper that is planet sized.


  • Discourse touched me in a no-no place

    @accalia said in Signs your code is unmaintainable:

    A-22587608 is big enough to wrap the entire Earth in a papery cocoon of DEATH

    It's big enough to make a black hole that would suck in at least a large fraction of the galaxy. Or at least I'd guess that given how long it is taking for my computer to print out the exact weight of a ā€œstandardā€ sheet of paper of those dimensions. ;)

    Heck, I think a sheet of A-86 would weigh about the same as the Earth, and that's nowhere close to that other preposterous numberā€¦


  • FoxDev

    @dkf said in Signs your code is unmaintainable:

    Heck, I think a sheet of A-86 would weigh about the same as the Earth

    hmm.... standard 16lb copy paper has a density of 250 kg/m^3

    that paper is about half a mm thick....

    a sheet of A-86 would be about 3.6 cubic meters of paper or...... about 800-900 kg

    earth has an average density of 5,515.3 kg/m^3 and a total mass of.5.972 Ɨ 10^24 kg

    a sheet of a22587608 would be aproximately 255100017581 cubic meters and weigh about 6.3775004e+13 kg or half as much as earth weighs (to withing a couple of orders of magnitude anyway... close enough for this discussion.)

    ...... that's a big sheet of paper.


  • Discourse touched me in a no-no place

    @accalia said in Signs your code is unmaintainable:

    hmm.... standard 16lb copy paper has a density of 250 kg/m^3

    I'm sorry, but I don't trust your calculations.

    I was thinking about normal photocopier paper, which is about 80g/m2; that is, a sheet of A0 would weigh 80g. It doubles for every time you step up, so A-1 is 160g, A-2 is 320g, A-4 is 1.28kg, etc. By the time you get to A-82, that doubling factor has really taken very firm hold.


  • BINNED

    @dkf said in Signs your code is unmaintainable:

    I'm sorry, but I don't trust your calculations.

    Are you claiming there is typo in there? šŸ¹


  • Discourse touched me in a no-no place

    @Luhmann said in Signs your code is unmaintainable:

    Are you claiming there is typo in there?

    In this case, I think it is a think-oā€¦


  • FoxDev

    @accalia said in Signs your code is unmaintainable:

    a sheet of A-86 would be about 3.6 cubic meters of paper

    correction.

    the surface area of A-86 would be 2^(86+1), not (86+1)^2

    this also means that A-22587608 would be enough to giftwrap an entire star system..... if you just want earth A-48 would be more than sufficient......

    (surface area of earth is 510.1 trillion m^2, A-48 would have a surface area of 562.9 trillion m^2)


  • FoxDev

    @accalia said in Signs your code is unmaintainable:

    A-22587608 is big enough to wrap the entire Earth in a papery cocoon of DEATH

    @accalia said in Signs your code is unmaintainable:

    this also means that A-22587608 would be enough to giftwrap an entire star system.

    to be fair, that does not mean my original statement was wrong..... it's just the wrapping would be a LOT deeper than i had anticipated.


  • Impossible Mission - B

    @accalia said in Signs your code is unmaintainable:

    assuming you could manipulate it sufficiently to gift wrap a planet..... probably.

    Mythbusters used a sheet of paper the size of a football field and got 11 folds to make a very uncomfortable twin size matress..... so theoretically it's possible to do it with a sheet of paper that is planet sized.

    Interesting. Did they do the later folds all by themselves, or with the aid of machinery?


  • kills Dumbledore

    @masonwheeler IIRC, they quickly moved to forklifts and heavy weights, by the end they were flattening it with a steamroller


  • FoxDev

    @masonwheeler said in Signs your code is unmaintainable:

    Did they do the later folds all by themselves, or with the aid of machinery?

    a forklift and drum compactor were involved due to the sheer bulk of the paper....

    i saw nothing in the episode to indicate that they couldn't have done it manually, it just would have taken longer, and in the case of the later folds been more dangerous.

    i rather assumed that a sheet of paper the size of a planer (or star system) would require some sort of mechanical assistance to fold due to the scale.


  • kills Dumbledore

    @accalia you'd be doing well to not have a load of huge tears from random asteroid/alien/black hole collisions.

    In fact, now that I think about it, our whole "fold a piece of paper a comparible size to the Milky Way" plan sounds kind of far fetched"


Log in to reply