li

Representative Line: One More Parameter, Bro

Matt needed to add a new field to a form. This simple task was made complicated by the method used to save changes back to the database. Let's see if you can spot what the challenge was:

public int saveQualif(String docClass, String transcomId, String cptyCod, String tradeId, String originalDealId, String codeEvent, String multiDeal,
            String foNumber, String codeInstrfamily, String terminationDate, String premiumAmount, String premiumCurrency, String notionalAmount,
            String codeCurrency, String notionalAmount2, String codeCurrency2, String fixedRate, String payout, String maType, String maDate,
            String isdaZoneCode, String tradeDate, String externalReference, String entityCode, String investigationFileReference,
            String investigationFileStartDate, String productType, String effectiveDate, String expiryDate, String paymentDate, String settInstrucTyp,
            String opDirection, String pdfPassword, String extlSysCod, String extlDeaId, String agrDt) throws TechnicalException, DfException

That's 36 parameters right there. This function, internally, creates a data access object which takes just as many parameters in its constructor, and then does a check: if a field is non-null, it updates that field in the database, otherwise it doesn't.

Of course, every single one of those parameters is stringly typed, which makes it super fun. Tracking premiumAmount and terminationDate as strings is certainly never going to lead to problems. I especially like the pdfPassword being stored, which is clearly just the low-security password meant to be used for encrypting a transaction statement or similar: "the last 4 digits of your SSN" or whatever. So I guess it's okay that it's being stored in the clear in the database, but also I still hate it. Do better!

In any case, this function was called twice. Once from the form that Matt was editing, where every parameter was filled in. The second time, it was called like this:

int nbUpdates = incoming.saveQualif(docClass, null, null, null, null, null, multiDeal, null,
                null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
                null, null, null, null, null, null, null, null, null, null, null, null);

As tempted as Matt was to fix this method and break it up into multiple calls or change the parameters to a set of classes or anything better, he was too concerned about breaking something and spending a lot of time on something which was meant to be a small, fast task. So like everyone who'd come before him, he just slapped in another parameter, tested it, and called it a day.

Refactoring is a problem for tomorrow's developer.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!




li

Representative Line: How is an Array like a Banana?

Some time ago, poor Keith found himself working on an antique Classic ASP codebase. Classic ASP uses VBScript, which is like VisualBasic 6.0, but worse in most ways. That's not to say that VBScript code is automatically bad, but the language certainly doesn't help you write clean code.

In any case, the previous developer needed to make an 8 element array to store some data. Traditionally, in VBScript, you might declare it like so:

Dim params(8)

That's the easy, obvious way a normal developer might do it.

Keith's co-worker did this instead:

Dim params : params = Split(",,,,,,,", ",")

Yes, this creates an array using the Split function on a string of only commas. 7, to be exact. Which, when split, creates 8 empty substrings.

We make fun of stringly typed data a lot here, but this is an entirely new level of stringly typed initialization.

We can only hope that this code has finally been retired, but given that it was still in use well past the end-of-life for Classic ASP, it may continue to lurk out there, waiting for another hapless developer to stumble into its grasp.

[Advertisement] Plan Your .NET 9 Migration with Confidence
Your journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!








li

What the US election will mean for AI, climate action and abortion

The upcoming US presidential election will determine how the country regulates tech, combats the climate crisis and decides on access to abortion




li

Amateur sleuth finds largest known prime number with 41 million digits

The largest prime number is now 16 million digits longer than the previous record found in 2018, thanks to an amateur hunter and his large collection of high-power graphics cards




li

Extremely rare Bronze Age wooden tool found in English trench

In a wetland on the south coast of England, archaeologists dug up one of the oldest and most complete wooden tools ever found in Britain, which is around 3500 years old




li

Battery-like device made from water and clay could be used on Mars

A new supercapacitor design that uses only water, clay and graphene could source material on Mars and be more sustainable and accessible than traditional batteries




li

NASA is developing a Mars helicopter that could land itself from orbit

The largest and most ambitious Martian drone yet could carry kilograms of scientific equipment over great distances and set itself down on the Red Planet unassisted




li

Weird microbes could help rewrite the origin of multicellular life

Single-celled organisms called archaea can become multicellular when compressed, highlighting the role of physical forces in evolution




li

The world is falling far short of its goal to halt biodiversity loss

In 2022, countries pledged to halt biodiversity loss by protecting 30 per cent of the planet by 2030, but progress has been too slow thus far




li

The Amazon is teetering on the edge of a climate tipping point

In some recent years, the Amazon biome released more carbon than it absorbed, and further degradation could make it a permanent shift




li

Oldest tadpole fossil known to science dates back 161 million years

A fossil of a tadpole from Argentina is 161 million years old - and isn't that different from some modern species




li

Data centres may soon burn as much extra gas as California uses daily

In support of their AI ambitions, tech companies are rapidly expanding US data centres, and this growth is on track to significantly increase US gas demand by 2030




li

Cloud-inspired material can bend light around corners

Light can be directed and steered around bends using a method similar to the way clouds scatter photons, which could lead to advances in medical imaging, cooling systems and even nuclear reactors




li

There may be a cosmic speed limit on how fast anything can grow

Alan Turing's theories about computation seem to have a startling consequence, placing hard limits on how fast or slow any physical process in the universe can grow




li

World's largest tree is also among the oldest living organisms

DNA analysis suggests Pando, a quaking aspen in Utah with thousands of stems connected by their roots, is between 16,000 and 81,000 years old




li

COP29: Clashes over cash are set to dominate the climate conference

The focus is on finance at the UN climate summit in Baku, Azerbaijan, this month, but countries are a long way from any kind of consensus




li

3D printing with light and sound could let us copy human organs

One day, doctors might be able to 3D print copies of your organs in order to test a variety of drugs, thanks to a new technique that uses light and sound for rapid printing




li

Dazzling images illuminate research on cardiovascular disease

The British Heart Foundation’s Reflections of Research competition showcases beautiful images captured by researchers studying heart and circulatory disease




li

Vampire bats run on a treadmill to reveal their strange metabolism

Experiments where vampire bats were made to run on a treadmill have revealed how they extract energy from protein in their latest blood meal




li

2024 is set to be the first year that breaches the 1.5°C warming limit

This year’s average global temperature is almost certain to exceed 1.5°C above pre-industrial times – a milestone that should spur urgent action, say climate scientists




li

More people are living with pain today than before covid emerged

Chronic pain has increased among adults in the US since 2019, which could be due to a rise in sedentary lifestyles or reduced access to healthcare amid covid-19 restrictions




li

Slick trick separates oil and water with 99.9 per cent purity

Oil and water can be separated efficiently by pumping the mixture through thin channels between two semipermeable membranes




li

Any delay in reaching net zero will influence climate for centuries

Reaching net-zero emissions is essential for halting climate change - but even after we achieve this goal, parts of the planet will continue to warm. Delaying net zero will worsen these effects




li

Lights on surfboards and wetsuits could deter shark attacks

Experiments show that illuminating the underside of a decoy seal reduces attacks by great white sharks, revealing a possible strategy to protect surfers and swimmers




li

Jets of liquid bounce off hot surfaces without ever touching them

Droplets of fluid have been known to hover above a hot surface, but a new experiment suggests the same can happen to tiny jets of liquid too




li

SpaceX targets Starship flight next week – just a month after last one

SpaceX is preparing for the sixth test flight of Starship, the world's most powerful rocket. Next week's launch – if successful – will be the fastest turnaround yet




li

Google Street View helps map how 600,000 trees grow down to the limb

AI and Google Street View have created 'digital twins' of living trees in North American cities – part of a huge simulation that could help make urban tree planting and trimming decisions




li

Migratory birds can use Earth's magnetic field like a GPS

Eurasian reed warblers don’t just get a sense of direction from Earth’s magnetic field – they can also calculate their coordinates on a mental map




li

24 Funniest Feline Posts for Meme-Loving Cat Pawrents to Meow Caturday Cheer Throughout the Holiday Season

Hey, I Can Has-ers. Now that Meowlloween is over, it's officially time for us to start prepping for the meowlidays. Every Caturday is a holiday for us, and the fact that we get to have tasty meals and days off from work on other holidays is just an added bonus. Heck, even Christmas could use some Caturday energy. How should we do that, you ask? Well, by adding cat memes to our meowlidays and enjoying the best of both worlds while remaining chonky, cheery, and pawsitively ameowzing.

These funny feline posts are for meme-loving cat pawrents, and meme-loving cat pawrents only! If you're not one of these, you can just close the screen. Be gone!

Okay, now that it's just us, let's scroll through these hisstercal kitties in the form of digital delights. Are you in your jammies? Are you purrfectly snuggled under a blankie? Are you ready to meow Caturday cheer for the next two months? Good. Now let's get to work! And by work, we mean giggling. It's a tough job, but somebody's got to do it! 




li

21 Terrific Tweets by Cat Pawrents Benefitting From the Bond With Their Fluffy Feline Friend

Hello all you cat pawrents, how are you doing this Caturday? Do you want to tell us about your cat child? Do you wish you could chit-chat about your fluffy feline friend all day long? Do you think any other humble hooman would want to hear about your kitty cat? If you answered "Yes" to the first two questions - know that you are very much not alone. A lot, and we mean a lot of cat pawrents just wait for an opportunity to talk about their beloved cat children. And if you've wondered about the answer to the third question - it's always a loud, resounding, meowing "Yes". There will always be cat pawrents who want to hear everything about other pawrents' cats, because cats are ameowzing.

Some cat pawrents do it all the time - they tweet a lot about their lovely cats like the true feline fanatic fans they are - and it's a delight for every one of us to read about their experiences and adventures. Here are a few of the funniest, for your cat-filled viewing pleasure.




li

24 Blissfully Blepping Brainless Cat Memes Never Thinking, There's Nothing There, Not Even One Thought

Have you ever looked at a cat blepping? It might not happen often, but when it does it's hard to miss - because the cat gets stuck. The blep position is a brain draining cat position that makes the cat forget its tongue out… and everything else. They just forget. What is looking around at the world? They don't know, they forget, they will stare into the vast horizons of space with not one single thought going through their mind. Do they even have a mind to have thoughts in? No, they do not. Cats blepping have no thoughts in the tiny space between their ears.

Cat memes of blepping brain drain are very common - a lot of cat pawrents and feline fanatic fans love them. We gathered some and lost around 60 IQ points in the process, but they're so funny. Scroll down at your own risk. You can show your cat and you'll blep together while watching these cat memes.




li

Celebrate Caturday in Style with 26 Moments from the Magical Life of Panko the Chonky Cat Child and All Her Hilarious Feline Friends

Spending Cautrday with a cat, let alone a clouder of cats is a truly special experience. There is almost a slight sense of religion to it in how regimented and celebratory the day is. There are specific feeding times for different kinds of treats, each one representing a different feline quality that we love and cherish. There are specific zoomie times that must be observed and much to our dismay there are the clawminal times that must be observed and not interfered with. So if you are spending your Caturday with cats, or simply want to see what it would be like we made this list to help you celebrate Caturday in style with marvelous moments from the magical life of Panko the chonky cat and all her hilarious feline friends.

From the cute kitten whose favorite part of Caturday is the fish smoothie feeding, to the clawminal catto who is all about the chaos of Caturday, to the flabbergasted feline who cannot believe that treat time is over and that he missed it due to indulging in too many zoomies.




li

25 Pawsitive Energy Meowtivation Memes of Fierce Felines for Fending off Fall Fatigue

Unfortunately, life offers a myriad of buzzkillers throughout the day. Sometimes they pounce on you with some alarming news, but most of the time they creep in, luring you to slouch on the couch like snoozy sirens, and you can't find the will to fight back. 

It can be the cold weather, a grouchy boss, or even current events - negative thoughts and low energy tend to spread like a bad odor.  
 

Well, that's just not going to happen, fellow I Can Has-ers! We got your back. All you need is an energy boost of fierce feline funnies, furrociously pumping their paws. True, there are plenty of meownching photos in our content menu. We don't deny it! For everything, there is a season, a time to munch, and a time to crunch. 
 

For days of gloomy clouds, boring work, or just when your boss doesn't get your priorities (cats first, obviously), our Paw Power Practice is just the thing for you. The method we developed is both refreshing AND as old as time: the secret is to laugh until your abs strengthen, and your frown is upside down. Feline Fitness Fun, Try it! Fending off fall fatigue has never been so easy.




li

Mommy's little helper




li

The Freshest and Funniest Feline Tweets of the Week (November 10, 2024)

Happy meowrning, cat people! Yes, yes, we know… it's been a rough few days. But we're here now. It's Sunday, i.e. Funday, and we are indeed ready to put all the craziness behind us and have some fun. Now, we don't know about your plans for today, but we do know one thing, and that is that you have to start your Sunday here, with us, and with all of the pawsome cat memes that we are about to bring you. 

Because no matter what is happening in the world, starting the day with hissterical cat memes is good for your soul. And that's why we bring you this collection of the very best cat posts on X every single week. Because going onto that app without protection means possibly encountering the madness, so we are here to do the protecting and give you exactly what you would go there looking for. Have a purrfect Sunday, guys! 




li

28 Fortunate Floofy Funny Felines in Furtastic Memes to Meownifest Purrfectly Pawesome Positivity

Hey, feline fam. We don't know about you, but after our Caturdays filled with feline activities and catnip craziness, we like to unwind with some cat memes to mentally prepare ourselves with pawsitivity for the week ahead. Mondays can turn even the brightest, sweetest feline into a cranky, grumpy cat - which is why we need to boost our mewd with feline funnies so we don't scratch somebody's eyes out tomorrow meowrning. It only happened once, and that was because they tried to talk to us before we had our coffee. We did warn them, to be fair.

With these fortunate floofy funny felines in furtastic memes, we expect to wake up with chirps of happiness and ek-ek-eks of excitement to start the day. Okay, that might be exaggerating a little bit, but it never hurts to meownifest good vibes! If not, we'll just call in sick and stay home with our cats all day. It's only the 10th time we've done it in the last month. Our boss will understand, right?




li

22 Coo-Coo Cat Memes Madly Meowing For a Feline Filled Full Wholesome Weekend

There's something special about spending an absurd amount of time goofing around with your cat. It can be a simple playtime toy that your cat loves so much, making them wiggle wiggle before they pounce to hunt it, or it can be a full playtime of hide and seek between your cat and you - but there's definitely something special about this time. It's the ultimate coo-coo cat time, full of cat craziness and cuteness. And since now it's still the weekend - you can have as much of a coo-coo cat time as you want. Or as much as your cat wants, obviously, but they usually like it so much that they just want to continue playing.

If you want to feel the cat coo-cooness and get inspired for a fully-fledged feline friendly playtime, we have here a very coo-coo-inspiring cat meme list. It can definitely get you, and your cat, in the right crazy cat mindset.




li

Heartwarming Hooman Spends Big to Get Their Cute Cat Life-Saving Surgery, Now He Looks Like a Derpy Cartoon Character

Hey, feline fam. If you're lucky enough as a cat pawrent, you'll never have to take your precious pets in for some sort of medical procedure in their lifetime. However, accidents happen, cats get older, and all sorts of complications can arise when you least expect them to. But, like the pawsitive people we are, we always try to find a silver lining in the bad, and that's exactly what this heartwarming hooman did when they found out their awwdorable feline needed surgery on their lower jaw.

The surgery was a success (hooray!), and now the cute cat has an awwdorable overbite that makes hoomans everywhere smile. Seriously, it's absolutely silly and we dare you to try and not smile at it. If you've ever seen the Simpsons, he's the spitting image of Snowball, the cat. It's just the boost of smiley serotonin we needed to get through the rest of the workday, so get your derp on and scroll down to see more pictures of this kitty cutie below. Have a great day!




li

25 Weird Cat Memes For Fuzzy Feline Fanatic Fans Getting Coo-Coo This Monday Meowrning

You a feline fanatic fan. How do we guess with such certainty? Because you're here, of course. You are in a meme list made for some serious feline fanatics of the coo-coo kind. Crazy cat ladies, some might say. But don't worry, you are in good company - we're all crazy cat ladies here. Each of us has at least one cat, or five, and we're fanatic fans of all the cats that aren't ours.

But "ours" doesn't sound like the best word to describe this sort of meowlationship - it's more like the cats own us. We're here to provide our cat owners with yummy treats and lots of pets - on their terms. While they need their cat space and we cannot pet them, we fill the cat hole in our hearts with cat memes. These specific memes are intended for the feline fanatic fans and crazy cat ladies waiting for their cat overlord to make some time for them.




li

23 Funny Fluffy Feline Memes Making Their Way This Meownday to Make a Whimsy Wholesome Week

Hello cat pawrents and enthusiasts, is this Meownday treating you alright until now? Starting another workweek can be rough, making any Monday morning a leading candidate in the "Worst Morning of the Week" list. This is especially difficult for cat pawrents, who need to leave for work after they've had a full weekend of cat time. It's rough to leave your cat at home after a two-day-long cuddle session with them, and a wholesome hang-out time.

This is why trying to surround yourself with cats as much as you can, while you're away from your cute cat, can be beneficial. It sort of acts as a solution for the cat-yearning soul of a cat pawrent on a Meownday morning. And the easiest way to surround yourself with cats, and just general cat wholesomeness, is by scrolling through a bunch of cat memes - especially the wholesome kind, which are made for a whimsy week.




li

"Roommate thinks my cat is 'our' cat": Fed Up Cat Owner Tries to Find Peaceful Ways to Navigate A Frustrating Feline Conflict

Those of us who have at some point in our lives lived with roommates know that having roommates can be a total disaster. Speaking from my own experience, moving to a big city and needing to find an apartment ASAP causes you to compromise on some things, but roommates shouldn't be one of them. Unfortunately, that's often the way the cookie crumbles. From messy roommates to roommates who use the kitchen to cook the weirdest and most unappealing foods, to roommates who never take their clothes out of the dryer, there often is much to be desired. 

For the original poster of the thread we are featuring today, a frustrating feline situation left them feeling confused and fed up as to how to approach their roommate. The roommate in question completely crossed the line when it came to OP's cat, often referring to the cat as their shared cat, rather than OP's cat. The kicker is that this cat is OP's childhood cat and of course, OP covers all of the cat's expenses. What would you do in a situation like this? We would have to move out at all costs. 




li

The Hilarious Hijinks of House Cats: 26 Funny Feline Memes to Soothe the Souls of Homesick Hoomans

Sometimes when we are forced to lock in at the office it can feel like we are missing out on so many precious purrfect moments with our cute cat children at home. However, as is during the night, they are not always the calm and collected cuddle bugs they appear to be, and the time we regularly spend out of the house is their time to terrorize the house to no end until you come bumbling home to feed them. So considering that you might be questioning your choice to be in the office when you could be home with your house cat, we made this list full of hilarious house cat hijinks made up of funny feline memes that will soothe the souls of all you homesick hoomans.

From the camo cat who purrfectly blends into the floor for ultimate steal, to the artistic catto who has been working on its wood carving and has almost finished its first piece, to Glenn the clawminal cat with a penchant for mac and cheese who was caught orange pawed and faced.





li

24 SuPURRemely Expressive Cat Memes Mirroring the Hooman Experience From the Feline Pawspective

Cats aren't so different from us. When it's cold outside and we want to avoid responsibilities, we seek our coziest nap spot. When we're hungry at 2 AM, we bother someone for a snack. And when we're pawsitively peeved with the world, it's off to our favorite cat tower to stare down at the peasants below. 

Hooman cat lovers have a funny way of mirroring our experiences with our cats. If you're anything like me, a theatrical cat owner, you know that each cat you encounter has a different voice, different mannerisms, and a totally different pawsonality based on their sass levels. It's only natural to project our fancies on our felines because they're not only our best buds but our purrtner in crime! So if you love your kitty and miss them every day while you're out running errands, working (ew), or socializing with friends, remember that they're silently judging you from afar, waiting for their favorite bald, bipedal giant to come pop open a new can of wet food for them. You are so cherished!

 Pawsitive Vibes: Subscribe to our weekly newsletter for the purrfect Caturday treat!




li

Person Adopts the ‘Mean, Hissing, Swatting’ Cat That No One Wanted at the Shelter, and after Getting Some Love, the Fluffy Feline Shows Her True, Cuddly Colors

Getting a cat to love you can take some time. We think that most cat owners know that. It's a rare thing for a cat to fall in love with its new owner on day one. Especially when you're adopting an older cat. You don't know what they have been through. You don't know where they came from most times. What you do know - or should know - is that for most cats, it's a matter of time. You need to give cats space and respect, affection when they ask for it, and snacks… like- all the time. 

And eventually, when you do all of that enough… your cat will show you love. Now, that might take a few days, a few weeks, or a few years. As long as your cat is not actively harming anyone around it, there is no reason to give up on them. You just need to keep giving them those things, and when the time is right, they will make as big of a turnaround as this kitty.




li

27 Warm & Fuzzy Fall Feline Funnies Overflowing With Autumnal Affection for Snuggling Sweetly in Soft Sweaters

Good meowrning, feline fanatics, and happy Tuesday. A lot of people rant and rave over summer, but us? We love fall and winter. Why? Because it's sweater weather. We love sweaters. We love wearing sweaters, putting sweaters on our cats, snuggling in sweaters, sleeping in sweaters, heck, we would even exercise in sweaters if we could. There is nothing comfier than putting on a fuzzy sweater and burrowing your way under the blanket for ultimate comfort. 

These warm and fuzzy feline funnies are basically cat memes wrapped in soft sweaters. They're full of autumnal affection, heartwarming vibes, and they're purrfect for enjoying when you need to feel extra cozy (and, purrhaps, silly). We thought to ourselves, "how can one improve the purrfection that is cat memes?" - and the answer was simple: add the feeling of throwing on a sweater to them. So that we did. Grab your favorite sweater (cardigans and sweatshirts are also okay) and get ready for a catastrophe of comfort in the form of cat memes. You will be comfy, there is no escaping it.