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. Visual Basic needs more credit

Visual Basic needs more credit

Scheduled Pinned Locked Moved The Lounge
206 Posts 32 Posters 34 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.
  • P Pualee

    I took a job once, with no knowledge of VB (Visual Studio 6). Hey, I just wanted a well paying part time job to finish my master's degree. One of the 'best practices' of the company was to always add "On Error Resume Next" at the beginning of each and every function. I asked why, and the reply was that it just works better that way. The job paid the bills, I graduated, I got a new job, the company went under (not because I left, but I saw the writing on the wall ahead of time - they had too many people and no contracts lined up).

    C Offline
    C Offline
    Colborne_Greg
    wrote on last edited by
    #126

    On Error Resume Next Is from before the .net era and is a bad programming practice

    1 Reply Last reply
    0
    • L Lost User

      How often I have seen something like that. And then the criminal who wrote this thinks he's being treated unjustly and exclaims something like "But it always has worked!". And then try to explain to Mr. Pointy Hair that this mess only pretended to work at best, fell flat on its face and was more busy covering it up than anything else at worst, and that looking away will not solve anything or save us one single cent.

      The language is JavaScript. that of Mordor, which I will not utter here
      I hold an A-7 computer expert classification, Commodore. I'm well acquainted with Dr. Daystrom's theories and discoveries. The basic design of all our ship's computers are JavaScript.

      C Offline
      C Offline
      Colborne_Greg
      wrote on last edited by
      #127

      First off criminal? no learn English maybe Secondly if you understood English you would know that a sentence doesn't start with and.

      1 Reply Last reply
      0
      • C Colborne_Greg

        I think that Visual Basic should be shown off for its beauty and elegance. Here is a sample of what it can do - that no other language can do:

        Private Sub AlbumListPopulate()
        Try
        AlbumsList.ItemsSource = New List(Of Image)

            For Each AlbumName In Pictures.Albums
                Try
                    AlbumsList.ItemsSource.Add \_
                        (
                            New Image With
                            {
                                .Height = 150,
                                .Width = 150,
                                .Source = RotateStream \_
                                (
                                    Pictures.Album(AlbumName).Picture,
                                    Pictures.Album(AlbumName).Angle
                                )
                            }
                        )
                Catch
                End Try
            Next
        Catch
        End Try
        

        End Sub

        U Offline
        U Offline
        User 4085378
        wrote on last edited by
        #128

        Let us accept the fact that our whole logic is built around our natural language, that is the HUMAN language. Therefore, the programming language that is closer to the HUMAN language is more suitable for expressing algorithms. In other words, "IF... THEN... ELSE..." is far more clear and closer to the HUMAN language than if... {... }... Prof. E. J. Yannakoudakis

        C 1 Reply Last reply
        0
        • C Colborne_Greg

          The entire difference between C# and VB are involved in that factoring, suppressing exceptions is not an acceptable thing for my employee's to do, suppressing exceptions happens by my efficiency team; who decided that at this moment didn't need to know the error. In visual basic with block

                  With CameraControl.LastKnownTaken
                      DateTakenBlock.Text = .DateTaken
                      FileNameBlock.Text = .FileName
                      LatitudeBlock.Text = .Latitude
                      LongitudeBlock.Text = .Longitude 
                  End With 
          

          notice the period, if you cant figure out that the words with a period before them belong to the with block I wouldn't hire you

          D Offline
          D Offline
          dave dolan
          wrote on last edited by
          #129

          Let's get one thing straight, I'm the guy that does the hiring these days. I wouldn't hire you -- someone who so vehemently defends unmaintainable crap and touts it as a feature.

          C 1 Reply Last reply
          0
          • F F Xaver

            I wouldn't write such empty Try's but.... still I like it over this here ^^

                    }
                 }
              }
            

            }
            }

            and this things aint better...

                } //For
            } //If
            

            } //Try

            C Offline
            C Offline
            Colborne_Greg
            wrote on last edited by
            #130

            My entire company is based around dealing with behavior's of errors. When nothing is done for an error it was meant to be that way

            R 1 Reply Last reply
            0
            • U User 4085378

              Let us accept the fact that our whole logic is built around our natural language, that is the HUMAN language. Therefore, the programming language that is closer to the HUMAN language is more suitable for expressing algorithms. In other words, "IF... THEN... ELSE..." is far more clear and closer to the HUMAN language than if... {... }... Prof. E. J. Yannakoudakis

              C Offline
              C Offline
              Colborne_Greg
              wrote on last edited by
              #131

              Yes also in C# there are two ways of writing an if statement such as If something do this result - only allows one line of code if something { do this result} - allows multiple lies of code if a coders places two lines of code in the first example the program fails...

              1 Reply Last reply
              0
              • D dave dolan

                Let's get one thing straight, I'm the guy that does the hiring these days. I wouldn't hire you -- someone who so vehemently defends unmaintainable crap and touts it as a feature.

                C Offline
                C Offline
                Colborne_Greg
                wrote on last edited by
                #132

                I own 3 companies.

                D 1 Reply Last reply
                0
                • R Richard Deeming

                  Colborne_Greg wrote:

                  second one fails

                  No, it doesn't. https://dotnetfiddle.net/J0N7Mm[^]

                  using System;

                  public class Program
                  {
                  public static void Main()
                  {
                  int height = 100;
                  var image = new Image { height = height };
                  Console.WriteLine("The image's height is {0}.", image.height);
                  }
                  }

                  public class Image
                  {
                  public int height { get; set; }
                  }

                  Output: The image's height is 100.


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

                  C Offline
                  C Offline
                  Colborne_Greg
                  wrote on last edited by
                  #133

                  Height = height breaks readability rules Having the period in visual basic easily allows the reader of the code to know the scope of the object, which is not so obvious

                  R 1 Reply Last reply
                  0
                  • C Colborne_Greg

                    Height = height breaks readability rules Having the period in visual basic easily allows the reader of the code to know the scope of the object, which is not so obvious

                    R Offline
                    R Offline
                    Richard Deeming
                    wrote on last edited by
                    #134

                    If you're used to working in a case-sensitive language, the difference between Height and height is pretty obvious. And if you're that worried about it, you can always call your variable something else!


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

                    C 1 Reply Last reply
                    0
                    • C Colborne_Greg

                      People that don't already write code are -cheaper per hour -easier to train -get the job done faster -get the job done without added flare -almost half the cost overall as other programmers -they write in full words (no bad habits)

                      G Offline
                      G Offline
                      glennPattonWork3
                      wrote on last edited by
                      #135

                      also have no clue when something breaks... I have seen VB programmers programming like they are chucking bricks over a wall!

                      C 1 Reply Last reply
                      0
                      • C Colborne_Greg

                        I own 3 companies.

                        D Offline
                        D Offline
                        dave dolan
                        wrote on last edited by
                        #136

                        Great. Hopefully the people you're hiring for your companies are on the same page with you. Personally, I disagree, and wouldn't hire someone who agreed with you on this particular subject because it likely means they think a lot of other things that I don't agree with. Have a nice day.

                        C 1 Reply Last reply
                        0
                        • D dave dolan

                          Great. Hopefully the people you're hiring for your companies are on the same page with you. Personally, I disagree, and wouldn't hire someone who agreed with you on this particular subject because it likely means they think a lot of other things that I don't agree with. Have a nice day.

                          C Offline
                          C Offline
                          Colborne_Greg
                          wrote on last edited by
                          #137

                          I wrote Unidex, its competes with SQL, its about to be released as it was just finished. It allows for pictures, video and songs to be placed in a record - the actual data not the file name... It also can index 200 GB of memory, create 8 million records an hour, have records in the same table with different number of columns, records can have columns unique to its record. In fact Unidex does all the hard work that pretty much I need to stay away from anyone that thinks they know computers.

                          D 1 Reply Last reply
                          0
                          • G glennPattonWork3

                            also have no clue when something breaks... I have seen VB programmers programming like they are chucking bricks over a wall!

                            C Offline
                            C Offline
                            Colborne_Greg
                            wrote on last edited by
                            #138

                            Lmao indeed indeed Gladly I am using Unidex and not SQL so the guess work for my programmers is next to nothing.

                            1 Reply Last reply
                            0
                            • R Richard Deeming

                              If you're used to working in a case-sensitive language, the difference between Height and height is pretty obvious. And if you're that worried about it, you can always call your variable something else!


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

                              C Offline
                              C Offline
                              Colborne_Greg
                              wrote on last edited by
                              #139

                              I have a habit of avoiding case sensitive languages as it creates more problems, then the advantage you gave

                              R 1 Reply Last reply
                              0
                              • C Colborne_Greg

                                I wrote Unidex, its competes with SQL, its about to be released as it was just finished. It allows for pictures, video and songs to be placed in a record - the actual data not the file name... It also can index 200 GB of memory, create 8 million records an hour, have records in the same table with different number of columns, records can have columns unique to its record. In fact Unidex does all the hard work that pretty much I need to stay away from anyone that thinks they know computers.

                                D Offline
                                D Offline
                                dave dolan
                                wrote on last edited by
                                #140

                                And? I'll bet you'd be extremely disruptive at planning meetings. You can have it your way if you want. I just wouldn't have you in my company. And, you say it competes with SQL, meaning 'it attempts to go after the same market.' Which is well and good, but that doesn't mean anything, because I haven't heard of it, and probably most other people who use SQL haven't either. I wrote a database server, and query language for it too, and sold it commercially. That doesn't make me any more of an expert than someone who hasn't. Nor does it make you. It just means you know what an index is, the appropriate data structures for using it, etc. Congratulations. You're still wrong ;)

                                C 1 Reply Last reply
                                0
                                • D dave dolan

                                  And? I'll bet you'd be extremely disruptive at planning meetings. You can have it your way if you want. I just wouldn't have you in my company. And, you say it competes with SQL, meaning 'it attempts to go after the same market.' Which is well and good, but that doesn't mean anything, because I haven't heard of it, and probably most other people who use SQL haven't either. I wrote a database server, and query language for it too, and sold it commercially. That doesn't make me any more of an expert than someone who hasn't. Nor does it make you. It just means you know what an index is, the appropriate data structures for using it, etc. Congratulations. You're still wrong ;)

                                  C Offline
                                  C Offline
                                  Colborne_Greg
                                  wrote on last edited by
                                  #141

                                  Just remember that once you hear of us.

                                  D 1 Reply Last reply
                                  0
                                  • C Colborne_Greg

                                    Just remember that once you hear of us.

                                    D Offline
                                    D Offline
                                    dave dolan
                                    wrote on last edited by
                                    #142

                                    I sincerely wish you all the best. I just think you're still wrong about VB.

                                    C 1 Reply Last reply
                                    0
                                    • J Jorgen Andersson

                                      PIEBALDconsult wrote:

                                      Try writing an event that returns a value in VB

                                      How do you do that in C# that you can't do in VB?

                                      Wrong is evil and must be defeated. - Jeff Ello[^]

                                      P Offline
                                      P Offline
                                      PIEBALDconsult
                                      wrote on last edited by
                                      #143

                                      Consider these two C# statements:

                                      public delegate bool IsItSafe() ;
                                      public event IsItSafe Probe ;

                                      they compile just fine and actually work as they should, but the VB.net equivalent:

                                      Delegate Function IsItSafe() as Boolean
                                      Event Probe As IsItSafe

                                      yields:

                                      C:\Projects\Template.vb(26) : error BC31084: Events cannot be declared with a delegate type that has a return type.

                                      Event Probe As IsItSafe
                                            ~~~~~            
                                      

                                      Not that it's something that is common, but I do use a few events that return bool values in an unusual project of mine.

                                      You'll never get very far if all you do is follow instructions.

                                      J 1 Reply Last reply
                                      0
                                      • C Colborne_Greg

                                        I would not hire you sorry. The reason you can not use the with operator in such a fashion is scope

                                        T Offline
                                        T Offline
                                        thequux
                                        wrote on last edited by
                                        #144

                                        And this, in turn, is why I wouldn't hire you: you don't look past what is and see what could be. See, a simple rule that ambiguous member references within a With statement are not allowed (and are a compiler error) would sort out the scoping issues, produce something that has significantly more expressive power, and not make the language any more complicated. The fact that this is not part of the language is irrelevant: there are open-source visual basic compilers (eg, as part of the Mono project) that would be easily extended to support whatever extensions you like. This is not, of course, to say that I would advocate for such a feature to be added. It wouldn't result in any increase in code readability (rather, it would significantly decrease readability), and any given piece of code is likely going to be read far more times than it will be written.

                                        C 1 Reply Last reply
                                        0
                                        • D dave dolan

                                          I sincerely wish you all the best. I just think you're still wrong about VB.

                                          C Offline
                                          C Offline
                                          Colborne_Greg
                                          wrote on last edited by
                                          #145

                                          What that it needs more credit? There are practically no differences between the two, and opinions for and against it being a better language then others suggest that I am right.

                                          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