How many of you are writing unit tests?

I recently came across 15k lines of code with 200+ functions and no unit tests.

likefunny
Posting as :
works at
You are currently posting as works at

Ha, I came across a couple thousand lines written without any functions once. They built a separate demo front end with example data that made the codebase look amazing but the actual code only worked about 10% of the time. If you want to build things that work, don’t stay in consulting

funnylike

I don’t understand how anyone writes code without functions. It seems painful

like

Is it really that tough? Function takes an input and has an output. At minimum shouldn’t we test a few cases and make sure it does what we think it does?

I can’t tell you how often I’ve written a function and think this is fine. Then design a few tests for it and find out it fails all over the place.

likehelpful

This is the big issue with consulting.. especially in a technical field

The m.o. at most places is that "as long as the client is happy.. we're happy". However, most client engagemenrs are akin to putting out fires - and in that context, unit tests aren't really a priority in the heat of the moment

Id definitely say write them if you can, but moreso, try industry after consulting for a bit so you can actually implement sustainable infrastructure & use good development practices

like

I found this at a client fwiw.

Agree that consultants work terrible poorly tested code. The problem is that if it isn’t core to the business clients probably don’t want to pay for high quality code (or even medium quality) code.

I do have a hypothesis that writing tests leads to fewer fires.

like

As an aside my sister informs me that the worst she’s seen is 69K in lines of code with no tests. Which is just baffling.

like

^ that's not a hypothesis.. its a fact 🙂

like

It’s tough... especially if there’s no structure or process set in place with the client or codebase

Do you write unit tests for code that isn't productionized? I will write tests if it's part of an automated pipeline, but I generally won't do it if it's for an ad-hoc analysis.

If it is some little 200 line script I might not write tests.

If it is anything that I will use repeatedly (e.g. a package) or goes into production it gets tests. If the script is sufficiently complex it probably gets tests.

I am alway reminded of a quote to the effect of, “is it really data science if we don’t know that or code does what we think it does?”

The real version is punchier but I’m blanking on who said it.

Damn @ me next time

Related Posts

like

Got job offers from McKesson and a Large For Profit Heath System. Both in strategy, offer similar comp, and both titles. Which is a better option?

like

I’m very sad it’s over 😩

Might be an odd question: we have multiple great ideas and sources of funding. Would it make sense to build out a portfolio of the companies as a fund or to build them directly? Concerned about spreading too thin by pursuing them all but all have significant potential. I have always been more entrepreneurial, never really thought about scaling up and running multiple companies. Thoughts?

like

Best small business healthcare consulting firms. And go...

like

Got an offer for EY GDS as architect.. what kind of SAP projects does EY have?

like

Anyone looking for a coach, mentor, someone who holds them accountable? A system?

like

I've just turned 30 but due to Sinus, have got grey hair.. I've tried many hair color but they damage my hair. Had started using henna after reading n number of posts on Google but all grey hair have turned in orangish brown color :(
If you've been using any hair color on a regular basis, please recommend, which may not damage my hair :( :(

like

When is it acceptable to speak back to in-laws or otherwise express feelings about a previous conflict?

like

I got offer from TCS in February and accepted the offer letter.
My BGC is done.

But my current company (Capgemini) is retaining me with the same package tcs offered. I also got one more offer from cognizant also , which is little bit higher than tcs ans Capgemini.

Can someone please let me know now if i am not joining TCS are they going to blacklist my candidature. Or can i apply in TCS again.

Also please suggest should i get retained or join new company ( TCS / CTS).

Location : kolkata

like

Hola Mi Gente,
I just accepted an offer with Deloitte. Does anyone here work there, more specifically the Rosslyn office?

like

I've been working at a company for just over a year now and have discovered my pay is way below what I should be on - I'm a senior and my male equivalent is on double what I'm on.
Recently having a pay review my boss tells me it was a mistake that I've got senior on my job contract and it should've been mid consultant, however my boss now considers me a senior and I can get a pay rise at the end of the year. What would you do? Do I wait till the end of the year for a pay review?

like

Hello all here, as a HR professional for 8+ yrs by now, happy to connect with you here, looking for guidance, view points as recently joined a software company as HR Generalist would be handling core, gamut HR activities around the organization.

like

Hi Ladies,

Anyone staying in Amanora, Pune, let me know if we can go for an evening walk/badminton

like

Which masters in europe are good for either investment banking or asset management? are masters really worth it? (i’m finishing my bachelor degree in finance and accounting)
Thank you!

funny

I struggle to maintain an active voice in my research papers. Is Grammarly the best option for picking up passive voice and offering corrections?

like

What do you think? The healthcare industry will emerge from stronger or weaker?

like

Let’s get their together!

Post Photo
likehelpful

How do you get into golf. My friends go golfing but i suck and dont want them to wait on me. Ive played multiple sports all my life and really competitive but for some reason i cant swing a club to save my life. Is the best thing to start out hire a trainer Or do i just go to a range and embarrass myself

like

Should I have been a quant? Was a USAMO level math competitor as a kid, but fell out of that world after being sick of it all.

After two years of aligning logos and models at an IB, I’m in an enviable place — but still earning less than some of my former peers who’re at Citadel and Jane Street, with worse hours. I like the work I do now, but it’s kind of frustrating that I’m never really using the skills I was once world class at.

Is the grass actually greener?

like

Additional Posts in Data & Analytics Consultants

DC folks: how’s Clarabridge (company)? Thanks

I’m being considered for an opportunity at Abbott in Columbus, out by Easton. Does anyone know what their office dress code is?

like

Looking to switch into Big4 and consulting industry, anyone willing to refer? Big thanks.

Anyone here knows about Facebook's Marketing Science team?
FB recruiter reached out for a Marketing Science Partner role. Wondering if anyone here has first or second hand experience with them

like

If u r in D&A consulting.. do certifications really helps? Whats ur take on it?

like

Quantile regression should get more love.

like

GCP vs Azure vs AWS: Which certification to pursue? Why?

Hi everyone, I am trying to change my job and looking for referrals for Data Analyst Roles. I have close to 5 years of experience and Masters in Data Analytics. Any help would be greatly appreciated.
Thank you!

like

New data offering: name.co, or namesoftware.com for the main domain? I’m leaning toward name.co, but I worry about not having the .com.

like

Lookign to staff people( Analyst to SC, USDC, PDM) with Aws development background.Have to be living in US for more than 3 yrs. Experience in building ETL/ data engineering pipeline, lambda,spark,airflow,snowflake. Long term project with optional remote work going beyond covid timeline. DM me separately if interested.

likehelpful

Anyone who has done masters in business analytics Singapore? Could you help on courses, Scholarships and careers and jobs. Looking for help.

When industries refer to business intelligence engineers, are they looking at a senior level or entry level? Some of these job descriptions seem rather outlandish in terms of years of experience required like 5+

like

Anybody here works for Panasonic?

Is data science over hyped and over saturated?

like

I have a Amazon DS interview lined up. Can anyone please suggest some good exercises to revise sql? I’m solving few leetcode problems,but is there a set of problems which covers all SQL functions? TIA

like

Hi, Looking for job in Business Intelligence/Data Analytics & Insights/Consulting in New York/New Jersey area. I have 2 years of work ex gap, so finding very difficult to get back. Please let me know if someone has an opening in their team or can share any lead!

like

Vibe check - do you also feel often times that you are a wizard who pulls a rabbit out of his hat on each project, with unrealistic timelines, no data, understaffing and lack of clear requirements?

like

Have around 1.5 YOE as a business analyst and looking to leave consulting for a data analyst role. Undergrad in Math/ComSci with SQL,Python,Tableau skills. Is this enough for entry level roles?

like

what do you talk about in your 1:1s?

I got lucky and now have leadership that seems to care about my career growth, but I'm 1. a little overwhelmed taking over a new role from someone who went on parental leave earlier than expected and 2. not used to thinking outside my day to day job, happy to keep my head down and just produce good work.

most of what I bring up in these meetings are logistical or prioritization concerns but I feel like my manager is expecting a lot more from me.

like

I have a hackerrank test scheduled for Data Engineer for McKinsey. Could anyone please help me with what questions they asks if anyone has given it in past.

like

New to Fishbowl?

Download the Fishbowl app to
unlock all discussions on Fishbowl.
That was just a preview…
Sign Up to see all discussions
  • Discover what it’s like to work at companies from real professionals
  • Get candid advice from people in your field in a safe space
  • Chat and network with other professionals in your field
Sign up in seconds to unlock all discussions on Fishbowl.

Already a user?
Login here

Share

Embed this post

Copy and paste embed code on your site

Preview

Download the
Fishbowl app

See what’s happening in your industry
from the palm of your hand.

A phone with Fishbowl app

Send download link to your phone

OR

Scan your QR code to download
Fishbowl app on your mobile

By continuing you agree to Terms of Use and Privacy Policy.

Messaging rates may apply

Download app

Sign up for free to view this conversation on Fishbowl

By continuing you agree to Terms of Use and Privacy Policy

Already have an account? Log in

Sign up for free to continue using Fishbowl

By continuing you agree to Terms of Use(New) and Privacy Policy(New)
Messaging rates may apply

Already have an account? Log in

For account settings, visit Fishbowl on Desktop Browser or

General

Legal