Feed aggregator
KDE Is Getting a Native Virtual Machine Manager Called 'Karton'
Read more of this story at Slashdot.
KrebsOnSecurity Hit With Near-Record 6.3 Tbps DDoS
Read more of this story at Slashdot.
Spain Blocks More Than 65,000 Airbnb Holiday Rental Listings
Read more of this story at Slashdot.
Coinbase Data Breach Will 'Lead To People Dying,' TechCrunch Founder Says
Read more of this story at Slashdot.
Google Launches Veo 3, an AI Video Generator That Incorporates Audio
Read more of this story at Slashdot.
Google Is Rolling Out AI Mode To Everyone In the US
Read more of this story at Slashdot.
Chicago Sun-Times Prints Summer Reading List Full of Fake Books
Read more of this story at Slashdot.
Delta Can Sue CrowdStrike Over Global Outage That Caused 7,000 Canceled Flights
Read more of this story at Slashdot.
Google's Gemini 2.5 Models Gain "Deep Think" Reasoning
Read more of this story at Slashdot.
Google Brings AI-Powered Live Translation To Meet
Read more of this story at Slashdot.
Adobe Forces Creative Cloud Users Into Pricier AI-Focused Plan
Read more of this story at Slashdot.
Microsoft is Putting AI Actions Into the Windows File Explorer
Read more of this story at Slashdot.
America's College Towns Go From Boom To Bust
Read more of this story at Slashdot.
France Barred Telegram Founder Pavel Durov From Traveling To US
Read more of this story at Slashdot.
Intel Explores Sale of Networking and Edge Unit
Read more of this story at Slashdot.
The Quiet Collapse of Surveys: Fewer Humans (and More AI Agents) Are Answering Survey Questions
Read more of this story at Slashdot.
Tech Job Market Is Shrinking as AI Reshapes Industry Requirements
Read more of this story at Slashdot.
Klarna's Losses Widen After More Consumers Fail To Repay Loans
Read more of this story at Slashdot.
SAG-AFTRA Calls Out Fortnite Over Darth Vader AI Voice
Read more of this story at Slashdot.
Representative Line: What the FFFFFFFF
Combining Java with lower-level bit manipulations is asking for trouble- not because the language is inadequate to the task, but because so many of the developers who work in Java are so used to working at a high level they might not quite "get" what they need to do.
Victor inherited one such project, which used bitmasks and bitwise operations a great deal, based on the network protocol it implemented. Here's how the developers responsible created their bitmasks:
private static long FFFFFFFF = Long.parseLong("FFFFFFFF", 16);So, the first thing that's important to note, is that Java does support hex literals, so 0xFFFFFFFF is a perfectly valid literal. So we don't need to create a string and parse it. But we also don't need to make a constant simply named FFFFFFFF, which is just the old twenty = 20 constant pattern: technically you've made a constant but you haven't actually made the magic number go away.
Of course, this also isn't actually a constant, so it's entirely possible that FFFFFFFF could hold a value which isn't 0xFFFFFFFF.
[Advertisement] Picking up NuGet is easy. Getting good at it takes time. Download our guide to learn the best practice of NuGet for the Enterprise.