s_l_m
|
|
« Reply #3740 on: November 15, 2012, 04:56:29 PM » |
|
That's Eclipse for you :D I have a lot of issues too (some executed by the core developers and some bei plug-ins [the most famous the poor XML-display from the android plug-in]). Every week eclipse fucks up my source by not display all methods and only a close and a reopen will display it correctly again. But well, still better then [insert your hate IDE here] :D
better then using command line
|
|
|
Logged
|
Think happy thoughts.
|
|
|
Muz
|
|
« Reply #3741 on: November 15, 2012, 07:12:16 PM » |
|
Ugh, spent 3 hours on a bug, which was caused by making a typo of 'uses-permission' as 'user-permission'. XML's attitude of 'ignore it if you don't know it' made null pointers pop up everywhere.
Are you talking about typos in the XML file or in the code that was reading the XML content? If you use XML schemas (like XSD or RELAX NG) you will at least be protected from typos in the XML file. If you use an editor with XML schema support (like Eclipse with the XML plugin) you'll get warnings for XML elements that don't comply with the schema. But be warned, writing schemas can be a pain. edit: if your parser has schema support then you should also be protected when you try to read invalid content. Code reading XML content, that ignores typo. Yeah, using it in Eclipse, but only around 50 lines of code or something, so didn't really bother to look for checkers. Normally the Android Dev Kit warns me if I make a typo, or even if I do something that's not best practice, but it didn't with one particular XML file. Probably should look into it, but there are other higher priority "look into if have time" kind of things.
|
|
|
Logged
|
|
|
|
Muz
|
|
« Reply #3742 on: November 19, 2012, 09:52:53 PM » |
|
So Android has multiple entry points. With a PC app, the first page is the only entry point, and it doesn't delete stuff afterwards. With Android, every time someone does an 'alt-tab' equivalent, the thing exits and reenters, sometimes deleting and recreating stuff. Now that's still fine and all, but when people are expecting smartphones and PCs to operate in the same way, it gets really annoying. Hell, nobody really knows that when an app is open in the background, it practically consumes no resources, so a lot of dumb power users put in all kinds of optimizations in like task closers, which only slow it down. And when clients expect graphics to be a certain fixed size and tries to save the exact state of the thing when re-entering the app,
|
|
|
Logged
|
|
|
|
moi
|
|
« Reply #3743 on: November 19, 2012, 10:36:37 PM » |
|
I was under the impression that most paged apps didn't actually consume anything in the background, also the app's behaviour actually seems a little more logical to me than the Windows behaviour .
[EDIT]Okay I didn't read the previous post well enough apparently
|
|
« Last Edit: November 20, 2012, 12:12:15 AM by moi »
|
Logged
|
subsystems subsystems subsystems
|
|
|
Ludophonic
|
|
« Reply #3744 on: November 21, 2012, 03:09:56 PM » |
|
Visual studio 2012 breaks find and replace in column selections. aaarrgggh.
|
|
|
Logged
|
|
|
|
Geti
|
|
« Reply #3745 on: November 21, 2012, 06:41:26 PM » |
|
This is kinda a mixed happy and angry post: installed visualVM to have a look at how my java framework's bottlenecks are looking so far (unoptimised "just get it working" kinda code) and found something interesting. Rendering is of course a fair bottleneck but not too major until I put the alpha blended debug overlay on with a shitload of small objects doing their thing, haha. The main one is Vec2f.Angle(). A single atan2 call. Its something like 60% of CPU time. Whelp. Oh well, example stuff first, then optimisation I guess. Can only really work on it in the off hours of the day though with the amount of KAG work we're doing. So much rework, but it'll be worth it in the end, right? Right..?
|
|
|
Logged
|
|
|
|
Sergi
|
|
« Reply #3746 on: November 22, 2012, 04:04:53 AM » |
|
I just spent an hour tracking a bug that ended up being caused by the C preprocessor. I did this #define PT(x,y) (x * height + y) adding the outer parens because I know the preprocessor is tricky. But doing doesn't do what I expected because it translates to which, because of operator precedence, is doing the same as So the define is now #define PT(x,y) ((x) * height + (y)) Mental note: stay away from the C preprocessor as much as possible. And if I have to use it, put parentheses EVERYWHERE.
|
|
|
Logged
|
|
|
|
Sergi
|
|
« Reply #3747 on: November 22, 2012, 04:09:22 AM » |
|
The main one is Vec2f.Angle(). A single atan2 call. Its something like 60% of CPU time. Whelp. Is the program just a test scene that does almost nothing? Because if the rendering of the scene is fast, bottlenecks (in percentage) might not be relevant. I remember in my old c++ engine some math functions had big percentages like that, but it didn't really matter because everything was crazy fast, since it was doing almost nothing, so it didn't make sense to optimize. Bigger scenes are more relevant, since they're more real-world examples.
|
|
|
Logged
|
|
|
|
rivon
|
|
« Reply #3748 on: November 22, 2012, 04:23:16 AM » |
|
I just spent an hour tracking a bug that ended up being caused by the C preprocessor. Why aren't you using an inline function instead?
|
|
|
Logged
|
|
|
|
Sergi
|
|
« Reply #3749 on: November 22, 2012, 04:30:36 AM » |
|
I just spent an hour tracking a bug that ended up being caused by the C preprocessor. Why aren't you using an inline function instead? Well, I naively thought it was simple enough to do with a #define. Of course, it ended up being a bad experience, as it seems to always be when using the preprocessor. I usually try to use C++ instead of the preprocessor (inline functions and const local variables), but this time it made sense for some reason. Never again
|
|
|
Logged
|
|
|
|
Muz
|
|
« Reply #3750 on: November 27, 2012, 02:53:40 AM » |
|
Golden rule of network design: Be selfish.
Ask for maximum priority whenever you can. Open multiple TCP connections at once. Request a little more resources than you need.
Anything else and people will consider your system slow. Everyone else does it. Greed is good.
|
|
|
Logged
|
|
|
|
QuadrupleA
|
|
« Reply #3751 on: November 29, 2012, 02:36:51 PM » |
|
Grr, transitioning from XNA/C# to C++.
Hey C/C++ naming convention authorities, BIG_FUCKINGCONSTANTSWITHALLCAPSANDNOSPACESAREFUCKINGUNREADABLEANDRETARDED. So are library function names like "wcsrchr", "strxfrm", etc. The language has been fucking case-sensitive since the 1970's, use it already.
I'm looking at you too DirectX! And your D3DBLEND_INVSRCALPHA bullshit. Got better things to do with my time than guess where to put the spaces.
|
|
|
Logged
|
|
|
|
ThemsAllTook
|
|
« Reply #3752 on: November 29, 2012, 02:55:06 PM » |
|
Hey C/C++ naming convention authorities,
Do those exist? It's kind of funny, though... When I first learned C, the ~6-character abbreviated function names didn't really bother me. It was only when I tried to explain the stdlib API to someone else that I realized just how insane they really are. Naming is super important, but once you learn a system you might find yourself not noticing problems with it as much anymore.
|
|
|
Logged
|
|
|
|
QuadrupleA
|
|
« Reply #3753 on: November 29, 2012, 03:08:00 PM » |
|
Hey C/C++ naming convention authorities,
Do those exist? Had to invent someone to rant at I can see the shorthand being useful if all you've got is a text editor with no autocomplete etc., like in the early days - or nowadays if you're a masochist.
|
|
|
Logged
|
|
|
|
epcc
Level 1
|
|
« Reply #3754 on: November 30, 2012, 04:49:49 AM » |
|
I haven't tried it, but it should work :D
#define stringLength strlen #define stringTransform strxfrm
etc.
|
|
|
Logged
|
|
|
|
RalenHlaalo
|
|
« Reply #3755 on: November 30, 2012, 04:51:39 AM » |
|
LOL I do all my coding in gedit. I guess I'm a masochist However you'll notice if you look at my code that I use quite descriptive names for things. Despite that though I still have to open the odd header file every now and again to check the interface of something.. I really should get with the times.
|
|
|
Logged
|
|
|
|
makerimages
|
|
« Reply #3756 on: December 02, 2012, 08:11:49 AM » |
|
I cant get GM healthbars to show up above the unit, maybe i should change how i deal with them a bit.
|
|
|
Logged
|
Makerimages-Its in the pixel
|
|
|
Muz
|
|
« Reply #3757 on: December 03, 2012, 08:53:47 PM » |
|
If any of you gets a project where you have to design a layout in a mobile phone, reject it. You'll never get layouts to look exactly the same as it does in design. Ask them to provide content, create a draft layout, absolutely fucking insist that the final product does not look like the draft layout in the same manner that a burger will not look like the burger in the ad. Sometimes draft layouts are bad design too; too small to click/see which is a common mistake if you design for something at double its resolution.
|
|
|
Logged
|
|
|
|
epcc
Level 1
|
|
« Reply #3758 on: December 04, 2012, 10:02:23 AM » |
|
I find providing both 32 and 64 bit linux builds really annoying. Can't get cross-compiling to work (Seems that I also have to cross-compile all the dependencies that I could otherwise get from the package repository) I've finally decided to install another linux inside virtualbox. Is it really that hard or am I missing something? I guess the easiest option would be to just provide the sources, but the code is too ugly and would be embarrasing.
|
|
|
Logged
|
|
|
|
ThemsAllTook
|
|
« Reply #3759 on: December 04, 2012, 10:10:08 AM » |
|
I find providing both 32 and 64 bit linux builds really annoying. Can't get cross-compiling to work (Seems that I also have to cross-compile all the dependencies that I could otherwise get from the package repository) I've finally decided to install another linux inside virtualbox. Is it really that hard or am I missing something? I guess the easiest option would be to just provide the sources, but the code is too ugly and would be embarrasing.
I've been struggling with the same thing recently. Can't get a 32-bit Ubuntu installation to actually boot in VirtualBox. Please let us know if you get it all figured it out!
|
|
|
Logged
|
|
|
|
|