Need advice about which tool to choose?Ask the StackShare community!
C vs Java: What are the differences?
C is a low-level programming language known for its efficiency and close-to-hardware control, while Java is a high-level programming language that emphasizes portability and ease of use. Here are the key differences between C and Java:
Syntax and Level of Abstraction: C is a procedural programming language with a simple syntax that focuses on low-level system programming. It provides direct access to memory and hardware resources. On the other hand, Java is an object-oriented programming language with a more expressive and high-level syntax. It abstracts away low-level details and provides a rich set of libraries and frameworks for building complex applications.
Memory Management: In C, developers have manual memory management control and need to explicitly allocate and deallocate memory. This allows for efficient memory usage but requires careful handling to avoid memory leaks and segmentation faults. Java, on the other hand, employs automatic memory management through its garbage collection mechanism.
Portability and Platform Independence: C code is typically compiled into machine-specific executable binaries, making it highly platform-dependent. Code written in C may need to be recompiled or modified to run on different operating systems or hardware architectures. In contrast, Java code is compiled into bytecode that can run on any platform with a Java Virtual Machine (JVM). This gives Java the advantage of platform independence, allowing Java applications to run on various platforms without modification.
Performance and Execution Speed: C is known for its fast and efficient execution speed, thanks to direct memory and hardware access. It excels in applications requiring low-level control and high performance. Java, as a higher-level language, offers convenience features like automatic memory management, but it may have slightly lower performance due to added overhead.
Application Domain and Use Cases: C is widely used in system programming, embedded systems, operating systems, and areas where direct control over hardware resources is essential. It is commonly used for developing device drivers, kernels, and performance-critical applications. Java, on the other hand, is popular in enterprise software development, web applications, mobile development (Android), and large-scale distributed systems. Its rich ecosystem, extensive libraries, and platform independence make it suitable for building diverse applications.
In summary, If you need low-level control, direct hardware access, and high performance, C may be a suitable choice. If you prioritize platform independence, a rich ecosystem, and ease of development, Java would be a better fit.
Hello Devs,
I am planning to implement a ETL test system for checking data quality and business use cases. I am confused on what stack to use. Any advice on the below will be very helpful.
- Any existing frameworks and its source code for help
- Any other stack apart from the mentioned stack (that might be suitable)
- Any ideas for features are welcomed.
- The usage of multiple BE stacks.
If you want to create using Python language, Robot Framework is one very helpful tool to improve your test scripting and we have a lot of methods created by the community. If you want to use Javascript, Cypress in terms of benefits is the better option to create and maintain tests, and run and generate reports in many browsers is really easy with them.
I will use Elixir for personal projects. It's productive, reliable, secure, simple, etc. But when performance is critical, I need job opportunities, when I work with mutability, which do I pick? I need advice on which "bureaucratic, mainstream" programming language to pick when wanting performance and jobs. Elixir is often "slow", and it hasn't boomed yet the way Golang and Rust have, so which?
Well for those performant tasks maybe you can use Rust nifs for elixir. Elixir enables to write fault-tolerant, scalable code for concurrent systems, and as such, it is perfect for messaging systems and web applications that might need to handle a lot of users efficiently. But if you need speed you can plug in Rust or write a microservice using Goland/Rust.
Hello Folks, my first time here, and for requesting advice. I am trying to create some automation from my cloud stack on AWS to something more cloud native. I have containerised the services, however, I am stuck at DB, my Data warehouse, and messaging. Would love some recommendations on how can I automate this for some future work too.
I recommend cloud-init for base setup of machines and configuring them.. Its simple (YAML file) and is industry standard. Even works on bare metal as well as cloud.
Hi, I am working as a web developer (PHP, Laravel, AngularJS, and MySQL) with more than 8 years of experience and looking for a tech stack that pays better. I have a little bit of knowledge of Core Java. For better opportunities, Should I learn Java, Spring Boot or Python. Or should I learn Drupal, WordPress or Magento? Any guidance would be really appreciated! Thanks.
Hard to answer it depend on market. Python + Flask + Jinja2 is better that SpringBoot. Java can be paid better now but I think that future is Python. I code very good in PHP, Java, Python - prefer Python for less code and more effects. PHP is little ugly and limited to web.
What do you think about Node JS with React? I feel like this stack is fairly paid more than PHP.
I am also a Laravel developer, in process of transitioning towards Node js.
If you wanna personally connect with me, hit me up at @izshreyansh on twitter.
Actually, I'll add, C++ and C# as well.
Well, I'm into Computer Science since 1996, so I understand a bit of everything plus a lot of different OSs, I study 10 hours per day every day. However back in the 90s we didn't have books or universities about programming, all were passed through if you knew somebody in that profession. Which I did and in that time, he showed me .NET and MySQL, and that offered a lot of jobs also Java. Today you have a lot of options but I'm already discarding new languages as I believe they will jot succeed.
My always dream was to create game, and software. I don't understand all programming concepts and I'm studying all languages at the same time, so I'm heavy loaded. But that keeps me more aware.
I made a choice: use Python for everything but if you want performance, apps, security, compatibility, Multiplatform. What should I choose? The real question here is: which language should I go 100% and that language will teach me all I need about programming BUT without getting lost in that language forever (I discard any Assembly possibility) and one that has full documentation, support and libraries.
In my experience: I found a lot of info for python and java. But hardly I have ever found anything for C lang, C++ and, what about C# (it's only for Windows, is it easy, I saw a lot of documentation). Thanks!!
Python can be linked with C++ both language are similar in many places (using same libraries or concepts to build libraries) - except memory and static types. C++ is more assembler and have different syntax (need 3x-4x coding more).
If you do engineering it is perfect stack - Java is to slow in coding (4x more code) and little faster than Python - whatever it is hard to mix Java/C++ what is easy Python/C++.
In the most program you do not need super performance but if you need C++ is the best and have rich Object Language much richer than Java and more poor than Python. Python is true object language - everything is object.
Whatever sometimes more important is framework than language for specific use.
I would go with Python, it is fast to code, readable and very powerful without giving you too much to think about (e.g. memory management). If you're looking for speed, Cython is a fairly good way to get there, since Python is a C-based language it can be compiled to C using Cython and will get you a very significant boost in speed! You can also make use of C libraries if you prefer. The only downside to Cython over Python is that it is compiled and not interpreted, which can make debugging a pain (but you might find yourself doing most of the debugging in Python before switching to Cython). C languages are a bit of a pain to read up on (API, libraries etc.), but Stack Overflow has you covered in most cases!
All programming languages are cross platform except Java, but even that's not that bad. Performance: C(++), Go, Rust, Java, Ada, OCaml, Haskell, C# Apps: JS, TS, ReScript, Go, C(++), Java, Haskell, C#, Dart Security: Java, Go, Rust, COBOL, C(++), C# Compatibility: Java(due to it's VM), C(++), Go, C# Libraries: Java, Go, C(++), C# Documentation: Java, C(++) (since they are mature) What do you mean without getting lost in the language? I'd not advocate for C(or C++), considering it's hard to understand the memory, and it's for those into programming theory. You are looking for all you need. Go for Java, it has a library for everything, it has a reasonable learning curve, and pretty much you are going to encounter it everywhere- it's like a programming black hole you can't escape.
When working on Python, I noticed that Python is only useful for data science. I am looking for a programming language that:
Is different in terms of paradigm(I used OO only in Python for data analysis, I want something that is a different paradigm to improve my coding skills)
Is excellent at systems engineering
Will enhance my Python projects and basically make Python better
Has an excellent future, will skyrocket in terms of demand
Is very performant, excellent performance
Has a steep learning curve(it's because I want a simple language and an advanced language in my stack)
I found these two languages to fit my needs, and I need help choosing. Which would be better for me considering my needs
Rust is more useful compared to C on some cases like in web assembly. C is more tedious to code. Rust is modern and has a lot more of opportunities. If you are also investing for the future I recommend Rust over C.
It must be Rust, It absorbs the advantages of other languages,safe, good performance and develop quickly, The community is also growing and active. I think there are some difficulties to learn Rust, but when you have mastered it, you will write good programs than C lang
Generally speaking, what are the most important things you expect a junior developer to know and be able to do from day 1 in your respective tech stack? Firm grasp of OOP? SQL? MVC? ORM? Algorithms and Datastructures? Understanding CRUD & the request response cycle? Database design? framework familiarity? Postman? Deployment? TDD? Git? Language-specific knowledge? Other things?
Start with building a solid understanding of computer science fundamentals. Understand the basics of building blocks - memory, processing, storage, networking. Understand what CPU bound, memory bound, I/O bound, network bound processes are. Understand the cost of accessing data from Memory vs. Disk vs Network. Understand how multiple CPU threads help in optimizing the performance of a single machine.
Build expertise on a programming language. You may pick any language of your choice. I would recommend starting with Java / Python. Make sure you know one language really well. Build a strong understanding of Data Structures and Algorithms. You should be able to develop an intuition on when to use what. You may practice DS and Algorithm problems, using the language of your choice, on a competitive coding platform (e.g. Leetcode) or by building your own App!
Next, get familiar with basic cloud computing and distributed system concepts. Here is a good resource for that - https://www.youtube.com/watch?v=p7NkTUyEE1o&ab_channel=JeffreyRichter If you understand the computer science fundamentals well, you will be able to apply those concepts here as well.
Hope it helps!
Ability to read code and willingness to try to reason flow of operations and information. Tools and technologies change, one doesn't need to have them in toolbelt from day one. All things you name are relevant in some contexts, so it's not bad to understand them.
Just learn to learn. Learn to search and develop your logical thinking, that's all you need. No books, no deep study of how computers work, just logic and willingness to learn
For me, it is less of a specific technology you know (although I would prefer you have some knowledge of some of my team stack). It is more the way you get into a problem, the eagerness to learn more, the true sincerity to say "I don't know", the open mind to find solutions in different ways and the "Yes we can" mentality no matter how hard it is.
Most employers don't expect from you to know how to implement CI/CD or any other funcy stuff. As junior developer you should focus on building a good toolset of good software practices & principles. Your soft skills are important as well. Learn about soft skills. Be eager to learn, be humble and show you talent and your creativity through your work. If you want to become a good developer ( at first) and a star engineer (at a later stage) then computer programming (coding) is your number one priority . Coding is like painting. Putting aside your talent, you have to practice a lot and improve your outcome each time. As junior developer you can learn how to write good code by studying existing code found in public git repositories (i e , github). As junior developer you should study some good software principles (i.e., DRY, KISS, YAGNI) and always recall them each time you write software code. As junior developer you should learn about coding standards and conventions. You will have to follow to your company's coding conventions (soon or later) as well as you will realize that you have to write code cosistent to the existing code base. At the end of the day, code consistency matters a lot. You have to improve your code day by day. If you manage to follow some good software practices you will find out that you will need an ORM to work with your database. Then you will realize that you need the X web framework to build your REST API etc. To sum up, you will start building a toolset with a single programming language and some good software practices & principles and then you will put new tools in it day-by-day.
include include int main(){ char name[10], pasword[10]; printf("enter you user name :"); gets(name); printf("enter your pasword : "); gets(pasword); printf("your name : %s \n your password : %s \n", name, pasword); if ( name != "youcef") { printf("name undefined\n"); } else { printf("finde name"); }
}
his not working
You will want to do a few things here. First, replace gets
with fgets
. Then, you're going to want to use strcmp
from string.h to compare the input with the desired result. The code listed below has been updated with a working example with the previously mentioned recommendations. This isn't perfect and there are other ways to accomplish the same task. Explore other options that are available when you have a chance and see if you can improve on this example.
#include <stdio.h>
#include <string.h>
int main()
{
char name[10],
pasword[10];
printf("enter you user name :");
// Use fgets as gets is insecure and can easily lead to buffer overflow exploits
fgets(name, sizeof(char) * sizeof(name), stdin);
// Remove \n from fgets stdin read with null character so as to not have to include
// in strcmp later.
name[strlen(name) - 1] = '\0';
printf("enter your pasword : ");
fgets(pasword, sizeof(char) * sizeof(pasword), stdin);
printf("your name : %s \n your password : %s \n", name, pasword);
// If strcmp result > 0 || < 0 it's not a match
if (strcmp(name, "youcef") != 0)
{
printf("name undefined\n");
}
else
{
printf("finde name");
}
}
Dear, Yusuf You can't use if statement to compare two strings, but you can use strcmp() function which means string compare The behavior of strcmp function is: If (string1 < string2)? Then: return a negative value. If (string1 > string2)? Then: return a positive value.
If(string1 == string2)? Then: return (0).So, you can modify this statment to: if(strcmp(name,"Yousef") != 0) printf("name undefined\n");
else printf("find name");But, In this case there is one logic problem that (strcmp) function don't ignore the letter case. For example: If you input name : yousef
The first letter here (y) is small, but in the comparing statement above is capital, So the result will be "name undefined", but in fact "yousef" = "Yousef".To solve this problem you should use stracasecmp() function. This function ignore the letter case while comparing. The code will be: if(strcasecmp(name,"Yousef") != 0) printf("name undefined\n");
else printf("find name");Attention: Include string libreary after using these functions to skip any problem may be found.
includemay Allah bless you ^_^
I'm making my university community web service with a team. (6 members myself included)
And we decided to use JavaScript, HTML, CSS (for sure, it's the basic of websites) but couldn't decide for the back end part.
There are tons of languages, tools, etc., but I'm really new to programming, so I'd like to get some help to figure out what tools we need.
So my question is this: are there any good examples of web community services we can mimic the tools or get an insight from them?
Since you're following Python, I would recomend using Django as your main back-end language. If you know Python it would be a great experience. Django is well documented on their official website: https://www.djangoproject.com/ I would also use React for front-end as well. Also this article is worth reading, I think progressive web app is something worth learning these days: https://web.dev/progressive-web-apps/ Hope that helps :)
Since your team is already using JavaScript, there's a great number of examples for backend services written with NodeJS. I'd recommend using Firebase, or any backend as a service (you can use that term to find alternatives), for setting up your backend as it is much easier for newer people to understand and lets you focus on your core application logic, and not provisioning servers, databases, etc.
Since you're team is already using JavaScript, there are alot of examples and open source projects written with NodeJs, so I preffer this language in your backend application and also I am recommended using Mongo DB with It for saving data in it, and also for your frontend application I am recommanded using VueJs.
Since you are already using JavaScript on the front end it would be easy to adopt the MERN (MongoDB, Express, React, NodeJS) stack which s all javascript based making it easy to transfer knowledge with the backend and front end
Kindly I don't find any help that solve this mystery I need more help if it will happen
Make it simple, most of projects doesnt need a AI, ML or big algorithms. If your project just serving end users take it to the web ready compatible. (Javascript, .Net, PHP Laravel)
Hi there. I'm looking to build an employee time tracker web app. This should also be optimized for mobile. I'm trying to figure out what the best stack is for this. I have knowledge of Java, JavaScript, some C#. I don't mind learning a new language for this purpose. Any help or advice would be really awesome! Thanks.
Hi Otensia! I'd definitely recommend using the skills you've already got and building with JavaScript is a smart way to go these days. Most platform services have JavaScript/Node SDKs or NPM packages, many serverless platforms support Node in case you need to write any backend logic, and JavaScript is incredibly popular - meaning it will be easy to hire for, should you ever need to.
My advice would be "don't reinvent the wheel". If you already have a skill set that will work well to solve the problem at hand, and you don't need it for any other projects, don't spend the time jumping into a new language. If you're looking for an excuse to learn something new, it would be better to invest that time in learning a new platform/tool that compliments your knowledge of JavaScript. For this project, I might recommend using Netlify, Vercel, or Google Firebase to quickly and easily deploy your web app. If you need to add user authentication, there are great examples out there for Firebase Authentication, Auth0, or even Magic (a newcomer on the Auth scene, but very user friendly). All of these services work very well with a JavaScript-based application.
As you have knowledge of Javascript, I would go towards Vue/React in Frontend and Node (with suitable framework) with backend. From my point of view Java would be too bloated for suggested kind of an app. I myself use PHP as a backend a lot and React as frontend but moving thoughts towards full stack javascript world.
php is the best for beginners, and one of the best for web development at all, all the host servers can handle it, a basic knowledge in java is not enough for build a web site, but a basic knowledge in php is enough. learn php basics and oop and mvc design pattern or any framework like Laravel (optional), and javascript for frontend (a framework like React or Angular is optional but good) and you will build any web site you want.
We migrated from PHP to Angular/PHP to Angular/Node to React/Node/AWS Lambda. React/Node(Typescript)/Lambda seems to be good so far as we have developed few applications (large and small) using this stack so far. React/Node/Lambda is also good for mobile. If you are planning to use AWS, you can use the S3 bucket to store the frontend and Lambda or EC2 for backend APIs.
We migrated from PHP to Angular/PHP to Angular/Node to React/Node/AWS Lambda. React/Node(Typescript)/Lambda seems to be good so far as we have developed few applications (large and small) using this stack so far. React/Node/Lambda is also good for mobile. If you are planning to use AWS, you can use the S3 bucket to store the frontend and Lambda or EC2 for backend APIs.
For just a time tracker app? I'd recommend going with a cloud-based approach. A couple serverless functions in whatever language you choose, and the front end can be a static website hosted inside a storage service (blob for Azure, bucket for AWS, etc). This will ultimately probably save you a little time, and them a little money on hosting.
We're moving from Java to Kotlin with our Microservice Stack (Spring Boot) because it is excellently supported by framework and tools and the learning curve is not very steep Kotlin is way more straightforward and convenient to use while providing less boilerplate and more strictness, which finally leads to better code, which is more readable, maintainable and less error-prone. We especially like Kotlin's (functional) data structures, which are, e.g. compared to Scala, easier to understand and don't require deep knowledge in functional programming.
We have chosen a mix of Java and Python for building an open source data observability tool. The application can work as a standalone command line tool with a rich shell interface (using even command completion). The Java ecosystem is more mature when it comes to connectivity to various databases using JDBC. Also picocli with jline3 let us make a very dynamic shell interface with command completion. The definitions of data quality checks that should be executed are defined in YAML files, backed by a YAML (in fact JSON) schema files. Our YAML files can be edited in Visual Studio Code (and other code editors) with support of the code completion. It is possible because all the data model is defined as pure Java classes for which we are generating a YAML/JSON schema. There is still place for Python because it is very popular in the database space. We are simply starting a Python interpreter in the background (from a Java code). Python is used to evaluate validation rules (defined as Python functions) and render SQL queries from Jinja2 templates.
I wanted to develop a student app that possibly could be used by many teams (students from other schools)
I chose Ionic, because:
single codebase: previously, we used React Native for Android and Angular for web/PWA, which was troublesome
portability: runs on PWA (which is important, because iOS license is too expensive for school app), web, Android iOS (+ others, if needed)
full use of web technologies: Next.js, Tailwind, React in this example (in oppose to Flutter/Java/Kotlin)
stability and maintainability: low-entry level due to basic web technologies without new syntax (in oppose to React Native and Flutter), web is really stable and won't lose support (which doesn't have to be true with Flutter/Dart)
Expo was a tool Macombey really wanted to utilize from the beginning. I have been working with React Native since 2016 and originally I had to use simulators in Xcode, install pods on top of node packages, configure certificates, and more abundant objectives that take time away from actual development. As a development studio, we have to move quick and get projects to our clients and partners in a matter of months.
Expo made this easy for us. We now have a mobile app for clients to download and test their project on, there is no need to install pods or configure Xcode, and development is super fast and reliable now.
I had a goal to create the simplest accounting software for Mac and Windows to help small businesses in Canada.
This led me to a long 2 years of exploration of the best language that could provide these features:
- Great overall productivity
- International wide-spread usage for long-term sustainability and easy to find documentation
- Versatility for creating websites and desktop softwares
- Enjoyable developper experience
- Ability to create good looking modern UIs
- Job openings with this language
I tried Python, Java, C# and C++ without finding what I was looking for.
When I discovered Javascript, I really knew it was the right language to use. Thinking of this today makes me realize even more how great a decision this has been to learn, use and master Javascript. It has been a fun, challenging and productive road on which I am still satisfied.
Obviously, when I refer to Javascript, it is not without implying the vast ecosystem around it. For me, JS is a whole universe in which almost every imaginable tools exist. It's awesome - for real. Thanks to all the contributors which have made it possible.
To be even clearer about how intense I am with Javascript, let's just say that my first passion was music. Until, I find coding with Javascript! Yep, I know!
So in conclusion, I chose Javascript because it is versatile, enjoyable, widely used, productive for both desktop softwares and websites with ability to create modern great looking user interfaces (assuming HTML and CSS are involved) and finally there are job openings.
Python has become the most popular language for machine learning right now since almost all machine learning tools provide service for this language, and it is really to use since it has many build-in objects like Hashtable. In C, you need to implement everything by yourself.
C++ is one of the most popular programming languages in graphics. It has many fancy libraries like eigen to help us process matrix. I have many previous projects about graphics based on C++ and this time, we also need to deal with graphics since we need to analyze movements of the human body. C++ has much more advantages than Java. C++ uses only compiler, whereas Java uses compiler and interpreter in both. C++ supports both operator overloading and method overloading whereas Java only supports method overloading. C++ supports manual object management with the help of new and delete keywords whereas Java has built-in automatic garbage collection.
We changed to Python instead of Java to have the back-end processing in the same language as our data analysis module. In addition, Python has a lot of libraries for data-processing. We intend to use Flask for our back-end web development. Flask is a simple, straight-forward framework for our purposes. Flask also has a large community which is beneficial to the development process.
1 code deploys for both: Android and iOS. There is a huge community behind React Native. And one of the best things is Expo. Expo uses React Native to make everything even more and more simple. Awesome technologies. Some other important thing is that while using React Native, you are reusing all JavaScript knowledge you have in your team. You can move easily a frontend dev to develop mobile applications.
A huge PRO of Expo, is that it includes a full building process. You run 1 line in the terminal, and 10 minutes after you have 2 builds done. Double check EAS Expo.
C# and .Net were obvious choices for us at LiveTiles given our investment in the Microsoft ecosystem. It enabled us to harness of the .Net framework to build ASP.Net MVC, WebAPI, and Serverless applications very easily. Coupled with the high productivity of Visual Studio, it's the native tongue of Microsoft technology.
Node.js has been growing in popularity, and the ability to access the global pool of Javascript developers is great. There is a decreased amount of effort for people to work across the frontend and backend, and the language itself is easy and works well for many common use cases.
Go was the other serious candidate, but it just hasn't been implemented in as many Production systems yet, and the best Go engineers I've known have been hackers, whereas we're building a robust analytics platform that requires more caution. Type safety is easily added with TypeScript, and NPM is awesomely handy.
Pros of C lang
- Performance68
- Low-level49
- Portability36
- Hardware level29
- Embedded apps19
- Pure13
- Performance of assembler9
- Ubiquity8
- Great for embedded6
- Compiles quickly4
- Old4
- No garbage collection to slow it down3
- Gnu/linux interoperable2
- OpenMP2
Pros of Java
- Great libraries603
- Widely used446
- Excellent tooling401
- Huge amount of documentation available396
- Large pool of developers available334
- Open source208
- Excellent performance203
- Great development158
- Used for android150
- Vast array of 3rd party libraries148
- Compiled Language60
- Used for Web52
- Managed memory46
- High Performance46
- Native threads45
- Statically typed43
- Easy to read35
- Great Community33
- Reliable platform29
- Sturdy garbage collection24
- JVM compatibility24
- Cross Platform Enterprise Integration22
- Good amount of APIs20
- Universal platform20
- Great Support18
- Great ecosystem14
- Backward compatible11
- Lots of boilerplate11
- Everywhere10
- Excellent SDK - JDK9
- Cross-platform7
- It's Java7
- Static typing7
- Portability6
- Mature language thus stable systems6
- Better than Ruby6
- Long term language6
- Used for Android development5
- Clojure5
- Vast Collections Library5
- Best martial for design4
- Most developers favorite4
- Old tech4
- Testable3
- History3
- Javadoc3
- Stable platform, which many new languages depend on3
- Great Structure3
- Faster than python2
- Type Safe2
- Job0
Sign up to add or upvote prosMake informed product decisions
Cons of C lang
- Low-level5
- No built in support for parallelism (e.g. map-reduce)3
- Lack of type safety3
- No built in support for concurrency3
Cons of Java
- Verbosity33
- NullpointerException27
- Nightmare to Write17
- Overcomplexity is praised in community culture16
- Boiler plate code12
- Classpath hell prior to Java 98
- No REPL6
- No property4
- Code are too long3
- Non-intuitive generic implementation2
- There is not optional parameter2
- Floating-point errors2
- Java's too statically, stronglly, and strictly typed1
- Returning Wildcard Types1
- Terrbible compared to Python/Batch Perormence1