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 - "value"
-
Logic Gem found at work today.
if (value != null) {
return value;
} else {
return null;
}
😂 😂😂😂😂😂10 -
Did this on my first programming exam.
int index = 0
int value = 0
try {
while true {
value += array[index]
index++
}
} catch NullPointerException {
System.out.print("Sum: " + value)
}
The task was to add together all numbers in an array.
I somehow aced the exam, but got called in to teachers office this is not the way to use exceptions.7 -
A coworker was working on some code and wrote two return statements and asked a senior developer why the second value wasn't being returned.7
-
1) I accepted this job for way way less money than market value.
2) Approached boss about having performance review because I had been here over 12 months and no one brought it up to me.
3) Had performance review where they offered a big raise (12% but still way under market value)
4) I countered asking for market value and showed aggregate research (30% increase)
5) A week later we meet again and they offer 23%.
6) That's where we ended at, pretty surprised they offered that much, but glad. I wasn't looking forward to looking at other jobs to catch up to market value.
7) Feeling pretty good considering I've never negotiated anything before.7 -
"Can you help me make an app? I've got this perfect idea, but I can't tell you what it is until you've said yes."
SIGH. I wish these people knew that perfect ideas are worthless, there are plenty of them. Perfect executions of good ideas are what has value.6 -
Job Ad: You will report to leadership stakeholders on key progress initiatives and collaborate on business value add action objectives.
Translation: Have boss. Do task.3 -
[2010]
Begins Bitcoin mining during it's infancy, stops because it's a waste of time and has no value.
[2017]
1 BTC = £5,874
i cri evrytiem ;_;5 -
In the last 48 hours Bitcoin has gained about 2.000 USD in value. (Now ~12500$)
WHAT THE FUCK
And I remember this summer when Bitcoin was at about 4000 and everybody said "naaah I'd rather not invest in Bitcoin now, it will fall in value soon"17 -
"What idiot left a console.log in a function call spitting out the value of the onchange......oh fuck, that was me "
-
Me in a test:
if(boolean)
return value;
return something_else;
I then lost 2 marks for not having an else statement -.-30 -
!Rant But after seeing this I laughed like hell I need to share this to all my dev folks.
Client: “Our next requirement, we need an elephant”
IT Team: But why don’t you adjust with a buffalo, even it is big…. and black?”
Client: No, we need an elephant only.
IT Team: Fine, I understand your requirement. But our system supports only a buffalo…
Client:We need only an elephant!
IT Team: Ok, let me see if I can customize it for you”
At the Offshore Development Centre :
BA – Client wants a big black four legged animal, long tail, less hair. Having trunk is mandatory. The same was documented, signed off and sent to offshore for development! Based on requirement all features are supported in base product (as buffalo), for trunk alone a separate customization is done.
Finally the customization is shown to client, and the client faints
Addon to this, testers completed their test case as above1 -
Actual code
if (dict.ContainsKey(key))
{
//do nothing
}
else
{
dict.Add(key, value);
}
I'm speechless15 -
What is the optimum value for z-index in css?
z-index: 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999;4 -
Even during games, I find bugs in it...
Just found NULL in FIFA GAME.
Wonder which object failed to pass it's value2 -
Is anyone getting any actual value out of them? As much as I dig agile some of the rituals plain just don’t work.
Fight me!13 -
Visual Studio : Not all code paths return a value
Me : That method is only with a single line, and it's a return with the value. Don't fucking kidding me.10 -
Never hack a game and change the gold value to 1.0e307.... It takes so long for my CPU to update its value whenever it changes......
This game is over 😢😥
Also always remember to take a backup before making dumb hacks....1 -
My Proudest creation of all time up till now,
i created a wpf control that binds to any Enum value and displays either a combo box (if the enum had a single value) or a collection of checkboxes (if the enum had a flags attribute)
So happy ^^4 -
Who the hell decided to put 'null' in JavaScript when there is already an 'undefined'
...😤😡...
Like one empty value isn't enough24 -
I asked a junior dev to convert y axis value to dollars and render the same on a chart. This is what he does.9
-
( bad english alert )
Why everybody from my school class, saying "Windows is better than linux, because windows don't have commands like linux"12 -
FUCK STATIC-SIZED ARRAY!!!
FUCK YOU!!!!
FOR MORE THAN 3 HOURS I TRY TO ADD A VALUE TO AN ARRAY
Nothing work...
Nothing...
AAAAAAAAHHHHHHHHHHHHHHHHHHHHHHH!!!!!18 -
Funny how on Facebook (which I left years ago) I used to never get any likes for anything I wrote, even if it was meaningful.
Then I would look at the feeds of my friends and they would get ++'s for mainly useless and uninspired pop-culture reposts or posts of high narcissim.
It's ironic how they praised garbage rather than value.
I'm glad that on Devrant I at least get ++'s, indicating that people can relate to me. On Facebook, people faux-relate based on narcissim and faux-culture.
Shrug.12 -
Explicit!
Okay so someone asked me to explain difference between an iPad & PC & i did it something like this:
If you provide a kid with a condom and a balloon, which would he value more?
Now give the same set to a mature adult, which would he value more?
We know which one serves the greater purpose right? 😝9 -
Like WTF!
"the value of NaN is result of an operation that cannot produce a normal result. NaN is not equal to any value, including itself."
The funny or wierd part (maybe just for me):
"You can detect NaN with the isNaN(number) function".
Like whaaat? 😶25 -
Anyplace that places a higher value on being "woke" and "inter-sectional" than actually doing the job.9
-
Few days ago I wrote function that finds occurrence of value in array:
function findOccurrence(value, array) {
for (var i = 0; i < array.length; i++) {
if (value === array[I]) return true;
}
return false;
}
But there's already [].includes() function in JavaScript.5 -
Coolest bug I ever found was the temperature sensor connected to a raspberry pi giving me -40 as a value.6
-
Spent 30 minutes figuring out WHY THE FUCK is toggle not working.
Turned out the value was undefined because of a fucking typo!1 -
Currently working as student part timer on a company that I really like.
When I'll finish my bachelor's degree, I will have been there for about 2-3 Years, additional to my 5 years working prior to that as a developer.
Today I learned, that our company doesn't usually pay the market price for devs (not a huge company, 150 employees, so it's understandable).
So now I don't know what to shoot for when discussing a raise after my degree. Should I still aim for market price? Should I argue with that and hope for the best?
I'm really unsure about that stuff...4 -
When the competitor company you declined to join 3 months ago is now sinking (-60% stock value in a day) #feelinglucky
-
"Sometimes the best way to prove your own value is to let a client play the field." - Matthew Haeck1
-
Just learned the previous dev team thought a db column with a value of NULL or "Y" was a great way to handle boolean values.5
-
Do you think refactoring code adds value?
Pick one:
1. Hard No (Only refactor when there is a dollar value associated with it, i.e new feature depends on it).
2. Somewhat Yes (Futureproof your code, anticipate easiness to build feature requested in future).
3. Yes (Developer happiness, retention and for point 2)27 -
private String field;
public void setField(String field) {
field = field;
}
// I was wondering why didn't the value change3 -
I have not researched it so I'm not sure if this is a widely known thing but I figured out a sort of hacky way to get a max integer value:
-Declare an unsigned int.
-Subtract 1
-Divide 2
That is your max signed int value
int main(){
unsigned int a = 0;
a--;
std::cout << a / 2 << std::endl;
}7 -
Is there automation tool for postgres or mysql to fire a query? I got a db that will reset the row column value after 1 month of the created date
Edit: I know this is not SO
Not clearing the rows, just resetting the value of some rows if the criteria is met12 -
Going to make a new programming language, positive# .
Where the default value of a Boolean is true instead of false. -
Challenge☕️💻🎊
_________________________
Changing value of two variables without using third variable.16 -
Javascript promises: I JUST WANT THE FUCKING VALUE OF A PROMISE.
WHO THE FUCK THOUGHT PROMISES SIMPLIFIED ANYTHING?!11 -
I know most of you know this, but after having dealt with both recruiters and real companies I can safely say that recruiters are of no practical value.
I've wasted countless months of my life interacting with recruiters and getting nothing out of them. To me it seems they're only after fluffing their client base.
The only time I got a job was through the real companies themselves.
Now I have learned the lesson: stay away from recruiters.6 -
I wish homework worked like an ES6 Promise: "A Promise represents a value which may be available now, or in the future, or never."1
-
People who don't ++ OPs, nor comments or add anything of value on social media / thread.
Please.
What is your purpose but self projection?16 -
Standing in the balcony, staring at the setting sun, I wonder to myself, "What does having a null value REALLY mean??🤔"5
-
it was not a technical interview.
just screening.
guy: tell me smth about redis.
me: key value, in memory storage.
guy: more
me: umm, the concept is similar to localStorage in browsers, key value storage, kinda in memory.
guy: so we use redis in browsers?
me: no, I mean the high level concept is similar.
guy: (internally: stupid, fail).3 -
Today on "You're wasting your life by not writing typescript"
Union types
The value with redux, among other things, is incredible3 -
When you need to change a variable's value, but can't find the variable name since you're spelling it right.3
-
In what fucking programming language a constructor can return a nullable value???
Swift of course. :|
Fuck apple :-)5 -
I feel like Gordon Ramsey today.
"The default value is only used when there is no current value for the field. That's why it's called fucking default vAalue!"2 -
javascript generated captcha and javascript captcha validation in my university website... over hundred thousand students use this website to check results
function ValidCaptcha(){
var string1 = removeSpaces(document.getElementById("AVCODE").value);
var string2 = removeSpaces(document.getElementById("UVCODE").value);
if (string1 == string2){
return true;
}
else{
alert("invalid captcha");
return false;
}
}
function removeSpaces(string){
return string.split(' ').join('');
}1 -
I actually experienced this today:
"Halp, why is this not working?"
$array = [];
$array->key = 'value';
...a few more...1 -
Guess who forced unwrapped Nullable value after making sure it was null... Yup that was me
(ಥ,_」ಥ)
(ノಥ,_」ಥ)ノ彡┻━┻4 -
Come up with a bad version of flipping a bool's value. (value = !value)
I'll start with a bad way of doing it in C# (.NET):
char[] bca = boolWert.ToString();
if (bca.Length == 4 && bca[0] == 't' && bca[1] == 'r' && bca[2] == 'u' && bca[3] == 'e')
{
boolWert = !bool.Parse($"{bca[0]}{bca[1]}{bca[2]}{bca[3]}");
}
else if (bca.Length == 5 && bca[0] == 'f' && bca[1] == 'a' && bca[2] == 'l' && bca[3] == 's' && bca[4] == 'e')
{
boolWert = !bool.Parse($"{bca[0]}{bca[1]}{bca[2]}{bca[3]}{bca[4]}");
}
else throw new Exception("y e s");4 -
Why do all these quantum computers I see look like steampunk chandeliers?
And what's the real value going to be?10 -
I fix antique code for a living and regularly come across code like this, and this is actually the good stuff!
Worst usecase for a goto statement? What do you think?
int sDDIO::recvCount(int bitNumber){
if (bitNumber < 0 || bitNumber > 15) return 0; //ValidatebitNumber which has to be 0-15
//Send count request
if (!(send(String::Format(L"#{0:X2}{1}\r", id, bitNumber)) && flushTx())){
bad: //Return 0 if something went wrong
return 0;
}
String^ s = recv(L"\r"); //Receive request data
if (s->Length != 9) goto bad; //Validate lenght
s = s->Substring(3, 5); //Take only relevant bits
int value; //Try to parse value and send to bad if fails
bool result = Int32::TryParse(s, value);
if (!result) goto bad;
int count = value - _lastCount[bitNumber]; //Maximumpossible count on Moxa is 65535.
if (count < 0) count += 65536; //If the limit reached, the counter resets to 0
_lastCount[bitNumber] = value; //This avoids loosing count if the 1st request was
//made at 65530 and the 2nd request was made at 5
return count;
}4 -
Why the actual fuck would you #define function calls into value-like things?!
Found when exploring the example code for some Chinese company's display module.11 -
Important rule of programming: don't swallow exception and provide details for troubleshooting.
Visual Studio: The project file contains a property value that is not valid.8 -
Checking the whole code for finding the null value. Gone through the process multiple times.
Oh boy, it was wasn't "personId", it was "personID". -
What's your opinion on the error-value vs try-catch debate?
I'm usually on the error-value side of things.
Its the preferred error-handling in Go and the pretty much only decent solution in C.
Also, frequently thrown exceptions seem to impose a larger overhead than the constant checking of the error-value.23 -
After I read clean code I talked to a fellow developer about some concepts. Later I reviewed some code of him and he clearly got the concept (not)
Java
...
If (isTrue(someValue))...
public boolean isTrue(boolean value){
if(value == true)
return true;
else
return false;
}9 -
People are so cheap. I hear people say things like "Frontend Masters is too expensive." I'm pretty sure that I just got 2k of value in the last 3 hours... Maybe those people aren't 'cheap' per say - but more generally, don't understand the concept of value. I'm sure they see that attribute in their clients, but never themselves. Better for me I suppose!4
-
Turns out
if(double.TryParse(input, out double value)
{
//Do something with value
}
can't be used in compilers using C# versions prior to 7.0. Reason: → out double value ←
...k den7 -
Don’t use an array with index to get a value without checking the length. Don’t use an object without checking for null.
-
- only idea is not enough
- it should bring in value to you
- accept you can’t do everything all by yourself4 -
I'm boutta make a scripting language with classes, trait generics AND two kinds of value types
Call me Mr. Dangerous 😎14 -
Update Table_Name Set Column_Name = ‘New Value’;
Commit;
I did this on prod and my manager started screaming on me.
Is there any issue in it?5 -
My life ends in a simple sentence:
"Unexpectedly found nil while unwrapping an optional value"
Only Swift developers will understand.2 -
Today I learned that for boolean HTML attributes, they are considered true if they're present on the element at all, regardless of their value. And that as a rule, you should specify the empty string("") in value.
This wounds me on a logic level since everywhere else in JS, "" is false.
What.
The.
Fuck.
Seriously. Why?14 -
Fuck testing react native apps with Detox ! I can’t select a value in a picker no matter what I do 😭2
-
Debugging a previously employed intern code for hours (poorly written JavaScript). Found out they were comparing the exact string value of the input boxes. #smh5
-
CEO of spotify saying that content creation costs are nearing 0.
Saying nothing about that content that costs 0 to create have also 0 value.16 -
I just love PHP. You can do so much awesome stuff with it. Here, let me show you:
How to READ a private member of an object:
$reader = \Closure::bind(function ($instance, $name) {
return $instance->{$name};
}, null, $instance);
$value = $reader($instance, $name);
How to WRITE a private member of an object:
$writer = \Closure::bind(function ($instance, $name, $value) {
$instance->{$name} = $value;
}, null, $instance);
$writer($instance, $name, $value);
See? Just like that. This is really amazing stuff. I don't know of any other languages that allow this.10 -
Still trying to understand a good old pile of legacy:
function isValidDate($value) {
if ($value == "" || ($value == 0 && is_numeric($value)) {
return true;
}
// goes on to check if value is some number between 2000 and current year
}6 -
Js -
"Let me just call this function"
"Oh I need to do something with the return value. Callback"
"Oh I need to do something with that value too. Another callback..."
"Oh, again. Another callback"
"I should have thought about this more beforehand..."1 -
Today I had an, argument with my C# teacher because he believes that reference types are passed by value
I posted a link on Facebook to MSDNs page about it, but somehow some guy in my class still argued for it being pass by value. The reason he says so is because the value is the reference, even though it's quite literally a reference.
It's a reference to a variable rather than, a value.
Kindly
Fuck
Off12 -
if(obj == value) {
stuff;
}
Is for boys,
Arrays.asList(obj).filter(o -> o == value).forEach(o -> stuff);
Is for men1 -
So, today I revisited my 5 months old code and was like "What? Did I really wrote this horrible code?" 😐️ 🙂️ 😃️🔫️
```js
setState((initVal) => {
initVal.food = 'burger';
return initVal;
});
```
The function above change its argument's value, which is terrible thing to do, since it will also change the original value passed to the function. A variable's value for example. Making it an impure function.6 -
Just a short reply to whoever deleted his rant because he didn't read the JS docs.
map is a map. You don't just dump a function call into there. You map the value to el and the value is then set to the function result.
This works:
new Array(38).fill("10").map(el => parseInt(el));6 -
Failing to return a value in a function result in a warning in gcc. Why isn't this considered an extremely dangerous error?1
-
I can't believe that a modern language like JS is still lacking basic utilities like removing something from an array by value6
-
When both AI and search engine results are getting worse over time, will devs and users finally value knowledge and learning again?8
-
Today's comment of the day:
# Begin OMFGWTF
...
# End OMFGWTF
10 completely separate variables all set to the same damn constant value. -
Without using editor...
public class Test {
public static void main(String[ ] args) {
int value = 3, sum = 6 + --value;
int data = --value + ++value / sum++ * value++ + ++sum % value--;
System.out.println(data);
}
}
a) 1 b) 2
c) 0 c) 318 -
!Rant
Dear fellow front end developer, why?, just why would you use "!important" on every property value inside your @media query?2 -
I don't want to enable Fucking Adaptive Brightness, I pulled the brightness bar all the way to the right because I want the brightness to be set to maximum. Eat shit.13
-
"The value used to compute the x position of either side of the rectangle."
and
"The value used to compute the x position of the other side of the rectangle."
I get it ... but man documentation if you don't already get it ... like nobody is gonna get that.4 -
Did A big stupid thing right now
Deleted a web page, which took me three days to write. Very pissed right now. Should have added to GitHub repo
I started working on a new file on my project. After I finished working on the project I started doing something which didnt worked out. So I deleted the local version of the repo since the repo was backed up on the server. But the file that I completed last night was not yet added to the repo.1 -
For a long time I wanted to have the possibility in Swift to copy instances of value types by just changing the value of one property (member variable).
Something like Kotlin's copy function.
And now that Swift has macros (like Rust), I made a macro for that! 😄
https://github.com/WilhelmOks/...4 -
Want to get last value of a list?
value = 0
for value in list:
pass
working with 10 year old code :/2 -
So Ive to make new screens in xaml in combination with C# (WPF)
So I had something like this in the codebehind
titleBox.Text = Properties.Resources.someKey
The resources looks like
<data name="someKey">
<value>some text</value> <!-- this is some comment --> <!-- and another one -->
</data>
The title got as value "and another one", when I removed it it became "this is some comment" removing that resulted in the value "some text"1 -
Incredible that these companies with literally no product, and barely a website (if any) come around offering 100K+ jobs
They have funding out of their ass but literally NO real-world value... it's amazing to me.
Guess it really is not what you can do but who you know.1 -
“This value must be shorter than 20 characters in length.” … password field, bank website, 2016, wtf ¯\_(ツ)_/¯2
-
When you spent two hours of debugging because that one variable somehow has the value of NULL which can't be because it is initialized with another value and you realized you mistyped the name on one of your procedures, so VBA automatically instantiates a new variable and initializes it
-
Anyone tell me...
what is wrong?
https://gist.github.com/cozyplanes/...
<!DOCTYPE html>
<html>
<body>
<input type="text" id="username" />
<input type="text" id="subtext"/>
<br>
<button type="button" id="create">Create</button>
</body>
</html>
<script type="text/javascript">
var username = document.getElementById("username").value;
var subtext = document.getElementById("subtext").value;
var url = "https://devbanner.center/generate/...;
document.getElementById("create").onclick = function () {
location.href = url;
};
</script>27 -
Found this in our Python codebase:
my_dict[key] = "%s" % str(my_dict[key])
Best way to convert a value to string xX -
Teaching a colleague to use INDEX / MATCH in Excel
Me: Type in =MATCH() and select the reference cell, the column its in, and put 0 for the last value.
Them: OK... Done
Me: Now type in =INDEX() and select the column you want to match with, then put in the value you got from MATCH()
Them: OK... Done
Me: Now combine the two formulas
Them: How?
Me:...1 -
Anyone else think the emphasis on scaling is misplaced?
I think we can have more innovative products that solve real problems in specific ways if people focused on solving specific problems rather than targeting wider audience in attempt to sell to as many as possible.24 -
I'm learning swift and my forse test app is useless, but now i can see the actual Epoch value 😂😂😂😂2
-
Some Java code I looked through to figure out how to accurately rework a mapping of value intervals to status colors:
• 16 levels of indentation
• Calls an instance method one line before a null-check
• Assigns that same value to a new variable and null-checks it again
• Insistently loops over existing HashMaps' entry sets to find a value by key
• Stringifies a Gson object, parses back the string and then null-checks the result.
• Mixes up the 'leq' and 'geq' comparison operators twice, which is why I went to check the implementation in the first place.
And this wasn't even legacy code. It's from last year.1 -
Today I learned.
In php if you cast a string to array you get an array with one value: the string.20 -
People have to realize that people are unique no matter the skill set. You can replace the skill set but not the person.1
-
I haven't coded a new project in a long time. I want to build something, show it to the world and hope people use it. I love webapps as I'm pretty experienced in this, and have a huge interest for smart homes, internet of things, twilio, innovative payments and more. What could my MVP be?11
-
Naming a value of a button, UX vs Back-End Developers:
UX Designers: "Unsubscribe"
Back-End Developer: "Click this button to unsubscribe to this service" -
*array* in php. As soon as the word "array" is in it's name it's argument order, type and return value are just fucken luck.1
-
Loving inaccurate documentation...
And it's from a big company as well!
Reset value: 0x0000007F
I didn't get it to work for several hours.
And then I checked...
The actual value it gets reset to is 0.
Just 0. -
Study all nite for an interview, come early to the university to find a quiet place to peacefully take the interview. The interviewer does not join the call for 2 hours. The hr does not reply in the above period.Hungry sad sleepy above all insulted.4
-
Questions that are bothering me:
When a function that returns void returns, is any value from the stack frame copied into the register?
Is the return address in the stack frame even allocated, or is it nullptr?
Could a void function theoretically return a value if you hacked one into the frame?
Does the register even know to expect a value from a void function? If so, where is the logic for this and what is difference between a void and non-void function return at the stack frame & register level?
Any good books on this stuff?2 -
Learnt Something new today.
'The fear of losing something motivates people more than the prospect of gaining something of equal value.'3 -
I'm studying Databases and I'm getting confused about Foreign Key.
A Foreign Key made reference to Primary Key of another table. But what's the point? Can't I simply use a value and select requested data where TableA value is equal to TableB value?
Sorry if I didn't explain it well, I'm so confused lmao6 -
It's really important to have a portfolio?
What's the value of a beautifull and fullfill portfolio? How it can help?6 -
Oh shit! My previous rant is super stupid! Fuck me.
Its almost like:
isalpha (value);
And asking why are you putting the value if you already know. 😐 Now I understood it's General way of showing things. Noob issues! 😬
Now I understood how people overreact just because they didn't think for a second.
Stupid me. 🙈 -
Not sure if other programming languages class a Boolean as an integer value buuuuuuut...
The amount of times I've seen people do code such as...
if(value == true) {
variable = "blah blah";
} else if(value == false) {
variable = "blah";
}
Instead of doing a simple 1D array and going...
variable = strings[value];
It drives me crazy, such a small thing that has no real benefit but... Ugh... Whyyyyyyy3 -
I had to optimize a SQL-Query and i was able to cut the amount of time in half.
The business part of the company said it is still too slow, so i researched deeper and looked into the called functions which are used in every part where to claculate value X.
Found 20 similiar selects to get values which are summed up afterwards into three different variables. Thought this can be done in three selects with "sum", but then i found the dumbest thing is this function:
V1, V2 have the values from the selects
V3 is ja given value
X is the return value
the function returns another value
help = functionCall(parameter) - V1 -V2
X= help + V1 + V2 +V3
WTF im mean it does the selects for nothing...
X = functionCall(parameter) + V3 -
What happens on Friday, 11 April 2262 23:47:16.855, to the Unix timestamp? It arrives to the maximum value8
-
Is there a Map like class in Java that has
getKey(value), getValue(key).
Guess not hard to implement but why reinvent the wheel..15 -
Please share your thoughts on Dependabot security alerts on Github, more specifically for NPM packages in package-lock.json.
In 99% of cases I've found them useless as:
- package-lock.json is in the repo, but not in the NPM package (=no value to users)
- most of the updates relate to devDependencies (=no value to users)
- it clutters the git history (and changelog if it is auto-generated) with a batch of patch updates (updated depx to .1, .2, .3) while the only important thing in the next release notes is the delta (updated depx from .1 to .3) (=no value to users)10 -
The NASA website sends back a header called X-launch-status. Right now it has the value “go flight!”1
-
Spent 4 hours trying to make a query work and failed miserably.
Turns out I was using inverted commas around the value.
What the ....1 -
There was a rant here from someone about being let down by the people that hired them...
I was commenting but the rant was deleted.
I feel you friend. Leave to another place where you're trusted and valued. -
My biggest flaw when working in IT: I will refuse to prioritize time- consuming work with minimal added value (cf premature optimization, 0.001% edge cases) when I have a backlog of work that will add much more, obvious value and I will not budge to manager or architect power-plays and tendencies to micromanage my responsibilities, even if it may eventually end up getting me in trouble.2
-
int three = 3;
// several lines after
something.setMaxValue(three);
Oh, Junior... not again...
I just hope that the max value never changes to 4. -
Had a php float value that I needed to use as a string, so I typecasted it.
Later on in the code I need the value again but now it was a string.
Typecasted it back to a floating point.
My colleague almost killed me when he found out what caused the miscalculations.2 -
Day 3 as the Junior Dev.
Co worker fucks every time on defining functions in python
What my asshole teammate does is:
def someShitFunc():
print(shit)
And he was clearly instruct to return value not print the value what a jerk he is.
I have to fix his all problems and in meeting he brags how his code worked. What a sucker.4 -
Hacky code post:
property var value: if(editing || !editing) function(othervalue)
I am coding in a property system that only updates an expression if a variable involved emits a signal. Well the function won't get called unless I change a value. I also want to "value" to be updated when editing changes. I also want it to update even if editing doesn't change. So the or-ing of the state of editing.
The result is the function gets called when object is initialized. Then when the editing flag changes it gets updated again. The workaround of doing this is much worse and requires more hacky code. So I am resigned myself to just or-negating the editing value.10 -
Setting up some CSS animations and ended up with the value "infinite ease" and now I am having an existential crisis.1
-
Does Professional Scrum Master certification add any value to a devs profile? I am asking because I failed in the first attempt. 😟4
-
Ops teams that are "assuring" stability of production by being the only ones who can click to deploy to Prod add no value.1
-
Why it is such a pain to scan nullable types on Golang database.sql
Now I have to chose between:
1- Using temporaty variable to hold the nullable value just to soon after check and set the zero value if it is null
2- Adding coalesce to my sql query for the zero values.
Did I mention that there are around 20 collumns that are nullable...1 -
Quick Java question.
Does spending £200 on Oracle certification raise your job market value?
Or is it just a pointless money maker for Oracle.3 -
I'm working with an xml schema that effectively emulates xml... inside xml...
It looks like this
<child>
<tag>ABC</tag>
<value>DEF</value>
</child>
I don't event want to get started on how it handles child elements.
This is some next level abstraction hell.
And it's not like it can't use normal XML tags. In other parts of the project it uses a slightly more sane schema.5 -
Spending 30 minutes of my life searching for the bug that triggers database update events, doesn't update the value. Turns out that I've always put the dame value in it. ARRGGGGHHH!
-
"It needs to be pixel perfect"... Given single design for desktop (users use mobile app), with random spacing and inconsistent vertical and horizontal rhythm.
From @browniefed on Twitter1 -
Java has the worst kind of union type where every method returns the union of Exception | null | value.17
-
Argument exception message convention: is it better to specify what is allowed or what is not allowed? Eg: "value must be a positive integer" or "value can not be negative"?2
-
It is not only about how good your code is, it is also the business value your code provides.
- Unknown3 -
Please look at this code, I wanna know why the $ and {} was added to the alert method to pop up the key and value of user.
what is their functionality there?
let user = {
name: "John",
age: 30
};
// loop over keys-and-values
for (let [key, value] of Object.entries(user)) {
alert(`${key}:${value}`); // name:John, then age:30
}4 -
Is there actually a proper way to do Math in Javascript, without parsing every value to avoid something like
"1" + 3 = 13 ?rant trying to learn proper math start to hate dynamic var types wtf is going on with that language javascript advice needed11 -
Functional programming in a one liner:
const value = (define_value, start) => value(define_value(start))1 -
Got bored while pushing a large unity project, set Nice=-15
Works like a charm.
Actually, a GUI tool would be nice, something like xkill that sets the nice value of the owner of the clicked window to a really low value, for when you just want to get something done quickly. -
that tech will collapse as it provides no real value and I don't have the chops to switch to a different industry2
-
int reading;
bool status;
long barcode;
char entry;
unsigned value;
bool disabled;
🎈🎈🎈🎈🎈🎈🎈🎈🎈
float theyall; -
"Unexpectedly found nil while unwrapping an Optional value"
What dev thought this would be a good idea in Swift? Sometimes I hear the compiler's thoughts as it comes across this:
1. The dev explicitly told me this value would be optional.
2. I have a record from the database, and I see a 'nil' in the column for this value.
3. That's not "None" , Oh my god, I need there to be an explicit "None<CustomType>".
4. Shit shit shit shit. Oh my god.
5. PANIC!4 -
!rant
How do I set a default value for a dropdown if no option is selected?
I tried
<option value="">Select one option</option>
or value="0"
It gives me a NullPointerException10 -
Duuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuck off you bloody infamous basterds flattening their fat asses at Microsoft.
I wasted half of my dev day to configure my wcf rest-api to return an enumeration property as string instead of enum index as integer.
There is actually no out-of-the-box attribute option to trigger the unholy built-in json serializer to shit out the currently set enum value as a pile of characters clenched together into a string.
I could vomit of pure happiness.
And yes.
I know about that StringEnumConverter that can be used in the JsonConvert Attribute.
Problem is, that this shit isn't triggered, no matter what I do, since the package from Newtonsoft isn't used by my wcf service as a standard serializer.
And there is no simple and stable way to replace the standard json serializer.
Christ, almighty!
:/ -
Top Tip: When writing 200 line functions why not have a string variable named 'tmp' that changes it's value multiple times throughout?2
-
I think if you are a beginner and you want to learn to program it's always better to look at the current technologies in the industry. This does not only apply to beginners, even those who are already in the industry as this may help to decide which language or framework you want to learn. In order for you to decide you need to know the market trend and the stability. I think the following links can help quite a lot.
https://insights.stackoverflow.com/...
https://octoverse.github.com/
https://madnight.github.io/githut/...3 -
Only math would be so bold to use an undefined value/parameter name as the argument for a function. I gave it an Uncaught ReferenceError.1
-
So I've spent some time learning a little about the halting problem, and it's quite fascinating. I tried to simplify it down to these few functions. What do you guys think? Obviously, psuedo-code, so don't get too caught up on the syntax 😆
The Halting Problem:
public String doesItHalt(Callable function){
...
if (...){
return "Yes"
} else {
return "No"
}
}
public int someFunctionFooThatHalts(){
...
}
public int someFunctionFooThatDoesNotHalt(){
...
}
public String inverseAnswer(value){
if (value == "Yes"){
return "No"
}
if (value == "No"){
return "Yes"
}
}
public String inverseHalts(Callable function){
return inverseAnswer(doesItHalt(function))
}
————————————————————————————
$ doesItHalt(someFunctionFooThatHalts)
Yes
$ doesItHalt(someFunctionFooThatDoesNotHalt)
No
$ inverseHalts(someFunctionFooThatHalts)
No
$ inverseHalts(someFunctionFooThatDoesNotHalt)
Yes
$ doesItHalt(inverseHalts(doesItHalt))
???2 -
Just realize how childish (or dirty minded) I am. I just named a variable that holds the result of another value multiplied by 3 ‘threeSum’.
-
Life that that is mostly filled with suffering instead of enjoyment, is a life not worth living.
i dont value life15 -
Just askin:
If you have a method which returns a value from an array. What do you prefer in a case when the item is not found?
A)Throw an exception
B)return null
C)return a special value like a null object or some primitive type edge value like Integer.MIN_VALUE14 -
Came across a bug in our code today where we were trying to store to large of a value in a database field. Turns out we intentionally set the value to a huge number just so that we could tell another process farther down the line that the object containing it needed to be deleted...Really??? Lol
-
Is anyone in the house working on Cloud Access Security Broker (CASB)? If yes, how is the domain and what's the market value of it?
-
Wanna get the next value of a sequence in Oracle? Oh just do :
SELECT sequence_name.NEXTVAL FROM DUAL
Wanna get the current value instead? Try this query :
SELECT last_number FROM all_sequences WHERE sequence_owner = '<sequence owner>' AND sequence_name = '<sequence_name>';
Yeah thanks Oracle...1 -
I'm trying to set value of a kendo js property using value from dB. I would like to do something similar to
template : "#= dataItem.Item1 #"
But I can't use template for what I'm trying to set -
tldr: Fuck webpack with a big rusty pipe.
I have a class and in the construct a method is called with an imported value as the argument. This imported value is declared like this:
export const EXT = 'whatthef';
Seems like webpack moves things around in such a way that this constant isn't aceasable in all contexts.
Spent a good 4 hours figuring that out 🙃2 -
Am I wrong to think my senior using an expiry date value null as forever weird or is this common practice?4
-
I just realized something important. View this from economic perspective:
1. More quantity of something in circulation = the less value it has
2. Every year there are more new degrees = the ____ value a degree has
You fill in the blank13 -
Python:
TypeError: unsupported operand type(s) for %: 'tuple' and 'dict'
Ugh there's a comma somewhere. I kinda appreciate how easy it is to make a tuple, but at the same time I don't. If there's no value after a comma with only one value behind it, could the linter at least mark it as a warning?2 -
Alright so I have a question, hopefully this is the right platform to ask. As an entry level software developer I have trouble knowing my value. So I was wondering what an entry level developer is expected to do on their first job straight out of college. What responsibilities do they or should they have. And what kind of work are they expected to do? For example should they be building applications from start to finish or more smaller tasked work or bug fixes. Thoughts?3
-
I once declared and initialized a variable with a default value all together. (var a= "default";)
And in a certain IF condition the variable value has to be changed, so i was changing the value of the variable inside IF condition. If (x==y) { a=" newVal" ;}
During a code review i was asked why i am not assigning the default value in ELSE condition. And i was like whut 😑.
So........ Some Programmers be like IF shouldn't exist without ELSE.6 -
I identified the need for a product akin to an ORM that maps an algebraic type system such as that of Rust to a key-value database (my situation dictates lmdb but I'd like to abstract away the store). Can you recommend prior art for me to research?4
-
is this what they call an identity?
log(n, n**(1/n)) == n
first argument in log is the value
second argument is the base10 -
I haven't coded a new project in a long time. I want to build something, show it to the world and hope people use it. I love webapps as I'm pretty experienced in this, and have a huge interest for smart homes, internet of things, twilio, innovative payments and more. What could my MVP be?
-
I need help solving this problem, idk how to make it decrement if for example the value is 0.1, idk how to make it turn into 0.09. plus I don't know how to make the user choose to either increment or decrement the value.2
-
Anybody know how I could make an RxJS observable without RxJS?
I'm working on a library and I need it to be small (So including RxJS isn't really viable), run in the browser (IDK if Browserify will work for RxJS), and be fast. I need a way for a given element to 'listen' (or in RxJS terms, 'subscribe') to a value and update its text content whenever the value changes.
My current implementation is just a interval loop that checks if the previous value is the same as the current one, and if it isn't, it modifies the DOM.6 -
I declared a boolean variable to be public static in my android activity and assigned a false value to it outside the onCreate.
only one method can change its value to true, so once its executed
the value of the boolean variable was set to true even on a new launch after finishing the activity.
didn't know why but it happened.
solved it by assigning a false value in the onCreate method. -
God damn it!
Tried to use scipy's UniveriateSpline on some (x,y) coordinates that I have and it throws errors because I have multiple x values with different y value. UniveriateSpline expects all x values to be incresasing. Problem is I want to use these values, otherwise the result might be different than expected. B-Splines shouldn't be dependent on this condition or have I missed something in my studies? Documentation doesn't tell me anything.🙄 -
Minimise (or if possible, eliminate) free-text interaction in deployment scripts. You *will* type in the wrong value.
-
Exceptions... Are they good for anything? I haven't seen them add value to code once in my career...
-
Why does the TSQL BETWEEN operator include the first and last value in the results when filtering on numbers, but only includes the first value and not the last for dates?3
-
Anyone know how to square a negative value in perl? It doesn't seem to work no matter what we've tried7
-
Today, I saw a table mean to store tags designed horizontally, each column store a tag with value 1 or 0. 🤦🏻♂️
-
grrgerefaeornvadfvnafvalfbv!!!!!!! *smashes keyboard*
Crystal reports, when given a null value into a display string, will just ignore everything and output a blank.3 -
New to AWS, is my best option for having a integer value (maximum number of items to process) that I can override for a lambda step function
to read a value from an S3 bucket where I can overwrite the value if I want to change it. This seems silly and I feel silly as I expect my situation should be simple and not novel at all.
For some reason I expected I could use an environment variable, but didn't see an option to overwrite it in the web GUI https://docs.aws.amazon.com/lambda/...2 -
Anyone knows how to hash the OAuth 1.0 signature with RSA-SHA1 using PHP? Using only the value to be hashed and a key?1
-
Software or hardware design solutions that are retrofitted for Legacy systems. I understand the value of backwards compatibility, but Gah damn!
-
Does anyone find any value over doing paid courses online vs just watching youtube videos about the content?
I've learned just about everything in my career by reading/watching tutorials and following along. I'm confused as to why people pay for that kind of training when it's freely available. Is there real value there?10 -
Hi, in my JS project I have to update a variable value that is getting a text input's value in order to use it dynamically with different functions across my program. What would be the best approach to doing this?
Should I make a function that updates the variable for every character typed or should I simply get the value when the function is called?
Thanks!2 -
How the fuck do i save metabox input value in database.
This is my code:
add_action( 'add_meta_boxes', 'Wp_metabox' );
add_action('save_post', 'wp_custom_save');
function Wp_metabox()
{
add_meta_box(
'wp_custom__metabox',
'Custom Meta Box Title',
'wp_custom_metabox_callback',
'slider',
'advanced',
);
}
function WP_custom_metabox_callback($post)
{
<input id="text"
type="text" value="text" />
}
function wp_custom_save($post_id)
{
$text = sanitize_text_field($_POST['text']);
update_post_meta($post_id, '_text', $text);
}
How in the fuking world do i get the input value of the field and then save the value in database? There is no documentation for this shit.1 -
I hate it when devs use value attribute instead of place holder especially when you know that input text is definitely going to change.
-
Biggest deceit in Java developer's life : this value can never be null, leave that extra null check.1
-
pow function accept var ?for example x2=2 ;
int count =2;
pow(count, x);
should return 4 but return other value9