Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "0.3"
-
Interviewed a dev for a junior role earlier this week...my first question:
const numbers = [0.1, 0.2, 0.3];
let sum = 0;
for (i = 0; i < numbers.length; ++i) {
setTimeout(() => {
sum += numbers[i];
}, 0);
}
// Refactor the preceding code so that the following returns true.
console.log(sum === 0.6);
---
He had no idea where to even start, so I asked him to walk through the code with me line by line, he couldn't get past line 1 - literally didn't know what an array was... I walked through the code with him and he just started to look more and more lost.
I didn't even bother with the rest of my questions on OOP, FP, etc...
Am I really expecting too much of somebody that claims to have 2 years practical experience in JavaScript, jQuery, Angular, and PHP?
Do you think this is a problem a junior dev should be able to solve...even if it takes some hand-holding?57 -
For fucks sake, just because you don't know anything besides JS, you don't have to constantly complain how it's "so fucked up"!
Yeah there's a lot of frameworks. So what? Python has 50+ wsgi frameworks just for server-side apps, Linux has literary hundreds of desktop environments, C++ has over 30 actively-developed UI frameworks, and let's not even get started on CMSs or game engines. And each language comes with its own dependency management or two, NPM discourages static linking & bundling dependencies until the very end, while some others only recommend dynamically linking widely-available dependencies & always bundling the remaining ones.
Software development is constantly evolving, and for most time there's no right or wrong approach. And when one approach is chosen over another, there's a reason for that. Imagine you just found a perfect library for your use case, but some idiot decided to only offer minified code with bundled jQuery? Or a different idiot made it impossible to have multiple versions of a dependency on your system without resorting to one of various third-party hacks?
Every language has a ton of various frameworks & libraries that ultimately do the same thing, every language has a bunch of design choices you probably don't understand at first, and every language was made with a purpose and the fact that you're using it proves it achieved that.
Last but not least, all devs had to learn about quirks in various languages, and they're fucking tired when someone who barely knows a language tries to act smart going "ahaha how the fuck 0.1 + 0.2 isn't 0.3".10 -
[ Introduction ]
In Internet culture, the 1% rule is a rule of thumb pertaining to participation in an internet community, stating that only 1% of the users of a website add content, while the other 99% of the participants only lurk.
[ The story ]
A year ago I had a problem with X software.
I opened a ticket on its repository but a week goes by and no one responds. I need it to work! So I opened a pull request and it got merged in a day or two after a quick review.
Seeing that the tickets were many and the maintainers were few, I decided to stay and help.
Today, I am in the top #10 contributors.
I have made 20 commits and edited 4k lines of code. (Honestly, it's not that much, at work I do way more than that, anyway...)
This repository is an alternative to another popular closed-source software and it's massively used by well-known companies
(tech-giants).
[ Stats ]
User base: 20.000 (all of them are devs)
Total contributors: 200 (1%)
Contributors with more than 1 commit: 60 (0.3%)
[ Consideration ]
I would never have believed a year ago that participation could be so low despite the number of dev-users being so high.
The software does not require great technical expertise and if you are using it for work then you already have the skill-set you need to contribute.
Now listen, I know that not everyone wants to contribute. I know right and I respect it ... but really:
The 0.3% ?! Only 60 devs on 20k are active contributors?! Only 200 (1%) devs have ever made a single commit and then they left.
Holy sh**11 -
GitHub
This repo contains the following languages:
- PHP 58%
- HTML 34%
- Javascript 5%
- CSS 2%
- Ruby 0.6%
- Hack 0.3%
- NASL 0.1%
The last 3 are not in this repo.
Don't fear about AI taking our jobs, it still can't identify what languages it's looking at.18 -
Why 4 TB external disk only read for 3.7 TB? Where's the fahking 0.3 TB / 300gb
...?
*RIP English, sorry*7 -
Signet, the google auth library, is somehow throwing a DivideByZero error, despite the only math in the file being linear back-off (`sleep retry++ * 0.3`). Also, the line it’s getting thrown on very specifically throws an entirely different error: a Signet::AuthorizationError.
What is even going on?
Also this worked yesterday.
🥺10 -
Piddling, and trying to learn some game stuff. Very simple game stuff.
Example code:
if (level % 10 === 0...) {
speed += 0.3;
...
} else if (level % 5 === 0...) {
speed += 0.1;
...
}
But because Javascript, console log reads:
speed: 0.5 <-- this is the initial console log
speed: 0.6
speed: 0.8999999999999999
speed: 0.9999999999999999
Well done Javascript, well done.25 -
That feeling when you upgraded an internally used library from TypeScript 1.8 to 2.5 getting rid of the typings dependency and fixed its bug highlighted by the upgrade and all tests are green -- that feeling would not be rantworthy.
Realizing on trying to publish the new version that the master branch is not the actual master branch but a branch called 0.3 is. Of course I cannot merge my changes back there.
I don't mind a different main branch name. Yet don't call it a version, that's what tags are for. And for all that's holy, please set the proper main branch in your bitbucket / GitHub / gitlab so that I can find out easily.
Now I've wasted half a day and if you're looking for me: I'm gone searching for the motivation of doing the same shit again for the "main" branch. -
So I'm working on this codebase that has about 50k lines of code and I built a feature in it today. Spent 3hours on the feature + writing tests. Then I raised a pull request and that bastard codeclimate calculated the test coverage had dropped by 0.3%.
For 6hours now I'm still looking for a way to increase the test coverage by 0.2%. FML4 -
me asking python: is (0.1 + 0.2) == 0.3 ?
python: NO
me: wha.!!
python: Instead, it's 0.30000000000000004
me: what the actual F***!!13 -
Here lads quick question, would a 0.3GHz processor speed bump really make that much of a real world difference in a skylake i7 processor?