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 - "foo bar bar"
-
Fullstack dev: Hey I need your help with one of this method in the service layer (We use Java).
Me: Sure. What’s up!
Fullstack dev: When you get a user ....blah blah blah...
Me (typing code):
if (user != null) { ... }
Fullstack dev: Wait! This won’t work. You need to write this:
if (null != user) { ... }
In Java, you write like this. In JS it’ll work, not in Java.
Me: (also fuck this guy)
He’s among the famous devs in the company - (A very very very famous European bank).
I checked his commits for the frontend (React Native)
switch (some_expr) {
case foo:
return stuff()
break // <— note this
case bar:
return moreStuff()
break // <— note this
// more cases here with break after return statements
}
Me: Hey if you’re returning from a case why are you using a break. It’s dead code.
Fullstack dev: It’ll fall through otherwise.
———————
You’re a fucking dunce! Please drink a litre of Carborane in a rusty HIV infested container! Cheers!
PS More to come!33 -
Anybody else here has a coworker who insists on having comments everywhere and writes code like this?
// Get foo
foo = getFoo();
// Check if foo is greater than bar
if (foo > bar)
Or is it just me?22 -
That time when you code up something really cool (to you, that is...) and none of your friends understand.
Me: "Look at this cool thing!"
Them: "Looks like a bunch of numbers."
Me: "But they mean foo, bar, and baz!"
Them: "Whatever."
:(3 -
!rant
Thinking about quitting my job and opening a bar named "foo" where the walls have a tapestry of random foo-bar code examples. (Easy conversation starter for programmers)8 -
A CMS raping WordPress so hard up the ass till there is no tomorrow. I hate that bastardized piece of fuck. “Hey I want you to fix my page and its wordpress. I pay 20 bucks.“ Well fuck you too sir. Wordpress is no cms you wanna be coders. Get back to your fucking photoshop and design something original! Every fucking wp page looks the same. Every “nice feature“ is some kind of monkeypatched workarround. No problem i set preview pictures for every post just to enable some weird slider to function.
I also love those buttfucked files with just a “require foo“ which also just requires “bar“. Drop that fuck. Implement autoloading. Nobody uses php4 anymore step into the future. “easy to learn“ fuck me and fuck you untill you vomit jizz! Clusterfucked spaghetticode thats easy, easy to put another rotten load of clusterfuck on top. Also those security features. I put an empty index.php to prevent directory traversal. N I C E! Stop using wordpress as CMS, its a blog engine. Nothing great has every been written on top of wordpress and never will. I dare you to deny everything related to it and if you are one of those designer guyd, you can gargle my jizz you fucknut!
Starting 2017 i will start a counter and rape every 10th Wordpress which gets abused as cms i encounter into oblivion on their 0,99$ webhosting shit.
Fuck this I'm so mad about that crap17 -
In 2018, while working in Tokyo for a Fukuoka-based startup, one of my co-workers insisted that he wanted an SSL certificate installed on his local dev machine, but he didn't know how to do that. So I created and self-signed one for him. When our CEO came to visit our Tokyo office from Fukuoka, the coworker proudly showed him how his browser would display that green lock icon when visiting localhost:3000. This apparently impressed my CEO, because a few days later the coworker was invited to work at the HQ in Fukuoka while everybody else at the Tokyo office (incl. me) was let go.
This coworker would also only copy whole open source repositories, foo/bar/g all occurrences of the project name with our company name, and tell our CEO that he wrote that code.
I don't know how to deal with this bullshit.9 -
“Never,never, never, NEVER eat raw userinput“
Referring to stuff like “insert into foo (bar) values ($_POST[username])“2 -
I'm planning on making a band called Bar Fighters and will play songs like Integer Or Long, The Renderer, Test of U nit, Learn to Try ( catch )5
-
Interviewer: So which university are you from?
Me: I am from "foo" university.
Interviewer: So why did you not go to "bar" university?
Inner Me: Wtf kind of a question is that. Why the fuck aren't you a unicorn with pigs flying out of your ass and a globally reknowned researcher at Stanford?
We all end up where destiny takes us. Some of us try very hard but things don't magically happen for us. We keep trying but at the end of the day you end up where you end up.
Real Me: I just finished my High School and had the entry test the next day. I was not prepared at all.4 -
For a developers ranting social media platforms, it sure seems strange that we can't format code snippets... 🤔
At least something like `foo(bar){}` would be awesome!3 -
Does anyone else really dislike "foo", "bar" and "baz"? Because fuck me I do. My brain can't process that stuff, I need some actual real world context.
or, maybe i'm just dumb.8 -
Oauth2 examples.
Seriously all examples I found use library that use library that use library to just build url encoded parameters like this
client_secret=foo&code=bar
Got me 5 hours to dig going trough couple of github repos with implementation to see that shit at the end.
Seriously people !!!
Start thinking before you write single line.
I don’t want to download 10 dependencies and 100MB+ just to send 2 requests with url encoded parameters.
It’s in every - literally every language.
I know you’re stupid but please just try to understand how things work instead of copy paste another stackoverflow and medium snippet.4 -
A typo today has rendered me the joke of the office... 😂
Almond's PR: "Added missing unit testes to classes Foo and Bar"
----
Bob: "LGTM. Bet that took some balls."
Craig: "LGTM. Missing unit testes drive me nuts."
Ian: "LGTM. Write your testes with your code guys, a bit bollocks to have to add them afterwards." -
So I was reviewing my old code. Refactoring and improving the documentation.
This is a production app that is being used 24/7/365.
I see myself using "bar = foo" and there's even an explanation of what it does.
Apparently I resolved a relatively difficult Date object issue and had to use temporary variables.
Didn't know how to call them and ended up with these jewels.3 -
Huh. ES6's variable destructuting on objects is actually pretty cool.
var {foo, bar, baz} = obj
Is functionally equivalent to this:
var foo = obj.foo
var bar = obj.bar
var baz = obj.baz
I like it! Makes things simpler.3 -
Working on my Google Foo Bar level 4 challenge.
9 days past figuring out how to solve this problem..
And finally reached on a working solution. When started compiling my solution.
And then i Find out, the fucking Google tool is facing some bug and not allowing compilation. Tried hard to do everything but still getting errors...
And after searching on Google just found I'm fucked up.. It's on Google's end and they are not fixing it since so many days..
Just 5 days left to complete.. And i have no idea what should i do...
4 month work just fucked up9 -
Strings in most languages:
(☞゚ヮ゚)☞ foo: string = "bar"
Strings in rust:
(╯‵□′)╯︵ AHHHHHHH!
borrowed value does not live long enough
types differ in mutability
cannot assign twice to immutable variable22 -
God, Allman indentation style is such pain... God bless K&R...
For those who don't know, Allman is this:
void foo(void)
{
statement;
statement;
}
and K&R is this:
void bar(void) {
statement;
statement;
}12 -
Yesterday
Boss: Can you export the foo data and send it to me?
Me: Sure
Me (later): Ok, just shared foo.csv with you. It should have everything you need, just let me know if you need the bar data.
Boss: OK, thanks.
Today
Boss: Did you get the foo data exported?
Me: Yes, I shared that with you yesterday
Boss: What did you name it?
This is all in a chat, by the way, not in person. Scrolling for 1.5 seconds reveals all the relevant information.
How do I respond in a way that is not sarcastic and does not belittle my boss? I'm not sure it's even possible.2 -
I swear to god you'll never feel more epic while coding than when you listen to the dovahkiin song.3
-
Your choice. Select one
1.
foo (bar) {
return true;
}
2.
foo (bar)
{
return true;
}
3.
foo (bar) { return true; }
4.
foo (bar)
return true;
5. Collapse
|-------------------|
| foo (bar) ... |
|-------------------|
6.
#define foo boo
#define bar par
#define ( `
#define ) '
#define return go_home
#define true false
#define { ☞
#define } ☜
6-1.
boo `par' ☞
go_home false;
☜
6-2
boo `par'
☞
go_home false;
☜
6-3.
boo `par' ☞ go_home false; ☜
6-4.
boo `par'
go_home false;
6-5.
|--------------------|
| boo (par) ... |
|--------------------|
Select and Comment below.
Or add your own.27 -
Boss: I want feature foo!
Me: that will be a bit tricky because bar...
Boss: It's easy, you just baz!
Me: ok boss :) *hax around bar*4 -
Java: String foo =“bar”;
C#: var foo = “bar”;
Go: var foo string = “bar”
I just started learning Go and I’ve been cringing since.19 -
I almost got caught by this during an interview:
const foo = ['a', 'b'];
const bar = foo.findIndex(x => x === 'a'); // 0
if (bar) { // I'm an idiot
console.log('Do something');
}
🤦♂️23 -
My favorite command of day is 😂
rm -rf {foo}/{bar}
Reference if you don't know what happened today:
http://independent.co.uk/life-style...2 -
Am I the only one who doesn't know where foo bar came from? I see it all the time but have no clue :/3
-
I lost points for not including the following comment:
//Declaring variables
int foo, bar;
I already knew how to code, and I completed the assignment in the fewest number of lines needed while still being well commented explaining my logic. I lost points because I didn't say what everyone understood.4 -
Bug I had to fix today: some elements in our React app were being swapped with other elements.
We had `<foo>bar</foo>` on the component but on the html `foo` was being swapped with some other element in our app. It's contents ("bar" in the example) were being left in place, though, so we were getting `<baz>bar</baz>`.
This would only happen when running on production mode. On development everything was fine.
Also, everything seemed fine on the React dev tools. `foo` was where it was supposed to be, but on the html it was somewhere else.
Weirdest shit I ever saw when using React. I found a way to go around it and applied that fix, but I'm still trying to track this down to the source.
The worst part was waiting for fucking webpack to finish the production bundle on every fucking change I wanted to test. I didn't miss the change-save-compile-test flow at all.
What a shit day.4 -
Metasyntactic variables, you use them, but do you know their origin?
This should be essential programmers knowledge:
https://ietf.org/rfc/rfc3092.txt/1 -
Being told code is "production ready" only to find this:
if name == 'foo' or name == 'bar' or name == 'someothershit'
What's wrong with:
if name in ['foo','bar', 'someothershit']?
Oh and they had 10 different values they were matching, not just 3. What kind of joker am I dealing with?1 -
How many devs here got hired through Google's Foo Bar challenge or got the invitation?
I got the invite and have sent my assignments for review. Anyone know what happens next.20 -
Alright since I have to deal with this shit in my part time job I really have to ask.
What is the WORST form of abusing CSV you have ever witnessed?
I for one have to deal with something like this:
foo,1,2,3,4,5
0,2,4,3,2,1
0,5,6,4,3,1
bar,,,,,
foobar,,,,,
foo can either be foo, or a numeric value
if it is foo, the first number after the foo dictates how many times the content between this foo and the next bar is going to be repeated. Mind you, this can be nested:
foo,1,,,,
1,2,3,4,5,6
foo,10,,,,
6,5,4,3,2,1,
bar,,,,,
1,2,3,4,5,6
bar,,,,,
foobar,,,,,
foobar means the file ends.
Now since this isn't quite enough, there's also SIX DIFFERENT FLAVOURS OF THIS FILE. Each of them having different columns.
I really need to know - is it me, or is this format simply utterly stupid? I was always taught (and fuck, we always did it this way) that CSV was simply a means to store flat and simple data. Meanwhile when I explain my struggle I get a shrug and "Just parse it, its just csv!!"
To top it off, I can not use the flavours of these files interchangably. Each and everyone of them contains different data so I essentially have to parse the same crap in different ways.
OK this really needed to get outta the system6 -
Working on an Android app for a client who has a dev team that is developing a web app in with ember js / rails. These folks are "in charge" of the endpoints our app needs to function. Now as a native developer, I'm not a hater of a web apps way of doing things but with this particular app their dev teams seems to think that all programming languages can parse json as dynamically as javascript...
Exhibit A:
- Sample Endpoint Documentation
* GetImportantInfo
* Params: $id // id of info to get details of
* Endpoint: get-info/$id
* Method: GET
* Entity Return {SampleInfoModel}
- Example API calls in desktop REST client
* get-info/1
- response
{
"a" : 0,
"b" : false,
"c" : null
}
* get-info/2
- response
{
"a" : [null, "random date stamp"],
"b" : 3.14,
"c" : {
"z" : false,
"y" : 0.5
}
}
* get-info/3
- response
{
"a" : "false" // yes as a string
"b" : "yellow"
"c" : 1.75
}
Look, I get that js and ruby have dynamic types and a string can become a float can become a Boolean can become a cat can become an anvil. But that mess is very difficult to parse and make sense of in a stack that relies on static types.
After writing a million switch statements with cases like "is Float" or "is String" from kotlin's Any type // alias for java.Object, I throw my hands in the air and tell my boss we need to get on the phone with these folks. He agrees and we schedules a day that their main developer can come to our shop to "show us the ropes".
So the day comes and this guy shows up with his mac book pro and skinny jeans. We begin showing him the different data types coming back and explain how its bad for performance and can lead to bugs in the future if the model structure changes between different call params. He matter of factually has an epiphany and exclaims "OHHHHHH! I got you covered dawg!" and begins click clacking on his laptop to make sense of it all. We decide not to disturb him any more so he can keep working.
3 hours goes by...
He burst out of our conference room shouting "I am the greatest coder in the world! There's no problem I can't solve! Test it now!"
Weary, we begin testing the endpoints in our REST clients....
His magic fix, every single response is a quoted string of json:
example:
- old response
{
"foo" : "bar"
}
- new "improved" response
"{ \"foo\" : \"bar\" }"
smh....8 -
Just got off the phone with a csr about a bug they found. No biggie, I said I'd fix it. Basically until it gets fixed I told them that when they do their process to make sure to do "foo" first, then "bar" second. As soon as I got off the phone, had to poop so I went to the bathroom, and as soon as I sat down I get a message from the same CSR, "Hey I did bar first, can I type foo then bar again?"
WTF DID I JUST SAY LITERALLY 2 MINUTES AGO ON THE PHONE. TBH IT WOULD BE BETTER IF YOU JUST DIDNT DO ANYTHING FOR 15 MINUTES BUT NOW I HAVE TO COMB CLOUD FUNCTION LOGS, FIND THE DOC UID YOU CREATED, FIND THE DOC YOU MADE, DELETE IT, DELETE THE ASSIGNMENT IN YOUR TRASH ASS WORKPLACE PORTAL, AND STILL FIX THE SAID BUG3 -
Reporting is not fun..
Scenario 1:
* A user says they need to export certain data from our system..
* Developer W makes report called "Foo detail report"
Scenario 2:
* A user says they need this report to also show some extra fields
* Developer X makes a new report called "Foo detail report (extra fields)"
Scenario 3:
* A user says they need this report to be run with a different search criteria
* Developer Y makes a new report called "Foo detail report (extra fields) by bar"
Scenario 4:
* A user says they need this report show data grouped in a different way
* Developer Z makes a new report called "Foo detail report (extra fields) by bar- new grouping"
The above scenarios happened over and over for several years in no particular order...
Current Day:
* Some users have certain reports they use and rely on but we don't know which ones
* Nobody really knows what all of the reports do or what is the difference between them without looking at the sql
* If we want to change data structures we have many reports to update
* I have a request from a user to add an extra column to one of the reports1 -
Hiii devRanters, I have a TypeScript question for you...
How do I dynamically import classes?
I have a class like this:
export default class Foo implements Bar {
...
....public getName(): string {
........return this.name;
....}
}
and then I have another file with this:
import(`./class-cmd/${file}`).then((command) => {
....winston.debug(command);
....winston.debug(command.getName());
});
the first command spits out something like this:
debug: default=class Foo {
....constructor() {
........this.name = "foo";
....}
....getName() {
........return this.name;
....}
}
and I would expect that the second command will work, however it throws this:
UnhandledPromiseRejectionWarning: TypeError: command.getName is not a function
Any idea what I might be doing wrong?18 -
Still find it amazing how archaic command prompt is, why do we still need to manually select which drive we want before cd'ing into the directory...
Why can't we just do cd D:/foo/bar, I understand you want us to use PowerShell Microsoft but you are the company that still ships internet explorer so please at least bring it up to standard a little -,-2 -
There's two types of people:
if ($foo == $bar) {
// Something...
}
AND
if($foo==$bar)
{
// Something...
}11 -
The document.getElementbyId function . It is so long.
Aldo this probably poes not count but the export function does not accespt whitespace before and after the = sign
So instead of
export PATH = "$PATH:/foo/bar/baz"
You need to write
export PATH="$PATH:/foo/bar/baz"8 -
My whole workflow for HTML is frustrating. I rather write pug, because it has mixins, includes and isn't that fucking repetitive. But to write pug within Laravel blade views, I have to preprocess it too blade. Then sometimes the syntax gets crazy because of escaping blade loops like an insane guy ('| @foreach($foo as $bar)'), but you get used to it after time.3
-
Null-propagation operator and null coalesce all in one line makes me tingly.
return registryKey.GetValue("foo")?.ToString()??"bar"; -
That moment where you see code of someone who riddles their code with nested if-else and if-elseif statements.
I don't remember writing an else statement for years. It almost always can be avoided (and the rare cases where it makes sense I prefer the switch statement).
Yet I never grasp why people do:
```
if(someCondition) {
// huge nested code block
} else {
throw new Error();
}
```
Instead of
```
if (!someCondition) {
throw new Error();
}
// continue in the normal scope
```
And then we have experts that like doing:
```
if(someCondition) {
if (bar) {
$foo = 'narf';
} else {
$foo = 'poit';
}
// huge code block
if($foo == 'narf') {
if(yetAntherCondition) {
// huge code block
} else {
throw new Error();
}
// huge code block
} else {
throw new Error();
}
} else {
throw new Error();
}
```
Help!
If ever was to design a programming language, I'd forbid the `else` and `elseif` keywords. I have yet to find an instance where I could not replace some `else` by either a guard or an early return or introducing some polymorphism.1 -
so a colleague of mine, which is fresh out of Uni. as software engineer has no clue of what Foo and Bar stands for...7
-
And here I am again, reading test cases that basically boil down to:
$testCase->foo = "bar";
$this->assertEquals($testCase, "bar");
$testCase2->foo = null;
$this->assertNull($testCase2->foo);
Why would anyone feel the need to write these kind of tests? They don't do anything. If I set up my mock a certain way, of course I will have that data, esp. if the unit under test only applies the data AS IS. (Funily enough through another component that already has the relevant dummy tests in place making these tests extra redundant and obsolete.)
You would think that one test case with dummy data suffices, yet no, there are like 30 examples that lie to you about apparent business logic cases, yet in the end the way you set up the mock decides what you will or won't get.
What's the point?6 -
try{
someObject.someAttribute = (int?) reader["columnName"];
}catch{
someObject.someAttribute = null;
}
Or, same coworker, another piece of code:
if(((int?)reader["foo"]).HasValue){
bar = (int?)reader["foo"];
}else{
bar = null;
} -
I just reviewed a pull request with a test case like (pseudo code):
# Test MyService
const mock = createMock(myService.myMethod)
.whenCalledWith("foo")
.returns("bar");
assert(mock.myMethod("foo") === "bar"));
Why though? Why are we testing the mock? What is happening here? This test has no reason of being there instead of a fuzzy feeling that we now have unit test to lure us into a false sense of security.
I asked why we don't do an integration test. Response was: "They are slow."
Well, duh, but at least they would actually test something.
What do you gain by asserting that the mock is working the way you set it up?3 -
Guess I'm getting old (school) outputting foo, bar and baz for testing purpose. Does anyone still using those too?5
-
I really want my dev team to ask me to go to happy hour so I can suggest meeting at Foo Bar. Though, that may be why no one's asked..3
-
While everyone is hating proper programming languages... Let's talk about quotes in batch files.
What the actual fuck did Bill smoke while developing this boolshit?2 -
Is writing hand-optimized SIMD code even still worth it? Thinking about writing my own little math library for my game engine but I've tried writing a hand-optimized `dot(normalize(b - a), foo) >= bar` and somehow it's actually slower than writing the same thing using a math lib which is implemented exclusively with scalar math and auto vectorized by llvm
LLVM... I kneel5 -
Our software outputs some xml and a client has another company loading this xml into some data warehouse and doing reporting on it. The other company are saying we are outputting duplicate records in the data.
I look and see something like this:
<foo name="test">
<bar value="2" />
<bar value="3" />
</foo>
They say there are two foo records with the name test..
We ask them to send the xml file they are looking at. They send an xlsx (Excel!) file which looks like this:
name value
test 2
test 3
We try asking them how they get xlsx from the xml but they just come back to our client asking to find what we changed because it was working before. Well we didn't change anything. This foo has two bar inside it which is valid data and valid xml. If you cant read xml just say so and we can output another format! -
package bar;
public class Foo {
public static void main(){
System.out.println("Hello, World!");
}
}
I still wonder why I didn't start with Python, print('Hello, World') is a god damn one-liner7 -
<?php
// This is the demo code of a PHP gotcha which took me some hours to figure out
$hr = "\n<hr>\n";
$JSON = '{"2":"Element Foo","3":"Element Bar","Test":"Works"}';
$array = (array)json_decode($JSON);
echo "Version: " . phpversion() . $hr;
// Tested on: 5.5.35 and 7.0.15
var_dump($array);
// Prints: array(3) { '2' => string(11) "Element Foo" '3' => string(11) "Element Bar" 'Test' => string(5) "Works" }
echo $hr;
var_dump($array['Test']);
// Prints: string(5) "Works"
echo $hr;
var_dump($array[2]);
var_dump($array['2']);
var_dump($array["2"]);
var_dump($array[3]);
var_dump($array['3']);
var_dump($array["3"]);
// Prints: NULL + Notice: Undefined offset ... in ...
echo $hr;
$newArray = array();
foreach ($array as $key => $value) $newArray[$key] = $value;
var_dump($newArray[2]);
var_dump($newArray['2']);
var_dump($newArray["2"]);
// Prints three times: string(11) "Element Foo"
var_dump($newArray[3]);
var_dump($newArray['3']);
var_dump($newArray["3"]);
// Prints three times: string(11) "Element Bar"1 -
So apparently the variable names foo and bar come from an old military term FUBAR which means f-ed up beyond all recognition.... Those OG UNIX guys hid their memes really well
-
Looking at jest errors and loads of GitHub and StackOverflow issues, it's no surprise that people claim they don't like testing.
Maybe they would if we got our tooling right.
import { foo } from 'bar';
Nah, that's an unexpected token, jest does not like this syntax.
Using require, like in jest's getting started tutorial isn't compatible with my existing JS libraries exports.
Adding type: "module" in package.json just makes another error message appear instead.
Fucking developer experience!
Why bother with unit tests at all?
How come PHP is 10 years superior to JS when it comes to code quality, unit tests, and static code analysis?
I don't even care about "ES modules". I don't want to "mock" anything either. All I want to do is import a handful of JavaScript functions into another file.
Overengineered web dev stack sucks!3 -
We are launching a new product soon. The C-levels have decided to call it "Foo Bar" (fictive name).
Now all our products are called:
"Foo Desktop"
"Foo Mobile"
"Foo Bar"
Nearly all internal & external reports previously was that "Foo" has problems. We nearly never know if they are talking about the desktop app or mobile app. Soon we will not know for sure if they report a problem about "Bar", Desktop or Mobile.
All 3 applications uses a different tech stack with their unique problems :') -
I'm reading some react/typescript code and I haven't work much with any other language or paradigm where I might have a function return multiple objects that are different types
e.g.
const { sna, foo, bar } = useWhatever();
I mean I guess it's just unpacking properties from the actual return object but that isn't apparent to a newcomer at a glance (if I remember correctly)
https://softwareengineering.stackexchange.com/...
Looking for additional insights from the wise devrant community30 -
#Suphle Rant 9: a tsunami on authenticators
I was approaching the finish line, slowly but surely. I had a rare ecstatic day after finding a long forgotten netlify app where I'd linked docs deployment to the repository. I didn't realise it was weighing down on me, the thought of how to do that. I just corrected some deprecated settings and saw the 93% finished work online. Everything suddenly made me happier that day
With half an appendix chapter to go, I decided to review an important class I stole from my old company for clues when I need to illustrate something involved using a semblance of a real world example (in the appendix, not abstract foo-bar passable for the docs)
It turns out, I hadn't implemented a functionality for restricting access to resources to only verified accounts. It just hasn't been required in the scheme of things. No matter, should be a piece of cake. I create a new middleware and it's done before I get to 50 lines. Then I try to update the documentation but to my surprise, user verification status turns out to be a subset of authentication locking. Instead of duplicating bindings for both authentication and verification, dev might as well use one middleware that checks for both and throws exceptions where appropriate.
BUT!
These aspects of the framework aren't middleware, at all. Call it poor design but I didn't envisage a situation where the indicators (authentication, path based authorisation and a 3rd one I don't recall), would perform behaviour deviating from the default. They were directly connected to their handlers and executed after within the final middleware. So there's no way to replace that default authentication scheme with one that additionally checks for verification status.
Whew
You aren't going to believe this. It may seem like I'm not serious and will never finish. I shut my system down for that day, even unsure how those indicators now have to refactored to work as middleware, their binding and detachment, considering route collections are composed down a trie
I'm mysteriously stronger the following day, draw up designs, draft a bunch of notes, roll my sleeves, and the tsunami began. Was surprisingly able to get most of previous middleware tests passing again before bed, with the exception of reshuffled classes. So I guess we can be optimistic that those other indicators won't cause more suffering or take us additional days off course2 -
Our #bigtech repo is like 19 billion LOC so how am I the first one to try to do simpleThing with obviouslyRelatedThing?
My search foo yields nothing and I fear its not supported yet.
fml4 -
Using variables names like asd, qwe, a, x in demo/tests. But using "Foo, bar" before shoeing to anyone.1
-
Reading code and getting that face palm moment
String code = customer.getCode();
customer.setAccount("foo");
customer.setGroup("bar");
customer.setCode("new code");
Ok this is preparing the customer obj makes sence.
Some 20 lines later
customer.setCode(code);...... Wtf1 -
Ok so I got namespace N.
And namespaces N\a and N\b.
I would like N\a\foo() to call N\b\bar().
But no matter what I do it says \N\b\bar() does not exist. What am I doing wrong??
I've tried including, using, requiring but nothing.8 -
*Python:*
```
d = json.loads(str)
d['foo'] = bar
json.dumps(d)
```
*Scala:*
```
Caused by: TimerException{org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `scala.collection.immutable.Map` (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
at [Source: UNKNOWN; line: 1, column: 1]}
... 15 more
```2 -
Your branch and 'origin/foo/bar' have diverged,
and have 2 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
git pull
hint: You have divergent branches and need to specify how to reconcile them.
git merge origin foo/bar
Already up to date.5 -
It's always a matter of much is there to do and in what language...
There is the IDE-Zone, which is dominated by IntelliJ (CLion be praised when you do Rust or C++) for large stuff and heavy refactorings.
Always disputted by VS Code with synced settings. It's nice and comfy and has every imaginable language supported good enough, especially when its smaller change in native code or web/scripting stuff.
Then there is the "small changes" space, where Vim and VS Code struggle whos faster or which way sticks better in my brain...
might be you SCP stuff down from a box and edit it to re-upload, or you use the ever-present vi (no "m" unfortunately)
sometimes things are more easy for multi-caret editing (Ctrl-D or Alt-J), and sometimes you just want to ":%s/foo/bar/g" in vim.
I am sure that each of these things are perfectly possible in each of the editors, but there is just reflexes in my editor choices.
I try to stay flexible and discover strenghts of each one of my weapon of choice and did change the favorites. (Atom, Brackets, Eclipse, Netbeans, ...)
However there are some things I tried often and they are simply not working for me...
might for you. I don't care. and I'll just use some space to piss people off, because this is supposed to be a rant:
nano just feels wrong, emacs is pestilence from satan that was meant for tentacles instead of fingers, sublime does cost money but should not, gives me a constant guilty feeling (and I don't like that) that, and all the editors from various desktop environments are wasted developer ressources. -
I really am in a love/hate relationship with programming...
I had some free time so I decided to do the Google foo bar challenge. For testing purpose, I code in sublime text and then copy the code in the browser.
Yesterday, I spent most of the afternoon doing one challenge. I figured out how to approach the problem, which was kinda easy, and coded it in about 10 minutes. For some reason, what worked perfectly in sublime text worked without throwing any errors in the browser, but 4 of the 5 test done by Google failed.
Today, after spending a good hour tweaking some stuff in the hope that it would work, the browser editor started throwing indentation errors...
Deleted the code in the browser, copy-pasted the exact same code from sublime : All test passed!
That's a couple of hours I'm never getting back. -
Colleague tells me that, in PHP, this is an unsafe selector.
$a = $some_array['foo']['bar'];
And that if ['bar'] has no value, $a will default to $some_array['foo']
Is this right?, because that doesn't seem right to me...9 -
Just saw a production website where the routing looked like this:
https://domain.tld/Default.asp/... -
package main
// go is very frustrating. in their efforts to keep the language simple, they've broken its consistency :(
// A A is just some arbitrary interface
type A interface {
Foo()
}
// B is an interface requiring a function that returns an A
type B interface {
Bar() A
}
// Aimpl implements A
type Aimpl struct{}
// Foo is Aimpl's implementation of A
func (a Aimpl) Foo() {}
// Bimpl attempts to implement B
type Bimpl struct{}
// Bar is Bimpl's attempt at implementing B.
// problem is, if Bar returns an Aimpl instead of A, the interface is not satisfied
// this is because Go doesn't support implicit upcasting on returns from interfaced objects.
// if we were to simply change the declared return type of Bar() to 'A', without changing
// the returned value, Bimpl will satisfy B.
func (b Bimpl) Bar() Aimpl {
return Aimpl{}
}
var _ B = Bimpl{}
func main() {
}2 -
TypeScript has two levels of private values (at least in the beta):
private foo = false; // Cannot be accessed outside the object in TypeScript
#bar = false; // cannot be accessed outside the object in both TypeScript and JavaScript.2 -
I have a readonly object property foo on a typescript class. When I create an instance bar by calling the constructor, bar.foo doesn't compare equal to this.foo as seen from within bar several async calls later. What could I have possibly fucked up?4
-
Golang: It's stupid that the language doesn't allow the variable 'result' to be used out of the if scope, although it's been declared outside the if scope:
if result, err := foo(bar); err != nil {
// do something with err
}
// no err, so do something
// with result.
// But No! you can't.3 -
http://website.com?foo=bar&baz=bin039;m trying to map, for example, something like http://website.com?foo=bar&baz=bin to something like http://website.com/bar/bin. I'm pretty sure its doable but I'm having a terrible time getting it to work.3