The Silliest Line of Java Code Ever Written

Tales from the jar side December 28, 2024
Video Thumbnail
Tales from the jar side Logo

Tales from the jar side

@talesfromthejarside

About

I'm Ken Kousen. I have entirely too much academic training (two BS degrees from MIT, an MA and a Ph.D. from Princeton, and an MS from RPI), I'm the author of six technical books about Java, Groovy, Kotlin, Android, Gradle, and Mockito, I've given talks at conferences all over the world, and I have 25+ years of experience in Java and related topics. Let me help you understand what's important in the IT world and what isn't. "Tales from the jar side" is a pun on (1) The Far Side cartoons by Gary Larson, and (2) how Java applications are delivered as "jar" (Java archive) files. It's about my continuing Java journey. Lame, sure, but I'm committed to it now. By the way, my last name is pronounced "cousin", like the relative, even though it doesn't look like that. Thanks for visiting!

Video Description

The Silliest Line of Java Code Ever Written In this episode of 'Tales from the Jar Side', we explore what could be the silliest line of Java code ever created. Using Java's modern features like records and local variable type inference (LVTI), we construct a bewilderingly silly line of code. We'll dive into a project that whimsically utilizes 'var' as a package name, a record name, a property name, and even a variable name. Watch as we push the limits of silliness, and see how this whimsical approach impacts code readability and maintenance. Join us for a fun and educational journey through Java's quirkiest possibilities! 00:00 Introduction to the Silliest Java Code 00:39 Setting Up the Silly Java Project 00:58 Creating the Var Record 01:51 Writing the Silly Test Class 03:06 Enhancing the Silliness with Static Factory Method 05:10 Final Thoughts and Maximum Silliness 06:08 Conclusion

You May Also Like

Java Developer's Desk Must-Haves

AI-recommended products based on this video

Loading...
Hydrocolloid Bandages for Wound Care, Extra Large Medical-Grade Hydrocolloid Roll with Self-Adhesive, Ultra Absorbent, Flexible & Waterproof, DIY Size & Shape First Aid Kit Essential (2in*4.8ft)

Hydrocolloid Bandages for Wound Care, Extra Large Medical-Grade Hydrocolloid Roll with Self-Adhesive, Ultra Absorbent, Flexible & Waterproof, DIY Size & Shape First Aid Kit Essential (2in*4.8ft)

(126)
$8.99
FREE delivery Fri, Oct 3 on $35 of items shipped by Amazon
8K+ bought in past month
Loading...
Rain-X 600001 Windshield Repair Kit - Quick and Easy Durable Resin Based Windshield Repair Kit for Chips and Cracks, Good for Round Damage Below 1" in Diameter and Cracks Smaller Than 12" in Length
Best Seller

Rain-X 600001 Windshield Repair Kit - Quick and Easy Durable Resin Based Windshield Repair Kit for Chips and Cracks, Good for Round Damage Below 1" in Diameter and Cracks Smaller Than 12" in Length

(45,116)
$11.53$11.49
FREE delivery Sun, Sep 21 on $35 of items shipped by Amazon
20K+ bought in past month
Loading...
GOOACC - GRC-33 240PCS Bumper Retainer Clips Car Plastic Rivets Fasteners Push Retainer Kit Most Popular Sizes Auto Push Pin Rivets Set -Door Trim Panel Fender Clips for GM Ford Toyota Honda Chrysler
Best Seller

GOOACC - GRC-33 240PCS Bumper Retainer Clips Car Plastic Rivets Fasteners Push Retainer Kit Most Popular Sizes Auto Push Pin Rivets Set -Door Trim Panel Fender Clips for GM Ford Toyota Honda Chrysler

(76,396)
$10.92$10.37
FREE delivery Sun, Sep 21 on $35 of items shipped by Amazon
20K+ bought in past month
Loading...
ANKER 737 Power Bank, 24,000mAh 3-Port Laptop Portable Charger with 140W Fast Charging, Smart Display, for Outdoor Work, Compatible with iPhone 16/15/14 Series, Vision Pro, Samsung, MacBook, and More

ANKER 737 Power Bank, 24,000mAh 3-Port Laptop Portable Charger with 140W Fast Charging, Smart Display, for Outdoor Work, Compatible with iPhone 16/15/14 Series, Vision Pro, Samsung, MacBook, and More

(13,939)
109.99
FREE delivery Saturday, June 14
9K+ bought in past month
Loading...
Anker iPhone 16 Charger, 2-Pack 20W Fast USB C Charger Block, for iPhone 16/16 Pro Max/15 Series/iPad Pro and More (White, 2 Pack & 2 Cable)

Anker iPhone 16 Charger, 2-Pack 20W Fast USB C Charger Block, for iPhone 16/16 Pro Max/15 Series/iPad Pro and More (White, 2 Pack & 2 Cable)

(16,565)
13.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
10K+ bought in past month
Loading...
FIFINE Gaming USB Microphone for PC PS5, Condenser Mic with Quick Mute, RGB Indicator, Tripod Stand, Pop Filter, Shock Mount, Gain Control for Streaming Discord Twitch Podcasts Videos- AmpliGame Global Recycled Standard
Best Seller

FIFINE Gaming USB Microphone for PC PS5, Condenser Mic with Quick Mute, RGB Indicator, Tripod Stand, Pop Filter, Shock Mount, Gain Control for Streaming Discord Twitch Podcasts Videos- AmpliGame Global Recycled Standard

(12,876)
$27.90$26.48
FREE delivery Thu, Sep 4 on $35 of items shipped by Amazon
4K+ bought in past month
Loading...
Guitar Wall Mount 2 Pack, Black Walnut Wood Guitar Hanger, U-Shaped Guitar Wall Hanger Mount, Guitar Holder Hook Stand Wall for Acoustic, Electric Guitar, Banjo, Bass, for Guitar Player Men Boy
Best Seller

Guitar Wall Mount 2 Pack, Black Walnut Wood Guitar Hanger, U-Shaped Guitar Wall Hanger Mount, Guitar Holder Hook Stand Wall for Acoustic, Electric Guitar, Banjo, Bass, for Guitar Player Men Boy

(3,859)
$13.99
PrimeFREE delivery Thu, Sep 4 on $35 of items shipped by Amazon
8K+ bought in past month
Loading...
Lamicall Bike Phone Holder, Motorcycle Mount - Motorcycle Phone Holder, Handlebar Cell Phone Clamp, Scooter Phone Clip for iPhone Air 17 Pro Max, 16 15 Pro Max Plus, S20, More 4.7 to 6.8" Smartphones Global Recycled Standard
Best Seller

Lamicall Bike Phone Holder, Motorcycle Mount - Motorcycle Phone Holder, Handlebar Cell Phone Clamp, Scooter Phone Clip for iPhone Air 17 Pro Max, 16 15 Pro Max Plus, S20, More 4.7 to 6.8" Smartphones Global Recycled Standard

(61,683)
$15.99$15.83
FREE delivery Sun, Sep 21 on $35 of items shipped by Amazon
30K+ bought in past month
Loading...
Car Phone Holder for Magsafe [78+LBS Strongest Suction & 2400gf Magnetic] 360° Adjustable Car Phone Mount, Phone Holders for Your Car for iPhone 17 Pro Max 16 15 14 13 12 Air Plus (Carbon Fiber) Global Recycled Standard
Best Seller

Car Phone Holder for Magsafe [78+LBS Strongest Suction & 2400gf Magnetic] 360° Adjustable Car Phone Mount, Phone Holders for Your Car for iPhone 17 Pro Max 16 15 14 13 12 Air Plus (Carbon Fiber) Global Recycled Standard

(10,765)
$26.99$26.45
FREE delivery Fri, Oct 3 on $35 of items shipped by Amazon
10K+ bought in past month
Loading...
Eye Contact Web Camera for Desktop Computer – 1080P USB Camera with Microphone & Stand, Center Cam for Laptop or Desktop, Manual Focus, Plug & Play for macOS & Windows(Black)

Eye Contact Web Camera for Desktop Computer – 1080P USB Camera with Microphone & Stand, Center Cam for Laptop or Desktop, Manual Focus, Plug & Play for macOS & Windows(Black)

(96)
37.39
PrimeFREE delivery Saturday, June 14
100+ bought in past month
Loading...
ANCEL AD310 Classic Enhanced Universal OBD II Scanner Car Engine Fault Code Reader CAN Diagnostic Scan Tool, Read and Clear Error Codes for 1996 or Newer OBD2 Protocol Vehicle (Black) Global Recycled Standard
Best Seller

ANCEL AD310 Classic Enhanced Universal OBD II Scanner Car Engine Fault Code Reader CAN Diagnostic Scan Tool, Read and Clear Error Codes for 1996 or Newer OBD2 Protocol Vehicle (Black) Global Recycled Standard

(57,635)
$23.99
FREE delivery Sun, Sep 21 on $35 of items shipped by Amazon
20K+ bought in past month