Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Imagine a world where where Bugs are sentients.
They have their own cultures and civilization..
And of course,
And their most famous one is..
And their Whitish album
That feeling when...
...you can't build a project because you can't autogenerate some files because they rely on some other autogenerated files that rely on some other autogenerated files that can't be generated because the project can't build...
Just another day in the eye of the dependency hurricane!
Have spent the better part of two days trying to fix the build because I foolishly tried to update some NuGet packages :-(
Just thought I would share a really cool tool I found when writing my documentation in markdown.
Check out https://typora.io its a markdown editor that is easy to use :)4
Unit testing with NSubstitute and Autofac
For the most part, I find it a lot simpler than SimpleInject (hmm) and Moq, which I have used previously.
But there are still some of those 'Oh, for fucks sake!'-gotchas.
I was trying to test a class today where I wanted to substitute all other methods in the class than the one I wanted to test == an actual unit test.
I had previously found out how to do this:
1. Make sure the methods that should be substituted are internal to allow substitution.
2. Substitute class with Substitute.ForPartsOf<T>(args)
3. Set up methods that should not be called with instance.When(a => a.Method()).DoNotCallBase()
This way, you can unit test a class properly and only call the method that you want to test, and also control the return values of the other methods if needed.
So as I said, I have used this before to great effect. But today I just could NOT get it to work! I checked and rechecked everything but the test code kept calling the implementations of the substituted methods!
I even called over another dev for help, but he couldn't see the problem either.
I scoured the internet, but everyone just told me what I already knew: follow the 3 steps, and all is well. Not so!
I ALMOST considered doing the test improperly, as in, increasing the scope beyond that of the method I wanted to test.
But then it hit me... My project was missing this line in AssemblyInfo.cs:
I always add a line to make internals visible to the test project, but I had forgotten that NSubstitute needs this line as well to work properly.
Sometimes when a test fails it will tell you that you are missing this line. And sometimes it just doesn't work.
Maybe I will remember this in the future now. Maybe 😅
Fuck you if you are here for ++ upvotes.
Instead try to be a part of an amazing community and interact to broaden your narrow mind beyond upvotes.
This place is beautiful. This place is my internet home.29
God Damn Privacy Regulations
New terms of service for your account
Sigh...if i we're EU citizen it would be for the best, except for those businesses that can't bother to update but I'm not even EU.
Email filter activated!2
I feel reluctant to open my inbox as much as opening the door for an unexpected knock on a Sunday.10
Thank you GDPR, even though I am not an EU citizen, now I know what services have I provided my e-mail address.9
Just got a warning email from OneDrive saying my account would be frozen soon because I had used 28.1Gb of my alotted 5Gb...
Erm... First off, I do not use OneDrive. I use Google Drive and JottaCloud. I have actively tried to get RID of OneDrive in Win10, with all those damn notifications all the time.
Secondly, I guess it's nice that if you DO use OD and hit the limit, they don't just cut you off instantly. But nearly 500% overuse seems a little late to react, no?
So I logged in and looked around to find out what the hell was in there. Turns out, MS had decided to upload my entire images folder. I did not ask them to do that. Deleted them, but will have to check the damn OD service when I get home so I can KILL IT!
And I am going to have (yet another) talk with MS support as well, I think...8
Last year I started a project in C that I was very proud of. But I didn't work on it enough, and don't have time to work on it now, so the project was reassigned to someone else.
It's really painful watching something you worked so hard to build as perfectly as possible get so thoroughly destroyed.4
"I was wondering why Monitors sleep and Keyboards don't.
Then it occurred to me that Keyboards have two SHIFTS. 😆😆" -some guy14
-When using Windows
Butthurt Geeks: "You suck, use Linux!"
-When using Ubuntu
Butthurt Geeks: "You suck, use Arch! (or anything that isn't based in mainstream Ubuntu ) "
-When using Atom
Butthurt Geeks: "You suck, don't use the mouse!"
-When using Vim
Butthurt Geeks: "You suck, use Emacs!"
Really, do you always have to force everyone to use the toys that you are using?33
When you stare into git, git stares back.
It's fucking infinite.
Me 2 years ago:
"uh was it git fetch or git pull?"
Me 1 year ago:
"Look, I printed these 5 git commands on a laptop sticker, this is all I need for my workflow! branch, pull, commit, merge, push! Git is easy!"
"Hold my beer, I'll just do git format-patch -k --stdout HEAD..feature -- script.js | git am -3 -k to steal that file from your branch, then git rebase master && git rebase -i HEAD~$(git rev-list --count master..HEAD) to clean up the commit messages, and a git branch --merged | grep -v "\*" | xargs -n 1 git branch -d to clean up the branches, oh lets see how many words you've added with git diff --word-diff=porcelain | grep -e '^+[^+]' | wc -w, hmm maybe I should alias some of this stuff..."
Do you have any git tricks/favorites which you use so often that you've aliased them?56
Me: "Delete this file."
Windows: "Someone is using it."
Windows: "I can't say."
Me: "I checked using a utility. It says your file explorer is the one using it!"
Windows: "Well, I had to show a preview."
Windows: "Because you selected the file to delete it!"
After the backlash I received from some devRant users about my text formatting, here is a properly formatted, and properly punctuated rant.
You see... It's boring.17
Is anyone else noticing an increase in rants / stories that are clearly bullshit.
I think the community is garnering a lot of fantasists who are detailing scenarios they have imagined, in some bizarre attempt to impress people.23