Search Results

Search found 17909 results on 717 pages for 'gui design'.

Page 11/717 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Should we design programs to randomly kill themselves?

    - by jimbojw
    In a nutshell, should we design death into our programs, processes, and threads at a low level, for the good of the overall system? Failures happen. Processes die. We plan for disaster and occasionally recover from it. But we rarely design and implement unpredictable program death. We hope that our services' uptimes are as long as we care to keep them running. A macro-example of this concept is Netflix's Chaos Monkey, which randomly terminates AWS instances in some scenarios. They claim that this has helped them discover problems and build more redundant systems. What I'm talking about is lower level. The idea is for traditionally long-running processes to randomly exit. This should force redundancy into the design and ultimately produce more resilient systems. Does this concept already have a name? Is it already being used in the industry?

    Read the article

  • UML Class Diagram for User Login

    - by 01010011
    Hi, The diagram below is my very first attempt at creating a UML class diagram describing a user login into a website. I'm sure its a poor design and full of flaws, but I'm hoping to learn from you guys how you would design a simple login like this. I'm particularly interested in your use of design patterns and which patterns you would use, how you would implement it in the design, and why. Any advise, criticisms, comments and suggestions will be really appreciated. Thanks in advance.

    Read the article

  • How to design a command line program and keep it open for a future GUI?

    - by systempuntoout
    What are some best practices to keep in mind when developing a script program that could be integrated with a GUI, probably by somebody else, in the future? Example scenario: i develop a fancy python CLI program that scrapes every unicorn images from the web i decide to publish it on github a unicorn fan programmer decide to take the sources and build a GUI on them. he gives up because my code is a mess How do i avoid step 4 and let unicorn fan programmer build his GUI without hassle?

    Read the article

  • GUI system architecture?

    - by topright
    I'm designing GUI (graphical user interface) system for a game engine (C++). Idea is to create a heirarchy of GUI controllers like Focusable, Hoverable, Dragable etc. Every GUI component can attach multiple controllers, they modify component's behaviour. I think it gives flexible system and protects from code duplication. Different instances of the same GUI class can have different complex behaviours (may be, even change it dynamically), so this approach looks practical. The other choice is to add focused, hovered, dragged etc. flags in the base GUI component class. It looks like overhead and not that flexible. Another solution is to use Decorator pattern and wrap objects with FocusDecorator, HoverDecorator etc. Maintaining such system looks a bit harder. Question: What are pitfalls in my solution? May be you have seen a better approaches in GUI systems? What are the best ways of implementing such flexible complex system?

    Read the article

  • Application Design: Single vs. Multiple Hits to the DB

    - by shyneman
    I'm building a service that performs a set of configured activities based on the type of request that it receives. Each activity involves going to the database and retrieving/updating some kind of information. The logic for each activity can be generalized and re-used across different request types. The activities may need to participate in a transaction for the duration of the servicing the request. One option, I'm considering is having each activity maintain its own access to DAL/database. This fully encapsulates the activity into a stand-alone re-usable piece, but hitting the database multiple times for one request doesn't seem like a viable option. I don't really know how to easily implement the concept of a transaction across the multiple activities here either. The second option is to encapsulate ALL the activities into one big activity and hit the database once. But this does not allow re-use and configuration of these activities for different requests. Does anyone have any suggestions and input about what should be the best way to approach my problem? Thanks for any help.

    Read the article

  • How to extend this design for a generic converter in java?

    - by Jay
    Here is a small currency converter piece of code: public enum CurrencyType { DOLLAR(1), POUND(1.2), RUPEE(.25); private CurrencyType(double factor) { this.factor = factor; } private double factor; public double getFactor() { return factor; } } public class Currency { public Currency(double value, CurrencyType type) { this.value = value; this.type = type; } private CurrencyType type; private double value; public CurrencyType getCurrencyType() { return type; } public double getCurrencyValue() { return value; } public void setCurrenctyValue(double value){ this.value = value; } } public class CurrencyConversion { public static Currency convert(Currency c1, Currency c2) throws Exception { if (c1 != null && c2 != null) { c2.setCurrenctyValue(c1.getCurrencyValue() * c1.getCurrencyType().getFactor() * c2.getCurrencyType().getFactor()); return c2; } else throw new Exception(); } } I would like to improve this code to make it work for different units of conversion, for example: kgs to pounds, miles to kms, etc etc. Something that looks like this: public class ConversionManager<T extends Convertible> { public T convert(T c1, T c2) { //return null; } } Appreciate your ideas and suggestions.

    Read the article

  • How to design a command line program reusable for a future development of a GUI?

    - by systempuntoout
    What are some best practices to keep in mind when developing a script program that could be integrated with a GUI, probably by somebody else, in the future? Possible scenario: i develop a fancy python CLI program that scrapes every unicorn images from the web i decide to publish it on github a unicorn fan programmer decides to take the sources and build a GUI on them. he\she gives up because my code is not reusable How do i avoid step four and let unicorn fan programmer build his\her GUI without hassle?

    Read the article

  • Java Swing over Remote Desktop - Strange, weird GUI squashing

    - by ADTC
    I thought this question fits SuperUser more than StackOverflow because it's not about actual Java programming, though programmers might be more likely to encounter the problem. Anyway, let me start of with some stats before I ask the actual question: Laptop: Windows 7 x32 Screen resolution 1024 x 768; Nvidia GeForce Go 6200 Connected to desktop via ad-hoc wireless network Access internet via desktop Desktop: Windows 7 x64 Screen resolution 1920 x 1080 Connected to laptop via ad-hoc wireless network Access internet via cable modem I'm connecting to my laptop via Remote Desktop from my desktop to take advantage of the large screen. I'm doing programming on my laptop (for portability reasons). Everything else runs smooth and fast over Remote Desktop as both computers are connected directly over the ad-hoc wireless. The only problem is this: Java Swing apps don't display the GUI properly. I acquired a Java Swing application and I'm debugging it in Eclipse. Here's what I got when I ran the app: Apparently there doesn't seem to be anything wrong with the GUI application I'm debugging, because the Java Control Panel exhibits the same problem. I've searched high and low in Google about this; the closest I came to a solution is this. But sadly, the use of -Dsun.java2d.nodraw=true has no effect at all. This only happens over Remote Desktop. I have tried locally and the GUI apps display properly. This isn't a dealbreaker for me as I can stop using Remote Desktop when developing Java Swing apps. However, I would like to know if anyone has encountered this and found any solution. PS: All software involved (Eclipse, Java JRE, etc.) are latest versions.

    Read the article

  • Proper way to let user enter password for a bash script using only the GUI (with the terminal hidden)

    - by MountainX
    I have made a bash script that uses kdialog exclusively for interacting with the user. It is launched from a ".desktop" file so the user never sees the terminal. It looks 100% like a GUI app (even though it is just a bash script). It runs in KDE only (Kubuntu 12.04). My only problem is handling password input securely and conveniently. I can't find a satisfactory solution. The script was designed to be run as a normal user and to prompt for the password when a sudo command is first needed. In this way, most commands, those not requiring sudo rights, are run as the normal user. What happens (when the script is run from the terminal) is that the user is prompted for their password once and the default sudo timeout allows the script to finish, including any additional sudo commands, without prompting the user again. This is how I want it to work when run behind the GUI too. The main problem is that using kdesudo to launch my script, which is the standard GUI way, means that the entire script is executed by the root user. So file ownerships get assigned to the root user, I can't rely upon ~/ in paths, and many other things are less than ideal. Running the entire script as the root user is just a very unsatisfactory solution and I think it is a bad practice. I appreciate any ideas for letting a user enter the sudo password just once via GUI while not running the whole script as root. Thanks.

    Read the article

  • Game Design Schools in Canada

    - by CptJackLoder
    I am a High School student in Ontario and i am trying looking for college/university programs the are specifically about game design. There are quite a few at most colleges near me, but they are all BA's and I am looking for a BSc. The only one i have been able to find is at digipen but that is across the continent and more importantly outrageously expensive. Does anyone know of and programs in Canada or the US that offer a BSc in Game design?

    Read the article

  • The importance of Design Patterns with Javascript, NodeJs et al

    - by Lewis
    With Javascript appearing to be the ubiquitous programming language of the web over the next few years, new frameworks popping up every five minutes and event driven programming taking a lead both server and client side: Do you as a Javascript developer consider the traditional Design Patterns as important or less important than they have been with other languages / environments?. Please name the top three design patterns you, as a Javascript developer use regularly and give an example of how they have helped in your Javascript development.

    Read the article

  • Design Issues With Forms

    - by ultan o'broin
    Interesting article on UX Matters, well worth reading, especially the idea that global design research can take for a better user experience in all languages: Label Placement in Austrian Forms, with Some Lessons for English Forms What is perhaps underplayed here is the cultural influence of how people worked with forms in the past, and how a proper global user-centered design process needs to address this issue and move usability gains (in the enterprise space, productivity especially) in the right direction.

    Read the article

  • SQL Saturday Birmingham #328 Database Design Precon In One Week

    - by drsql
    On September 22, I will be doing my "How to Design a Relational Database" pre-conference session in Birmingham, Alabama. You can see the abstract here if you are interested, and you can sign up there too, naturally. At just $100, which includes a free ebook copy of my database design book, it is a great bargain and I totally promise it will be a little over 7 hours of talking about and designing databases, which will certainly be better than what you do on a normal work day, even a Friday....(read more)

    Read the article

  • What do you think was a poor design choice in Java

    - by Phobia
    Java has been one of the most (the most?) popular programming languages till this day, but this also brought controversy as well. A lot of people now like to bash Java simply because "it's slow", or simply because it's not language X, for example. My question isn't related to any of these arguments at all, I simply want to know what you consider a design flaw, or a poor design choice in Java, and how it might be improved from your point of view. Something like this.

    Read the article

  • Book Review: SSIS Design Patterns

    - by andyleonard
    Samuel Vanga ( Blog | @SamuelVanga ) has posted a review of our new book SSIS Design Patterns at his blog . Several of Sam’s statements struck me, but none more than this: Within a few hours of reading SQL Server 2012 Integration Services Design Patterns , it stood out that none of the authors were trying to impress by showing what they all know in SSIS. Instead, they focused on describing solutions and patterns in a great detail (exactly why I paid for). Sam mentions he could not locate the source...(read more)

    Read the article

  • Design Patterns - Why the need for interfaces?

    - by Kyle Johnson
    OK. I am learning design patterns. Every time I see someone code an example of a design pattern they use interfaces. Here is an example: http://visualstudiomagazine.com/Articles/2013/06/18/the-facade-pattern-in-net.aspx?Page=1 Can someone explain to me why was the interfaces needed in this example to demonstrate the facade pattern? The program work if you pass in the classes to the facade instead of the interface. If I don't have interfaces does that mean

    Read the article

  • Design for an interface implementation that provides additional functionality

    - by Limbo Exile
    There is a design problem that I came upon while implementing an interface: Let's say there is a Device interface that promises to provide functionalities PerformA() and GetB(). This interface will be implemented for multiple models of a device. What happens if one model has an additional functionality CheckC() which doesn't have equivalents in other implementations? I came up with different solutions, none of which seems to comply with interface design guidelines: To add CheckC() method to the interface and leave one of its implementations empty: interface ISomeDevice { void PerformA(); int GetB(); bool CheckC(); } class DeviceModel1 : ISomeDevice { public void PerformA() { // do stuff } public int GetB() { return 1; } public bool CheckC() { bool res; // assign res a value based on some validation return res; } } class DeviceModel2 : ISomeDevice { public void PerformA() { // do stuff } public int GetB() { return 1; } public bool CheckC() { return true; // without checking anything } } This solution seems incorrect as a class implements an interface without truly implementing all the demanded methods. To leave out CheckC() method from the interface and to use explicit cast in order to call it: interface ISomeDevice { void PerformA(); int GetB(); } class DeviceModel1 : ISomeDevice { public void PerformA() { // do stuff } public int GetB() { return 1; } public bool CheckC() { bool res; // assign res a value based on some validation return res; } } class DeviceModel2 : ISomeDevice { public void PerformA() { // do stuff } public int GetB() { return 1; } } class DeviceManager { private ISomeDevice myDevice; public void ManageDevice(bool newDeviceModel) { myDevice = (newDeviceModel) ? new DeviceModel1() : new DeviceModel2(); myDevice.PerformA(); int b = myDevice.GetB(); if (newDeviceModel) { DeviceModel1 newDevice = myDevice as DeviceModel1; bool c = newDevice.CheckC(); } } } This solution seems to make the interface inconsistent. For the device that supports CheckC(): to add the logic of CheckC() into the logic of another method that is present in the interface. This solution is not always possible. So, what is the correct design to be used in such cases? Maybe creating an interface should be abandoned altogether in favor of another design?

    Read the article

  • Rule of thumb for enemy design

    - by Terrance
    I'm at the early stages of developing a 2d side scrolling open ended platformer (think metroidvania) and am having a bit of difficulty at enemy design inspiration for something of a scifi, nature, fantasy setting that isn't overly familar or obvious. I haven't seen too many articles blogs or books that talk about the subject at great length. Is there a fair rule of thumb when coming up with enemy design with respect to keeping your player engaged?

    Read the article

  • Design pattern to handle queries using multiple models

    - by coderkane
    I am presented with a dilemma while trying to re-designing the class structure for my PHP/MySQL application to make it more elegant and conform it to the SOLID principle. The problem goes like this: Let as assume, there is an abstract class called person which has certain properties to define a generic person, such as name, age, date of birth etc. There are two classes, student, and teacher, that implements this abstract class. They add their own unique properties to it. I have designed all the three classes to include all the operational logic (details of which are not relevant in context of the question). Now, I need to create views/reports/data grids which contain details from multiple classes, for example, say, a list of all students doing projects in Chemistry mentored by a teacher whose name is the parameter to the query. This is just one example of a view, there are many different views in the application, which uses data from 3-4 tables, and each of them have multiple input parameters to generate them. Considering this particular example, I have written the relevant query using JOIN and the results are as expected and proper, now here is the dilemma: Keeping in mind the single responsibility principle, where should I keep this query? It does not belong to either Student class, or Teacher class or any other classes currently present. a) Should I create a new class, say dataView class, and design it as a MVC pattern and keep the query there? What about the other views? how do they fit in this architecture? b) Should I not keep the query in code at all, and make it DB View ? c) Am I completely wrong in the approach? If so what is the right approach? My considerations are as follows: a) should be easy to add new views later on if requirement comes, without having to copy-paste-modify code b) would like to make it as loosely coupled as possible so that if minor db structure changes happen, it does not break I did google searches on report design and OOP report generators, but all the result seem to focus on the visual design of the report rather than fetching the data. I have already taken care of the visual aspect of the report using MVC with html templates. I am sure this is a very fundamental problem with known solution, but I am somehow not able to find it (maybe searching with wrong keyword). Edit1: Modified the title to make it more relevant Edit2: The accepted answer got me thinking in the right direction and identify my design flaws, which eventually led me to find this question and the solution in Stack Overflow which gave me the detailed answer to clear the confusion.

    Read the article

  • design an extendable database model

    - by wishi_
    Hi! Currently I'm doing a project whose specifications are unclear - well who doesn't. I wonder what's the best development strategy to design a DB, that's going to be extended sooner or later with additional tables and relations. I want to include "changeability". My main concern is that I want to apply design patterns (it's a university project) and I want to separate the constant factors from those, that change by choosing appropriate design patterns - in my case MVC and a set of sub-patterns at model level. When it comes to the DB however, I may have to resdesign my model in my MVC approach, because my domain model at a later stage my require a different set of classes representing the DB tables. I use Hibernate as an abstraction layer between DB and application. Would you start with a very minimal DB, just a few tables and relations? And what if I want an efficient DB, too? I wonder what strategies are applied in the real world. Stakeholder analysis for example isn't a sufficient planing solution when it comes to changing requirements. I think - at a DB level - my design pattern ends. So there's breach whose impact I'd like to minimize with a smart strategy.

    Read the article

  • creating QT gui using a thread in c++?

    - by rashid
    I am trying to create this QT gui using a thread but no luck. Below is my code. Problem is gui never shows up. /*INCLUDES HERE... .... */ using namespace std; struct mainStruct { int s_argc;<br> char ** s_argv; }; typedef struct mainStruct mas; void *guifunc(void * arg); int main(int argc, char * argv[]) { mas m;<br> m.s_argc = argc;<br> m.s_argv = argv;<br> pthread_t threadGUI; //start a new thread for gui int result = pthread_create(&threadGUI, NULL, guifunc, (void *) &m); if (result) {<br> printf("Error creating gui thread"); exit(0); } return 0; } void *guifunc(void * arg) { mas m = *(mas *)arg; QApplication app(m.s_argc,m.s_argv); //object instantiation<br> guiClass *gui = new guiClass(); //show gui<br> gui->show(); app.exec(); <br> }

    Read the article

  • 12.04 boots into terminal after first install. How to boot into GUI permanently?

    - by Deniz
    As a person with a quite limited CLI experience I congratulate myself on installing Ubuntu on an ancient non-pae Fujitsu Amilo M1425 thru the network with mini.iso. However upon reboot I'm met w/ the following: Ubuntu 12.04.1 LTS ubuntu-fujitsu tty1 ubuntu-fujitsu login: for which my specified login during setup is not accepted. (I'm quite sure its correct) Let's assume this screen is passed, how to start the GUI and make it the permanent option during boot? This box will return to a mostly comp-illiterate person, for which the existence of ubuntu will be an enough shock already. Wouldn't wanna leave him w/o the GUI. Other posts here mention the command startx but I probably need a login in the first place.. So "why won't it accept my login & how can I make the GUI-boot permanent?" is my question. Thanks in advance.

    Read the article

  • Overloading interface buttons, what are the best practices?

    - by XMLforDummies
    Imagine you'll have always a button labeled "Continue" in the same position in your app's GUI. Would you rather make a single button instance that takes different actions depending on the current state? private State currentState = State.Step1; private ContinueButton_Click() { switch(currentState) { case State.Step1: DoThis(); currentState = State.Step2; break; case State.Step2: DoThat(); break; } } Or would you rather have something like this? public Form() { this.ContinueStep2Button.Visible = false; } private ContinueStep1Button_Click() { DoThis(); this.ContinueStep1Button.Visible = false; this.ContinueStep2Button.Visible = true; } private ContinueStep2Button_Click() { DoThat(); }

    Read the article

  • How can a computer render a CLI/console along with a GUI?

    - by Nathaniel Bennett
    I'm confused when looking into graphics - specifically with operating systems. I mean, how can a computer render a CLI/console along with a GUI? GUI's are completely different from text. And how can we have GUI windows that display text interfaces, ie how can we have CLI in modern Graphics Operating system - that's what I'm mainly trying to grip on to. How does graphics get rendered to display? Is there some sort of memory address that a GPU access which holds all pixel data, and there system's within OS's that gather the pixel position of windows and widgets, along with the Z Index and rasterize them to that memory address, which then the GPU loads to the screen? How about the CLI's integrated with Graphics? How does the OS tell the GPU that a certain part of the screen wants to display text while the rest wants to display pixel data?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >