What are the bad points of using Core Data for iOS like an ORM

I just starting to use `Core Data` for my iOS app and I am thinking about how use Core Data for my needs. **What are the features of my app:**   1. The user look for products proposed from a catalog.   2. The user can add products into a basket.   3. The user can customise each selected product.   4. The user have to create an account to purchase the order.   5. The user have to add recipients for his order.   6. The user pay the order. **How I would persist the datas with`Core Data`:**   * If the user isn't logged on `iCloud` or on my `RESTful API`: Persist the datas on the device.   * If the user is logged on `iCloud` but not on my `RESTful API`: Persist the datas on `iCloud`.   * If the user is logged on my `RESTful API`: Persiste the datas on my back-end. **Question** : After reading some articles about `Core Data`, I quickly understood that it is really verbose and I will rewrite lot of similar code in my app. After researches I found a wonderful article about libraries for `Core Data` by `NSHipster` and I am really interested by using Objective-Record library for my app. But one sentence on the `NSHipster`'s article alerts me on the consequences of using such a library: > Using Core Data as an ORM necessarily limits the capabilities of Core Data > and muddies its conceptual purity. I would have more informations about the " _limits the capabilities_ " of using a library inspired by `Active Records`. I wouldn't regret the choice of using Objective-Record library on my app if it can pose problems for the development of feature for me later. Thanks ! **Update:** The good point for me to use Core Data with a library inspired by Active Record is I have to do a lot of "requests" inside my app and this will allow me to write less code.


How to apologize when you have broken the nightly build

My first commit in my project resulted in the nightly build being broken and people are all over me as we are nearing the release. I want to send an apology email that should sound sincere and at the same time hinting that this was my first commit and this would not be repeated any more. Being a non-native English speaker, I have difficulties coming up with correct words. Can someone please help ?


Feature vs. Function

Often I hear PMs (Project Managers) talk about feature and function. And I'm just so puzzled to differentiate them. Sometimes I think of a feature to be equivalent to a user story. Something like "As a user, Bob should be able to see a list of his payments", and they call it a feature. Sometimes it gets as big as a subsystem, something like "the ability to send SMS via web application". Function on the other hand sometimes gets as small as a task, "implementing digit grouping for number inputs", while there are cases when it gets as big as a whole CRUD operation. My question is, how can we differentiate feature from function?


MVC URL formatting/design

In refactoring a lot of MVC code, I have run into an issue with my URL design. For example, let's say we have a `Venue` object               public class Venue      {         public long ID { get; set; }         public List<Event> Events { get; set; }     }      and an `Event` object               public class Event     {         public long ID { get; set; }         public Venue Venue { get; set; }     }      So my initial set up was to have an action set up in the `EventController` like               public ActionResult List (long? ID) // http://example.org/API/Events/List/12      where the `ID` specified the Venue, so it would return a list of events for that venue. If an `ID` is not specified, it returns a list of **all** events. This results in a confusing URL, because the `ID` parameter is ambiguous and misleading. I then thought to change it to               public ActionResult List (long? VenueID) // http://example.org/API/Events/List?VenueID=12      which makes a lot more sense and is more clear. An even cleaner URL would exist if the action was moved to the `VenueController` and set up like               public ActionResult Events (long? ID) // http://example.org/API/Venue/12/Events      as the `ID` would clearly specify the `Venue`'s `ID`. The issue with this URL is that you are primarily dealing with `Event` objects in the `VenueController`, which seems wrong. I have been leaning towards the first option (`http://example.org/API/Events/List?VenueID=12`) because, even though the other option is cleaner, it seems like I should keep the `Event` pages (as I view this List page as more related to the `Event` object) in the `EventController`. Any recommendations?


Getting practicality of PHP from Ruby or Python

I have a rather odd problem. I love the practicality of PHP - specifically that I can fairly safely assume that on any random server I'll have access to the MySQL libraries, and that I can go between PHP/HTML with `<?` and `?>`. That said, I find the language atrocious - Ruby and Python are considerably more expressive, yet since they're not web-specific, they lack both of those features - at least last I used them both. So my question is, is there some way to get the practicality of PHP from Ruby or Python (specifically the two issues I mentioned)? If not, is there some other language that doesn't feel like a C/C++ parser gone wrong?


Are wikis really appropriate to store documents for software development?

Everybody knows that well-documented software development leads to success. However, it usually means that not only plain text but also binary content will be involved in the document, such as a UML diagram. And I've heard many people say that. The version control system is not the appropriate place for the binary files. I totally understand and agree with the issue. I asked several seasoned developers where the best place to store documents should be and the answer I got was "wiki". Wiki is good but I considered another potential issue. How can the source code which has been stored in a version control system connect to its related document in wiki? Let's say someone clones the repository of git or mercurial. How can he/she find the document easily? Or have I just missed something? **Updated:**   I know some wiki systems have the ability to integrate with source control systems. But my concern is not about the ability of integration. If you have cloned source code from a git repository and after a while you get on a train and want to continue to work offline on the train (which is a big feature of DVCS). Then you suddenly realize you don't have any access to document since you are working offline on the train. On the other hand, if the document was stored in git repository you would have access to the document with repository cloned.


XML in the attribute of other XML

Today, another developer was talking to me about how he addressed an issue he was working on. The solution he found was to stick a string of escaped XML into the attribute of another XML element. In my head I was screaming "Is that even safe and wise to do???". According to him, that has been done on tons of other projects within the company that transmit XML back and forth. My question is this -   1. Is that a safe/smart thing to do (xml in an xml attribute)?    2. If not, should I bring that up? I have only been with the company for 2 years and have noticed many things that are just asking for a major catastrophe to happen someday (both in and not in projects I work on). I don't want to be the one that always says that they are doing things wrong... Any thoughts would be greatly appreciated! **FYI - UPDATED INFO RE: APPLICATION -** Flash is calling this API and parsing the XML it gets in the response. I do not think the Flash is using XPath or anything, just string parsing (but I could be wrong). I do not work on the Flash aspect, so I do not know where to look (nor would I understand it).


Computer Science Degrees and Real-World Experience

Recently, at a family reunion-type event I was asked by a high school student how important it is to get a computer science degree in order to get a job as a programmer in lieu of actual programming experience. The kid has been working with Python and the Blender project as he's into making games and the like; it sounds like he has some decent programming chops. Now, as someone that has gone through a computer science degree my initial response to this question is to say, "You absolutely MUST get a computer science degree in order to get a job as a programmer!" However, as I thought about this I was unsure as to whether my initial reaction was due in part to my own suffering as a CS student or because I feel that this is actually the case. Now, for me, I can say that I rarely use anything that I learned in college, in terms of the extremely hard math, algorithms, etc, etc. but I did come away with a decent attitude and the willingness to work through tough problems. I just don't know what to tell this kid; I feel like I should tell him to do the CS degree but I have hired so many programmers that majored in things like English, Philosophy, and other liberal arts-type degrees, even some that never went to college. In fact my best developer, falls into this latter category. He got started writing software for his church or something and then it took off into a passion. So, while I know this is one of those juicy potential down vote questions, I am just curious as to what everyone else thinks about this topic. Would you tell a high school kid about this? Perhaps if he/she already knows a good deal of programming and loves it he doesn't need a CS degree and could expand his horizons with a liberal arts degree. I know one of the creators of the Django web framework was a American Literature major and he is obviously a pretty gifted developer. Anyway, thanks for the consideration.


Choosing an ubiquitous language across different bounded contexts

If my domain has several Bounded Contexts, but only **ONE** team will work on all contexts, should I develop an Ubiquitous language for each context? or should I have only one and force to into all contexts? The bounded context definition from Evan's book states: > A BOUNDED CONTEXT delimits the applicability of a particular model so that > team members have a clear and shared understanding of what has to be > consistent and how it relates to other CONTEXTS. Within that CONTEXT, work > to keep the model logically unified, but do not worry about applicability > outside those bounds. In other CONTEXTS, other models apply, with > differences in terminology, in concepts and rules, and in dialects of the > UBIQUITOUS LANGUAGE. I don't understand what is meant by _"dialects of the UBIQUITOUS LANGUAGE"_. Should I develop a universal ubiquitous languge then modify it for each bounded context? My main problem is if a single team is going to work on all context they might get confused by the constant change in the terminology. **UPDATE** :   Let's use an example to illustrate the problem. If I have 2 bounded contexts `Operations` and `CustomerService` and an entity `Order`.   A customer may request a refund. In the Operations context this is called a `refund` while in the CustomerService context it is called a `cancellation`. In my models I gonna have something like `order.refund()` or `order.cancel()`. The question is should I have 2 models for the order entity one with a method called `refund()` while in the other context a method called `cancel()`? or should I force a single terminology? The implementation of the refund process might the same or different.


Package diagram for an MVC patterned project?

We are required to make a package diagram for our senior project. Since our project uses MVC patter design, we created an MVC class diagram, now, our problem is in creating the package diagrams from our class diagram. Is it possible to have packages with MVC at the same time? so it would be something like this: Package: Account   * Account Model   * Profile Controller   * Registration Controller   * Profile View   * Registration View These are the controller that cannot exists without the Account model, so I included them. Thanks in advance!


Which language for which job?

Today I asked myself a quite fundamental question, well .. I guess it is one. But google- and SEing couldn't give me the answer I was looking for. I'm writing programs for quite a few years now, but the languages in which they were written, was always given by higher seniors, customers or by myself for learning purpose. Let's say for instance that I want to write a application with basic functions, like database access, calling webservices and so on.   Which language should be used, and why? Ignoring factors like cross- platforming, UI, which DB system or webservices are used ... imagine something like a black body in physics. As example, why should I use Java over C++ or Python over Ruby? Not saying that this question is limited to these languages. Are there good reasons for choosing an specific language, like performance or memory usage, or is it, in case of a "black-body-situation", just the personal preference which determines the actual used language? Thanks in advance. ... and sorry if this question is to general.


Should I Prefer Session Timeouts Based off of Prime Numbers?

While researching some information regarding managing state and session in web applications, I stumbled across this nugget of information: > 67 is the first useful prime number after 60. (Yes, 61 is a prime, too, but > it's too close to 60 to be of use.) Setting timeouts in durations of primes > is common because it lessens the likelihood that two timeout sessions will > overlap. > > Of course, that's completely anecdotal and may not in any way be the reason > why they chose 67 minutes, but that's always made sense to me. At first glance, this seems to make perfect sense to me, and traditionally, I've never given a lot of thought to the variance of sessions timing out, but I wonder how much (if any) this strategy has been put into place in practice? Would making a change to timeouts ending on prime numbers really have that much of an effect long-term in a large scale application? Or would a change like this go mostly unnoticed? In other words, is this _really_ anecdotal? Or is it something that should be strongly considered as a best practice?


What is the name for the programming paradigm characterized by Go?

I'm intrigued by the way Go abandons class hierarchies and seems to completely abandon the notion of class in the typical object oriented sense. Also, I'm amazed at the way interfaces can be defined without the type which implements that interface needing to know. Are there any terms which are/can be used to characterize this type of programming methodology and language paradigm (or perhaps specific aspects of it)? Is the Go language paradigm sufficiently new and distinct from the classical OOP paradigm and sufficiently important in the history of computer programming to warrant a unique name?


Should I move invariant out of cycle

Should I care about moving invariants out of cycle scope if it worsens code readability? Let's take a look at a simple example:               for (var i = 0; i < collection.Count; i++)     {        ...     }      vs.               var collectionCount = collection.Count;     for (var i = 0; i < collectionCount; i++)     {        ...     }      The performance of second piece of code is better or equal to first one. It will be equal only if collection is fixed-size and Count is not calculated every time. It will be much better if, for example, collection is Linked List which doesn't cache somewhere its Length. I understand that second approach will unlikely kill my application performance (it is much more likely some inefficient SQL query will) but at the same time I don't feel comfortable when I write second piece of code as I miss (small) optimization. But at the same time from readability point of view I like the first piece of code more (less lines of code, less variables). I guess it is minor thing and may be it doesn't worth discussing but I would like to hear your opinion.


How to manage the task of reviewing localized strings by a non-developer?

In .NET Framework, localized strings are located in an XML file (or multiple files). Those files are part of the project and are committed to the source control as any other source code file. Usually, Visual Studio is used to display those files as a table and edit the localized strings. I work in a small team on a product which should have a multilingual interface.   1. As a developer, I draft the localized strings in both languages, given that the translation may be inexact,   2. Another person from the team (a non-developer) reviews the content in both languages and corrects it if needed. The current issue is that the non-developer person would not use neither source control, nor an IDE, since it would be too cumbersome and difficult (version control _is_ difficult for non-developers) for this person. An alternative solution would be for me to export the localized strings as an Excel file, wait for this person to review the Excel, then to re-import the modified strings. The caveat here is that I may be creating other strings, renaming existing ones, etc., making it difficult to diff the local version with the reviewed one. What to do? How does it happen in other teams?


Data validation best practices: how can I better construct user feedback?

Data validation, whether it be domain object, form, or any other type of input validation, could theoretically be part of any development effort, no matter its size or complexity. I sometimes find myself writing informational or error messages that might seem harsh or demanding to unsuspecting users, and frankly I feel like there must be a better way to describe the validation problem to the user. **I know that this topic is subjective and argumentative.** I've migrated this question from StackOverflow where I originally asked it with little response. Basically, I'm looking for good resources on data validation and user feedback that results from it at a theoretical level. Topics and questions I'm interested in are:   1. **Content**     * Should I be describing what the user did correctly or incorrectly, or simply what was expected?     * How much detail can the user read before they get annoyed? (e.g. Is "Username cannot exceed 20 characters." enough, or should it be described more fully, such as "The username cannot be empty, and must be at least 6 characters but cannot exceed 30 characters."?)   2. **Grammar**     * How do I decide between phrases like "must not," "may not," or "cannot"?   3. **Delivery**     * This can depend on the project, but how should the information be delivered to the user?      * Should it be obtrusive (e.g. JavaScript alerts) or friendly?     * Should they be displayed prominently? Immediately (i.e. without confirmation steps, etc.)?   4. **Logging**     * Do you bother logging validation errors?   5. **Internationalization**     * Some cultures prefer or better understand directness over subtlety and vice-versa (e.g. "Don't do that!" vs. "Please check what you've done."). How do I cater to the majority of users?   6. **Accessibility** (edit)      * This is an extension of the _delivery_ topic, but what are the best options for providing feedback to the visually impaired (color blindness or full blindness)? I may edit this list as I think more about the topic, but I'm genuinely interested in proper user feedback techniques. I'm looking for things like research results, poll results, etc. I've developed and refined my own techniques over the years that users seem to be okay with, but I work in an environment where the users prefer to adapt to what you give them over speaking up about things they don't like. I'm interested in hearing your experiences in addition to any resources to which you may be able to point me.


PyQt design issues

I've been working on a my first real project using PyQt lately. I've done just a little bit of work in Qt for C++ but nothing more than just messing around. I've found that the Qt python bindings are essentially just a straight port of C++ classes into python, which makes sense. The issue is that this creates a lot of messy, unpythonic code. For example if you look at QAbstractItemModel, there's a lot of hoops you have to go through that forces you to hide the actual python. I was just wondering if there's any intention of writing a python implementation of Qt that isn't necessarily just a wrapper? Either by Nokia or anyone else? I really like Qt but I would love to be able to write more pythonic code. I hope this is OK to ask here. I'm not trying to start a GUI war or anything.


If I try to monetize free software, what could possibly prevent someone from forking that software and creating a proprietary version?

I've only recently begun to learn about the tensions between free and proprietary software, and I've been very confused by the way that free software can make money. I understand that free software is "free as in speech, not as in beer," but if I release an open source program and then try to monetize it, what could possibly prevent someone from forking that software and creating a proprietary version? Is the only thing that stops them the investment of other members of the open source community in improving the software? It seems like every improvement free software makes is transparent so a proprietary copycat can make sure they are always up to date with the latest features in the free version, and then add their own features on top of that independently. I'm confused about how free software can survive in serious competition with proprietary software.


What processes do you follow when developing code for large corporations?

I'm interested in learning about any process you need to follow when coding for a large corporation. For example, it would be nice to see a little insight into how you (or your manager) handles   * Code reviews   * Deployment to production   * Procuring HW/SW for development   * Evaluating vendors   * SOX Compliance   * Security reviews  ... or anything else I may have missed. It would also be nice to see if you think there is any benefit to the paperwork, or if there is a comparable software alternative. I'm interested in everything from paperwork, meetings, routines, or even software tools you may use.


How to communicate side effects in a RESTful API on the server to the client?

I have been thinking a lot about Hypermedia REST-APIs for the last couple of weeks. One thing I am not quite sure about is how I want to model side effects on the server side. In my current project, I am using JSON+HAL as the content-type, and am making use of links and embedded resources. For example: Let's say some resource A gets PATCHed by the client, e.g. because a money value gets updated. Suppose this resource is used by another resource B. This resource B represents the sum of all resources that are of A's kind. Hence resource B would have provide a new value after A has been updated. What's the best way to communicate this to the client? The following options come to my mind:   1. Return all possibly updated links in the PATH response, i.e. especially a link to B. The client will then try to GET all provided links.   2. Embed those resources that may have been updated, and provide links to all other relevant resources.   3. Return a link to a parent resource of both A and B, because the whole state of A and B has been changed, and possibly even more. Option 1) seems not right, because I may provide links to resources that are not really in the vicinity of A. Also, I cannot distinguish between resources that I should GET because they were updated, and resources that may be useful in other ways (for navigation, manipulating application state, creating new resources, ...) Option 2) is basically the same as 1), but with the advantage that an embedded resource tells me directly the state of the resource, which is useful when I embed B. Option 3) sounds the best to me so far. In this example I might have a parent resource "spreadsheet", which contains row resources, like A, and a sum resource, like B. If I change one of the rows, I get a link back to the spreadsheet, which the client can then GET, and either get all rows and sums embedded or as links. Maybe I am missing some other options. I am really not sure what the best practice here is.


Why is "working with files" is an important subject when learning Objective C?

I'm reading a book on Objective C, and I was wondering how important the subject Working with files for learning to develop iOS in particular? On you tube the tutorials are very short, maybe 10 min of video that teaches you how to do stuff with files and URL's. But in the book its a very long chapter with lot's of detail. The basics of working with files and URL's if very clear and simple, so I was wondering when I be really need this and this information become handy, and if I need to dig that deep in this topic right now? The main question is, if I know the basics, can I move on and come back when I need it? or it's a really crucial to dig in right now?


Highly scalable and dynamic "rule-based" applications?

For a large enterprise app, everyone knows that being able to adjust to change is one of the most important aspects of design. I use a rule-based approach a lot of the time to deal with changing business logic, with each rule being stored in a DB. This allows for easy changes to be made without diving into nasty details. Now since C# cannot Eval("foo(bar);") this is accomplished by using formatted strings stored in rows that are then processed in JavaScript at runtime. This works fine, however, it is less than elegant, and would not be the most enjoyable for anyone else to pick up on once it becomes legacy. Is there a more elegant solution to this? When you get into thousands of rules that change fairly frequently it becomes a real bear, but this cannot be that uncommon of a problem that someone has not thought of a better way to do this. Any suggestions? Is this current method defensible? What are the alternatives? Edit: Just to clarify, this is a large enterprise app, so no matter which solution works, there will be plenty of people constantly maintaining its rules and data (around 10). Also, The data changes frequently enough to say that some sort of centralized server system is basically a must.


Define "production-ready"

I have been curious about this for a while. What exactly is meant by "production-ready" or its variants? Most recently I was looking for information about sqlite and found this thread, where many people suggest sqlite isn't ready for production. I know the difference between development/testing and production; my definition of production is anything that is provided to the customer or will be used by non-programmers. However, there seem to be many items that aren't defined as production-ready. But in reality, they may be perfectly suited and people just have a predujice against them, e.g. sqlite, python, non-MS products, etc. Small office vs. enterprise? Single user vs. multi-user? Client vs. server? Where do you draw the line?


Optimizing XML based protocol

We have recently replaced binary based communication protocol with XML one (between browser based client and server). The implementation is almost complete, however I am looking for ways to improve its performance both for faster transmission and parsing. Any ideas ? Please post link along with the answer.


Do non-pure interpreters still make the guarantees of functional programming?

I am assuming the implementations/compilers/generated C code (referred to hereinafter as generic, 'interpreter') for most functional programming languages are written in non-pure functional languages. If this is the case, the underlying interpreter for any given functional programming language exhibits destructive updates and is referentially opaque. Functional constructs are designed to make certain guarantees, such as concurrency and provability. If the interpreter is indeed an imperative program, how is it able to guarantee the 'no side-effects' properties of pure functional programs? Surely optimisations to functional code by the interpreter include changing the nature of recursive functions to imperative ones? My question is: **How do imperative interpreters still make guarantees about the functional program they are executing without being inherently functional themselves?**


How to implement a hybrid role-based access control model?

I am writing an enterprise web-forms-frontend application for in-house use. It has Direct access control (DAC) masquerading as Role-based access control (RBAC). For anonymization purposes, let's call the main unit of information stored in my application a Document, and the roles in the company a Boss, a Grunt and a C-level executive. There are also Externals (e.g. somebody working for a business partner of ours). The general guideline is that everybody but externals should be able to read all documents, C-level execs can write everything, Bosses can write the Documents belonging to their own department, and Grunts can only write Documents personally assigned to them. Fairly standard thus far. But what users actually want is that they can make arbitrary exceptions to the above. They want that any person in the system can be granted write access to any Document, and that Externals can be granted Read access to any document. (Actually, it is more complicated than that, with more roles and finer granularity of permissions, including management of who can propagate which permission to others, but the above description illustrates the core of the problem well enough). So what I have is basically permissions on a personal level, and the roles are only a convenient way of having default settings for the personal-level permissions when a user or a Document is added to the system, instead of having somebody fill out a whole row or column in an access control matrix by hand. Now I have already designed a Permissions table in my database, which has a User FK, Document FK and columns for the different types of permissions. What I am not sure is what I should save in the table.   * Alternative 1: I save all permissions in this table (pure DAC) and have the logic tier mimic a RBAC. E.g. when a new Boss is added, a row for each Document in the system is added to the DB, with Read permissions for all documents and Write for the Documents of her department.    * Alternative 2: I save the deviations from the role guidelines only. So when a new Boss is added, nothing is written to the permissions table. But when an executive gives a Boss the rights to write to a Document from a different department, then a single row is added to reflect that information.  I am not sure which alternative would be better. The first one feels closer to textbook implementation, and if a principle has made it into a textbook, then there is normally good reason to use it. But in my case, it also hurts the DRY principle - after all, if the information that a C-level exec can write to Document X is derivable from his role, writing a row with this information in the DB is redundant. What are the advantages and disadvantages of each approach in terms of a) application performance and b) complexity of implementation? What headaches can I expect from each? Keep in mind that 1) I don't plan to implement a full logic tier. The whole application is practically a convenient CRUD frontend to a database, so I will be doing DB queries for each page view instead of keeping a collection of Document objects in memory. (I know the advantages of a MVC pattern, but it was decided that it will be overkill for this project). 2) I am programming this in ASP .NET 4.5, so the closer I stay to roles, the more I can let the framework do the heavy lifting for me. 3) I have thought of implementing groups orthogonal to the roles to manage access, but it doesn't make sense in my case.


How would I make a suggestion for a change to the SQL standard

If I wanted to make a suggestion to a change to how the `UPDATE` statement works in `SQL`, how would I go about it? Is there a website for the next standard? I googled, but just kept getting the Wikipedia page.


Should You Log From Library Code?

If I am developing a Java library, is it good practice to issue log statements from within the library's code? Having logging within the library will make debugging and troubleshooting more transparent. However, on the other hand, I do not like littering my library code with logging statements. Are there any performance implications to consider as well?


Where can I read exemplary Scheme code?

Edi Weitz's libraries are often brought up when people ask for exemplary code in Common Lisp, the kind to read and learn from. Are there any open-source Scheme projects or libraries that you can recommend above others? I'm working in Gambit, so I'd prefer code without the Racket extensions. Applications in games or scientific/numeric computing would be a plus, but really I'm just looking for code to learn from. (Game and numerical code just tends to be easier to dive into for me, since the overall point of the project is readily understandable.) **Edit:** I am looking for complete projects and libraries, rather than isolated snippets such as those in a book. (Partially this is because I'm already reading SICP, and I'm looking for real-world applied examples to complement it, rather than another source of isolated functions/macros.)


Programming languages classification / taxonomy

Is there a rigorous way to classify programming languages ? If so, can the various "dimensions" be quantified ? (degree of purity) For instance, I just went on the Shade language website (I am not affiliated with it in any way) and saw :   * "semi-functional" -> But how much is that language semi-functional ? -> quantification need   * "full type checking" -> So type checking can be partial -> can be quantified too ?   * Objectif model / no object model...


Sequence Diagram for Response Redirect in ASP.Net Webforms

In asp.net webforms I have a home aspx page that has a “Go” button. [This is the only control in this page]. When this button is clicked, the user is redirected to “UserProfile.aspx” page. How can we represent this redirect action in sequence diagram? Any reference articles/blogs for this?


C# seems to be popular these days. I heard that syntactically it is almost the same as Java. Java and C++ have existed for a longer time. For what reasons should I choose C# over Java and C++?


Should we choose Java over C# for a new project?

We have a team of .NET developers (C#) with a range of experience from 2 to 6 years. Over the last few years we have been developing Silverlight, ASP.NET MVC, and WPF applications. However, there is a new two year project which means we will develop a HTML5 application on Linux. The company I work for would like all developers across their offices to use the same programming language which is Java. Although there is talk of using Mono but using the same language and sharing modules, services, etc. already created in Java is the main reason for moving to Java. Some of the developers here are upset. How do I find something positive in moving over that will convince the other developers? There will be a training budget, but the thought of learning to work with Java libraries and a new platform (Linux) will be scaring a lot of the guys. What should I do?


Drag-n-drop programming - would it fly?

All programming languages I know of are written - i.e. typed out as lengths of text one way or another. But I wonder if there's any programming language where you can just drag-n-drop the whole program; to get a loop, you select this box over here and drag it to that section of the "code" over there, and so on. And if there isn't one like this, would it fly if one was invented? Personally I don't believe it would be such a good idea, but I'd like to hear what you think.


Static linking with modified LGPL code

I'm writing a library which links with modified LGPL library,so two questions:   1. Do I have to make my code LGPL in case of static linking with LGPL library?   2. in case of dynamic linking?


In-memory datastore in Haskell

I want to implement an in-memory datastore for a web service in Haskell. I want to run transactions in the `STM` monad. When I google _hash table steam Haskell_ I only get this: `Data. BTree. HashTable. STM.` The module name and complexities suggest that this is implemented as a tree. I would think that an array should be more efficient for mutable hash tables. Is there a reason to avoid using an array for an `STM` hashtable? Do I gain anything with this steam hash table or should I just use a steam ref to an `IntMap`?


How should calculations be handled in a document database

Ok, so I have a program that basically logs errors into a nosql database. Right now there is just a single model for an error and its stored as a document in the nosql database. Basically I want to summarize across different errors and produce a summary of the "types" of errors that occured. Traditionally in a SQL database the this normalization would work with groupings, sums and averages but in a NoSQL database I assume I need to use mapreduce. My current model seems unfit for the task, how should I change the way I store "models" in order to make statistical analysis easy? Would a NoSQL database even be the right tool for this type of problem? I'm storing things in Google AppEngine's BigTable, so there are some limitations to think of as well.


How to deploy a GNU GPL software with Java Web Start?

I deploy an interactive software using Java Web Start. This is a quiet useful deployment technology and I don't want to change. Besides I am about to publish my software under a GNU GPL license. Usually, when a user installs a new software he is asked to read the license terms and accept it. Is there any equivalent process with Java Web Start ? How can I ask my user to accept the license terms before using it ?


Building a web app with encrypted MySQL database entries?

I have some experience in building PHP based websites with MySQL access, storing encrypted user details, but all other fields being plain text. My most recent project will require sensitive data to be stored in the database. All of which I'm hosting myself. I want to set up a system where a user can access his own entries and see the plain text results, but even if he was able to access someone else's they would be encrypted, unintelligible strings. I have an idea of how to accomplish this, but perhaps it's not optimal or there exist tools to do this already in a more efficient way.   1. Store username as plain text, and password encrypted with sha1(). Or both encrypted with sha1().   2. Take the user's password (not the encrypted one, but the one he typed in and use it do define a key specific to that username and password, which will then be stored as a session variable.   3. Encrypt, or decrypt all of that users data with that key. In my opinion even if someone gained access to the database and saw a list of plain text usernames and encrypted passwords they couldn't figure out the specific key since it's not stored anywhere. Therefore even if access was gained, they couldn't decipher the content of the sensitive database fields. Of course I'm building in ways to stop them accessing the database anyway, but as a catch-all effort this seems like a good set of steps. Could the experts please comment on this, and offer some advice? Thanks a lot.


What do you need to know before you build something like Facebook / Twitter / YouTube?

Of course you will need a programming language! But what other things that you should know before you build your first steps for a large website which will be for the community!   * What else do you need to learn in the programming language itself?


Starting with BI / Data Analysis

We have a bunch of data about our customers and we'd like to learn more about it. Writing queries to pull data out is not a problem, and we're doing that right now, but we'd like to take it to the next level. I keep hearing about BI, data analysis, regression, predictive analysis, etc. So, if we want to glean more information from our data, where should we start? Should we look into a BI tool? Should we just start learning about data analysis? Or maybe look into R? Any books you would recommend to start? Should I go back to school (college level math, but nothing fancy -- willing to learn)? Any online courses you recommend? Ultimately we would like to end up with more intelligent filters that would allow us to seep through our data more efficiently. Something like "only include people outside of cities in state X and Y because Z and Q". Thank you for any suggestions you may have. **EDIT** : Per JeffO's request. It's not necessarily about tools. More like: What should be the next step in learning more about our data, about the relationships within our data that we may not know about? Or where should we start exploring things like regression or predictive analysis?


Is it a good idea to always use Google as the first step to solving a problem?

> **Possible Duplicate:**   >  Importance of learning to google efficiently for a programmer? Avoiding lengthy discussions, as a senior level student in CS, how can I get away from Googling problems I run into? I find myself using it too much; I seemingly reach for the instant answer and then blindly copy and paste code, hoping it works. Anyone can do that. I've read the related threads about being a better programmer, but mostly those recommend practicing on pet projects, which I have done, but again I feel EVERY wall encountered, from design through completion, was hurdled with Google. Do professionals instantly "research" their problem? Or do you guys step back and try and figure it out yourselves? I'm talking about both 'algorithm/design' problems as well as compiler issues.


Can recursion be done in parallel? Would that make sense?

Say, I am using a simple recursive algo for fibonacci , which would be executed as:               fib(5) -> fib(4)+fib(3)                 |      |           fib(3)+fib(2)|                     fib(2)+fib(1)      and so on Now, the execution will still be sequential. Instead of that, how would I code this so that `fib(4)` and `fib(3)` are calculated by spawning 2 separate threads, then in `fib(4)`, 2 threads are spawned for `fib(3)` and `fib(2)`. Same for when `fib(3)` is split to `fib(2)` and `fib(1)` ? (I'm aware that Dynamic programming would be a much better approach for Fibonacci, just used it as an easy example here) (if someone could share a code sample in C\C++\C# as well, that would be ideal)


Ping one remote server from another remote server

It's simple to ping a server in C#, but suppose I have servers A, B and C. A connects to B. A asks B to ping C, to check that B can talk to C. A needs to read the outcome. Now, first of all is this possible without installing an application onto B? In other words, can I perform the entire check from just running a program on A? If so, can anyone suggest the route I would take to achieve this? I've looked at sockets but from the examples I've seen these require a client AND server application to function.


Is avoiding the private access specifier in PHP justified?

I come from a Java background and I have been working with PHP for almost a year now. I have worked with WordPress, Zend and currently I'm using CakePHP. I was going through Cake's lib and I couldn't help notice that Cake goes a long way avoiding the "private" access specifier. Cake says > Try to avoid private methods or variables, though, in favor of protected > ones. The latter can be accessed or modified by subclasses, whereas private > ones prevent extension or re-use. in this tutorial. Why does Cake overly shun the "private" access specifier while good OO design encourages its use i.e to apply the most restrictive visibility for a class member that is not intended to be part of its exported API? I'm willing to believe that "private" functions are difficult test, but is rest of the convention justified outside Cake? or perhaps it's just a Cake convention of OO design geared towards extensibility at the expense of being a stickler for stringent (or traditional?) OO design?


Software Design Idea for multi tier architecture

I am currently investigating multi tier architecture design for a web based application in MVC3. I already have an architecture but not sure if its the best I can do in terms of extendability and performance. The current architecure has following components   * DataTier (Contains EF POCO objects)   * DomainModel (Contains Domain related objects)   * Global (Among other common things it contains Repository objects for CRUD to DB)   * Business Layer (Business Logic and Interaction between Data and Client and CRUD using repository)   * Web(Client) (which talks to DomainModel and Business but also have its own ViewModels for Create and Edit Views for e.g.) Note: I am using ValueInjector for convering one type of entity to another. (which is proving an overhead in this desing. I really dont like over doing this.) My question is am I having too many tiers in the above architecure? Do I really need domain model? (I think I do when I exposes my Business Logic via WCF to external clients). What is happening is that for a simple database insert it (1) create ViewModel (2) Convert ViewModel to DomainModel for Business to understand (3) Business Convert it to DataModel for Repository and then data comes back in the same order. Few things to consider, I am not looking for a perfect architecure solution as it does not exits. I am looking for something that is scalable. It should resuable (for e.g. using design patterns ,interfaces, inheritance etc.) Each Layers should be easily testable. Any suggestions or comments is much appriciated. Thanks,


Macro vs. Static functions in Header

for a lot of quick tasks where one could employ a function `f(x,y)`, in plain C, macros are used. I would like to ask specifically about these cases, that are solvable by a function call (i.e. macros used for inlining functions, not for code expansion of arbitrary code). Typically C functions are not inlined since they might be linked to from other C files. However, static C functions are only visible from within the C file they are defined in. Therefore they can be inlined by compilers. I have heard that a lot of macros should be replaced by turning them into static functions, because this produces safer code. Are there cases where this is a not good idea? Again: Not asking about Code-Production macros with ## alike constructs that cannot at all be expressed as a function.


Which are the best ways to organize view hierarchies in GUI interfaces?

I'm currently trying to figure out **the best techniques** for organizing **GUI view hierarchies** , that is dividing a window into several panels which are in turn divided into other components. I've given a look to the Composite Design Pattern, but I don't know if I can **find better alternatives** , so I'd appreciate to know if using the Composite is a good idea, or it would be better looking for some other techniques. I'm currently developing in Java Swing, but I don't think that the framework or the language can have a great impact on this. **Any help will be appreciated.**               ---------EDIT------------      I was currently developing a frame containing three labels, one button and a text field. At the button pressed, the content inside the text field would be searched, and the results written inside the three labels. One of my typical structure would be the following:               MainWindow         |         Main panel            |            Panel with text field and labels.            |            Panel with search button      Now, as the title explains, I was looking for a suitable way of organizing both the MainPanel and the other two panels.   But here came problems, since I'm not sure whether organizing them like attributes or storing inside some data structure (i.e. LinkedList or something like this). Anyway, I don't really think that both my solution are really good, so I'm wondering if there are really better approaches for facing this kind of problems. **Hope it helps**


Methodology To Determine Cause Of User Specific Error

We have software that for certain clients fails to download a file. The software is developed in Python and compiled into an Windows Executable. The cause of the error is still unknown but we have established that the client has an active internet connection. We suspect that the cause is due to the clients network setup. This error cannot be replicated in house. What technique or methodology should be applied to this kind of specific error that cannot be replicated in house. The end goal is to determine the cause of this error so we can move onto the solution. For example;   * Remote Debugging: Produce a debug version of the software and ask the client to send back a debug output file. This involves alot of time (back and forth communication) and requires the client to work and act in a timely manor to be successful.    * In-house debugging: Visit the client and determine their network setup, etc. Possibly develop a series of script tests before hand to run on the clients computer under the same network.    * Other methodologies and techniques I am not aware of?


How much system and business analysis should a programmer be reasonably expected to do?

In most places I have worked for, there were no formal System or Business Analysts and the programmers were expected to perform both the roles. One had to understand all the subsystems and their interdependencies inside out. Further, one was also supposed to have a thorough knowledge of the business logic of the applications and interact directly with the users to gather requirements, answer their queries etc. In my current job, for ex, I spend about 70% time doing system analysis and only 30% time programming. I consider myself a good programmer but struggle with developing a good understanding of the business rules of a complex application. Often, this creates a handicap because while I can write efficient algorithms and thread- safe code, I lose out to guys who may be average programmers but have a much better understanding of the business processes. So I want to know \- How much business and systems knowledge should a programmer have ? \- How does one go about getting this knowledge in an immensely complex software system (e.g. trading applications) with several interdependent business processes but poorly documented business rules.


Learning Java with a simple project

As i remember the time when i was learning PHP, it was suggested to build a simple blog or a forum after reading the language fundamentals. I was told/read that this would cover everything that I would need to learn about PHP from a beginners book. This advice was out there in a number of places, and after following and working with PHP it seems quite good advice. Now, i am learning Java and reading the book "Thinking in Java" by Bruce Eckel. I wonder if there is any such set of similar, small projects that I could take up, that would cover all the essentials and most of what is covered in the book.


Which is a better design pattern for a database wrapper: Save as you go or Save when you're done?

I know this is probably a bad way to ask this question. I was unable to find another question that addressed this. The full question is this: We're producing a wrapper for a database and have two different viewpoints on managing data with the wrapper. The first is that all changes made to a data object in code must be persisted in the database by calling a "save" method to actually save the changes. The other side is that these changes should be save as they are made, so if I change a property it's saved, I change another it's save as well. What are the pros/cons of either choice and which is the "proper" way to manage the data? **EDIT** To provide more information, we're using Node.js, and we're writing our own wrapper for Neo4j because we feel that the current one available is not complete, or have run into issues where we need more functionality. That being said, an example of the save as you go method (these examples are in Javascript):               // DB is defined as a connection to the database via HTTP(REST)     // "data" being an object that would represent new data     var node;     db.getNodeById(data.id, function(err, result) {       node = result;       // This function task an optional callback as a third parameter because in       // in addition to setting the property on the "node" object it saves the       // new value to the database by making an HTTP request.       node.set("firstName", data.newFirstName);       // auto saved as well       node.set("lastName", data.newLastName);       // end here as the node has already been updated with your changes.     });      And the opposing example would be:               // DB is defined as a connection to the database via HTTP(REST)     // "data" being an object that would represent new data     var node;     db.getNodeById(data.id, function(err, result) {       node = result;       // This changes the value for the node object only, nothing in the       // database is changed.       node.set("firstName", data.newFirstName);       node.set("lastName", data.newLastName);       // Save all your changes       node.save();     });


How do you go about training a replacement?

I recently asked about leaving a position and got a lot of great answers. One of the common threads was that being around to train the new person would be expected and could go a long way. Now considering that (I think) most people don't stay at a company for a long time after they've given notice, and it will take time for the company to interview/hire one - that leaves for a short amount of time to get someone up to speed. I've also never trained anyone before. I did a bunch of tutoring in University and College, but teaching a language/technology is far different from training someone to replace you on your job. So the question is: how do you go about training someone to replace you in a, potentially, short amount of time?


How to transfer code responsibility to another developer

I'm in a situation at work where I have to transfer responsibility of a large code base that I inherited, re-factored and enhanced to another developer. This is the first time that I have to do such a thing and although I always thought it would be trivial the actual steps I have to follow seem vague. The code base I maintain is a module that includes a lot of stuff such as   * A persistence layer   * A service layer   * A presentation layer which sadly has a lots of business code in it   * An interface for module interaction I also have very good knowledge of the business assumptions made when it was developed as well as its technical foundation. I know that I can go with my mind's flow and give it my best but I prefer to do it in the most professional manner I can. So, I would like to ask you for advice on how I should approach this situation. Are there any standard procedures and good practices that I could follow?


job handover checklist

I have resigned my old employer to start a new job, and I need to prepare a handover [documentation to be taken by some new employee that haven't arrived yet, and would be some weeks from when I go to when they fill the position again]. So what important points should I make sure to cover, I was making some iOS apps, [90% completed], and a web portal [60% completed] the other IT engineer is here so he can update on passwords etc. Should I use some system like a wiki to leave things there for access? or just a normal doc? what other things should I consider?


Impact of ending contract with know-ins-and-outs lead developer of a project

I have a long time running project. Its been running for about 6 months. The project is very big. The lead developer/team leader designed the project and the whole project is in his brain. He knows all ins and outs. I also know almost everything. But I am not confident like him. Problem is recently he is charging quite high for simple bug fix and small change request. I am worried if I end the contract what will be the future of the project. I had 2-3 public demos. I must launch soon. The project is still in development alpha.   1. What happens to the project if I end the contract?   2. Are the high charges is because he knows I can not end the contract now?


What actions to take when people leave the team?

Recently one of our key engineers resigned. This engineer has co-authored a major component of our application. We are not hitting Truck number yet though, but we're getting close :) Before the guy waltzes off, we want to **take actions necessary to recover from this loss as smoothly as possible** and eventually 'grow' the rest of the team to competently cover the parts he authored. _More about the context: the domain the component covers and the code are no rocket science but still a lot of non-trivial stuff. Some team members can already cover a lot of this but those have a lot on their plates._ These are the actions that come to my mind:   1. Improve tests and test coverage - especially for the non-trivial stuff,   2. Update high level documents,   3. Document any 'funny stuff' the code does (we had to do some heavy duct-taping),   4. Add / update code documentation - have everything with 'public' visibility documented. Finally the questions: What do you think are the actions to take in this situation? What have you done in such situations? What did or did not work well for you?


Code ownership: What should I do when a dev leaves or team splits?

There are multiple ways of tracking code ownership (i.e., collective, team or individual). In case of team or individual ownership, how do you:   * track ownership?   * deal with situations when dev leaves or team splits/re-organizes for new projects?


Questions to ask before someone leaves

Apart from the obvious questions relating to specific project work someone is working on are there any questions I should be asking a fellow dev who is leaving the company? So far I am thinking about;   * Locations of things on the server he uses that not maybe everyone does.   * Credentials he has set up that we wouldn't have needed.    * Client details he has not yet saved into our CRM system.


New project from a third party and documentation

I'm going to become the custodian of an iOS project developed by a third party and my boss just asked me for a list of documentation that I think we should be asking the third party for when they hand over the code. I did some light searching on this and I've found incredibly varying answers to this, so I figured I'd ask a question more tailored to my particular situation. I'm working on a team of 7 individuals of varying experience levels, and I'm sure I'll be called upon to maintain or add features to this project in the future. What should I ask the third party to include when they hand off the code to help make my life easier? AppleDoc? UML diagrams?


Understanding high cohesion principle for methods in object oriented design

I know the idea of strong cohesion applies to methods as much it applies to classes. Just to be clear when I say _strong cohesion_ of a method I mean a method which does only one task and does it well. This idea really works for simple _getters_ and _setters_. But sometimes we usually come across methods that does more than one task internally , although it seems to be doing a single task if you look at a higher level of abstraction. An example of such a method can be :                public void startUp() {             List<SubSystem> subSystems = getSubSystems();             sychronized(subSystems) {                 for (SubSystem subSystem : subSystems) {                     subSystem.initialize();                 }             }         }      And inside those `subSystem#initialize()` methods a lot is going on. So is this a violation of the _high/strong cohesion_ principle ?


Is there a term for quasi-open source proprietary software?

Say a company wants to keep development of new features of a piece of software internal, but wants to make the source code for previous versions public, up to and including existing public features, so that other people can benefit from using and modifying the software themselves, and even possibly contribute changes that can be applied to the development branch. Is there a term for this sort of arrangement, and what is the best way of accomplishing it using existing version control tools and platforms?


Schema.org vs microformats

They both serve the same purpose: Providing a vocabulary for semantic markup. Schema is recognized and standardized… but the microformats standard is by an open community process. Schema exploits microdata in documentation, while microformats go on classes. (Of note: microdata means that an element must be of a single `itemtype`, while microformats allow several classes to apply to the same element. I can markup xFolk+hAtom with classes, but not with microdata.) Is this a black-and-white situation? Google says I can't use both "because it may confuse the parser". What's the consensus on these?


Clarification about Grammars , Lexers and Parsers

**Background info** ( _May Skip_ ): I am working on a task we have been set at uni in which we have to design a grammar for a DSL we have been provided with. The grammar must be in BNF or EBNF. As well as other thing we are being evaluated on the Lexical rules in the grammar and the Parsing rules - such as if rules are suitable for the language subset, how comprehensive these rules are, how clear the rules are ect. What I don't understand is if these rules are covered in a grammar defined in BNF (it's a new topic for us). **The Question** : Does a grammar for a given language that has been defined in either BNF or EBNF contain / provide rules for **_Lexical Analysis_** and/or **_Parsing_**? ( _or do these have to be specified else-where?_ ) Also what would be considered a lexical rule? And what would be considered a parsing rule?


What is proper etiquette for releasing a complete rewrite of an existing project?

I'm new to the opensource world. The project I'm working on resides on Github. (Just for reference) The project I'm working on is a plug-in for the Plex Media Server. I plan to submit my plug-in to Plex so that it will be included in their "app store". Now to my question. When I first started out, I found an older semi-abandoned plugin that did some of what I wanted but not very well. I started by contributing to that repo. I was immediately made a collaborator with full rights to the repo since the current owner said he was too busy to mess with it anymore. However, as I started to dig deeper into the code I realized that it was futile. The existing code base was terrible and there was no efficient way to fix it. I ended up just starting from scratch. The only code I used in my new plugin was the code I committed initially. Now the project is ready to be released. However I am unsure as to how to go about doing this. I see my options as follows:   1. Create a new repo and just forget about the existing one. I'm not sure if I should even mention the previous repo and or its contributors. I didn't use any of that code/resources and have created an entirely new code base. While the plugin does some of the same things the old one did, it does it in an entirely new way and more efficient way.    2. I fork the existing repo, delete the existing code, and commit my new code. I'm really new to Git, so I'm not sure if this is even possible.    3. I commit my changes to the existing repo and see how the current contributors have to say.  Of the three options, I'm strongly leaning towards the first. BUT! I'm new to open source and I want to make sure I'm doing things according to proper etiquette. I don't want to have my first project blow up in my face and become a disaster. Option two doesn't sound bad but I'm not sure if I'm supposed to do that. I'm not sure how the history and diffs would work. We're only talking about 500 - 1000 lines of code at most. So it's not a huge code base. Thanks for any input you can provide!


Where should UI errors be generated and printed from? Log errors?

Function `A()` calls `B()` calls `C()`, which encounters an error. Which function writes to the log and which function reports to the user? My first inclination is that all functions should write to the log, and that the inner-most UI-facing function should be responsible for outputting the error to the user. However, the _fix_ needs to be done in `C()`, so perhaps instead of having an super-long log file which will take a while to parse, I should simply have the function which encountered the error log the error and the parameters used to call it. Likewise, I'm not too convinced that the inner-most UI-facing function should output the error (consider CLI apps, as opposed to web or GUI apps). That was more of a gut-feeling decision, so any insight into actually _engineering_ a solution would be appreciated.


Where, in an object oriented system should you, if at all, choose (C-style) structs over classes?

C and most likely many other languages provide a `struct` keyword for creating structures (or something in a similar fashion). These are (at least in C), from a simplified point of view like classes, but without polymorphism, inheritance, methods, and so on. Think of an object-oriented (or multi paradigm) language with C-style structs. Where would you choose them over classes? Now, I don't believe they are to be used with OOP as classes seem to replace their purposes, but I wonder if there are situations where they could be preferred over classes in otherwise object- oriented programs and in what kind of situations. Are there such situations?


How is intermediate data organized in MapReduce?

From what I understand, each mapper outputs an intermediate file. The intermediate data (data contained in each intermediate file) is then sorted by key. Then, a reducer is assigned a key by the master. The reducer reads from the intermediate file containing the key and then calls reduce using the data it has read. But in detail, how is the intermediate data organized? Can a data corresponding to a key be held in multiple intermediate files? What happens when there is too much data corresponding to one key to be held by a single file? In short, how do intermediate partitions differ from intermediate files and how are these differences dealt with in the implementation?


What comes first, the ruby chicken or the homebrew egg?

Whilst installing Ruby on OsX I noticed I could do so by using a package manager called Homebrew. This seemed like an easy option, so I took it. Everything worked smoothly. Life was good. Being a curious fellow, I looked into what other benefits having homebrew installed would give me, and in my study found that Homebrew is written in ruby. Woah, wait a minute! How is it then, that I can install Ruby using something that is written in Ruby, not already having Ruby on my system, and once installed said ruby based system I STILL have to install ruby separetely? **Warning:** _Do not read this question aloud. You risk getting a Kaiser Chiefs single stuck in your head for the remainder of the day._


ERP/CRM Systems. Desktop Based ? Web based?

I have seen 2-3 ERPs in action. I am wondering what is better. Desktop based application or webbased displayed on a browser. My first experience was with a web based ERP when i was 14 years old.. It was web based and terribly slow... For most simple task you had to do lots of clicks... no keyboard support ..... Pages took ages to load. Last year I worked for migrating to a newer computer some old terminal based cobol application. The computer that worked till today and still has no problem was from 1993.   The user interface ofcourse was textbased.. The speed that guys placed orders was amazing! just typing the name of the customer , then 5-10 keys to add a product to order.... Comparing to this ERP the page for placing orders Link (click sales orders) seems terribly slow to add a product... No keyboard shortcut works to save what you added and generally I believe you need 4 times more time to place an order compared to the text interface...   Having to use both mouse and keyboard for this task is BAD and sadistic... So how can the heck these people ever use a system like that ??? So in the long run desktop application seems the only way... Of course browsers support shortcuts but the way to overide the defaults that browsers uses isn't cross compatible... That is a huge problem. Finnaly, if we MUST/forced use cloud in near future what about keyboard shortcuts?? I feel confused... I have seen converters of desktop applications to browser applications but are SLOW as hell... The question is what about user friendliness? What kind of application would you use?


How do you convince management to throw away a prototype?

I love prototyping as a fast effective way to put a UI in front of a user. Many times though, management get their beaks in the way, and the prototype is dragged kicking and screaming into main stream development. How do you manage management into not doing this?


Is it ever too old to learn how to become a programmer?

If you want to be a good developer, but start developing at the age of 26, is there any way to became a good programmer ?


How big can a mobile development team be without being too big?

I work for a company that is moving heavily into mobile. We find the majority of our customers use our mobile app pretty regularly. We have tons of things we want to add to it -- as well as to deliver all these new features on Andriod- and iOS-native apps. But I wonder how big we could possible make a mobile development team without making it too big to be practical. Can we have a mobile team that's 5 people? 10? 50? 100? If it made sense for us to build that many new features, from an Engineering standpoint is it practical? Or is there some limit of the amount of Engineers that could support a single app (across multiple platforms)?


Are there any free software tools to aid software cost estimation using object points?

I'm looking for a free (or if there is none, then paid too) software that could aid estimating the effort to create a software using object points. If anyone knows any other software that is able to aid cost estimation (and it's quite fast and reliable) then I would also be happy to hear about it. :)


Is it common to lie in job ads regarding the technologies in use?

> Wanted: Experienced Delphi programmer to maintain ginormous legacy > application and assist in migration to C# _Later on, as the new hire settles into his role..._ "Oh, that C# migration? Yeah, we'd love to do that. But management is dead-set against it. Good thing you love Pascal, eh?" I've noticed quite a lot of this where I live (Scotland) and I'm not sure how common this is across IT: a company is using a legacy technology and they know that most developers will avoid them to keep mainstream technology on their resumes. So, they will put out a advertisement saying they are looking to move their product to some hip new tech (C#, Ruby, FORTRAN 99) and require someone who has exposure to both - but the migration is just a carrot on a stick, perpetually hung in front of the hungry developer as he spends each day maintaining the legacy app. I've experienced this myself, and heard far too many similar stories to the point where it seems like common practice. I've learned over time that every company has legacy problems of some sort, but I fail to see why they can't be honest about it. It should be common sense to any developer that the technology in place is there to support the business and not the other way round. Unless the technology is hurting the business in someway, I hardly see any just cause for reworking the software stack to adhere to whatever is currently vogue in the industry. **Would you say that this is commonplace?** If so, how can I detect these kinds of leading advertisements beforehand?


Optionally Using GPL Library via System API in Closed-Source Application

Please consider the following situation: You write a closed-source application, let's call it A. A depends on a system API (i.e. provided by the OS), that is in turn configurable to use different backends. Each backend is identified by a simple string value and also selected via this identifier. The API itself is not bound by any GPL-like requirements. Now, a specific backend (B) would be preferred but is GPL-licensed. The application would run without it, and there are other backends available, just with worse performance or other downsides. Is any of the following permitted?   1. Hard-coding the identifier to B   2. Automatically selecting any available backend, but preferring B if available   3. Letting the user select a backend (and strongly suggesting B) Would it also depend on whether I ship A and B together, or just A and suggest the user that installing B would improve the application performance? I would generally think that all three options are o.k. since passing a specific string to a system API would hardly qualify for a _derived work_ (IMHO), but the FAQ of B basically state that _it does not matter how you call a function of B, any usage makes your program a derived work_. Are they right even in the three cases outlined above? P.S.: It is not my decision to make A closed-source, so GPL'ing it is not an option. P.S. 2: I omitted the names of the system API and B to keep the question more generic, but I can add them if it makes any difference. edit: From another point of view: When does the user (as opposed to the programmer) create a derived work? In the third case, it should be clear that the user creates the derived work since he installed A and B and actively selected B. This would be in line with MSalters' arguments in his comment. The second case at least makes it clear that the work does not depend on B, so this could be o.k., too. Probably it would be most in the _spirit_ of the GPL to just contact the authors; however, I'm not sure if their FAQ entry is in line with the _actual text_ of the GPL.


Is there any algorithm book that teaches like Head First series?

As a Java programmer I need to learn algorithms (for programming Challenges). I read some Head First Series (JAVA owned by me) and they are pretty brain friendly. So I was wondering is there any algorithm book that will be simple to understand and also goes to the crux of each algo.


What are the essential mathematics topics that a programmer should know in order to learn algorithms?

Being a electronics engineer, I was never exposed to any algorithms. Now I am a experienced programmer and want to learn Algorithms. I started with CLRS. But I was overwhelmed by the maths in the book. So which are the minimum maths topics should I know before I start Algorithms? Are there any good tutorials or books on this? I did find one book on maths by Donald Knuth, but i guess its too details and tough for beginners.


DDD and the persistence of value objects; must we denormalize?

I've been reading up a lot on Domain-Driven Development, and I came to the question of how to preserve lack of distinct identity with value objects (VOs). While in the DDD world, this is a requirement (yet I'm not sure I understand the full power of this) it poses problems for the lower ORM layers in terms of persistence. Tables, for the most part, like to be normalized. It makes life easy in terms of having no delete or insertion anomalies. My concern comes when implementing VOs; they do have primary keys - identities by definition (and foreign keys to their parent). Making them entities is violating DDD in favor of persistence. Instead, I could make a wrapper class that accepts a "bag" of parameters, and then attaches them to each parent's foreign key. While mechanically messy, it sounds like it will work. I've read a lot of responses on the internet (Stack Overflow also) about denormalizing tables. This concerns me, as now we're violating persistence for DDD. How to allow VOs to exist by their proper definition without a denormalization?


Resources for creating a turn-by-turn navigation system

I'm trying to create a kind of turn-by-turn satellite navigation system using the iOS SDK. I get the directions from the server and draw them on the map, then I keep getting location updates from the iPhone's GPS chip. Currently I start by finding the nearest turning point then, each time the user comes within a certain distance of the next turning point, a verbal cue is given and the turning point index is incremented. This is a delicate system and I'd like to make it more robust so I can tell when the user is going the wrong direction etc. Basically I'm looking for some literature about turn-by-turn navigation, in terms of tracking the user's progress and whether they're going the right direction. I'd have thought there's a lot of research out there but I can't seem to find anything apart from simple tutorials on how to use a given SDK or directions API. Can anyone direct me to a good run-through of the various techniques used in software such as TomTom or Google Maps Navigation?


Design pattern for overlapping actions and animations?

Is there a design pattern for dealing with overlapping UI actions and animations? A few examples:   1. Let's say I have an interactive table row that expands to reveal an extra control when the user clicks on it, and vice versa if they click on it again. If the user clicks on the row while the expand animation is in progress, I want it to stop animating and shrink back to its original size from the place where it stopped.   2. I have a set of rows from example 1 inside a group. When the last row is deleted, I want the group to shrink and then remove itself in a callback. However, while the group is shrinking, the user could still add another row to it. If that happens, I want the group to stop shrinking, expand to the correct size, and add the row.   3. What if I have a sorting function for the UI in example 2? If the user clicks on the sort button, the rows shuffle and animate into their new positions. However, I still want the user to be able to click on table rows, delete rows, and do everything else that my UI allows. The UI should behave sensibly, with the shuffle animation taking precedence. You could automatically fast-forward all animations for a UI element when a new action is performed on it, and/or block user input in all animating UI elements. But that seems inelegant to me. As a user, I really admire UIs that don't stutter or block me from doing what I want — UIs, in other words, that behave like real objects — and I'd like to do the same in my own applications. It seems to me that you'd need to have constraints for each action/animation in order to make this a robust system. For example, you might need to ensure that any changes to your data/state/model happen _only_ in the callback to your animation, not before. In example 2, you can't delete the group in your model as soon as the user clicks the button to delete the last row; it has to be done at the end of the animation, and at the end of the animation only. (Otherwise, if the user decides to add another row during the delete animation, reverting the group delete would be very difficult.) You might also need to design the animation system in such a way that if two animations from two different actions overlap, any mutually exclusive properties would continue animating as before. (In other words, if the user sorts the table while a row is expanding on click, the width expansion should not stop just because the row is moving to its new position.) And what about starting defaults for each animation? If a row fades out when deleted, and then another action implicitly cancels the delete, the fade out should stop and animate back in, even though the other action might not necessarily know about it. There's also the higher-level issue of animations (visual property changes) vs. actions (sequences of events, with potential model changes, that include animations). In example 2, "delete last row" is clearly an action, since the end result is that a group gets removed. However, in most UI libraries, you'd add the callback to the animation, conflating the two. This is also an issue in games. If I need to trigger a grenade throw after my character's throw animation finishes, how do I represent that in my code? How do I place the grenade throw on my timeline without mixing model and view code, while still allowing the animation to slow down and speed up based on external factors? The more I think about this, the more my head hurts, and the more I'm convinced that somebody has already thought this through a lot more carefully than me. Any ideas? (At the moment, I'm mostly interested in this for web UI, but I'm also interested in a general approach for my future, non-web projects.)


Common practice to transfer named parameters in Tcl

Using Tcl8.5, what is the common practice to transfer **named** variables to a proc/method? Something that will be similar to defining the class members when instantiating a class object _[incr Tcl]_. Something like this:               # Passing 3 parameters: "hello", "how" and "doing".     procName -hello world -how you -doing today     # We can easily add or remove any parameters to/from any location      **Edit #1:**   Same example as above, but more similar to python:               procName hello=world how=you doing=today


String and Suffix Matching from a Suffix List

I'm having trouble finding an algorithm that matches (or fails to match) a substring of a string to a suffix from a list of suffixes. The hits I'm finding are for suffix trees and suffix arrays, but they are not quite what I am looking for. My particular problem is a fully qualified hostname - possibly malformed - and trying to match the suffix provided by the banned suffix list published by Mozilla. As a concrete example, given `w.x.y.z.example.com`, I need to identify it as hostname `w`, domain `example.com`, and know that `example.com` is valid domain. As a degenerative example, I may need to take `example.com` and know that its a domain with no host, and that matching it to `*.com` would be wrong. And the negative cases only get worse when you factor in suffixes like `pvt.k12.ma.us`, `nasushiobara.tochigi.jp`, `公司.cn` and `السعودیة`. The eventual application will be DNS hostname matching in X509 certificates. Hence the reason there may be malformed input from miscreants. I think this algorithm should run in _m log n_. _log n_ for each lookup into the [sorted] list of suffixes, and _m_ for each DNS label. I think it may be a case of not seeing the forest through the trees. Does anyone know of an efficient algorithm for matching substrings from a list of suffixes?


In what way(s) is LLVM Low Level?

In what way(s) is LLVM (Low Level Virtual Machine) Low Level? (At the time of writing, I did not find this expansion of the abbreviation "LLVM" on its web site, but on Wikipedia.) Is it called "Low Level" in what is it designed for (a compiler infrastructure) or because it is works on a "lower level" than other tools? As a (kind of) "illustration" of this, is LLVM lower-level than the JVM and CLR, or is it only _designed_ for "lower level" uses?


Customer ask firmware source file

Recently my company was asked by a customer to develop a control board that includes firmware and PCB layout development. After finishing development the customer will buy the control boards at certain quantity every year. We are now at making contract stage, the customer is wanting my company to handover both the firmware source files and PCB layout files after development. We could give the PCB layout files but we don't want to give the firmware files as we're worried about they may find third party to produce the control board so that we may have nothing. However from the customer point of view, they are concerned that they could be in risk situation if my company for some reason stops selling the boards. Is there any "common" practice to make contract regarding this?


Should all developers on a team have equal role/responsibility in writing and updating software design documents

I've asked a very similar question few days ago, but because I presented too much of my company's current situation, most answers focused completely on something that I wasn't looking to answer. So I wanted to try again... Given just about any agile team, you always have people with varied a) knowledge of the product b) experience in producing designs and c) general level of competence. So let's say you take an agile team and using the factors (a), (b) and (c) above you come up with an overall score for each engineers (mental exercise only). Now we sort them in ascending order and get a continuous spectrum. So the question I wanted to ask is this: _Should every single person on this spectrum be given equal responsibility as it comes to writing/updating software design specifications?_ I'm not talking about coming up with software design, in agile teams that is usually done by more than one person in a more collaborative setting. But at the end of the day, someone has to go back to his desk open their favorite (and company/team approved) document editor and type it all in. The reason I ask this question is because it seems people on high end of the spectrum tend to produce documents which are more readable, concise but have exactly the information you would want in a design specification so that future people who read it have much more benefit. People on the opposite side of the spectrum tend to produce documents which are not nearly as useful or clear and a lot of times, even with several iterations of design reviews, their work doesn't seem nearly as helpful (so specs they produce become write only dumping ground that no one reads or trusts because of the way they are written). I'm not proposing that the agile team be segregated and only certain individuals given certain roles that will never change. I'm asking... 1) what do you do in your teams with people who have vastly different (a)x(b)x(c) scores 2) Does it make sense to not give equal responsibility to everyone. Instead, give only smaller (or none) update tasks to those on the low end of the spectrum. But then work with these individuals by identifying (a), (b) and (c) factors that they'd need to improve and as those get improved give them more responsibility. Personally, I'm not sold on one way or another, I'm just curious how other teams are dealing with this.


When you should NOT use Regular Expressions?

Regular expressions are powerful tool in programmer's arsenal, but - there are some cases when they are not a best choice, or even outright harmful. Simple example #1 is **parsing HTML with regexp** \- a known road to numerous bugs. Probably, this also attributes to parsing in general. But, are there other clearly no-go areas for regular expressions ? * * * p.s.: " _The question you're asking appears subjective and is likely to be closed._ " - thus, I want to emphasize, that i am interested in examples where usage of regexps is known to cause problems.


Need to process 2 million 100k messages per second and route them to a particular event, delegate or multicast delegate

I need to process 2 million messages per second (perhaps in a scale out configuration) and route each message to a N delegates or multicast delegates. **Question** How should I structure my application in C# so that I can achieve the best performance when receiving the message, and routing it to the correct delegate? **Additional Details** Each inbound message has the following properties in the format of a JSON array:   * Customer   * Category   * TopicID   * DateTime   * Data[] Each message will be processed by a delagate function that is interested one or more of those properties. **Simple examples of delegate processing needed:**   * A customer counter function may count the quantity of messages per customer,    * A category counter may count the quantity of messages that counter   * A customer-counter will count messages unique to that customer.


Can anyone recommend coding standards for TSQL?

We've long had coding standards for our .Net code, and there seem to be several reputable sources for ideas on how to apply them which evolve over time. I'd like to be able to put together some standards for the SQL that is written for use by our products, but there don't seem to be any resources out there on the consensus for what determines well written SQL?


What are developer's problems with helpful error messages?

It continue to astounds me that, in this day and age, products that have years of use under their belt, built by teams of professionals, **still** to this day - fail to provide helpful error messages to the user. In some cases, the addition of just a little piece of extra information could save a user hours of trouble. A program that generates an error, generated it for a reason. It has everything at its disposal to inform the user as much as it can, why something failed. And yet it seems that providing information to aid the user is a low- priority. I think this is a huge failing. One example is from SQL Server. When you try and restore a database that is in use, it quite rightly won't let you. SQL Server _knows_ what processes and applications are accessing it. Why can't it include information about the process(es) that are using the database? I know not everyone passes an `Applicatio_Name` attribute on their connection string, but even a hint about the machine in question could be helpful. Another candidate, also SQL Server (and mySQL) is the lovely `string or binary data would be truncated` error message and equivalents. A lot of the time, a simple perusal of the SQL statement that was generated and the table shows which column is the culprit. This isn't always the case, and if the database engine picked up on the error, why can't it save us that time and just tells us which damned column it was? On this example, you could argue that there may be a performance hit to checking it and that this would impede the writer. Fine, I'll buy that. How about, once the database engine knows there is an error, it does a quick comparison after-the-fact, between values that were going to be stored, versus the column lengths. Then display that to the user. ASP.NET's horrid Table Adapters are also guilty. Queries can be executed and one can be given an error message saying that a constraint somewhere is being violated. Thanks for that. Time to compare my data model against the database, because the developers are too lazy to provide even a row number, or example data. (For the record, I'd never use this data-access method _by choice_ , it's just a project I have inherited!). Whenever I throw an exception from my C# or C++ code, I provide everything I have at hand to the user. The decision has been made to throw it, so the more information I can give, the better. Why did my function throw an exception? What was passed in, and what was expected? It takes me just a little longer to put something meaningful in the body of an exception message. Hell, it does nothing but help _me_ whilst I develop, because I know my code throws things that are meaningful. One could argue that complicated exception messages should not be displayed to the user. Whilst I disagree with that, it is an argument that can easily be appeased by having a different level of verbosity depending on your build. Even then, the users of ASP.NET and SQL Server are not your typical users, and would prefer something full of verbosity and yummy information because they can track down their problems faster. Why to developers think it is okay, in this day and age, to provide the bare minimum amount of information when an error occurs? It's 2011 guys, come _on_.


The suffix Exception on exceptions in java

Specifying a suffix of Exception on exception classes feels like a code smell to me (Redundant information - the rest of the name implies an error state and it inherits from Exception). However, it also seems that everyone does it and it seems to be good practice. I am looking to understand why this is good practice. I have already seen and read the question why do exceptions usually have the suffix exception in the class name The question is for PHP and while the responses are probably valid for Java. Are there any other arguments or is it really as simple as explicitly differentiating them? If we take the examples from the previous question - could there really be classes in java with the name `FileNoFound` that is not an exception? If there could be, does it warrant suffixing it with `Exception` ? Looking at a quick hierarchy in eclipse of `Exception`, sure enough, the vast majority of them do have the suffix of exception, but there are a few exceptions. `javassist` is an example of a library that seems to have a few exceptions without the suffix - e.g. `BadByteCode`, `BadHttpRequest` etc. `BouncyCastle` is another lib with exceptions like `CompileError` I've googled around a bit as well with little info on the subject.


I need advice developing a sensitive data transfer/storage/encryption system

I got closed on SO and told to post this here as it's about general application design as opposed to specific code. ## Intro I'm currently working on a project which involves the daily extraction of data (pharmacy records) from a VisualFox Pro database, and uploading some of it to a WordPress site, where clients of the pharmacy can securely view it. I would like some advice in terms of the general methodology of my software - I am able to code it, but need to know if I'm going the right way about it. I'm writing both the PC software (in C#/.NET 4.5) and the PHP WordPress plugin. (It doesn't matter much that it's in WordPress, the actual code for this will pretty much run separately). ## Question 1: Encryption The current process for encrypting the data server-side I plan to use is based on this article. Summarised, it advocates encrypting each separate user's data asymmetrically with their own public key, stored on the server. The private key to decrypt this data is then itself encrypted symmetrically using the user's password, and stored. This way, even if the database is stolen, the user's password hash needs to be broken, and even then the process needs to be repeated for every user's data. The only weakness, pointed out by the author himself, and the main point of my question, is the fact that while the user is logged in, the decrypted key is stored in session storage. The way the article suggests to deal with it is to just limit the time the user is logged in. I thought a better solution would be to store that key in a short-lived secure cookie (of course the whole process is happening over HTTPS). That way, if the attacker has control of the user's computer and can read their cookies, they can probably just keylog their password and log in, no need to steal the database, while even if the attacker gains access to the server, they cannot decrypt the HTTPS traffic (or can they? I'm not sure.) **Should I use secure cookies or session storage to temporarily store the decrypted key?** ## Question 2: Storage The second thing I still want to work out is how to store the data - this is more of an efficiency problem. Since every user has their own key for encryption, it follows that records for every user must be stored separately. I don't know if I should store a "block" of data for every user, containing encrypted JSON with an array of objects representing records, or whether I should store records in a table with the actual data structure, and encrypt each data field separately with the key. I am leaning towards storing the data as one block - it seems to me to be more efficient to decrypt one big block of data at a time, than perhaps several thousands separate fields. Also, even if I stored the data in its proper structure, I still wouldn't be able to use MySQL's WHERE, ORDERBY etc, since the data would all be BLOBs. **Should I store the data as a big block per user, or separated into the different fields?** ## Question 3: Transfer I extract the data from the DBF file, and essentially make a "diff", whereby I compare the current extracted data from the last day's data, and only upload the blocks of the users that have changed (I can't only upload the records, as I probably will end up storing the users' data in blocks). I also include "delete" instructions for users which have been deleted. This is as there are hundreds of thousands records in the database, totalling over 200mb, and the size increases every day. My current plan is to write all this data to a JSON file, gzip it and upload it to the server. My question is, how do I do that while ensuring the security of the data? Naturally, the upload will happen over HTTPS, and I have an API password in place to only allow authorised uploads, but my main concern is how to protect the data if the server is compromised. I don't want the attacker to just grab the JSON file from the server while it's being processed. One idea I had was to get the server to send me a list of public keys for the users, and perform the encryption in my software, before the upload. It seems to me like that's the only way of protecting that data. I could encrypt the whole JSON file, perhaps with an API key or a special password, but that's moot if the attacker can just access the decrypted file as it's being processed on the server. Is that a good solution? **Should I encrypt the data individually client-side, or is there a way to securely transfer it to the server and encrypt it there?** Thanks in advance for any answers, I'd love to hear from someone who's dealt with problems like this before. Matt **EDIT: I'm pretty decided on 1 and 2 - thanks @Morons. I'll use secure cookies and store data in blocks. My main question is now question 3, would love to get some input on that.**


Rigorous Definition of Syntactic Sugar?

It seems like in language holy wars, people constantly denigrate any feature they don't find particularly useful as being "just syntactic sugar". The line between "real features" and "syntactic sugar" tends to get blurred in these debates. What do you believe is a reasonable and unambiguous definition of syntactic sugar that avoids it being defined as any feature the speaker/writer doesn't find useful?


How to operate a computer without an operating system?

How a computer can be used when there is no operating system? What tools or knowledge do I need to do it? Do I have to give all the commands in binary to use computer hardware resources like a monitor?