Try to figure out which kind of software this is



  • The good news is that I didn't have any work to make the code anonym,

    the bad news is, that this is part of a huge (, since 10 years historically grown and never refractored) Visual Basic project of several 100 000 lines of similar code and I'm the (only) person maintaining it.

     

     Private Sub Text1_Change(Index As Integer)
      sWay = 0
      If Len(Text1(8)) > 0 Then
        cmdSearch(2).Enabled = True
      Else
        cmdSearch(2).Enabled = False
      End If
      If Len(Text1(9).Text) > 0 And Len(Text1(3).Text) > 0 And Len(Text1(4).Text) > 0 And Len(Text1(0).Text) = 0 Then
        sWay = 1
        cmdSearch(3).Enabled = True
      ElseIf Len(Text1(9).Text) > 0 And Len(Text1(3).Text) > 0 And Len(Text1(4).Text) > 0 And Len(Text1(0).Text) > 0 And Text1(0).Text <> Text1(3).Text And Text1(0).Text <> Text1(4).Text Then
        sWay = 2
        cmdSearch(3).Enabled = True
      ElseIf Len(Text1(9).Text) > 0 And Len(Text1(3).Text) > 0 And Len(Text1(0).Text) > 0 And Len(Text1(4).Text) = 0 And Text1(0).Text <> Text1(3).Text Then
        sWay = 3
        cmdSearch(3).Enabled = True
      ElseIf Len(Text1(9).Text) > 0 And Len(Text1(4).Text) > 0 And Len(Text1(0).Text) > 0 And Len(Text1(3).Text) = 0 And Text1(0).Text <> Text1(4).Text Then
        sWay = 4
        cmdSearch(3).Enabled = True
      Else
        cmdSearch(3).Enabled = False
      End If
      If Len(Text1(5).Text) > 0 And Len(Text1(3).Text) > 0 And Len(Text1(4).Text) > 0 And Len(Text1(0).Text) = 0 Then
        sWay = 1
        cmdSearch(4).Enabled = True
      ElseIf Len(Text1(5).Text) > 0 And Len(Text1(3).Text) > 0 And Len(Text1(4).Text) > 0 And Len(Text1(0).Text) > 0 And Text1(0).Text <> Text1(3).Text And Text1(0).Text <> Text1(4).Text Then
        sWay = 2
        cmdSearch(4).Enabled = True
      ElseIf Len(Text1(5).Text) > 0 And Len(Text1(3).Text) > 0 And Len(Text1(0).Text) > 0 And Len(Text1(4).Text) = 0 And Text1(0).Text <> Text1(3).Text Then
        sWay = 3
        cmdSearch(4).Enabled = True
      ElseIf Len(Text1(5).Text) > 0 And Len(Text1(4).Text) > 0 And Len(Text1(0).Text) > 0 And Len(Text1(3).Text) = 0 And Text1(0).Text <> Text1(4).Text Then
        sWay = 4
        cmdSearch(4).Enabled = True
      Else
        cmdSearch(4).Enabled = False
      End If
      If Len(Text1(6)) > 0 Then
        cmdSearch(6).Enabled = True
      Else
        cmdSearch(6).Enabled = False
      End If
      If Len(Text1(7)) > 0 And Len(Text1(3).Text) > 0 And Len(Text1(4).Text) > 0 Then
        cmdSearch(7).Enabled = True
      Else
        cmdSearch(7).Enabled = False
      End If
      If Len(Text1(10)) > 0 Then
        cmdSearch(9).Enabled = True
      Else
        cmdSearch(9).Enabled = False
      End If
      If Len(Text1(11)) > 0 Then
        cmdSearch(12).Enabled = True
      Else
        cmdSearch(12).Enabled = False
      End If
      If Len(Text1(12)) > 0 Then
        cmdSearch(13).Enabled = True
      Else
        cmdSearch(13).Enabled = False
      End If
    End Sub



  • Ok, so there's a static text array of 13 elements.  Depending on which elements are empty or not, the variable sWay is 0,1,2,3, or 4 and cmdsearch is enabled or not.  It's... a website search engine with multiple fields? So, the user can search based on several different criteria, not all of which have to be used?

    Ouchie.  No documentation.  No "Option Explicit".  Unless there is a known bug, I would just assume that it works and leave it some deep dark corner of a module.

    Edit: This is one of this procedures you'll have to map out with pencil & paper if you really want to shrink it.



  • I'll go with Desktop Search. Does it Random Video, and does it recognize the RRR command? What about Random Large Scrolling Fonts?

    Wait, it has a GUI, right? With text boxes and buttons? Damnit, it was so close to being a competitor to SSDS.



  •  Its posts like these that make me think it's about high time we did some research into easy, cheap, painless suicide methods.



  • @SuperAnalyst said:

    Ok, so there's a static text array of 13 elements.
    This makes me think "Poker" though I haven't actually read the code.



  • @SuperAnalyst said:

    Ok, so there's a static text array of 13 elements. 

     

    There were 13 steps on the pyramid on the US currency, 13 leaves in the olive branch and 13 stars above the Eagle.  I know, The MASONS wrote it!!!



  • @derula said:

    I'll go with Desktop Search. Does it Random Video, and does it recognize the RRR command? What about Random Large Scrolling Fonts?

    Wait, it has a GUI, right? With text boxes and buttons? Damnit, it was so close to being a competitor to SSDS.

    But SSDS only had10,000 lines or so; this is an order of magnitude bigger.  Did they not see the simple flowcharts?



  •  Probably a search screen for an in-house database. With all the enabling/disabling it's probably medical or personal information, like address.



  • @bstorer said:

    But SSDS only had10,000 lines or so; this is an order of magnitude bigger.  Did they not see the simple flowcharts?
    Yeah, and subroutines are for suckers.



  • @amischiefr said:

    @SuperAnalyst said:

    Ok, so there's a static text array of 13 elements. 

     

    There were 13 steps on the pyramid on the US currency, 13 leaves in the olive branch and 13 stars above the Eagle.  I know, The MASONS wrote it!!!

     

    There are also 13 olives on that olive branch, 13 arrows in the eagle's other claw, and 13 vertical stripes and 13 horizontal stripes on the shield below the stars. The slogan "E PLURIBUS UNUM" has 13 letters, as does "ANNUIT COEPTIS" if the O and E are written separately. 

    The things you learn when you're waiting for servers to restart...



  • @DOA said:

    Its posts like these that make me think it's about high time we did some research into easy, cheap, painless suicide methods.

    12-gauge to the head.   Cheap, fast, painless and easy.



  • In keeping with the theme of the thread, it should really be a 13-gauge.



  • @morbiuswilters said:

    @DOA said:

    Its posts like these that make me think it's about high time we did some research into easy, cheap, painless suicide methods.

    12-gauge to the head.   Cheap, fast, painless and easy.

     

     Does it really matter if it's cheap or not? Are people worried about how they'll pay the credit card bill after they're done?



  • @PeriSoft said:

    @morbiuswilters said:

    @DOA said:

    Its posts like these that make me think it's about high time we did some research into easy, cheap, painless suicide methods.

    12-gauge to the head.   Cheap, fast, painless and easy.

     

     Does it really matter if it's cheap or not? Are people worried about how they'll pay the credit card bill after they're done?

    It matters to us, the survivors.  Why waste resources that could be consumed by people who aren't losers?



  • @morbiuswilters said:

    @DOA said:
    Its posts like these that make me think it's about high time we did some research into easy, cheap, painless suicide methods.
    12-gauge to the head.   Cheap, fast, painless and easy.

    Depends on where you live. For us krautfags you would either have to be friend with a gun nut and convince him to lend you one (or rob a gun club or similar) (not easy or fast), or get a 12-gauge model and hit yourself to death with it (not painless, easy or fast), or fly to the US & live there long enough for them to be sure you're not a terrorist and then follow your plan (not cheap, painless, easy or fast).



  • Wow, control arrays? How long has it been since I've seen those... Times like this you wish everyone understood that computers are really good at keeping track of lots of things, and they don't really give a shit what the identifier is, so long as it's unique, eh?

    Whenever I have to trace out one of these interfaces, the first thing I try to do is see if it's reasonable to rename the defaultly named elements, such as Text1, unless there's a particularly valid reason for naming it like that... Which I doubt.



  •  8 search buttons that we're sure of, possibly 13 or more. Whatever it is, I'd guess it's as hard to use as it is to maintain.



  • @morbiuswilters said:

    It matters to us, the survivors.  Why waste resources that could be consumed by people who aren't losers?
     

     

    Cheap is good, but we don't need to go overboard with it. Any loser who delays suicide would likely waste more resources then we would save by optimizing for cheap, but it also needs to be cheap enough that the homeless or poverty stricken can afford it. This could be an area where I actually wouldn't object  a government subsidy.

     Painless is good, or at least the appearance of being painless. I don't want people delaying the decision because they are afraid of the pain.

    Easy and fast are very important, I would think. Most of the people in need of this aren't good with complicated things, and we don't want to give them a chance to change their mind.



  • @cdosrun said:

    @morbiuswilters said:

    It matters to us, the survivors.  Why waste resources that could be consumed by people who aren't losers?
     

    Cheap is good, but we don't need to go overboard with it. Any loser who delays suicide would likely waste more resources then we would save by optimizing for cheap, but it also needs to be cheap enough that the homeless or poverty stricken can afford it. This could be an area where I actually wouldn't object  a government subsidy.

    This is good thinking.  Perhaps we could advance them part of the money we'll get for selling their body to science, or to that Soylent Green factory (why do they want all these human corpses, anyway?).



  • @bstorer said:

    Perhaps we could advance them part of the money we'll get for selling their body to science, or to that Soylent Green factory (why do they want all these human corpses, anyway?).

    I figure it's for some kind of safety testing, like how the auto industry uses corpses in crash tests.  Who cares, though, so long as they keep making deliciousness?



  • @derula said:

    snip ... or fly to the US & live there long enough for them to be sure you're not a terrorist and then follow your plan (not cheap, painless, easy or fast).
     

     Anyone over eighteen can walk into a properly licensed store in my part of the country and walk out with a shotgun.  There is no checking beyond whether or not your ID of whatever type says you are legally an adult.

     



  • @aesis said:

    @derula said:

    snip ... or fly to the US & live there long enough for them to be sure you're not a terrorist and then follow your plan (not cheap, painless, easy or fast).
     

     Anyone over eighteen can walk into a properly licensed store in my part of the country and walk out with a shotgun.  There is no checking beyond whether or not your ID of whatever type says you are legally an adult.

    Doubtful.  Are you sure you know what you are talking about?  Which state do you live in?



  • @morbiuswilters said:

    @aesis said:
    @derula said:
    snip ... or fly to the US & live there long enough for them to be sure you're not a terrorist and then follow your plan (not cheap, painless, easy or fast).
    Anyone over eighteen can walk into a properly licensed store in my part of the country and walk out with a shotgun.  There is no checking beyond whether or not your ID of whatever type says you are legally an adult.
    Doubtful.  Are you sure you know what you are talking about?  Which state do you live in?
    Oh, it's gun-discussion time again? Seems like it came late this year. How are you going to fit the Dutch into the discussion this time around?


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.