|
For solo projects I like to git merge --no-ff because it creates logical groupings of my commits.
|
# ? Aug 17, 2017 04:03 |
|
|
# ? Jun 7, 2024 22:46 |
|
Eela6 posted:We're hiring a devops team, so I actually have some hope. Bad news: hiring a "devops team" means that whoever is responsible for that decision doesn't understand what devops is.
|
# ? Aug 17, 2017 04:39 |
|
TheBlackVegetable posted:Often I'm working on a new feature when a bug needs to be fixed in production, so I check out master, fix the bug, push, build and release then rebase my feature branch back onto master to incorporate the bug fix into my dev environment. TheBlackVegetable posted:Exactly that, I've tried using merges and the linear history is much more appealing to me over the spaghetti bowl of merged branches I had before that. What do you mean linear history? I mean you're basically going out of your way to delete information because it looks nicer? I guess? Pretty sure if you want you can get git log to display your history like its linear even if it isn't. There's times when rebasing is useful or necessary but that seems like extra steps for no reason. Zaphod42 fucked around with this message at 07:17 on Aug 17, 2017 |
# ? Aug 17, 2017 07:12 |
|
Zaphod42 posted:What do you mean linear history? Some people do rebase rather than merge to incorporate branches for a strictly merge-free history. It's about the same idea; I find having an explicit merge commit summarizing the full PR to be useful for context but that's me. Personally I'm not going to do multiple rebases to ensure a strict linear history when someone pre-empts me in a busy repo or anything, but I will do a rebase on master and squash any WIP and code review fix commits before I merge my PRs. I view it as a quality thing to keep our code base maintainable, similar in purpose to documentation or comments. It's definitely not just to look pretty, and pretty low effort as long as you don't go full OCD about making your history perfect and pristine. A linear or at least linear-ish history is less effort to read, simpler to bisect, makes it easier to figure out the context of a commit when debugging and a lot cleaner when you need the history of changes to a specific file. You certainly don't have to use heavy rebase workflows if you don't think they're worth it for your usecase but it's not like they're uncommon or particularly strange. Lots of people doing merge updates and pushing their WIP can get extremely messy in a large team sharing a repo. Things like git rebase -i or the fixup! keyword in commit messages are in git specifically to help manage that mess. Use them if they help you, don't use them if they don't.
|
# ? Aug 17, 2017 09:15 |
|
Zaphod42 posted:
You should try it, you might like it. I don't know what you mean by delete information, unless you're taking about leaving in junk commits or confusing and irrelevant development activity? I prefer my git log to represent just what's going on in terms of active development and production releases. It might be more work up front (slightly, I guess?), but it describes what I need to know about the repo at a glance. E: Xerophyte's example is pretty much it. TheBlackVegetable fucked around with this message at 10:09 on Aug 17, 2017 |
# ? Aug 17, 2017 09:35 |
|
Post the code that makes you laugh (or post about source control for five straight days) Insufferable bikeshedding turds
|
# ? Aug 17, 2017 11:44 |
|
The C preprocessor strikes again. Instead of using the built-in sized integer types in <stdint.h>, one very special team has defined all the types themselves and used them throughout their project:C++ code:
|
# ? Aug 17, 2017 12:00 |
|
Spatial posted:The C preprocessor strikes again. Instead of using the built-in sized integer types in <stdint.h>, one very special team has defined all the types themselves and used them throughout their project: Extremely bad and nasty.
|
# ? Aug 17, 2017 13:11 |
|
I like git because I'll be damned if I have to learn a million different version control systems when we can have just one.
|
# ? Aug 17, 2017 13:49 |
|
Spatial posted:The C preprocessor strikes again. Instead of using the built-in sized integer types in <stdint.h>, one very special team has defined all the types themselves and used them throughout their project: Also it'll break on UNICOS!
|
# ? Aug 17, 2017 14:02 |
|
Working on doing some load testing for a client. They want to test some CRUD operations against a REST API. Okay, no problem. POST: [Json Describing Thing to Create] Response I was expecting: [Json Describing Thing that was Created, like say a status indicating success or failure and an ID so I can interact with it for the "UD" parts of "CRUD"] Response I got: [Json for a paginated view, with the object that was created being on a different page and no way of identifying it other than by name, which by the way is not guaranteed unique]
|
# ? Aug 17, 2017 15:11 |
|
New Yorp New Yorp posted:Working on doing some load testing for a client. For a take-home I asked what should be returned from a POST and was told "do whatever you want" so I think people just don't really think about what they're doing.
|
# ? Aug 17, 2017 15:17 |
|
Pollyanna posted:For a take-home I asked what should be returned from a POST and was told "do whatever you want" so I think people just don't really think about what they're doing. Or they do, and they were evaluating whether you also do
|
# ? Aug 17, 2017 16:11 |
|
New Yorp New Yorp posted:Working on doing some load testing for a client. It returns 200 sometimes, where the body tells me that I'm unauthorized in XML.
|
# ? Aug 17, 2017 16:16 |
|
C++ code:
return0 posted:Extremely bad and nasty. Someone explain this to me please because I always have to do this since if I don't gcc replaces my 64 bit file length counters with 32 bit ones* and then my program only reads the first 500 megs of my 8.5 gigabyte file. * on 32bit targets
|
# ? Aug 17, 2017 16:31 |
|
Spatial posted:The C preprocessor strikes again. Instead of using the built-in sized integer types in <stdint.h>, one very special team has defined all the types themselves and used them throughout their project: I can see this done if you need your code to be portable on some weird-rear end embedded platform with a C compiler written when dinosaurs were walking the earth.
|
# ? Aug 17, 2017 16:33 |
|
Dongsturm posted:
C++11 introduced fixed width types in <cstdint> and those are preferable. They're cool and good.
|
# ? Aug 17, 2017 16:37 |
|
Steve French posted:Or they do, and they were evaluating whether you also do There is that too, yes.
|
# ? Aug 17, 2017 16:45 |
|
Volguus posted:I can see this done if you need your code to be portable on some weird-rear end embedded platform with a C compiler written when dinosaurs were walking the earth. rude, but its official name is "Microsoft Visual C++"
|
# ? Aug 17, 2017 18:16 |
leper khan posted:C++11 introduced fixed width types in <cstdint> and those are preferable. They're cool and good. Hasn't <cstdint> been around since like C++98?
|
|
# ? Aug 17, 2017 18:23 |
|
nah, it was first in C99 but it took until 2011 for C++ to get it
|
# ? Aug 17, 2017 18:25 |
|
No, stdint.h was added in C99, which came out a little too late for C++98 to pull it in.
|
# ? Aug 17, 2017 18:27 |
|
Volguus posted:I can see this done if you need your code to be portable on some weird-rear end embedded platform with a C compiler written when dinosaurs were walking the earth. There's really no reason for it.
|
# ? Aug 17, 2017 18:27 |
|
leper khan posted:C++11 introduced fixed width types in <cstdint> and those are preferable. They're cool and good. I was trying to stick to C89 for portability, but I guess even toy C compilers will support those types, and I can macro them in otherwise.
|
# ? Aug 17, 2017 18:40 |
Plorkyeran posted:No, stdint.h was added in C99, which came out a little too late for C++98 to pull it in. And they didn't add it in C++03? drat well okay nevermind then.
|
|
# ? Aug 17, 2017 18:51 |
|
VikingofRock posted:And they didn't add it in C++03? drat well okay nevermind then. As someone who programs in C++03 for my day job: if you can think of some even remotely nice feature in modern C++, it was added in C++11.
|
# ? Aug 17, 2017 18:53 |
|
VikingofRock posted:And they didn't add it in C++03? drat well okay nevermind then. C++03 was just a bugfix release. The single new feature it had (value initialization) was mostly just a formalization of behavior that was specified in a roundabout way in C++98.
|
# ? Aug 17, 2017 19:32 |
|
TheBlackVegetable posted:You should try it, you might like it. I don't know what you mean by delete information, unless you're taking about leaving in junk commits or confusing and irrelevant development activity? I prefer my git log to represent just what's going on in terms of active development and production releases. I like seeing branches personally. But the thing is if you're working on a team of more than 1, constantly rebasing is basically forcing your Git to behave like a central VCS like CVS. Every time you rebase anybody who is currently working on that branch is hosed and will have to check out again and merge by hand. Xerophyte posted:You certainly don't have to use heavy rebase workflows if you don't think they're worth it for your usecase but it's not like they're uncommon or particularly strange. Lots of people doing merge updates and pushing their WIP can get extremely messy in a large team sharing a repo. Things like git rebase -i or the fixup! keyword in commit messages are in git specifically to help manage that mess. Use them if they help you, don't use them if they don't. Yeah I mean I can imagine a few rare scenarios where they'd be useful, but not as part of your regular flow. quiggy posted:As someone who programs in C++03 for my day job: if you can think of some even remotely nice feature in modern C++, it was added in C++11. lol
|
# ? Aug 17, 2017 20:04 |
|
Remember iterating over containers before C++11? Then: C++ code:
C++ code:
|
# ? Aug 17, 2017 20:14 |
|
C++: the language that copies Java to REDUCE verbosity.
|
# ? Aug 17, 2017 20:15 |
|
No idea what you're talking about.C++ code:
quiggy fucked around with this message at 21:08 on Aug 17, 2017 |
# ? Aug 17, 2017 20:20 |
|
Ghost of Reagan Past posted:I'm working with an API that returns a 401 unauthorized error if anything is messed up. Sometimes this comes from a good intention. IE, the web stack processed your request okay, but some other backend service it talked to was unauthorized. That's 200 + an appropriately formatted response object + the message says unauthorized. "But, shouldn't the web stack abstract that for me and give me the effective result of my request?????" Yeah maybe, but often times that looks like manually reading & rewriting responses for you from other services, which is a hassle compared to agnostically forwarding the response to you directly. I'm not saying 200 + "unauthorized" is a great paradigm, but it's not entirely unjustifiable.
|
# ? Aug 17, 2017 20:28 |
|
Surely any internal error should result in a 500-series error code?
|
# ? Aug 17, 2017 20:51 |
|
Some folks in my building return a "512" for when things don't work correctly. We have some security requirement that basically tells us we can't expose any kind of information about what went wrong and for some reason that includes http error codes.
|
# ? Aug 17, 2017 20:55 |
|
quiggy posted:No idea what you're talking about. Man, I know C++ is a really powerful language for lots of reasons and probably the most flexible language with modern features, but.... holy god they came up with the most difficult to parse syntax ever. I think the only language that managed to get that worse was ObjC.
|
# ? Aug 17, 2017 20:59 |
|
TooMuchAbstraction posted:Surely any internal error should result in a 500-series error code? That's how I've done it. 401 means your basic HTTPS authentication failed or whatever handshake, anything else means you get a 500-series and the body of the response tells you the particular error. I can see what Factor Mystic meant though.
|
# ? Aug 17, 2017 21:33 |
|
Zaphod42 posted:I like seeing branches personally. Bear in mind, you never rebase a branch if other people are committing to it - but I've never worked a job where two people are working on the same feature branch without working side-by-side. If your process has multiple developers committing to the same branch (outside of merging into master of course), then our workflows are fundamentally different and we're both doing the right thing, in context.
|
# ? Aug 17, 2017 21:34 |
|
Taffer posted:Man, I know C++ is a really powerful language for lots of reasons and probably the most flexible language with modern features, but.... holy god they came up with the most difficult to parse syntax ever. I think the only language that managed to get that worse was ObjC. The auto keyword we have now is p nice you know
|
# ? Aug 17, 2017 21:36 |
|
Volguus posted:I can see this done if you need your code to be portable on some weird-rear end embedded platform with a C compiler written when dinosaurs were walking the earth. In my last job we were compiling with gcc 3.4 for Solaris Sparc. No stdint.h for us!
|
# ? Aug 17, 2017 21:39 |
|
|
# ? Jun 7, 2024 22:46 |
|
feedmegin posted:The auto keyword we have now is p nice you know Yeah, auto is the #1 reason I wish my job would migrate at least to C++11. That's not to say that more modern versions of C++ don't have their own syntactical horrors thanks to stuff like templates and rvalue-references.
|
# ? Aug 17, 2017 21:40 |