| [+] Programming Diversions » AOC 2025 day 1 (Go to) | | Tim Cooke |
Alas Piet I'm about 20 years away from that glorious day Yes our mystery friend is whooping out butts so far. Early days though, early days. |
| [+] Programming Diversions » AOC 2025 day 1 (Go to) | | Tim Cooke |
I haven't done it yet but seems straight forward. Will report back later. Very inconveniently I have a days work ahead of me. |
| [+] Programming Diversions » Advent of Code 2025 (Go to) | | Tim Cooke |
Just under 8 hours to go! I'm away to bed for a good sleep before it begins. See you tomorrow  |
| [+] Design » Need an advice on AWS networking (Go to) | | Tim Cooke |
Also, managed NATs are wild expensive so not to be thrown in willy nilly. |
| [+] Design » Need an advice on AWS networking (Go to) | | Tim Cooke |
I haven't used EMR, but I have used Security Groups. I'd be leaning towards option 1 of your two choices, which is to specify your own SG with the rules you need, essentially defining your firewall which seems to make sense in this instance. You'll have to do some experimenting to discover any cascading, or not, behaviour of multiple SGs. If you define your own you might not even get the default one which might only be applied in the absence of any user defined. You might go through a few iterations of IP:Port requirements discovery, but that's the price of following the righteous path of least privilege. |
| [+] Programming Diversions » Advent of Code 2025 (Go to) | | Tim Cooke |
| |
| [+] Programming Diversions » Advent of Code 2025 (Go to) | | Tim Cooke |
That is the saying Piet, but this isn't that kind of party Anybody reading this topic is welcome to join our leaderboard, whether you're a long standing CodeRanch member or have arrived here for the first time today and everybody in-between. It's just a bit of fun, so give it a whirl! |
| [+] C# and .NET » Does VS Code actually create the GUI/ (Go to) | | Campbell Ritchie |
I believe VS Code is a very different beast to the VS of old. VS Code is just a code editor and has none of the visual GUI creation stuff you're probably thinking of Campbell. Although there are many plugins for VS Code so who knows, perhaps you can do GUI editing too. I don't know. |
| [+] Swing / AWT / SWT » Removing Listener: "variable mouseListener might not have been initialized" (Go to) | | Campbell Ritchie |
On the implementation of the FreezableMouseListener, you got some solid advice in your other topic a few days ago that should put you in the right direction with it. |
| [+] Swing / AWT / SWT » Removing Listener: "variable mouseListener might not have been initialized" (Go to) | | Campbell Ritchie |
Ah well in that case your intended design cannot be brought into reality. Instead you could implement a "freezable mouse listener" or something similar, where the listener code checks whether it's in a freeze or not and responds accordingly. Declaring and assigning the final variable at the same time will resolve your problems related to variable assignment. E.g: |
| [+] Jobs Discussion » What good will a cert. exam do me (Go to) | | Liutauras Vilda |
If you want to practice your programming skills in a zero risk, and hopefully fun, environment then why don't you join us CodeRanchers having a go at Advent of Code. You can even put it on your CV, or at least bring it up in conversation at interview. I'm really serious, this kind of stuff is gold for something technical to talk about with future employers. Hope over to the Advent of Code intro topic to get started. Hopefully you can join us. |
| [+] Java in General » Programming (Go to) | | Tim Cooke |
If you want to practice your programming skills in a zero risk, and hopefully fun, environment then please do join us for our annual go at the Advent of Code. We have a CodeRanch leaderboard that you are welcome to join. Head over to the Intro to Advent of Code topic to get started. Hopefully see you there. |
| [+] Swing / AWT / SWT » Removing Listener: "variable mouseListener might not have been initialized" (Go to) | | Campbell Ritchie |
If you need to reassign different objects to a variable then it cannot be final. By declaring your variable as final you are telling the compiler that once it has been assigned an object then you have no intention of ever changing your mind and you want the compiler to forbid it. In your case here the final keyword behaviour is in opposition to your intended design so you'll want to remove it. |
| [+] Programming Diversions » Advent of Code 2025 (Go to) | | Tim Cooke |
We have a few folks on the leaderboard now which is awesome!! Any more? Campbell? Carey? Junilu? Stephan? |
| [+] Programming Diversions » Tim C? (Go to) | | Tim Cooke |
| |
| [+] Programming Diversions » Advent of Code 2025 (Go to) | | Tim Cooke |
Just a few days to go. Please do join the CodeRanch leaderboard, it's rather lonely in here just now and it'd be great to see a few folks having a go. Don't be scared, we don't bite. |
| [+] Spring » Creating DTOs in Spring Boot (Go to) | | H Qam |
It's hard to give a useful minimum and maximum as it'll be different for different people, even different people implementing the same system. A DTO represents the data content of some database operation, right? So if you are creating a new student you'll probably have an object that represents the student table, and you can reuse that object for reading a student. Some objects will map to a single table, but others may represent more than one table. It's up to you how you do it. I don't get into JPA work too often these days so perhaps others can bring fresher guidance than I. |
| [+] Spring » Creating DTOs in Spring Boot (Go to) | | H Qam |
Can you clarify what you mean by entity? Your DTO is transferring what data from where to where? |
| [+] Java in General » Programming (Go to) | | Tim Cooke |
Hello, Welcome to Software Engineering!! I'm sort of joking, but this sounds quite a lot like my experience still after doing this for a job for nearly 20 years. There are very few things that I do that are truly unsolved problems so the natural and very valid approach is to seek out somebody else's solution and use it. It's of no value being the hero and solving something yourself when you don't need to, in fact your employer will probably be quite unhappy with you for it. On AI, I have a relationship with it based on caution and scepticism. It presents solutions that look good superficially but rarely are good and often require considerable rework, sometimes more rework that I'd have expended just doing it myself from the start. In summary: Don't be disheartened by how you feel, many people feel that way myself included. Embrace the uncertainty and do it anyway. |
| [+] Object Relational Mapping » How to validate the syntax of a SQL query without executing it using JDBC? (Go to) | | Tim Cooke |
Hello Jaime, welcome to the Ranch!! You're absolutely right to revive this topic even after sitting dormant for 12 years, and it just goes to show that some problems don't really go away. As it happens I have very recently come across a tool called SQLFluff which can check for a range of syntax errors without needing an actual database. That's not to say your SQL is guaranteed to be without problems, and Chris's advice still holds that you will need to run your query on your target database at some point, but tools such as this one will likely help you avoid the silly mistakes. As someone who needs to write SQL about once every 18 months or so, and approaches it as if I've never seen it before, I have found it to be a very useful addition to my toolkit. |
| [+] Programming Diversions » Advent of Code 2025 (Go to) | | Tim Cooke |
Oooooh boy, the excitement the excitement!!! It's fast approaching December which means just one thing to folks like us..... Advent of Code! Following the hint from Liutauras (I knew right away exactly what he meant  ) I've been preparing myself mentally for the joy that is AoC. If you don't know what I'm talking about then here's an introductory snip from the site AoC wrote:Advent of Code is an Advent calendar of small programming puzzles for a variety of skill levels that can be solved in any programming language you like. ... You don't need a computer science background to participate - just a little programming knowledge and some problem solving skills will get you pretty far. Nor do you need a fancy computer; every problem has a solution that completes in at most 15 seconds on ten-year-old hardware. This year things are a little different, instead of the usual 25 days of puzzles now there are 12. Starting as usual on the 1st December but finishing mid-December instead of the usual Christmas Day. I fully appreciate why they've done this since the effort required to put this together every year is enormous, and honestly I'm not at all unhappy about it since typically I bail out around day 15 anyway so this year I have a fighting chance of completing the whole challenge! Hurrah!! Just like in previous years I have donated my personal leaderboard for CodeRanch members to have some harmless and entertaining competition. I am going to clear out the existing member list and invite you to add yourself using the following join code: 60807-8b593144 So, if you fancy joining in with your fellow CodeRanch members with a bit of coding fun for a couple of weeks, please join our leaderboard (join code above) and pop by the Programming Diversions forum to see how everyone else is getting on. We have one rule, and one request: Rule: Be Nice. Request: If you're posting solutions (and we encourage shameless boasting) please include the word "Spoiler" in the title so folks can avoid it if they haven't solved it themselves yet. Happy coding!! |
| [+] Programming Diversions » Tim C? (Go to) | | Tim Cooke |
I hadn't noticed the duration change, but have just read up on it. I say that's totally fair enough, as hobbies goes AoC is a big one and I can accept that he spends enormous amounts of time on it. Which reminds me, I must throw a few dollars in for his efforts. On the plus side, I might actually make it to the end this time!! |
| [+] Programming Diversions » Tim C? (Go to) | | Tim Cooke |
| |
| [+] Meaningless Drivel » How AI fails at human mimicry. (Go to) | | Tim Holloway |
Ok let's give that a go \\\ Not quite. That's AltGr+--- on my Ubuntu machine. |
| [+] Meaningless Drivel » How AI fails at human mimicry. (Go to) | | Tim Holloway |
Forget all your technical and language analysis when trying to determine whether something has been written by an AI or a human. My question to you is: Does any human actually know how to type an Em Dash? I certainly don't. |
| [+] Meaningless Drivel » Ctrl Alt Deleaf (Go to) | | Tim Cooke |
Campbell Ritchie wrote:Everybody in Britain will understand the phrase, “wrong sort of leaves.” Yes indeed. |
| [+] Beginning Java » Debugging Java Programms ? (Go to) | | John Tommy |
Hi John, On a code level I would recommend a unit testing tool such as jUnit to write automated tests that make assertions on the functionality of your "units" (you define what a unit is. It could be a method, a class, or a collection of classes that represent some unit of function in your system) But it sounds like you have some kind of system resource over-consumption problem that take an hour or so to completely overwhelm your operating system. For that I would recommend a JVM profiling tool such as VisualVM to monitor CPU and memory usage. If you have a memory leak, for instance, that tool will show you what data constructs in your system are using all the memory. For example a list of something that grows forever. I've gotten good results with VisualVM so it's worth a look. You can also configure your JVM to emit a heap dump on Out Of Memory with a command option Then use VisualVM to inspect the heap dump. The heap is basically the memory storage so you can use the heap dump to see what has consumed it all to the point of failure. Good luck! |
| [+] Meaningless Drivel » I turned my coderanch t-shirt into art (Go to) | | Tim Cooke |
I just looked up NFT Wikipedia wrote:A non-fungible token (NFT) is a unique digital identifier that is recorded on a blockchain..... There were more words but all I could hear in my mind was static. I may have to read it again multiple times before I get signal. |
| [+] Books » Which method helps you learn more: Books or courses (Go to) | | Tim Holloway |
It depends. Books are my preferred resource for most things with the exception of technologies that change often or have a very narrow application, such as tooling or libraries, for which I rely on online documentation. Different people learn differently, and I've observed that many younger folks will favour a youtube video series over a book which is the opposite to my preference. I suspect it's a generational thing and they've grown up with online video being everywhere, in contrast to myself where youtube and the like didn't exist until I was in my mid 20s so books were how knowledge was obtained for me. I have just continued that pattern because it works for me. I also have more confidence in the content presented in books over online video because books are put through a pretty rigorous review process prior to publication, in contrast to a youtube video for which there is none. Literally anyone can make a video of unsubstantiated content and publish it. It's much harder to filter for truth and accuracy. I have benefited from in-person taught courses when they have been provided by my employer, but in general they are too expensive for me to take on my own dollar. Books are a bargain, you get hours and hours and days of learning from something that typically costs less than fifty bucks. And you get to keep it forever! |
| [+] Ranch Office » The future of programming forums (Go to) | | Tim Cooke |
Hi Dani, I'm glad to hear you're having a little more success over there at DaniWeb. Keep fighting the good fight. I have a notion in my mind that sometime in the near(ish) future people will remember the immense value of asking actual humans for help instead of mimics of human interaction. Should that time come then the discussion forum will rule once more.... |
| [+] Programmer Certification (OCPJP) » * Winners: OCP Java 21 Certification Exam Refresher: Study Notes for 1Z0-830 (Go to) | | kavin savvy |
First, a big thanks to Hanumant Deshmukh for being here to promote the book OCP Java 21 Certification Exam Refresher: Study Notes for 1Z0-830. The winners are: Anthony EspositoCarl McGeeOscar MojoliPeter Stampede Please send your snail mail address to bookpromotion AT javaranch DOT com. To ensure the quickest response, please provide the following: Your name (first and last - if your CodeRanch name is different, please include both your real name and Ranch name) Email Country (needed even if requesting an e-book) Address Phone Number Also, please include the following as the subject of your Email. Book Promo Winner - OCP Java 21 Certification Exam Refresher: Study Notes for 1Z0-830 - Tuesday, September 30th, 2025 Image from https://m.media-amazon.com As noted in the Book Promotion Eligibility Requirements and Legal type stuff, the winners have 8 days to submit their information. Within 3 days of receipt of your email, we will reply to let you know we got it. If you don't hear back, the goat might have eaten your email. Please let us know by posting in the Ranch Office so we can check on it. Once you have received your copy please let us know by editing the Book Promotions Winners Page and updating the 'Status' column to say you have it. Thanks and congrats to all the winners. |
| [+] Programmer Certification (OCPJP) » * Welcome Hanumant Deshmukh (Go to) | | Turab Eybaliyev |
A reminder to folks who would like to participate in this promotion Posts in this welcome thread are not eligible for the drawing, and should be reserved for welcoming the author. Questions posted in this topic are subject to removal. To ask a question, go to the OCP forum and start a new topic then ask your question there. Good luck! |
| [+] Programmer Certification (OCPJP) » * Welcome Hanumant Deshmukh (Go to) | | Turab Eybaliyev |
This week, we're delighted to have Hanumant Deshmukh helping to answer questions about the new book OCP Java 21 Certification Exam Refresher: Study Notes for 1Z0-830. The promotion starts Tuesday, September 30th, 2025 and will end on Friday, October 3rd, 2025 We'll be selecting four random posters in this forum to win a free copy of the book provided by the publisher, Enthuware. Image from https://m.media-amazon.com Please see the Book Promotion page to ensure your best chances at winning! Posts in this welcome thread are not eligible for the drawing, and should be reserved for welcoming the author. Questions posted in this topic are subject to removal. |
| [+] Jobs Discussion » * Winners: Effective Public Speaking: How to Use Content Marketing with Stories to Show Your Value (Go to) | | Randy Tong |
First, a big thanks to Johanna Rothman for being here to promote the book Effective Public Speaking: How to Use Content Marketing with Stories to Show Your Value. The winners are: Randy TongMatthew NelsonJacqui ReadCarl McGee Please send your snail mail address to bookpromotion AT javaranch DOT com. To ensure the quickest response, please provide the following: Your name (first and last - if your CodeRanch name is different, please include both your real name and Ranch name) Email Country (needed even if requesting an e-book) Address Phone Number Also, please include the following as the subject of your Email. Book Promo Winner - Effective Public Speaking: How to Use Content Marketing with Stories to Show Your Value - Tuesday, September 16th, 2025 Image from https://d2sofvawe08yqg.cloudfront.net As noted in the Book Promotion Eligibility Requirements and Legal type stuff, the winners have 8 days to submit their information. Within 3 days of receipt of your email, we will reply to let you know we got it. If you don't hear back, the goat might have eaten your email. Please let us know by posting in the Ranch Office so we can check on it. Once you have received your copy please let us know by editing the Book Promotions Winners Page and updating the 'Status' column to say you have it. Thanks and congrats to all the winners. |
| [+] Jobs Discussion » * Welcome Johanna Rothman (Go to) | | Johanna Rothman |
| |
| [+] Java in General » Maven or Gradle (Go to) | | Lou Hamers |
Efficiency can be measured in many ways. I have a lot more experience using Maven than Gradle so the greater familiarity with Maven makes me more efficient when using it. When I do use Gradle it's a process of trial and error followed by an admission of defeat and some documentation reading. On a technical consideration, I might reach for Gradle over Maven if I wanted to manage a project that comprised of modules written in different programming languages. Otherwise, they pretty much serve the same purpose so go with the one you and/or your team are more familiar with. Since you're choosing your build tool which is an "architecturally significant" decision it would be worth recording it in an Architecture Decision Record so you and your successors know why you chose it. |
| [+] Beginning Java » Navigating a new project (Go to) | | Tim Cooke |
I assume you are talking about joining an existing software project? If so, I'll repeat the same advice I gave in another topic: ----------------------- When joining a new team I take the following approach to learning the software. 1. Get the software running in your development environment. Ideally this is your local computer but could be a Sandbox account in your cloud compute provider (AWS, Azure, etc). You will learn about the technology it uses, the programming language(s), the build system, the dependency manager and dependencies, the host environment, and whatever other quirks are required to make the thing work. 2. Read the tests to try and get an idea of which parts of the system are responsible for what. Optimistically, there will be tests that exercise requirements so by reading the tests you may learn about the requirements of the system and how the code satisfies those requirements. End to end tests are really useful here as they describe high level requirements of the system as a whole. You can even use the debugger to step through one of these tests to follow the execution flow, it's slow going and tedious but possible. 3. Identify the system workflows and have someone show you how the system serves that workflow. What are the entry points, the exit points, follow the data, where is data moved and why, where is data transformed and why. During this journey do your best to write down everything you learn so that you produce the documentation you wish you had when you started. It'll help the next person joining your team. |
| [+] Java in General » Unreachable Code (Go to) | | Campbell Ritchie |
Hello, and welcome to the Ranch! Do you think the Java compiler considers unreachable code an error? |
| [+] Spring » Spring Boot - specify concrete class in configuration properties. (Go to) | | John Farrel |
Kinda sounds like you're trying to solve a programming problem with a build management tool. Alternatively could you inject the right kind of "items" into your class based on some kind of configuration like an environment variable? |
| [+] Meaningless Drivel » I turned my coderanch t-shirt into art (Go to) | | Tim Cooke |
Randy Tong wrote:does CodeRanch sell their own merchandise? Not currently as I understand it. I guess Paul ran a bunch of merch in the past but I don't know what he's got left or whether he's selling any of it. |