Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "gotchas"
What the fuck is this one-way interview bullshit?
"The organization you are interviewing with has come up with a series of interview questions that they have requested you to respond to. This is an on-demand interview which means that you'll be recording your video interview answers at your convenience as long as you submit them before the deadline." -- sparkhire.com
What if I have questions? I have plenty, and I find those questions considerably more important than whatever bullshit gotchas the company wants to annoy me with.
At least have the decency to talk to me.38
Interviewed a guy for a senior technical job. I worked hard on making my own questions that hopefully make the interviewee think instead of useless gotchas.
He told me at the end that they were fun questions and this interview was loads better than the rest who just ask questions off of Google.
Having had my share of shitty interviews, this makes me feel so good 😊11
Reduced a page load time from 23.8 seconds to 0.5 seconds by disabling tracking of entities on the page. Felt awesome.4
Planning on building a Ryzen 5 2400G setup for light gaming/home lab stuff, I need it to run a bunch of VMs and have passable frame rates in games on Linux (I hardly play AAA hard to port games, so should be okay there).
Planning on going full Linux for this, you guys got any tips/warnings/gotchas? Also, have any of you encountered issues with using NVMe SSDs on Linux?10
Why I try to ALWAYS use semicolons in JS:
In short, weird shit happens sometimes
So I'm doing a small project for freeCodeCamp, working with the Twitch API. I decided to make an array on the fly to append a few elements to a documentFrag in order after setting all my props. Forgot a semicolon. Apparently, Babel transpiles this:
info.innerHTML = (``)
[span, caret, info].forEach(elm => frag.appendChild(elm));
to this if you omit the semicolon:
info.innerHTML = ' '[(span, caret, info)]
this is why you should avoid relying on ASI, you're going to have to remember them in other languages out there, so for your own sanity, might as well get used to them. Just thought I'd share--who knows, might help a JS newb out there somewhere.5
I'm trying out blazor at the moment, building a couple of prototypes. I really need to brush up on my html/css for the view stuff, and of course there are a few gotchas. But other than that, I really think Microsoft has nailed browser apps with this!
Client side, server side, a mix of both, runs in all major browsers + as PWA or Electron.
All logic and view manipulation in C#, no JS. And the performance is great.
Just a couple of things I'm thinking,
Alacritty in my main terminal, but I have a Hyper terminal (secondary, since it's pretty but not as fast) for thoughts.
I'm not even sure if you can call them thoughts. I would say mental diarrhea.
Most of the sentences are ridden with expletives, and very emotional. I attached a picture where you can see that there is
* some special characters, result of me light smashing the keyboard (I say light as in, I'm very angry but not as angry to not appreciate my single computer).
* a final sentence with some really nasty message.
* a lot of gibberish as well, don't use this as a spanish learning tool.
If you're curious about what's causing me grief, it's trying to make jest work with a vue-cli existing project. I encountered a couple of gotchas that ground my gears.
I estimated this bitch ass task to take like 2 hours tops, but I'm like 4 hours on this already, so I'm halfway broken.
Also, another comment:
While seeing the picture of the dutch devrant meetup, I think to myself "man, there's no way I would not feel awkward in that situation.
But then I noticed the beer and was like "oh, that helps".2
1. Sets up Airbnb listing for Mom
2. Domain check
3. Email check
4. Okay let’s setup a simple one-pager that we can share
*Uses html5 broilerplate and embeds Airbnb listing - simple*
Checks page, it comes up blank...
WTF!!!??? WHY!? *Checks Console: 1 million errors screaming about Content Security Policy*
Sigh, I can deal with logic errors in backend code. WebDev is just so full of esoterics and gotchas that have nothing to do with you business logic. They make really simple and trivial shit way more painful and harder than they need to be... Ugh4
Lua users, have you used moonscript?
It's a little language that has it's own interpreter or can be compiled down to Lua and it's absolutely lovely (currently using it with Love2d).
Of course, as with most things, what I love about it also royally pisses me off sometimes.
For starters local has to be declared for variables, unlike lua.
Otherwise the variable goes to _
Also note, that some tutorials literally tell you the opposite.
all variables are local by default
unless you don't declare them
then they go to _ (throwaway)
Some tutorials get this wrong too.
all variables have to be declared local
except tables. failure to declare a table WITHOUT a local will cause things like
table.insert to fail with "nil" values for no god damn reason.
No tutorial I could find mentioned this.
Did you know we call methods with '\'?
By the way, we call methods with '\'.
Why? Who the fuck knows.
Does make writing web routes more natural though.
Variables in the parameters of new are declared and bound for you. Would have loved to know this before hand instead of trying
to bind to them like a fucking idiot.
Fat arrows are used to pass in self for methods.
Unless you're calling a method. Then you use backwards slash. This fact is unhelpful when you're a beginner and dealing with the differences between the *other* arrow, the backslash, the fat arrow, and the fact that functions can be called with or WITHOUT parenthesis.
And on that note..
While learning all this other shit, don't forget parenthesis are optional!
Except when they're not!
..Like when you have a function call among your arguments and have to disambiguate which args belong to the outer call and to the inner call! Why not just be fucking consistent?
But on the plus size, ":" is now used for what it should have been used for in the fucking beginning: binding values to keys.
And on the downside, it's in a language thats built on top of another language that uses it for fucking *method calls*, a completely
different fucking usage.
And better still, to add to that brainfuckery thats lost in the mental translational noise like static on a fucking dialup modem, you define methods with the fat arrow. Wait, was that the single arrow or fat one? Yeah the fat one. Fuck. But not before you do THIS shit..
yeah, you STILL include the god damn colon just so when you're coming from lua you can do a mental double take. "Why am I passing self twice? Oh right, because fuck me, I decided to use moonscript." It's consistent on that front but it also pisses me off.
A lot of these are actually quality of life improvements disguised as gotchas, but when you're two beers in to a 30 minute headscratcher it sure doesn't fucking feel like it.
Nevertheless, once I moved beyond the gotchas, it was like night and day. Sure moonscripts takes a giant steaming dump all over the lua output, like a schizophrenic alcoholic athena from the head of zeus, but god damn, when it works it just WORKS.
Locals that act like locals? Check.
Sane OOP? Check.
Classes, constructors, easy access to class methods, iterators? Check, check, check, check, check.
I fucking hate ceremony. Configuration over convention is for cunts. And moonscript goes a long ways toward making lua less cunty.
If you've ever felt this way while using lua, please, give moonscript a try.
You'll regret it, but in a good way!6
4 really basic questions. Things you can't get through 1st year undergrad without knowing. One was testing you understand references, one testing understanding of inheritance, then exception handling... Then a bit of a tricky one: what happens when you query 2 tables in sql without a join. That took me a second because it's just not something I'm used to doing.
So yeah it's pretty basic stuff. At this point I was used to writing fairly long code snippets and quizzes with lots of gotchas that make the interviewers feel really smart. I think "ok they basically want to make sure I'm not totally useless and they're fine with training me". But noooooo. Being able to answer all that correctly is really impressive. That's never happened before. I'm a fucking prodigy.
So I got the job and I alternate between thinking I'm in Idiocracy and thinking the reception I get is some sort of elaborate joke
Full stack devs, who use both: When to you choose GraphQL over REST and vice versa? What has taught you the reasons why?
Just trying to avoid the gotchas on a critical project coming up.4
We should create privacy focussed and ads free internet protocol/network. It could be paid, and money would go to website owners (something like TV channels works?).
Of course, there’s a lot of gotchas, but for starters just an idea.
What do you think?7
Does anyone know of any good resources for learning to make web apps (specifically HTML and CSS)? I'm not aiming to be a web designer, I just want to learn to make UIs for dashboards and stuff. Are there any particularly good code-alongs for something like that where they explain the caveats and gotchas?6
1. Figure out what project needs it
2. Read a primer book (skim), mostly syntax and note the gotchas
3. Start coding
4. Read in detail as reference or Google... While coding
Programming is such:
1. Just want to talk to RabbitMQ from Python
2. End up reading the AMQP specification, looking for gotchas
So React is pretty cool. Anyone have any gotchas they ran into with their first React or React Native project?1
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 😅
Learning to like manjaro, a lot, setting up i3 for a workstation and kubernetes cluster with a couple of manjaro workstations with just the cli installed... few gotchas on the way, get Hyper-V enhanced mode working but get a message session error on dbus launch - easy fix it is already launched by lightdm, the cli install doesn't start the network driver by default but can get a whole 3 node k8s cluster running in under an hour from scratch and forward i3 to a nice, fast, little windows x-server that I got for free with Microsoft reward points.. winning!
I'm building a nodejs REST api with jwt token authentication for the first time. So far, it's been as smooth as butter. Any hiccups or gotchas I should worry about?
Thoughts on Apache Cassandra? Seems awesome, but are there any gotchas we should know about before diving in? Currently we use Postgresql for most things.3