• Welcome to Randomland - The Forum. Please login or sign up.
 
May 03, 2024, 05:32 AM

News:

Get Out, See Green!


Programming Frustrations

Started by Brad, Mar 29, 2010, 08:44 PM

Previous topic - Next topic

Brad

Mar 29, 2010, 08:44 PM Last Edit: Mar 29, 2010, 08:49 PM by Brad
I need a place to vent, so I thought I'd create a thread where can all share our latest programming frustrations and what (if anything) we did to solve them.  >:(

Tonight I'm currently being really ticked because there is no way to get a single character input from stdin in C++ without using platform dependent code. PLATFORM DEPENDENT? Just to get a single character without having to enter a newline? All input functions in C++ seem to require a delimiter to know when to stop reading input. I guess they didn't think to create one where you could specify how many characters you want to read in? Because that would be crazy! Who would want to use that?  >:(


EDIT: Apparently there is an old C MS-DOS header file conio.h which has functions to do and in Linux you can do it with about 25 lines of code. I am starting to hate console applications.

Nick

I have always hated making console apps. Though all the ones I made were as assignments for one class or another. Mostly it comes down to not liking string manipulation in C... but that's another story.

Sorry about the input thing. I say don't worry about it too much. Save your energy for a graphical client of some sort. Courtney and I need to get working on an HTML5 + javascript one.... :)

zourtney

Yeah, I was trying to chase down some annoying browser auto-detection magic today. It was driving me nuts, though it's not worth explaining. It doesn't work, yet all the code is there.

I don't get it. Maybe morning coffee will cure the problem. That happens.

zourtney

I've had the misfortune of being asked to create an Internet Explorer plugin. Everything is COM based and it makes me want to rip my face, just to ease the pain. For every problem, there are at least two or three approaches. None are well-documented and most don't actually work. Most useful documentation is about a decade old. Most forum posts by the few knowledgable individuals out there explain 500 lines of code in a sentence and a half, while hinting at apathy. For every roadblock, there are dozens of dead ends forking from it. If a path can be made through, it will come at a great cost. Travelers beware.

Sincerely,
Lost in cul-de-sec of COM

Nick

Traveler Beware! For beyond lies muck and mire.

They really haven't updated that system in all their 'browser rewrites'?

zourtney

No, they haven't. And it baffles me.

Here's a classy example. I can add well placed, dynamically updated context menu items in Firefox's API with ease. I don't remember how, off the top of my head, but I guarantee I could have it working decently within an hour or two. With IE, it is all but impossible. You can a) write to a registry entry which is queried when the use right-clicks or b) implement some COM interface which catches window events and replace the menu with your own. And when two people try this, you're screwed. So option a) is the only one that kinda works, but you have no control over where it is placed, whether its enabled or not, and cannot have sub menus. Of course not, why should you? You're reading a registry entry after all! The icing on the cake is this: I posted a question about this on a MS forum and got the response that aforementioned a) is the only real option, but you can catch events in the browser and update the registry entry on the fly since it IE queries it every time the user right clicks. Oh, except it doesn't. It queries it once, at startup. I'm not sure if it's a relief or cause for greater aggrevation.

Yeah...

Oh, it only took me like a week and a half to come to that conclusion. And by conclusion I mean, "whatever, who cares, it's not worth trying."

And don't get me started on the COM/.NET interop stuff, where GUIDs fly wild and the best documentation available is forum posts pleading for guidance.

I pity the fool who has to code this stuff. Oh that's me...this month anyway. SOoooo frustrating. SOOooo unnecessarily complex. Plah!

Nick

But at least its something new and interesting? Even if its only to discover that it sucks and to move on. (Trying to look at the bright side of IE :P )