Funny, for a programmer or hobbyist, I'd recommend Unity hands down over Unreal. Unreal's main strengths its rendering engine, better tools for artists and animators, and that it's set up for making multiplayer first-person shooters. If you're a mid-sized or larger team looking to make a multiplayer shooter with AAA graphics, Unreal is a strong choice. (You can make anything with either engine, but that is where Unreal excels.)
However:
Programming in Unity is quicker and easier.
* In Unreal you have to choose between Blueprints (which have some issues) and C++. C++ compile times are slow. Unreal supports hot-reloading of C++, but it frequently breaks stuff, so it's safer to save your work, close the editor, and then recompile and restart the editor. It takes a few minutes, which really slows down iteration times when you're tweaking a feature. If you have a bug in your C++ code, it can crash the whole editor, and you'll lose any unsaved changes.
* Unity's architecture is simpler, lighter, and more pure. Unity has GameObjects. They hold a collection of components. An empty GameObject has very few functions or variables. GameObjects are purely containers; you don't inherit from them, you just make components. Unreal has Actors. An empty actor has 448 functions. sizeof() and empty actor is over 1 KB. You inherit from actors, and functionality is mixed between inheritance and components. This flexibility may sound like an advantage, but I find inheritance tends to cause more problems, especially in conjunction with Blueprints. Unreal's built-in classes (AGameMode, APawn, APlayerPawn, ACharacter, APlayerController, AGameState, UCharacterMovementComponent) set up a somewhat complex architecture for you that's strongly biased towards the FPS genre.
* Unity's API documentation is miles ahead of Unreal's. The community is also larger which makes problems more googleable.
Blueprints kind of suck.
* Blueprints look friendlier to non-programmers, but code is easier to read and write for anything complex. Even short things are often simpler in code. For comparison, here's the same function in Blueprints (https://i.imgur.com/86rt8qp.png) and C++ (https://i.imgur.com/7HSnlR9.png).
* Blueprints are saved in an opaque binary format. This doesn't work well with version control. Unreal has a diff tool for Blueprints, but you can't merge them. On rare occasions, a Blueprints will get corrupted or bugged and your only option is to revert it in your version control (we've had Blueprints crash the Unreal editor whenever you open them).
* Blueprints are an order of magnitude or two slower than C++.
* Blueprints lack a lot of functionality compared to C++. Only API functions that are intentionally exposed to Blueprints can be called. You don't have anything like functors or lambdas. There's nothing like templating or generics. While there appears to be a dropdown to make Blueprint functions public/private/protected, it doesn't work (it literally has no effect).
* Making C++ code useable from Blueprints is extra work. It can be tricky to write classes and interfaces in C++ that can be used from either C++ or Blueprints. It's not much of a problem for a single concrete class, but it gets tricky when you want to make things flexible with interfaces.
Unity has more resources for developers
Epic is slowly closing the gap here, but Unity has a bigger community, a bigger asset store, and better docs. For models and sounds, we often would use the Unity Asset Store for our Unreal projects. Unfortunately, that's not possible for code plugins. Stuff like Amplify Imposters and FinalIK just doesn't exist on the Unreal Marketplace (although looking again, the Unreal Marketplace recently got a Fabrik IK plugin, so maybe they're catching up).