I assume that you're not the only person working in this part of town, in the same shop in town, at the same time. If the area is really as bad as you say, try to meet up with someone part-way there or see if they'll be happy giving you a lift. I know you might shrink at the idea of telling colleagues that you're not happy walking about the street on your own, but if it's really that bad a place I'm sure they'll understand.
Other than that, just walk with confidence, look alert, and don't preoccupy yourself with headphones or your phone. There's no real go-to way of avoiding trouble outside of increasing the numbers, but there's plenty of ways of making yourself a target.
Also, I cannot emphasise this enough, do not go carrying about a knife. If you're getting attacked, it'll likely be more than one person and - considering the word 'stab' came up in your post at least twice - you're not going to want things to escalate. If you find yourself in that situation fucking throw your wallet at them. Do not try and Bruce Lee your way out of a mugging unless you're secretly wearing chain-mail.
Other than that, just walk with confidence, look alert, and don't preoccupy yourself with headphones or your phone. There's no real go-to way of avoiding trouble outside of increasing the numbers, but there's plenty of ways of making yourself a target.
Also, I cannot emphasise this enough, do not go carrying about a knife. If you're getting attacked, it'll likely be more than one person and - considering the word 'stab' came up in your post at least twice - you're not going to want things to escalate. If you find yourself in that situation fucking throw your wallet at them. Do not try and Bruce Lee your way out of a mugging unless you're secretly wearing chain-mail.