|
Yeah, I've used TFS, too and I have a big list of things I don't like about it, but I do like the way it handles merge operations, even if the diff tool itself isn't good. Funny I picked today to die on this dumb hill because now I'm looking at merging 300 lines into a test file that someone else also updated with 250 of their own and I'd really like to just run mine and see which tests are still working so I can throw out the failing ones that are just "x should call y" because they're probably just not valid anymore but now of course the file doesn't just run because git shat in it
|
# ? Apr 7, 2016 22:00 |
|
|
# ? Jun 10, 2024 03:40 |
|
The terrible workflow I degenerate into when I've had terrible merges is to clone the repo somewhere else and git diff against that path. Just checkout your (--ours) file in if that's what you want to run.
|
# ? Apr 7, 2016 22:07 |
|
Munkeymon posted:Funny I picked today to die on this dumb hill because now I'm looking at merging 300 lines into a test file that someone else also updated with 250 of their own and I'd really like to just run mine and see which tests are still working so I can throw out the failing ones that are just "x should call y" because they're probably just not valid anymore but now of course the file doesn't just run because git shat in it So revert to your branch and run yours? Unless you're saying you just want git to just automerge what it can and throw away the rest.
|
# ? Apr 7, 2016 23:19 |
|
If you just want the merge-in-progress files to be dumped in a different directory for whatever reason, recent versions of git support having multiple worktrees for a single repo, which probably makes that possible.
|
# ? Apr 7, 2016 23:48 |
|
TooMuchAbstraction posted:I'd think that'd result in the sewage output line from the toilet being 6" to the left of the waste pipe that leads to the civic sewage line. All your windows different shapes and your stairs insulated.
|
# ? Apr 7, 2016 23:54 |
|
fritz posted:All your windows different shapes and your stairs insulated. Every codebase more than a few years old is Groverhaus, really.
|
# ? Apr 7, 2016 23:56 |
|
TooMuchAbstraction posted:Every codebase more than a few years old is Groverhaus, really. Every time you push your own code without review, you become a little more Grover.
|
# ? Apr 8, 2016 00:02 |
|
Munkeymon posted:Yeah, I've used TFS, too and I have a big list of things I don't like about it, but I do like the way it handles merge operations, even if the diff tool itself isn't good. If it shat because of a merge, you can probably git reset --merge and get back to where you started. It actually sounds like most of your issue with Git is the interface, specifically the CLI. Only a maniac would say Git has a good CLI. On the plus side, Git is full-featured enough that there's a way to work your way back from most dead ends, even if the solution is neither intuitive nor discoverable.
|
# ? Apr 8, 2016 00:52 |
|
How do I parameterize a GET request coming from Angular's $http, a developer might ask. A developer might read the documentation or even google it, and find out that you can: code:
Or you might do this: WebAPIConfig: code:
Cuntpunch fucked around with this message at 21:28 on Apr 8, 2016 |
# ? Apr 8, 2016 19:29 |
|
They used a for loop at least... right?
|
# ? Apr 8, 2016 20:28 |
|
EkardNT posted:They used a for loop at least... right? Nope, at the start, we have 1, 2, and 4 param versions - but not 3, because they haven't yet run into a case where the API needed a 3 parameter endpoint I'm also trying to understand how this is going to impact our *non* insane WebAPI endpoints.
|
# ? Apr 8, 2016 21:27 |
|
Cuntpunch posted:Nope, at the start, we have 1, 2, and 4 param versions - but not 3, because they haven't yet run into a case where the API needed a 3 parameter endpoint Are you sure they weren't trying to prank you into searching the codebase for it?
|
# ? Apr 8, 2016 21:50 |
Label your argument lists 1, 2, and 4 and set them loose in the repository. The other developers will wonder where the 3 argument list is hidden.
|
|
# ? Apr 8, 2016 22:18 |
|
I'd just assume it was one hot.
|
# ? Apr 8, 2016 22:20 |
|
Cuntpunch posted:How do I parameterize a GET request coming from Angular's $http, a developer might ask. This kind of thing wouldn't matter if the API server published those route definitions, but I'm guessing people typically write them by hand. To me, that's the horror.
|
# ? Apr 9, 2016 01:04 |
|
Factor Mystic posted:This kind of thing wouldn't matter if the API server published those route definitions, but I'm guessing people typically write them by hand. To me, that's the horror. Mayyyyyyyybe. But even in reading the API endpoint code is a mess: code:
Because outside even that as a *config* point, it's a little offputting to me that - lets say you're checking the price of gas on a given date for a given area GET /api/gas/price?date=2016-04-08&zip=12345 or GET /api/gas/price/2016-04-08/12345 DOUBLY so that they could *still* do the latter with direct endpoint method decoration([Route("{date:DateTime}/{zip:int}")]) instead of standing up some catchall rules that could inadvertantly blow up other API endpoints and using completely generic names aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
# ? Apr 9, 2016 01:45 |
|
Cuntpunch posted:How do I parameterize a GET request coming from Angular's $http, a developer might ask. In fairness, aren't these different things? $http get with params sends a query string, whereas that webapi stuff parameterizes the route? So Angular is sending api/endpoint?foo=bar, the routes are api/endpoint/foo/bar or w/e ed - beaten by the guy above me. I'll note for the record that if you casually google 'REST API endpoint design' or the such, route parameter binding (even for GETs) seems to be recommended everywhere.
|
# ? Apr 9, 2016 04:15 |
|
This week, I learned about code that should not be in mortal hands. I am talking about sun.misc.Unsafe. This is a Java class that allows for a whole bunch of things that are normally not possible at all in Java. It's mostly used by internal Java methods for performance reasons. Have an example use of Unsafe: Java code:
Some of the other things you can do with Unsafe:
The reason I heard about this is because they're changing stuff about this class in Java 9, which will have its official release in March 2017. I am not completely sure what will happen. The person who talked about it while giving a presentation about Java 9 said they're locking it down completely, which means that all those libraries will need to be updated. But some (somewhat older) webpage says that Oracle was thinking about making a public API for it. Source of my example, with a bunch of other examples: https://dzone.com/articles/understanding-sunmiscunsafe Carbon dioxide fucked around with this message at 10:19 on Apr 9, 2016 |
# ? Apr 9, 2016 10:13 |
|
Um. If true doesnt that make the sandbox totally worthless for security? Can you call this stuff in an applet?
|
# ? Apr 9, 2016 13:17 |
|
feedmegin posted:Um. If true doesnt that make the sandbox totally worthless for security? Can you call this stuff in an applet? I am not sure. But I assume it works something like this. The JVM uses a certain part of memory. Within the JVM, this is basically divided into three parts: native, stack and heap. The stack has primitive variables and pointers to the heap, while the heap holds Java objects. Native memory is used for low-level java/JVM-internal stuff that normally cannot be reached with java code. Unsafe allows you to put an object into this native memory but the JVM cannot recognize it as an object unless you use Unsafe again to specifically read it as an object. The JVM can also allocate free native memory to the heap in order to expand the heap. But all of this native, stack and heap memory exists within the JVM. It's a division of memory that only makes sense within the Java Virtual Machine. The JVM itself lives in the true heap memory of the machine it runs on. So it's not like you get access to the real machine's native memory. Security is still fine. Someone correct me if I'm wrong, I'm not much of an expert on this low-level stuff.
|
# ? Apr 9, 2016 14:20 |
|
feedmegin posted:Um. If true doesnt that make the sandbox totally worthless for security? Can you call this stuff in an applet? No, the sun.* packages are inaccessible to applets.
|
# ? Apr 9, 2016 15:39 |
|
uncurable mlady posted:In fairness, aren't these different things? $http get with params sends a query string, whereas that webapi stuff parameterizes the route? And the very first hit on Google immediately dives into the fact that Filtering via querystring(and the second, and third, and fourth) is how to do filtering on a REST api . Because querystring parameters and REST are not some sort of opposing topics. Perhaps abstracting out the param to foo=bar was too much? Imagine I've got a service that looks up census data. I can either GET /api/people?bornafter=2001-09-11&stillalive=true or GET /api/people/2001-09-11/true One of these APIs self-documents and the other does not.
|
# ? Apr 9, 2016 15:51 |
|
I explicitly assign the endpoint url for every controller method i have using Route decorator. Am I the horror?
|
# ? Apr 9, 2016 16:05 |
|
Shinku ABOOKEN posted:I explicitly assign the endpoint url for every controller method i have using Route decorator. Am I the horror? Compared to what? That's what I would *expect* at least in WebAPI land. On a given controller, I tend to RoutePrefix the baseline("/api/type") Then excepting the stuff that will work against that *specific* endpoint(generally just GET!) I like to explicitly declare both the expected Route and the verb [Route("{typeId:int}")] [HttpPut] [Route("{typeId:int}/subtype")] [HttpGet] or similar - rather than setting up comedy catchall rule in the global config, and using method names to *infer* the expected verb.(PutType(), GetType(), PatchType()) etc.
|
# ? Apr 9, 2016 16:13 |
|
Cuntpunch posted:Compared to what? Every tutorial and template I could find. I think even the official MSDN tutorial uses the blanket route map.
|
# ? Apr 9, 2016 16:44 |
|
Cuntpunch posted:And the very first hit on Google immediately dives into the fact that Filtering via querystring(and the second, and third, and fourth) is how to do filtering on a REST api . Because querystring parameters and REST are not some sort of opposing topics. Perhaps abstracting out the param to foo=bar was too much? i've actually seen something like this before /api/people/by-date/since/exists/2001/09/11/by-status/alive?offset=x
|
# ? Apr 9, 2016 21:08 |
|
Cuntpunch posted:And the very first hit on Google immediately dives into the fact that Filtering via querystring(and the second, and third, and fourth) is how to do filtering on a REST api . Because querystring parameters and REST are not some sort of opposing topics. Perhaps abstracting out the param to foo=bar was too much? i mean you're not wrong, i'm just telling you what i've seen in terms of 'api design' from the more node/flask side of things i guess. /shrug
|
# ? Apr 9, 2016 21:12 |
|
Biowarfare posted:i've actually seen something like this before Can this be the new thread title.
|
# ? Apr 10, 2016 00:36 |
|
Biowarfare posted:i've actually seen something like this before
|
# ? Apr 10, 2016 00:41 |
|
FamDav posted:Can this be the new thread title. Please yes. That is terrifying.
|
# ? Apr 10, 2016 01:56 |
|
Biowarfare posted:i've actually seen something like this before I bet they claimed this poo poo was RESTful too.
|
# ? Apr 10, 2016 02:03 |
|
Eleeleth posted:I bet they claimed this poo poo was RESTful too. rest, hateoas, and only supports GET, no put/patch/post/delete edit: you can update user records with something like GET /api/people/ceffc1ed-436b-4acc-83c0-6a2051f0d5ce/update?fieldname=newvalue
|
# ? Apr 10, 2016 02:11 |
|
Biowarfare posted:edit: you can update user records with something like GET /api/people/ceffc1ed-436b-4acc-83c0-6a2051f0d5ce/update?fieldname=newvalue I give up.
|
# ? Apr 10, 2016 03:20 |
|
Am I.....missing something?code:
|
# ? Apr 11, 2016 13:19 |
Cuntpunch posted:Am I.....missing something? I think they want a DateTime that represents the day without a time-of-day component. There has to be a better way to do that...
|
|
# ? Apr 11, 2016 13:27 |
|
nielsm posted:I think they want a DateTime that represents the day without a time-of-day component. In a single line? code:
|
# ? Apr 11, 2016 13:41 |
|
Cuntpunch posted:In a single line? code:
|
# ? Apr 11, 2016 13:59 |
|
ninjeff posted:
Even better
|
# ? Apr 11, 2016 16:38 |
|
I was looking for the link somewhere in this thread for the Classname quiz that uses the silly Spring class names and you have to select the real one from the made up ones. ie AbstractSingletonProxyFactoryBean
|
# ? Apr 12, 2016 11:05 |
|
|
# ? Jun 10, 2024 03:40 |
|
TheresaJayne posted:I was looking for the link somewhere in this thread for the Classname quiz that uses the silly Spring class names and you have to select the real one from the made up ones. http://bfy.tw/5DuV
|
# ? Apr 12, 2016 11:48 |