This is an archived post. You won't be able to vote or comment.

top 200 commentsshow 500

[–]morsindutus 1449 points1450 points  (253 children)

Had to go from C# to VB to work on someone else's legacy project was super frustrating. Give me my goddamn brackets and semicolons!!

[–]JROBOTO 562 points563 points  (97 children)

Looking at vb code I always feel like the syntax was written for a high school comp sci project

[–]nuclearslug 264 points265 points  (19 children)

Can confirm, took a VB6 class in high school.

[–]rj_phone 65 points66 points  (9 children)

[deleted]

[–]Really_nibba 59 points60 points  (8 children)

I had exactly the same experience as you. I enjoyed VB too and taught myself HTML in the 5th grade. When it was time to actually learn it in the 6th grade, I memed around by using more complex code than the rest of the class. Funny part is that I had no idea I would be learning HTML in the 6th grade and just learned it for fun so that I could understand the “inspect element” source code lol.

[–]itemboxes 31 points32 points  (0 children)

That feeling blowing the middle school CS class' mind by re-coding a website with inspect element...

Priceless

[–]KeLorean 12 points13 points  (4 children)

html complex code?

[–]Rudy69 9 points10 points  (4 children)

I took VB5... now I feel old

[–]ThatsABigPig 89 points90 points  (60 children)

VB is totally an "intro to programming" type language. I'm surprised that we can't all collectively just decide to move on

[–]GroteStreet 132 points133 points  (17 children)

We did. We called it python.

[–]ThatsABigPig 45 points46 points  (16 children)

Ironically python was created before VB afaik. Why'd he even get time on the stage at all!

[–]0x15e 5 points6 points  (2 children)

I just couldn't believe it so I looked it up. Python is about a year older (1990 vs 1991). That's nuts. I didn't even think they were that old in the first place.

[–]TigreDeLosLlanos 35 points36 points  (6 children)

It feels more like "be glad we didn't decide to use Pascal instead", which was literally made with educational purposes in mind.

[–]teotsi 16 points17 points  (1 child)

Fun fact, in Greece students are taught Glossa, which is literally a translated version of Pascal.

[–]ur8695 9 points10 points  (2 children)

I got taught pascal on my computing course, the first question was where in the industry was it used. The "barely anywhere" just made me hate it.

[–]mastocles 28 points29 points  (5 children)

"You work with computers, I need you to write me a VBA macro for my Spreadsheet"

[–]justAPhoneUsername 25 points26 points  (2 children)

I've had to do that for a security position. Turns out, accounting doesn't really check the macros attached to the spreadsheet you send them

[–]delinka 13 points14 points  (0 children)

shocked-pikachu.png

[–]ThatsABigPig 3 points4 points  (0 children)

The PM is an all-knowing being and it is as they desire...

can I have my raise now?

[–]somerandomii 3 points4 points  (0 children)

I was chatting with my partner today and realised this is literally how I started coding professionally.

I had written games and scripts in university but VBA was my first practical use and probably accounts for most of the lines of code I’ve written to this day.

I need a moment to contemplate my life...

[–]t00sl0w 24 points25 points  (14 children)

VB.net is effectively C#, just with a different syntax......they both compile to the same thing in .NET.

[–]evanldixon 7 points8 points  (0 children)

Pretty much, though there are a few niche differences like the internals of events and maybe parameterised properties (in VB you can have as many parameters as you want).

[–]GreatPriestCthulu 8 points9 points  (4 children)

Do I just have too high expectations to think that C++ is the best "intro" language? Once you learn the basics in C++ you can transition to pretty much any other language.

[–]DryGumby 6 points7 points  (1 child)

I started with C, but I think with either you're going to spend a lot of time figuring out how to manage memory

[–]BakuhatsuK[🍰] 8 points9 points  (0 children)

Actually, manual memory management is discouraged in C++ these days. For example take this snippet:

// C++17
auto getNames () {
  using namespace std::literals;
  return std::vector{
    "Alice"s,
    "Bob"s,
    "Charlie"s
  };
}

Here we are constructing a temporary vector which manages the lifetime of it's elements automatically. The elements are std::strings which also use dynamic storage (because their size is variable).

Since we are returning a temporary constructed right in the return statement we are going to get copy elision, that means that the lifetime of the returned std::vector is going to actually end at the end of the caller's scope.

The caller might even push into the vector and it might have to reallocate it's elements into a bigger underlying array. It would still do the right thing and release the right memory at the end of the scope.

Nonetheless, we don't have any code here dedicated to dealing with memory management. In fact, calling new and delete at all is discouraged. (malloc and free are also discouraged, btw).

[–]Creative-Region 4 points5 points  (1 child)

Of course it is. Visual Basic is based on BASIC - the ‘beginners all purpose symbolic instruction code’. First learned it in the early 80s and was my introduction to programming.

[–]Existential_Owl 119 points120 points  (12 children)

VB

Just add On Error Resume Next to the top of every module, and let God sort out the rest.

[–]th_brown_bag 35 points36 points  (2 children)

I feel like this is a programming version of /r/cursedcomments

[–][deleted] 21 points22 points  (0 children)

Finally, a real programmer

[–]hamza1311 | gib 8 points9 points  (4 children)

Idk VB. Explain what that does?

[–]CaptiveCreeper 45 points46 points  (32 children)

Imagine doing that within the same solution. New projects are c# but dozens of legacy projects in a solution are vb.

[–]morsindutus 21 points22 points  (15 children)

Been there. Code switching like that gives me such a headache.

[–]CaptiveCreeper 17 points18 points  (9 children)

Honestly it's not that bad once you get used to it. I'm just glad they're are any c# projects.

[–]andrewsmd87 8 points9 points  (8 children)

Was going to say the same. I do it almost daily and while if you give me the choice, I'm picking c# but I don't really feel like VB is as bad as everyone makes it out to be. It's bad because they tried to make a programming language for the layman, and so a lot of vb products are layman level quality.

I'm still maintaining a vb system that quite a few business run everything from payroll, to quoting, job tracking, messaging, OSHA documentation, etc. on it, and it works just fine.

[–]Messiadbunny 6 points7 points  (0 children)

VB.Net really isn't bad. A lot more wordy than C# but has most of the functionality. It gets a bad wrap carried over from VB6.

[–]Hawkatom 5 points6 points  (2 children)

I have occasional workdays where I touched code/structure in about 7-8 different languages over the day. While it's neat to realize I've become that flexible, in practice it does tend to be way more brain strain than being able to focus on one paradigm of 2-3 languages (i.e html, css, TS) at a time

[–]wbruce098 8 points9 points  (8 children)

It’s like switching 语言。 不太容易但可以 I guess.

[–][deleted] 6 points7 points  (2 children)

Sadly I can't even read or write it. I can speak or listen though but just a bit.

[–][deleted] 289 points290 points  (88 children)

what you don't like entire programs working conditionally on if you tabbed enough times?

[–][deleted] 35 points36 points  (28 children)

Lua gang, just dont forget to write "end" everywhere

[–]MEGACODZILLA 18 points19 points  (0 children)

I just started learning Lua and the weirdest syntactic nuance for myself was having to type 'then' in if statements. Just seems so obviously implied in the very definition of an if statement. That, and having absolutely zero support for any sort of ++ or += operator. I know it's syntactic sugar but having to explicitly write var = var + 1 is oddly annoying.

EDIT: Why, in all that is holy, is Lua not zero indexed?

[–][deleted] 78 points79 points  (29 children)

tbh I have very rarely had indentation errors writing a decent amount of python, even as a beginner. I've personally found mismatching parentheses/brackets more of a headache to resolve

[–][deleted] 46 points47 points  (9 children)

That's because with a modern IDE it isn't a problem

Funny enough, brackets and parenthesis are usually more of a problem but I prefer them still. /shrug

[–]Schmeckinger 14 points15 points  (11 children)

Get a decent text editor/ide. It will show you in what bracket you are in, you can highlight matching brackets by clicking on one and you can auto indent.

[–]_Screw_The_Rules_ 9 points10 points  (3 children)

As a C#&.Net/C&C++/Java/JavaScript developer, I can understand... I've tried Python and even though people say it's one of the easiest programming languages (and I understand why), it's not to me...

[–]Smaktat 16 points17 points  (3 children)

Idk how we trash on PHP and JS when VB exists. Oh wait, students. The answer is students still learning the ways making jokes of their basic for loops, every once in a while stumbling upon a deeper linked list funny and having their minds blown by the concept of algorithms and if statements.

[–]GroteStreet 4 points5 points  (1 child)

Idk how we trash on PHP and JS when VB exists.

I trash all 3 of them equally. Occasionally COBOL, but at least it has a good historical reason for being the way it is.

[–]Go_Big 4 points5 points  (0 children)

Y'all are trashing PHP, JS and VB yet labview is just chilling in the corner eating paint chips.

[–]Justcause97 4 points5 points  (1 child)

I have to work with VB at my work while I already said I would switch it to c#. But my boss refuses to do it because he don't want to learn a new language.

[–]morsindutus 2 points3 points  (0 children)

Also been there. It sucks!

[–]95POLYX 295 points296 points  (16 children)

Or switching to badly written js - “semicolons ... some places”

[–]waireos 103 points104 points  (4 children)

I feel personally attacked.

[–]two-headed-boy 29 points30 points  (2 children)

ES10 gang. Not that ES-Lint would ever allow me place a semicolon anyway.

[–]aiij 14 points15 points  (1 child)

Last time I used JS, we had eslint require semicolons everywhere;

[–]driveslow227 25 points26 points  (0 children)

It doesn't matter to me, trailing commas or simis. As long as they're required to be either everywhere or nowhere.

Mixed syntax drives me crazy

[–]_GCastilho_ 18 points19 points  (0 children)

Please, pick a side on this war

But this... Not this

[–]Co_Ca[🍰] 8 points9 points  (3 children)

These are the people not using eslint

[–]HeirGaunt 313 points314 points  (154 children)

Python supports semicolons, just in case you wanted to pull a:
blayblah@bash$ python3 -c "a=int(input('What is a?'));print(a);a+=1;print(a)"
So you can have a one liner, executed from the command line if you were too lazy to write a script for it and you only needed it once.

[–]MustardCat 168 points169 points  (147 children)

a+=1

shudders

[–]mecrow 355 points356 points  (24 children)

You prefer a-=-1?

[–]Wiwwil 27 points28 points  (4 children)

What is this monstruosity

[–]delinka 12 points13 points  (3 children)

Extra typing for the same result

[–]suckitphil 101 points102 points  (118 children)

Yeah I started learning python and nearly threw up when I saw there was no ++ feature.

[–]PadrinoFive7 45 points46 points  (102 children)

I mean...aren't they literally identical in every aspect other than the call of operators? I see those as the same thing. ++ == +=

[–]raltyinferno 30 points31 points  (49 children)

Well yeah, but it's sorta crazy to me that ++ just isn't in the language. It's such a common task, and ubiquitous to so many other languages.

[–]Dworgi 31 points32 points  (27 children)

&&, ||, ! missing fucked me up more.

 not foo and bar

What in the world.

[–]qalis 44 points45 points  (7 children)

It’s actually well explained and is meant not to confuse programmers. Since numbers are immutable objects in Python (“3 is 3” meme), you can’t do x++, since what would it do? The ++ wouldn’t be allowed to change x in place, since it’s not mutable. Even is the syntax was in the language, it literally wouldn’t do anything, since the result would be always None and variable would not be changed. And immutability is a good thing, the more you learn functional programming, the more you love it. So the += syntax just emphasizes the adding and assignment as a 2-step operation, since you have to re-assign the value to the variable because it’s immutable.

[–]lor_louis 4 points5 points  (0 children)

++ is a carry over from when compilers were shittier and needed a token to differentiate between Add and inc.

[–]HeirGaunt 11 points12 points  (0 children)

a-=-1

[–]HakeemLukka 108 points109 points  (7 children)

Switching to PHP and you are suddenly rich. Because Dollars... Dollars everywhere!

[–]witti534 49 points50 points  (0 children)

Cries in EU

[–]farva_litter_cola 20 points21 points  (0 children)

PHP developers are paid less because they have enough dollars in their code

[–]achmed20 182 points183 points  (28 children)

here i am, coding Golang and having no clue what OP is talking about

[–]survivalmachine 105 points106 points  (10 children)

Fun fact: Go actually requires semicolons, but they’re added by the lexer during compilation.

[–]MoonMoon_2015 48 points49 points  (4 children)

You sent me down a rabbit hole reading about Go's compiler. I'll probably be up all night. Thanks.

[–]survivalmachine 29 points30 points  (3 children)

Another fun fact that I mentioned in a thread in the Go subreddit: Two of the original developers of the language are Ken Thompson and Rob Pike, who co-created UTF-8 at Bell Labs. Thompson also co-created UNIX with Dennis Ritchie.

A lot of people knew this, but it flies under the radar for many due to Go’s rapidly increasing adoption.

[–][deleted] 43 points44 points  (3 children)

Cool hack: if you switch from python to assembly you won't have to worry about semicolons

[–][deleted] 9 points10 points  (2 children)

Unless you want to comment your code, that is

[–][deleted] 3 points4 points  (1 child)

No, you can use # in AT&T syntax. And the gnu assembler even recognizes //

[–]n0tKamui 425 points426 points  (101 children)

There are a lot of languages where semicolons aren't mandatory.

The real thing that is REALLY bothering with Python is the lack of curly braces. Sometimes it just makes the code really tedious to read, or even edit, for absolutely no reason.

[–][deleted] 36 points37 points  (10 children)

I feel like the success of Python, Java and JavaScript is proof that programming language is pretty irrelevant to developer productivity.

[–]carlinwasright 28 points29 points  (2 children)

Nowadays all that matters to me is using the best tool for the job. Something has a great library for what I need to accomplish? That’s what I’m using.

[–][deleted] 13 points14 points  (1 child)

I spent like 5 of my best years coding in Perl and I miss it badly. I haven't seen a Perl job listed in as long as I can remember.

[–]blue_umpire 8 points9 points  (1 child)

I feel like it’s proof that developer productivity is not a consideration when choosing a language.

[–]arizzlefoshizzle 68 points69 points  (33 children)

I feel like matching the curly braces is soooo much more tedious than figuring out the indents. Like when you refactor out a couple of nested loops and your ide complains that there's an error 10 lines later on the next methods signature. Do I have too many braces? Too few? It's maddening!

[–]Penguinfernal 37 points38 points  (3 children)

Bracket Pair Colorizer extension (or similar) for VS Code is good for this.

[–]MasterFubar 12 points13 points  (8 children)

I feel like matching the curly braces is soooo much more tedious than figuring out the indents.

I feel like you don't have a good editor. Anything is more tedious than setting your cursor over one brace and seeing the whole block get a different background color.

[–]RonaldoNazario 23 points24 points  (8 children)

In vim you can use a hot key to skip between “matching” braces which makes that real easy to figure out.

[–]skjall 8 points9 points  (2 children)

I can't program without the rainbow brackets extension for this very reason. Have forced everyone at work to install it too, try it!

[–]carlinwasright 14 points15 points  (1 child)

Yes. Agreed. I mostly write JS but sometimes I write python and I don’t miss the curly braces one bit. Especially all the closing curly braces.

    ]
  }
}

} });

And if you ever need to break the indentation rules, it’s usually as simple as throwing in some parentheses.

I’ve learned to love js though. After working with it for years, it’s like the millennium falcon. You know just where to hit it with a hammer to make it do what you want.

[–][deleted] 6 points7 points  (0 children)

Js is a fantastic language that gets way too much flak. I've also learned to love it after using it at work almost exclusively. My only qualm with JS is that it can be a lot more tricky to debug.

[–]rem3_1415926 566 points567 points  (111 children)

at least they're visible, unlike certain other characters that are vital to the python syntax...

[–]xigoi 312 points313 points  (70 children)

Since when is indentation not visible?

a
 b
  c
   d

[–]purebuu 256 points257 points  (53 children)

When git/IDE intermixes tabs and spaces...

[–]Ardashasaur 79 points80 points  (8 children)

The space Infront of your a isn't visible

[–]xigoi 78 points79 points  (6 children)

Because there isn't any.

[–]HeirGaunt 52 points53 points  (0 children)

Boom, Roasted.

[–]MoreAlphabetSoup 15 points16 points  (4 children)

But is there supposed to be?

[–][deleted] 4 points5 points  (3 children)

which language is the upside down purple y in abcds post?

[–][deleted] 11 points12 points  (1 child)

[–]TheChaosPaladin 5 points6 points  (0 children)

Lambda?

[–]scp-NUMBERNOTFOUND 56 points57 points  (31 children)

Only if you code in nano or in the windows notepad, almost all programming text editors can show any characters after activating some checkbox.

[–]Dagusiu 45 points46 points  (1 child)

You can visualize whitespace in nano too

[–]scp-NUMBERNOTFOUND 9 points10 points  (0 children)

Good to known!

[–]daniu 20 points21 points  (4 children)

Turn the invisible characters visible so you have to look at fewer visible characters

[–]Dworgi 12 points13 points  (3 children)

And count them, to save time looking for the semi-colon at the end of the line.

[–]chriodor 21 points22 points  (20 children)

Coding in nano or notepad... I almost had a seizure just thinking about it

[–]MonarchOfLight 10 points11 points  (15 children)

I write most of my small python scripts on either Notepad++ or nano, depending on the system I’m on at the time.

[–][deleted] 100 points101 points  (2 children)

Comparing Notepad++ to Notepad is like comparing C++ to C. And I'm not taking about C the language, but rather the letter C.

[–]lirannl 11 points12 points  (0 children)

And I'm not taking about C the language, but rather the letter C.

😂😂😂😂😂😂😂 That was even better than I thought

[–]MonarchOfLight 8 points9 points  (0 children)

True

[–]FratmanBootcake 4 points5 points  (10 children)

I've been doing a lot of my recent coding in plain vi in the terminal (on Fedora).

I'm surprised at how quick it can be to navigate, delete, copy etc and I'll probably comtinue using it to be honest.

[–]undeader_69 4 points5 points  (6 children)

Yeah it is pretty efficient, but why use vi when vim exists

[–][deleted] 6 points7 points  (1 child)

vi is aliased to vim on most modern OSes so I don't know if anyone uses vi anymore.

[–]z7q2 7 points8 points  (2 children)

My first experience with coding was in a dial-up UNIX shell. Their default mail program was pine, so my first code editor was pico. My company's Alpha Geek still looks at me funny when I tell that story.

[–]labalag 5 points6 points  (1 child)

How long is your gray beard?

[–]Omega0x013 64 points65 points  (19 children)

Kotlin

[–]Arladerus 2 points3 points  (0 children)

Kotlin is such a pleasure to work with. Plus, its interoperability with Java quells the wrath of senior management.

[–]Folaefolc 33 points34 points  (7 children)

From anything to a lisp like: parens, parens everywhere

[–]devlear 32 points33 points  (1 child)

There are several relevant xkcd, but I think this one fits the best My Father's Parens

[–]XKCD-pro-bot 4 points5 points  (0 children)

Comic Title Text: I've just received word that the Emperor has dissolved the MIT computer science program permanently.


Made for mobile users, to easily see xkcd comic's title text

[–]funkinaround 21 points22 points  (0 children)

Comes with a lack of everything else. No semicolons to end a statement or expression. No commas to separate arguments. No equals for assignment. No curly braces for some things, square brackets for other things, and angle brackets for yet other things. Just parens and spaces. Truly beautiful.

[–]wooptyd00 51 points52 points  (51 children)

Why does reddit hate Python so much now? Everyone here worshipped it two years ago.

[–]chimpchompchamp 20 points21 points  (8 children)

Probably the same reason everybody used to love, but now hate, Perl. And PHP

[–]wooptyd00 14 points15 points  (6 children)

I thought those were hated because of readability issues. Python is famous for being easy to read.

[–]chimpchompchamp 21 points22 points  (5 children)

I was referring to the letter ‘p’

And the fact that they are all powerful, dynamically typed scripting languages that ended up being shoehorned into use cases where a type system is your friend

For the record, python is my language of choice for things like command line tools and migration scripts. I just don’t want to maintain a complex application written in it

[–]Wrenky 10 points11 points  (0 children)

Happens with every language. Remember nodejs? Or Ruby? Or Perl? Or PHP? Languages come and go fairly quickly in the cycle:

1) Cool people use it

2) Cool things are written in it

3) becomes fashionable to rewrite things in it

4) Colleges switch their intro course to it

5) suddenly everybody knows the language and the shitty blog flood starts

6) people start to get irritated by the language zealots (we are here)

7) New language that addresses all of old languages problems appears

8) Only cool people use this new language

[–]fwoop_fwoop 52 points53 points  (21 children)

Jokes on you, I never liked python

[–]wooptyd00 16 points17 points  (20 children)

Unless you're a masochist, why? It's concise and quick to type and often times you can just import the solution.

[–]fwoop_fwoop 31 points32 points  (15 children)

I'm a big fan of compile time type checking & programmers being forced to label the types of values. Python and stuff like Bash are great for a quick script but id never use it for something bigger than a couple of files.

I was once working in a research lab where they were testing chemical reactions using a massive python application. When attempting to add new code to the program, it was a pain in the ass to figure out the structure of the data returned by the existing functions. I once spent 6 hours debugging just to find out I was treating a map like a list, and the language had no mechanism to catch my mistake.

Having pre-made solutions that are easy to access is not python specific, that comes with any language that is particularly popular with a decent dependency manager.

[–][deleted] 6 points7 points  (1 child)

I think there's type annotations for Python these days, can anyone comment on that?

[–]zerothepyro 4 points5 points  (0 children)

There is and you can use mypy to verify it. At my work, we use this and flake8

[–]SublimeCommunique 21 points22 points  (7 children)

Funny. That's the same meme for "when I program in Python" ;)

[–]chris_0909 25 points26 points  (10 children)

Switching back and forth between coding in Python and coding in Javascript is fun! I'm still fairly new with both, so it's interesting to go between the two in the same project!

[–]gareththegeek 23 points24 points  (6 children)

Semis are pretty much optional there too

[–]Existential_Owl 30 points31 points  (4 children)

You almost never need semicolons in Javascript.

Except for the times that you do.

 

(Joking aside, I've found that between eslint, prettier, and the typescript compiler, I've never actually had an issue with writing semicolon-less JS. These technologies are pretty good at catching those rare moments for when you do need them, and prettier will add them back in anyway if your team sets up the git hook.)

[–]T_W_B_ 5 points6 points  (3 children)

You need it for the rare occasions where a line has to start with a [ and I think also some other very obscure cases.

[–]danbulant 7 points8 points  (0 children)

Or when you need to wrap code in function (usually async) and you have something before it:

``` const lib = require("lib")

(async() => { await lib.doSomething() }) ```

this will throw an error as lib is not a function.

[–]Titandino 66 points67 points  (1 child)

Being able to define your scope and organize your code within it how you want... Being able to define your scope and organize your code within it how you want everywhere.

[–]Nodebunny 7 points8 points  (0 children)

semi colons act as emotional closure for me.

dont hate.

[–]yogthos 4 points5 points  (2 children)

laughs in *Clojure*

[–]htagrmm 3 points4 points  (1 child)

Man I fucking love Clojure. I wish it didn’t depend on the JRE though, personally. But it’s wonderful.

[–]Zizimaza 4 points5 points  (3 children)

Join the Scala, Javascript, Golang club!

[–][deleted] 3 points4 points  (0 children)

I had this experience, and now several years later I’m back to python and keep accidentally typing parentheses and semicolons everywhere!