title: Under what circumstances are flowcharts still a valuable and useful tool?

text: When I first started programming, I relied heavily on flowcharts (and printer spacing charts). While I was in COBOL class, I couldn't start writing any code until my flowchart was signed off by the instructor. Back then, I had to make flowchart for everything. Today, twenty-five years later, I find myself only flowcharting two types of things. Very specific algorithms where the logic is tricky or very general concepts to ensure that I get all the big steps defined and in the proper order. Are there other use cases for flowcharts that I've simply overlooked?


title: Sorting rows off an autoincrementing primary key

text: Is it a bad practice to rely on an auto-incrementing primary key to sort rows in a table? A coworker and I were having an argument about this subject. We need to be able to find the last-inserted row in a table, and we have no create/update time columns (which might be considered a bad practice in itself, but that's a different argument). We obviously can't rely on the natural order of the rows, since that can be inconsistent. Is there anything inherently wrong with using the primary key in this way, given that it's an immutable value? I should have noted: our implementation is using Hibernate (an ORM) to fetch our objects. We're not using any native queries -- only JPQL or Hibernate's functionality.


title: Is it worth being computer languages polyglot?

text: You can often hear that programmers should learn many different languages to improve themselves. I still go to school and don't have big programming experience (a little more than year). But what was noble intention to improve programming skills turned into some kind of OCD: I feel that **I won't calm down until I learn all relatively known programming languages.** And here is question itself: Will being programming languages polyglot actually help you (And I don't mean usual "Programmer should know at least all paradigms", I mean really **all** languages you usually hear about)? Does anybody have similar experience? Does it help with job/skills/career? How often are you able to apply those skills?


title: Is it getting harder to hire VB.NET developers?

text: I'm a consultant, and my last two engagements have been at VB.NET shops. It's become apparent to me that these organizations have a really hard time finding FTE developers. Have any of you observed that VB.NET developers are getting harder to find? Any thoughts as to why?


I've been developing the client-side for my web-app in JavaScript. The JavaScript can communicate with my server over REST (HTTP)[JSON, XML, CSV] or RPC (XML, JSON). I'm writing writing this decoupled client in order to use the same code for both my main website and my PhoneGap mobile apps. However recently I've been worrying that writing the website with almost no static content would prevent search-engines (like Google) from indexing my web-page. I was taught about this restriction about 4 years ago, which is why I'm asking here, to see if this restriction is still in-place. **Does heavy JavaScript use adversely impact Googleability?**


title: What's the best way to logically compare two XML files?

text: I want to compare two XML files logically. That means that following text lines should be the same for the comparison tool: 1.               <test><hello/><test/>      2.               <test>                                <hello/>                         <test/>      I'm a Windows developer and tried some comparison tools now: Beyond Compare, WinMerge, Total Commander, but all of them compare XML like a normal text comparison tool. Are there any other tools or approaches I can take?


title: Which source is quoteable for the popularity of programming languages?

text: I'm writing a paper right now, and I need a quotable source for the popularity of programming languages. One source I know is the TIOBE index, however, there are several others if you search google, and the ranking is different on every index. Which one would you suggest to be quoteable?


title: Should I keep my GitHub forked repositories around forever?

text: So I've forked someone else's repository, made a few changes, submitted a pull request, and my changes made it into the product. Great! But...what should I do with my forked repository? Is there a compelling reason for me to keep my repository around, or should I go ahead and delete it? I don't plan on making any additional contributions, but if I change my mind I assume I can always just re-fork it. I'm not really concerned about keeping a backup. I'm more worried about breaking links, losing commit messages, etc.


title: Project In A Week / development bootcamp

text: Our team is thinking of doing a "Project In A Week" (bootcamp), and I'm interested to know if anyone else has experience of doing this or has any advice? The idea behind it is to get away from the distractions of the office, motivate each other, and build our bonds within the team, in order to come up with an innovative and profitable product in a short space of time. The plan is to get the whole of the dev team (about 5 devs), a designer, a project manager, couple of sales and marketing people staying in a conference centre/hotel for a full working week. We'll be completely focused on building one web app (planned in advance) and getting it live and on the market within the week. We'll work quite long days but in the evenings we'll have some fun together as a team. There would be a couple of members of the team left in the office to ensure we're not distracted by day to day client support. Similar 'immersive' approaches are used by training companies such as Firebrand. Good idea? Terrible idea? What should we do to incentivise the team? Any thoughts/experiences/advice would be greatly appreciated. Cheers


title: Should we use progressing job titles for programmers?

text: I'm currently thinking about job titles for my team of programmers. Historically it's been pretty flat, with most people just "Programmer", and a very few people "Senior Programmer". But both those titles cover a wide diversity of experience and salary. I was thinking of replacing this with a progression of five levels -   * Developer   * Senior Developer   * Principal Developer   * Architect   * Senior Architect I'd be interested to hear what people think are the pros and cons of such a scheme. On the positive side, I've found that programmers actually covet good titles. On the negative side, it's been suggested to me that such a hierarchy can create resentment. I'd welcome your thoughts. **Update:** Thanks for all the great answers! It's certainly changed my thinking on this subject, and I will probably retain the flater structure at this point.


title: Migrating myself from .Net 1.1 to .Net 4.0

text: I have been working with .Net for 7 years. ASP Web Apps, Windows Forms, Windows Services, mostly done in C#, but some in VB.Net. And as we started to work with .Net 1.1, we stayed on .Net 1.1. Recently I did a few projects in .Net 4.0, which I'm sure are not different from those done in .Net 1.1, and I guess they can be easily compiled in .Net (haven't tried it, though). I see that there are some new tricks and methods, and obviously the framework has grown quite a bit...   1. I wonder if there is any difference from 1.1 to 4.0, in code, techniques, language abilities (you don't have to list them, just point out your favorites if there are any), etc?   2. What would you recommend I should do to learn those new things created in latter frameworks than 1.1?


title: License for my Software

text: I am nowhere near good at coming up with what type of license to use and I don't want to be sued or have my work stolen so I am going to ask. Here is my situation: I am creating a software for my boss and the YMCA which helps keep track of our employees, their students, and the amount of lessons they have remaining (In a nutshell but the program is much more extensive then that), I am spent almost 100 hours creating it and its not completely done. Some of the hours spent were at work while being paid (Not sure if that plays a factor). Here is a list of conditions that I desire:   1. My software to not be redistributed in any way without my knowledge and written consent.   2. To not be liable for any damage it causes, for maintaining the software, or for its success.   3. I do not want the software to be sold without my knowledge and consent either.   4. I want the software to be closed sourced. If there is a way I can have all of these in my software licensed I would be grateful, also if someone could explain to me where I need the license displayed and if it needs to be in the source code (since I am having it closed sourced).


title: MVC Widget optimization when accessing CSS and Resources

text: So we're trying to re-imagine our web solution in an MVC fashion. Going from an old webforms based solution to working with ASP.NET MVC with a bootstrap main menu and adding functionality in the forms of widgets using HTML.Action() that calls a controller and action to fill in the information on that part of the page. We're now thinking of how the CSS and resources that we are going to be getting for each widget separately in their own controller can be effectively used in this scenario. If we only use HTML.Action and letting a controller add our functionality to the page, we lose our connection to the page as a whole, and we could possibly load the resource package and CSS for the same type of objects over and over again. How would one solve this and make it possible for our web portal to have knowledge over which css and resource files have already been added to the solution?


title: Is Razor or XSLT better for my project?

text: I'm in the early stages in the design of a system that will essentially be split into two parts. One part is a service and the other is an interface with the service providing data through something like OData or XML. The application will be based on the MVC architectural pattern. For the views, we are considering using either XSLT or Razor under ASP.NET. XSLT or Razor would help to provide a separation of concerns where the original XML or response represents your model, the XSLT or 'Razor view' represents your view. I'll leave the controller out for this example. The initial design proposal recommends XSLT, however I suggested the use of Razor instead as a more friendly view engine. These are the reasons I suggested for Razor (C#):   * Easier to work with and build more complicated pages.   * Can easily produce non-*ML output, eg csv, txt, fdf   * Less verbose templates   * The view model is strongly typed, where XSLT would need to rely on convention, eg boolean or date values   * Markup is more approachable, eg nbsp, newline normalization, attibute value normalization, whitespace rules   * Built in HTML helper can generate JS validation code based on DTO attributes   * Built in HTML helper can generate links to actions And the arguments for XSLT over razor were:   * XSLT is a standard and will still exist many years into the future.    * It is hard to accidentally move logic into the view   * Easer for non programmers (which I don't agree with).   * It's been successful in some of our past projects.   * Data values are HTML-encoded by default   * Always well formed So I'm looking for aguments on either side, recommendations or any experience making a similar choice?


title: How do programmers with non-latin keyboards work?

text: I was reading a question on stackoverflow where the code was interspaced with Russian comments and I came to wonder; how do programmers who use non-latin keyboards work? Do they keeping switching keyboard layouts in the OS or use separate keyboards? And why do they really bother switching just to write one- liner comments?


title: How to interview for .NET/C# job a guy with experience on Progress?

text: It is clearer how to interview someone experienced in Java / C++ or other languages closer to C#. In these cases the language and specific technologies are less important; what matters are the OOP principles. But how to do it with someone that comes from Progress to .NET and also, me as an interviewer, not knowing Progress at all? How much does Progress experience count for .NET/C# or OOP? Are there programming principles in common between the two worlds? Are these realy two different worlds?


title: Large Multi-Touch Display Monitor?

text: I'm sure that most shops use a standard whiteboard or a more fancier "glass- board" to discuss ideas during a meeting. After the meeting, people will usually take photos of the artifacts using a point-and-shoot camera and then e-mail the digital photo to all the participants. I'm thinking of buying a really huge LCD screen support to facilitate discussion. This LCD Screen will be outfitted with a Multi-touch "filter" that will be connected to a PC via the USB port. The PC will be connected to the screen via the HDMI port. The PC will run on a standard Windows 7 installation. Instead of writing/drawing on a whiteboard using a marker, the participants will use their fingers to draw/write stuff on the screen surface. Whatever input the "filter" receives, it will be sent back to the PC. So the application that has the focus is the one responsible for making sense of the input. I'm thinking of using "PAINT" for now. After the discussion, the "canvas" will be saved as an image and forwarded to participants e-mail. ^That's the easy/boring part. Here's the cool part: We can write an application that will fully utilize the Multi-touch technology to facilitate discussion more effectively. I'm thinking of writing apps like those in the Microsoft Surface computing videos. We can also outfit the PC with a camera and use facial recognition technology to automatically figure out who the participants are so we can provide a single "Distribute a copy of this canvas to the participants" button. Question:   1. Has anyone used a gigantic multi-touch screen over a whiteboard to facilitate discussion?   2. If yes, how successful was it?   3. Are there already software available today that makes these things possible?   4. Do you know a vendor/provider that provides a complete solution for this kind of things? Thanks!


title: Is modifying an object's __dict__ to set its properties considered Pythonic?

text: I have a class that inflates objects from rows found in a database (or another source, e.g. MongoDB, a CSV file, etc.). To set the object's properties, it does something like `self.__dict__.update(**properties)` or `obj.__dict__.update(**properties)`. Is this considered Pythonic? Is this a good pattern that I should continue to use, or is this considered bad form?


title: Does Turing-complete implies possibility of malware?

text: Is it possible to build an operating system that contains some Turing complete compiler (language?) but is unable to run any malware? Or is there any definition for a malware? This question popped on my mind as I was wondering why Windows has more malware than Linux. If Linux contains a C programming language and its compiler, I think it is possible to write a Linux program that works similarly than Windows viruses. But there are less malware for Linux than for Windows although there is a Wine for Linux to simulate Windows programs.


title: Windows Forms Development - Books

text: So I'm reading a book for architecting applications for the enterprise from the Microsoft Press. It's a great book, and I'm learning a lot. However, it's very high level, and can be applied to a lot of different domains (not even just .NET, even though that's how the book is geared). The first project I want to develop after reading the book is a Windows Forms application in .NET 4.0. I want to use a lot of the books concepts to develop the app, but I really want a great Windows Forms dedicated book to read before starting that's really going to tell me all I need to know about developing Windows Forms apps. I found plenty of books for .NET 2.0 and stuff, but nothing for Windows Forms in the new .NET 4.0 Framework. Any suggestions?


title: Should I understand SVN before I jump to GIT?

text: I work in a department where no one has ever used source control before, including myself. I am trying to push the concept. I have spent a little while researching SVN. I some basics learned. I can Create/update/checkout/commit with command line and from Tortoise. I am starting to learn how to tag and branch but still confused a lot about conflicts between branches and trunk etc. I am still learning, but I do not have a physical person who can show me anything. Its all from books/tutorials and trial and error. From what I have read online it seems like `git` is the better thing to know, but its also more complicated. I don't want to overwhelm myself. Should I continue to master svn before moving to git or would I be wiser to just jump to git now? Are there pros and cons to both approaches?


title: Common name of the firmware that can test product board

text: This may be silly to ask. Consider the internal circuit board of any electronic device (cell phone, for example) driven by a micro-controller, also on the same board. I'm about to write a firmware that will have features to test various peripherals and other things on the board (IO pins, EEPROM, LCD etc). Is there any common name used for such firmware? For example, a bootloader is a kind of firmware that allow the code memory to be written during run time. EDIT: It will not be self test. External commands will be given to the micro and the micro will execute them. Each command will test a specific feature.


title: Choosing a particular stack because of the IDE, tools and ease setting up the dev env

text: I almost always choose the Microsoft stack over anything else because of Visual Studio, the available tools and how easily I can get started programming with a particular new framework. **Please, that was only an example; it may be other stacks for other people.** I am not building real time, mission critical apps where a nuclear power plant would explode if my app didn't perform well... More like small business apps. But when I tell this to other programmers, even before they react, I feel I might have embarrassed myself - choosing a stack because of the IDE?!.. ease of setup?! I feel the "pros" choose the stack by other "important" things I am not aware of and in the grand scheme of things, IDE and ease of setting up dev env don't matter much. I feel it is a little immature to do what I am doing. Is it really a bad thing? Note that I also choose the Microsoft stack because of a lot of other reasons (C# is an amazing language and .Net is an awesome platform).. but IDE, tools and dev env setup play a big part for me. Also note that I am a 1 man dev shop, very occasionally 2 or max 3.


title: What exactly undefined means in JavaScript? Why it's there? What usages it has? How it could be useful?

text: In JavaScript, we have something called **undefined**. I said something, because I really don't know if it's a base class, or a built-in variable, or a keyword, or anything else. I just know that it's there. To see it in action, you can simply write:               undefined;     typeof undefined;      Can anyone please explain to me why this **thing** has been inserted into JavaScript? We have `null` value in this language, thus it shouldn't be something like `null`. In other languages, when we don't know the value of a property or variable, we simply set it to null. Here we can do the same thing. How we can use this _thing_ in JavaScript?


title: Not using Weak entities could denormalize DB?

text: In the following scenery in a ER and relational Model:               Object 1-----N [Part] 1-----N [Subpart] 1-----N [Item]     (Where "1-----N" is a 1 to N relationship; and [Entity] is weak).      Solution 1:   '"Object"' is a strong entity; and 'Part', 'Subpart' and 'Item' are weak entities:               Object (*IDObject,...)     Part (*IDObject, *IDPart,...)     Subpart (*IDObject, *IDPart, *IDSubpart,...)      Item (*IDObject, *IDPart, *IDSubpart, *IDItem,...)     (Attributes marked with * make the composed key of the table)      In this particular case of "Items of Subparts of Parts of Objects", another way of designing and implementing the same problem could be: Solution 2: Object 1-----N Part 1-----N Subpart 1-----N Item (All entities are strong) Table implementation:               Object (*AutoincrementID,...)     Part (*AutoincrementID,...)     Subpart (*AutoincrementID,...)     Item (*AutoincrementID,...)     (Each table having it's own ID: an unique autoincrement field)      My questions are:   I would like an academic response; I mean the theory about this practices.   1. Which is the correct way of designing and implementing this scenario?   2. Is the "Solution 2" a denormalized model/implementation? In which way?


title: Common Methodologies for Writing "Post-Mortem" Reviews

text: We recently added a relatively large feature to our product that involved the entire R&D department (with all the different teams within it). This feature included UI development, server side development, and huge migrations of SQL schemes (and other stuff that I myself was not involved in at all). The development process for this feature was chaotic - Front-End and Server teams were not synchronized, SQL migrations broke the DB, and product specifications were incomplete which meant that with every step of the way we found new issues with the initial definition, requiring changes to core concepts that the developers had relied upon. All in all, a feature that was planned to be released within 10-14 days, took roughly 24 (intensive) days of development. I was requested to write a report of 'What went wrong' (from my team's side - each team writes such a report from their pov). What are the common methodologies for writing such reports, specifically in the field of software development?   Also - Is there some formal name for such reports? EDIT & ANSWER:   Apparently, such a report/review-process is commonly referred to as 'Project Post-Mortem' (other names exist as well).   After figuring this out, I found these two resources that outline suggested methodologies for gathering the necessary data, organizing it, analyzing it, and formulating solutions for discovered issues (as well as some general information on these reviews and their purposes): 'A Defined Process For Project Post Mortem' -   http://www.csee.umbc.edu/courses/undergraduate/345/spring12/mitchell/readings/aDefinedProcessForProjectPostMortemReview.pdf 'Post-Mortem Reviews: Purpose and Approaches in Software Engineering' - http://www.uio.no/studier/emner/matnat/ifi/INF5180/v10/undervisningsmateriale/reading- materials/p08/post-mortems.pdf


title: Are static classes with static methods considered SOLID?

text: SOLID includes the Liskov substitution princicple which has the notion that “objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program”. Since static classes with static methods (a bit like the `Math` class) does not have instances at all, is my system considered SOLID if I have static classes with static methods?


title: Where would my different development rhythm be suitable for the work?

text: Over the years I have worked on many projects, with some successful and a great benefit to the company, and some total failures with me getting fired or otherwise leaving. What is the difference? Naturally I prefer the former and wish to avoid the latter, so I'm pondering this issue. The key seems to be that my personal approach differs from the norm. I write code first, letting it be all spaghetti and chaos, using whatever tools "fit my hand" that I'm fluent in. I try to organize it, then give up and start over with a better design. I go through cycles, from thinking-design to coding- testing. This may seem to be the same as any other development process, Agile or whatever, cycling between design and coding, but there does seem to be a subtle difference: The methods (ideally) followed by most teams goes design, code; design, code; ... while I'm going code, design; code, design; (if that makes any sense.) Music analogy: some types of music have a strong downbeat while others have prominent syncopation. In practice, I just can't think in terms of UML, specifications and so on, but grok things only by attempting to code and debug and refactor ad-hoc. I need the grounding provided by coding in order to think constructively, then to offer any opinions, advice or solutions to the team and get real work done. In positions where I can initially hack up cowboy code without constraints of tool or language choices, I easily gain a "feel" for the data, requirements etc and eventually do good work. In formalized positions where paperwork and pure "design" comes first and only later any coding (even for small proof-of- concept projects), I am lost at sea and drown. Therefore, I'd like to know how to either 1) change my rhythm to match the more formalized methodology-oriented team ways of doing things, or 2) find positions at organizations where my sense of development rhythm is perfect for the work. It's probably unrealistic for a person to change their fundamental approach to things. So option 2) is preferred. So where I can I find such positions? How common is my approach and where is it seen as viable but different, and not dismissed as undisciplined or cowboy coder ways?


title: How to maintain same code fragments on multiple projects

text: I am an indie developer working on multiple Android projects. I am having problem with maintaining same functionality on different projects. For example, three of my apps use the same 2 classes; since they are different projects, when I need to make a change in those classes, I need to make it three times. Is there a simple solution to this kind of common problem?


title: How would I handle a set of differing event classes with differing handler interfaces in a single event processor?

text: I'm working on an event processor framework for a simple game I'm writing, in which multiple types of events are handled in a loop. Since these events carry distinct pieces of data (i.e. one carries a player and position, another carries a message and timestamp), I ended up creating different classes for them (though they still all implement a common interface, which is _currently_ a marker interface). Within my event processor, I have, for each type of event, a set of event handlers implementing a corresponding interface (e.g. anonymous class implementing `PlayerInteractHandler` that handles `PlayerInteractEvent`s). Since these interfaces are being implemented through a Javascript engine (Rhino) I am unable to use a single generic interface. In trying to implement the actual engine, I have currently code as follows (methods inlined to show idea behind code in a more compact representations):               if (recvdEvent instanceof FooEvent){         // getHandlerList() returns a List<EventHandler> due to limitations of generics         for(EventHandler eh : getHandlerList(FooHandler.class) {             FooEvent eventAfterCast = (FooEvent) recvdEvent         }     }      Obviously there are a bunch more `else if (recvdEvent instanceof BarEvent)` blocks, and I catch and handle ClassCastExceptions. The problem with this, is that it seems like a mis-use of an object-oriented language, and I have to stringently verify other code by hand to retain type safety. The other alternatives I know of are for my event to return the `Class<? extends EventHandler>` in a certain method, to use polymorphism / dynamic dispatch, but that would require a _reflective_ cast, or a polymorphic method in the handler class that would still break complete type safety (and another layer on top of the interface itself). Multiple event processors would lead to code duplication, and would imply having separate threads for each as the current event processor is designed. If I were to retain a single thread and processor I would need a single queue, whose declared type is `AbstractQueue<GameEvent>`, and I'd be back at square one. Am I approaching this in a completely incorrect manner?


title: How to convince a non-technical client that their application spec needs to be simplified?

text: Often times I am faced with the situation where a new client comes to me with an application that has literally 100s of unnecessary features and it is quite clear that things need to be drastically simplified for the project to have any chance of succeeding. How do you convince the client to take a more Minimum Viable Product (MVP) approach and simplify? edit: So the current top answer is to provide the client with a time/cost estimate for the huge application. I'm not too fond of this answer because it doesn't address the real problem with this situation. And that is - it's a bad practice to spec out a massive application and then try and build it from the get go. I feel much more comfortable initially building a small, simple MVP foundation. And then adding small features to that foundation one by one. So how do I convince the client to approach building software in this way?


title: Best Practice to Avoid "Playing Telephone" with Constructor Arguments

text: I find that the encapsulation required by OO has me frequently passing paramenters down the line from parent to child to great grandchild to second grand nephew once removed (not actually that bad). But inevitably in the process, and especially if graphics are involved there will be garbling the by the third iteration of `someConstructor(int minX, int minY, int maxX, int maxY)`. I found at least one question here suggesting that parameter objects are the solution. These seem to me more like a kludge designed to satisfy a low parameter count fetish than genuinely useful. Besides, in these scenarios, I am generally cutting the numbers into smaller pieces (of screen) with each step. It occurs to me if these constructor calls are laid out line by line higher up the chain, I'd have easy comparisons. But this seems to lose all semblance of OOPiness. In my most recent adventure with find-the-transposed-measurements, I was drawing a music keyboard. I don't want the main view to know or care what or exactly where the G# key is. So, best practices? Please don't say, go slower, be less sloppy.


title: Ethics of soliciting App store app reviews?

text: I see more than a few developers soliciting 5-star ratings and good reviews for their App store apps, in their blogs, websites, app store descriptions, even dialogs that pop-up in the app after you've used them for awhile. What do people consider to be the ethical guidelines regarding such review and ratings solicitations? What's over the line? (Besides obviously evil stuff, such as paying to have someone forge multiple negative reviews about your competitor's apps, etc.)


title: 2 different tasks in template method

text: I've read about Template Method Pattern but I'm not sure about one thing. The steps (methods) of an algorithm are supposed to be in the template method. In the case my template method's algorithm is about 2 completely different tasks that I would like all my objects to perform, let's say the one is drawing and the other calculating, can I still put all these methods in one method and call this my template method?


title: Is Oracle WebCenter 11g equivalent to a larger version of SharePoint?

text: I have some experience with SharePoint. My company has decided to use Oracle WebCenter to create a internal portal. None of the IT staff have any experience with Oracle WebCenter, and I think we could use SharePoint for this job, as we have been using it until now. So, what are the advantages to using Oracle WebCenter? Which are your experiences with Oracle WebCenter 11g? And how different is it from SharePoint? What can I do with Oracle WebCenter that I cannot do with Microsoft SharePoint?


title: Should one use a separate database for application data and user data?

text: I’ve been working on a project for a little while and I’m unsure which is the better architecture. I’m interested in the consensus. The answer to me seems fairly obvious but something about it is digging at me and I can't pick out what. **The TL;DR is:** how do you handle a program with application data and user data in the same DB which needs to be able to receive updates to the application data periodically? One database for user data and one for application, or both in one? **The detailed version is..** if an application has a database which needs to maintain application data AND user data, and the user data all references application data, it feels more natural to me to store them in the same database. But if there exists a need to be able to update the application data within this database periodically, should this be stripped into two databases so that one can simply download the updated application data database file as an update and replace the old one? Or should they remain as one database, and the application data be updated via a script which inserts the new data into the existing database? The second sounds clearly preferable to me... but for some reason just doesn’t feel right, and I can't pick out quite why.


title: How can I work efficiently on a desktop sharing workflow?

text: I am a freelance Magento developer, based in Spain. One of my clients is a Germany based web development company and they're asking me something I think it's impossible. OK, maybe not impossible but definitely not a preferred way of doing things. One of their clients has a Magento Entreprise installation, which is the paid (and I think proprietary) version of Magento. Their client has **forbidden them to download the files** from his server. My client is asking me now to study one particular module of the application in order to interact with it from a custom module I'll have to develop. As they have a **read-only ssh access** to their client's server, they came up with this _solution_ : Set up a **desktop/screen sharing session** between one of their developer's station and mine, alongsides with a skype conversation. Their idea is that I'll say to the developer: > show me file foo.php The developer will then open this foo.php file in his IDE. I'll have then to ask him to show me the bar method, the parent class, etc... Remember that it's a read-only session, so forget about putting a `Zend_Debug::log()` anywhere, and don't even think about a xDebug breakpoint (they don't use any kind of debugger, sic). Their client has also **forbidden them to use any version control system**... My first reaction when they explained to me this was (and I actually did say it outloud to them): > Well, find another client. but they took it as a joke from me. I understand that in a business point of view rejecting a client is not a good practice, but I think that the condition of this assignment make it impossible to complete. At least according to my workflow. I mean, the way I work or learn a new framework/program is:   1. download all files and copy of db on my pc   2. create a git repository and a branch   3. run the application locally      * use breakpoints     * use Zend_Debug::log()   4. write the code and tests   5. commit to git repo   6. upload to (test/staging first if there is one, production if not) server I have agreed to try the desktop sharing session, although I think it will be a waste of time. On one hand I don't mind, they pay me for that time, but I know me and I don't like the sensation of loosing my time. On the other hand, I have other clients for whom I can work according to my workflow. I am about to say to them that I cannot (don't want to) do it. Well, I'll first try this desktop sharing session: maybe I'm wrong and it can actually work. But I like to consider myself as a professional, and I know that I don't know everything. So I try to keep an open mind and I am always willing to learn new stuff. So my questions are:   1. Can this desktop-sharing workflow work? What should be done in order to take the most of it?   2. Taking into account all the obstacles (geographic locations, no local, no git), is there another way for me to work on that project?


title: is using a PUT with side affects acceptable (REST)

text: I want to create an undo history whenever the user updates a form. Because it's an update, I want to use a PUT request. However, I read that PUT needs to have no side effects. Is it acceptable to use PUT here? Are there better alternatives? `PUT /person/F02E395A235`               {        time: 1234567,        fields: {           name: 'John',           age: '41'        }     }      In the server               doGet('person/:personId',        // create a new person snapshot     )      Edit: The history will be visible to the user, calling multiple times would result in multiple versions. The solution was to check if the version was unique before creating it.


title: Should a string constant be defined if it's only going to be used once?

text: We're implementing an adapter for Jaxen (an XPath library for Java) that allows us to use XPath to access the data model of our application. This is done by implementing classes which map strings (passed to us from Jaxen) into elements of our data model. We estimate we'll need around 100 classes with over 1000 string comparisons in total. I think that the best way to do this is simple if/else statements with the strings written directly into the code — rather than defining each strings as a constant. For example:               public Object getNode(String name) {         if ("name".equals(name)) {             return contact.getFullName();         } else if ("title".equals(name)) {             return contact.getTitle();         } else if ("first_name".equals(name)) {             return contact.getFirstName();         } else if ("last_name".equals(name)) {             return contact.getLastName();         ...      However I was always taught that we should not embed string values directly into code, but create string constants instead. That would look something like this:               private static final String NAME = "name";     private static final String TITLE = "title";     private static final String FIRST_NAME = "first_name";     private static final String LAST_NAME = "last_name";          public Object getNode(String name) {         if (NAME.equals(name)) {             return contact.getFullName();         } else if (TITLE.equals(name)) {             return contact.getTitle();         } else if (FIRST_NAME.equals(name)) {             return contact.getFirstName();         } else if (LAST_NAME.equals(name)) {             return contact.getLastName();         ...      In this case I think it's a bad idea. The constant will only ever be used once, in the `getNode()` method. Using the strings directly is just as easy to read and understand as using constants, and saves us writing at least a thousand lines of code. So is there any reason to define string constants for a single use? Or is it acceptable to use strings directly? * * * PS. Before anyone suggests using enums instead, we prototyped that but the enum conversion is 15 times slower than simple string comparison so it's not being considered. * * * **Conclusion:** The answers below expanded the scope of this question beyond just string constants, so I have two conclusions:   * It's probably OK to use the strings directly rather than string constants in this scenario, **but**   * There are ways to avoid using strings at all, which might be better.  So I'm going to try the wrapper technique which avoids strings completely. Unfortunately we can't use the string switch statement because we're not on Java 7 yet. Ultimately, though, I think the best answer for us is to try each technique and evaluate its performance. The reality is that if one technique is clearly faster then we'll probably choose it regardless of its beauty or adherence to convention.


title: System Analyst vs Computer Programmer?

text: My question here is relative to jobs. I currently hold a System Analyst position. What is the difference between System Analyst and Programmer/Analyst? Is this position higher than a programmer? Or how should I upgrade myself ?


title: Why is it preferred to write a commit message in present tense/imperative mood?

text: I often read/overhear that good commit messages should be written in present tense or to use imperative mood when describing the change eg. `Fix xyz` instead of `Fixed xyz`. What are the advantages of doing so? Are there differences between the various VCS (I mostly read these about git but that maybe because I mainly work with git)?


title: Controlling version numbers in sprints

text: Traditionally software build numbers fit into the format   * Major   * Minor   * Release   * Build Where a Major version is implemented whenever there are breaking changes, Minor when new mini features are added, Release when something is published and Build each time it's built. I find the last two digits work really well in a CI environment, each CI build increases the Build number and each release to live increments the Release number. However major waterfall work and breaking change developments are discouraged in more modern methodologies. We prefer to release little and often and so don't tend to make great breaking changes. Given this it's very difficult to determine when to create a new Major version. We try to avoid making major breaking changes and so are getting very high minor/release numbers but haven't had the excuse to move up a major version yet. What criteria should be used to determine when Major and Minor builds should be made (particularly web based applications)? I'm aware there are date style versioning but I'm interested in the Major.Minor.Build.Release only.


title: Code Analysis & Reporting: Maven vs. Jenkins

text: My team (~10 devs) has recently migrated to Maven (multi-module project, ca. 50 modules) and we now use Jenkins for continuous integration. As the overall setup is running, we are planning to include code analysis and reporting tools (e.g., Checkstyle and Corbertura). As far as I can see, we basically have two options to generate such reports: either use Maven's reporting plug-ins to generate a site **and/or** use Jenkins plug-ins to do the reporting. **Which approach is better, and for which reasons?** It seems both have their merits: Maven-Reporting: * everything is configured in a single place (the pom files)  * report generation on a local machine (i.e., without Jenkins) is straightforward and does not require any additional steps Jenkins-Reporting: * adjusting the reporting configuration seems more intuitive than with Maven and does not interfere with the main task of maven in our setup (building and deploying)  * a single web-interface to check the overall status of the project, so that the reported issues are easier to find and harder to ignore (i.e., no need to click through the maven site, some nice history plots, notifications, etc.) Has anyone made a similar decision in the past, or is this a non-issue for some reason? (How well does it work? Any regrets?) Is it advisable to go **both ways** , or is that setup too tedious to maintain? Are there aspects of the problem that I am unaware of, or some advantages I have not noticed (e.g., is Maven-based reporting integrated nicely with m2eclipse)? Any pitfalls or typical problems that we are likely to encounter? **EDIT:** We tried out **Sonar** , as suggested below (including its Jenkins plug-in). So far, it works pretty well. Sonar is relatively simple to install and works on top of our Maven setup (one just invokes `mvn sonar:sonar` or re-configures a Jenkins job, that's all). This means we do not have to maintain a duplicate configuration, as all our Maven settings are used automatically (the only exception being exclude patterns). The web-interface is nice, and -- even better -- there is an **Eclipse plug-in** that retrieves all issues automatically, so that no one really _has to_ browse to the Sonar website, as **all issues can be automatically displayed in the IDE**.


title: Can I use the patented Octree algorithm in a public programming challenge?

text: Similar to this question, but for a very different situation. I've been working-up some example code to accompany a proposed programming challenge and asking questions about the difficult bits. In my latest question, the answer I've received suggests that I use an Octree instead of a BSP-Tree. But Wikipedia says it's patented. And a public programming challenge -- much more than a private program or even free (beer) software -- really is encouraging people to reuse the idea without regard to ownership. So I can't ( _legally_ or _in good conscience_ ) use it here, can I?


title: What guidelines do you suggest for using Objective-C Properties?

text: Objective-C 2.0 introduced properties. While I personally think properties are nice addition to the language, I have seen a trend of making every instance variable as a property. Apple sample codes are no exceptions to this. I believe this is against the spirit of OOP, and since it exposes a lot more implementation details of a class to the client than they need to know. What guidelines do you suggest for the proper usage properties in Objective C?


title: Shouldn't recruitment be the other way round?

text: I really don't know why nobody's thought of this so far, but recruitment should be the other way round. Engineers should have some sort of a common platform where they register skills or domains they are interested in, demonstrate their capabilities and companies should take it up from there. I think this is way more effective since if you are paid well to do work that you love doing, you will generally make a fine job out of it. Does anybody know of some recruitment platform like this?


title: What are the best ways to get beta testers?

text: I have several projects coming up soon for public release, both commercial and open source. The projects are all downloadable, not web apps. I've worked on them alone and would like to get feedback during a beta period, but I don't currently have a large audience (though the markets are large). What are the best ways to get participation in the betas? Are there any existing sites or communities that specialize in software testing that I can reach out to? At this point, I'm specifically looking for technical testers who aren't intimidated diving into the code and can help spot security bugs, logical errors, etc. **Edit** : I'm looking for websites or communities similar to Invite Share. Invite Share itself would be perfect, but there doesn't seem to be any public information about how to submit a beta. **Bounty Explanation** : While Joel's article on running a beta is helpful, I wonder if there isn't an existing community available for beta testing of any sort, technical or user. As a self-taught and sole developer, I don't have a lot of technical contacts that would be appropriate approaching for testing. I did propose a Beta Testing site in Area 51 a few months ago, but it seems as if it either got buried, there wasn't a whole lot of interest, or it's a poor fit for StackExchange. If you know of existing testing communities, sites like InviteShare, or other ways to get testers, please share.


title: Which asp.net technology fits this situation best?

text: I think I can count WebAPI out, but WebForms, WebPages, and MVC are all possibilities. I want to create an asp.net web site that is primarily static content and links to other sites. The only "fancy" bit will be a Bing map with pushpins that I add - but even these are static. And there will be a photo gallery. Oh, and ads, too. And, finally, it needs to work well on phones and tablets as well as desktop browsers. Which asp.net technology "flavor" is most suited for this type of web site? ## UPDATE In VS 2012, Web Pages projects are not available beneath Templates | Visual C# | Web. What _is_ there:               ASP.NET Empy Web Application     ASP.NET Web Forms Application     ASP.NET MVC 3 Web Application     ASP.NET MVC 4 WebApplication     ASP.NET Dyanmic Data Entities Web Application      Does this mean that Web Pages are passe, or that Web Pages and Web Forms are the same thing?


title: Understanding the Microsoft Public License (MS-PL)

text: I'm looking at using a few open source products in a commercial software application I'm working on. One of them is licensed under MIT, which I understand as allowing commercial software linking. However, the other open source product is licensed under MS-PL but I don't understand if that license is fully compatible with commercial software. So the question is, can I use MS-PL licensed OSS in a commercial/proprietary/for-sale application? Thanks.


title: What does Dijkstra mean when he recommends an exceptionally good mastery of one's native tongue?

text: Dijkstra writes here: > Besides a mathematical inclination, an exceptionally good mastery of one's > native tongue is the most vital asset of a competent programmer. I do not understand the latter part of this quote. Can you please explain or elaborate? P.S. I have grown up in India. I speak Bengali at home; I speak Marathi in the community that I live in; Hindi is the national language and very widely spoken, so I know that, and in school and college I was taught with English as the first language. Of course, now I think in a multitude of languages and I must admit I don't have _mastery over any_. Is this really affecting my programming aptitude? If yes how ? and are there any _solutions_?


title: Flash development under Ubuntu

text: It's unfortunate, but I'm taking this course that would require me to work in Flash CS3 (specifically programming), which would make me use windows. I'm very used to development under Ubuntu, and booting into windows would require me to switch a hard drive. I was wondering if:   * I could use the Flex 4.5 SDK to develop (something like a console application), then later hook it in Windows with the GUI I'm required to design? (In other words, is Flex 4.5 SDK compatible with CS3)?   * Is there a good lightweight editor that I can edit actionscript 3 in?


title: What is the best practice to deliver a task to a developer?

text: As a very new software PM/Team Leader, I just want to know what is the best practice of a way to deliver a full required information about a task to the developers in my team. In this time, I just provide them with:   * GUI Interface (if it used)   * DB Schema (if it is used)   * Blueprint of main classes. I think that's not enough. We usually have long discussions about the details; I just want to decrease the area of the discussion. What should I do? Do you think we should at least have a code review process?


title: Does the Decorator Pattern exist in the Java IO classes?

text: For an assignment, I have to find out which of the Gang of Four design pattern the classes `java.io.Reader` and its subclasses `java.io.PushbackReader`, `java.io.BufferedReader` and `java.io.FilterReader` were built with. According to this post, the design pattern would be the Decorator Pattern. This only makes sense to me if `PushbackReader`, `BufferedReader` and `FilterReader` can be decorated to be used at the same time, creating effectively a `BufferedPushbackFilterReader`. Is that the idea?


title: Determining the cost of impediments (waste)

text: For some time now our Scrum teams have experienced recurring impediments caused by external factors to the team. The teams have discussed the impediments in their retrospectives and also brought it up on "Scrum of Scrums". It seems that the impediments may require involvement by management as it requires some rather significant changes in that way we do things and the way our technical environments have been configured. In a small setting these kind of issues would probably have been easy to deal with because the team would have more control, but in this setting there are multiple teams, stakeholders and parties. I’d like to hear your experience in making waste and costs visible. Do you simply estimate the hours wasted on the recurring impediments (such as, “we waste 10 hours every sprint waiting on the build server) or do you have a more systematic way of gathering and showing the waste? I would like to collect waste based on Six Sigma (and Lean Software Development) and estimate the waste cost in terms of story points. E.g. at every retrospective highlight the waste in seven categories with the number of story points wasted in each category. The seven categories would be: Partially Done work, Extra Features, Relearning, Handoffs, Task Switching, Delays, and Defects. In the end of the Retrospective, there would then be a clear indication of the cost of external impediments that management would easily be able to act on. What do you think?


title: Cross Compile Arm Program to Intel

text: I have searched around for a way to run a program meant for ARM processors on an Intel computer, but I can only find ways to do the reverse, to compile Intel programs for ARM. Are there any open-source cross-compilers that will allow me to do so? Thanks for your help.


title: Independency and estimation of user stories that rely on shared predecessor

text: Lest's say I have user stories about using product catalog in shop:   * As an administrator I can add/modify/delete catalog items (one or more user story, doesn't matter here)   * As a customer I can search product catalog   * As a customer I can view product details Each of this stories rely on predecessor: design and create database to store product information. I can express db creation as:   1. another story: As a shop owner I want to store information about products I sell    2. Task to be done in story which will be firstly chosen to do In first case I create story dependency, in second I wondering where estimate this additional task. Let's say it adds additional two story points. To which story should add this points? All (and re-estimate remaining stories in the future), none? I think that second option also can hinder estimation - I have to remember to add this story points to dependent stories and then possibly remove it. How to deal with such situations?


title: Which could be a good design pattern for complex numeric calculations between three or more different data models?

text: The source code I'm working on at the moment performs numeric calculations between a bunch of different properties belonging to different data models. All the calculations are coded in a big method with a lot of If statements than make it very complex, difficult to change and it contains some bugs. I have not found a design pattern that fits into this problem that I think is very common in any financial application. Any help with this? The source code is c# with .NET fw 4.


title: Ported Functions Licensing

text: I have found several functions in python 2.7.2 to be very useful and I recreated them in C++ for my own uses. How do I properly give python credit for them? Do I even have to? I never actually looked at their source codes. I just wrote functions that output the same values as the python versions of the function.


title: if/else statements or exceptions

text: > **Possible Duplicate:**   >  Defensive Programming vs Exception Handling? I don't know, that this question fit better on this site, or Stack Overflow, but because my question is connected rather to practices, that some specified problem. So, consider an object that does something. And this something can (but should not!) can go wrong. So, this situation can be resolved in two way: first, with exceptions:               DoSomethingClass exampleObject = new DoSomethingClass();     try     {          exampleObject.DoSomething();     }     catch (ThisCanGoWrongException ex)     {          [...]     }      And second, with if statement:               DoSomethingClass exampleObject = new DoSomethingClass();     if(!exampleObject.DoSomething())     {          [...]     }      Second case in more sophisticated way:               DoSomethingClass exampleObject = new DoSomethingClass();     ErrorHandler error = exampleObject.DoSomething();     if (error.HasError)     {          if(error.ErrorType == ErrorType.DivideByPotato)          {              [...]          }     }      which way is better? On one hand, I heard that exceptions should be used only for real unexpected situations, and if programmer knows that something may happen, they should use if/else. On the other hand, Robert C. Martin in his book Clean Code wrote that exceptions are far more object oriented, and more simple to keep clean.


title: Why are exceptions considered better than explicit error testing?

text: > **Possible Duplicate:**   >  Defensive Programming vs Exception Handling?   >  if/else statements or exceptions I often come across heated blog posts where the author uses the argument: "exceptions vs explicit error checking" to advocate his/her preferred language over some other language. The general consensus seems to be that languages that make use of exceptions are inherently better / cleaner than languages which rely heavily on error checking through explicit function calls. Is the use of exceptions considered better programming practice than explicit error checking, and if so, why?


title: Do We Have a Responsiblity to Improve Old Code?

text: I was looking over some old code that I wrote. It works, but it's not great code. I know more now than I did at the time, so I could improve it. It's not a current project, but it's current, working, production code. Do we have a responsibility to go back and improve code that we've written in the past, or is the correct attitude "if it ain't broke, don't fix it"? My company sponsored a code review class a few years ago and one of the major takeaways was that sometimes it's just good enough; move on. So, at some point should you just call it good enough and move on, or should you try to push projects to improve old code when you think it could be better?


title: Caching Business Objects in MVC application

text: I figured this was more of an architectural question, so I chose to post it here rather than Stack Overflow. So I'm building an MVC web application and have just finished writing the code that wraps my calls into the DB (DAL) and gives me access via an interface to Create, Update, and Delete my Business Objects. Quick example just so you can get familiar before I go into my real question - here's how I would load up a stored record in the database for someone on the front end:               BusinessObjects.Record record = DAL.LoadRecord(int recordId);      Now once the `record` is loaded up, I can provide it to the front end (web) via a `Model` to one of my pages, or by attaching it to the `ViewBag` or something similar. How it gets there isn't important or what I'm worried about, it's more so how I can maintain state in a stateless (web) environment. The problem I am dealing with right now is, say I provide this `record` to the front end, and my page reads from it and generates a UI around it. At this point, the `record` is more or less gone. It has been created, passed, and read, but because of the stateless environment, is now lost. I can re-create this record based on the data I have on the front end on its way back, but is something like this usually handled by adding this `record` to the cache, and then just working with it there until it's fully ready to be persisted once again (something like `Saver.SaveRecord(record);`)? This would make things a lot quicker for the user, because they wouldn't have to be calling `Save` and `Load` every single time a page switched or something happened, but I didn't know if this was the correct architecture or if there's a common pattern that I have ignorantly ignored. I've tried to load up some links and have just found examples of _how_ to set something like this up, but what I really want to know is, _should_ I be setting something like this up, or is there a better way to do it. You'll have to excuse the beginner question. It's pretty obvious this problem has been solved many times, I'm just unaware of some of the more common patterns for doing so, and therefore wasn't sure exactly what to search for.


title: What optimizations can be done for soft real-time code in C#?

text: I'm writing a soft real-time application in C#. Certain tasks, like responding to hardware requests coming in from a network, needs to be finished within a certain amount of milliseconds; however it is not 100% mission-critical to do so (i.e. we can tolerate it being on time most of the time, and the 1% is undesirable but not a failure), hence the "soft" part. Now I realize that C# is a managed language, and managed languages aren't particularly suited for real-time applications. However, the speed in which we can get things done in C#, as well as the language features, like reflection and memory management, make the task of building this application much easier. Are there any optimizations or design strategies one can take to reduce the amount of overhead and increase determinism? Ideally I would have the following goals   * Delay the garbage collection until it is "safe"    * Allow the garbage collector to work without interfering with real-time processes   * Thread/process priorities for different tasks Are there any ways to do these in C#, and are there any other things to look out for with regards to real-time when using C#? The platform target for the application is .NET 4.0 Client Profile on Windows 7 64-bit, with. I've set it currently to Client profile but this was just the default option and wasn't chosen for any particular reason.


title: Is there a tool or process to help FOSS authors agree on a license?

text: The Evercookie project has several contributors and there is no explicit license for the code. There is currently discussion on the dev mailing list trying to figure out what the licensing options are.   * Is there any tool or process that can be used to find consensus among the various licenses?   * What can be done if some contributors are non-responsive, can't be found, etc?


title: Where should Acceptance tests be written against?

text: I'm starting to get into writing automated Acceptance tests and I'm quite confused where to write these tests against, specifically what layer in the app. Most examples I've seen are Acceptance tests written against the **Domain** but how about tests like: > Given Incorrect Data When the user submits the form Then Play an Error Beep These seem to be fit for the **UI** and not for the **Domain** , or probably even the **Service layer**.


title: Demonstration of garbage collection being faster than manual memory management

text: I've read in many places (heck, I've even written so myself) that garbage collection _could_ (theoretically) be faster than manual memory management. However, showing is a lot harder to come by than telling.   I have never actually **_seen_** any piece of code that demonstrates this effect in action. Does anyone have (or know where I can find) code that demonstrates this performance advantage?


title: log4cxx: is it a stable option to include as part of distributed library?

text: We are porting our Java API library to C++. (Our target platforms are Linux and Windows.) Since we have minimal C++ experience, the learning curve has been pretty steep, but overall we have been able to make a clean port so far. In Java we use log4j, and are looking at to use log4cxx in the C++ version. It took us a few hours to get log4cxx to build on Windows (due both to our inexperience, and also build documentation seems out of date). We haven't yet tried to build on Linux. To my uninformed eye, log4cxx seems messy and somewhat outdated. Is there any consensus on whether this is a good logging framework to go forward with? (Log4j also seems to have been superceded by SLF4J and Logback.) I looked also at boost logging, but that does not appear to be part of the main distribution, so I wasn't sure if I was provided a more standard option with that or not. One other piece of information to add into the evaluation - the first client we are providing this to is already using log4cxx.


title: Gradual approaches to dependency injection

text: I'm working on making my classes unit-testable, using dependency injection. But some of these classes have a lot of clients, and I'm not ready to refactor all of them to start passing in the dependencies yet. So I'm trying to do it gradually; keeping the default dependencies for now, but allowing them to be overridden for testing. One approach I'm conisdering is just moving all the "new" calls into their own methods, e.g.:               public MyObject createMyObject(args) {       return new MyObject(args);     }      Then in my unit tests, I can just subclass this class, and override the create functions, so they create fake objects instead. Is this a good approach? Are there any disadvantages? More generally, is it okay to have hard-coded dependencies, as long as you can replace them for testing? I know the preferred approach is to explicitly require them in the constructor, and I'd like to get there eventually. But I'm wondering if this is a good first step. **EDIT:** One disadvantage that just occurred to me: if you have real subclasses that you need to test, you can't reuse the test subclass you wrote for the parent class. You'll have to create a test subclass for each real subclass, and it will have to override same the create functions.


title: What's a good strategy for managing static data in an SOA?

text: I'm working on a web application that sits on top of a number of RESTful web services, interacting primarily with those services through JSON formatted messages over HTTP. Our application has a great deal of static data that are read from these services (internationalization lookups, configuration, etc.) during operation. Unfortunately, we work pretty closely with the team who develops the webservces, so we know the backend architecture fairly intimately. Most of the services are using a MongoDB store for persistence, and our strategy thus far for managing the static data we require to be loaded is to utilize MongoDB dumps committed to version control that are loaded at deploy/upgrade time. We'd like to decouple our static data from the persistence store. The best ideas that have come forth thus far mostly involve storing static data formatted as it would be passed to services (JSON files) and then writing a "loader" process/script that will live as part of the deployment process which will interact with services to load the data. Are there patterns/strategies for managing/loading/deploying "application" data to services?


title: Generic Content Player?

text: The general idea on the web appears to be that video/audio are to be separated with plain text. By separated, I mean you have a place that plays video/audio and a place that you read text. This is because it is widely understood that they are vastly different. However, audio and video are just another way of communication, just like text. So why do we separate the two even if they are nearly the same thing? Correct me if I'm wrong but, most tutorials are either plain text how-to's (wiki-style) or visual/auditory instructional videos (YouTube). Why aren't the two combined? Or, if it's already been done can someone reply with the link? This might be bordering off-topic and if it is off-topic then please point me to the right place so it won't be. This might also appear to be an obvious question, however I'm not sure if this subject has really been deeply thought-out by more than a few individuals.


title: Better way of storing key-value pairs in the database?

text: I have a C#/SQL Server program that sometimes needs to store data. The data could be a response from a web service, a result of a database query, or any number of other things. There's no way of knowing before the data is stored how many fields it might have or what the data structure might be. We have this kind of painful table we're using for this... four columns and lots of rows. An example of the data might be easier than an explanation.               InstanceID RowID PropertyName PropertyValue     1          1     Property1    Value1     1          1     Property2    Value2     1          1     Property3    Value3     1          2     Property1    Value1     1          2     Property2    Value2     1          2     Property3    Value3     2          1     OtherProp1   Value1     2          1     OtherProp2   Value2     2          2     OtherProp1   Value1     2          2     OtherProp2   Value2      These values will then be pulled back and fed into a dictionary object, which can be updated, then the fields will be fed back into the database. This can be painful to code against, and also requires a lot of inserts which can make it very slow. I can't think of a better way of doing this, but I feel like there must be one. Any advice?


title: Help needed on a UI/Developer Interview

text: I have a phone interview with a major Internet company and it is a mostly front-end developer position. If anyone has experience with UI/developer interviews and can give some advice/questions asked etc. that'll be great. Additionally, what resources can be read and reviewed for the following:   * Designing for performance, scalability and availability   * Internet and OS security fundamentals **EDIT:** Now I am told that the interview I am told will be mostly on coding, Data Structures, design questions etc. Anyone?


title: What parts of functionality should be refactored into a directive?

text: I am creating an application from legacy code using AngularJS. I wonder what parts of my code should be moved into a directive. For example, iI had thought of moving a table which is used multiple times across the application into a directive. The tables alter from headings and size. Is it worth the effort or even a good practice to turn such things into their own directives or should I create each table in a unique way?


title: MVVM Clarification

text: We are about to write our first WPF application and are becoming familiar with the MVVM pattern. We've built many Winform applications and have an architecture that has been very successful for us. We're having a little bit of trouble translating that architecture or determining where certain pieces of our architecture fit in the MVVM model. Historically we have a Gui (the main exe) that then communicates to a BusinessLogic dll. The BusinessLogic communicates to a DAL dll through a web service and the DAL interacts with the DB. The DAL, BusinessLogic and GUI all reference the same BusinessObjects dll. ![AsIs Architecture](http://i.stack.imgur.com/uWIvW.png) Some of the transition to MVVM is fairly straight forward. Our Gui will still contain the views, our BusinessOjbects will still contain the model and our DAL will still interact with the DB (although the technology to implement them may change). What we're not sure of is our BusinessLogic component. Historically this would provide functions for the GUI to call to then populate controls in the views (ie. GetCustomerList which would return a list of Customer objects or the typical CRUD functions). The main hang up we have is whether the MVVM pattern would call for an additional component to house the ViewModels or if we just change our thinking and migrate what we have used as our BusinessLogic component to the ViewModels? Does our BusinessLogic component represent the ViewModels?


title: Best Practices for MVC Architecture

text: There are a number of questions on Stack Overflow regard MVC best practices, but most of those seem to revolve around things like using Dependency Injection, or creating helper functions, or do's and don'ts of what to do in views and controllers. My question is more about how to architect an MVC application. For example, we are encouraged to use DI with the Repository pattern to decouple data access from the controller, however very little is said on HOW to do that specifically for MVC. Where would we place the Repository classes, for instance? They don't seem to be model related specifically, since the model should likewise be relatively decoupled from the actual data access technologies. A second question involves how to structure the layers or tiers. Most example applications (Nerd dinner, Music Store, etc..) all seem to use a single tier, 2 layer approach (not counting tests) that typically has controllers directly calling L2S or EF code. If I want to create a multi-tier/layer application what are some of the best practices there in regards to MVC?


title: How to learn to draw UML sequence diagrams

text: How can I learn to draw UML sequence diagrams. Even though I don't use UML much I find that type of diagrams to be quite expressive and want to learn how to draw them. I don't plan to use them to visualise a large chunks of code, hence I would like to avoid using tools, and learn how to draw them with just pen and paper. Muscle memory is good. I guess I would need to learn some basics of notation first, and then just practice it like in "take the piece of code, draw a seq. diagram visualising the code, then generate the diagram using some tool/website, then compare what I'd drawn to what the tool result. Find the differences, correct them, repeat.". Where do I start? Can you recommend a book or a web site or something else? **Update** : I decided that it might be worthwhile to upskill myself in UML, and found this book: http://www.amazon.com/The-Elements- UML-2-0-Style/dp/0521616786 \- reviews say it is best practices book on UML. Have you read it? Can you recommend it? Thank you.


title: Accessing Repositories from Domain

text: Say we have a task logging system, when a task is logged, the user specifies a category and the task defaults to a status of 'Outstanding'. Assume in this instance that Category and Status have to be implemented as entities. Normally I would do this: **Application Layer:**               public class TaskService     {         //...              public void Add(Guid categoryId, string description)         {             var category = _categoryRepository.GetById(categoryId);             var status = _statusRepository.GetById(Constants.Status.OutstandingId);             var task = Task.Create(category, status, description);             _taskRepository.Save(task);         }     }      **Entity:**               public class Task     {         //...              public static void Create(Category category, Status status, string description)         {             return new Task             {                 Category = category,                 Status = status,                 Description = descrtiption             };         }     }      I do it like this because I am consistently told that entities should not access the repositories, but it would make much more sense to me if I did this: **Entity:**               public class Task     {         //...              public static void Create(Category category, string description)         {             return new Task             {                 Category = category,                 Status = _statusRepository.GetById(Constants.Status.OutstandingId),                 Description = descrtiption             };         }     }      The status repository is dependecy injected anyway, so there is no real dependency, and this feels more to me thike it is the domain that is making thedecision that a task defaults to outstanding. The previous version feels like it is the application layeer making that decision. Any why are repository contracts often in the domain if this should not be a posibility? Here is a more extreme example, here the domain decides urgency: **Entity:**               public class Task     {         //...              public static void Create(Category category, string description)         {             var task = new Task             {                 Category = category,                 Status = _statusRepository.GetById(Constants.Status.OutstandingId),                 Description = descrtiption             };                  if(someCondition)             {                 if(someValue > anotherValue)                 {                     task.Urgency = _urgencyRepository.GetById                         (Constants.Urgency.UrgentId);                 }                 else                 {                     task.Urgency = _urgencyRepository.GetById                         (Constants.Urgency.SemiUrgentId);                 }             }             else             {                 task.Urgency = _urgencyRepository.GetById                     (Constants.Urgency.NotId);             }                  return task;         }     }      There is no way you would want to pass in all possible versions of Urgency, and no way you would want to calculate this business logic in the application layer, so surely this would be the most appropriate way? So is this a valid reason to access repositories from the domain? **EDIT: This could also be the case on non static methods:**               public class Task     {         //...              public void Update(Category category, string description)         {             Category = category,             Status = _statusRepository.GetById(Constants.Status.OutstandingId),             Description = descrtiption                  if(someCondition)             {                 if(someValue > anotherValue)                 {                     Urgency = _urgencyRepository.GetById                         (Constants.Urgency.UrgentId);                 }                 else                 {                     Urgency = _urgencyRepository.GetById                         (Constants.Urgency.SemiUrgentId);                 }             }             else             {                 Urgency = _urgencyRepository.GetById                     (Constants.Urgency.NotId);             }                  return task;         }     }


Which Java framework meets these requirements? What set of frameworks would be best suited to meet these requirements? The requirements are:   * oriented for web   * support for transactions   * support for creating RESTful web services   * support for security, levels of security   * integration with some kind of ORM framework like Hibernate   * ability to change front-end without need of making changes to back-end. Firstly, I want to develop a flex based front-end but if I've ever wanted to change it to HTML5 then I don't want to make changes to my back-end   * ready for cloud   * free to use for commercial purposes To my mind comes Spring but are there any other alternatives meeting these requirements? What about if it is not necessary java? Do you know framework, set of frameworks combined together in other language which meet these requirements best?


title: Have Superclass Contain List of Subclass?

text: For the GUI of a program, I want it to list several items, all of which are, from a programming side, just subclasses. They can add one of these items to a list. I don't want to hard-code which subclasses there are. What would be the best way to allow the GUI to know about the subclasses, only having the base class to refer to?


title: Best way to develop a php open source application

text: I started to create a php application I'd like to make open source in the near future. However I do not know, if it's needed to follow any kind of code/documentation convention, to make it more usable and acceptable when released. Is there any model, to follow, to develop a good open source application? Do you think it is necessary(or better) to develop it entirely, or for the most, object oriented?


title: Storing application users in SQL: create a new "Users" table or use built-in database user management?

text: I am specifically interested in SQL Server, but the same question applies in general. When creating a new application, the way I see it, there are two options:   * Create a table called "Users" and store the user name, password, etc. Set up one database user called "application" (and possibly more users for various components of the system).    * Set up each application user as the database user. This may allow for easier single log on setup on Windows-based systems. Which approach is generally preferred? Why? What are the drawbacks and benefits?


title: Can we expect re-addition of Mobile SDK in future Visual Studio versions?

text: Microsoft stopped shipping the Mobile SDK in Visual Studio releases after the 2008 version. This wasn't a big surprise, as there were no takers for that feature and android made a big hole. But now, things have changed, Microsoft has partnered with Nokia, HTC rolling new mobiles with Windows OS. Also, Windows 8 is all set to make début on tablets. Can all these be seen as potential reasons for Microsoft to roll-out the Mobile SDK again in future releases of Visual Studio ?


title: How can I determine what level (entry, mid, senior) I am?

text: I have an interview with a company headquartered in San Francisco. They are pretty popular, well publicized, and recently acquired by a semi-notable player in Silicon Valley. The team is probably 20-30 people. They want at least a mid-level candidate, and offer "perks" for senior/lead developers. I got an internship (for backend development) at a small startup halfway through a state school CS program, and was hired full-time a week into my internship as lead (well... only) iOS developer. I've worked here for 5 months and released an app (iOS constituent of our realtime communication suite). I've also released a location-based app for a niche community. I am familiar with TDD, GitHub, API's, AFNetworking and all the recent popular jazz, as well as dated concepts like pre-ARC memory management and xib/xibless programming. I can demonstrate a basic knowledge level of algorithms and formal programming (competent in code competitions) and I am a good communicator. But my notable experience is somewhat lacking. Would it be fair to call myself a mid-level developer?


title: Adding correct documentation for a method

text: I have method like this:               methodA(someParams)     {       do some initializations,etc;       call methodB(someParams);     }          methodB(someParams)     {       do work;       if blah then raise exception::FileNotFound       if blahblah then raise exception::ResourceNotFound     }      When I am adding documentation for `methodB`, I am also documenting the exceptions it can raise. But how about documentation of `methodA` ? It IS consuming `methodB` that may raise exceptions, so should I still document those exceptions for methodA as well? Right? wrong?


title: How to convince boss to buy Visual Studio 2012 Professional

text: The main advantage is the use of ReSharper and other add-ons but we need to make a convincing argument for the purchase of Visual Studio 2012 Professional. We are currently using Visual Studio 2012 Express for Windows. It is quite good but is hard to switch from using the full Professional version in the past. So far the team has compiled the following list: >   1. Extract Interface function missing. Very useful for clean SOLID code. >   2. No add-on support. Can’t install StyleCop or productivity tools. > AnkhSvn, Spell checker, Productivity PowerTools, GhostDoc, Regex Editor, > PowerCommands. >   3. The exception assistant is limited in Express edition. This is a big > annoyance. See http://www.lifehacker.com.au/2013/01/ive-given-up-on-visual- > studio-express-2012-for-windows-desktop-heres-why/ >   4. Different tools provided by MS like certificate generation. >   5. Possibility of create a Test project based on source code. > We do server development in C# so any web add-ons or anything else is useless. The reason I am asking is I am sure that people have been in the same position. What approach did you use and can you think of additions or ammends to the above list? Thanks,


title: Layered Manufacturing Contour Generation

text: I am currently working on software for layered manufacturing (3D printing), and have come to a point where I no longer know what to do. I am at the stage where I must take a bunch of lines, and order them to create a seamless contour of a model. I have some basic ideas on how I am going to do this, but since I am using .STL files there are excess lines in some of the layers. ![sample](http://i.stack.imgur.com/S2wSL.png) In that image you can see that there is a simple square with a line connecting two corners to form two triangles. This is the base of a cube. Ideally the line connecting the two corners wouldn't be there, but because this was processed from a .STL file which uses triangles only it has to be there to turn the square into two triangles. My original thought was to print out that line too, but in a more complex model ( like a gear ) there would be too many and it would be impossible to create one seamless contour. My next thought was to just print it out as two triangles, but I cannot go over the same line twice, so that doesn't work especially in complex models. I have been thinking about this problem for quite a while, but I can never come up with a solution that would work for any model. I need to end up with series of lines that form contours of not just the outside, but possibly the inside as well if there are holes. For example a gear would have one set of lines that form the teeth all the way around, and another set of lines that form the hole in the middle. If anyone knows a solution to this, or has experience with this, I would greatly appreciate your input =)


title: How does EF 4.1 stack up against ADO.NET SQL for stored procedures?

text: This question is _solely_ about using these technologies against stored procedures. I've been doing quite a bit of reading on pitting these two against each other, and far more than anything I've been seeing them compared with CRUD operations and other more complex queries - very rarely for calling stored procedures. I've read that it's hard to beat ADO.NET for performance when calling stored procedures. However, when calling them with Entity Framework 4.1, you get the benefits of entities (rather than just the data reader) which can be nicer to work with and pass around (imo). I ran a few tests today (not sure of the accuracy of them) and they suggest that over 100 or 1000 iterations, calling the same procedure, that ADO.NET is something like 5 milliseconds, on average, faster per call. (I haven't been able to test how long it takes to convert from the standard data reader object to a similar kind of entity, but I doubt it makes up for the 5 milliseconds) Is it worth the trade off in performance for the benefits in design and writing? Or are those 5ms per query just too much? Does the answer change between small projects, and environments like e-commerce?


title: Use the filesystem or some noSql database for shared memory between processes?

text: I'm implementing a system that's basically a pipeline of XML documents: XML documents are retrieved over the Internet, validated, further processed etc. until they are ingested in a relational (non-XML) database. After the ingestion in the database they can be discarded. Since the various components of the pipeline are somewhat independent from each other I want to use a number of separate applications, each performing a "step" in the pipeline. What should be the reasoning behind choosing the file- system for data sharing between the above applications versus some noSQL database? The data to be shared is mostly XML files and total volume of data that goes through the pipeline maybe 10 gigabytes per day.


title: Understanding abstraction

text: I am trying to understand object oriented code better and I decided to start at abstraction. If I am not incorrect, abstraction means that you hide information that isn't relevant to what task you want to perform, i.e. If I turn on the TV I would not need to know the internal that is going on. Or If I have a class that handles Orders, and I would like to get the Total cost of a couple of Products, a getTotal() method would be the only thing that the User needs to know about to get the total sum of the products, and not how it's actually calculated. So per se, by using a class I am abstracting data?


title: Web-app filtering information client-side vs server-side?

text: I have a web-app that provides data (that is updated on an interval) for intranet users, who are able to filter information by location. I was having a discussion with a co-worker about whether that filtering should take place on the client vs server side. The amount of information isn't large, but the users are typically interested in a certain location. My question..Is it preferable to let the database filter the data and send the results to the client, or return all data back to the client and then sort by location? If it's not clear cut, when would you choose on method over the other?


title: When does a Monad become a hammer?

text: I realize my precursory understanding on Monads is severely lacking in detail considering my knowledge comes mostly from Douglas Crockford's Monads and Gonads talk and complicated with my sevear handicap with Haskell (which looks like a bunch of non-alpha numeric characters mushed between disjointed English words to my tragically disadvantaged brain). With that being said, I'd like to ask about programming practices concerning Monads and how they could be implemented in JavaScript. I'm prefacing this because I recognize that the very nature of the language can drastically affect how one perceives a concept and that because of my background in JavaScript this question could be inappropriate if it were based in a purely functional language like Haskell. Often times while designing an interface or coding an object I will find myself implementing a form of chaining which mutates the encapsulated data. I prefer this style over more declarative forms like passing in a multi-lined object literal.               function Declarative(options) {       this.options = options;     }     Declarative.prototype.compute = function() { ... }     var x = new Declarative({       foo: 'foo',       bar: 'bar'     });     x.compute();      Verses:               function Chained() { }     Chained.prototype.withFoo = function(v) {       this.foo = v;       return this;     };     Chained.prototype.withBar = function(v) {       this.bar = v;       return this;     };     Chained.prototype.compute = function() { ... }     var x = new Chained()       .withFoo('foo')       .withBar('bar')       .compute();      Both these examples (aesthetics aside) raise a few hairs on my back because a small voice mockingly squeals "Mutability much?" I begin thinking this might be a good time to conciser a Monad pattern. What I mean by that is each method would in short return a new object of the same type. Then adding composition functions on it like map, bind, etc. could off a world of potential like I get with Promises and other Monad type. (Obviously taking care to follow the three Monadic laws when implemented). Finally, my other half of the brain starts chiming in with "If all you have is a hammer, everything looks like a nail." Sigh. That is when my productivity and creativity crash here on SE curious and confused. While I continue my research for understanding (perhaps gaining enough courage to contemplate Haskell) I ask: When does the idea of Monads (that being composability of functions on objects (ie types) along with immutability) become a good idea to be cultivated and patterned? And, when is it nothing more then an over utilized hammer? (Concepts and learning opportunities welcomed, example code helpful)


title: Add arguments to mysql in Django's "dbshell"

text: I'd like to add a couple of command-line arguments to my Django's `./manage.py dbshell` command, and I can't figure out how. In specific I'd like to add `-A` to prevent MySQL from scanning every table and every column, and `--prompt=LOCAL:` since I frequently keep multiple shells open. I can't figure out how to do this! I'm only idea is to create my own "mysql" command in /usr/local/bin and have it be a wrapper for mysql with my own flags. But I'd really like to avoid doing that.


title: Starting all over again?

text: Have you ever been developing something and just came to a point where you think that this is rubbish, the design is bad and although I will lose time it will be better to just start all over again? What should you consider before making this step? I know it can be drastic in some cases, is it best to just totally ignore what you did before, or take some of the best bits from it? Some real life examples would be great.


title: Privilege (Access/Permission) Control for Hierarchial Structured Resource

text: Question: Is there any standard model or industry defacto implementation for modeling and implementing Access Control in (i.e.) a Document Management System? Note: I studied a bit the security mechanism of Windows (which I do not want to use), and I saw Users and Groups and Policies. But I can't understand: 1 - How a single policy object can contain all information about allowed/denied actions on a subject for all users and groups, at a specific moment of time. 2 - How multiple policies on a specific subject, merge into one to provide least possible access. 3 - What is the mechanism (data structures, database, caching, implementation) of hierarchical resources like folders? Those king of queries are usually slow.


title: Why bother with detailed specs?

text: When writing software, what's the point of writing a formal, detailed dead- tree specification? To clarify, a somewhat informal, high-level specification for people who don't want to read the code makes sense to me. A reference implementation in well-commented, readable source code is about the most unambiguous specification of anything you're going to get, though, since a computer has to be able to execute it. Formal specs are often just as hard to read, and almost as hard to write, as code. What benefits does a formal specification offer over a reference implementation plus a little documentation about what behavior is undefined/implementation-defined regardless of how it works in the reference implementation. Edit: Alternatively, what's wrong with the tests being the formal specification?


title: How do you determine velocity when the previous sprint was half User Stories and half Defects?

text: The following scenario often happens with my team at the office. Let's say we decided to plan our Sprint this way:   * 50% new features   * 50% bug fixing (they are high priority AND _unestimated_ as the fixes are easy, the hard and time-consuming bit is the investigation) The Sprint goes well and we finish all the features, say X story points, and quite a few unestimated bugs. Two questions come to mind:   1. What is our Sprint velocity? Is it X?    2. Assuming it is X; how do we plan the next Sprint using "yesterday's weather" (X story points) if we now want to do an 100% new features Sprint?


title: Separate namespace just for exceptions?

text: I was doing a code review and came across something odd which I've never seen before. The developer decided to create a sub-namespace just to contain all the assembly's exceptions. I thought I had read that this was explicitly not a good use of namespaces and that exceptions should be kept at the "lowest" namespace from which they are thrown, but I haven't found anything on MSDN (or anywhere else for that matter). At the same time, it seems odd that I haven't come across this before in the framework itself or the third party libraries I've used. Are there any guidelines exist that would push away from keeping all exceptions in a .Exceptions sub-namespace?


title: What kind of processes or static alaysis would you use to catch impropper buffer bugs such as the one that caused heartbleed?

text: What kind of process or static analysis would catch the heart bleed bug other than human code reviews which we already know failed. The Fix Commit is here.


title: How to contribute to jQuery?

text: I'm confused about the nature of the jQuery project. It can be licensed under either the GPL or the MIT license, according to the comments in the project. However, the jQuery web site provides a list of team members, as if this were a commercial product. I have written some code to improve jQuery to work around a nasty bug in Internet Explorer and I would like to know what is the best way to propose my idea to the project.


title: How to deal with code reuse philosophy?

text: I constantly find myself thinking about code reuse when starting a new project. To what extent should I make my code reusable?   Should I limit it to the application scope or should I make it reusable outside of the project? Sometimes, I feel like code reusability may stand in the way of a simple design. Please, share your own understanding and approach of code re- usability.


title: Jenkins without Automated Tests

text: I know that Jenkins is focused on continous building/testing, monitoring of batch jobs about the project. We have a legacy project which such condition : 1)Has a development team. 2)It has SVN for source code management 3)Some cronjobs for some operations. 4)Compile&Build don't take too much time, there is no very complex dependencies. 5)It doesn't have any automated test/junit classes and will not have. I'd like to ask to experienced users about Jenkins, is it still worth to use Jenkins for central build&management of the project ?


title: Unit of work principle is causing a problem in MVC3 application

text: I am implementing a website using MVC3, Entity Framework 4.1 and Repositoty pattern, Unit of work principle. But I am facing a big problem while implementing this. I have developed a static ObjectContext class. This class is used across all the repositories so unit of work pattern is followed. I have e.g. ICustomer, IProduct repositories. I use specifically only one repository in a controller and that too is injected using NInject.               CustomerController(ICustomer customer)     {     }          ProductController(IProduct product)     {     }      Since object context class is static and IProduct, ICustomer have parameterised constructor which accepts the objectContext class, these two will share the same ObjectContext instance. When the execution is single threaded everything goes fine, but in multi- threading I get an unhandled exception, because of one repository closing the connection which was being used by other. I think if I make ObjectContext class not-static then this will solve the problem(Not tested yet) but then Unit of Work will not be observed. Can you please suggest a solution for this?