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 - "min value"
-
She: Uuggrrr.. You did it again
Me: What
She: Stop opening the dev tools
Me: Oh sorry
She: Leave me alone with your laptop.
10 min later
Me: What did you change?
She: I tried to remove the dev tools by changing the dragged position to a negative value in chromes config files.
Me: wow.
She: Didn't work.
Me: Hehe, nice try though
*opens chrome*
Me: wut.
She: *chuckles*
- Light pink theme
- 500% zoom
- Font size changed
- Some virus search engine (my search?)
- deleted some plugins
- start page randomcolour.org (or color? (<- me css freak))16 -
!rant.
I've worked for about two months at my (first) job. Its amazing.
We create audio/video software for the products we make.
There are 9 programmers besides me, I'm the only junior. And I'm still learning my way around the code, but they still value my input.
We only do stand ups for 5-10 min, like it should.
One if my colleagues helps me often when I have questions, so I've nicknamed him ducky.
My pm is awesome, he's great at coding and a great manager.
When we work overtime, the department pays for delivery food and drinks.
And we've already gone on 2 trips with the department, mountain biking and a BBQ.
I love my job and I hope that I'll soon be good enough to ask less questions.3 -
After 'Dev' deployed a service using Azure ServiceBus, a particular queue/client was receiving errors.
Dev: "Looking at the logs, client is getting faulted."
Me: 'What is the error being logged?'
Dev: 'Client is faulted'
Me: 'No, that is our error when the client is either unable to connect or there is an exception in the middle of sending a message. What is the exception from Azure?'
Dev: 'Client is faulted. That's it. I'm going to have to re-engineer the code to implement a retry policy.'
<OK, I smell someone cooking up some solution finding, so I dig into the logs a little further>
Me: "Looks like an invalid connection string. The actual exception being thrown and logged is from the Azure client connection string builder. The value cannot be null."
Dev: "No, I'm looking right at the connection string in the config. Looks fine."
Me: "Looks correct on your machine, but what is actually being deployed to the server?"
<I could tell he was getting agitated>
<Dev clicks around, about 10 min. later>
Dev: "Aha!..I found it. The connection string in the config on the main branch is wrong, in fact, the entry is missing."
<dev fixes, re-deploys, life is good, I document the error and the root cause>
Boss: "Great job Dev."
*sigh* ..go teamwork?3 -
Dockers JSON output is garbage.
First, you'll get no JSON per se.
You get a JSON string per image, Like this:
{...} LF
{...} LF
{...} LF
Then I tried to parse the labels.
It looked easy: <Key>=<Value> , delimited by comma.
Lil oneliner... Boom.
Turns out that Docker allows comma in the value line and doesn't escape it.
Great.
One liner turns into char by char parser to properly tokenize the Labels based on the last known delimiter.
I thought that this was a 5 min task.
Guess what, Docker sucks and this has turned into try and error...
For fucks sake, I hated Docker before, but this makes me more angry than anything else. Properly returning an parseable API isn't that hard :@3 -
Unreal Engine fun continues...
so I need to set limits to rotations within a skeletal mesh. So in other programms, like blender, you can specify a limit per axis, setting max and min angle. Makes sense, right?
Unreal Engine:
1. Let's call rotations sometimes xyz, sometimes roll pitch yaw, and sometimes swing1 swing2 and twist so that nobody knows what it is anymore.
2. IK node 1: limits? what are limits?
3. IK node 2: ok, you can set angular limits but they are all symmetrical to god knows what and to all axis apperently.
4. Physics: yeah you can define joint constraints but we give you only symmetrical constraints also
....
WHY. Were does this make any sense? One node is not like the other, and they talk rotations but use 100 different terms for them, since, hey, why the f not. And let's limit everything symmetricly so you can only set one value or have to fiddle with offsets to achive the range of movement you want.
I mean, one could just stick to xyz (or even roll/pitch/yaw, whatever) and min/max but hey, that's one extra field and then it would be easy to use. Who would want that? ....10 -
Demo
Backend Team : No one want to listen to technical details. A short 2 min demo what we have done.
Shareholders : Have you done anything?
Frontend Team : half an hour demo of validators and fields that sum values from other fields
Shareholders: Wow that is awesome, great job, nice to see, great value, lot of progress.4 -
Does anyone knows why in c++ floats range from numeric_limits<float>::lowest() to ::max() and ::min() is just the lowest positive value instead the actual minimum? This strange naming convention just costs me an hour of my life that I'm never getting back...2
-
The value of a good walk...
So I was stuck with this problem. There's the data structure then there is the display of the data structure. Two copies of the data which is fine.
But the displayed copy is a pain to work with (WinForms) and there the was problem of having to handle events when the displayed data changed then update the back end actual working array and synchronize it so they're both up to date. Couldn't figure out a good solution. Actually slept on it. Still it didn't sit right to have two copies like that and sync it.
Went for a 20 min walk and BAM! Solution found. There was a way to just directly update the crappy WinForm and sort the data and keep the properties then when done displaying/selecting just convert to the working data format...so simple no synching required!1 -
I fucking hate the person that created the ionic timepicker its such a fucking mess if you want to do anything advanced and it's so poorly documented that most of the time you just have to guess what you should do. Best part: this fucking component doesn't even use a Date Object it uses A FUCKING STRING that it parses, so I have to parse, unparse, parse, unparse. Who in their right mind thought this would be a good idea?!
What frustrated me the most was when I tried to use their min, max functionality. I used the component as a timepicker, so I ignored most of the Date Object and just initliazed them at 0. Afterwards set the hr, min, sec and did the same for the max value. Doesn't work... It just bugs out and I can only pick midnight of that day... Okay. I kid you not: tried for two hours to fix this shit. Console logged the crap out of that thing. Everything seemed right. Out of frustration I then just initlialized the max value like normal, so the date is the current date. AND SUDDENLY IT FUCKING WORKED. WHY?! FUCKING NOBODY KNOWS. WHO, WHY, WHAT?! -
is being a tech/dev person, a dead end job?
i have been thinking about this for sometime. as a dev, we can progress into senior dev, then tech lead, then staff engineer probably. but that is that. for a tech person :
1. their salary levels are defined. for eg, a junior may earn $10k pm , and the highest tech guy (say staff engineer) will earn $100k pm, but everyone's salary will be spread over this range only, in different slots.
2. some companies give stocks and bonuses , but most of the time that too is fixed to say 30% of the annual salary at max.
3. its a low risk job as a min of x number of tech folks are always required for their tech product to work properly. plus these folks are majorly with similar skills, so 2 react guys can be reduced to 1 but not because of incompetency .
4. even if people are incompetent, our domain is friendly and more like a community learning stuff. we share our knowledge in public domain and try to make things easy to learn for other folks inside and outside the office. this is probably a bad thing too
compare this to businesses , management and sales they have different:
1. thier career progression : saleman > sales team manager> branch manager > multiple branch manager(director) > multiple zones/state manager (president) > multiple countries/ company manager (cxo)
2. their salaries are comission based. they get a commission in the number of sales they get, later theybget comission in the sales of their team> their branch > their zone and finally in company's total revenue. this leads to very meagre number in salaries, but a very major and mostly consistent and handsome number in commission. that is why their salaries ranges from $2k pm to $2-$3millions per month.
3. in sales/management , their is a always a room for optimisation . if a guy is selling less products, than another guy, he could be fired and leads could be given to other/new person. managers can optimise the cost/expenses chain and help company generate wider profits. overall everyone is running for (a) to get an incentive and (b) to dodge their boss's axe.
4. this makes it a cut-throat and a network-first domain. people are arrogant and selfish, and have their own special tricks and tactics to ensure their value.
as a manager , you don't go around sharing the stories on how you got apple to partner with foxconn for every iphone manufacturing, you just enjoy the big fat bonus check and awe of inspiration that your junior interns make.
this sound a little bad , but on the contrary , this involves being a people person and a social animal. i remember one example from the office web series, where different sales people would have different strategies for getting a business: Michael would go wild, Stanley would connect with people of his race, and Phyllis would dress up like a client's wife.
in real life too, i have seen people using various social cues to get business. the guy from whom we bought our car, he was so friendly with my dad, i once thought that they are some long lost brothers.
this makes me wonder : are sales/mgmt people being better at being entrepreneur and human beings than we devs?
in terms of ethics, i don't think that people who are defining their life around comissions and cut throat races to be friendly or supportive beings. but at the same time, they would be connecting with people and their real problems, so they might become more helpful than their friends/relatives and other "good people" ?
Additionally, the skills of sales/mgmt translate directly to entrepreneurship, so every good salesman/manager is a billionaire in making. whereas we devs are just being peas in a pod , debating on next big npm package and trying to manage taxes on our already meagre , "consistent" income :/
mann i want some people skills like these guys10 -
It's CSS quick maffs time! Consider the following code:
<div class='container flex'>
<nav class='menu flex'>
<a href='#'>Menu item 1</a>
(arbitrary amount of links)
</nav>
<button type='button'>Sign in</button>
</div>
You want the layout to look like a horizontally scrolling, single line menu with a Sign in button to the right. Both container and menu are flex containers. So, here's the code for the menu:
.menu {
overflow: auto;
}
The problem is, as there is no flex-wrap, menu will not be wrapped, and it will occupy all the space it's needed to accommodate all the elements, breaking its container. Pesky horizontal scroll appears on the whole body.
Boubas will set menu's width to some fixed value like 800px, and this is a bouba approach because bye-bye responsiveness.
Here's what you should do:
.menu {
overflow: auto;
min-width: 0;
}
.menu * {
flex-shrink: 0;
}
This way, menu will occupy exactly the width of an empty div. In flexbox, its width will be equal to all free space that is not occupied by the Sign in button. Setting flex-shrink is needed for items to preserve their original width. We don't care about making those items narrower on narrower screens, because we now have infinite amount of horizontal real estate. Pure, inherent responsiveness achieved without filthy media queries, yay!
The menu will scroll horizontally just like you wanted.
aight bye14