#JAVA Programming
Explore tagged Tumblr posts
Text
Something romantic for programmers to do, write a console program for your crush. Only for them to not know what it means and just reply "👍"
#self esteem#codeblr#csharp programming#java#javascript#java programming#crush#flirting#what is flirting?#flirting fail#programming humor#programming#i tried
237 notes
·
View notes
Text
Progress :)
27 notes
·
View notes
Text
Old Java Notes
Sunday 27th August 2023
I found some of my old Java notes I made during my apprenticeship early last year! I don’t use Java now at all but it’s cool to look back at what I used to study on! Then, because my work place used C#, the class turned to a C# class instead!
for some reason I couldn’t understand Java but I could understand C# even though their syntax are similar and other things? Anyhoo, I still prefer C# over Java now 🥰✨🙌🏾
#xc: side note post#codeblr#coding#progblr#programming#studyblr#studying#computer science#tech#java#java programming
109 notes
·
View notes
Text
Well fuck me i guess
Apparently replit is having issues… i hope they fix this very much
found out you can make custom themes...
my project doesnt work but at least the 1 remaining file is pink now.
i wish javafx just worked when i first tried to use it in eclipse and vscode then i wouldnt have to use this godafwul website that nuked my code...
AH BY CREATING NEW FILES WITH THE OLD NAMES THE CODE IS BACK
25 notes
·
View notes
Text
Your time to mine
Also made a little command line tool in java that takes your local time and converts it into dutch time. Also made it so you can input a time and change it into time in the Netherlands. I should also probably alter it so it doesn't explode when you put in 29 hours.
25 notes
·
View notes
Text
i really let this blog catch some dust since i got so busy. College was teaching Java so I had to learn how all that works. I'm struggling a bit but were finally working on a project. I'm tryna make a Trivia Quiz game. Any tips on Java itself welcomed, I'll try and post updates.
3 notes
·
View notes
Text
System.out.println("help me");
#that's how I fell while learning Java#coding#programmer#programming#coder#programming blog#java beginner#java programming#java#javaprogramming
84 notes
·
View notes
Text
Normally I just post about movies but I'm a software engineer by trade so I've got opinions on programming too.
Apparently it's a month of code or something because my dash is filled with people trying to learn Python. And that's great, because Python is a good language with a lot of support and job opportunities. I've just got some scattered thoughts that I thought I'd write down.
Python abstracts a number of useful concepts. It makes it easier to use, but it also means that if you don't understand the concepts then things might go wrong in ways you didn't expect. Memory management and pointer logic is so damn annoying, but you need to understand them. I learned these concepts by learning C++, hopefully there's an easier way these days.
Data structures and algorithms are the bread and butter of any real work (and they're pretty much all that come up in interviews) and they're language agnostic. If you don't know how to traverse a linked list, how to use recursion, what a hash map is for, etc. then you don't really know how to program. You'll pretty much never need to implement any of them from scratch, but you should know when to use them; think of them like building blocks in a Lego set.
Learning a new language is a hell of a lot easier after your first one. Going from Python to Java is mostly just syntax differences. Even "harder" languages like C++ mostly just mean more boilerplate while doing the same things. Learning a new spoken language in is hard, but learning a new programming language is generally closer to learning some new slang or a new accent. Lists in Python are called Vectors in C++, just like how french fries are called chips in London. If you know all the underlying concepts that are common to most programming languages then it's not a huge jump to a new one, at least if you're only doing all the most common stuff. (You will get tripped up by some of the minor differences though. Popping an item off of a stack in Python returns the element, but in Java it returns nothing. You have to read it with Top first. Definitely had a program fail due to that issue).
The above is not true for new paradigms. Python, C++ and Java are all iterative languages. You move to something functional like Haskell and you need a completely different way of thinking. Javascript (not in any way related to Java) has callbacks and I still don't quite have a good handle on them. Hardware languages like VHDL are all synchronous; every line of code in a program runs at the same time! That's a new way of thinking.
Python is stereotyped as a scripting language good only for glue programming or prototypes. It's excellent at those, but I've worked at a number of (successful) startups that all were Python on the backend. Python is robust enough and fast enough to be used for basically anything at this point, except maybe for embedded programming. If you do need the fastest speed possible then you can still drop in some raw C++ for the places you need it (one place I worked at had one very important piece of code in C++ because even milliseconds mattered there, but everything else was Python). The speed differences between Python and C++ are so much smaller these days that you only need them at the scale of the really big companies. It makes sense for Google to use C++ (and they use their own version of it to boot), but any company with less than 100 engineers is probably better off with Python in almost all cases. Honestly thought the best programming language is the one you like, and the one that you're good at.
Design patterns mostly don't matter. They really were only created to make up for language failures of C++; in the original design patterns book 17 of the 23 patterns were just core features of other contemporary languages like LISP. C++ was just really popular while also being kinda bad, so they were necessary. I don't think I've ever once thought about consciously using a design pattern since even before I graduated. Object oriented design is mostly in the same place. You'll use classes because it's a useful way to structure things but multiple inheritance and polymorphism and all the other terms you've learned really don't come into play too often and when they do you use the simplest possible form of them. Code should be simple and easy to understand so make it as simple as possible. As far as inheritance the most I'm willing to do is to have a class with abstract functions (i.e. classes where some functions are empty but are expected to be filled out by the child class) but even then there are usually good alternatives to this.
Related to the above: simple is best. Simple is elegant. If you solve a problem with 4000 lines of code using a bunch of esoteric data structures and language quirks, but someone else did it in 10 then I'll pick the 10. On the other hand a one liner function that requires a lot of unpacking, like a Python function with a bunch of nested lambdas, might be easier to read if you split it up a bit more. Time to read and understand the code is the most important metric, more important than runtime or memory use. You can optimize for the other two later if you have to, but simple has to prevail for the first pass otherwise it's going to be hard for other people to understand. In fact, it'll be hard for you to understand too when you come back to it 3 months later without any context.
Note that I've cut a few things for simplicity. For example: VHDL doesn't quite require every line to run at the same time, but it's still a major paradigm of the language that isn't present in most other languages.
Ok that was a lot to read. I guess I have more to say about programming than I thought. But the core ideas are: Python is pretty good, other languages don't need to be scary, learn your data structures and algorithms and above all keep your code simple and clean.
#programming#python#software engineering#java#java programming#c++#javascript#haskell#VHDL#hardware programming#embedded programming#month of code#design patterns#common lisp#google#data structures#algorithms#hash table#recursion#array#lists#vectors#vector#list#arrays#object oriented programming#functional programming#iterative programming#callbacks
16 notes
·
View notes
Text
Thinking of making notepad clone from scratch using java, not sure tho
3 notes
·
View notes
Text
The History of Java Programming: From Its Humble Beginnings to Dominance in Software Development
Java is one of the most influential programming languages in the modern era, known for its versatility, portability, and robustness. Developed in the early 1990s, it has left a lasting impact on the software industry, helping build countless applications, from mobile games to enterprise-level software. In this blog, we'll explore Java’s fascinating history, its motivations, its growth, and its influence on today’s technology landscape.
The Genesis of Java
Java originated in the early 1990s as part of a project at Sun Microsystems. The project, initially called the "Green Project," was led by James Gosling, alongside Mike Sheridan and Patrick Naughton. The team's goal was to develop a language for embedded systems, specifically for appliances like televisions, which were beginning to incorporate smart technology.
The language was initially called "Oak," named after an oak tree outside Gosling's office. However, due to a trademark conflict, it was eventually renamed Java. The name "Java" was inspired by a type of coffee popular with the developers, signifying their relentless energy and drive.
Motivation Behind Java's Creation
Java was developed to address several key challenges in software development at the time:
Portability: Most languages of the day, such as C and C++, were platform-dependent. This meant that software needed significant modification to run on different operating systems. Gosling and his team envisioned a language that could be executed anywhere without alteration. This led to the now-famous slogan, "Write Once, Run Anywhere" (WORA).
Reliability: C and C++ were powerful, but they had pitfalls like manual memory management and complex pointers, which often led to errors. Java aimed to eliminate these issues by offering features like automatic memory management through garbage collection.
Internet Revolution: As the internet began to take shape, Java was positioned to take advantage of this growing technology. Java’s platform independence and security made it an ideal choice for internet-based applications.
The Birth of Java (1995)
The Green Project initially produced a device called Star7, an interactive television set-top box. While innovative, it didn't achieve widespread success. However, by the mid-1990s, the internet was gaining traction, and Sun Microsystems realized Java’s true potential as a programming language for web applications.
In 1995, Java was officially launched with the release of the Java Development Kit (JDK) 1.0. At the same time, Netscape Navigator, a popular web browser, announced that it would support Java applets. This gave Java immense exposure and set the stage for its rapid adoption in the software development community.
Key Features that Set Java Apart
From the beginning, Java had several features that distinguished it from its contemporaries:
Platform Independence: Java programs are compiled into an intermediate form called bytecode, which runs on the Java Virtual Machine (JVM). The JVM acts as a mediator between the bytecode and the underlying system, allowing Java programs to be executed on any platform without modification.
Object-Oriented: Java was designed from the ground up as an object-oriented language, emphasizing modularity, reusability, and scalability. This feature made Java particularly attractive for building complex and large-scale applications.
Automatic Memory Management: Java's garbage collector automatically handles memory deallocation, reducing the risk of memory leaks and other errors that plagued languages like C and C++.
Security: Java was designed with a focus on security, particularly given its intended use for internet applications. The JVM serves as a secure sandbox, and Java’s bytecode verification process ensures that malicious code cannot be executed.
Evolution of Java Versions
Since its release in 1995, Java has undergone several iterations, each bringing new features and improvements to enhance the developer experience and address the evolving needs of software applications.
Java 1.0 (1996): The first version of Java was mainly used for applets on web browsers. It came with basic tools, libraries, and APIs, establishing Java as a mainstream programming language.
Java 2 (1998): With the release of J2SE (Java 2 Platform, Standard Edition), Java evolved from a simple web language to a complete, general-purpose development platform. Java 2 introduced the Swing library, which provided advanced tools for building graphical user interfaces (GUIs). This release also marked the beginning of Java Enterprise Edition (J2EE), which extended Java for server-side applications.
Java 5 (2004): Java 5, initially called Java 1.5, was a significant update. It introduced Generics, Annotations, Enumerations, and Autoboxing/Unboxing. The updated version also brought improved syntax and functionality, which simplified writing and reading code.
Java SE 7 (2011) and Java SE 8 (2014): Java SE 7 brought features like try-with-resources, simplifying exception handling. Java SE 8 was a transformative release, introducing Lambda expressions and Stream APIs. This version brought functional programming aspects to Java, allowing developers to write more concise and expressive code.
Java 9 to Java 17 (2017-2021): Java 9 introduced the module system to help organize large applications. Java 11 and later versions moved towards a more rapid release cadence, with new features appearing every six months. Java 17, released in 2021, became a long-term support (LTS) version, offering several advancements like improved garbage collection, pattern matching, and record classes.
The Java Community and OpenJDK
Java's development has always been characterized by a strong community influence. Initially controlled by Sun Microsystems, Java's fate changed when Oracle Corporation acquired Sun in 2010. After the acquisition, Oracle made significant strides towards making Java more open and community-driven.
OpenJDK, an open-source implementation of Java, became the reference implementation starting from Java 7. This move encouraged greater collaboration, transparency, and diversity within the Java ecosystem. OpenJDK allowed more organizations to contribute to Java’s development and ensure its continued growth.
Java in the Enterprise and Beyond
Java has become synonymous with enterprise-level software development, thanks in part to the introduction of Java EE (now known as Jakarta EE). Java EE provides a set of specifications and tools for building large-scale, distributed, and highly reliable applications. The Java ecosystem, including frameworks like Spring, Hibernate, and Apache Struts, has contributed to its popularity in enterprise environments.
Java also became a key player in the development of Android applications. Android Studio, Google's official IDE for Android development, is powered by Java, which contributed significantly to its widespread adoption. Although Kotlin, another JVM language, is now gaining popularity, Java remains a core language for Android.
The Challenges Java Faced
Despite its success, Java faced competition and challenges over the years. Languages like C#, developed by Microsoft, and Python have gained traction due to their developer-friendly features. Java has been criticized for its verbosity compared to more modern languages. However, the Java community’s active contributions and Oracle’s improvements, including adding modern programming paradigms, have kept it relevant.
Another significant challenge was the rise of JavaScript for web development. While Java was initially popular for web applets, JavaScript became the dominant language for front-end development. Java's relevance in web applications decreased, but it found its niche in server-side applications, enterprise systems, and Android.
Java Today and Its Future
Today, Java is one of the most popular programming languages globally, powering applications across various sectors, including finance, healthcare, telecommunications, and education. Java’s strength lies in its mature ecosystem, robust performance, and scalability.
The new six-month release cycle initiated by Oracle has brought excitement back into the Java world, with new features being added frequently, keeping the language modern and in line with developer needs. Java 17, as an LTS version, is a stable platform for enterprises looking for reliable updates and support over the long term.
Looking forward, Java’s evolution focuses on improving developer productivity, adding more concise language features, and optimizing performance. Java's adaptability and continuous evolution ensure its place as a leading language for both new projects and legacy systems.
Conclusion
Java’s journey from a language for set-top boxes to becoming a foundational tool in enterprise computing, Android applications, and beyond is nothing short of remarkable. Its creation was driven by a need for portability, reliability, and ease of use. Over nearly three decades, Java has evolved to remain relevant, keeping pace with technological advancements while preserving its core values of reliability and platform independence.
The language’s robust community, open-source development model, and wide adoption in critical applications guarantee that Java will remain a force in software development for many years to come. It has not only withstood the test of time but continues to thrive in a constantly changing technology landscape—an enduring testament to the vision of its creators and the collective effort of its global community.
2 notes
·
View notes
Text
quite pleased with this project. it started with asking us to be able to switch between two images so i had the sun and moon images on the ocean horizon. but then the project required to use an ArrayList of images to have a longer cycle. so a little endless loop of boating and bedding.
3 notes
·
View notes
Text
Does anyone else have dreams about coding? Like I figure out my real world coding problems in my sleep, it's weird.
#codeblr#cosmickittytalk#dreams#learning programming#programming humor#csharp programming#programming#java#java programming#csharp#csharp is superior#python#python programming#sleep#coding
110 notes
·
View notes
Text
11/100 days of code.
1.19.24
today im starting on my java learning journey, with the book Introduction to Java: Programming and Data Structures 12th Edition by Y. Daniel Liang. before jumping in, i cant help but be very excited to learn java for the explicit purpose of coding minecraft mods, as that sounds like a super fun project and usage of this language for me :P ultimately game dev is why im learning c++, so having a game dev equivalent usage for java will help me retain it in the long term, as i already have interest in that application. i intend on eventually learning pygame to retain and stretch my python knowledge for the same purpose, though i dont have something specific like minecraft modding to work towards, so we'll see.
in the introductory section, im also learning that android phones are developed in Java, making it promising to be able to make android compatible (which is the phone i use) mobile software without much hassle, which is super cool. i also learned that java, like c++, is a compiled language, uses classes (namespaces in c++), has the same commenting system, same use of ; to end statements, and more. while there are a vast amount of differences, finding these similarities is both cool and helpful for retention!
public class Welcome {
......public static void main(String[] args) {
..........System.out.println("Welcome to Java!");
.....}
}
#codeblr#progblr#programming#coding#100 days of code#learn to code#kingsoriginal#kingscode#java#java programming
4 notes
·
View notes
Link
Found a photo of a cartoon I did on my whiteboard. I liked it, now you ;)
8 notes
·
View notes
Note
why are you using replit for java instead of intellij or vscode?
Hi! I was having trouble getting JavaFX to work with VSCode or Eclipse which are the IDE’s my group was considering. The JavaFX library has to be downloaded separately. I was waiting to hear back from my old Java professor asking for help, but I think the email slipped through the cracks.
Anyway I was using replit in the meantime but after my project was nearly nuked by their shit website I decided to try again. I ended up finally getting it to work on Eclipse though :) it has good java integration
#im never using replit agaib#but i do miss my pink custom theme#i think im gonna try to figure out how to make one for eclipse tho#🍒🌹 rambles#comp sci#computer science#programming#coding#java#java programming
5 notes
·
View notes
Text
Virtual Threads and Structured Concurrency in Java
So I was curious about virtual threads and the structured concurrency API that is being introduced to Java so I did some research and wrote some things about it on my Dev.to blog. Check it out!
#java#development#web development#webdev#coding#programming#java programming#structured concurrency#concurrency#codeblr
2 notes
·
View notes