DEV Community

Cover image for If Programming Languages Were People: The Office Edition

If Programming Languages Were People: The Office Edition

Pachi πŸ₯‘ on July 05, 2024

It is Friday again, and as you may know, I aim to make Fridays a bit more fun here. So today, imagine if the programming languages we use every day...
Collapse
 
tracygjg profile image
Tracy Gilmore

I take issue with the JavaScript quote.
In order to refactor you ideally need unit tests to alert you to any faults you create in the process.
Most JS devs are either unaware of what unit test are, what they are for or are of the opinion "We don't need unit tests, we have a load of end-to-end tests.", "Besides, what's to test? we maintain code directly in production."

Collapse
 
gopikrishna19 profile image
Gopikrishna Sathyamurthy

I agree, all the quotes seem to describe the languages' personality, but JavaScript, I'd say the quote is a developer's, not the language; and quite frankly a language-independent mindset πŸ˜„. People who practice XP, like me, follow the principles irrespective of the platform we work in including JavaScript.

Collapse
 
ezpieco profile image
Ezpie

Let's all agree javascript is always yelling behind the scene, "I am just for the web to display UI! STOP USING ME EVERYWHERE!" Plus It's a real spaghetti, that for some reason everyone loves!

Collapse
 
retakenroots profile image
Rene Kootstra

Spaghetti is because of a bad developer. Language has nothing to do with it. I have programmed with C/C++, Java, .Net and various other languages for over 20 years. Now only in JavaScript. Frontend, Backend and even Cloud.

Thread Thread
 
ezpieco profile image
Ezpie • Edited

Yeah but still it's fun making fun of javascript, because of it's "Any application that can be written in JavaScript will eventually be written in JavaScript." who the heck had the bright idea to make javascript worst with typescript? Microsoft, and that's the reason why windows is slow, because Microsoft sure loves money over everything else, infact a simple chat widget, not sure where I read it, of Microsoft is literally 6MB, can you imagine? I mean yeah I write worst code that is bigger and slower than that, but at least for a corporate it should be a big concern.

Thread Thread
 
retakenroots profile image
Rene Kootstra

Completely agree, as such for my own projects I do not use TS but companies sadly, but understandably, require it.

Thread Thread
 
brianjlacy profile image
Brian Lacy

Not following... TS is just JS with rules/discipline. It literally transpiles to minified ES5. What exactly is the concern here?

Thread Thread
 
retakenroots profile image
Rene Kootstra

Well TS is a subset of JS. The additional compilation step. The dev environment bloatware. Adding a lot of code just for types. Etc...

Because of that it is my preference to use JS over TS. I built my own framework to work effectively with JS and never been more productive.

Some people and companies prefer TS and if they are productive with TS they should stick with TS. Because in the end it is only important that you deliver a product that works and preferably on time.

Thread Thread
 
ezpieco profile image
Ezpie

How I like to call it is simple and easy. It's just JSDocs, but useless. Now be noted, I don't mean that it's useless entirely, but rather as the go to tool. By this I mean TS is great and all, but only if it's being used in the right place, such as strict API endpoints, which are suppose to follow strict rules, of course we can use hot rust, but let's assume we are dumb for now, but creating UI? That's kind of useless, you can just add JSDocs, and as long as the team does not have one dumb idiot who plans to pass string data as child rather than JSON data, you are safe, all you need to do is read the docs, just hover over the function and you get the docs, if course you use VSCode only than this is possible, if you are a super 10X ultra old guy like me using neovim, well than you need to read the docs on their own, or just configure your editor to show the docs of the function.

Thread Thread
 
gibbitz profile image
Paul Fox

Let's not forget the primary difference between TS and JSDoc. If you make a mistake describing your class in JSDoc your project still compiles. You also don't have to spend hours configuring a compiler for it!

Thread Thread
 
ezpieco profile image
Ezpie

OK let me get it straight, TS is great I use it, I like it, but I won't say that I would use it every single time, I won't use TS for making desktop applications or mobile applications, I would use it for frontend and frontend only, does this mean not for backend? NO, I would prefer using PHP for the backend, or python or even java.

Now the real point, I believe TS is a bit overrated, I am not saying that it's bad, I am just saying that TS is good, but you don't need to use it every single time, you can use JSDoc in most cases, because why do we use TS? Why do you think TS is used? Well one, it shows an error before compiling and prevents any error during compiling, but if you see it, you usually get an error at the dev console and you can use that to get to the source of the error if you have a side on side comparison of TS with JS, you will, of course, see that JS does not show any error before compiling, but that's OK, you need to check the dev console, now in case you don't want to use the dev console that a different thing, but if you ask me when I would use TS, it would be, it depends, let's just cut the crap, programming is a really alternative to everything job, you got angular, react, vue, and a bunch of other just for making UIs, you got java, python, rust, go just for backend, you got C, C#, C++ for making windows app and soo much more, that it's just a depends on the problem thing, imagine you have a problem, say you want to make the frontend of an application your corporate wants, but you team consists of 3 members, just 3, you 3 can just seat together side by side and write down the code using something simple, assuming that you won't get fired that quick, you just need to make a simple UI, all the complicated stuff is at the backend, fetching and displaying, that all, nothing fancy, no animations, no visuals, just plain text, all you can do is pick a simple framework, or even a library and get the job done, you can use JQuery with webpack to make your frontend, with webpack it makes it easy to have multiple files without any problem, all you just have to do it make simple functions with proper docs and voila! If you get fired, the new guy who replaced just because he has a PhD(for no reason why not to), all he has to do is read the doc! And let's be real, who does not read the docs? Well all have to, cause if we don't then there would be 100s of bugs in everyone's home, that is their systems would be infected with 100s of bugs.

So yes TS is not, but I would not say that I would use it for everything and every time, it's a real it depends on question just like everything in software engineering, is modular monolith better than microservices? Well it depends! So I would say yes TS wins because of it's before compile error, but if you use to much of TS, it's really not good, cause that just means you would need to make a lot of types, using any type to fix a type error that should not exist, now that's a problem. Plus who does not loves making fun of the things they use. I make fun of TS because I use it, I don't make fun of rust, because I don't even try to touch that thing! It's to overwhelming(skill issue) to use rust OK?

Collapse
 
aloisseckar profile image
Alois SečkÑr

That doesn't mean you cannot talk about "refactoring tomorrow" all day long though...

Collapse
 
cjtaylor1990 profile image
Corbin Taylor

C is the server gremlin. No one sees them, and no one really wants to work with them, but they all desperately need them to do anything. Further, no one really knows how long they've been there, nor does anyone dare to get rid of them.

Rust is C's intern that everyone insists that C hire. Rust is actually really good at what they do, but every time they try to do something, they learn that C already did it decades ago.

Collapse
 
cjtaylor1990 profile image
Corbin Taylor

Fortran is the retired founder from decades prior, who still occasionally shows up to office parties despite no one remembering them.

COBOL is similar to Fortran, but everyone is afraid of because they still have enough shares to be on the Board of Directors.

Collapse
 
rocral profile image
Alex Garcia • Edited

FORTRAN and COBOL have no similarity, take a look to some samples of code, please.
These languages are simply nearly equally old.
Take care when you travel in planes, reservation systems still run on FORTRAN :)))

Thread Thread
 
cjtaylor1990 profile image
Corbin Taylor • Edited

I mean similar in the analogy, not similar in syntax.

Also, I've written Fortran. Personally, I don't understand why anyone would willingly submit themselves to the language anymore, but legacy systems are legacy systems.

Thread Thread
 
cjtaylor1990 profile image
Corbin Taylor

And yes, I understand that there are plenty of fields that use Fortran extensively (e.g., computational physics).

Again though, if I have the option, I'd rather be using C.

Collapse
 
anuj1405 profile image
Anuj Kumbhar

To the point

Collapse
 
amomad profile image
lawrence Amo

I would like to see C# and GO

Collapse
 
elyasi2142977 profile image
H.elyasi

Javascript 🀠

Collapse
 
david_j_eddy profile image
David J Eddy

The best description for PHP. Love it.

Collapse
 
danielcumings profile image
Daniel Cumings

Would like to see C#. The personification would be somewhere between java,ruby and C++. C# constantly tries to reinvent itself, constantly modernizing the language to keep up with the times. It has a lot of structure but can be extremely simple/intuitive to use.

Collapse
 
hellooojoe profile image
Joe • Edited

Thanks AI for writing this post and creating the images

Collapse
 
budgiewatts profile image
John Watts

Python - "Let’s keep this simple and readable, shall we?"

"Yes, let's make sure the flow of the code is determined by characters we can't see."

Collapse
 
rocral profile image
Alex Garcia

It seems no one remember PASCAL, BASIC, PL/1, NATURAL, PROLOG, MODULA, or the infinite Assemblers of any hardware architecture.