So I feel I'm a pretty good programmer in my area of expertise. Whats the process for writing a book about my niche and getting it published?
That depends entirely on a number of factors:
What's your motivation? (Thanks, Steven Burnap for this one.) Do you just want to get it out there to share your knowledge? Or are you looking to make money (hint - you probably won't make much money off your first book, no matter what route you go)?
Dead tree? Ebook? Both? Something else? This is going to determine what channels you can use to get your book out there.
Big house, small house or self publish? This will greatly determine how soon you get out there, how much money you have to invest and stand to make, and a number of other things.
Who's editing this beast? Most books go through an extensive editing process. Do you want a professional editor? Do you want to hire said professional yourself?
Once you've answered those questions, you have to consider your options:
Dead Tree Publishing vs eBook Publishing
If you want print books, you need to find someone that will print your books. Theoretically, you could go straight to a printer, but most people will go through a publisher that handles that kind of thing.
Conversely, eBooks tend to be quicker to get to market, have a lower up front cost, and have more self-publishing options available (for all three, the main reason is not having to print physical books). Additionally, including an eBook can also allow you to submit it to places like Safari Books Online, which can help get it exposure.
Some publishers will do both, but not all publishers that do one will do the other (think Venn diagram). Also, print books will allow you to reach audiences that don't have eReaders or otherwise don't like digital books, while eBooks will allow you to reach a very large potential audience via sellers such as Amazon.
If your motivation is purely altruistic (ie - you just want to get it out there), then it might be worth considering a completely different distribution avenue. There are a number of "books" that use the web itself as their publishing platform (Dionaea House is a superb example of how the Internet can be leveraged in a unique way to create something that's arguably more than a book; for the non-fiction, Learn Code the Hard Way is another good example of using the Internet as a book publishing platform). Some even use GitHub as a sort of publishing platform, which not only allows people to consume the book, but also to help edit, revise, and add to these books (in a controlled manner, with pull requests), creating truly "living documents."
If your motivation is money, you'll have to go back to considering dead tree vs ebook. eBooks sell for less per unit, but come with lower overhead and have potential to reach more people than dead tree (due to not having to have stores keep physical stock). This means it could potentially be more lucrative when self or small house publishing. However, getting into a big publishing house, such as O'Reilly or For Dummies, brings with it prestige and exposure, but at a monetary overhead cost.
When you self-publish, you have to take charge to get the editing done, while publishers will often have on-staff editors.
So You Want To Get A Publisher
Get a list of publishers that publish books in your niche (or slightly broader scope), and find their submission process. This will vary by publisher, and will likely be found on their website. If you don't have your book written, yet, make sure you have a chapter written. It doesn't have to be perfect, but it should be better than a rough draft, and should be meaty enough to entice them.
Submit your book to said publishers (check their rules, some might not allow multiple submissions). Remember, just because you've submitted a book, it doesn't mean they'll publish it. In fact, as a new author, it's very likely they'll turn you down (or offer you crap for royalties). Don't be surprised if you have to submit to several publishers before you get a bite.
Set aside time to write. If you don't already have your book written, they'll put you on a tight schedule. Writing will likely be a full-time job for you, so either take time off from your primary job, or expect to work long-as-hell hours. Also expect to get a lot of grief from your editor - they're going to be a hard-ass to you (but for a good editor, it'll be worth it). Make sure you've put on your thick skin when dealing with your editor. Also, make sure you send in your milestones on time, so you stay on track and your publisher doesn't drop you.
Publish The exact process will vary depending on the publisher.
So You Want To Self Publish
Find self publishers There are a number out there, including Amazon, Barnes & Noble, and Lulu. Pick a few that will fulfill your needs.
Check their terms Determine what you want for royalties and what they're willing to give you. See if they allow multiple publishing or selling at other retailers via their publishing platform. Drop any publishers that don't meet your needs.
Write your book To get your book out in a timely manner, you should devote a good amount of time to writing your book. It doesn't need to be the break-neck speed that a big publisher expects, but it should be a good chunk of time.
Get an editor Find a good person to edit your work. You can use someone you know, or a freelancer or service, but make sure that they'll be upfront, honest, and detail-oriented.
Get an artist If applicable, you'll want someone to take photography (for your "About the Author" page), draw diagrams, or design cover graphics or other support images.
Publish your book The details on getting the book published on your chosen platform(s) will vary depending on the platform and avenue, so make sure you follow their guidelines.
(Note: I'm not a published author, personally, but I have a number of friends who are, so I know the basics of getting published. If anyone knows of any corrections or details, feel free to point them out and I can edit accordingly.)