Tag Info

Hot answers tagged

70

I guess people often claim that C is faster than C++ because it's easier to reason about performance in C. C++ is not inherently slower or faster, but certain C++ code might obscure hidden performance penalties. For example, there can be copies and implicit conversions which are not immediately visible when looking at some piece of C++ code. Let's take the ...


30

Code written in C++ can be faster than in C, for certain types of tasks. If you prefer C++, use C++. Any performance issues are going to be insignificant compared to algorithmic decisions of your software.


25

I personally do not think you have to be good artistically to create pleasing user interfaces. What makes a good UI is not up to creativity, but is more related to a couple of well-established guidelines. If you follow these guidelines and practice some you can create great interfaces yourself. I would suggest doing the following... Read about what ...


22

Deconvolution can partially deblur a photo. There is plenty of software out there that implements it, and this was even a fairly basic excersise in an image processing class I took in College. It's not possible to completely reverse the blurring, since it is lossy, but a lot of information can be restored. A motion blurred photo will be easier to restore ...


22

One of the design principles of C++ is that you don't pay for features you don't use. So, if you write code in C++ and avoid features that don't exist in C, then the resulting compiled code should be equivalent in performance (though you would have to measure this). There is negligible cost to using classes, for example, compared to structs and a bunch of ...


14

In my company, there are a few people specialized in this job. They are designers. And they know HTML. They can be a bridge between the designers and the front-end engineers; which they usually are. This way, we just have to integrate their HTML. This is a hard job. There's a reason sites like "PSD to HTML in 24h" work well. The solution in our company is ...


13

They have a custom graphics engine written directly against the APIs of the OS's they code for. That's one of the things that sets them apart from the rest of the graphics tools out there is that they aren't just using the stock junk that comes built into the APIs. As for the core -- it's people. Brilliant, hard-working, well-paid people.


12

My art ability is about 5th grade on a good day:). I employ a graphic designer, either professionally when at work, or my wife, who has excellent art skills and loves using them. Note that in my mind Graphics design is not UI/UX design. I either do a majority of UX, or employ a UX expert to retain control of UX, who then works with the GD to make it look ...


12

One reason that higher level languages are sometimes slower is that they can hide behind the scenes a lot more memory management than lower level languages. Any language (or library, API, etc) that abstracts away low level detail can potentially be hiding costly operations. For example, in some languages simply trimming trailing whitespace from a string ...


11

The quick and dirty approach is to just do it. Make a website. You see websites everyday. What elements do you like from the sites you visit? What element's don't you like? You will get better the more sites you do. Now, if you want to put some real effort into it, there are a few books you can pick up that will help you with UI design and layout: Don't ...


11

graphics.h isn't relevant to anything. It's been 10-15 years since that header was useful. The same for the Turbo C compiler. You need to upgrade your compiler to, let's say, Visual Studio 2010 Express (free) for Windows. Then you can look at things like Direct2D and GDI+ for 2D graphics.


11

This answer comes a bit too late, but I hope to shine light to others (particularly now that C++ standard committee wants to incorporate Cairo into std): The reason nobody really cares about "accelerated vector graphics" is because of how GPUs work. GPUs work using massive parallelization and SIMD capabilities to colour each pixel. AMD typically works in ...


9

Back in the graphics.h days each compiler had it's own limited graphics library. Now you program to either DirectX (Microsoft) or OpenGL (everywhere). After a few years of being sidelined to high-end Unix cad OpenGL/OpenGLEs is making a big splash on mobile devices For a list of books see http://stackoverflow.com/questions/5926357/c-opengl-books One ...


9

If you’re looking for graphical assets there are a few websites which collect high-quality graphics for free use: Bootstrap for arguably the best (but definitely the hottest right now) UI web framework Glyphicons for an icon set that complements Twitter’s Bootstrap UI framework Subtle Patterns for, well, subtle background patterns FamFamFam’s Silk icons ...


8

I always liked defining a rectangle as a point + width and height, where the point is the upper-left corner of the rectangle. class Rect { float x, y; float width, height; } And then add whatever methods you need to fetch the other metrics. Like the Java version


8

Being a good artist is just as much a talent as being a good engineer. Some have it, some don't. Some can do both (fairly hard to come by). Having said that, there are logical elements of design that you can learn to help you become fairly proficient at it. I mean, chances are that you won't find yourself getting a webby award for your designs, but you can ...


8

read Don't Make Me Think, by Steve Krug - this will provide functional help so your user-interfaces work well, and teach you about usability testing so you can design for the users and not just for yourself (a common developer problem) hire a pro to make stuff pretty - for when it matters, a good graphic artist can make the difference between "It's okay" ...


8

X is practically the most low-level graphics API a Linux application will likely use on a modern Linux Desktop. Most applications won't even bother going that deep and will instead use a GUI toolkit implementation like GTK or Qt. Below that there's only the hardware drivers and probably some X-internal APIs for the drivers. But those are not meant or ...


8

You can hire specialists for this sort of thing, but you don't need innate artistic ability to learn some basic techniques. My undergrad degree actually required a semester of "art for engineers." Taking a class or two at your local community college could be very beneficial. You still won't be as good as people specially trained in the field, but you can ...


7

It's easy to do that. Using an Octtree you simply divide the world into progressively smaller pieces until you reach the level of detail needed. This might be the size of a grain of sand for example. Think Minecraft taken to an extreme. What do you render then? If the detail is small enough you may consider rendering blocks - the leaf nodes of the octtree. ...


7

Since it is open source have you considered using a free, existing site like Github rather than building a new website? As for a logo, you could try: Farming the job out and perhaps offering $25, someone in the world might well be willing to do it for that price. As part of your Githup homepage ask for help designing a logo. Run a contest and announce it ...


7

2D / 1D - mapping is pretty simple. Given x and y, and 2D array sizes width and height, you can calculate the according index i in 1D space (zero-based) by i = x + width*y; and the reverse operation is x = i % width; // % is the "modulo operator", the remainder of i / width; y = i / width; // where "/" is an integer division You can extend this ...


6

Most opensource libs allow you to publish them together with your own code. You can bundle your class with all the code required to run it. If you just cut out and modify pieces you can run into serious issues if the user wants to include the lib in the future. Please keep in mind that in object oriented programming every class should have a clearly ...


6

Have you considered that it is less error prone? If you use (Point1, Point2) it is then very clear what you are specifying. If you provide 2 points, then the only possible error is that the user has mixed up their x and y when constructing the points as the order of the points doesn't matter. If you supply 4 integers, then if someone isn't paying ...


6

Well p1: Point and p2: Point are each going to have two int coordinates in them anyway, so doesn't your class amount to the same thing? And if you store those two points as first-class Point objects, don't you get a little more utility from them? In most graphical coordinate systems that I know of, points are subclassed in this way to create a hierarchy of ...


6

The Processing programming language might be what you want. It is quite similar to Java in many ways, but has phenomenal drawing capabilities and is designed for that.


6

A very basic and completely untested pseudo-code for drawing an ellipse using a parametric polar equation is below: Function draw_ellipse(int X1, int Y1, int X2, int Y2) RX = (X2 - X1) / 2 RY = (Y2 - Y1) / 2 CX = (X2 + X1) / 2 CY = (Y2 + Y1) / 2 for Angle = 0 to 360 X = CX + cos(Angle) * RX Y = CY + sin(Angle) * ...


6

Graphics typycally require some knowledge about platform specific interfaces, some general math, and eventually some typical pattern. You can start from the Widows GDI (and GDI+) and from the X Window system (for Unix/Linux) and move to 3d with openGL(every platform) or Direct3d(on Windows)


6

I'm not sure there is a "right way", but a reasonably effective way of cooperating with a designer is to first build an unstyled system that uses templates and allows for the easy interchange of all templates. Then, once you have a functional-but-unstyled (or minimally styled) interface, you hand the results over to the designer for styling. A decent ...


5

Pick up The Non-Designers Design Book and The Non-Designer's Web Book by Robin Williams. It's a great place to start.



Only top voted, non community-wiki answers of a minimum length are eligible