The Other Worlds Shrine

Your place for discussion about RPGs, gaming, music, movies, anime, computers, sports, and any other stuff we care to talk about... 

  • Calling All Programmers

  • Somehow, we still tolerate each other. Eventually this will be the only forum left.
Somehow, we still tolerate each other. Eventually this will be the only forum left.
 #96495  by Nev
 Mon Mar 20, 2006 11:55 am
How good are the library sets you have to work with on a daily basis?

The BREW libraries I have to work with are so bad that it makes me want to program in a different part of the industry. Const-correctness is sproadic at best, and next to useless because of it - sometimes I have to declare member functions to be non-constant because one or more of the library calls they use omitted a const declaration where there should be one. Many of their controls don't work completely correctly on some phones. Documentation is sparse, sometimes in broken English, and omits crucial details - for instance, that a particular input mode for a text control was left out of an entire release - and I just came across a case where it was just flat-out wrong. Things seem to be done in a way as to minimize the work of the library designer at the cost of the client programmer - for instance, a double-word return value for a particular function actually contains two values, one in the high word and one in the low word. They provide macros to separate them, but why on earth not just use pointer parameters in the first place? (Using references isn't possible because the libraries are all in C - I'm ignoring that as a design flaw even though it causes problems as well, because four years ago when the platform was created I don't know if C++ compilers were available for ARM yet.) Sometimes a small but crucial bit of functionality will have been left out of a control (for example, overriding a background color, or getting the shift state of a text control), which renders the control either useless or partially crippled in a real-world application.

I mean, the platform is so bad that I have literally been angry enough to want beat the living fuck out of their design team, many times, because of the time, money, and sanity I have to waste working aroung their horrible code.

Wondering if anyone else has to deal with this kind of thing.
 #96496  by Kupek
 Mon Mar 20, 2006 1:58 pm
Mental wrote:How good are the library sets you have to work with on a daily basis?
They are excellent. But since I do systems research, the "library set" I work with on a daily basis are either POSIX system calls, which are well documented, or Linux specific calls, which are also well documented. It's rare that I call anything that doesn't have a man page.

 #96503  by Nev
 Mon Mar 20, 2006 8:42 pm
*sigh*

 #96510  by Imakeholesinu
 Mon Mar 20, 2006 10:25 pm
Something that might intrest you mental.


http://www.intel.com/cd/ids/developer/a ... 264351.htm

 #96511  by Kupek
 Mon Mar 20, 2006 10:26 pm
Mental wrote:*sigh*
Don't get too envious. My work is a lock-free memory allocator for multithreaded programing. I write my own <tt>malloc()</tt> and <tt>free()</tt> that is thread safe but doesn't use locks for synchronization. And it's faster than basically everything we compare it to.

When you fuck up a memory allocator, you're <i>lucky</i> if it segfaults inside your code. If you're unlucky, which is most of the time, it segfaults in the application, which means you're debugging from scratch.

 #96512  by Nev
 Mon Mar 20, 2006 10:32 pm
That does suck.

BREW's debugging isn't great, though - if it crashes in their code, which is often if you pass the wrong parameter by mistake, they were not kind enough to provide debug libraries to us, so we don't get any stack information (including call stack). It's more or less the same thing as debugging from scratch - however, if we do proper prequisite checking before we call any BREW functions, we can eliminate that that way, at least.

Also, most development is done on Windows, but when we finally put it on the phones, there is no debugger at all, although you can output PRINTFs or similar to the output port. Issues that are handset-only are a bitch to find, and they can be numerous.

However, I didn't spend six months as a porting engineer at JAMDAT for nothing. I just nailed down a vicious bug to be a bug in the phone hardware or phone OS software, absolutely absolving us of responsibility. I love doing that. Booya!
 #96513  by Ishamael
 Mon Mar 20, 2006 10:56 pm
Mental wrote:How good are the library sets you have to work with on a daily basis?
Generally they are pretty good, though I do get bitten in the ass from time to time. But I work in a huge,well funded domain that has several large companies, and more developers working in it.

 #96514  by Kupek
 Mon Mar 20, 2006 11:04 pm
Oh yeah, I forgot to mention the complications of mulithreaded programming, since I've done nothing but for about two years.

But I feel ya. I get pissed when I spend time debugging something and it turns out there's a bug in the application, not my allocator. Do you have a phone at your desk that you can run code on at will, or is it a huge pain in the ass to check it on the real hardware?

 #96516  by Nev
 Mon Mar 20, 2006 11:14 pm
Kupek wrote:Do you have a phone at your desk that you can run code on at will, or is it a huge pain in the ass to check it on the real hardware?
Most programming and debugging is done on the simulator in Windows. However, there are issues which only show up on the handset, and then you have to reload the phone through a serial cable every time. It's not terrible, but it's more annoying than just running it on a computer. Luckily, this only happens seriously near the end of the development cycle.

As far as availability goes, it depends on the project. If I'm working on something for an older phone, you can't give those things away these days, so there are always plenty floating around the office. If I'm working on an unreleased handset which is a prerelease model, I usually have to split time with the QA team and/or other developers. That usually just means I'm out of commission, though, if it's a handset-related bug. Not much I can do without a phone, in that case.

 #97022  by SineSwiper
 Wed Apr 05, 2006 10:05 pm
Nev wrote:However, I didn't spend six months as a porting engineer at JAMDAT for nothing. I just nailed down a vicious bug to be a bug in the phone hardware or phone OS software, absolutely absolving us of responsibility. I love doing that. Booya!
Still means you have to work around it. Don't you hate it when things that aren't your fault end up being your problem anyway?

 #97023  by Ishamael
 Wed Apr 05, 2006 10:07 pm
SineSwiper wrote: Still means you have to work around it. Don't you hate it when things that aren't your fault end up being your problem anyway?
But at least you get the blame for it! Oh wait, that's not a good thing...