Need advice about which tool to choose?Ask the StackShare community!

GNU Bash

1.3K
707
+ 1
8
JavaScript

348.8K
265.8K
+ 1
8.1K
Add tool

GNU Bash vs JavaScript: What are the differences?

Key Differences between GNU Bash and JavaScript

JavaScript and GNU Bash are two popular scripting languages used in web development and system administration. While they share some similarities, there are several key differences that set them apart from each other.

  1. Syntax: The syntax of JavaScript and GNU Bash differs significantly. JavaScript uses curly braces { } to define blocks of code, while GNU Bash utilizes indentation to indicate code blocks. Additionally, JavaScript is more verbose and requires semicolons at the end of each statement, while Bash does not.

  2. Data Types: JavaScript supports a wide range of data types, including numbers, strings, booleans, arrays, objects, and more. On the other hand, GNU Bash has limited support for data types and primarily revolves around manipulating strings and executing commands.

  3. Variable Declaration: In JavaScript, variables are declared using the keywords var, let, or const, followed by the variable name. Bash, however, does not have a specific variable declaration keyword. Variables are created implicitly when assigned a value.

  4. Function Declaration: JavaScript allows the declaration of functions using the function keyword, followed by the function name and arguments. GNU Bash, on the other hand, defines functions simply by assigning a block of code to a name, without using any specific declaration syntax.

  5. Error Handling: JavaScript provides comprehensive error handling mechanisms, including try-catch blocks and throwing custom exceptions. In contrast, Bash relies on exit codes and conditional statements for error handling, making it less robust in handling exceptions.

  6. Scoping: JavaScript uses block scope, where variables declared within a block are limited to that block and its child blocks. On the contrary, Bash utilizes global scope for variables, which means any variable declared can be accessed from anywhere within the script.

In summary, JavaScript and GNU Bash differ in syntax, data types, variable and function declaration, error handling, and scoping. These distinctions make them suitable for different use cases and require different approaches when developing scripts or applications.

Advice on GNU Bash and JavaScript
Needs advice
on
JavaScriptJavaScriptPythonPython
and
RustRust

So, I've been working with all 3 languages JavaScript, Python and Rust, I know that all of these languages are important in their own domain but, I haven't took any of it to the point where i could say I'm a pro at any of these languages. I learned JS and Python out of my own excitement, I learned rust for some IoT based projects. just confused which one i should invest my time in first... that does have Job and freelance potential in market as well...

I am an undergraduate in computer science. (3rd Year)

See more
Replies (3)
Recommends
on
JavaScriptJavaScript

I would start focusing on Javascript because even working with Rust and Python, you're always going to encounter some Javascript for front-ends at least. It has: - more freelancing opportunities (starting to work short after a virus/crisis, that's gonna help) - can also do back-end if needed (I would personally avoid specializing in this since there's better languages for the back-end part) - hard to avoid. it's everywhere and not going away (well not yet)

Then, later, for back-end programming languages, Rust seems like your best bet. Its pros: - it's satisfying to work with (after the learning curve) - it's got potential to grow big in the next year (also with better paying jobs) - it's super versatile (you can do high-perf system stuff, graphics, ffi, as well as your classic api server) It comes with a few cons though: - it's harder to learn (expect to put in years) - the freelancing options are virtually non-existent (and I would expect them to stay limited, as rust is better for long-term software than prototypes)

See more
Recommends
on
JavaScriptJavaScript

I suggest you to go with JavaScript. From my perspective JavaScript is the language you should invest your time in. The community of javascript and lots of framework helps developer to build what they want to build in no time whether it a desktop, web, mobile based application or even you can use javascript as a backend as well. There are lot of frameworks you can start learning i suggest you to go with (react,vue) library both are easy to learn than angular which is a complete framework.

And if you want to go with python as a secondary tool then i suggest you to learn a python framework (Flask,Django).

See more
Moinul Moin
Recommends
on
JavaScriptJavaScript

go for javascript, brother.

See more
Needs advice
on
DartDartDjangoDjango
and
JavaScriptJavaScript

I am currently learning web development with Python and JavaScript course by CS50 Harvard university. It covers python, Flask, Django, SQL, Travis CI, javascript,HTML ,CSS and more. I am very interested in Flutter app development. Can I know what is the difference between learning these above-mentioned frameworks vs learning flutter directly? I am planning to learn flutter so that I can do both web development and app development. Are there any perks of learning these frameworks before flutter?

See more
Replies (5)
Gagan Jakhotiya
Engineering Manager at BigBasket · | 11 upvotes · 221K views
Recommends
on
Node.jsNode.js

Hey Muhamed, For web development, you'll have to learn how to write backend APIs and how to build UI for browsers, apps, etc. If you're just starting off with programming, I'd suggest you stick to one language and trying developing everything using it to cut the unnecessary learning overhead. Although Python and JavaScript are very similar for beginners, JavaScript is the only available option for both frontend and backend development for a web application. You can start working with Node.js for your API development and Vanilla JS along with HTML/CSS for UI. You'll only need to learn one language to do all of this. Hope this helps.

See more
Dennis Barzanoff
Recommends
on
DartDart

Flutter is good for everything and it is getting better as I am speaking. Flutter Web is almost ready for production and I have made 2 complex working websites already.

See more
Recommends
on
DartDart

Well. Flutter is just a Framework (just like Django btw.) and it uses Dart as a programming language. Django is kind of solving a different problem than Dart. Dart is intened for use in Front End Applications and Django is a Framework for Back-End Web Development.

So if you want to program Flutter Apps (although i wouldn't recommend it for any serious web development yet since Flutter web isn't very mature yet) i would recommend you just lern Dart.

See more
Yohnathan Carletti
Senior Technical Product Manager · | 3 upvotes · 215.1K views
Recommends
on
DartDart

From a management and hiring perspective, I recommend Flutter (Dart). It provides native solutions to both mobile platform ( (Android and IOS) while having the same knowledge. Hiring managers look at this as an advantage since a developer can provide solutions for both platforms whit the same knowledge. The Flutter framework is growing and there is a lot of resources to ground your knowledge and start experimenting. Dart is also a great language that covers most E2E necessities, so again, no further need of learning one language for FE and another for BE and services. It is my belief that Dart will surpass Kotlin soon, and will leverage to Python and Java in the upcoming year.

See more
Recommends
on
DartDart

If you are interested in Flutter, learn it on your own time, parallel to the course. No matter what order you do them, eventually you will end up learning them all anyway ;-)

See more
Needs advice
on
GolangGolangJavaScriptJavaScript
and
PythonPython

We are converting AWS Lambdas from Java due to excessive cold start times. Usage: These lambdas handle XML and JSON payloads, they use s3, API Gateway, RDS, DynamoDB, and external API's. Most of our developers are only experienced in java. These three languages (Go, Node.js, and Python) were discussed, but no consensus has been reached yet.

See more
Replies (5)
Jordan Gregory
Cloud Operations Manager at Plainsight AI · | 4 upvotes · 393.1K views
Recommends
on
GolangGolang

I've worked with all three of these languages and also with Java developers converting to these languages and far and away Go is the easier one to convert to. With the improved cold-start times and the ease of conversion for a Java developer, it is a no-brainer for me.

The hardest part of the conversion though is going to be the lack of traditional Classes so you have to be mindful of that, but Go Structs and interfaces tend to make up for what is lost there.

Full Disclosure: I'm a 95% Go convert (from Python) at this point in time.

See more
Ahmet Yildirim
Software Engineering Consultant at UXCraft Sweden AB · | 3 upvotes · 393.1K views
Recommends
on
GolangGolang

Although I am primarily a Javascript developer myself, I used Go to build AWS lambda in a similar scenario to yours. AWS libraries felt better integrated on the Go side, I believe due to the language itself (e.g. how JSON objects are handled in go). Besides that performance of Go is much superior. But on the cons side; community is far smaller around Go, compared to Javascript. That is easy notice if you look at repos of community-maintained libraries for Go. That can feel a bit unreliable.

See more
Jason Scheirer
Senior Software Engineer at EasyPost · | 2 upvotes · 392.7K views
Recommends
on
GolangGolang

Go would provide the easiest transition for Java programmers -- its IDE/tooling is second to none (just install Goland) and the deploy/distribution story is extremely clean and lends itself to work well in lambda: single, static binaries with quick startup. No need to set up a full environment or package dependencies on your lambda AMIs, just copy a file.

See more
Russel Werner
Lead Engineer at StackShare · | 1 upvotes · 392.6K views
Recommends
on
JavaScriptJavaScript
at

If you want to prioritise language familiarity, JavaScript is more like Java than the other choices; and it can be optimised to run very fast. However if you need really fast cold-start times, you can't beat Go since it's compiled. There are other things to consider, such as the massive amount of community packages and help/documentation in the JavaScript ecosystem. Go is newer but seems to be quite popular if you need something that runs fast in a single binary.

See more
Paul Whittemore
Developer and Owner at Appurist Software · | 1 upvotes · 392.7K views
Recommends
on
GolangGolang

I was initially going to suggest JavaScript due to the smaller size needs of AWS Lambdas code and the larger range of libraries and community available (and to avoid Python for this). But I have to agree with the recommendations and rationale of @ayildirim above and I think you should choose any reasonable language that is low-overhead, fast startup, and best supported by AWS Lambda, and that is probably Go. I don't think you are likely to go wrong with that, while you can potentially with the others.

So I'd agree, on the strength of AWS Lambda support and the solid performance of Go, it seems like your best choice here for Lambdas (and I'm going to need to consider that myself going forward... pardon the pun).

See more
Decisions about GNU Bash and JavaScript
Lucas Litton
Founder & CEO at Macombey · | 8 upvotes · 249K views

JavaScript is at the forefront of our entire development approach. Not only do we use different JavaScript frameworks and management tools, but we also use pure vanilla JavaScript to solve simple problems throughout all of our client's builds. JavaScript is a general purpose programming language that can be blazing fast and fun to work with. There's not one project we are working on that doesn't involve it.

See more
William Artero
Senior Platform Engineer at ABN AMRO · | 6 upvotes · 370K views

Telegram Messenger has frameworks for most known languages, which makes easier for anyone to integrate with them. I started with Golang and soon found that those frameworks are not up to date, not to mention my experience testing on Golang is also mixed due to how their testing tool works. The natural runner-up was JS, which I'm ditching in favor of TS to make a strongly typed code, proper tests and documentation for broader usage. TypeScript allows fast prototyping and can prevent problems during code phase, given that your IDE of choice has support for a language server, and build phase. Pairing it with lint tools also allows honing code before it even hits the repositories.

See more
Andrew Carpenter
Chief Software Architect at Xelex Digital, LLC · | 16 upvotes · 402.3K views

In 2015 as Xelex Digital was paving a new technology path, moving from ASP.NET web services and web applications, we knew that we wanted to move to a more modular decoupled base of applications centered around REST APIs.

To that end we spent several months studying API design patterns and decided to use our own adaptation of CRUD, specifically a SCRUD pattern that elevates query params to a more central role via the Search action.

Once we nailed down the API design pattern it was time to decide what language(s) our new APIs would be built upon. Our team has always been driven by the right tool for the job rather than what we know best. That said, in balancing practicality we chose to focus on 3 options that our team had deep experience with and knew the pros and cons of.

For us it came down to C#, JavaScript, and Ruby. At the time we owned our infrastructure, racks in cages, that were all loaded with Windows. We were also at a point that we were using that infrastructure to it's fullest and could not afford additional servers running Linux. That's a long way of saying we decided against Ruby as it doesn't play nice on Windows.

That left us with two options. We went a very unconventional route for deciding between the two. We built MVP APIs on both. The interfaces were identical and interchangeable. What we found was easily quantifiable differences.

We were able to iterate on our Node based APIs much more rapidly than we were our C# APIs. For us this was owed to the community coupled with the extremely dynamic nature of JS. There were tradeoffs we considered, latency was (acceptably) higher on requests to our Node APIs. No strong types to protect us from ourselves, but we've rarely found that to be an issue.

As such we decided to commit resources to our Node APIs and push it out as the core brain of our new system. We haven't looked back since. It has consistently met our needs, scaling with us, getting better with time as continually pour into and expand our capabilities.

See more
Aleksandr Filatov
Contract Software Engineer - Microsoft · | 3 upvotes · 203K views
How to make your JS code faster just adding some parenthesis?

Optimize-js I will not describe this tool a lot here, because it's already good done by author on github

I just want to mention that this tool wrap up all immediately-invoked functions or likely-to-be-invoked functions in parentheses what is do a great optimization a JavaScript file for faster initial execution and parsing (based on my experience).

The performance of application where I've introduced optimize-js improved on 20% in a common (tested in Chrome and IE11).

Why it happens?

Is it maintaining now? - Unfortunately, no (but feel free to send PR)

See more
Mike Fiedler
Enterprise Architect at Warby Parker · | 3 upvotes · 220.4K views

When I was evaluating languages to write this app in, I considered either Python or JavaScript at the time. I find Ruby very pleasant to read and write, and the Ruby community has built out a wide variety of test tools and approaches, helping e deliver better software faster. Along with Rails, and the Ruby-first Heroku support, this was an easy decision.

See more

Here are all tools and skills you need to have for being among to world's top Full Stack Developers Reviews, critics and suggestions are most welcomed!

  1. HTML and CSS
    • Semantic HTML5 elements
    • Basic CSS (Positioning, Box Models etc)
    • Flexbox & CSS Grid
    • CSS Variables (Custom Properties)
    • Browser Dev Tools
    • Responsive Layout • Set Viewpoint • Fluid Widths • Media Queries • rem over px • Mobile first, stacked columns
    • Saas
  2. Deployment • Namecheap, google domains • FTP, secure FTP • Inmotion, netlify, github
  3. Vanilla JavaScript
    • Basics
    • DOM manipulations and events
    • JSON
    • APIs
    • ES6+
  1. Build Basic Sites
  2. Build UI Layouts
  3. Add dynamic functionality
  4. Deploy and maintain websites

  5. HTML and CSS frameworks - Bootstrap / Materialize / Bulma

  6. Frontend JavaScript Frameworks - React, Vue and Angular

  7. Basic Command Line

    • Git
    • NPM
    • Parcel
    • Gulp
  8. State Management

    • Topics : Immutable State, Store, Reducers, Mutation, Getters, Actions, Observables
    • Tools : Redux, Apollo, VueX, NgRx
  1. Build incredible front-end applications
  2. Smooth and steady front-end workflow
  3. Work well with team and fluent with git
  4. Connect with background API and work with data

  5. Server Side Language

    • Language :
      • Nodejs - Express, Koa
      • PHP - Laravel
      • C# - ASP.NET
      • Python - Django, Flask
      • Go
    • Topics : Basic syntax, structure and workflow, package management, HTTP and Routing
  6. DataBase

    • Relational Database : MySQL, PostGreSQL
    • MongoDB
    • Cloud : Firebase, AWS, Azure
    • Lightweight - SQLite
  7. Server Rendered Pages :

    • Next.js
    • Nuxt.js
    • Angular Universal
  8. Content Management System

    • PHP : WordPress
    • JS : Ghost
    • Python : Mezzazine
    • .NET : Piranha
  9. Misc.

    • Linux
    • Ngnix
    • Digital Ocean
    • Heroku
    • Docker
  1. Setup Full Stack dev environments and workflows
  2. Build back-end APIs & micro services
  3. Work with databases
  4. Construct full stack apps
  5. Deploy to the cloud

Switching to Mobile Development : 1. React Native 2. NativeScript 3. Ionic 4. Flutter 5. Xamarin

Desktop Apps : 1. Electron 2. GraphQL 3. Apollo 4. TypeScript

Lastly, Serverless Architecture

See more
Subhan Nooriansyah
Full Stack Mobile Developer at AISITS · | 1 upvote · 171.3K views

Websocket is trending this year, but there is another technology similar with Websocket (WS) is Server Sent Event (SSE). Those method have used similar Content-type, SSE is used to text/event-stream and WS is used to binary or text/octet-stream.

The different both of those method is sent. WS is an undirectional sending data both of client and server and SSE is whatever data on server will be push to client.

See more
Justin Dorfman
Open Source Program Manager at Reblaze · | 1 upvote · 80.5K views

If you have a file (demo.txt) that has 3 columns:

Column-1    Column-2    Column-3
Row-1a      Row-2a      Row-3a         
Row-1b      Row-2b      Row-3b
Row-1c      Row-2c      Row-3c
Row-1d      Row-2d      Row-3d
Row-1e      Row-2e      Row-3e

and you want to only view the first column of the file in your CLI, run the following:

awk {'print $1'} demo.txt

Column-1
Row-1a
Row-1b
Row-1c
Row-1d
Row-1e

If you want to print the second column of demo.txt, just replace $1 with $2

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of GNU Bash
Pros of JavaScript
  • 3
    Customizable
  • 3
    Powerful scripting language
  • 2
    Widely adopted
  • 0
    Cross platform
  • 1.7K
    Can be used on frontend/backend
  • 1.5K
    It's everywhere
  • 1.2K
    Lots of great frameworks
  • 896
    Fast
  • 745
    Light weight
  • 425
    Flexible
  • 392
    You can't get a device today that doesn't run js
  • 286
    Non-blocking i/o
  • 236
    Ubiquitousness
  • 191
    Expressive
  • 55
    Extended functionality to web pages
  • 49
    Relatively easy language
  • 46
    Executed on the client side
  • 30
    Relatively fast to the end user
  • 25
    Pure Javascript
  • 21
    Functional programming
  • 15
    Async
  • 13
    Full-stack
  • 12
    Setup is easy
  • 12
    Its everywhere
  • 11
    JavaScript is the New PHP
  • 11
    Because I love functions
  • 10
    Like it or not, JS is part of the web standard
  • 9
    Can be used in backend, frontend and DB
  • 9
    Expansive community
  • 9
    Future Language of The Web
  • 9
    Easy
  • 8
    No need to use PHP
  • 8
    For the good parts
  • 8
    Can be used both as frontend and backend as well
  • 8
    Everyone use it
  • 8
    Most Popular Language in the World
  • 8
    Easy to hire developers
  • 7
    Love-hate relationship
  • 7
    Powerful
  • 7
    Photoshop has 3 JS runtimes built in
  • 7
    Evolution of C
  • 7
    Popularized Class-Less Architecture & Lambdas
  • 7
    Agile, packages simple to use
  • 7
    Supports lambdas and closures
  • 6
    1.6K Can be used on frontend/backend
  • 6
    It's fun
  • 6
    Hard not to use
  • 6
    Nice
  • 6
    Client side JS uses the visitors CPU to save Server Res
  • 6
    Versitile
  • 6
    It let's me use Babel & Typescript
  • 6
    Easy to make something
  • 6
    Its fun and fast
  • 6
    Can be used on frontend/backend/Mobile/create PRO Ui
  • 5
    Function expressions are useful for callbacks
  • 5
    What to add
  • 5
    Client processing
  • 5
    Everywhere
  • 5
    Scope manipulation
  • 5
    Stockholm Syndrome
  • 5
    Promise relationship
  • 5
    Clojurescript
  • 4
    Because it is so simple and lightweight
  • 4
    Only Programming language on browser
  • 1
    Hard to learn
  • 1
    Test
  • 1
    Test2
  • 1
    Easy to understand
  • 1
    Not the best
  • 1
    Easy to learn
  • 1
    Subskill #4
  • 0
    Hard 彤

Sign up to add or upvote prosMake informed product decisions

Cons of GNU Bash
Cons of JavaScript
  • 1
    Too Slow
  • 22
    A constant moving target, too much churn
  • 20
    Horribly inconsistent
  • 15
    Javascript is the New PHP
  • 9
    No ability to monitor memory utilitization
  • 8
    Shows Zero output in case of ANY error
  • 7
    Thinks strange results are better than errors
  • 6
    Can be ugly
  • 3
    No GitHub
  • 2
    Slow

Sign up to add or upvote consMake informed product decisions

What is GNU Bash?

The Bourne Again SHell is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh). It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard.

What is JavaScript?

JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.

Need advice about which tool to choose?Ask the StackShare community!

What companies use GNU Bash?
What companies use JavaScript?
See which teams inside your own company are using GNU Bash or JavaScript.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with GNU Bash?
What tools integrate with JavaScript?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

May 6 2020 at 6:34AM

Pinterest

JavaScriptC++Varnish+6
5
3364
JavaScriptGitHubReact+12
5
4130
Oct 24 2019 at 7:43PM

AppSignal

JavaScriptNode.jsJava+8
5
953
Oct 11 2019 at 2:36PM

LogRocket

JavaScriptReactAngularJS+8
5
1960
Oct 3 2019 at 7:13PM

Ably Realtime

JavaScriptPythonNode.js+8
5
3822
JavaScriptPythonPubNub+4
7
1500
What are some alternatives to GNU Bash and JavaScript?
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
HTML5
HTML5 is a core technology markup language of the Internet used for structuring and presenting content for the World Wide Web. As of October 2014 this is the final and complete fifth revision of the HTML standard of the World Wide Web Consortium (W3C). The previous version, HTML 4, was standardised in 1997.
PHP
Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
Java
Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!
TypeScript
TypeScript is a language for application-scale JavaScript development. It's a typed superset of JavaScript that compiles to plain JavaScript.
See all alternatives