What aspects of a project should be covered when presenting it in an interview?

I am working as a .Net developer for a couple of years. I don't have experience in presenting projects but I have an interview and I will be expected to present the projects that I worked on in the past. How much/what kind of technical details should be covered? What other aspects of a project should be covered?


BASE_DIR/URL with or without trailing slash?

When you have basedir/url constants or variables, do you put a trailing slash? In theory I think ultimately one should, since /path/to/dir/ is a dir while with /path/to/dir if I'm not mistaken the server checks if there's a file called 'dir', and then adds a trailing slash for you. However, I think `$my_url = BASE_URL . '/my/dir/'` looks better than this: `$my_url = BASE_URL . 'my/dir/'` Better yet, this: `<img src="<?php echo BASE_URL; ?>/my/dir/">` looks a lot more readable to me than `<img src="<?php echo BASE_URL; ?>my/dir">`. Obviously this might be personal preference, and fine as long as one is consistent, but what is most common? What approach do you prefer? Any opinion appreciated.


Do companies actually send their developers to events abroad?

I was looking at the DevConnections conferences and lamenting the fact that the UK one was cancelled as there's absolutely no way I'll be going to any of the others, which got me thinking: **Do any companies actually send their developers to conferences abroad, or is that just a utopian ideal of which I'm irrationally envious?**


UML modelling semantics

In today's lecture about Modelling techniques with respect to MDD using UML the lecturer stated that it's absolutely necessary to give a (possibly) textual description about the semantics of each diagram you produce. In my opinion it's not necessary to describe semantics of diagram elements which are already standardized by UML. I can see that it's completely appropriate if you extend the standard UML by stereotypes/tagged values for any reason. In contrast, I think that standardization has in the ordinary case the intention to let people reason and talk about diagrams without the need to explain semantics every time. The only precondition is of course that they all rely on the same UML specification. Another point regarding MDD is that using different semantics from time to time for the same diagram kind makes code generation and automatic model transformation difficult in the end.   1. Am I right with this notion?   2. Are there some inherent interpretation ambiguities in UML to make it more general usable?


Preparing yourself for Code challenges

Just a few days ago I discovered Codility, and I tried their challenges. And I must say. I got my behind handed to me on a platter. I'm not sure what the problem was, but I'll lick my wounds and wait for the solution to come out and compare it with my own. In the meantime, I want to get ready for the next challenge so I'm reading their previous blog posts and seeing how to solve their previous problems. There are a lot of new things I haven't heard about like (Cartesian trees, various sort algorithms, etc.) So, how does one prepare for such challenges (especially the O(x) time and space complexity). What should I read to prepare for such a task?


How should modules access data outside their scope?

I run into this same problem quite often. First, I create a namespace and then add modules to this namespace. Then issue I always run into is how best to initialize the application? Naturally, each module has its own startup procedure so should this data(not code in some cases, just a list of items to run) stay with the module? Or should there be a startup procedure in the global namespace which has the startup data for ALL the modules. Which is the more robust way of organizing this situation? Should some things be made centralized or should there be strict adherence to modules encapsulating everything about themselves? Though this is a general architecture questions, Javascript centric answers would be really appreciated!


Implementation of communication between packages (Java)

I'm making a project with 5 packages. The packages can communicate with each other by sending Messages to a central MessageQueue in the Main package and that MessageQueue takes care of all the messages. (cfr.: http://en.wikipedia.org/wiki/Java_Message_Service) Provided this image: ![Diagram](http://i.stack.imgur.com/u26Bo.gif) the packages would be the clients (both publisher and subscriber) and the MessageQueue would be the topic. I'm now implementing the MessageQueue (a.k.a. the Topic in the image above) and packages can already subscribe to Messages and packages can also publish a Message.   Publishing a Message is just adding the Message to a queue 'inside' the MessageQueue. So at a given time during execution there can be 0, 1 or more messages in the MessageQueue and now i must make sure the MessageQueue processes all these messages correctly (and in order). A way of doing this could look like this:               public class MessageQueue {              public MessageQueue(){             //initialising etc.             processMessages();         }              private void processMessages(){             while(/*program is running*/){                 if(queue.isNotEmpty()){                     /*process first message in queue*/                 }             }        }      However, i believe this is not a great design and is sometimes referred to as _busy waiting_?   How could i approach this in a better way (without using any standard APIs ofcourse)? I would also like to apologise that the image isn't embedded, but i need 10 reputation before i can do that. If someone with more reputation could edit my post so that the image is embedded, i would greatly appreciate that.


Using WPF rather than WinRT for Windows 8 Pro tablet app: good or bad idea?

Our business is considering writing a line of business application for tablets to enable road warriors and executives access our data. This will be primarily used for dashboards, reports and some form filling input: quite typical scenario. Our other apps being built in .Net (WinForms) with lots of related class libraries DLLs (for data access layer, business logic, etc), it seems natural to want to use Windows 8 for this. I am a rather put off by Windows RT as it doesn't implement the whole .Net Framework and seems quite limitating, so we are rather considering the Windows 8 Pro tablets than WinRT ones. However, we want a smooth and pleasant tablet experience and I don't think WinForms would be great for this as not built for touch support. My question is would WPF be good for this? I see there are UI vendors selling touch controls kits but I wonder whether the "touch" experience in WPF is equivalent to the one found WinRT/Metro apps? Probably this could be answered by playing around with the tablet but I unfortunately do not have one at the moment and can't get the budget to buy one until I have settled this.


How to use a 3rd party web API

I am trying to understand the concept of using 3rd party web API. From what I understand so far, web API look like regular URLs with some parameters etc. Will the client program need to download and install any package/bundle etc from the website/server etc providing APIs and include it with their product or no bundle is needed to download from service provider. the client program just uses the web API URLs (like how we do it in browser) What are the variants in common use? Does it boil down to how much we want to do on client side and how much we want to do on server side? like not downloading anything from web API service provider means everything happens on web API provider side..


What is considered a suitable notice period for a software developer?

I'm being asked by the company I work for to extend my notice period. I'm not outright against it (in fact it's somewhat flattering in a way) but it has made me wonder what a typical notice period might be for a C# software developer?


How to use Git with ASP MVC Code-First Entity Framework

**TLDR:** What is an effective way to use Git to handle ASP MVC code-first EF? Which files need to be included for NuGet? Which files should be left out? We have an **ASP MVC code-first Entity Framework** project that we are building as a school project. For our versioning, we are using **Git to Bit Bucket**. The basic workflow to add a feature or revamp code is to create a branch off of a _Dev_ branch, commit to the new branch until finished and intial testing is done, then merge/pull request back into the _Dev_ branch. We have run into issues with the project setup breaking when a user tries to merge changes to the their branch before merging back into _Dev_. Some questions are:   **For the NuGet Packages, what should be included in the Git repo?** There are some files that seem to update every time, forcing Git to go through all of them during a commit. **Should the Entity Framework be included in the repo?** We have the migrations, but they seem to break any time anyone pulls changes onto their machine. **Is there a good way for Git to handle Visual Studio Project (.csproj) Files?** We had a merge nightmare involving project files when one developer pulled changes from the _Dev_ before trying to push back. For our .gitIgnore, we used an ASP and added a few of our own. A copy of it is at Pastebin.com. Also, as for the horrific mangling of project files, we have looked on StackOverflow and saw this: .NET + Git: how I deal with Visual Studio files?. Is this something that would resolve the Visual Studio project files issue?


Patterns for undo in multi-user applications on relational data

I want to build a web application that will allow multiple users to collaboratively populate the contents of a fairly conventional relational database. (The database will have a fixed schema, which is known in advance). I can see how to define the schema for the necessary object types, relations, and foreign key constraints (items, items as members of categories, links between items, and so on). Basic CRUD operations to instantiate and modify objects are no problem. But for resilience against vandalism and mistakes, I can foresee that it will be necessary to have undo/rollback functionality, so that moderator-level users can undo changes made by other users. I'm having trouble figuring out a suitable approach to take for two key functional pre-requisites:   1. Capturing all the database changes that result from an initial user request. For example, there's a many-to-many relationship between items and categories. Therefore, if a category is deleted (triggered by a user submitting an HTML form), all the category-item relation records corresponding to that category will get deleted due to referential integrity constraints on the many-to-many relation. How can I record all the cascading consequences of an initial operation, so that's it's possible to completely undo it later?   2. How can I isolate undo operations so that a bad action by one user can be undone without also needing to roll back all the beneficial changes which have been made by other users, in between the bad action and the moderator's review? The Undo patterns I've seen described (e.g. "Command" pattern) all assume that there is a stack of commands and undo operations are always applied in strict reverse order of initial application (no support for out-of-order undos). Are there any standard patterns for handling undo capability in relational databases which would help meet these two goals? At the moment, I'm looking for generic algorithms and patterns which help solve the problems listed above, rather than platform-specific details.


What is the difference between self-types and trait inheritance in Scala?

When Googled, many responses for this topic come up. However, I don't feel like any of them do a good job of illustrating the difference between these two features. So I'd like to try one more time, specifically... **What is something that can be done with self-types and not with inheritance, and vice-versa?** To me, there should be some quantifiable, physical difference between the two, otherwise they are just nominally different. If Trait A extends B or self-types B, don't they both illustrate that being of B is a requirement? Where is the difference?


How do you track bugs in your personal projects?

I'm trying to decide if I need to reassess my defect-tracking process for my home-grown projects. For the last several years, I really just track defects using `TODO` tags in the code, and keeping track of them in a specific view (I use Eclipse, which has a decent tagging system). Unfortunately, I'm starting to wonder if this system is unsustainable. The defects I find are typically associated with a snippet of code I'm working on; bugs which are not immediately understood tend to be forgotten, or ignored. I wrote an application for my wife which has had a severe defect for almost 9 months, and I keep forgetting to fix it. What mechanism do you use to track defects in your personal projects? Do you have a specific system, or a process for prioritizing and managing them?


Why are statements in many programming languages terminated by semicolons?

Is there a reason that a semi-colon was chosen as a line terminator instead of a different symbol? I want to know the history behind this decision, and hope the answers will lead to insights that may influence future decisions.


Optimal way to implement this specific lookup table in C#?

I want to create a lookup table for this data: The "input variables" (what is used to "lookup") are 4 different doubles that can each take on 1 of 200 numbers (the numbers range from 1-1000 but there are only 200 possible numbers that each can be (these 200 possible numbers that each of them can be are known to me)) the doubles are all 2 decimal places. If any one of the four were changed it would slightly change the output variables. There is also 1 integer (enum really) that can take on a value from 1-5. There is a condition on 3 of the input variables that (1/x + 1/y + 1/z must be less than 1.02). Could this be used in a hashing algorithm? The "output variables" (what is returned) are ~30 doubles (mostly 2 decimal places but one has 10 decimal places). (will be packaged in an object) ranging from 1 to 1000 (2 decimal places). I expect there to be ~150 million records. Should I use a big dictionary and load it into memory then I start the program? Would a Database and LINQ be best? Can I use Trees or Hashing in some way to speed it up? I've never had to make a LUT this big before, where speed is a major factor. **Clarification:** Because of the condition that (1/x + 1/y + 1/z must be less than 1.02, see above) there is only ~150 million combinations of input variables. Not ~(200)^4. **Update:** I have looked at some stats (min and max observed values and discovered some relationships) for my input variables and have found that if we call the 4 input doubles A, B, C, D: `A and B have ~200 possible values each,   C has ~50 possible values, and   D has ~120 possible values` Of these, there are several relationships that mean that there are only ~27 million combinations of these rather than the ~150 million I originally thought. So there will be ~27 million records in the LUT. There is also definitely a relationship that I haven't been able to figure out between (A, B, C) and D which will also bring down the number of combinations. Would it be optimal to run the LUT from RAM now that I have reduced the entries from 150 to 27 million (and probably lower)? Now that it's down to 27 million would storing them as ints by multiplying them by 100 (2 decimal places) still be optimal? As DocBrown suggested, I should store the doubles as ints (multiply by 100 because they have 2 decimal places) and then combine the 5 different ints (4 doubles (see above) and 1 enum (value:1-5)) into a key for the LUT. How to do this such that I will have a unique value for each combination of my 5 input variables (the 5 ints) AND this method is open to expansion of each of the input variables, i.e. should I need to expand the double C's combinations to 70 instead of 50 I will need unique key values for the new entries that are result of the expanded number of total combinations of the input variables.


What is the best way to INSERT a large dataset into a MySQL database (or any database in general)

As part of a PHP project, I have to insert a row into a MySQL database. I'm obviously used to doing this, but this required inserting into 90 columns in one query. The resulting query looks horrible and monolithic (especially inserting my PHP variables as the values):               INSERT INTO mytable (column1, colum2, ..., column90)      VALUES     ('value1', 'value2', ..., 'value90')      and I'm concerned that I'm not going about this in the right way. It also took me a long (boring) time just to type everything in and testing writing the test code will be equally tedious I fear. How do professionals go about quickly writing and testing these queries? Is there a way I can speed up the process?


Dependency analysis for tests

Google built a testing system that can infer which tests need to be run after a change. In their own words: > ... we built a continuous integration system that uses dependency analysis > to determine all the tests a change transitively affects and then runs only > those tests for every change. > > ... > > ![enter image description here](http://i.stack.imgur.com/wVwpL.png) Inspired by that, I have created a tool for Python that also uses dependency analysis to detect which tests need to be run. The difference is that it is not tied to a CI system. It is meant to be run locally and looks for file changes since the last time the tests passed, instead of looking at commits on the version control system. Visual Studio 2010 has a featured called "Test impact analysis" that "inform the developer of what tests they should run to verify the code changes they are making". My question is: Is there a name for this approach? I believe I read somewhere that this is called "Incremental Testing", but I cannot find the reference anymore.


Masters vs. PhD - long

I'm 21 years old and a first year master's computer science student. Whether or not to continue with my PhD has been plaguing me for the past few months. I can't stop thinking about it and am extremely torn on the issue. I have read http://www.cs.unc.edu/~azuma/hitch4.html and many, many other masters vs phd articles on the web. Unfortunately, I have not yet come to a conclusion. I was hoping that I could post my ideas about the issue on here in hopes to 1) get some extra insight on the issue and 2) make sure that I am correct in my assumptions. Hopefully people who have experience in the respective fields can tell me if I am wrong so I don't make my decision based on false ideas. Okay, to get this topic out of the way - money. Money isn't the _most_ important thing to me, but it is still important. It's always been a goal of mine to make 6 figures, but I realize that will probably take me a long time with either path. According to most online salary calculating sites, the average starting salary for a software engineer is ~60-70k. The PhD program here is 5 years, so that's about 300k I am missing out on by not going into the workforce with a masters. I have only ever had ~1k at one time in my life so 300k is something I don't think I can accurately imagine. I know that I wouldn't have all of that at once obviously, but knowing I would be earning that is kinda crazy to me. I feel like I would be living quite comfortably by the time I'm 30 years old (but risk being too content too soon). I would definitely love to have at least a few years of my 20s to spend with that kind of money before I have a family to spend it all on. I haven't grown up very financially stable so it would be so nice to just spend some money…get a nice car, buy a new guitar or two, eat some good food, and just be financially comfortable. I have always felt like I deserved to make good money in my life, even as a kid growing up, and I just want to have it be a reality. I know that either path I take will make good money by the time I'm ~40-45 years old, but I guess I'm just sick of not making money and am getting impatient about it. However, a big idea pushing me towards a PhD is that I feel the masters path would give me a feeling of selling out if I have the capability to solve real questions in the computer science world. (pretty straight-forward - not much to elaborate on, but this is a big deal) Now onto other aspects of the decision. I originally got into computer science because of programming. I started in high school and knew very soon that it was what I wanted to do for a career. I feel like getting a masters and being a software engineer in the industry gives me much more time to program in my career. In research, I feel like I would spend more time reading, writing, trying to get grant money, etc than I would coding. A guy I work with in the lab just recently published a paper. He showed it to me and I was shocked by it. The first two pages was littered with equations and formulas. Then the next page or so was followed by more equations and formulas that he derived from the previous ones. That was his work - breaking down and creating all of these formulas for robotic arm movement. And whenever I read computer science papers, they all seem to follow this pattern. I always pictured myself coding all day long…not proving equations and things of that nature. I know that's only one part of computer science research, but that part bores me. A couple cons on each side - Phd - I don't really enjoy writing or feel like I'm that great at technical writing. Whenever I'm in groups to make something, I'm always the one who does the large majority of the work and then give it to my team members to write up a report. Presenting is different though - I don't mind presenting at all as long as I have a good grasp on what I am presenting. But writing papers seems like such a chore to me. And because of this, the "publish or perish" phrase really turns me off from research. Another bad thing - I feel like if I am doing research, most of it would be done alone. I work best in small groups. I like to have at least one person to bounce ideas off of when I am brainstorming. The idea of being a part of some small elite group to build things sounds ideal to me. So being able to work in small groups for the majority of my career is a definite plus. I don't feel like I can get this doing research. Masters - I read a lot online that most people come in as engineers and eventually move into management positions. As of now, I don't see myself wanting to be a part of management. Lets say my company wanted to make some new product or system - I would get much more pride, enjoyment, and overall satisfaction to say "I made this" rather than "I managed a group of people that made this." I want to be a big part of the development process. I want to make things. I think it would be great to be more specialized than other people. I would rather know everything about something than something about everything. I always have been that way - was a great pitcher during my baseball years, but not so good at everything else, great at certain classes in school, but not so good at others, etc. To think that my career would be the same way sounds okay to me. Getting a PhD would point me in this direction. It would be great to be some guy who is someone that people look towards and come to ask for help because of being such an important contributor to a very specific field, such as artificial neural networks or robotic haptic perception. From what I gather about the software industry, being specialized can be a very bad thing because of the speed of the new technology. When it comes to being employed, I have pretty conservative views. I don't want to change companies every 5 years. Maybe this is something everyone wishes, but I would love to just be an important person in one company for 10+ (maybe 20-25+ if I'm lucky!) years if the working conditions were acceptable. I feel like that is more possible as a PhD though, being a professor or researcher. The more I read about people in the software industry, the more it seems like most software engineers bounce from company to company at rapid paces. Some even work like a hired gun from project to project which is NOT what I want AT ALL. But finding a place to make great and important software would be great if that actually happens in the real world. I'm a very competitive person. I thrive on competition. I don't really know why, but I have always been that way even as a kid growing up. Competition always gave me a reason to practice that little extra every night, always push my limits, etc. It seems to me like there is no competition in the research world. It seems like everyone is very relaxed as long as research is being conducted. The only competition is if someone is researching the same thing as you and its whoever can finish and publish first (but everyone seems to careful to check that circumstance). The only noticeable competition to me is just with yourself and your own discipline. I like the idea that in the industry, there is real competition between companies to put out the best product or be put out of business. I feel like this would constantly be pushing me to be better at what I do. One thing that is really pushing me towards a PhD is the lifetime of the things you make. I feel like if you make something truly innovative in the industry…just some really great new application or system…there is a shelf- life of about 5-10 years before someone just does it faster and more efficiently. But with research work, you could create an idea or algorithm that last decades. For instance, the A* search algorithm was described in 1968 and is still widely used today. That is amazing to me. In the words of Palahniuk, "The goal isn't to live forever, its to create something that will." Over anything, I just want to do something that matters. I want my work to help and progress society. Seriously, if I'm stuck programming GUIs for the next 40 years…I might shoot myself in the face. But then again, I hate the idea that less than 1% of the population will come into contact with my work and even less understand its importance. So if anything I have said is false then please inform me. If you think I come off as a masters or PhD, inform me. If you want to give me some extra insight or add on to any point I made, please do. Thank you so much to anyone for any help.


Checklist for starting an open-source project

To start an open-source project is not just to throw up the source code on some public repository and then being happy with that. You should have technical (besides user) documentation, information on how to contribute etc. If creating a checklist over important things to do, what would you include on it?


Data Mining Books

I'm passionate about _data mining_ , I have read some books like _Programming Collective Intelligence_ , and I would like to know more good **books** , specially practical ones, **about _data mining_** in conjunction with _AI_. Any tips will be appreciated as well. Thanks.


How can NSObject contain an NSString if NSString is an NSObject               /* NSObject.h     Copyright (c) 1994-2012, Apple Inc. All rights reserved.     */          (NSString *)description;      NSObject has a property named 'description' that is an NSString but isn't NSString an NSObject? How is it that this works?


How to use specific Request Header

I am learning how to work with XMLHttpRequests. I know that request.setRequestHeader() is an important factor. I just don't understand why. It took me a while but I have at least found a list of Headers here and here, but I still don't understand what each one of them does, and what value goes with each. Is there a resource that gives an example and explains what they are for?


Iteratively improve software architecture & quality in an agile process?

Or to put it another way how to ensure that architecture or quality doesn't suffer, doing agile. Some of the understandings in handling architecture in agile are below(generally applies to testing as well) *** Do architecture until risks fall off your radar * minimal design up front, so that you will not pay a horrible price for reasonable change requests. * "just enough" architecture/infrastructure per each feature/requirement** (The above were found in searching other related StackOverflow questions) * * * A **hypothetical example/scenario** is that there is a requirement to develop a order processing module in the existing system. The below guidelines are negotiated and agreed upon.   1. The architecture for module should be able to handle processing of 10 orders in the span of a minute.   2. Time to market is 4 weeks, planning is done to handle 2 sprints of 2 weeks.   3. The Business is satisfied with average performance expectations. Once the module is delivered, lets say the following improvements/changes are requested.   * Improve the processing to 15 orders per minute.   * Improve performance by 25%.   * Time to market is 2 weeks. So assuming the further requirements from the customer/business come and which are welcome, but in future as the iterations go on, the architecture needs to be overhauled, and testing the quality of the module also becomes more time consuming. * * * _And the above is not a happy result, as estimations increase, and there is an understandable inability to meet further expectations or requirements quickly. Even if it can be done in the given timeframe with sufficient quality, just wish that we could have done something about it well before and not face this situation at this point of time._ _In hindsight, architecting to scale in the first iteration would be ideal, but that was not the goal and focus. The focus is always on Time to market, and on acheiving on meeting the business/customers expectations in a given timeframe. Unfortunately, in the long run it does take a toll on development._ **What can be done to avoid the mentioned pitfall in the example, in improving the architecture or testing process iteratively?**


Comparison with an outsourced dev center

We are part of a software company which was just acquired by a larger one. This company has a large development center in India; we are based in Europe. We don't yet know what will happen with our projects, maybe they will be outsourced, maybe not but I want to know if we can rival an indian programmer as what salary is concerned. I know there are a lot of factors involved here, not just the salary issue, but I just want to get an ideea of the difference. Can someone mention salaries (in euros or dollars) and associated years of experience. I found some info on the web but it is not that recent. Thanks in advance!


Should developers "own" the build server(s)?

The build server at our company sucks. The build agents (there are a dozen of them, each is a separate VM, and apparently they are all living on their own ESX server) are SLOW. The web interface is SLOW and is running on a Windows VM, also on ESX. Everything is SLOW, SLOW, SLOW. Artifact upload sometimes fails for unknown reasons. Sometimes the web interface reports in the UI that it has run out of memory and it seizes up then crashes. It seems like IT is rebooting it at least once every day. Today they are rolling back a minor update because it has caused problems. Currently IT owns the hardware that the build servers run on and we have zero visibility into that. We do have admin control over the software. We (the developers) are constantly complaining about it but nothing seems to really improve. Does it make sense for developers to own the build server(s)? IT doesn't really have as much incentive to make them reliable and fast as developers do. In order to get IT to fix the problems we have to complain to our managers and then they have to talk to their managers who then tell IT to fix it. We can report problems to IT directly but that just doesn't seem to work to get things fixed because IT has lots of other things they need to deal with. Also, the developers are the ones who are actually using the build system and are probably a lot more familiar with it than IT. How does it work at other companies? We are about a 150 person company. So probably half of that is engineering, but a third of that is probably hardware, so we have maybe 40 or so devs.


Correct way to undo the past few git commits including a merge?

My team is working with git for the first time and has really messed up our git remote due to our inexperience. I'm trying to help educate them on git to solve the problem in the long term, but in the meantime, the commits that have been made are totally wrong. We haven't made very much progress at all, and I don't see the value in retaining these commits when they could cause confusion/additional problems down the line. The most recent commit was a merge between the master branch and a second branch that one of the team members unintentionally created. If I try to revert, git states that I must be using the -m flag, but I'm not sure whether I should be reverting or trying to rebase in this case, or how I would do it given the structure of the past couple of commits. What is the best way to resolve this issue and how should I go about doing it?


Project size vs. Team size

I'm a freelance solo web developer/designer/iPhone app maker by night (IT technician by day) and i'm interested in developing a social network site to go public (like Facebook, fingers crossed for half a billion users). But i'm concerned that i'm not going to manage this on my own, being only able to dedicate weekends/evenings to it. I would class my self as an intermediate web dev but by no means have i written something as large scale as an online community. When does a project become too big for one person and when do you bite the bullet and hire someone/team up with another web dev?


Is this a good task for machine learning - grouping pieces of DNA based on sequence?

Say I have a list of 50 DNA sequences all of the same length (6, 8 or 16 bps/ chars). I want to group these to sets of say 5 or 6 sequences per set. I have some criteria that need to be met based on the sequence: 1) There has to be at least three mismatches (different characters),               ACGTAC     ACTTAT       has 2 mismatches - positions 3, and 6 , so would not meet the criteria 2) if we say A and C are red C and T are green (the laser colours on the sequencing machines), then we must have a green and red laser in each position.               ACACTG     AATGAC     CCATGC      is equivalent to (r is RED, g is green)               RRRRGG     RRGGRR     RRRGGG          So the last four positions match the criteria (we have a red and a green in each position), but the first two positions are all red, so this set would not meet the criteria. I have tried brute forcing this, and it works, but after the set size gets big enough, the number of combinations needed to check gets huge. So would this be a suitable task for some "machine learning" algorithms. Is there a type of algorithm / process that I should be looking at in particular? (I just started a Coursera course, but the problems being discussed just now are linear regression, which seems to be a different class of problem).


Spring JDBC Template without DAO?

I am rather new to writing applications that interact with databases, and I'm curious about a project I'm working on. I have to write a very simple web app which is going to be displaying metric data based off a handful of various queries (probably not over 15) to various database tables. Based on my own research, Spring JDBC Template seemed like a good technology to go with based on the rather simplistic nature of my project. Every example I see for using it though seems to involve the use of the DAO pattern. I was under the assumption that usage of the DAO pattern wouldn't be necessary for what I'm doing, but it seems extremely pervasive in the examples, so perhaps I'm mistaken. What criteria would be used to evaluate whether I should be implementing a DAO pattern with Spring JDBC Template for my project?


Going from webforms, VS 2008, 3.5 framework to the "next level" based on my goals

I've got a few choices to make as I develop some business websites that will run for the next two to three years. Currently I run ASP.NET 3.5 with Visual Studio 2008. I do my development rather crudely in WebForms because that's what I learned and am most productive with. I don't use Membership or any other frameworks in my projects. I use a simple class that maintains a few session keys for each user based on basic database tables for users and roles. (I have about 3,000 users). So far I've kept the data simple, using ADO.NET against SQL Server and a data access class (Circa 2000, I know) to build my sites. My questions are as follows:   1. Under what conditions would I be better off moving to MVC?   2. Under what conditions would I find LINQ and ORM a better way to go than standard ADO.NET?   3. Would I benefit, in my current state of development, from going from Studio 2008 to Studio 2010?


Floyd's algorithm

Is it possible(expected) for an individual to figure out(having never seen it before) the algorithm if asked at an interview? What other problems have equally interesting solutions? Edit: Due to the confusion of the actual algorithm I am referring to, it is the Floyd's cycle-finding algorithm, aka, tortoise and hare algorithm.


How to experience gradual improvement of knowledge while a newbie does .NET maintenance programming?

I started my career as a software developer about 6 months ago. This is my first job, and I am the only developer in this company. I gained .NET knowledge by self study and also by doing some university projects. Our systems have old foundations based on an earlier version of .NET, and I'm starting to feel that I am not improving since I am a maintenance programmer here. Everything is old and my manager is not really taking any chances on gradually improving the software. What is your opinion? What should I do? I am newbie and also work hard to find my way through. There is no other developer, not even a senior one to help me here. I need your advice on my situation. And one last thing, can I get a new job with doing maintenance programming? I mean don't managers say that you do not have the experience of developing a new software from scratch? I feel redundant, what do I do?


Is there certain payoffs between working for a company in the IT industry, and working for the IT department of a company in some other industry?

I am a software engineering student and am in the process of making some career choices. I need to understand what the major differences are in the above two scenario. Anyone with experience of both, insight from you would be really helpful. Thanks in advance.


Choosing a rate to charge a client for training their programmer

We've been put in a bit of a difficult situation and I'm trying to figure out the best way to deal with it and how to charge for it. We've built a custom web app for a customer and I've been maintaining it for the last 1.5 years. They sent email an email a couple weeks ago saying they've hired a developer and would like to take the project in house. (Nothing had been mentioned regarding taking it in house before.) I was of course surprised as I had expected to be working on the project for another year or more. I met with the developer a week ago and went over the basics of the site. After my offer (including suggestion of a different rate) and follow-up email, they asked me if I'd be willing to do some training on how to continue development of the app using the libraries/techniques currently used. (The developer is experienced with the language, but not with the libraries.) I'm wondering how much I should charge for 1-on-1 training tailored specifically for the site and the libraries (libraries which are reusable)? I'm thinking the training would between 3 and 6 hours, depending on how much the developer's skill level. Here are my difficulties in coming up with the rate:   * We're going to be loosing 10s of thousands of dollars by not having the client and project any more (not to mention future opportunities). So in part, I'd like to replace some of this income through training.   * I'm essentially training someone to do what we do and giving them the opportunity to compete against us. They are a reasonably large company that has the possibility of competing against our company directly, although it's not likely our 2 companies will be direct competition.   * We've spent years learning the libraries (50% external and 50% ours) and the technology behind them (which we haven't been paid for directly).   * I'm not sure what the going rate for training is the area, specifically for 1-on-1 training.   * I want to do the right thing because there is a slight possibility of affecting other business relationships. My first thought was to to charge something around 5 times the rate we're charging them currently, but I have a feeling they'll think this is high. (We're not terribly concerned with getting the contract to do the training, but it would be a unique opportunity where we could learn as well.) Thanks for your suggestions and ideas. I know this is a bit of a subjective question, but I'm just looking for suggestions or something I'm not thinking of.


Is it wrong not to create Javadoc for my code?

I do a lot of Java programming at my work (I'm an intern) and I was wondering if it is generally a rule to create javadoc to accompany my code. I usually document every method and class anyways, but I find it hard to adhere to Javadoc's syntax (writing down the variables and the output so that the parser can generate html). I've looked at a lot of C programming and even C++ and I like the way they are commented. Is it wrong not to supply javadoc with my code?


Why hasn't Caja been popular?

Google released Caja around 2008(Capability JavaScript). It is still mainly a laboratory language. But XSS and other attacks would be prevented if there was widespread integration of Caja.


How and when to use UNIT testing properly

I am an iOS developer. I have read about unit testing and how it is used to test specific pieces of your code. A very quick example has to do with processing JSON data onto a database. The unit test reads a file from the project bundle and executes the method that is in charge of processing JSON data. But I dont get how this is different from actually running the app and testing with the server. So my question might be a bit general, but I honestly dont understand the proper use of unit testing, or even how it is useful; I hope the experienced programmers that surf around StackOverflow can help me. Any help is very much appreciated!


How many user stories per person should be completed per sprint?

Just ran across this figure, and wondering if there's another well know source than would help confirm these numbers: > Based on data I analyzed on successfully finished sprints, I determined that > a team should average around 1 to 1-1/2 user stories (product backlog items > of any sort, really) per person per sprint. SOURCE: Mike Cohn's Blog on "Should the Daily Standup Be Person-by-Person or Story-by-Story?"


Responsive Design vs. Separate applications/views

I'm involved in a project for a redesign of an existing site. The Designer Team delivered us -the Engineering Team- four separate HTML/CSS prototypes of how the site should look:   * On a Desktop Browser.   * On a Table Device, a similar but simplified design of the Desktop View   * A High-Tech Smartphone, the design is mobile-app like and very different from the Desktop and Tablet designs. Also, less content is shown there.   * A Low-End Smartphone, a simplified version of the precedent design but still very similar. My first impulse was build one HTML/CSS prototype using Responsive Web Design, and merge the prototypes made by the Design Team, but now i'm having some concerns:   * Merging disparate prototypes might produce low-quality code.   * We might be sending code/files to some mobile devices that they don't need.   * We need to handle the situation where -for example- some option must be present in Tablets but must be hidden in Smartphone. Using CSS to hide can be bandwidth waste, so maybe there's a need of some server side code. Because of that, the idea of building two different Web Applications -or even better, handle two Views in a same web application using some server side Framework like Spring Mobile\- was being considered. I am not an expert on Responsive Design, so I wan't to know what's the best approach is this situation or the standard way to tackle this problem. **PS:** If it's worth saying, I'm building a Portal using WebSphere Portal as Portlet Container and building the Portlets using Spring Portlet MVC.


Create an automated program to check a site every day

Is it possible to create an automated program that will visit a web page every day? I'd like to make it run in the background (preferably non-visibly) when my computer loads and I have internet connection and navigate to a specific web page. I would think it would be pretty simple, but I'm not sure what language I'd use or what means to do it. Is it possible and by what means could I do it? **Edit based off of comments below** The only functionality the program would need to have is to 1. check to see if it's logged in and 2. log in if it's not. I'd only be using Windows. I'm interested in using existing programs or creating a program myself (for the experience). I'm a noob when it comes to using OSes and machine-based programming (I'm a web guy). Essentially I just thought it'd be a cool thing to create and good practice to learn more OS/offline programming Added thought: I'd also like to make sure it runs once per day, when it turns on (if it was off) or at a specific time if it's been on, but somehow check to see if it's been ran earlier in the day sometime


Is a Factory class still a Factory class if the objects it returns already exist?

I can't decide what to name my class. So far I've labelled it up as a Factory, but I am not sure. Here is the class. As you can see, it exists to return a concrete type of an Interface (`ResolveRegistrationIssue`) based on the argument supplied to the getter method (`ResolutionFamilyEnum`):               @SuppressWarnings("serial")     @ManagedBean(name = "resolveIssuesFactory")     @ViewScoped     public class ResolveIssuesFactory implements Serializable {              @ManagedProperty(value = "#{resolvePrimaryIssuesFactory}")         private ResolvePrimaryIssuesBean resolvePrimaryIssuesBean;              @ManagedProperty(value = "#{resolveSecondaryIssuesBean }")         private ResolveSecondaryIssuesBean resolveSecondaryIssuesBean ;              @ManagedProperty(value = "#{resolveTertaryIssuesBean }")         private ResolveTertaryIssuesBean resolveTertaryIssuesBean ;              public ResolveRegistrationIssue getResolutionBean(                 ResolutionFamilyEnum familyEnum) {                  //null safety             if(null ==familyEnum) {                 throw new IllegalArgumentException("The family which determines the Resolution Bean to be used may not be null.");             }                  if (familyEnum.equals(ResolutionFamilyEnum .PRIMARY)) {                 return resolvePrimaryIssuesBean;             } else if (familyEnum.equals(ResolutionFamilyEnum .SECONDARY)) {                 return resolveSecondaryIssuesBean;             } else if (familyEnum.equals(ResolutionFamilyEnum .TERTERY)) {                 return resolveTertaryIssuesBean;                         } else {                 throw new IllegalArgumentException("Could not determine the correct Resolution Issue bean for the provided family.");             }         }      Now, I understand that a Factory class accepts arguments which define the entity to be **developed** and then **delivered** (returned). However in my case, my entities are already developed, as they are EJB references. Thus this method only delivers them. So is this still a Factory?


How can I "inspect" C++ code?

For reference, I am a JavaScript developer learning C++. The browser is a pretty powerful debugger, and I can easily place a breakpoint in my code, hover over a variable or expression and get the value of that expression. Is this even possible in C++ or am I in a different world entirely? I'm starting to write a bit of C++ code for an online course, and debugging with Code::Blocks gives me very opaque information. For example, I see stuff like this: `0x8049bc3 push ebp` in the 'watches' window. Even if I write something like `int foo = 3;`, I have found no way of telling that `foo` is 3 while I'm stepping through my code. Am I missing something?


License issue of Spring Data Neo4j?

If I use Spring Data Neo4j to develop a software, and I want to publish it for commercial use with charging, does there exist any license issue? I survey many posts about the license issue of Neo4j and Spring Data Neo4j. It seems Neo4j has two versions, community and enterprise, respectively. The Community version is GPL-3.0, and the enterprise version is AGPL-3.0. Spring Data Neo4j is Apache License-2.0. The role of spring data neo4j in my software: 1.It is only part of my software to deal with storing relationship and searching data. 2.I will combine it with MongoDB or DB2.


C++ Web Development for REST API

I've been a C# developer for long time, focused on ASP MVC the most. Two years ago, basiclly due to the lower costs and ease of deployment/management I began to migrate my projects to linux using Node.js for serving HTML and Mono for all the backend operations. They talk to each other using HTTP REST API. As my skills in Linux have improved more and more I find this Node.js/Mono combination kind of weird. Mono is a great thing but there are issues now and then, more related to the implementation itself than the language. Now I have like three weeks available in between projects and I would like to dive into C++ as my backend. I have tried some Python and I really liked it, but I require fastest responses, that's why C++ came to me. Java is not an option, because although the language itself is pretty close to C#, it has a bunch of stuff I really wouldn't like to bother with (Maven to name one) and at the end of the day, that would decrease my productivity, at least while I become more proefficient on Java (just configuring Eclipse for a Jersey tutorial took me like 2 hours!). I really don't need anything fancy, since all that node.js does for me is serving html/css/javascript, some real time notifications (socket.io) and that's it. My backends are more reading from tables, complex SQL transformation and validation of the data the client sends. The template engine I use is Jade which is cool since I type less, but I wouldn't mind to switch to plain HTML. 99% of the job in my projects is done using Angular.js via JSON calls. Most of them are single page applications with lots of logic on the client and consuming REST API's. I really would like to cut all Mono/.NET dependencies and develop on something more native to Linux. At the same time I would like to say goodbye to Node.js as well in trade for one backend to serve my API and static HTML pages. If you have been here before, please let me know what are the current choices and anything that would help me on this experiment. Thanks a lot in advance for taking the time to read my concerns. EDIT: I forgot to mention I read about Casablanca project. It looks promising but again, it belongs to Microsoft under the covers of the white open source, just what I have been avoiding lately.


Is there any particular reason for the use of lists over queues in functional programming languages?

Most functional programming languages such as Scheme and Haskell use lists as their main data structure. Queues are identical to lists, except for the fact appending to the end - not to the begin - has constant time. Every algorithm that is written elegantly using lists with `head` and `tail` can be written elegantly using queues with `init` and `last`. Considering appending to the end is more common than the opposite, I'd guess queues are more natural than lists. Is there any reason lists have always been preferred?


Use of a profiler tool to aid in the analysis of a brute force algorithm in Java

I was asked to profile (using some tool, such as YourKit or JVisualVM) a couple of implementations of the Traveling Salesman Problem (find the minimum path that visits all the given set of cities), in the context of a Algorithms Analysis and Design graduate course. Taking in consideration the brute force approach of the algorithm, I'm wondering, though, how to best use the tools (for instance, JVisualVM) to analyze the spatial and temporal complexities of the algorithm. If I'm not in error the algorithm has spatial complexity of O(n), as it basically grows linearly with the number of cities, while it is O(n!) in temporal complexity. The math isn't the issue here. After playing for a bit with both the referred tools, I'm having some hard time understanding how can they be of any use to my problem. Sure I can see which methods are being used the most and which % of the time is being used in each one of them, and what is the actual memory footprint, so that can be all be regarded as hints where to optimize. But other than that, and other than seeing the % of the CPU which is actually being used (or IO accesses, which never occur in this program), I can't see how can I actually learn something about the algorithm with these tools than the math before referred didn't. What should be my main concerns when using profilers to the analysis of algorithms? Also, I've put basic time recording capabilities embedded in my program. Maybe I could use the profiling tools to better do that job? Thanks


Is there a resource for beginning programming student misconceptions?

Many programmers tasked to teach a beginning programming class have forgotten a lot of the things that they didn't know or wouldn't know back before they learned how to program themselves. And there are lots of ways to not understand a topic. But some seem to pop up very often among students, no matter what common beginning programming language or textbook is used. An answer to this question lists several misconceptions or lack of conceptions that seem to occur more when teaching programming to people who have zero programming background: What is the best way to teach beginners? (such as confusion about the difference between the environment when a program is written and when it is run, that (basic block) program code executes sequentially, the difference between a variable and its contents, etc.) Another example are the questions from new programmers who simply assume that ordinary variables (in C, Python, etc.) can exactly represent common fractions (1/100ths). Is there an online list or book that covers these concepts, that have to be taught above and beyond the syntax and semantics of the chosen programming language and IDE?


Designing storage service data structure for decoupled models sharing same data

Surely most of you remember the Norton Commander application where similar (sometimes the same) data is displayed in separate decoupled views. I'm building a web application that follows the same principle. The amount of data is too big to be fetched/displayed entirely on the page, and potentially overlapping subsets of data need to be displayed in separate views. My architecture looks like this: > >                                ┌──────── EventBus ────────┐ >                                │             │            │ >                                │      StorageService      │ >                                │       ╱          ╲       │ >                          PresenterLeft┤            ├PresenterRight >                             ╱     ╲    ╲          ╱    ╱      ╲ >                       ViewLeft   ModelLeft      ModelRight   ViewRight >   The application creates both presenters and passes them the instance of EventBus and StorageService. The presenters, in their turn, create their respective models and views. The StorageService is passed down to models. The communication between presenters is done via the EventBus. In this scenario the left side has no awareness of the right side, yet models should possess the same information without a need to do a double round trip to the server. To achieve this I use the StorageService. Models implement the `model.fetch()` method which asks the storage for data. If the same data was previously requested, the storage will simply return it acting like an in-memory cache. Here comes the actual question. **In the above context, how to design a data structure for a _network-wise efficient_ storage service for the following use case:**   1. Left model requests `GET /files?limit=100`   2. Right model requests `GET /files?limit=110` (but actually I only need the last 10) My attempted approach was:   * store the requests made by models   * for every additional request, do my best to figure out the request diff   * do the diff request (e.g. `GET /files?offset=100&limit=10`)   * store the fetched items under `{"files": {"id1": item1, ..., "id110": item110}}` Unfortunately the above steps don't help, because there's no relation between the url and the ids. When a model requests the next set of values, I never know if they are actually in the in-memory cache. Of course, I could use the per-url in-memory caching strategy, but then I would have duplicate entries in the cache, which is something I'd like to avoid. What are your thoughts? I feel like I'm reinventing the wheel here. Is there a better/simpler/commonly-accepted method? Perhaps my architecture is flawed...


Bug once in a while, but high priority

I am working on a CNC (computer numerical control) project which cuts shapes into metal with help of laser. Now my problem is once in a while (1-2 times in 20 odd days) the cutting goes wrong or not according to what is set. But this causes loss so the client is not very happy about it. I tried to find out the the cause of it by   1. Including log files    2. Debugging   3. Repeating the same environment. But it wont repeat. A pause and continue operation will again make it to run smoothly without the bug reappearing. How do I tackle this issue? Should I state it as a Hardware Problem?


Multiple var statements in JavaScript

Writing a single var declaration per function is considered to be good for readability and maintainability. But, when I went through some of standard libraries, their dev version doesn't strictly follow this. For example, Underscore code has multiple var statements in many function which are spread randomly and declared as required. Is there any reason to not to follow the single-var-rule?


Question about the no-endorsment clause on the BSD license

I'm developing a non-free library and I want to use Bcrypt.Net in it. The clause in question:   * Neither the name of BCrypt.Net nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. To what extent does this mean I can't use the name of Bcrypt.Net? For instance, could I say "the only ASP.Net authentication library capable of using Bcrypt" or can I even include "supports Bcrypt for password hashing" in promotional materials? Note: I do not actually modify any of Bcrypt.Net's code


Where to put comments, class declaration or constructor?

For a given class, where should the comments about the purpose of the class go?               /// <summary>     ///       <----------------- describe the class here (1)?     /// </summary>     public class Message     {       ...       //class members here       ...       /// <summary>       ///      <--------------- or here (2)?       /// </summary>       public Message()       {       }     }      If I go with the first option, the purpose of the class is very easy to find when I open the file, it's in the same place, on approximately the same line. When you have lots of classes, this is easier for the eyes. You don't have to scroll down past the members to find the constructor If I go with the second option, I get Intellisense when creating an object of the class, stating it's purpose and explaining the parameters, which is very nice. From what I can tell, I can't get both advantages by using just one method. The only solution I can think of is putting the same comment in both places, but that's just duplicate information and I don't like it.


Can Scala be considered a functional superset of Java?

Apart from the differences in syntax, can Scala be considered a superset of Java that adds the functional paradigm to the object-oriented paradigm? Or are there any major features in Java for which there is no direct Scala equivalent? With major features I mean program constructs that would force me to heavily rewrite / restructure my code, e.g., if I had to port a Java program to Scala. Or can I expect that, given a Java program, I can port it to Scala almost line-by-line?


How should one prepare to allow others to add languages?

Seeing as many, many open source products are offering translations in multiple languages, I decided I may want to design my application around this requirement. I currently have a niche application that has positive reviews - In English. If I wanted to expand the audience to allow users who speak other languages in, I need to find translators who also program. That's not what this question is about. What technique is standard for allowing Joe Developer who speaks English and French, to add in the French language for all the text, and how should I allow them to submit the changes? Is a separate text/language file the way to go?


If someone was making software, able to display content in any written language, what would they have to consider?

I know you'd have to use Unicode. And that Japanese is read vertically and reverse of English. What are some of the things one would have to take into consideration?


Scrum meeting - dealing with the last question

In the 5/15 minute scrum meeting the 3 questions are asked. For the last question "what impediments are getting in your way" If a dev has problems - the xyz is going to have problems, this is likely going to draw the meeting out past 15 mins and could go into a hour long discussion. Is it the scrum masters job to help this user, is there something to stop this from going on more than 15 mins. Thoughts?


Difference between complexity and performance guarantee

I'm a bit confused with the performance guarantee and complexity of selection sort. I checked through internet and the complexity of selection sort is O(n^2). This O(n^2) is in terms of time complexity, am i right? So how about performance guarantee? Is the performance guarantee in my case measured in terms of swapping or in time complexity as well? If the performance guarantee is in terms of swapping, so best case of swapping is zero swaps (the array is already sorted) and the worst case of swapping is n-1 step? The performance guarantee is then equal to (n-1)/0=undefined, am I correct? Please correct me if im wrong...or is the performance guarantee is in terms of running time? Then performance guarantee will be (n-1)/(n-1) = 1? Can someone please clear my doubts?


Is Business Intelligence (BI) the Right Job Title?

There is a department at my company called Business Intelligence (BI). They mostly build reports and configure SSRS, SSIS and related Microsoft technologies. Most of them barely understand SQL (even though they work with databases all day long) and fewer know anything about writing software. At other companies, BI had very little to do with IT. I am curious if my current company is simply mislabeling/misunderstanding what these folks do. Or is this what BI is really all about? If they aren't true BI, does anyone know what the proper name for their position is? It will be helpful when trying to hire new people so we don't end up wasting their time.


Should entities be accessible from all layers of an application?

I am googling this issue now for weeks, but cannot find a good discussion. It boils down to this: As POCO entities used in a dbContext are in fact a definition of the database, shouldn't they be constrained to the Data Access Layer and not be visible outside it? On the other hand: it is convenient to hide some POCO entities in the ViewModels. so that changed properties can be passed back easily to the Data Access Layer. I find many examples of Entities that make their way into the user interface, but also many examples of where AutoMapper is used to map the properties of a ViewModel to an Entity. Can someone point me to some good working examples or discussions that could help me make a well informed choice?


When is it worthwhile to replace working mature code with frameworks+patterns

I fear that frameworks in many cases have become a fashion or trend and are being abused. In many ways people are sacrificing speed just because they want to keep up with every single lib that comes out. I am for a more conservative approach that only makes use of new libraries and frameworks when it absolutely makes sense. Related: When NOT to use a framework **Case** We have a Tomcat6 Servlet production that has been ongoing development since 2008 and there are many hours of work behind it. The code is very mature but it does not use any frameworks. A new team member loves using frameworks and patterns for everything. Except for the love of frameworks, they also love cutting edge new releases and even proposed migrating from Tomcat6 to somethiong newer (JBOSS,GLASSFISH, or TOMCAT8). I would never move a core production service to a container/server/web-server that just came out. Not against refactoring code to keep it clean though! I am against adding frameworks and patterns that add delay to production code servicing thousands of requests per second. **Serialization to stream (JSON/XML) while maintaining backwards compatibility** When a request comes, we produce both XML and JSON documents containing data related to the request params. Since we maintain backwards compatibility for older clients changes must not break older support. Since we also support both JSON and XML, we make use of the Jackson but also KXML libraries. For both formats we have 2 different serialization methods that use the **streaming API**. Except for being faster, I also find it is MUCH more flexible for maintaining backwards compatibility. I like to use a sysyem of Major and Minor version. All minor changes to the backend that cause changes to the serialized document I add with IF statements in the serialization method. Once quite a few changes have accomulated (over 1 year), we add a new serialization method. So, all requests specifying version=1.00 to 1.99 are sent to serializeJSON1. All requests using version 2 to 2.99 are sent to serializeJSON2. I've heard the argument that we should use ANNOTATIONS and MAP to objects. I find this very distastefull as I have read streaming is the fastest. The streaming API allows you to make necessary changes on the fly while MAPPING would require to store multiple versions of the same data as different objects, or jump through other hoops.                output.startTag(null, TagTable.PRODUCT);           output.startTag(null, TagTable.ID);      output.text(ID);      output.endTag(null, TagTable.ID);           output.startTag(null, TagTable.DESCRIPTION);           if (locale != null && Translations.containsKey(locale) && version >= 1)          output.text(this.DescriptionURL + "/" + locale);      else          output.text(this.DescriptionURL);           output.endTag(null, TagTable.LONGDESCRIPTION);           if (version >= 1 && version < 1.5) {          output.startTag(null, TagTable.POPULARITY);          output.text(String.valueOf((int) this.pop));          output.endTag(null, TagTable.POPULARITY);      } else if (version >= 1.5) {          output.startTag(null, TagTable.RATING);          output.text(String.valueOf((int) this.rating));          output.endTag(null, TagTable.RATING);      }      In the specific 3 cases above I really don't see the point to replace working mature code with frameworks/libs/patterns that may add additional overhead and cost additional development time. So, when is it worthwhile to replace working mature code with frameworks+patterns?? Comments? **Update: Some benchmarks** For the first two examples posted previously, using REST and HASHMAPs does not make overly that big a difference in performance but does make the code more readable. Now for the more interesting issue about serialization when used in a hotspot. Since the actual servlet in question had too much other code I made a toy example to test streaming vs mapping. The code is available at: http://stackoverflow.com/questions/21781540/ By all means test it, change it, run it. What is very interesting is that the Just in time optimizer in java ends up making the difference negligable over time. So, here is how the percentage between mapping and streaming changes the more iterations there are.               Iter    Stream  Mapping     0       36,71%  63,29%     20      44,75%  55,25%     40      45,65%  54,35%     60      45,95%  54,05%     80      46,24%  53,76%     100     47,09%  52,91%     120     47,09%  52,91%     140     47,37%  52,63%     160     47,64%  52,36%     180     47,92%  52,08%     200     47,64%  52,36%     220     47,92%  52,08%     240     47,92%  52,08%     260     47,92%  52,08%     280     48,19%  51,81%     300     48,45%  51,55%     320     48,45%  51,55%     340     48,45%  51,55%     360     48,45%  51,55%     380     48,45%  51,55%     400     48,45%  51,55%     1000    48,72%  51,28%     2000    49,24%  50,76%     3000    49,24%  50,76%     4000    49,49%  50,51%     5000    49,75%  50,25%     6000    49,75%  50,25%     7000    49,75%  50,25%     8000    49,75%  50,25%     9000    49,75%  50,25%      I also re-ran one more time have first 20 iterations more detailed:               0   39,76%  60,24%     1   41,18%  58,82%     2   40,83%  59,17%     3   40,12%  59,88%     4   40,48%  59,52%     5   40,83%  59,17%     6   40,83%  59,17%     7   40,83%  59,17%     8   40,48%  59,52%     9   40,12%  59,88%     10  41,52%  58,48%     11  42,53%  57,47%     12  42,86%  57,14%     13  42,86%  57,14%     14  43,18%  56,82%     15  43,50%  56,50%     16  43,50%  56,50%     17  43,82%  56,18%     18  43,82%  56,18%     19  43,82%  56,18%     20  44,75%  55,25%      After 10,000 iterations (or calling JSON generation code 1000 times) here is the screenshot from VisualVM profiling (visualVM snapshot NPS file): ![enter image description here](http://i.stack.imgur.com/gjl61.png) So, if this optimization behavior holds up in Tomcat servlets as well, it means there really is **no point NOT to use mapping** (and many other convenience functions/libs since the JVN will optimize over time). **Conclusions** Based on the answers/comments, I think at the end of the day whether to rewrite working production code is affected by business requirement, and specific cost-benefit analysis for each project. Based on the benchmarking, it turns out avoiding some libs/frameworks may make no difference in the long run due to JIT JVM optimizations. **Update: After leaving code running all night** ![enter image description here](http://i.stack.imgur.com/7ESGK.png) After 275,137 iterations and approximately 30,000 MS:               Mapping -   19,80%     Streaming -  80,20%      I really wonder what JIT optimizations happen here and whether the behavior holds for a servlet.


enum for Java reference types

I need a simple `enum` declaring the Java reference types, as:               public enum ReferenceType {         STRONG, SOFT, WEAK, PHANTOM;     }      Does such `enum` exist somewhere in the Java API or a general utility library such as Guava ? I have not been able to find it in either place, although I found third party projects that declare it (e.g. google-guice: RefrenceType). I just try to avoid polluting my project with silly classes/enums that may exist somewhere else. **UPDATE** I found that Guava in fact used to have this, but they dropped it: http://tinyurl.com/ndaqpet


DB Design: How to link a single column to a collection of entities

I have a db design question that I am sure has been quite extensively covered but I cannot find a good answer already. The problem is how to efficiently link a single school course to a collection of textbooks, a course may have 0 books and it may have 10. The problem here is that multiple courses can use the same textbook as well. My first thought was to include the textbook tables PK as a FK in the courses table. Then the courses table has a composite PK of course id and textbook id. The problem with this approach is that the courses table could potentially have a lot of columns, and then I am repeating the entire course row for every textbook addition, in addition to having to set a fake textbook_id for courses that do not have a textbook. **courses**   * course_id   * course_name   * FK textbook_id   * PK(course_id, textbook_id) **textbook**   * textbook_id   * textbook_name  My next thought was to have a table that has 10 columns for textbooks, that I use for linking a course to all the textbooks. But, I'm not sure if there is a better approach (this will end up using less space), when I think about this I think why not have textbook1, textbook2 columns in the courses table in the first place. **courses**   * PK course_id   * course_name   * FK textbooks_ids **course_textbook**   * FK course_id   * FK textbook_1   * FK textbook_2   * FK textbook_3   * FK textbook_4 **textbook**   * isbn   * textbook_name A bit of background as well, using MySql, Hibernate ORM, and writing a separate search indexer. Anyone have any suggestions on a better approach or thoughts on which of these two approaches is better? Thanks in advance for the help


How to end my dependency on .NET?

I have been developing Windows GUI applications since many years and jumped into .NET in early 2005. .NET is a undoubtedly a remarkable platform and I am still using it, but with a variety of technologies out there, I don't want to remain dedicated to this camp. I want to learn new languages with which I can develop GUI applications. I am learning Ruby and just installed Python. I read about WxRuby, a framework for developing Windows GUI app. in Ruby. I am searching for a similar framework for Python. Apart from that I want to know which language is more suitable for a production-level GUI app. I doubt that Ruby is more focused on Web platform with it's glamor, Ruby on Rails. I know that I may not get those rich .NET classes and that impressive Visual Studio IDE, but still I want to follow the road less traveled. I don't want to go with IronPython and IronRuby, however sometime later, I may dip hands to explore them.


Why do Git users say that Subversion does not have all the source code locally?

I'm only going on what I've read on SO, so forgive me, but all I read says that one major advantage of Git over Subversion is that Git gives all the source code to the developer locally, not having to do anything on the server. With my limited using of SVN and TortoiseSVN, I had all the source code, or at least I thought I did. For example, I have a website. I upload it to SVN. I am still running my website locally, aren't I? If someone submits a change and I'm not connected, it wouldn't matter if I had Git or not, until I reconnect to the server. I do not understand. I'm not asking for a rehash of one vs. the other except this one point.


"Sensitive Data" clause in Bitbucket's Customer Agreement

I'm using Bitbucket for a few projects, but as of April 28, 2014 they will replace their End User Agreement with a new Customer Agreement. The new agreement mentions in 7.7.2: " _You will not submit to the Hosted Services ... any personally identifiable information_ " One of my projects clearly contains such information, and I'm now trying to figure out what to do. These are the three possible options I could come up with:   1. I may keep all existing projects and continue to work with them, as long as no new patch involves sensitive data. This is under the assumption that what I have done so far has been in accordance with the current agreement, and that the new agreement only concerns information submitted after April 28.   2. I have to remove that particular project, but may keep the others. This seems likely if 7.4 in the new agreement means that any data that have been submitted to the "Hosted Services" will be treated equally, regardless of under which agreement it was submitted: _" **Your Data** " means any data, content, code, video, images or other materials of any type that you upload, submit or otherwise transmit to or through Hosted Services._   3. I have to terminate the agreement, and thus remove my account and all of my projects. This is a possible interpretation if the continuation of 7.4, about the company's right to _"collect, use, copy, store, transmit, modify and create derivative works of Your Data"_ , means that they can still do whatever they want, even with data that were submitted under the terms of an older agreement and have since then been removed.


Who has right over the code that comes from contributions in an open source project?

If somebody starts an open source project (for example with a GPL license) where people will make contributions, than who will own these contributions in the level of the whole project? Will the new code become the property of the original author or the contributors will be authors too? Who has the right over the ongoing project? For example who has the power to release the code in a second license? The original author only? Can the contributors separately do that as well, or do they have to make a joint decision with the original author and all of the contributors?


Copyright Laws for Apps

For my app that I'm about to release, I have used a bunch of 3rd party classes found for free online. I checked all the liscenses before using the code and each one said I could use the code commercially So now what I'm concerned about is do I have to give credit somewhere in my app to the creater of that class? Also, I plan on having my app be free, but if in the future I charge for it, does that change things? The most common license I see in an MIT License: > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to > deal in the Software without restriction, including without limitation the > rights to use, copy, modify, merge, publish, distribute, sublicense, and/or > sell copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: The above copyright > notice and this permission notice shall be included in all copies or > substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", > WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED > TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE > LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF > CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE > SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The part I'm unsure about is: > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. Is it enough for this license to be at the top of the class file embedded in the binary, or do I have to make it literally accessible to the user? Of course I'm not asking for expert legal advice, but any help would be appreciated.


ASP vs javascript vs jQuery vs User Controls vs AJAX

Increasingly when developing sites I find myself utilising more client side technologies such as Javascript, jQuery and AJAX. For three different pages I measured the size of the HTML sent to the browser (excluding images and CSS). What I found was:   * A page that has normal ASP.NET controls + a little bit of jQuery: approx. size = 30kb    * A page using some user controls that have AJAX and client side support: approx size = 50kb   * A page that uses more complex user controls from a library with heavy client side support: approx. size = 110kb  As you can see the size of data transferred seems to increase as client side support and AJAX features are added. This adds to the bandwidth requirements of the site and presumably the servers I/O load which may reduce the number of concurrent users that can be served. Should I worry about balancing rich client side features and interactivity with server's load and bandwidth use? What are the priorities, if any?


Should HTTP Verbs Be Used Semantically?

If I'm making a web application which integrates with a server-side backend, would it be considered best practice to use HTTP methods semantically? That is, for example, if I'm fetching data (e.g., to populate a menu, etc.), I would use GET, but to update data (e.g., save a record), I would use POST. (I realise there are other methods that may be even more appropriate, but we need to consider browser support.) I can see the benefits of this in the sense that it's effectively a RESTful API, but at a slightly increased development cost. In my previous projects, I've POST'd everything: Is it worth switching to a RESTful mindset simply for the sake of best practice?


Why additional code and complexity when data model and interaction are simple is considered a disadvantage in MVC model

According to the slides given by my lecturer, one of the disadvantages of MVC model is > additional code and complexity when data model and interaction are simple Why is this so, I would assume it would make no difference since data model and interaction are on two different components of the MVC model?


Frameworks/methodologies for documenting functional/use case scenarios and mapping them to code base

Is there an established framework or methodology for documenting functional or use cases and mapping them to units of code? E.g. assume you are a new developer hire assigned to work on an application. What better way to get up to speed would there be than going through a list of that application's features or functional case scenarios, i.e. what all you can do with the application? For example, let's take Evernote (my favorite SaaS) as an example:   1. Successfully log in (duuhh, but still technically a use case)   2. Fail to log in (what happens next)   3. Create some notebooks   4. Create a basic, text only note   5. Move the note from one notebook to another   6. Create a note with media attached   7. Delete a note   8. Share a note publicly through a fixed URL etc. Now, that is simple. But what I would like to be able to do is have a way to map each one of those items to the pieces of code that utilize it. That way, when inspecting or learning or reverse engineering the code base, you could (provided that the documentation is up to date) easily trace a function, method, script, HTML document, REST service, servlet etc. to all the functional cases that utilize it and are affected by it.


Will we go back(?) to fixed-point arithmetic in the near future?

As far as I recall, this has been the ongoing trend of the past, I'm just a student, so I might be wrong:   * Long ago: Integer numbers and calculations. Very precise, however cannot present a big range.   * At a later point: Added single-precision floating point numbers (`floats`), and also added FPU's which are incredibly fast at calculating with them.   * Quite recently(?): Double-precision floating point numbers (`doubles`) are starting to become more common. For example in OpenGL Shader Language they are steadily introducing more and more methods that work with doubles natively. I think they are also working on FPU's for doubles? But also there has been a change to 64-bit processing a few years ago, so I've got a few questions:   * Are there more options now to calculate with fixed-point numbers (maybe two int64 registers?)?   * Why are there, as far as I know, no specific units for fast integer calculation with respect to fixed-point numbers? Maybe most of what I'm saying does not make much sense, but I think the question remains valid. Is there a switch we switch to fixed-point arithmetic in the near future?


New Silverlight app. MVVM. RIA Services vs CSLA

Another 2 days of reading and watching demos and here we go. For my enterprise LoB Silverlight app I'm going to use:   1. Prism for UI aspects and modularity.   2. MVVM pattern (using Prism)   3. ??? to bring data over and validations...   4. Entity Framework for Data access   5. SQL Server for data Ok, main dilemma is #3. If I won't use any framework then I will have to figure out how to do all CRUD stuff myself. I can do RESTful WCF, I can do SOAP. All that == MANUAL coding. I can do RIA Services. I kind of see what it does and it is nice for direct match with my data layer BUT it is not that great if there will be lot of business logic. Where would I put it? In my ViewModel? Another question is how those services maintained. Once I generated it - I should maintain them by hand if data changes? I also found CSLA which seems to be nice on one hand but receives lot's of critique.. CSLA will allow me to write business logic and shape object as I needed and than I can pass it "through" ViewModel and all is well. Something tells me that RIA Services will be much quicker to write. Also, I like the fact that I don't have to include extra dependencies. There is no blogs or mentioning of RIA Services since 2010. Is it going under table? Not widely accepted? Not scaling well for big apps? I'm trying to decide which one I need to bet on. CSLA or RIA Services. OR?


Price Comparison Database Scema

I have a bunch of data from multiple retailers. Each product that each retailer sells may or may not be sold by another retailer in the database. If multiple retailers sell the same product, then the product can be identified by a SKU. I currently have 1 database for each retailer. I'm having a problem trying to conceptualize an appropriate database schema to identify how many retailers are selling the same product. Should I have 1 table with all retailers?


Crucial programming-for-hire contract points?

**What are some important and easily-overlooked points that should be in a programming-for-hire contract?** We recently had a learning experience as a client hiring a programming company: in the contract we signed, there was no mention of billing practices such as   * Minimum billable unit. A 5 minute phone call was billed as 1 hour.   * Division of work. If two contractors at the company worked on something in the same day they had their hours billed _and rounded up_ separately.   * What kinds of things were billable. We were billed for them to "install Visio" even though we'd asked them to use it on our VPN-accessible terminal server). We prefer learning from _other_ people's experiences rather than our own, thus hope to get the community's ideas about other important points we might be missing. I am interested in both sides of the coin as I have been and will again be a contract programmer myself, even though at this time I'm thinking of it more for my company's hiring needs. So points important for both the client and the contractor are welcome.


Self taught programmer seeking advice

I need some general advice on how to continue my programming studies. I'm a self taught programmer and I picked up programming somewhere in the fall of 2011. I began with C++ and Java books and I learned everything up to OOP (except memory handling in c++). I later decided that I wanted to work with web-development so I learned the PHP syntax and started my first project in the summer that resulted in http://doostr.com (obviously work in progress) The main reason why I started the project was that I would be forced to solve different kind of problems that I knew I would face along the way. I learned about relational databases and designed my own tables in MySQL (third normalization form), learned SQL logic and functions, became more fluent in programming by extensively utilizing basic programming tools (variables, loops, arrays, functions, classes), PHP native functions, MVC, Javascript (jQuery library) and the basics of CSS/HTML. I've used twitter-bootstrap as a base for design since I wanted to speed up the design and focus on programming. Now I feel like I'm just iterating through things that I've learned before. I feel like I need to come in contact with more experienced programmers in a professional developing environment that I can learn more from so I'm preparing myself for applying for a backend programmer trainee job (unpaid) and use my project as a resumé (I dont have a computer science degree). I need some general advice from working professionals on how I not only should prepare myself considering what I want to work with, but also how I should continue my programming/developer path generally. I've asked a friend that works with java and he said that I should find a good design patterns books. You guys have any good suggestions? Any other language that would be good to combine with PHP/MySQL? I know Java/C++ syntax. I'll take any advice you might have. You can go to my site, create an account and test the functionality and it might give you a hint of what I'm capable of. Thanks for reading.


Expensive AOT Optimizations

I've seen it stated several times that AOT can run some more expensive optimizations that take too long to be used by a JIT. But I've never seen it stated what exactly these optimizations are. So I'm wondering, what are these optimizations?


Fastest Haskell library sort implementation

I am implementing an application in Haskell and, for sorting, I use the library function `Data.List.sort`. However, I was wondering whether this is the fastest sort implementation in the Haskell standard library (perhaps lists are not the best choice for efficient sorting). I have found different alternatives, e.g. heap sort on arrays, sort on sequences (but the documentation does not say what kind of algorithm is used). My question is: what is the fastest sorting implementation (container type + sort function) provided by the Haskell standard library? Is there some documentation page listing all library sort functions and comparing them wrt performance? **EDIT** To provide some more context, I am running a benchmark. I have written a simple program in C, Java, Python and Haskell that   1. Reads 1000000 strings (lines) from a text file.   2. Sorts the strings using a built-in (library) sorting algorithm.   3. Writes the sorted list of strings to a file. For each implementation, I only measure the sorting time (leaving out the time needed for disk IO). Running the benchmark on Ubuntu 12.04, I get   * C (gcc 4.6.3, `qsort` on `char **`): 0.890 s   * Java (OpenJDK 64-Bit 1.7.0_09, `Collections.sort()` on `java.util.LinkedList<String>`): 1.307 s   * Python (Python 2.7.3, `list.sort()`): 1.072 s   * Haskell (GHC 7.4.1, `Data.List.sort` on `[Data.ByteString.UTF8.ByteString]`): 11.864 s So I wonder if there is another data type / library function in Haskell that can give better performance.


Using MVC in a Java app

I need to write a cross-platform GUI application to process (in multiple threads) and visualize fairly large quantities of data. Ideally the application should be relatively fast and look good. The app's interface will consist of a table widget, a tree widget, and a custom figure-drawing widget. The user will be able to modify the data from any one of these widgets and the changes should be immediately reflected in the other widgets. Naturally, I am planning to use MVC. However, I normally do all my GUI programming in C++/Qt, and have very limited exposure to Java. So I would really appreciate any advice on how to organize such an app in Java. In particular, should I use Swing or JavaFX? Which widgets would you pick for the job? Could you recommend any books/online tutorials that cover these aspects of the Java platform? I will greatly appreciate any feedback. Thanks! (this question was originally posted on Stack Overflow, but this site was suggested as a more appropriate place to ask it)


Is it better to use $filehandler or FILEHANDLER?

It seems like FILEHANDLER is more commonly used as a handler naming convention than $filehandler. But it can give a bareword error if one forgets to use *FILEHANDLER in some constructions. What are advantages and disadvantages of HANDLERS and $handlers? Which naming convention is a better practise, and why?


C# server side application 100 GB dataset + Garbage Collection

If I have server with 256 Gb of ram. I was wondering can I create a C# application which has a 100 GB of memory footprint? I want to create a dictionary like               Dictionary<DateTime,Dictionary<string,Dictionary<string,DataClass>>                    Fist dictionary     DateTime - Max 40 distinct values          Second Dictionary     string : 2000 distinct values          Third dictionary     string : 100 distinct values      Object will be removed from the DateTime part (after every say 1 hour), till 1 hour, various internal members are populated. With Java I am told even if the server has large memory, JVM will stall because of GC.


Is PHP the only popular language that mixes simple and associative arrays into a single type?

I'm doing a research on PHP and wondering if there any other commonly used programming langues that use an associative array for both simple indexed element storage and key-value functionality. Does it make PHP unique in this sense? For example, a language like C# distinguishes clearly between a simple array and a map\dictionary\hash               T[] array = new T[];     Dictionary<T, S> map = new Dictionary<T, S>();      Meanwhile PHP makes no such distinction (at design time)               $array = array(1, 2, 3);     $map = array("one" => 1, "two" => 2, "three" => 3)


Has anyone attempted to create a system which uses e style capabilities in Javascript?

The object level capabilities that show up in E seem like an interesting addition to the Javascript language, especially considering the security issues that Javascript programs face. Has anyone tried implementing an object- capability type security system in Javascript, or by modifying a javascript VM?


Why did an interviewer ask me a question about people eating curry?

I had an interview question once which went... Interviewer: "Could you tell me how many people will eat curry for their dinner this evening" Me: "Er, sorry?" Interviewer: "Not the _actual_ number just an estimate" I actually started to stumble my way through it, when I stopped and questioned what it had to do with anything about the job. The interviewer mumbled something and moved on. I guess the question is, what is the point in the ridiculous questions? I just don't understand why they started coming up with these things.


A Programmers Version of Pygmalion

How long would it take and what resources would you need to train someone right out of high school and make them a 'technically' employable programmer? Granted they may not be mature enough to pass many inteviews, have the required time-based or domain experience.


How to build a team of people not working together?

I am in charge of a group of about 30 software development experts and architects. While these people are co-located in the companies organization chart, they do not really feel as a team. This is due to their work enviroment: 1) The people are spread over eight locations, with a max. distance of about 1000km (this is Europe). 2) The people don't work as team but instead get called as single people (and sometimes small groups) into projects for as long as the projects run. 3) Travelling is somewhat limited as this requires business reasons. Lot is done via phone. Do you have ideas or suggestions on how I could make these people feeling part of a joint organization where they support others and get supported by others. So that they get to know their peers, build a network, informally exchange information? So that they generally get the feeling of having common ground and derive motivation and job satisfaction?


Effectively Learning 3 Languages Simultaneously

So I have been developing with PHP for a year and a half now. Somewhere along those times, I decided to pick up skills in Python and Ruby, and learn ASP with C# just recently (as my first compiled language). Adding to that I'm a sucker for good CSS and Javascript coding. What I'm worried about is that this is a huge undertaking. Please don't tell me "you should focus on one language" right now because it's just that my damned brain is telling me to study the aforementioned languages and get up and running ASAP. I'm 21, and work at a small web dev company. They're not that strict so I can sneak some time learning Python and improving my PHP. At home I work with Ruby and C#. I have done the following to effectively manage my learning process:   1. Focus on web-only projects   2. Reuse my codes from PHP and convert rewrite them according to the language syntax (to Ruby, to Python)   3. Create an online blog to store some of my codes in case I need to get back to them later I know it's quite insane to juggle 4 server languages and 2 frontend languages at once but hey, I am having fun doing this. I'm not saying I want to master them immediately, because I know it takes years to master a single language. Have you done this before? How did you manage your learning process? Did you give up halfway and just focused on one?


How can I work on multiple programming languages at same time

It always happen to me that if I leave the stuff for 1-2 months I forget the stuff. 5 months back I had symfony project and I did that. At that time I was very much confident that I can do any project in symfony2. Then we got one Python project in django and I worked full time on that for few months. But now when I had to fix the error in symfony2, I completely forgot the structure and I keep mixing python stuff with php symfony. I want to know that how people work with different languages at same time. Should I need to keep studying all languages at same time so that I don't forget? I am confused what should I do. Or whenever I do some project then I keep notes of each and every step so that I can follow that later on how I did it?