title: Verify uniqueness of new content

text: I'm working on a review site, where there is a minor issue with _almost_ duplicate reviews across items. Just a few words are changed. It would be very nice to be able to uncover these duplicates before they are approved by a moderator, and I'm hoping someone could chime in on the best strategy to get there. The site is running Ruby on Rails on a Postgres database and using Thinking Sphinx for search (all on Heroku), and so far the best option I see is to be pulling all the reviews out of the db and using a module like amatch to compare the strings. Not very efficient, so in this case I guess I'll have to limit the number/age of reviews to scan for dupes. Anyone got a better idea?


title: Object Identity and Mutability

text: I was reading a proposal for value types in Java, and I came across this sentence: "Object identity serves only to support mutability, where an object’s state can be mutated but remains the same intrinsic object." From what I understand about object identity (though I'm likely wrong, in which case please correct me), it's the idea of your variable acting as a pointer or reference to an object located elsewhere in memory (usually on the heap, a la Java and C#). So what would this have to do with object mutability? Does this imply that for example, instantiated objects on the stack in C++ are immutable? I'm having trouble seeing the link here.


title: What's the best way to use requestAnimationFrame and fixed frame rates

text: I recently got into using the HTML5-`requestAnimationFrame`-API a lot on animation-heavy websites, especially after seeing the **Jank Busters** talk. This seems to work pretty well and really improve performance in many cases. Yet one question still persists for me: When wanting to use an animation that is _NOT_ entirely calculated (think spritesheets for example) you will have to aim for a fixed frame rate. Of course one could go back to use `setInterval` again, but maybe there are other ways to tackle this. The two ways I could think of using `requestAnimationFrame` with a fixed frame rate are:               var fps = 25; //frames per second          function animate(){             //actual drawing goes here        setTimeout(function(){           requestAnimationFrame(animate);        }, 1000 / fps)          }          animate();      or               var fps = 25; //frames per second          var lastExecution = new Date().getTime();          function animate(){              var now = new Date().getTime();              if ((now - lastExecution) > (1000 / fps)){             //do actual drawing             lastExecution = new Date().getTime();         }              requestAnimationFrame(animate);          }          animate();      Personally, I'd opt for the second option (the first one feels like cheating), yet it seems to be more **buggy** in certain situations. Is this approach really worth it (especially at low frame rates like 12.5)? Are there things to be improved? Is there another way to tackle this?


title: Sqlite3 slow on standard queries, is it expected?

text: Using Python and sqlite3. This simple print loop takes a few seconds to execute. I don't know much about databases, so I'm guessing I'm not using these queries correctly. Surely sqlite should be faster? The entire db has 5k or so rows and just a few columns if that matters.               con = lite.connect('gamelist.db')     with con:         cur = con.cursor()         cur.execute("SELECT * FROM GameList WHERE processed IS NULL LIMIT 4")         for i in range(0, 4):             print cur.fetchone()


title: Should controls on a form be prepared in a separate class?

text: I have a form with several controls on it. Every control has to be declared in the class, formatted in the constructor (-size, location, event subscription etc), and its event-handlers declared, again, in the class. This is getting a bit unorganized, so I was thinking of refactoring this. For every control: Preparing a class which derives from that control-type (which will include location, event-subscription and event-handlers, etc.), and then using an instance of it. Am I going to run into any trouble doing this?


title: MIT License Question (download somebody else's code and throw it on github)

text: Sometimes I use plugins and 3rd party libraries, and one thing that drives me crazy is when these libraries are not versioned. So, if I download it, make some mods to it, I am the only person in the world who can benefit from it... well, until I version it myself. My question is simple: if a library I find online has an MIT License, would it violate the license if I download it, modify it, and put it on github? I'm not trying to pass it off as my own, I'm just trying to help the community benefit from my work. A lot of libraries are pretty nice, but for some reason they aren't versioned... Thanks!


title: NSNotificationCenter vs. Protocol

text: I am using `MPMoviePlayerController` in a project. The `loadState` of the `MPMoviePlayerController` object is observed using `NSNotificationCenter`. Why did Apple choose `NSNotificationCenter` in this situation instead of using delegation?


title: Does OOP fulfill the promise of code reuse? What alternatives are there to achieve code reuse?

text: Perhaps the greatest promise of using object-oriented paradigm is the code reuse. Some dispute that this was achieved. Why was it (not) achieved? Does code reuse as OOP defines it, make projects more productive? Or more manageable? Or easier to maintain? Or with more quality? Probably we all agree that code reuse is a good thing, but there are several ways to achieve this goal. The question is about the method of code reuse offered by OOP. Was it a good thing? **Are there better methods to achieved code reuse** than object orientation, sub-classing, polymorphism, etc.? What ways are better? **Why**? Tell us your experience with OOP reuse or other paradigms reuse.


title: Submitting Résumé To Bolster Bids on Side Projects While Employed

text: A friend is bidding on a IT project, and he needs to include my résumé with his response to the bid; I'm the "Subject Matter Expert." I will be helping him outside of my regular working hours. How do folks in the IT field handle such résumé submissions? First of all, I don't want to include (or exclude) anything that would be misleading or untrue, but my concern is that in my field people know each other and I don't want my current employer finding out that I have submitted a résumé with another company especially when I am not an employee of my friend's company. All in all, I want to avoid the awkwardness of my employer finding out (and the worse of whatever that might lead to), yet balance that with helping a friend. So my question is, what should I leave out or retain? What is appropriate? Thanks!


title: What did programmers do before variable scope, where everything is global?

text: So, I am having to deal with seemingly archiac language (called PowerOn) where I have a main method, a few datatypes to define variables with, and has the ability to have sub-procedures (essentially void methods) that does not return a type nor accepts any arguements. **The problem here is that EVERYTHING is global.** I've read of these type of languages, but most books take the aproach _"Ok, we use to use a horse and cariage, but now, here's a car so let's learn how to work on THAT!" We will NEVER relive those days"_. I have to admit, the mind is struggling to think _outside of scope and extent_. Well here I am. I am trying to figure out how to best manage nothing but global variables across several _open_ methods. Yep, even iterators for `for` loops have to be defined globaly, which I find myself recycling in different parts of my code. My Question: for those that have this type experience, **how did programmers deal with a large amount of variables in a global playing field?** I have feeling it just became a mental juggling trick, but I would be interested to know if there were any known aproaches.


title: Correct comment to put for boolean function arguments that are "false"?

text: From some open source projects, I gathered the following coding style               void someFunction(bool forget);          void ourFunction() {       someFunction(false /* forget */);     }          I always have doubt about what `false` means here. Does it mean "forget", or does the "forget" refer to its corresponding parameter (like in the case above), and "false" is meant to negate it? What style is used most often and what is the best way (or some of the better ways) to avoid the ambiguity?


title: Managing setTimeouts and setInterval in a distributed environment

text: I am building a turnbased game on nodejs using socket.io and redis as the datastore. I am planning on hosting the game on AWS opsworks with the ability to scale by adding more nodes. How should I structure the application so that I can have `setTimeout` like behaviour to work correctly in the event that the node that triggered the `setTimeout` goes under for some reason? My initial plan is to have every setTimeout get stored in redis under a sorted set, with the score of the event as the unix timestamp that it should get executed in. I see 2 major problems with this approach that I am not sure how to tackle:   1. The time of the node that reads the event may not necessarily be in sync with the time of the node that stored it, causing events to fire earlier or later than they were supposed to. I'm not sure how big a problem this might be as a quick googling reveals that the drift will be minimal at worst, but I lack any practical experience to make a judgement call on this.   2. There is no way for any of the 'worker' nodes to know that there might be a task due so they would have to poll redis every second to see if there is a task that they can handle. The ideal solution for this would be a publish/subscribe that has a delay built in but this does not seem to be straight forward to implement either. Any advice on how to solve this is much appreciated!


title: Decision making process within a Scrum team

text: Two questions:   1. I assume that when Scrum coaches say "the team should decide" they mean there has to be a consensus decision process usually facilitated by the Scrum Master?    2. What if there is a disagreement between members of the Scrum team on the way to develop/design some feature and a consensus cannot be reached, who decides? The Scrum Master? The system architect? The funcional manager? Thanks.


title: What's a good way to make sure that locally serialized data can be deserialized in newer code?

text: Context: I'm working on an HTML 5 game without persisted state. Every time you refresh the page, you start at the beginning. People are requesting that they can start where they left off if they leave the page. I plan to implement this as Local Storage. The thing that makes apprehensive about this is a new kind of bug I'll have to consider: If you come back and there's a newer code, it may not be able to deserialize the storage. As an example, the state when serialized may have looked like this:               {       foo: "bar"     }      But when the player tries the game next month, that field doesn't even exist anymore and has been broken up into two fields with a completely different type. This is bound to happen, and I think I know how to fix this: I'll put a version number in the data, and when I release version y of the app, I'll have to write code to migrate from version x state to version y state. If I release version z of the app, I'll have to write code to migrate from version y to version z. I'll probably call this logic after deserialization. But that's not what this question is about (although if there's a flaw in my approach, I'd want to hear it). What I want to know is: **How do I automate something (possibly a test) that tells me _when_ I need to write a migration script and _when_ I need to change the data's version number?** I feel automation is the key here, because things will go very wrong if I make a mistake and remembering to change a version number / write a migration script will be the last thing on my mind when I just finished that shiny new feature I want others to see. * * * An interesting (but perhaps irrelevant) realization: All these issues go away if I store the data on _my_ server in a database with a schema. That lets me confidently know that all the data is in the right state (if my schema is good). The problem with persisting locally is I lose control of the data and _when_ it gets migrated. * * * This question is similar but different to this one. The difference is I'm concerned primarily with automation and s/he's not and we're using different languages (seeing how the accepted answer is a Java library, that makes it irrelevant to me).


title: Intel Nehalem/SB/IB/Haswell CPUs, cache vs TLB

text: On the Nehalem+ architecture Intel CPUs what is the interaction between the L1 cache, L2 cache, L1 DTLB and L2 DTLB? On all the images I have found there isnt a clear explanation whether the CPU looks at the L1 DTLB first, then goes to the L1D cache, or whether it only goes to the L1 DTLB cache if there is a cache miss in the L1D or the L2 cache?


title: Are there any languages built to facilitate implementing design patterns?

text: Often it is not obvious how to implement a given design pattern in a language. Sometimes it is difficult or cumbersome. Are there any languages built to make using design patterns easy and effective?


title: Mental Models or Real-World-Metaphors for Functional Programming

text: Does anyone have a good mental model or metaphor for functional programming which references something in the real world? Object Oriented programing intuitively makes sense to me. There are things that have properties and sometimes they also can do stuff or perform calculations on their properties (methods). (Ex: Car, Shape, Cat). I bear functional programming no ill will whatsoever and I am not interested in a debate about the virtues of the two. I just need a metaphor or mental model to work with as I have with Object Oriented programming. What are some good mental models or real world metaphors for programming in a functional paradigm? There is something about functions composed of functions processing functions which leaves one without a firm place to stand and cogitate.


title: How to support the sales team and avoid the "Often the sales team gets us into trouble just to get a commission" problem

text: With reference to this answer: > At the end of the day, we are delivering a product to a paying customer. > This customer has needs and expectations, realistic or not. Often the sales > team gets us into trouble just to get a commission. I realise there are processes (mainly with communication and project managment) that can help minimise risk (these seem to have minimal impact, mainly due to being ignored by anyone other than dev) and believe a percentage of the problem is their complete lack of technical understanding rather than greed (though this does play a part). But when it isn't possible to get rid of commissions (very good article), get (train) better salesmen, or increase dev resources, how can you minimise the impact on developer moral, timelines and generally development department being held responsible? How common is this damaging to the business (and no one higher up will believe how much better it could be - they don't see any problem now, but wonder why sales fall through and customers aren't happy) and how do others mitigate the risk, prove development is not the issue and handle such situations where the marketing is too aggressive and overselling is normal (which all propagates from the top)? How can you support the sales team and upper management to improve the root cause of this situation and what changes can be implemented in dev department to help with this? Additional information: the is only one product we create and as such is sold with additional functionality as required or work to let it integrate with existing systems. I was worried about close votes, but this is a very real problem (and I have tried to word it objectively)- if you can comment on how to improve this question, please let me know.


title: How to avoid too much html in JQuery?

text: I'm not liking how my JQuery is after making some dynamic buttons, or other dynamic things. For example, when I have checkboxes marked, I add a button that is called "Download Selected" and "Remove Selected". Of course, there are many more JQuery + HTML things in my site. I'd like to know how I can make my code better, not spaghetti looking. Thanks a lot!                 $(document).on('change', '.docListCheckbox', function(event){         if( $('#resultsContainer').find('.docListCheckbox:checked').length > 0 )         {           if( ! $('#download-sel').length > 0 )           {             var downSelectionBtn = '<button id="download-sel" class="button-small button-blue" type="button">DESCARGAR MARCADOS</button>';             var delSelectionBtn = '<button id="delete-sel" class="button-small button-red" type="button">ELIMINAR MARCADOS</button>';             $('#selection-controls').append(downSelectionBtn);             <?php if( SwHelper::checkAccess('Docusearch.Documento.Eliminar') ): ?>             $('#selection-controls').append(delSelectionBtn);             <?php endif; ?>           }         }         else         {           if( $('#download-sel').length > 0 )           {             $('#download-sel').remove();             <?php if( SwHelper::checkAccess('Docusearch.Documento.Eliminar') ): ?>             $('#delete-sel').remove();             <?php endif; ?>           }         }       });                $(document).on('click', '#docActionEdit', function() {         var button = $(this);         var isToggled = button.data('toggled');         $('#docDataEditor').slideToggle({           duration: 1000,           easing: 'easeOutBounce',           start: function(){             if(isToggled == 'false') {               button.html('EDITAR');               button.data('toggled', 'true');               $('#docActionSave').remove();             }             else {               button.html('CANCELAR');               button.data('toggled', 'false');               $('#docAvailableActions').prepend('<button id="docActionSave" class="button-small button-green">GUARDAR</button>');             }           }         });       });


title: Why is the json format necessary over the normal javascript object format?

text: Before you answer, yes I know that other languages have no native javascript object support, but neither do they have native support for json. So wouldn't it make much more sense to modify the json spec to allow identifiers without "" and allow comments? Very sensible things because you don't have to serialize/deserialize when working in javascript, no?


title: How strict should you be about indentation/white space?

text: Our development process is as follows code the task -> someone else QAs code and documentation -> task is merged into trunk. Recently a colleague is refusing to pass the code QA due to issues with indentation and whitespace. Here are examples of these issues (syntax is SAS): Additional whitespace:                       %if &syserr gt 0 %then %goto err; /*last line of code*/                         /* Footer area*/      Extra line of white space, and not indented inside proc sort:                /* End Of header * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */                   proc sort data = %dataset ;         by id;          run;         %if &syserr gt 0 %then %goto err;               proc sort data = &second_dataset.;         by id;         run;          %if &syserr gt 0 %then %goto err;       Extra white space between steps:                       /*join all details on for each record*/             proc sort data = &data out = data_srt ;                    by &conditions;              run;             %if &syserr gt 0 %then %goto err;                  proc sort data = &data2.;                   by &conditions.;             run;              %if &syserr gt 0 %then %goto err;                                  /*cartesian join*/             data new_data;                   join data                                &data2.  ;                   by &conditions;                   run;      The question is, being a good programmer, is looking over your code and correcting all this kind of thing the right thing to do, or is this just ridiculous? There is an additional complication, that because we don't have continuous integration or automated testing, it's not possible for the QAer to quickly fix up these issues and commit the code, for risk of accidentally deleting semicolon or something. (To be fair, the risk applies to the initial developer making these changes, so either way if this mistake occurs, it just needs to be fixed and move on).


title: why c++11 define closure as a process of capturing variables

text: when using closure in other languages, it just feels nature, variables from outer scope are captured automatically , without the need of declaring such captures. in c++11, good to see we have closures, but why they make it so uncomfortable to work with, not only have to declaring the capture, but also read write controls? not likely implementation considerations, but what kind of philosophy is leading to this awkward spec ?


title: Web pages in UML sequence diagrams?

text: In my current project, we have an ongoing discussion about whether or not it's a good idea to include an artifact representing a web page in an UML sequence diagram for a web application, making explicit which page starts a business interaction. I think it's a bad idea to include a web page, for me a sequence diagram should be about business logic and the interactions between business objects, and not include presentation concerns such as web pages. If I were to include a web page it'd be in a navigation diagram. Also, in my experience I had not seen web pages included in sequence diagrams, up until now. What's the recommendation/best practice on this? Should we include an artifact representing a web page in each of our sequence diagrams, or not? **EDIT :** It'd be ideal if the answers quoted design/modeling guidelines, books on UML, etc. arguing in favor or in opposition to including presentation artifacts in UML design diagrams. So far I haven't found an authoritative source that I can quote on the subject, instead of personal opinions.


title: Are there any downsides or problems with Haskell?

text: I'm looking at diving into Haskell for my next (relatively trivial) personal project. The reasons that I'm tackling Haskell are:   1. Get my head into a purely functional language   2. Speed. While I'm sure this can be argued, profiling that I've seen nails Haskell close to C++ (and seems to be quite a bit faster than Erlang).    3. Speed. The Warp web server seems to be crazy fast in comparison to virtually everything else. So, given this, what I'm looking for are the downsides or problems that come along with Haskell. The web has a tremendous amount of information about why Haskell is a Good Thing, but I haven't found many topics about its ugly side (apart from gripes about its syntax which I don't care about at all). An example of what I'm looking for could be like Python's GIL. Something that didn't rear its head until I really started looking at using concurrency in a CPython environment.


title: Unevenly distributed random number generation

text: Let's say I have to generate random number from 1 to 100, however, the probability of each number is not 1/100, but a predefined probability. How to generate that number? I use Ruby/Python.


title: Building workspce using Ojdeploy on linux

text: I am having a java application created using Jdeveloper. I want to build the workspace on linux machine using ojdeploy instead of Jdeveloper IDE. But for that I need to add 3rd party jars like hibernate. I am using putty to access the machine. so I want to know how to add third party libraries without using IDE. Thanks


title: How to handle lookup data in a C# ASP.Net MVC4 application?

text: I am writing an MVC4 application to track documents we have on file for our clients. I'm using code first, and have created models for my objects (Company, Document, etc...). I am now faced with the topic of document expiration. Business logic dictates certain documents will expire a set number of days past the document date. For example, Document A might expire in 180 days, Document 2 in 365 days, etc... I have a class for my documents as shown below (simplified for this example). What is the best way for me to create a lookup for expiration values? I want to specify documents of type DocumentA expire in 30 days, type DocumentB expire in 75 days, etc... I can think of a few ways to do this:   1. Lookup table in the database I can query   2. New property in my class (DaysValidFor) which has a custom getter that returns different values based on the DocumentType   3. A method that takes in the document type and returns the number of days and I'm sure there are other ways I'm not even thinking of. My main concern is a) not violating any best practices and b) maintainability. Are there any pros/cons I need to be aware of for the above options, or is this a case of "just pick one and run with it"? One last thought, right now the number of days is a value that does not need to be stored anywhere on a per-document basis -- however, it is possible that business logic will change this (i.e., DocumentA's are 30 days expiration by default, but this DocumentA associated with Company XYZ will be 60 days because we like them). In that case, is a property in the Document class the best way to go, seeing as I need to add that field to the DB?               namespace Models     {         // Types of documents to track         public enum DocumentType         {             DocumentA,             DocumentB,             DocumentC // etc...         }              // Document model         public class Document         {             public int DocumentID { get; set; }                  // Foreign key to companies             public int CompanyID { get; set; }                  public DocumentType DocumentType { get; set; }                  // Helper to translate enum's value to an integer for DB storage             [Column("DocumentType")]             public int DocumentTypeInt             {                 get { return (int)this.DocumentType; }                 set { this.DocumentType = (DocumentType)value; }             }                  [DataType(DataType.Date)]             [DisplayFormat(DataFormatString = "{0:MM-dd-yyyy}", ApplyFormatInEditMode = true)]             public DateTime DocumentDate { get; set; }                       // Navigation properties             public virtual Company Company { get; set; }         }     }


title: Distributing PC software without a website

text: I am trying to distribute a small PC program, but have run into a few problems. I first tried to upload it to cNet, and then to softonic, but the problem with these sites, and all that I have seen like them is that they require a direct link(which I can't get, see below). After running into that problem, I simply uploaded my software to a file sharing site, but in reality, very few of my current users(from a mobile version)installed my software because once downloaded was listed as dangerous by the anti-virus due to the website that it was downloaded from. So then I set about trying to find a download website that would give me a direct link, but unsurprisingly, I can't find that. I can't host the file myself, because I don't have a webpage. Even though I haven't found any, I would be fine with a site that hosts my software and doesn't require a direct download link to use. Or I would be fine with a site that would give me a direct download link. I'm interested in an answer to the general problem - distributing software without a website. I assume that not everyone who has ever released software has their own webpage, what is the best way to get around this?


title: How do I go from "here's the zip" to a good release strategy?

text: I can write code, resolve dependencies, and get my program to run on _my_ computer; I have no idea where to go from here though. How do I get the software ready for distribution? The school environment has taught me to do a few random tests by hand, make sure nothing is obviously broken, then throw all the source files into a zip and send it off. This is all that's needed to get a good grade is most CS courses. Nobody taught me how to release to real users. The only clues I have are a few phrases like "automated builds" and "continuous integration", but I don't know what these mean. How can I properly distribute my work? How can I make it easy for others? How can I move beyond "here's the zip" releases?


title: Heuristic for consistiently ordering points in a a plane

text: I have rectangular regions in a plane. I want to consistently order them in a human-friendly way that a typical y-x sort won't work for. Basically I want (0,0), (1,0), and (0,1) to sort the same as (0,0), (1, -0.1), and (-0.1, 1). Ideas? * * * _From comments:_   * The obvious answers, y-x and x-y sort, result in different orders for the short example I posted. The things I'm coming up with, now, are clustering approaches where I cluster the y values, sort by cluster y means, then by x. > Question: What are you sorting your rectangles for? Searching? Displaying?   * Numbering the regions, and I want two region sets a human would say are nearly identical to get numbered identically.  > Question: Is the orientation of the rectangles really important (what is the > difference between (0,1) and (-1,0) in the problem domain)? Would primarily > sorting by area or diagonal be ok?   * I can't tell the orientation of them beyond portrait or landscape, and size doesn't work because a lot might be practically the same.


title: OAuth alternative for a 2 party system

text: I'm writing a RESTful service (Java EE, Jersey) and a client application that communicates with it, and I wish to secure it and store any usernames & passwords dedicated in my own database. I do not want the client to store the username and password locally, not in any form such as base-64 or other encoding at all, I rather have something like the OAuth2 authorization system, where the client app only stores a refresh & access tokens after the resource owner signed-in, but I do not need to provide access to 3rd party services. Securing my service using Basic auth means the client app has to store the password and send it for each future request, so that's not what I need. I'm aware that OAuth is intended for different situations, where there are more than just 2 parties involved (see other question). as mentioned here https://blog.apigee.com/detail/when_to_use_oauth: `OAuth is the only realistic choice for a web application that itself uses another web application's API on behalf of the user. For instance, consider a web application that integrates with Twitter. (Perhaps it's a geolocation app like Foursquare that offers the ability to tweet where you are and what you're doing.)` So what is the correct standardized method to secure my RESTful service if I do not wish to re-invent the wheel and create my own auth method, and if "Basic" is not what I need because it forces me to store the credentials locally on the client, and OAuth is probably an overkill with it's 3rd party access nature. P.S- I do wish to provide users with an option to sign-in to my service using facebook or open-id, but that's another story I guess.


title: Does RSI qualify for a disability? Are you killing your career if you do?

text: My RSI has gotten pretty bad now. I'm still in school and thought about applying for a grant based on disability. Is this a bad idea in terms of it being seen as incapable of doing a job after I graduate? Will people see "oh, you have RSI.. and a permanent disability app.. I don't want to hire that poo-poo head." students with permanent disabilities I know it is possible to recover, but the fact is if you're a programmer, you're going to fight it your whole life.


title: Is it worth trying my IT experience in a totally different domain?

text: I have a good breadth of experience now (over a dozen) primarily as a dba,developer, BI admin, data analyst. I started my career in a couple of startups and now for a big internet company. The culture has always been interesting, fast-paced and just constantly moving. Recently, a family member of mine asked if I would be interested in taking my experience to his company (an established Oil & Gas). There's an opening for a database developer position there. The hiring manager liked my quals and has asked me to come in for an interview. Not having experience in this domain, the opportunity seems to be intriguing to work with data in this domain. It sounds like the culture is much slower- paced, but there is stability. People who have worked there for years. This is primarily a windows shop using .NET, Sybase, SQL server. Almost all my experience has been on unix/linux platforms with oracle, mySQL, open source tools. Given my experience thus far described, would this be an opportunity worth trying? Going essentially from an internet domain to a manufacturing company? Anyone experience this transition? I'm thinking there might be a good growth opportunity in the manufacturing company. There is also a chance I can obtain security clearance which could lead into other opportunities as well.


title: Automation at GUI or API Level in Scrum

text: I am a Automation Engineer. I use QTP for Automation. I wanted to know couple of things.   1. In a scrum Project which has 2 weeks of work, how can complete automation be done in that time frame (talking only about the GUI Level)?   2. Similarly, how can API Level of automated testing be accomplished, especially inside a single sprint? And what exactly is API level testing?   3. How to begin with API Testing? I assume QTP is not the tool here certainly.


title: How do I find UI ideas for a reporting system

text: I am developing an OS reporting system for PHP, it's main emphasis is right now on the server side of things.   I am trying to look for examples of good UIs for reporting systems. The problem: there are dozens of reports, each linked to the other, how do you navigate between them? How do you know the path you took to get to a specific report etc. Any examples out there?


title: What is the point to namespaces in branches in git?

text: So I mainly use Mercurial for my projects and I decided to sit down and learn all Git's shenanigans to discover if I'm in the right side (at least for me). I'm learning that git uses namespaces for branches and I would like to know (in your experience) what is the point of namespaces?. In Mercurial I could just set the convention of naming branches like so:               <branch name> //for "origin" branches     <username>/<branch name> //for user branches      I imagine that there is more to it than just the name (aside from avoiding naming conflicts), but what do I get out of this seemingly more complicated (not necessarily bad) model?


title: Is the Dart philosophy compatible with testability and dependency injection?

text: One of the Dart criticized features are named and factory constructors. There are opinions (from dependency injection people), that constructors should be simple and just assign some fields and the object graph creation is a responsibility of factories. There are also some argues against the static methods. It seems, that Dart constructors bring complexity to constructors. You can not even have a lot of named constructors to create the object in a various ways, you can even have a static factory supposed to construct object of other type than the class it is in. So, what is the philosophy of Dart and how does it relate (or respond) to the Dependency Injection and no-static state philosophies?


title: Can you apply agile/TDD in all circumstances?

text: I'm not against agile/TDD and use it under most circumstances. However, in some circumstances I feel it doesn't work well. For example, the other day I was building a fairly complex data processing app. In an ideal world I'd layout the foundation, design the components, write unit tests and demo on each sprints as I finish "features". In practice however, I don't think this works before the first version is released because:   * **The foundation/component design changes frequently as I figure out how to do things better, and simple test drivers are much more useful than richer unit tests**   If you are building a MVC app., the foundation isn't going to change, but with an app. where you more or less build the framework yourself, and don't quite know how to do things best beforehand this isn't the case. I feel simple test drivers with no automated verification are much more useful than richer unit tests at this stage.   * **Until the basic infrastructure is in place, it's hard to break down things into individual "features"**   If you already have an MVC framework, this is easy. But imagine how the the first MVC framework ever was developed. It must have been much less useful to think things as individual "features" in the initial stages, because the most important thing was to work out the principle and philosophy of separating Model, View and Control, and how to do that.   * **Demos help very little until a sizable part of the app. is done**   In a UI, you can just put up a mocked up interfaces and get lots of valuable feedback. However, e.g. in a web crawler, you can't really do a meaningful demo to non-technical people until quite a bit is done, and even if you did, they usually won't be able to give useful inputs anyway. Sure, you can demo to your developer colleagues, but it's hard to give input based on some log output. It's usually much more productive to explain how you did things and how you plan to do things perhaps showing illustrations and code, and get feedback this way. Or am I just doing it wrong?


title: Is RESTFUL API as back-end service one of the best (or suitable) choice for Mobile App?

text: I have a background on .NET development, recently I was asked to code back-end service for a mobile app. I had experiences on MVC, and now I'm trying to understand more on Restful Web API. My questions are: Is Restful API as back-end service one of the best (or suitable) choice for mobile app? What is the common solution for mobile app back-end service nowadays? **Edit** : (about off-topic) I read this before I ask this question. > If it's related to higher level programming concepts or is conceptual (but > still related to programming), it should be on Programmers. This is not a question about **recommend a tool, library or favorite off-site resource** **I asked about**   * if restful web API suitable for creating mobile service    * what are the common solutions to build mobile app API


title: Is experience very important when hiring/being hired in your country?

text: In the Indian IT industry, I have found that regardless of the candidate's skill level, filtering is done based on number of years of experience. I have found that people with 5 years of work experience have appalling programming skills, general aptitude and intelligence. They are mostly people who did non-CS courses in college but not necessarily (sadly). I think years of experience is a very marginal and unreliable indicator of the person's skill level. A person could have spent 5 years as a programmer doing mediocre to substandard work. But they are still considered a valuable candidate given the "experience certificate" they can produce. But that's the reality in India. What is the general practice in the US and other countries? Do recruiters filter based on years of experience? If you are a recruiter and you understand the practice of filtering based on years of experience can you explain the logic behind this? Edit: While I agree that experience trumps added qualifications (in terms of degrees), I don't think YEARS of experience - a document stating the same - is a reliable indicator of skill or maturity. That was my question. Indian IT recruitment works on certificates. I don't mean unheard of companies that trade on the sole fact that $1 = Rs.45. I've found this in companies like Oracle! The experience certificate qualifies you or doesn't for an interview. Sure I GUESS you don't want to put a fresh out of college for a project management position. Even there I am no certain how heavily should experience weigh in qualifying candidates for consideration for recruitment.


title: ado .net connected and disconnected classes?

text: ## Pros and cons and Usage I have been preparing myself for an interview for the post of software developer in .net platform. For database related issues, I have to to a point about the connected ans disconnected classes of ADO .NET. I have read several articles but still not getting a perfect picture of those two terms. Hence, here I am, to the best place to get a concrete ans. Can any one explain me the pros and cons and the usage scenarios?


title: What are the disadvantages of automated testing?

text: There are a number of questions on this site that give plenty of information about the benefits that can be gained from automated testing. But I didn't see anything that represented the other side of the coin: what are the disadvantages? Everything in life is a tradeoff and there are no silver bullets, so surely there must be some valid reasons not to do automated testing. What are they? Here's a few that I've come up with:   * Requires more initial developer time for a given feature   * Requires a higher skill level of team members   * Increase tooling needs (test runners, frameworks, etc.)   * Complex analysis required when a failed test in encountered - is this test obsolete due to my change or is it telling me I made a mistake? **Edit**   I should say that I am a huge proponent of automated testing, and I'm not looking to be convinced to do it. I'm looking to understand what the disadvantages are so when I go to my company to make a case for it I don't look like I'm throwing around the next imaginary silver bullet. Also, I'm explicity _not_ looking for someone to dispute my examples above. I am taking as true that there _must_ be some disadvantages (everything has trade-offs) and I want to understand what those are.


title: Is .Net memory hungry?

text: A friend of mine told me that .NET Framework is memory hungry and he gave me an example that if I make an application (in .NET web forms) which will take 20 mb of your RAM, it will be actually wasting 1.5 MB This means that it will leak 15 mb for 200 MB application which is way too much. Is it true? Can anyone provide me any links which describes it?


title: Alternative for Access+SQL Server for enterprise projects

text: We're a small software company, developing projects for manufacturing facilities about analysis, traceability, reporting etc. We're using Access for front end, SQL Server for back end. We've quite big customers too and our company is growing. So far it is working fine but I wonder should we move to more influential technologies, such as web based solutions. What do you think about the future of Access?


title: How can documentation writing be made less unpleasant?

text: What makes writing documentation unpleasant for some people, and what can be done to make it less unpleasant? Current thoughts:   1. Ensure the program being described makes sense (eg doesn't have too many fudges or +1s or -1s in it). You feel bad, and it's more difficult, describing a program that doesn't make sense!   2. Conquer your fear of writing. Improve your writing skills, possibly on pleasant tasks.


title: Are there any major alternatives to Waterfall and Agile?

text: I am curious if anyone knows of any methodologies that are significantly different (not a recombination) and I would especially appreciate anyone who brought forward any experience with alternatives.


title: how to handle / architect soa when service becomes unavailable?

text: Say I've got a third-party service called Cool.io that provides a RESTful API but often goes down. My applications consume that API, but when Cool.io goes down, my app really can't do much... but it should! Say I create a proxy to the Cool.io and this proxy stores a copy of Cool.io's data and provides RESTful endpoints for my application. Let's assume that my proxy has 100% reliability, or, at least more than Cool.io's. Let's also assume that my proxy has no problem propagating PUTs/POSTs to Cool.io, and no problems receiving the same from Cool.io (in other words, there are no data sync issues between my proxy and Cool.io). This decouples my application's dependency on Cool.io, which goes down all the time... but it doesn't decouple the proxy from the Cool.io service. As such, when my application modifies something on the proxy, the proxy's data changes and tries to send that change to Cool.io. But, if Cool.io is down, that request just results in an unavailability error (or a failed connection). What's the proper way to architect something like this? How do guys like Amazon or Netflix decouple their services such that an outage doesn't affect the consumer, or if it does, it does so gracefully? Is a message queue in order here? Is there a simpler solution than creating a proxy to the unreliable service?


title: Reasonable test coverage requirements when dealing with a contractor?

text: We're outsourcing some work to an external developer, so I'm busy writing up a contract about what constitutes a deliverable. So far I require that the code is shipped with automated tests. But, what is a reasonable way to specify the detail of tests up-front in the contract in a measurable way? I'm loathe to say "100% code coverage" because it's been established pretty often that 100% is pretty meaningless, and the diminishing returns above about 70-80% would probably just be pushing up our costs unnecessarily, and possibly even pushing up the complexity of certain things that might otherwise be very simple. Internally we pretty much leave it up to our developers to decide on the level of tests needed, based on their intuition and experience. With a contractor however there is a fixed price that has to be agreed to up front and we need some way to enforce a certain level of quality. Any suggestions or recommended reading matter would be appreciated!


title: Algorithm to minimize distance variance between 2D coordinates

text: I've been looking around for an algorithm that would optimize the distance between 2 list of coordinates and choose which coordinate should go together. Say I have List 1:               205|200     220|210     200|220     200|180      List 2:               210|200     207|190     230|200     234|190      Calculated Distance between Coords:               205|200 to 210|200 == 5.00     205|200 to 207|190 == 10.20     205|200 to 230|200 == 25.00     205|200 to 234|190 == 30.68          220|210 to 210|200 == 14.14     220|210 to 207|190 == 23.85     220|210 to 230|200 == 14.14     220|210 to 234|190 == 24.41          200|220 to 210|200 == 22.36     200|220 to 207|190 == 30.81     200|220 to 230|200 == 36.06     200|220 to 234|190 == 45.34          200|180 to 210|200 == 22.36     200|180 to 207|190 == 12.21     200|180 to 230|200 == 36.06     200|180 to 234|190 == 35.44      This Algorithm would pick:               205|200 to 230|200 == 25.00     220|210 to 207|190 == 23.85     200|220 to 210|200 == 22.36     200|180 to 234|190 == 35.44      The Algorithm would pick these numbers as they would be the group that would have the littlest variance between the distance. Conditions:   1. A Coordinate may only be used ones from each list   2. If List 1 or List2 is larger than it still only uses each coordinate once, but it tries to get the smallest distance variance and does nothing with the unused coordinates. If you need more clarification please ask. P.S. I've looked at the Hungarian algorithm and it seems like it will sort of do the job, but not exactly how I was expecting. The Hungarian algorithm will only try and make the least distance from all the coordinates, which can mean the smallest variance, but not every time as variance is more important here then least distance optimization. **Additional Information** I will have an array of List1, List2, and then the distances:               Distance[List1_item_0][List2_item_0] = 5;     Distance[List1_item_0][List2_item_1] = 10.20;     Distance[List1_item_0][List2_item_2] = 25.00;     Distance[List1_item_0][List2_item_3] = 30.68;          Distance[List1_item_1][List2_item_0] = 14.14;     Distance[List1_item_1][List2_item_1] = 23.85;     Distance[List1_item_1][List2_item_2] = 14.14;     Distance[List1_item_1][List2_item_3] = 24.41;          Distance[List1_item_2][List2_item_0] = 22.36;     Distance[List1_item_2][List2_item_1] = 30.81;     Distance[List1_item_2][List2_item_2] = 36.06;     Distance[List1_item_2][List2_item_3] = 45.34;          Distance[List1_item_3][List2_item_0] = 22.36;     Distance[List1_item_3][List2_item_1] = 12.21;     Distance[List1_item_3][List2_item_2] = 36.06;     Distance[List1_item_3][List2_item_3] = 35.44;      From the Distance['List1_item_#] I would need to pick a distance. Once that distance is picked the [List2_item_#] CANNOT be picked by a different [List1_item_#]. The distances picked for each [List1_item_#] element would need to be picked in a way that the variance between them all is minimal. So distance for each [List1_item_#] should be as close as possible to each other without reusing a [List2_item_#] more than once.


title: What are the most popular IDEs per language?

text: This has nothing to do with having a favourite editor or anything like that. I was just wondering, per language, what are the most popular Integrated Development Environments? Maybe a top 2-3 if there is some contention. (Perceived popularity is enough) Thus Far: **C#** - Visual Studio, SharpDevelop **Java** - Eclipse, NetBeans, IDEA **Objective-C** - Xcode **Delphi** - RAD Studio **Object Pascal** - Delphi, Lazarus **C, C++** - Visual Studio, Vim **PL/SQL** - RapidSQL, Oracle SQLDeveloper **PHP** - Eclipse, NetBeans, Nusphere PHPed **Actionscript (AS2, AS3)** - FlashDevelop **Flex** - Flash Builder 4 **Python** - Eclipse, IDLE **Perl** - Padre **Common Lisp** - Lispworks, Emacs **Ruby** - TextMate **Haskell** - Vim **Fortran** - Vim **Visual Basic** - Visual Studio


title: How come compilers are so reliable?

text: We use compilers on a daily basis as if their correctness is a given, but compilers are programs too, and can potentially contain bugs. I always wondered about this infallible robustness. Have you ever encountered a bug in the compiler itself? What was it and how did you realize the problem was in the compiler itself? ...and how _do_ they make compilers so reliable?


title: Application internal design VS Web application design

text: I come from the web application development and I try to make a small desktop application. I am looking for a good way to build the skeleton of my desktop application. From the web design, the skeleton is mainly handled by the web browser combined with the web server which manage application states (each page could be compared to a state) which in some way "wrap" the whole application and give you access to the basic informations like the `post` and `get` variables (and many others). Finally you can wrap the whole web application in a MVC design. I am wondering how I can do the same (or something similiar) in a desktop application? How can (or should) I properly wrap my application? Should I go with a state machine design combined with a MVC or is there something better? Thanks for your time


title: Ways of handling asynchronous receive calls

text: I am implementing a primitive message-passing system. Currently, I am designing a receive function for async calls. Can I implement such a async receive function without using callback functions?


title: How to prevent same user rating a web content like video more than once?

text: We have youtube kind of website where we calculate rating for every video. Based on rating we award cash. Our problem is no same user can rate a video more than once. We thought if we keep track of static IP, we will be able to achieve this but we found there are third party tools that can be used to manipulate the IP and break this. **Note:** We thought about only signed in customers can rate the video but client asks that even guest should be able to rate the video. Do we have any other method to track this so that they a user cannot rate more than once?


title: Are there any good Java/JVM libraries for my Expression Tree architecture?

text: My team and I are developing an enterprise-level application and I have devised an architecture for it that's best described as an "Expression Tree". The basic idea is that the leaf nodes of the tree are very simple expressions (perhaps simple values or strings). Nodes closer to the trunk will get more and more complex, taking the simpler nodes as their inputs and returning more complex results for their parents. Looking at it the other way, the application performs some task, and for this it creates a root expression. The root expression divides its input into smaller units and creates child expressions, which when evaluated it can use to build it's own result. The subdividing process continues until the simplest leaf nodes. There are two very important aspects of this architecture:   * It must be possible to manipulate nodes of the tree after it is built. The nodes may be given new input values to work with and any change in result for that node needs to be propagated back up the tree to the root node.   * The application must make best use of available processors and ultimately be scalable to other computers in a grid or in the cloud. Nodes in the tree will often be updating concurrently and notifying other interested nodes in the tree when they get a new value. Unfortunately, I'm not at liberty to discuss my actual application, but to aid understanding a little bit, you might imagine a kind of spreadsheet application being implemented with a similar architecture, where changes to cells in the table are propagated all over the place to other cells that need the result. The spreadsheet could get so massive that applying multi-core multi-computer distributed system to solve it would be of benefit. I've got my prototype "Expression Engine" working nicely on a single multi- core PC but I've started to run into a few concurrency issues (as expected because I haven't been taking too much care so far) so it's now time to start thinking about migrating the Engine to a more robust library, and that leads to a number of related questions:   1. Is there any precedent for my "Expression Tree" architecture that I could research?   2. What programming concepts should I consider. I realise this approach has many similarities to a functional programming style, and I'm already aware of the concepts of using futures and actors. Are there any others?   3. Are there any languages or libraries that I should study? This question is inspired by my accidental discovery of Scala and the Akka library (which has good support for Actors, Futures, Distributed workloads etc.) and I'm wondering if there is anything else I should be looking at as well?


title: c++ Model View Presenter: Where to construct presenter?

text: I'm using the Model View Presenter (MVP) pattern as described in The Humble Dialog Box paper (pdf) with an MFC project. I'm sure the issue is the same with most GUI toolkits. The thing that's bothering me is the concrete view (i.e., the dialog class) is creating not only the presenter but also the services that the presenter needs. Is that normal? Why does the view need to know what services the presenter needs? What I'm thinking is that I should dependency inject the presenter into the dialog class. The main control for the application is a class derived from CWinApp. So should I construct services and presenter in this class and then inject them into the dialog class? Although how would I dependency inject the presenter into the dialog class when the presenter needs a reference to the view class in it's constructor? `MyPresenter(IView *view, MyService *service);` Also how about if the main window spawns off a popup window, where should the details for that windows presenter and services get constructed? Since this is C++ I don't think I'd be interested in any kind of DI framework. **UPDATE** One idea I had was to construct the presenter with a null view, constructor inject the presenter into the dialog class, and then in the constructor of the dialog class call a `SetView(IView *view)` method on the presenter with `this` where `this` would be the dialog class (which derives from IView). So:               MyApp::Start()     {       SomeService *service = new SomeService();       MyPresenter *presenter = new MyPresenter(null, service);       MyDialog *dialog = new MyDialog(presenter);       ...     }          MyDialog::MyDialog(MyPresenter *presenter):      presenter_(presenter)     {       presenter_->SetView(this);     }      Seems a little kludgy but keeps service construction out of the Dialog class. The null view seems a little dangerous. An alternative would be to actually construct a NullView class that had empty method bodies and then pass that into the presenter constructor.


title: Mac Applications Developer interview preparation

text: I'm a Mac Applications Developer with an experience of 1 year and 8 months. I need to change the company. What type of questions should I expect in an interview? I've worked on 2 projects of which the second one is a very large and have been working on that for about more then a year till now. But, none of them are in the market yet. Both are desktop applications.   * How good should I prepare for the interview?   * On what things should I concentrate more ?   * This will be my first interview as an experienced. I haven't worked on iOS. Will that be a demerit ?   * Would that be a disadvantage having unreleased projects in my resume ?   * Should I think of including the other projects on which I haven't worked(but studied) into my resume, even after knowing that it is not a good thing to do ?


title: C++ "under the hood" books for advanced readers?

text: Are there any particularly good books for understanding how C++ works "under the hood"? My reasons for asking this are that I am very interested in C++ performance system programming (low latency etc). I have been suggested the following but wasn't sure if there are any others:   * C++ FAQs    * Modern C++ Design    * Effective C++ Basically I dont want books which are going to teach me the C++ syntax, but rather if I create this object, this is what really happens and this is achieved via this part of the operating system bla bla etc. An example of something I recently learnt and would like to learn more similar interesting facts: if you inline C++ code too much, you will increase the program instruction size, the number of OS pages it occupies and this will increase the likelihood of TLB misses for the processor.


title: I had a bad job interview, but still got the job. How do I handle the relationship with my new manager?

text: I participated in a set of interviews for a position in which I was hired recently. During the interview process I was interviewed 6 seperate times. 3 technical interviews and 3 situational / business interviews. During my second (and most dificult interview) the interviewer, who is now my manager, asked me to provide a solution to a programming problem overnight. I submitted the solution the next day but found out shortly that it was not what the interviewer expected. I quickly followed up with another solution that included the correct answer, and was deemed as such from the interviewing company. I now know that behind the scenes, during this time period, the interview process was changed because the manager had not hired any employees for the position in a 6 month time period. Now that I have the position, I am somewhat worried that this particular situation has put a bad taste in this manager's mouth regarding my placement here (which I believe was done above his head because of the new hire process taking too long). I have now been at the job for over 2 months and have NOT had ANY direct interaction with this manager, just a team lead. I believe that I have performed well, and have received praise and confirmation of my perceptions from my team lead. From a professional perspective, How do I make sure that my manager sees this, noting my interviewing history? Thanks in advance for any answers.


title: Process arbitrarily large lists without explicit recursion or abstract list functions?

text: This is one of the bonus questions in my assignment. The specific questions is to see the input list as a set and output all subsets of it in a list. We can **only use cons, first, rest, empty?, empty, lambda, and cond**. And we can only define **exactly once**. But after a night's thinking I don't see it possible to go through the arbitrarily long list without map or foldr. Is there a way to perform recursion or alternative of recursion with only these functions?


title: Looking for unpaid interns (2) - am I crazy?

text: **Edit - 6/10/11 in response to first batch of responses** : Wow, what a response. Let me speak to a few points.   1. I already stated that I will have a curriculum, and my intention is to teach people the things that college courses don't prepare you for (the entire CI process and all the technologies it entails for one)   2. All the people that complain about **CS programs that don't prepare students to enter the workforce**... where are you at? You seem to have left and invited the anti-taking-advantage-of-students brigade, and the you-cheap-bastard committee in your place.   3. I didn't really want to advertise the fact that I was at a **not for profit** as I just trashed my IT department (and deservedly so) I doubt **any** of them will actually see this, but it was my preference to not make myself easier to identify to people in my organization   4. I am not as convinced as many here seem to be that there are a lots of local business wanting interns (paid or not), but I will definitely feel it out with local schools if I decide to go forward   5. Regarding being Cheap... seriously? I am a developer. Not a manager, not anybody with any ability to spend budget. I am trying to improve myself (by mentoring), others (interns, and by extension the community) my team, and my employer.   6. I **did not** refer to **useless** CS grads. I referred to **clueless** CS grads. As in the many questions on this very forum that deal with the notion that CS grads know nothing about actually applying the technical skills they have acquired.  **End Edit/Rant** Just to give you an idea of where I am coming from... I am a developer on a small team reporting to the business (yes, the business... we have a horrible, dictatorial IT division that refuses to meet business needs, hence several business development teams) in a fairly large company. My motivations for wanting interns include:   * Bettering my own skills, (technical and otherwise) by mentoring others   * Teach interns (and even coworkers) ideas and methods for software construction that go beyond just solving a biz problem (readable/maintainable code, benefits of design and testing, etc   * Accelerate adoption of .Net on the team   * Help solve the problem that we all complain about - that being clueless CS grads I don't, for one second, believe that getting unpaid interns will be free labor. Before even going down that path, I will have setup an entire CI setup, which will of course be one of the benefits to the interns. I will also have to find a small project, or a piece of a project that can be broken off and given to interns to chew on. I will have a bit of a curriculum, which will include introduction to all the technologies involved in the CI, and other software development concepts. I will also be prepared to spend time with them every day to help set direction and help out when they hit a wall. I've been kicking this idea around in my head for a bit now, and the recent questions have prompted me to post. I was actually surprised to see such a negative reaction to unpaid internships, but then again maybe it is the norm that unpaid internships aren't that helpful for the intern? Anybody with experience with interns (either being one, or teaching one) have any thoughts?


title: When designing a job queue, what should determine the scope of a job?

text: We've got a job queue system that'll cheerfully process any kind of job given to it. We intend to use it to process jobs that each contain 2 tasks:   * Job (Pass information from one server to another)      * Fetch task (get the data, slowly)     * Send task (send the data, comparatively quickly) The difficulty we're having is that we don't know whether to break the tasks into separate jobs, or process the job in one go. Are there any best practices or useful references on this subject? Is there some obvious benefit to a method that we're missing? So far we can see these benefits for each method: **Split**   * Job lease length reflects job length: Rather than total of two   * Finer granularity on recovery: If we lose outgoing connectivity we can tell them all to retry   * The starting state of the second task is saved to job history: Helps with debugging (although similar logging could be added in single task method) **Single**   * Single job to be scheduled: Less processing overhead   * Data not stale on recovery: If the outgoing downtime is quite long, the pending Send jobs could be outdated


title: What is the canonical approach to using a VCS right from a project's infancy?

text: ## Background I've used VCS (mainly `git`) in the past to manage many existing projects and it works great. Typically with an existing project, I would check in each change I make to the code that either optimizes or changes the overall functionality (you know what I mean, in suitable steps, not every single line I change). ## Problem One thing I've not had so much practise at is creating new projects. I'm in the process of starting a new project of my own that will probably grow quite large, but I'm finding that there is _a lot_ to do and a lot changing in the first few days/hours/weeks/the period up until the product is actually functioning in it's most basic form. Is there any point in me checking in each step of the process as I would with an existing project? I'm not breaking the project with changes I make since it isn't working yet. At the moment I've simply been using VCS as a backup at the end of each day, when I leave the computer. My first few commits were things like "Basic directory structure in place" and "DB tables created". How should I use a VCS when starting a new project?


title: Why would I want to use CRaSH?

text: Justed stumbled across CRaSH and although it looks mighty interesting, I'm wondering why a Java developer should invest time & energy into learning (yet another) shell language. What sort of standard- and cool-applications can CRaSH be used for? Is this like a Groovy-version of Jython? I guess, when the dust settles, I'm looking for CRaSH's "wow" factors. I'm sure they're there, but after spending ~20 minutes perusing the documentation I'm just not seeing them. Thanks in advance!


title: Starting my first project and have no idea about it. Guide please

text: I am a Computer Science student (6th semester). I want to make a project and I have a team of 4 people (My friends). So we are 5 people and we have decided to make a " **Web based file explorer** ". The project will be similar to THIS one. How should we start with this project? We guys don't know much about programming. I know Java a little and I am a RHCE so can handle the server and all such administrative stuffs. Since this is our first project so we guys have no idea how we'll make it? I know Java and other guys in the group knows C#, ASP.NET, PHP, SQL and Joomla. Please guide and give your suggestions. Thank you. PS : Perhaps my question is not complete, if you want more information then leave a comment I will edit the question.


title: What is the disadvantage of using abstract class as a database connectivity in zend framework 2 instead of service locator

text: If I use database by creating adapter with drivers, initialize it in some abstract class and extend that abstract class to required model. Then use simple query statement. Like this:               namespace My-Model\Model\DB;     abstract class MysqliDB {         protected $adapter;              public function __construct(){              $this->adapter = new \Zend\Db\Adapter\Adapter(array(                     'driver' => 'Mysqli',                     'database' => 'my-database',                     'username' => 'root',                     'password' => ''             ));         }          }      And use abstract class of database like this in my models:               class States extends DB\MysqliDB{              public function __construct(){             parent::__construct();         }         protected $states = array();              public function select_all_states(){             $data = $this->adapter->query('select * from states');             foreach ($data->execute() as $row){                 $this->states[] = $row;             }             return $this->states;         }     }      I am new to zend framework, before i have experience of working in YII and Codeigniter. I like the object oriented in zend so i want to use it like this. And don't want to use it through service locater something like this:                public function getServiceConfig(){             return array(                 'factories' => array(                 'addserver-mysqli' => new Model\MyAdapterFactory('addserver-mysqli'),                 'loginDB' => function ($sm){                     $adapter = $sm->get('addserver-mysqli');                     return new LoginDB($adapter);                 }             )             );              }      In module. Am i Ok with this approach?


title: Can anyone explain representation of float in memory?

text: This is not duplicate question as I read the previous question. Can anyone help me in understanding `how float values are stored in the memory` . My doubt is here float values contain '`.'` (`for example 3.45`) how the `'.'` will be represented in the memory? Can anyone please clarify me with a diagram?


title: What individual needs to be aware when signing a NDA with client?

text: I am very new to IT industry and have no prior experience. However I came into contact with a party who is gear to build a mobile application. But, they want me to sign NDA (No Disclosure Agreement). The definition seems vague, > The following definitions apply in this Agreement: Confidential Information > means information relating to the online and mobile application concepts > discussed and that: > >   * (a) is disclosed to the Recipient by or on behalf of XYZ; >   * (b) is acquired by the Recipient directly or indirectly from XYZ; >   * (c) is generated by the Recipient (whether alone or with others); or >   * (d) otherwise comes to the knowledge of the Recipient, > When they say otherwise comes to the knowledge of the recipient. Does it mean if I think of any idea from my own creative mind and which is similar to their idea then it would be a breach of this agreement? and also is it okay to tell to include application name in definition as currently to me it sounds like any online of mobile application concept they think I should not disclose it to anybody. `"Confidential Information means information relating to the online and mobile application concepts discussed and that:"` I am more concerned about this part, > Without limiting XYZ’s rights at law, the Recipient agrees to indemnify XYZ > in respect of all claims, losses, liabilities, costs or expenses of any kind > incurred directly or indirectly as a result of or in connection with a > breach by it or any of its officers, employees, or consultants of this > Agreement. Is it really common in IT industry to sign this agreement between client and developer? Any particular thing I should be concerned about?


title: Standards & compliances for secure web application development?

text: I am working with developers right now that write code the way they want and when i tell them to do it other way they respond that its just matter of preference how to do it and they have their way and i have mine. I am not talking about the formatting of code, but rather of way site is organized in classes and the way the utilize them. and the way they create functions and process forms etc. Their coding does not match my standards, but again they argue that its matter of preference and as long as goal achieved the can be different way's to do it. I agree but their way is proven to have bugs and we spend a lot of time going back and forth with them to fix all problems security or functionality, yet they still write same code no matter how many times i asked them to stop doing certain things. Now i am ready to dismiss them but friend of mine told me that he has same exact problem with freelance developers he work with. So i don't want to trade one bad apple for another. **Question is is there some world wide (or at least europe and usa) accepted standard or compliance on how write secure web based applications. What application architecture should be for maintainable application.** Is there are some general standard that can be used for any language ruby php or java govern security and functionality and quality of code? Or at least for PHP and MySQL i use for my website. So i can make them follow this strict standard and stop making excuses.


title: How to select a most probable option from the list based on user text Input

text: I am working over a OCR Application where I need to select a option based on user text input.               Ex:     Available Options:     ["python", "ruby", "java", "clojure", "haskell"]          Input: kava     Output: java          Input: ruby     Output: ruby          Input: clujuro     Output: clojure          etc..       my application is python based, is there a algorithm already exist to solve this problem.


title: Why is it good to split a program into multiple classes?

text: I'm still a student in high school (entering 10th grade), and I have yet to take an actual computer course in school. Everything I've done so far is through books. Those books have taught me concepts such as inheritance, but how does splitting a program into multiple classes help? The books never told me. I'm asking this mainly because of a recent project. It's an arcade video game, sort of like a Flash game as some people have said (although I have no idea what a Flash game is). The thing is, it's only one class. It works perfectly fine (a little occasional lag however) with just one class. So, I'm just asking how splitting it into multiple classes would help it. This project was in Java and I am the only person working on it, for the record.


title: Do you ever worry that you're more concerned with how something is built rather than what you are actually building?

text: As a programmer I have an inherent nagging annoyance at my tools, other peoples code, my code, the world in general. I always want to improve it. So I refactor, I stay on top of the latest techniques. I try and learn patterns, I try to use frameworks so as not to reinvent the wheel. I can write a tech spec that will blow your socks off with the amount of patterns I can squeeze in. However, lately I feel I actually know more about the tools I use than how to actually implement successful software. I feel like I'm lacking in the human factors skill set and I believe that to be a successful software engineer takes more than knowing the coolest framework. I think it needs some of the following skillsets too.   * Interaction design   * User experience    * Marketing I've got a bit of this that I've learned from people I've worked with and great projects I've worked on but I don't feel like I "own" these skills. Am I right? Should I be trying to develop these skills further, or should these be left to the people who do these for a career? How do you make sure you don't get too tied up in how you're doing something and make sure you "make your users awesome"? Does anyone know of good resources for learning these skills from a programming point of view?


title: OO best practices for C programs

text: _"If you really want OO sugar - go use C++"_ -- was the immediate response I got from one of my friends when I asked this. I know two things are dead wrong here. First OO is NOT 'sugar', and second, C++ has NOT absorbed C. We need to write a server in C (the front-end to which will be in Python), and so I am exploring better ways to manage large C programs. Modeling a large system in terms of objects, and object interactions makes it more manageable, maintainable and extensible. But when you try to translate this model into C which does not bear objects (and everything else thereof), you're challenged with some important decisions. Do you create a custom library to provide the OO abstractions your system needs? Things like objects, encapsulation, inheritance, polymorphism, exceptions, pub/sub (events/signals), namespaces, introspection, etc. (for example GObject or COS). Or, you just use the basic C constructs (`struct` and functions) to approximate all your object classes (and other abstractions) in ad-hoc ways. (for example, some of the answers to this question on SO) The first approach gives you a structured way to implement your entire model in C. But it also adds a layer of complexity that you have to maintain. (Remember, complexity was what we wanted to reduce by using objects in the first place). I don't know about the second approach, and how effective it is at approximating all the abstractions you might require. So, my simple questions is: What are the best practices in realizing an object oriented design in C. Remember I am not asking HOW to do it. This and this questions talk about it, and there's even a book on this. What I am more interested in are some realistic advice/examples that address the real issues that show up when dong this. _**Note: please don't advice why C shouldn't be used in favor of C++. We've gone well past that stage._**


title: Too much version control and bug tracking overhead per change?

text: I work at a place that is CVS-crazy and Bugzilla-nuts.   1. There are so many branches off each release that one cannot count them. Everyone is constantly auto-merging.    2. There is no _fluidity_ at this job. Everything feels _lock-step_. It takes 25 steps even for a simple thing. It's not like being on a factory production line: it's like setting up a factory myself every day. Example situation: To fix a single bug, first I obtain a clean, new virtual machine. Then I create a branch for that single bug fix, based on another branch described in the Bugzilla report. I install the branch on the machine, set that up. I fix the bug. I check it in, leaving it and the machine for others to test with. Then I have to go into the bug control software and explain what I did and write a test case, with all the steps. Eventually someone else merges it with a release. No matter how tiny the bug is, I have to do all of these things. Sometimes people combine work on multiple bugs, but as I said there are so many branches that this is hardly possible. At any other job, I'd just go in and fix the bug. I barely even remember using SCM, although every job I've had has used it: that's because at every other job, they somehow kept it _out of the way_. _Is there a point at which the process gets in the way and becomes an end unto itself? Is that even engineering?_


title: Where does Web Reference go in 3-layer app

text: I have a 3 layered application.   * Presentation Layer (PL): ASP.NET MVC app   * Business Logic Layer (BLL) project   * Data Access Layer (DAL) project I need to add a Web Reference to a service for a payment gateway. Where does it go? `PL` or `BLL`? P.S. Before using the Web service I need to retrieve some data from database and send that data to web service.


title: Can everything in computing be classified as either data or a process?

text: Working in a field called "revenue assurance" I basically build systems to validate other systems. After a while in this market it seems to me that all these "validations" are verifying either a process from my customer's environment or the data used by these processes. With this in mind I am considering using such definition to orientate sales people and even architects working on the products. However, researching this topic I couldn't find a definitive answer although haven't dismissed the possibility either. Is everything one of the two then?


title: What skills are essential for professional programming that are not commonly taught in schools?

text: I am a first year computer science major. I went to a job fair, handed out resumes, much to my surprise I got an interview and eventually an internship as a developer. I explained to the interviewer (who will be my boss) that I am only a first year and do not have a large amount of experience programming. He simply told me that because I have a strong background in math (I am almost done with my BA in math, plus I have some grad courses under my belt) the he is confident I will do fine. I do well in all programming courses but I still feel that I am at a disadvantage. Right now, I really just want to do good at this job when it starts. The job will be using mostly C#, but besides obviously learning some C#, what is the one skill that you wish you could have learned before you became a real programmer? Any advice is greatly appreciated, but if you have any books in mind please tell. Thanks!


title: Exploratory Development vs Incremental Development

text: In Software Engineering Methodologies... The Evolutionary Development contains Exploratory & Prototyping... Is Exploratory Development same as Incremental Development... What do you mean by exploratory Development?


title: Java MVC extra classes

text: I have a simple MVC project. My current packages:   * gui    * controller    * db    * domain I want to put extra classes which I will use, e.g. md5 hashing, email validator (methods which I will use in more than one class). Where do I put them? I will probably not use them in only one package, but in two or three (not in model for sure). Do I create an extra package, or do I put them in domain as they're "static" (unchangable)?


title: Kafka, is it possible to get the message offset after producing?

text: While using Apache Kafka, is it possible to get the offset of the message that has been produced? From the Kafka documentation page it says: > each message in the partition are assigned a unique sequential id/number > called Offset Now suppose when I am producing any message I want to retrieve the offset that has been assigned to it.


title: How common is it for a team to write everything in-house?

text: In a recent interview I asked the interviewers "how do you go about evaluating new technologies and libraries (such as SignalR) and bringing them in to use?". They said they don't, that instead they write everything themselves so they don't have to rely on anyone else. The firm doesn't work for the government or defence contractors or on any safety-critical projects or anything like that. They were just your average, medium-size software development firm. My question is: **how common is it for teams to write everything themselves? Should I be concerned by teams that do?** Edit -- Most every response has said this is something to be concerned by. **Would a second interview be an appropriate time to ask them to clarify/repeat their position on writing everything in house?**


title: Best practices for for putting tabular data on the web for users to edit?

text: I've been working in ASP.net for over three years now. The project I'm working on is designed with a 3-layer presentation/business/data design. The presentation layer is an ASP.net web site. The business and data layer are also in .net, with the data layer working with a SQL server. Recently, I've had to add several new screens to my ASP.net web application. The order from my customer was essentially, "Take these Excel Spreadsheets and put them on the web so that I don't have to pass them around to the different people who make edits and I don't have to worry about keeping track of the changes." Sounds simple, right? Well, I've been doing this, but I feel as if I'm making the project more difficult than it needs to be. I'd like to tell you how I've done this and I'd like to know how I can improve my process. (1) I showed the spreadsheets to my DBA who created a table for each spreadsheet with a column for each column on the spreadsheet. Let me emphasize that in my office, only the DBA is allowed to change anything about the structure of the data in SQL. (2) I created functions in my business and data layers that   (a) Get the rows from the tables.   (b) Insert rows.   (c) Update rows. (3) I coded an ASP.net web page to user the ASP.net GridView to display the tabular data to the user. There is one button the user can click to add a new row and another button the user can click to edit an existing row. (4) I wrote JavaScript so that upon a button click, the user sees a form he can use to add a new row or edit an existing row. (5) I wrote some ASP.net page methods that allow the user to send changes back to the ASP.net server using AJAX once he fills out the form. (6) I wrapped the ASP.net GridView in an ASP.net UpdatePanel so that the table can be refreshed without reloading the whole page. That is my process. I've been doing this for each spreadsheet I received from my customer. I feel like there ought to be a better way to do this. I have a co-worker who really likes the DHTMLX stuff, but that would only possibly replace or simplify steps 4 and 6. What is a better way to accomplish what my customer wants?


title: run local php/database application on windows pc without wamp

text: I have a php/mysql applications which I designed, and the client doesn't want it to be online (installed on a webserver) or available on the internet, he wants his employees to use it on a local system. I don't want them to go through the process of starting up wamp to access the program, is there a simple way to make php web programs run on a local windows pc? using mysql database?


title: What can multiple threads do that a single thread cannot?

text: While threads can speed up execution of code, are they actually needed? Can every piece of code be done using a single thread or is there something that exists that can only be accomplished by using multiple threads?


title: What part of your work does a company own when you program for them?

text: Say you're a software engineer, what does the company actually own of your work? Do they own the source code, the binary, both? What about code you do outside of the workplace? Do they have any claim to that? I was just wondering from a legal standpoint how that all works.


title: What is the benefit of a visual editor over straight programming?

text: I'm trying to figure out what the benefit to having a WYSIWYG HTML editor over hard coding, outside of, say, accessibility. It seems like a waste of time to learn how to use something like Dreamweaver over Notepad++. Am I missing something here? Every time I've ever used one, I end up going back into the code to fix the problems the visual editor made.


title: Scrum - real life example?

text: I'm starting with scrum and saw many partial examples on books and tutorials, but when try to use scrum in the real life, it's not easy to write the user stories and create the product backlog. I want to see a real project with user stories, product backlog and sprint backlogs to see if I'm doing it in the correct way. Is there any open source project with a public product backlog ? Is there any shared complete user stories and product backlog from a real project?


title: Reading data from file and const

text: Is it sane to let a read method on a file object to be const? For example               size_t read(void* buffer,size_t length) const;      The read method does not change the contents of the file, but updates the file pointer which is invisible behind a handle.


title: admin-over-clients application

text: I have the same web application running on several different servers. Now I want a central place to administer everything in one web interface. What is the best way to do this? Should I provide a REST interface on every web application and let the admin application make all the calls? This seems like a common problem that's already been solved by smarter people than me. UPDATE: I want to change the application data per web application + see the results per web application


title: How concerned about load balancing do I need to be?

text: I'm currently working on a project which will have client applications (desktop & android & web) communicate with varies processes running on a server(s). My question is how much should I be thinking about load balancing and the like? All projects which I have worked on before consisted of creating applications for internal use within companies so the number of connections was alwyas very low (probably no more than 50 at a time). However in my own time I decided to start creating a piece of accounting software, just because. So what I have ended up with is a WPF desktop application, and ASP.NET MVC web site and an Android App which all connect to various processes/data running on my server. On the server there is an SQL database (MS), various WCF services for communication from client to server and a few services running cleanup stuff. This works fine when I'm testing and its just me connected. However I have no idea how it will scale if a few people start connecting at once. I'm not even sure if I will release the software, let alone anyone use it! However as part of a learning exercise how should I be developing the system so that it could take on a large load and not crash/delay. I'm aware this could be a very open question and could be subjective to a lot of things, but as I say I have no experience in this department and it's something I would like to learn.


title: Why is String immutable in Java?

text: I couldn't understand the reason of it. I always use String class like other developers, but when I modify the value of it, I need to create new instance of String. What might be the reason of immutability for String class in Java? I know there are some alternatives like StringBuffer or StringBuilder. It's just curiosity.


title: Origin of structures and classes

text: What design and implementation issues did programmers have to solve when they decided first to use structures and classes? When did this happened and who were the pioneers behind these ideas? Note, this is double question, because structures and classes are related. I realize that structures are quite older than classes. It would be great if the answer would talk separately about both of them and cite some sources.


title: Algorithm for finding overlapping times

text: Part of our ERP system is a sub-system for running background jobs. We track a variety of meta-data about our jobs in a table including timestamps for submitted, started, and end times. I'm creating a report showing the performance of our job system, detailed by day. One KPI is maximum # of jobs running at once. The algorithm I'm currently using is:               dim cnt as integer    'number of overlapping jobs     dim max as integer    'maximum number of jobs running at one time          for each Job where               Job.SubmitTs = today            'bJob is a 2nd instance of Job       for each bJob where                bJob.SubmitTs =  today and                bJob.StartTs  <= Job.EndTs and                bJob.EndTs    >= Job.EndTs         cnt = cCnt + 1       next            if cnt > max then max = cnt     next      The problem with this algorithm is that it is very slow due to all the looping. I was wondering if there is a faster way to implement this? **Edit** I cannot use SQL queries to access the data.


title: Newbie worried about CASE tool

text: I'm looking for some guidance on CASE tools and whether my concerns are valid. Recently I was in a meeting between my employer and an external software company which have a CASE tool currently in beta. They demonstrated this tool to us, showing how you build a UML model in Enterprise Architect (or something like it) and then, through their tool, that UML model is transformed into a Visual Studio project, with C# files, stored procedures for SQL Server, code for the data layer, WCF stuff, logging code and allsorts. Now, admittedly, I don't see the point in this, as in I'm not convinced it will save that much time (plus it feels like overkill). The tool authors said that a trial of the tool at another company had saved a team there 5 weeks of development time (from 6 weeks down to about 1 week) using this tool. I find the accuracy of that estimate hard to believe. My main concern is whether using this tool is going slow down my productivity. For example - Say I have a UML model which I built a VS solution from. Now, I want to rename a class method to something else; will this mean having to update the UML model first and then rebuilding the code? Is this how case tools normally work? Something I will need to check with the authors is the structure of the generated VS solution. I like the Domain Driven Design way of project structure - Infrstructure, Services, Model, etc. I doubt very much this tool will do that. Also, I've been playing around with Entity Framework Code First and think it's a great way to build the data model. I have nice repositories, unit of work classes and other design patterns that work well with EF. I have data anootations and stuff like that working great. By not having EF (the CASE tool uses it's own data layer code) I'm concerned that this tool's data layer code might not be a nice to integrate in the UoW pattern, repositories, etc. This I will need to verify when I get a closer look at the generated code. What are other people's experiences with CASE tools? Am I being paranoid about nothing? Am I being unfair - are my negativities unfounded? EDIT: I like to use TDD/BDD for building my code, and using a CASE tool looks like it will make this difficult. Again, any feedback on this would be great. Cheers. Jas.


title: Architecture design for a web application that runs SSH connections to remote servers

text: This is a followup to my question here. I have to make a web GUI for a library that manages remote clusters via SSH. The main point is that this library spawns threads and subprocesses (Popen) internally (for the SSH connections), so I think I am I/O bound by these SSH connections. I want to prevent my server from going down as soon as I get 20-50 simultaneous requests. I have no idea of how to proceed with the architecture. I don't know if I can solve this at the server level with a more powerful server (gevent??) or if I should do something like using background threads (twisted reactor??) Some considerations:   * I work with django so the server (if I finally have only one) must be WSGI.   * I need both blocking and non-blocking calls via SSH.   * I will probably need shared state between successive requests as well.


title: Are square brackets and curly braces in Clojure still S-expressions?

text: I am trying to learn Lisp and looking at all the Lisps out there and their differences. I see that in some implementations of Scheme, you can use square brackets interchangeably with round brackets for readability, so because they are treated the same, I assume they are still just S-expressions like everything else. However, in Clojure I see that square brackets and curly braces are used to represent different data types like vectors and so on. Are these also still valid S-expressions, or must they be considered atoms? Doesn't this "break" the whole concept of S-expressions, thereby making Clojure an "impure" Lisp?


title: Web Developer or Software Engineer?

text: A question that I have been asking myself and really confused which path to take. So I need your guys help as to the pros and cons of these 2 professions in today's world. I love web applications development as the Web is the best thing to happen in this age and nearly everyone gets by on the World Wide Web. And also tend to keep learning about new technologies and about web services.      On the other hand I like software engineering also for the desktop applications as I have had experience with development small scale softwares in VB.Net, Java, C++, etc.      Which path has more scope and better future? Whats your view?


title: Why do some open source projects do not accept pull requests, but emailing patch files only

text: Why do some open source projects not accept pull requests, but require contributors to email patch files only? e.g. Git Although they publish code in github or other distributed scm hosting. It is not interactive nor convenient to send patch files. Patch file is an old-fashioned way. Pull requests are interactive. Other people may also discuss.


title: Is there a valid reason to wrap built in type with your own

text: I am editing some c++ and all of the built in types have been wrapped in a corresponding wrapper class. All of the operators have been overloaded to do bizarre things like operator[] coded to ignore the argument or to exactly what the underlying type would do. Is this malevolent or is there some possibility this is a good idea in some other universe.


title: What is the definition of user classes, with respect to software use?

text: I'm writing the Software Requirement Specification document for a piece of software that I am developing. A part of the SRS is the identification of the user class. Can somebody please give or refer me to definition of a user class as it relates to a software product?