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. Other Discussions
  3. The Weird and The Wonderful
  4. Another from my boss!

Another from my boss!

Scheduled Pinned Locked Moved The Weird and The Wonderful
databasehelpquestioncareer
31 Posts 15 Posters 85 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.
  • B Burnsys2

    Don't worry, we are only 2 in the development sector, me and my boss, and obviously he doesn't read The Code Project.com! ;) Anyway, i am really tied of working with someone like this, i see no future here, and i am actually looking for another job.

    S Offline
    S Offline
    SimonRigby
    wrote on last edited by
    #20

    Oh yeah, I'd hire you in a flash. Especially as you have total respect for your line manager and are completely discreet when it comes to the publishing of in house code :)

    The only thing unpredictable about me is just how predictable I'm going to be.

    R 1 Reply Last reply
    0
    • B Burnsys2

      It's ok, the server doesn't exist anymore and the password is encrypted.

      S Offline
      S Offline
      Steve Hansen
      wrote on last edited by
      #21

      But you also posted the password decryption :P

      B 1 Reply Last reply
      0
      • B Burnsys2

        Can you believe this? This function is supposed to be called on the Set Focus event of textboxes in vb6

        Private Sub txtIN_GotFocus(Index As Integer)
        setTxtWnd txtIN(Index)
        End Sub

        Public Sub setTxtWnd(oTxt As TextBox, Optional ByVal tbNoIndex As Boolean = False)
        On Error Resume Next

        With oTxt
            If .Parent.ActiveControl.Name = oTxt.Name Then
                If Not tbNoIndex Then
                    If .Parent.ActiveControl.Index = oTxt.Index Then
        

        M_FOC:
        .BorderStyle = 1
        .Appearance = 1
        .SelStart = 0
        .SelLength = Len(.Text)
        Else
        GoTo M_NO_FOC
        End If
        Else
        GoTo M_FOC
        End If
        Else
        M_NO_FOC:
        .BorderStyle = 0
        .Appearance = 0
        End If
        End With
        End Sub

        B Offline
        B Offline
        Burnsys2
        wrote on last edited by
        #22

        Another one from my boss! lol. This is actually from a final production software developed by my boss a couple years ago, now we are going to .net and he told me to "Do the same that this module". so here is part of the code:

         tmpAdd = tmpAdd + Format(tmp5, "###,##0") + Chr(9)
                            tmpAdd = tmpAdd + Format(tmp6, "###,##0") + Chr(9)
                            tmpAdd = tmpAdd + Format(tmp3 + tmp5, "###,##0") + Chr(9)
                            tmpAdd = tmpAdd + Format(tmp4 + tmp6, "###,##0") + Chr(9)
                            mTotalesMSF(6) = mTotalesMSF(6) + tmp6 + tmp4
                            If tmp1 = 0 Then
                                tmpCero = 100
                            Else
                                If tmp3 + tmp5 = 0 Then
                                    tmpCero = 0
                                Else
                                    tmpCero = ((tmp3 + tmp5) / tmp1) \* 100
                                End If
                            End If
                            tmpAdd = tmpAdd + Format(tmp3 + tmp5 - tmp1, "#,##0") + Chr(9)
                            tmpAdd = tmpAdd + Format(tmpCero, "#,##0") + "%" + Chr(9)
                            If tmp2 = 0 Then
                                tmpCero = 100
                            Else
                                If tmp4 + tmp6 = 0 Then
                                    tmpCero = 0
                                Else
                                    tmpCero = ((tmp4 + tmp6) / tmp2) \* 100
                                End If
                            End If
                            tmpAdd = tmpAdd + Format(tmp4 + tmp6 - tmp2, "#,##0") + Chr(9)
                            tmpAdd = tmpAdd + Format(tmpCero, "#,##0") + "%"
                            mTotalesMSF(7) = mTotalesMSF(7) + tmp4 + tmp6 - tmp2
                            If tmp1 + tmp2 + tmp3 + tmp4 + tmp5 + tmp6 <> 0 Then msfConsulta.AddItem tmpAdd
                            rstmp.MoveNext
        

        At last, tmp4,6,7,2,3 etc are variables with things like, total sales, proyected sales, pending orders, etc..

        L 1 Reply Last reply
        0
        • S Steve Hansen

          But you also posted the password decryption :P

          B Offline
          B Offline
          Burnsys2
          wrote on last edited by
          #23

          Yheaaa! but without this public keys:

          Public Const OLZ_A1 = "70535728307717681704418679379687594365276559462962642627828258989122699824531099671571010792842938309497402716166441417132632018588459026783728916362429566991832549143675051463540265249763936481547256254159365503910784575598312171033120536554828196745351470925387540464920329581692944278775276725833279292348253444820865875923354863419611926234144721991323454925340848267729933494169174254815442502261486888373029155222583687471968746178168020956679374611111747153562146747539907486371143402798806941732735439412643410187439554499721373928501351965590654469675704915223278454"
          Public Const OLZ_A2 = "55175803297806790874112957969401161650401027648449188937327721442387613738865893513386252517340748427704081744374133713179155995249311986359905724867437524373952275820789116590239484444976833819324115619206950189947042287589821710115371897875872142528278793345558056202036573452425755420969399834080982517691336911102939553129803037408440726540956451225874459028668928361299876586026507985954417456949409498595361818281154254557844053160515932907757437316524759534687937948206090946516696095729588045563141517345327405776586580417972697319776249581211823922525716677753082715"
          Public Const OLZ_A3 = "89223555352057621366383644218499776384854673648934114277354174437150172789728613085317917307494559331133276629682556019903160597671687625545056284135975158463371365151937961704342337021488445737582204686824146342480545362871255279632643636322121426124685860741524395828838952380251664983124871256606169859398226673983438321738921989687526545156461853655053745299616561532713198293632352359702657579993248176406249491396175868106573784384957541111431996027414764543942717503451392566436548842593851014147626134698451809852662322768403820871540605472123207892292295184136329757"
          Public Const OLZ_B1 = "60545593767543895898172206054275950883625992115732559825649939410484512563342894248886929784995987574957219596708917849957123775314879389356308866927419126847697623198676890164936677446644570906768322723911403645180201081331749495589335645536899055855295365714779693640616826408081104038499824703048226319796109176508677156525282187762155396665797783143936975482496747181378314521997946151588462527256126285469834679025240635399316735973110136281056356420953820805372229574367335521136018411765442289596222580635314296553796227971992274273815921509342267835663156433943722699"
          Public Const OLZ_B2 = "972376468969215130180108181641245474694048843949935626154388761578853918756392191447597

          1 Reply Last reply
          0
          • S SimonRigby

            Oh yeah, I'd hire you in a flash. Especially as you have total respect for your line manager and are completely discreet when it comes to the publishing of in house code :)

            The only thing unpredictable about me is just how predictable I'm going to be.

            R Offline
            R Offline
            Russell Jones
            wrote on last edited by
            #24

            please tell me that the code that has been published doesn't contain an sa password aswell?

            B 1 Reply Last reply
            0
            • R Russell Jones

              please tell me that the code that has been published doesn't contain an sa password aswell?

              B Offline
              B Offline
              Burnsys2
              wrote on last edited by
              #25

              The database server doesn't exists anymore, and the sa psw is encripted in the code!

              1 Reply Last reply
              0
              • B Burnsys2

                Another one from my boss! lol. This is actually from a final production software developed by my boss a couple years ago, now we are going to .net and he told me to "Do the same that this module". so here is part of the code:

                 tmpAdd = tmpAdd + Format(tmp5, "###,##0") + Chr(9)
                                    tmpAdd = tmpAdd + Format(tmp6, "###,##0") + Chr(9)
                                    tmpAdd = tmpAdd + Format(tmp3 + tmp5, "###,##0") + Chr(9)
                                    tmpAdd = tmpAdd + Format(tmp4 + tmp6, "###,##0") + Chr(9)
                                    mTotalesMSF(6) = mTotalesMSF(6) + tmp6 + tmp4
                                    If tmp1 = 0 Then
                                        tmpCero = 100
                                    Else
                                        If tmp3 + tmp5 = 0 Then
                                            tmpCero = 0
                                        Else
                                            tmpCero = ((tmp3 + tmp5) / tmp1) \* 100
                                        End If
                                    End If
                                    tmpAdd = tmpAdd + Format(tmp3 + tmp5 - tmp1, "#,##0") + Chr(9)
                                    tmpAdd = tmpAdd + Format(tmpCero, "#,##0") + "%" + Chr(9)
                                    If tmp2 = 0 Then
                                        tmpCero = 100
                                    Else
                                        If tmp4 + tmp6 = 0 Then
                                            tmpCero = 0
                                        Else
                                            tmpCero = ((tmp4 + tmp6) / tmp2) \* 100
                                        End If
                                    End If
                                    tmpAdd = tmpAdd + Format(tmp4 + tmp6 - tmp2, "#,##0") + Chr(9)
                                    tmpAdd = tmpAdd + Format(tmpCero, "#,##0") + "%"
                                    mTotalesMSF(7) = mTotalesMSF(7) + tmp4 + tmp6 - tmp2
                                    If tmp1 + tmp2 + tmp3 + tmp4 + tmp5 + tmp6 <> 0 Then msfConsulta.AddItem tmpAdd
                                    rstmp.MoveNext
                

                At last, tmp4,6,7,2,3 etc are variables with things like, total sales, proyected sales, pending orders, etc..

                L Offline
                L Offline
                lepipele
                wrote on last edited by
                #26

                It was obvious that your boss is a moron when it comes to coding after the first post. What is the point of later posts? To humiliate the man? I've met my deal of people who take pride in bashing others, and honestly I'm sick of them. I dislike people who write lousy code, but I dislike idiots who heal their own frustrations by laughing at others even more. Are you fed up with idiotic algorithms of your boss? Sit down with him and talk about your views on coding. He doesn't want that? Fine, ignore him, or quit the job. (rant on doing stupid things... could offended someone, so I deleted it) That said, I truly hope that one day you'll be the boss and have not one, but several employees like you.

                M H 2 Replies Last reply
                0
                • P Pete OHanlon

                  Burnsys2 wrote:

                  Don't worry, we are only 2 in the development sector, me and my boss, and obviously he doesn't read The Code Project.com!

                  You'd better hope that this continues. This site is rather famous you know, and google does tend to return results from here. I assume he does use google.

                  Deja View - the feeling that you've seen this post before.

                  M Offline
                  M Offline
                  Michael Sync
                  wrote on last edited by
                  #27

                  Pete O`Hanlon wrote:

                  and google does tend to return results from here. I assume he does use google.

                  I don't think that codeproject forum is google-friendly.. I do a lot of googling everyday but I never saw any post of the codeproject *forum* in google result.. I did suggest about that once and I think cp guys are working on that thing now.

                  Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

                  P 1 Reply Last reply
                  0
                  • L lepipele

                    It was obvious that your boss is a moron when it comes to coding after the first post. What is the point of later posts? To humiliate the man? I've met my deal of people who take pride in bashing others, and honestly I'm sick of them. I dislike people who write lousy code, but I dislike idiots who heal their own frustrations by laughing at others even more. Are you fed up with idiotic algorithms of your boss? Sit down with him and talk about your views on coding. He doesn't want that? Fine, ignore him, or quit the job. (rant on doing stupid things... could offended someone, so I deleted it) That said, I truly hope that one day you'll be the boss and have not one, but several employees like you.

                    M Offline
                    M Offline
                    Michael Sync
                    wrote on last edited by
                    #28

                    nice answer.. U got my 5..

                    Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

                    1 Reply Last reply
                    0
                    • M Michael Sync

                      Pete O`Hanlon wrote:

                      and google does tend to return results from here. I assume he does use google.

                      I don't think that codeproject forum is google-friendly.. I do a lot of googling everyday but I never saw any post of the codeproject *forum* in google result.. I did suggest about that once and I think cp guys are working on that thing now.

                      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

                      P Offline
                      P Offline
                      Pete OHanlon
                      wrote on last edited by
                      #29

                      Michael Sync wrote:

                      I do a lot of googling everyday but I never saw any post of the codeproject *forum* in google result

                      Not so much the forums as the site itself - and from there, just a quick click to the forums, and then a quick boot out of the door for the OP.

                      Deja View - the feeling that you've seen this post before.

                      1 Reply Last reply
                      0
                      • B Burnsys2

                        no way, this proyect is a gold mine!!! take a look at this, he was afraid of .SetFocus

                          sql = "SELECT COD\_GCIA FROM GerenciasWEB WHERE COD\_GCIA = '" & .COD\_GCIA & "'"
                            Set rstmp = New ADODB.Recordset
                            rstmp.Open sql, db, adOpenForwardOnly, adLockReadOnly
                            If rstmp.EOF Or rstmp.BOF Then
                                MsgBox "Código de Gerencia: " & .COD\_GCIA & " no es valido", vbCritical, "Elija Otro"
                        

                        On Error Resume Next
                        txtIN(6).SetFocus
                        Exit Sub
                        Else
                        .COD_GCIA = Trim(rstmp.Fields("COD_GCIA"))
                        End If

                            If tmpCntPermisos = 0 Then
                                If MsgBox("Usuario no tiene permisos", vbQuestion + vbYesNo, "¿Desea grabar?") = vbNo Then
                        

                        On Error Resume Next
                        lvPermisos.SetFocus
                        Exit Sub
                        End If
                        End If

                            If .TIPO\_USUARIO <> "PROV" And .COD\_GCIA = "" Then
                                If MsgBox("Usuario no tiene Gerencia", vbQuestion + vbYesNo, "¿Desea grabar?") = vbNo Then
                        

                        On Error Resume Next
                        txtIN(6).SetFocus
                        Exit Sub
                        End If
                        End If
                        'Correo
                        If .EMAIL <> "" Then
                        If Not checkIngresoEMAIL(.EMAIL) Then
                        MsgBox "E-Mail: " & .EMAIL & " no es valido", vbCritical, "Elija Otro"
                        On Error Resume Next
                        txtIN(5).SetFocus
                        Exit Sub
                        End If
                        End If
                        If .COD_RCB_EMAIL = "0" Or .COD_RCB_EMAIL = "" Then

                            Else
                                If .EMAIL = "" Then
                                    MsgBox "Debe ingresar E-Mail o cambiar Tipo E-Mail", vbCritical, "Ingrese datos"
                        

                        On Error Resume Next
                        txtIN(5).SetFocus
                        Exit Sub
                        End If
                        End If

                        H Offline
                        H Offline
                        hogan
                        wrote on last edited by
                        #30

                        sql = "SELECT COD_GCIA FROM GerenciasWEB WHERE COD_GCIA = '" & .COD_GCIA & "'" SQL injection anyone?

                        1 Reply Last reply
                        0
                        • L lepipele

                          It was obvious that your boss is a moron when it comes to coding after the first post. What is the point of later posts? To humiliate the man? I've met my deal of people who take pride in bashing others, and honestly I'm sick of them. I dislike people who write lousy code, but I dislike idiots who heal their own frustrations by laughing at others even more. Are you fed up with idiotic algorithms of your boss? Sit down with him and talk about your views on coding. He doesn't want that? Fine, ignore him, or quit the job. (rant on doing stupid things... could offended someone, so I deleted it) That said, I truly hope that one day you'll be the boss and have not one, but several employees like you.

                          H Offline
                          H Offline
                          hogan
                          wrote on last edited by
                          #31

                          Wait a second! This is a form to post "Coding Horrors". Just because he keeps looking to the same person (and that person is unbelievably bad) does not make him a person who takes pride in "bashing" others. Posting bad code is the point of this forum. Myself, I've enjoyed looking at these code examples for exactly the reason I am browsing this board -- to shake my head in disbelief.

                          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