BlueJ – A Lightweight Java IDE
bluej.org
bluej.org
I'd argue the fact an IDE like BlueJ is needed suggests Java isn't an appropriate language for beginners though. And it seems in recent years schools have been preferring Python as a first language which I think is far more appropriate. My teacher used to argue Java is good for beginners because it's a strict OOP language and teaches good habits, but I question how true that is. For one, it falsely assumes OOP is a good approach for an application that asks you to enter your name then prints, "Hello [name]".
I always figured the tool was deliberately chosen because it gave just enough support to the learner (syntax highlighting and class diagrams) but didn't offer any other safety nets or convenience. Kind of just one step away from programming in notepad.exe :)
That's correct! Michael Kölling, one of the original authors, was a lecturer who wrote it originally. All of OOP classes were taught with BlueJ, but we were allowed to other editors, though not many did.
> it falsely assumes OOP is a good approach
I'd say the bigger unspoken assumption there is that Java is good at OOP!
i.e your not really dealing with objects all the time like in smalltalk but just "blueprints" that are a far shadow of what things should be (if i remember the claim correctly)
Alan Kay himself said he regrets coining the term as "object" oriented, and wishes he had emphasized "messages":
Not everything is an object, as someone said, there are also primitives.
There are many other "things" in Java that are not objects (operators, statements, etc.).
Kotlin does set some of this straight. Everything inherits (indirectly) from the Any class. And primitives do not exist in Kotlin (as in Ruby or Smalltalk).
I weep for the world of programming.
https://chrisdone.com/posts/dijkstra-haskell-java/
But for going to Java from Haskell :)
Most Internet discussion forums are absolutely insufferable, because the population is disproportionately students who haven't gotten past that stage yet. Or junior professionals who find that their jobs are more messy and boring than they expected, and want to spend their hobby time dabbling in one-person side projects that never get past that stage.
Among this audience, in that space, sure... static type checks are "cumbersome", testability is "overkill", refactoring never happens, etc etc etc.
JetBrains is trying to change this using Kotlin
It also has some features you need in school, like a structogram editor, UML diagrams and so fort.
Why wouldn't a teacher start off teaching the basics of programming with Python and then move to OOP with Python which wupports an OOP style? It may be a little frowned upon, but I mix up my styles depending on what's called for all the time. It's great and feels so naughty coming from someone who started out learning Basic then Java as my first "serious" language =)
My school has gone back and forth with starting with Python or Java in the Pre-AP course. There are pros and cons for both options, but ultimately a language is just a language. The concepts are what is really being taught.
The difference between a math variable and a computer variable and how "x = x + 1" works can be difficult for some students to wrap their minds around. Getting students comfortable/competent with a language and then switching it mid year would be a tough ask for quite a few students.
Keep in mind, many of the students taking Computer Science in high school are not exactly the same students that would have taught themselves to program at 15 and 16. Self-taught students are easy to teach (although they provide their own challenges), but you have to approach things much differently (and often slowly) for students that don't already "think like a programmer".
In BASIC you can say "LET X = X + 1" which really helped me grasp the assignment operator when I was starting out.
We used BlueJ in my comp sci intro courses, but I had already taught myself BASIC in high school using QBASIC and making extensive use of the built-in documentation. It was helpful to have some programming experience coming into it. I had to unlearn a lot of outdated or unfashionable practices, though. If I had learned how to use subroutines instead of relying on GOTO that probably would've helped understand methods a little better.
All the bells and whistles of more "mature" IDEs can make the whole thing more daunting for a newbie.
When I taught AP Comp Sci and was doing Java, we used BlueJ in class.
From my perspective its very confusing for beginners to switch to a proper IDE after using this. And I will not mind the argument that "proper" IDE are overwhelming. If you are new to programming most likely everything, including BlueJ, is overwhelming. And with a good teacher and a good introduction I don't think its too much for beginners to use something like IntelliJ.
Just use the "correct" tools right away.
//edit: The IDE might improved a lot since the last time I used it. Didn't wanted to talk bad on BlueJ itself.
Obviously after a couple of months, it's quite limiting – you don't want to write any proper programs in it, but for educational purposes and classes it's great.
Obviously not something to use as a professional, but as a learning tool it was unmatched.
A nice side effect is that I now sometimes try to race the highlighter/autocomplete. And just see how far I can come without it highlighting or completing. Because I can type pretty quickly and know quite a lot by heart. But that's only because I used BlueJ and thus not relying on autocomplete all the time.
But it won't last forever, and what it does well - conveying often unintuitive OOP concepts - it does do well.
Your course conveners job its to teach the fundamentals, tooling is for you to shake out as you gain experience and scale up, and from their perspective - imagine trying to wrangle random IntelliJ/Eclipse issues with a cohort of 120+ students, for many whom this might be their first introduction to programming!
Scaling things back probably genuinely allows them to provide a better learning on ramp.
If you're learning to program for the first time, then i believe using a simpler tool is better, because there is less to learn all at once, and less that is hidden from you. I started programming in EditPad Lite, and that was absolutely what i needed until i started tackling larger projects, at which point it was worth spending the time to learn Eclipse.
This is a good point and IMO "format code on save" should be the default in most IDEs and editors - that way if you need a specific set of formatting rules you can configure them, but you won't end up with no formatting (or different people having different ways of writing code) by default.
I think that Go in Visual Studio Code did something like that by default, where you saved your changes and it also formatted everything. Annoying at first, but I came to appreciate the idea.
You can technically achieve the same with something like Git hooks but setting those up is error prone and can be annoying once people get too trigger happy (e.g. someone eventually putting running tests in Docker containers in there before you can commit your changes).
To me code formatting feels about the same as the tabs vs spaces "debate": if you're having it in the first place, you're possibly doing something wrong. Use tab key for indentation, have the IDE insert whatever is configured for the project/org, be it tabs or spaces (e.g. smart tabs), automate it away.
Coming back to BlueJ: I appreciate that beginners have to be taught to format their code properly sometime along the way, but not at the very beginning. If you have errors, warnings, linter hints, typos etc. all being highlighted, I imagine that must be confusing as hell for beginners. Better focus on fixing the syntax errors first (or learning how not to produce any in the first place). Also, over-eager linters such as ESLint can really suck all motivation out of you when writing code. As for automatic formatting, that's fine with languages where it's near-universal like Go, but for Java you should probably refrain from adding it to a tool such as BlueJ, otherwise you will get the opposite of what you wanted (people get used to the IDE doing it for them and then neglect proper formatting when the IDE doesn't).
There is a world of difference between tools for learning how to code and tools for producing code.
Something students don't always realize is that their teacher doesn't need 30 copies of a program that prints "Hello, World". You are not "producing code", you are "demonstrating your understanding" of the content.
Autocomplete, autoformatting, auto-anything is harmful for the learning process. If the computer does it for you, then how do I know you know how to do it?
Once you can demonstrate that you know how to format your code properly, then those auto-tools can help you, rather than being a crutch.
Once you know "I can solve this problem by using a substring" you can use autocomplete to figure out the exact syntax for the substr() method. But if you're just looking through the auto-complete method list and clicking on things until one of them works... that's not "knowing how to program".
The following year I got a different prof who used Eclipse and things started making sense.
It's probably super nice for beginners, because it removes a ton of friction. But why force people?
The next year I took my first "formal" programming class. Programming 1 at my highschool was based on visual basic.net. I had already learned how to make my own "debugger" using console out, but being able to add watches and breakpoints and actually see the internals of my program shift about as I stepped through it was awesome.
Despite having a proper IDE, my Programming 1 class spent all of 1 class period on how to use the debugger built into visual studio.
Having taken programming 2 in high school (java) then Liberty basic in freshman year in college and then back to c/c++ again in college I can say without a doubt programming classes massively undervalue debugging skills.
Once you get your first language under your belt the other languages come easier, as most of them are vastly similar. variables, limits, etc, how things are passed around and referenced change, but the basic function and control structures if then else switch case, for,do,etc are all roughly the same. - edit- at least higher-ish level languages,
I think programming curriculums should include an entire section on debugging. How to isolate specific issues, watches, off by one errors, byref/byval issues, top down order of operations issues, figuring out how a language handles a datatype mismatch etc.
BlueJ does have a number of concepts that can be useful in the beginning. The UML view of the classes is a nice way to connect something very abstract with the actual code. Scope highlighting is a great idea too - I tried teaching some people to code and scopes seem to be as difficult a concept as classes are. Having the IDE change based on some text you wrote is pretty good too - like seeing relationships form in the UML view, listing public members on classes and so on.
The only problem I see is helping people move on from BlueJ. Some people who struggled a lot learning the basic concepts may feel like they finally managed to find a setup that "works" for them that's mostly based on a task-based understanding:
"I click on the BlueJ icon on my desktop, I click here to create a new class, if something doesn't work I better delete everything and start again because I don't know where to go from there"
Other IDEs aren't necessarily better! What does it actually do under the hood? How do I create a program that I can run outside of the IDE, not to mention on another person's computer?
Maybe that's not the problem of an IDE, rather it's the teacher who needs to include that transition in their course. I remember how back in school/university that was hardly mentioned at all.
Drives me crazy. We should be starting them on python in repl.it. easy to get up an running. minimum amount of stuff you need to know to do something interesting.
Java as a first language pushed on new CS students has caused untold damage to the industry.
Sorry you're having such hard time :D. When I started first had programming classes we had a few months of a toy programming language called karel++ and then were given C++. Now the point wasn't really to learn C++ as you've pointed out, it's just a language (any language) to get comfortable with sequences of commands, basic logic, loops, etc.
I don't think any progressional language could be quite as good as a purposefully crafted toy/educational language, but I actually think Java is still close to the top. If it wasn't for the 'class Main { public static void main(String[] args) {}}' bit I think it'd be pretty great. For anything a new student needs it's reasonably identical to C or C++ without pointers and segfaults. NPEs are a godsend.
I think python is pretty okay for a first language, it has a lot going for it! Its simple to start. A repl is convenient to experiment. But imho it's probably worth introducing typed variables, braces for scope, a compile step that checks a few things for you pretty early. I think significant whitespace is fine but as with most things in python, the reduced structure makes it look simpler but alse the errors it'll cause are way more frustrating starting out. Way more than missing semicolons.
The only other consideration is JavaScript. But I don't have the imagination for a intro CS class without a terminal prompt assignment.
I had zero issues learning java in college. but I already had self taught myself python in highschool. all I had to learn was java syntax and OO while I watched others struggle needlessly. python would have been a far gentler introduction before ramping up
I'd argue that the true Dark Times™ were the days before Java. Forcing students to write Scheme or C as intro languages was far worse.
These days, I'd say something like Python to get the basic concepts down and then moving on to things like Rust or Go then Java, C++, or C# are probably better moves.
But hey, scheme is nice. No manual memory management, as simple as it comes syntax, very little to get started, excellent REPL, if it were in my power, I'd go back to college and have my first programming class in Scheme.
I'd argue that C-style syntax has largely (though not completely) won out. Python is a departure from this for sure, as well as various functional languages, but Scheme and other LISP languages are an order of magnitude more different. The basics like function definitions, not actually quoting both ends of strings in all cases, etc. It's just very different than basically the rest of the languages out there. This alone makes learning with Scheme to start not really better than what this thread is about -- complaints about the way BlueJ was pushed in university to have next to no real-world applicability. Yes, you can get jobs writing Scheme and you can write productive applications. However, you're going to be a step behind everyone else trying to figure out C or C++ for the first time and those syntax semantics matter a great deal when they're essentially reused in 80-90% of other languages out there.
Also, in the pre-Java days "excellent REPL" wasn't really common, so you're really comparing more modern versions and what we have today to the times before Java sort of became the de facto "intro to programming" language.
Sure, it has some pros but I think it was a mistake to make it the intro to CS language of choice, even over something like BASIC or Delphi. In my professional life the closest I've come to needing to write Scheme is in working with LDAP queries.
IMHO the best language to teach with now is Typescript. You get the explicit benefits of Java without the OOP mess.
I used it in school for making a game during my A-Levels for my scientific seminar (W-Seminar in german). While the concept is good, the editor is really not that good for anything bigger. You e.g. have no package support in Greenfoot (Or I was not able to find it), and e.g. if you restart a so called "scenario", the JVM does not get reset. Sure I did maybe go to the limits of Greenfoot with my game, but nevertheless it was really fun to work with
Ian Utting and David Barnes gave my first CS lecture.
I personally did not like BlueJ as an IDE, but I found that the module that was built around it at Kent and the speed at which you can test classes you have created in isolation were a great aid for teaching people basic OOP principles.
I sailed away from java world, which IDEs are being used now? IntelliJ, Netbeans, Eclipse?
I ended up using vscode and just copying the files into BlueJ before submitting my assignments.
There's something to be said for a very minimal "just get shit done" code editor. I think Thonny[1] falls perfectly in this line though in terms of useful features vs IDE-completeness. It has most of the quality of life improvements you're talking about here but is otherwise an advanced text editor with code highlighting.
I used to nearly exclusively write my code that way actually, using EditPlus and then later Notepad++, both with plugins for syntax and formatting. I found it to be surprisingly productive. Then again, I suspect there's a large overlap between people who are like me and will find it productive and those who like all those distraction-free writing applications out there.
> I ended up using vscode and just copying the files into BlueJ before submitting my assignments.
This I'm curious about. Why would you need to do this? Does BlueJ do something specific with the application that VSCode can't?
[1]: https://thonny.org/
Personally I struggled to get to grips with it. While I can appreciate it tries to visualize foundational OOP principles, for someone who already had some experience with various (mainly web programming languages), BlueJ felt too limiting but also broke my mental model of what I should be doing.
If I were to think of it more as an interactive debugger, then maybe I would have had more favourable memories of it. However, a few weeks later I switched to Netbeans and felt far less anxiety that I didn't belong in my course.
It has a nice REPL built in and installation is just running a single jar file.
It doesn't have any fancy autocomplete or any other features like that, just syntax highlighting.
Using an IDE from the beginning has resulted in many (maybe even most) of my peers not understanding what actually happens when they compile and run a program, just that they put some text in a box, then click the magic compile and run buttons and some text pops out of the magic output window. They have no concept of how to actually make a useful program or how to distribute said program and run it on someone else's computer. These are never taught, it's just assumed that you know how to do that (as well as be comfortable with *nix) by the time you get to 3000 and 4000 level classes.
That isn't even to mention how Java just isn't a great first programming language. Thankfully I believe they just chaged the introductory programming courses at my university to use Python—probably not using nano and the command line like I'd prefer, but IDLE is okay I guess.
A good IDE is what makes strongly typed languages far more powerful and productive than any dynamic language. It’s similar to a mechanic upgrading to power tools over hand tools, both will get the job done but one decreases effort.
I will respectfully disagree. If you give IntelliJ a try, I'm sure you'll agree with me. It has an option to use Eclipse keyboard shortcuts too
Simpler than intellij?
It is designed for educational purposes. So it shows some basic concept like "class", "object" and VM.
You can create an object from a class, and run some method from the object. Which is very useful when you are teaching something to beginners.
But for programmers, just use a professional IDE.
Its just an educational tool, nothing more, designed to give a soft on ramp into OOP and programming in general.
The title here is kinda misleading, since it's not really a practical IDE that anyone would ever want to use for actual coding.
"One of my favourite IDEs out there is BlueJ" — James Gosling, creator of Java.