Some of these posts here are a joke. Chicago is like any other major US city, probably better than the mid-tier cities I've spent time living in in terms of police and crime. It's simply very much two cities and you only hear news stories about one.
Just like anywhere else, don't act like an idiot or seek out trouble in rough areas and 99% of your interactions with police will be fine.
You're on HackerNews so presumably you make money and won't be living on the South Side or somewhere like it. If you're living in Lincoln Park, Wicker Park, Streeterville, etc. you will likely never witness a bad police interaction the entire time you live there - unless you go looking for it. Live in some of the more marginal neighborhoods and those you fear will almost assuredly not be the police.
It's like anywhere else - dressed like a young professional, out with other similar friends, not being confrontational and get caught doing a minor infraction? You'll be warned and maybe yelled at. Do the same acting like fools and giving attitude back? Yeah, you might be taught a lesson and spend the night in jail.
I've had plenty of interactions with CPD between myself and my drunk friends in my earlier days. The cops acted just like you would expect and desire them to in all but one situation. That situation was a friend jumping a security gate on the El to photograph some train stuff. He went to jail for the night.
As with everything like this the hyperbole is just nuts. If you're a poor minority living on the South Side my answer may be different, but for the typical Hackernews frequenter Chicago is no different than NYC or LA, and honestly in terms of "living in the city" you are likely to find far safer and wealthy neighborhoods than you will in the "inner city" of any other mid-tier NFL town in the US.
That said it's a big city. If you're used to living in a big city, Chicago is just another one with better than normal public transit. Same problems and concerns as anywhere else. You can find neighborhoods that have similar crime rates to the most wealthy suburbs there are, and neighborhoods with a higher homicide rate than Iraq. The latter gets you the police department in those areas you would expect.