My biggest dev sin is not writing any unit tests for devRant :/

  • 47
    Didn't you say, that you want to rewrite it anyway?
  • 82
  • 73
    @plusgut parts of it. The mobile app code can use a lot of work. The backend code is pretty good but needs a lot of refactoring/code removal for stuff we’re not using anymore.

    @D--M I deserved that
  • 92
    Well who need unit tests when your product is for developers 😛

    If we cannot find any bug, we are shit. If we found bugs, we must know what to do next, if not, we are shit again. 🤣
  • 29
    @dfox then write tests for everything new you'll build in the future.
    Fact that I couldn't believe before: writing tests and see them go green after a while,is actually pretty fun.
  • 48
    @CurseMeSlowly good point :) I shall call it “dev tests.” It’s where you push code and then devs test it for you.

    @plusgut that would definitely be a good thing to do. And I agree with your point about seeing them go green :) I spend tons of time writing PHP unit tests at my day job, but for devRant it’s hard to justify the time required sometimes since we try to move very quickly.
  • 14
    @dfox we are in the same sinking boat 😑
  • 16
    no need for unit tests man, we will report/fix/deploy it for ya :3
  • 8
    @dfox yea that's understandable, that's the tradeoff. It takes time :/ But with the right setup it doesn't take that much time to write tests,when you got the hang of it. But sure, it's extra time needed.
  • 20
    Shame *rings the bell*
  • 14
    Unit testing for most people is the tutorial on unit testing followed by a big old dose of the fuckits 😂
  • 8
    @jAsE If you have a larger application it's just not possible to test everything manually by yourself.
  • 7
    I admire your testicular fortitude! 👊🏼
  • 2
    Why not set up [insert build server here] to fail if not enough test coverage?
  • 3
    It's never too late to start
  • 6
    Hey @dfox
    I still haven't gotten my stickers!

    Hopefully that got your attention...

    I have a question. Do you actually pay for a ++ subscription? Or did you just give it to yourself for free?

    (And how long should I expect the stickers wait to be)
  • 5
    @dfox have you ever thought about open sourcing the app?
  • 3
    @tahnik I like that idea
  • 4
    @ewpratten I mean dfox and trogus could use some help from the community.

    They can work on creating new features and handling them in the backend. While the community updates the app. They can lead the community.
  • 3
    @tahnik yep. I'm in. Then there could be like a beta version of the app maybe? So that we can see like once a week what has been contributed.
  • 3
    @tahnik since devrant already knows what our GitHub accounts are, (in our bios) anyone who contributes to the code could get a little icon beside their name or something
  • 2
    Honestly I think the point of unit testing is so others don't screw up ur code with their changes.

    I always think we should use TDD at work but at home or when I do solo projects, the only testing I do is functional.

    Also unit testing I guess is only worth it if the code changes a lot, u need test evidence for a release, the code base is huge, and you need to set some standards for a group of monkeys
  • 3
    You can always do them in retrospect. I thought I had working website, then I wrote the tests only to realise how many stupid mistakes I made. For example, I deducted the price from the seller instead of the buyer, and so on 😂
  • 1
    Can't blame you 😴
  • 3
  • 3
    Don't feel guilt, it's not a sin. It's a life style called YOLO.
  • 1
    you prefer to have a dangerous life too huh! 😎
  • 1
    @dfox What does your release cycle look like? What checks do you do?
  • 4
    @hjahre we have very limited time unfortunately, and adding test requirements right now would slow us down. I think even without the tests we’ve been able to keep bad deploys very limited.

    @ewpratten please email the sticker email address and we can look into it - and nah, we don’t pay for devRant++ :)

    @tahnik we’ve thought about it and discussed in-depth in other rants, but to make long story short I’m not sure how much time we’d save since we’d need to maintain an open source project, check over any work done with Titanium since it unfortunately has a lot of nuances that most who haven’t used it for a while won’t be aware of, and also have to coordinate closely on actual work. Lastly, based on a handful of rants requesting we open source it, I’m not convinced based on the feedback that many people would learn Titanium and take the time to build entire features. If there did prove to be more interest though, we’d never rule it out.

    @billgates good points there, and I pretty much agree. It makes it much easier that I’m the one touching the backend code about 95% of the time.

    @brainlessdev we don’t have anything too fancy. We do have some health checks and API tests that run very frequently so I get a PagerDuty alert right away if any of our core API services or DB goes down. We definitely want to build this out, but unfortunately doing so requires more time, and also more money which we don’t have right now.
  • 2
    @dfox I sent an email.

    (With a fairly self descriptive title)

    It was from a different email this time because I am at school and don't have access to my other email account.

    Do you have a tracking address for the package or something?

    Us to Canada shipping usually doesn't take very long.. so. Ya. Hopefully you can figure out what happened.
  • 1
    Meah, it works so no need :)
  • 0
    @plusgut what counts as big? I work on top similar but different projects with 1/2m loc and I still can tell you exactly what breaks where and why if you change x.

    Not saying unit tests are not important but as long as every dev on the team knows the codebase like his own pants you can go without them (but I would rather not)
  • 1
    @Tamrael so you don't have any unexpected sideeffects at all?
    And every developer on rhe team is an expert?
    That's hard to believe.
  • 0
    @plusgut we only have a small team and I do all the code reviews. Not every dev knows everything but it's ok. I would like to have tests but it's not easy to implement tests for 1/2m loc
  • 0
    @Tamrael but would you say that havimg unittests would be useful?

    For me tests improve my confidence in the codebase, when I'm changing existing code.

    And I don't believe you, when you say that you know all implecations, by 0,5 loc.
  • 1
    @plusgut you don't have to believe me but I know every function by name in this project.

    Can't remember my own birthday but this project is more like a baby to me.

    I would love to have full unittests coverage and we are writing tests for every part we refactor or add new. It's still a slow process and for the time being I need to know every implication there is to avoid death by deployment
  • 0
    @Tamrael so what was your point in your original comment?
  • 0
    @plusgut just wanted to mention that it is possible to have big project without tests and still have next to no regressions.

    Unit tests were still a good thing
  • 0
    @Tamrael that's really hard to believe, in your own rant you wrote that there are 50 levels of nested loops and that you couldn't figure out how to make it recursive.

    This doesn't sound like a codebase that is manageable without regression.

    But okay, if you say so.
  • 0
  • 0
    It's never too late I guess...
  • 1
    @jAsE huh?
  • 1
    @jAsE yeah, was the tag for the drama above or something?
  • 1
    @jAsE haha alright then 🤣
  • 0
    @JoshBent yeah, just children being children :p
  • 0
    @dfox, did you sold devrant or smth ? last rant 330 days ago !!!
  • 0
  • 0
    @dfox i just wrote a post (rant) to you about adding shortcuts like twitter/youtube to devrant, that will pop up on "Shift +/"
    and in the meantime, checked your profile, found that you haven't posted a rant in a while. so just wondering.
  • 0
    @Swarup my last rant was like 2 months ago. No idea what you’re looking at.
  • 0
    And thanks, I’ll take a look at that!
  • 0
    @dfox my mistake, i searched for "dfox" on devrant, and the first result was rant frorom 330d ago, others on the list were 1y ago and so on.
    I didn't actually clicked on your profile.
    My bad.
  • 0
    @dfox looks like you have a regression in your codebase somewhere. All of my earliest rants have ‘undefined’ instead of ‘rant’

    Also yes if you see my phone clock it is soon 4am and I have no idea why I’m posting this
  • 2
    @fives that was a planned change iirc
  • 0
    Just get an intern to write them :p
Add Comment