title: Deduplication of complex records / Similarity Detection

text: I'm working on a project that involves records with fairly large numbers of fields (~15-20) and I'm trying to figure out a good way to implement deduplication. Essentially the records are people along with some additional data. For example, the records are likely to include personal information like first name, last name, postal address, email address, etc. but not all records have the same amount of data. Currently records are stored in a RDBMS (MySQL) and I want to detect duplicates on insertion and still have them inserted but flagged as a duplicate. It needs to be fast as I need to provide feedback as to if it is a duplicate or not in real time. The dataset is large (millions of records). I've considered the following options but I'm not sure which is best/if they are better options available:   * Use MySQL's built in fulltext search and use fuzzy searching. Major issue with this is that is seems slow, only the latest version supports fulltext indexes with InnoDB (alternative engine is MyISAM which is not good and critically does not support transactions) and fuzzy searching alone does not seem the best method for similarity detection.   * Use simhash or similar. Issue with this is that I'd also like to be able to detect synonyms which I don't see how simhash handles this. For example, address might be: "Some Road" or "Some Rd." and names might be: "Mike" or "Michael"   * Index the data using an Apache Lucene derivative (elasticsearch/solr/etc) and perform a query that would likely return numerous results. In terms of using Apache Lucene I've been reading about similarity detection and using cosine similarity to produce a value from 0 to 1 from the term frequency vectors that lucene stores. I could apply this to the results from the lucene query and check to see if any of the results are above a certain threshold. My concern about this is how relevant the cosine similarity would be for the type of data I'm storing, i.e a number of fields with either single or a small number of words compared to calculating the cosine similarity of a comparison of some large text document. Basically, I'm wondering what is the best way to deduplicate this type of data (or put alternatively, detect similarities with this type of data)?


title: Why is the output of a compiler called object code?

text: From the essay _Programming Languages Explained_ by Paul Graham, published in _Hackers & Painters_: > The high-level language that you feed the compiler is also known as _source > code_ , and the machine language translation it generates is called _object > code_. From the Wikipedia article on object code: > Object code, or sometimes object module, is what a computer compiler > produces. From a definition of 'compiler': > Traditionally, the output of the compilation has been called object code or > sometimes an object module. (Note that the term "object" here is not related > to object-oriented programming.) So what _is_ the term object related to?


title: The Lisp in Gnu

text: Since the GNU project is celebrating its anniversary, and the initial announcement for GNU is linked to (http://www.gnu.org/gnu/initial- announcement.en.html) all over the place, I reread it and I stumbled upon the plan for a lisp-based window system: > and eventually a Lisp-based window system through which several Lisp > programs and ordinary Unix programs can share a screen. It is well known that Stallman had a lisp background and has launched lisp- based projects (Emacs, Guile). As I understand, Stallman's preferred desktop environment for the GNU system is nowadays GNUstep (which seems to be a little dormant). When looking at demonstrations of Symbolics Lisp machines, I am really impressed by the powerful approach and I think that Stallman had something like this in mind during the announcement. So I wonder: **What happened to this plan of a Lisp-based window system? Has it been actually pursued once?**


title: Real-Time Multi-User Gaming Platform

text: I'm considering developing a real-time multi-user game, and I want to gather some information about possibilities before I do some real development. I've thought about how best to ask the question, and for simplicity, the best way that occurred to me was to make an analogy to the field (or playground) game darebase. In the field game of darebase, there are two or more bases. To start, there is one team on each base. The game is a fancy game of tag. When two people meet out in the field, the person who left his base most recently timewise captures the other person. They then return to that person's base. Play continues until everyone is part of the same team. So, analogizing this to an online computer game, let's suppose there are an indefinite number of bases. When a person starts up the game, he has a team that is located at, for example, his current GPS coordinates. It could be a virtual world, but for sake of argument, let's suppose the virtual world corresponds to the player's actual GPS coordinates. The game software then consults the database to see where the closest other base is that is online, and the two teams play their game of virtual tag. Note that the user of the other base could have a different base than the one run by the current user as the closest base to him, in which case, he would be in two simultaneous battles, one with each base. When they go offline, the state of their players is saved on a server somewhere. Game logic calls for the players to have some automaton-logic of some sort, so they can fend for themselves in a limited way using basic rules, until their user goes online again. The user doesn't control the players' movements directly, but issues general directives that influence the players' movement logic. I think this analogy is good enough to frame my question. I've been looking at smartfoxserver, but I'm not convinced yet that it is the best option or even that it will work at all. One possibility, of course, would be to roll out my own web server, but I'd rather not do that if there is an existing service out there already that I could tap into. Note that darebase is not the game I intend to implement, but, upon reflection, that might not be a bad idea either. What I'm looking for, specifically, is an appropriate architecture that can do the following things:   * Act as a repository of saved game states   * Provide a framework that allows multiple players to communicate with each other.   * (optionally) executing some of the gaming logic, for example, in the game of darebase, who determines who tagged whom? Is it one or both clients or is it the server? I've never been involved with such a multi user real-time environment, so I can only guess at the pitfalls of one decision vs. another.


What is the verb for "to make something into a plugin"? Example use: "Developer can you make Module Foo into a plugin?". "Yes sir, I can `some verb` Module Foo". Terms I have considered: pluginify, pluginize, make pluggable Criteria for Acceptance: A single verb which means "to make something into a plugin" or "to create something as a plugin". _I am looking for a term which is already in use_ as opposed to a new one.


title: Java Dynamic Binding

text: I am having trouble understanding the OOP Polymorphic principl of Dynamic Binding ( Late Binding ) in Java. I looked for question pertaining to java, and wasn't sure if a overall answer to how dynamic binding works would pertain to Java Dynamic Binding, I wrote this question. Given:               class Person     {          private String name;               Person(intitialName)          {               name = initialName;          }               // irrelevant methods is here.               // Overides Objects method          public void writeOutput()          {               println(name);          }     }          class Student extends Person     {               private int studentNumber;               Student(String intitialName, int initialStudentNumber)          {          super(intitialName);          studentNumber = initialStudentNumber;          }               // irrellevant methods here...               // overides Person, Student and Objects method          public void writeOutput()          {           super.writeOutput();           println(studentNumber);          }          }          class Undergaraduate extends Student     {               private int level;               Undergraduate(String intitialName, int initialStudentNumber,int initialLevel)          {          super(intitialName,initialStudentNumber);          level = initialLevel;          }               // irrelevant methods is here.               // overides Person, Student and Objects method          public void writeOutput()          {           super.writeOutput();           println(level);          }            }      I am wondering. if I had an array called person declared to contain objects of type Person:                 Person[] people = new Person[2];       person[0] = new Undergraduate("Cotty, Manny",4910,1);       person[1] = new Student("DeBanque, Robin", 8812);      Given that person[] is **declared** to be of type **Person,** you would expect, for example, in the third line where person[0] is initialized to a new Undergraduate object,to only gain the instance variable from Person and Persons Methods since doesn't the assignment to a new Undergraduate to it's ancestor denote the Undergraduate object to access Person - it's Ancestors, methods and isntance variables... Thus ...with the following code I would expect                 person[0].writeOutput();  // calls Undergraduate::writeOutput()       person[1].writeOutput();  // calls Student::writeOutput()       person[0] to not have Undergraduate's writeOutput() overidden method, nor have person[1] to have Student's overidden method - writeOutput(). If I had               Person mikeJones = new Student("Who?,MikeJones",44,4);     mikeJones.writeOutput();      The Person::writeOutput() method would be called. Why is this not so? Does it have to do with something I don't understand about relating to arrays? Does the declaration Person[] people = new Person[2] not bind the method like the previous code would?


title: What's stopping Oracle from supporting identity (auto-numeric) columns?

text: EDIT: As gavenkoa's answer points out, Oracle Database 12c (released a couple of years after this question was asked) has support for Identity Columns. * * * As far as I know, Oracle's RDBMS is one of the few (the only?) SQL database products that doesn't support identity/autonumeric columns. The alternative offered by Oracle is database sequences, a feature in many ways much more powerful than auto-numeric columns, but not equivalent. It is not that I don't like sequences. What I hate is having a different programming model for generating row identity values between Oracle and any other database. For example, I often try to setup HSQL or SQLite for java apps that will eventually run over an Oracle database when I'm not working specifically on the data layer (just as a stub or mocking database). I cannot do that easily because I need different set of SQL DDL scripts: one for Oracle, and one for everyone else; I also need two sets of Hibernate mapping files if I'm using Hibernate. What I find intriguing is that Oracle Database, being one of the most complete and robust enterprise software packages of the last decade hasn't put that seemingly basic feature in their product, but almost any other RDBMS, even the smaller ones, has it. Why? Why doesn't oracle support a sequence-based identity column shortcut syntax that dumb and lazy people like me can use? The only reason I can think of is that Oracle does that on purpose as a vendor lock-in strategy so your code is harder to migrate to other RDBMS where your database sequences cannot be used. Or maybe I'm just wrong and confused? Please enlighten me.


title: How does your company manage knowledge and information?

text: I am interested in the architecture, methods and software used by your company to capture and store knowledge. Is the information easily searchable (especially by non-techies) ? Is it stored in a central repository or in several places ? Do you find the current implementation adequate ? What could be improved ?


title: Output an Access Report As PDF on Windows 8 from a VB6 Application

text: I am working with VB6 and Microsoft Access 2013 and Windows 8. I am trying to output an access report as a pdf from a VB6 application. I have this code:               Public Sub OpenReport(sReportName As String, frmCallingForm As Form)            Dim objAccess As Access.Application       Dim lResult   As Long              Dim Path As String         Path = Environ$("AppData")                 Set objAccess = New Access.Application            With objAccess         On Error GoTo ErrHndlr         .OpenCurrentDatabase App.Path & "\" & "OrderBackEnd.mdb"         .DoCmd.OutputTo acOutputReport, sReportName, acFormatPDF, Path & "\rpt" & sReportName & ".pdf", False         .Visible = True         On Error GoTo 0         .Quit acQuitSaveNone       End With            Set objAccess = Nothing            lResult = ShellExecute(frmCallingForm.hWnd, "Open", Path & "\rpt" & sReportName & ".pdf", 0&, 0&, 3)          Exit Sub     ErrHndlr:       objAccess.Visible = True       MsgBox Err.Number & ":" & Err.Description          End Sub      The problem is the output gets hung and freezes the system. When I terminate the application I notice the below box in the background of my form. The only way to see the below box is to End Task on the VB6 application. It appears to not be associating the acFormatPDF in OutputTo line. Is there any way to resolve this issue or a workaround? If I manually do this process in Access it works fine. ![enter image description here](http://i.stack.imgur.com/KJCAL.png)


title: Applying the principles of Clean Code to functional languages

text: I'm currently reading Robert Martin's _Clean Code_. I think it's great, and when writing OO code I'm taking his lessons to heart. In particular, I think his advice to use small functions with meaningful names makes my code flow much more smoothly. It's best summed up by this quote: > [W]e want to be able to read the program as though it were a set of TO > paragraphs, each of which is describing the current level of abstraction and > referencing subsequent TO paragraphs at the next level down. ( _Clean Code_ , page 37: a "TO paragraph" is a paragraph that begins with a sentence voiced in the infinitive. "To do X, we perform steps Y and Z." "To do Y, we..." etc.) For example: > TO RenderPageWithSetupsAndTeardowns, we check to see whether the page is a > test page and if so, we include the setups and teardowns. In either case we > render the page in HTML I also write functional code for my job. Martin's examples in the book definitely do read as if they were a set of paragraphs, and they're very clear -- but I'm not so sure that "reads like a set of paragraphs" is a desirable quality for functional code to have. Taking an example out of the Haskell standard library:               maximumBy               :: (a -> a -> Ordering) -> [a] -> a     maximumBy _ []          =  error "List.maximumBy: empty list"     maximumBy cmp xs        =  foldl1 maxBy xs                             where                                maxBy x y = case cmp x y of                                            GT -> x                                            _  -> y      That is about as far away as you can possibly get from Martin's advice, but that's concise, idiomatic Haskell. Unlike the Java examples in his book, I can't imagine any way to refactor that in to something that has the sort of cadence he asks for. I suspect that Haskell written to the standard of _Clean Code_ would come off as long-winded and unnatural. Am I wrong to consider (at least some of) _Clean Code_ at odds with functional programming best practices? Is there a sensible way to reinterpret what he says in a different paradigm?


title: Ethics, Clients, and legal repercussions

text: I'm asking this after reading a SO question where the OP asked for help decoding obfuscated code, which looks like it belongs to a closed-source company. The OP's client is saying " _I don't know the full legal particulars of the contract (if there was one) for the code development. They claim it was fully paid for and released to them. If the code development was completely outside the scope and use of Ioncube, then it's debatable if it is unethical._ " To me the whole thing stinks of: the client bought the product and hired the OP to decode it, but either doesn't understand he didn't buy a licence to modify, distribute, reverse engineer, or reproduce the software. But it's easy to just accept a job and say "whatever" to these sorts of things, but there is room for this to be legit. What considerations should we take to ensure we're doing the right thing, and furthermore protect ourselves?


title: What's the difference between a "developer" and a "developer-analyst"?

text: At larger companies there seems to be a distinction between the two positions. How exactly do they differ?


title: What are the pros and cons of having a life partner from the same field?

text: Having a life partner definitely affects an individual's career. For e.g. A programmer spends hours on the computer for work. A spouse working in the same field as yours would not mind adjusting with the household chores. On the other hand, a partner from some other field will not understand the significance of your work, and this may create problems in one's married life. Apart from this factor, what do you think are the other factors which are affected with the choice of partner from the same field? And how useful it is for programmers to have a spouse from the same field as you are working?


title: How does trilicense (mpl,gpl,lgpl) work when you want to use it on public website

text: I have tried to search for this answer for quite some time and I have gone through all the various FAQ's and documentation regarding the three licenses; but none of them have been able to answer a question that I have. So I've been working an idea for a website for sometime now and recently I found open source software that has many of components that are similar. It is licensed under the mpl/gpl/lgpl licenses. I think for the most part I understand the ramifications, due to the searches and reading, of what is required if I modify/use and want to distribute the software. But what if I want to modify and not distribute, but use it on a public website that I generate ad revenue from? Is this illegal? It doesn't seem like it is from reading other open source system, say like Drupal, where they allow you to use the software but it's not considered "distribution" if people just go to the website. I know this site may not be the best resource and I've tried some other sites, but I haven't received any clear replies back. If you know some other resource that I could contact also, please let me know. Links for those who don't know:   * MPL - Wikipedia, Legalese   * GPL - Wikipedia, Legalese   * LGPL - Wikipedia, Legalese


title: How to retain familiarity with previously worked on technology/language/feature

text: One problem that I have faced over the years is that when I stop using a technology (COM,QT)/language (VBScript)/feature (Templates) for development over the time I lose skill in that. What in your opinion is the "easiest" way to retain familiarity so that when I come back to any of them, effort for relearning is minimal.


title: rails fake data, considering switch from faker to forgery, any advantages or pitfalls?

text: With Ruby on Rails I've usually used **Forgery** for generating dummy data for testing. I've noticed recently that several clients and tutorials are using **Faker** They both seem fairly similar in use and popularity:   **Faker** 128 forks, 418 watchers.   **Forgery** 59 forks, 399 watchers. They both seem similar in how current they are:   **Faker** Most updates are from 6 and 9 months ago.   **Forgery** Most updates are from 4 and 9 months ago. The one distinguishing factor I've found so far is that **Forgery** seems like it has better instructions. Are there any particular _benefits_ or _disadvantages_ to using one over the other?   Have you ever needed to switch from one to another for a particular reason?


title: How does one unit test an algorithm

text: I was recently working on a JS slideshow which rotates images using a weighted average algorithm. Thankfully, timgilbert has written a weighted list script which implements the exact algorithm I needed. However in his documentation he's noted under todos: "unit tests!". I'd like to know is how one goes about unit testing an algorithm. In the case of a weighted average how would you create a proof that the averages are accurate when there is the element of randomness? Code samples of similar would be very helpful to my understanding.


title: Develop for Desktop and mobile use?

text: I am in the very beginning of developing an app / desktop program. I want it to be cross-platform and possibly also as a tablet version (preferably Android Icecream sandwich). Note that I need to run it offline. I thought about the following approaches:   * ADOBE Air, since I do not need much performance. Plus I did some web programming in the past which might be of some use. Afaik it would run on OS X and Windows and should run on mobile OSes, too.    * Qt. Found some nice Qt based desktop recently and read it also works on android. Plus I like the SDK.    * HTML5 / JS. Again my web background should help me here. I wont need no sever side scripts, thus it should work without installing anything but a browser. How easy could this be converted into an Android app? There might be a plethora of other (better) ways to do it, but I haven't thought of them yet. Can you help out? How would you create such an application. Would it be better to do some pure desktop client and then create tablet versions? Would you rather start to create a website and worry later on how to turn into an app?


title: CQRS + Event Sourcing: (is it correct that) Commands are generally communicated point-to-point, while Domain Events are communicated through pub/sub?

text: Didn't know how to shorten that title. I'm basically trying to wrap my head around the concept of CQRS ( http://en.wikipedia.org/wiki/Command-query_separation) and related concepts. Although CQRS doesn't necessarily incorporate Messaging and Event Sourcing it seems to be a good combination (as can be seen with a lot of examples / blogposts combining these concepts ) Given a use-case for a state change for something (say to update a Question on SO), would you consider the following flow to be correct (as in best practice) ? The system issues an aggregate UpdateQuestionCommand which might be separated into a couple of smaller commands: UpdateQuestion which is targeted at the Question Aggregate Root, and UpdateUserAction(to count points, etc) targeted at the User Aggregate Root. These are send asynchronously using point-to-point messaging. The aggregate roots do their thing and if all goes well fire events QuestionUpdated and UserActionUpdated respectively, which contain state that is outsourced to an Event Store.. to be persisted yadayada, just to be complete, not really the point here. These events are also put on a pub/sub queue for broadcasting. Any subscriber (among which likely one or multiple Projectors which create the Read Views) are free to subscribe to these events. The general question: Is it indeed best practice, that Commands are communicated Point-to-Point (i.e: The receiver is known) whereas events are broadcasted (I.e: the receiver(s) are unknown) ? Assuming the above, what would be the advantage/ disadvantage of allowing Commands to be broadcasted through pub/sub instead of point-to-point? For example: When broadcasting Commands while using Saga's (http://blog.jonathanoliver.com/2010/09/cqrs-sagas-with-event-sourcing-part-i- of-ii/) could be a problem, since the mediation role a Saga needs to play in case of failure of one of the aggregate roots is hindered, because the saga doesn't know which aggregate roots participate to begin with. On the other hand, I see advantages (flexibility) when broadcasting commands would be allowed. Any help in clearing my head is highly appreciated.


title: How to ...set up new Java environment - largely interfaces

text: Looks like I need to setup a new Java environment for some interfaces we need to build. Say our system is X and we need to interfaces to systems A, B and C. Then we will be writing interfaces X-A, X-B, X-C. Our system has a bus within it, so the publishing on our side will be to the bus and the interface processes will be taking from the bus and mapping to the destination system. Its for a vendor based system - so most of the core code we can't touch. Currently thinking we will have several processes, one per interface we need to do. The question is how to structure things. Several of the APIs we need to work with are Java based. We could go EJB, but prefer to keep it simple, one process per interface, so that we can restart them individually. Similarly SOA seems overkill, although I am probably mixing my thoughts about implementations of it compared to the concepts behind it... Currently thinking that something Spring based is the way to go. In true, "leverage a new tech if possible"-style, I am thinking maybe we can shoe horn some jruby into this, perhaps to make the APIs more readable, perhaps event- machine-like and to make the interface code more business-friendly, perhaps even storing the mapping code in the DB, as ruby snippets that get mixed in... but thats an aside... So, any comments/thoughts on the Spring approach - anything more up-to- date/relevant these days. EDIT: Looking a JRuby further, I am tempted to write it fully in JRuby... in which case do we need any frameworks at all, perhaps some gems to make things clearer... Thanks in advance, Chris


title: Explanation on how "Tell, Don't Ask" is considered good OO

text: This blogpost was posted on Hacker News with several upvotes. Coming from C++, most of these examples seem to go against what I've been taught. Such as example #2: Bad:               def check_for_overheating(system_monitor)       if system_monitor.temperature > 100         system_monitor.sound_alarms       end     end      versus good:               system_monitor.check_for_overheating          class SystemMonitor       def check_for_overheating         if temperature > 100           sound_alarms         end       end     end      The advice in C++ is that you should prefer free functions instead of member functions as they increase encapsulation. Both of these are identical semantically, so why prefer the choice that has access to more state? Example 4: Bad:               def street_name(user)       if user.address         user.address.street_name       else         'No street name on file'       end     end      versus good:               def street_name(user)       user.address.street_name     end          class User       def address         @address || NullAddress.new       end     end          class NullAddress       def street_name         'No street name on file'       end     end      Why is it the responsibility of `User` to format an unrelated error string? What if I want to do something besides print `'No street name on file'` if it has no street? What if the street is named the same thing? * * * **Could someone enlighten me on the "Tell, Don't Ask" advantages and rationale?** I am not looking for which is better, but instead trying to understand the author's viewpoint.


title: What is the significance of each paragraph of the GPL "copying permission statement"?

text: Part of the FSF's instructions for placing a program under the GPL is including the following "copying permission statement" at the top of your file, under the copyright notice:               This program is free software: you can redistribute it and/or modify     it under the terms of the GNU General Public License as published by     the Free Software Foundation, either version 3 of the License, or     (at your option) any later version.          This program is distributed in the hope that it will be useful,     but WITHOUT ANY WARRANTY; without even the implied warranty of     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     GNU General Public License for more details.          You should have received a copy of the GNU General Public License     along with this program.  If not, see <http://www.gnu.org/licenses/>.      I am wondering what is the significance of each paragraph in this statement. In particular, for a program that I am about to release under the GPL, I am considering omitting the second and third paragraphs to reduce the length of the statement, and I'm wondering what would be the negative consequences (if any) of doing so.


title: Convincing a Client to Offer a RESTful Web Service instead of a SOAP Service?

text: ### BACKGROUND: I develop custom WordPress plugins for my clients that they then distribute via the WordPress plugin repository. I'm increasingly running into clients who want my WordPress plugins to consume SOAP web services developed by their internal development teams _(and as an aside, thus far every one of these SOAP web services have been developed using ASP.NET)._ From my experience, especially within the realm of WordPress plugin development, interacting with RESTful web services is almost always trivial, and they just work. From my admittedly third-hand knowledge of actually consuming SOAP web services via WordPress plugins, especially ones that are widely distributed to mostly non-technical WordPress users, embedding a SOAP client is fraught with peril as there are so many things that can cause a SOAP web service call to fail; wrong local SOAP stack, missing local SOAP stack, malformed service response, etc. etc. What I am finding is that many of the business people in decision-making positions within my _(prospective)_ clients have little-to-no knowledge of the tangible differences between RESTful web services and SOAP-based web services. To these people a web service is a web service; it's 6 of one, 1/2 dozen of the other. They tend to think _"What's with all the fuss?"_ Further the ASP.NET developers at these client, developers who have been immersed in the Visual Studio toolset have been conditioned by Microsoft's excellent developer tools marketing to see SOAP as the easy way; just add Visual Studio and the SOAP web service works like magic! And it does, at least until you try to use some other stack to access the web service and/or until you are trying to get people who are not using Visual Studio or adopt the web service; then the picture is very different. When these developers hear me advocate they implement a RESTful web service instead if I get push back I am getting one of two responses; they say:   1. _"Why go to all the effort of creating a RESTful web service when I've already created a SOAP web service for you to use? You are just creating more work for me and I have other things to do."_   2. _"There is no benefit to RESTful web services; SOAP is actually much better because I can create an object and then I can program it just like an object. Plus SOAP is used by enterprise developers and we are an enterprise development shop; REST is just not for serious use."_ As an aside I think one reason I get these responses is because ASP.NET developers often have little-to-no exposure to REST _(isn't this article really on the fringe for most ASP.NET developers?)_ I think they really don't know how little work it takes to create an HTTP `GET`-only RESTful web service once they already have all the code implemented for a SOAP web service. And I think this happens because Microsoft's approach is to give tools to developers so they don't feel the need to learn the details. Since Visual Studio claims to take care of so many things for developers why should a developer care to learn anything that Visual Studio claims to handle? I know that's what I thought when I used to code web sites for the Microsoft platform. It wasn't until I moved to PHP that I realized what HTTP headers were and that I realized the difference between a 301 and a 302 HTTP status code, and most importantly that I realized these concepts were both easy to understand and vitally important to understand if one wants to create a robust and effective site on the web. * * * ### MY QUESTION: **What I am asking is how do I counter these responses and get my prospective clients to consider creating a RESTful web service?** How can I get them to see the many benefits that using a RESTful web service can offer them? Also how can I get them to see the large potential downside of releasing a WordPress plugin that potentially incurs a large support cost? * * * ### NOTE: If you disagree with my premise that calling RESTful web services are preferable to calling SOAP web services from within a WordPress plugin then please understand that I'm asking for help from people who agree with my premise and _ideally I'm not looking to debate the premise._ However if you feel the need to argue then please do so in a respectful manner recognizing that we each have the right to our own opinions and that you might never be able to sway me to agree with yours. Which of course, should be okay.


title: Queue in facebook games [looking for opponent and such]

text: I've seen many games on FB have queue which connects you to an opponent you should be playing against. So my question is: In which language can it be coded? Is it possible to do it in PHP/Javascript? Does anyone have any real/live example or tutorial how is this done? Thanks in advance!


title: Are there any theories or books about how to debug "in general"?

text: I read and studied a lot of computer science and engineering and I rarely or never seen a book about debugging or a theory how to debug (though I surely developed some debugging theories of my own). Are there any debugging theories and/or books? Why / why not? I can read how to debug using gdb and some of the most useful info about development I got from reading how to use gdb.


How can we handle multiple instances of a method through a single class instance(Single constructor call)? To elaborate, I have a handler class which has two methods lets say `verifyUser(String JSON)` and `getUserInfo(String JSON)`. Assuming that there are many users accessing this methods, there will be multiple instances of these methods. The handler class should be initialized once. I.e. multiple objects of this class are not permitted, rather multiple method instances are allowed. What will be the ideal solution for enabling concurrent method calls without corrupting data while executing?


title: Refactoring While Programming

text: When posed with a problem, particularly when it is complicated in nature, I try to take some time to think about the approach I am going to take to solve the problem. Despite this, what often happens is, as I am programming the solution, I start to think of details of the problem that I missed, and I adjust the code accordingly. What results is a mess of code that needs to be refactored. I want to "refactor as I go," but while it sounds easy enough to do, I have a really hard time doing it. When the detail that I missed is small, it is tempting to make a small update to my design, rather than erase what I've already written and write it the way it is supposed to be. It sounds like a question with an obvious answer, but are there any techniques to use to better "refactor as you go"? I know that this is a good principle, but I fail with it time and time again.


title: TFS Branching Advice

text: I am new to Branching and Merging but I have been tasked with making future development on an application possible while still allowing bug fixes to production. Usually I am the only developer on the application unless I am on leave. I have watched a Pluralsight video on Branching and done some forum/stack reading. I was hoping someone could take a look at my solution proposal and critique. I am concerned I will cause more problems than solutions if I get this wrong > As of Version 1.1.0.0 I have introduced a branching system for future > development. Version 1.1.0.0 is our production branch. No changes should > appear here except bug fixes. Version 1.2.0.0 is the next version and our > development branch. > > After completing a development, the development branch will merge to the > Application (trunk). The application will be deployed for testing. After > sign off the development branch becomes production, the previous version > branch will be removed. A new branch will be created for the next version. > > For bug fixing, the bugs are fixed against the production branch and merged > to the application so when the development branch merges down it also > obtains those fixes.


title: How do I go about hosting facebook apps that are picking speed?

text: My situation is this. I coded in php and built a facebook app. After 3 days it has 13,000 users. I have my own server at hostmonster. It is a regular plan costing me about $70 per year. It has unlimited bandwidth. I did not anticipate hosting apps or that it could pick up so many users. Already 1 Gb of data was transferred in the last few days. I am planning to build a few more apps(around 10 - 20) and reach atleast a million users in total. Should I continue hosting on the same server or move to a VPS? I am a student and I don't have too much of a disposable income. So I want to move only if it is necessary. Right now it shows 1 Gb/infinity in data transfer. Any help/suggestions highly appreciated.


title: Interview for UX/UI Javascript

text: I am interviewing for a job where the requirements are for...               UX practice with UI and Javascript expertise      I am expecting questions perhaps about MVC, maybe some specific frameworks, like backbone, yui, or jQuery UI. Are there any good resources to prepare me for the interview? Any obvious things I should look into beforehand?


title: Rest API and caching data

text: I have developed an application where you should be able to browse products catalog( **READ ONLY** ) even network access is down no wifi or 3g/lte etc. Clients(windows,ios,android etc) consume the rest api. So far There is a REST api that grabs parts like categories with products and other api call to get preferences etc. This adds logic at client like joining them together something that developers dont like. Also we need to add multiple pricebooks for each product. Current proposed solution demanded by team was to require network for this operation and get products with price of the pricebook. As the ideal solution would be to ask for what is needed everytime this isnt real solution as it would degrade performance and would make offline usage impossible. So I believe that each client probably should just store at a simple local database the data and resync based on some versioning?Products/catalogs change about 1 time per month.


title: Returning view code in an API response

text: I have an API that returns a JSON formatted array of users within a given pair of lat/ long bounds. I'm using this data to plot a number of markers on a map, based on the location of each user. I also want to render a HTML list on each client request so that I can show the list of plotted users alongside the map. What is the best way to get the list HTML to the client? To me it seems like an incorrect solution to return the HTML for the user list _within_ the initial API call (response.html, or something), although this feels like I'm shoe-horning functionality into an otherwise clean API response. I also don't want to make two API calls (one for the initial data and one for the HTML), for obvious reasons (overhead). Finally, I don't want to generate the HTML client-side (in JavaScript), as I already have a class to do this for me server-side. What options does that leave me with? Thanks


title: Does this version of insertion sort have O(n) complexity for best case?

text: for ( i = 1 ; i <= N ; i++ )     {       for ( j = 0 ; j < i ; j++ )       {         if ( arr[j] > arr[i] )         {           temp = arr[j] ;           arr[j] = arr[i] ;                for ( k = i ; k > j ; k-- )             arr[k] = arr[k - 1] ;                arr[k + 1] = temp ;         }       }     }      Source: http://programminggeeks.com/c-code-for-insertion-sort/ If not, can it really be called insertion sort? This version of sort is there in a book from reputed author originally.


title: Declarative Transactions in Node.js

text: Back in the day, it was common to manage database transactions in Java by writing code that did it. Something like this:               Transaction tx = session.startTransaction();     ...     try {        tx.commit();     } catch (SomeException e){        tx.rollback();     }      at the beginning and end of every method. This had some obvious problems - it's redundant, hides the intent of what's happening, etc. So, along came annotation-driven transactions:               @Transaction     public SomeResultObj getResult(...){              ...     }      Is there any support for declarative transaction management in node.js?


title: Finding Speakers for a Conference

text: Heroku has offered to sponsor a conference run by my Ruby user group, and wondering if anyone has suggestions for finding, selecting, and managing speakers. Related Question: How do you ask or get asked to speak at a software conference?


title: Most Active Open Source C# Projects?

text: I am looking for open source projects being done in C# that are actively looking for developers and does not mind the person coming in from a C++ background. Any pointers appreciated.


title: How to balance programming projects between feasibility and usefulness

text: I've become fairly competent as a programmer, but I would not say I am a master. I work independently, most as a hobby, although I have done some freelance PHP work. I tend to find myself dabbling in a lot of things: Java Android SDK, Arduino, game scripting, Lua, etc. I've reached the point where I want to start a real software project, but cannot think of a small enough project that allows me enough practice, while still being able to publish a decent piece of software in a reasonable amount of time, and build up a portfolio. More specifically, I was looking at Ubuntu development, in Python, using the Quickly toolset, which includes the PyGTK libraries. So the question is, what is the best way to come up with a small project that is still useful, as a starting point to a software development career?


title: How to inspire an intern with programming?

text: The situation is this - we took an intern for a summer with a mind that if he will catch up during summer, we will keep him as a part time junior developer.   We took him after his first year in university, so his knowledge was way too low to be involved into real projects(actually he programmed only in university), so my task was to push as much stuff as I can to have him ready for joining real projects in September. As long as we are remote developing team, we gave him possibility to have its internship remotely, with flexible hours. So two months passed and I'm not impressed with his progress. I gave several tasks to implement, access to learning resources, recommended start paths and so on, agreed that he will report every couple days, we had pair sessions from time to time, reviewed his code together and etc. Anyway, it looks like he spent less time writing code than I expected and before I would say that he didn't performed well enough to join our team, I was thinking may be that is my fault, may be I was pushing too much stuff, that is important in real life projects (like unit testing, structuring code, database stuff, etc.) and not enough fun stuff, that would hook up him on programming and that is the reason he spent less time than I hoped. So I have ~20 days left and I can use them to inspire him with programming, question is with what and how?


title: Is there a programming language where 1/6 behaves the same as 1.0/6.0?

text: While I was programming in C++ some days ago, I made this mistake (that I have history of making it!). In one part of my code, I had 1/6 and I was expecting it be 0.16666666666 which is not the case. As you all know the result is 0 - C, C++, Java, Python, all behave the same. I post it on my Facebook page and now there is debate on if there is a programming language where `1/6` behaves the same as `1.0/6.0`.


title: Test case as a function or test case as a class

text: I am having a design problem in test automation:- Requirements - Need to test different servers (using unix console and not GUI) through automation framework. Tests which I'm going to run - Unit, System, Integration Question: While designing a test case, I am thinking that a Test Case should be a part of a test suite (test suite is a class), just as we have in Python's pyunit framework. But, should we keep test cases as functions for a scalable automation framework or should be keep test cases as separate classes(each having their own setup, run and teardown methods) ? From automation perspective, Is the idea of having a test case as a class more scalable, maintainable or as a function?


title: Does the deprecation of mysql_* functions in PHP carry over to other Databases(MSSQL)?

text: ### I'm not talking about MySQL, I'm talking about Microsoft SQL Server I've been aware of PDO for quite some time now, standard mysql functions are dangerous and should be avoided. http://php.net/manual/en/function.mysql-connect.php But what about the MSSQL function in PHP? They are, for most purposes, identical sets of functions, but the PHP page describing mssql_* carries no warning of deprecation. http://us.php.net/manual/en/function.mssql-connect.php There are PDO drivers available for MSSQL, but they aren't quite as readily available or used as the MySQL drivers. Ideally, it looks to me like I should get them working and move from mssql_* to PDO like I have with MySQL, but is it as big of a priority? Is there some hidden safety to MSSQL that means it's exempt from all of the mysql_* hatred as of late? Or is its obscurity as a backend the only reason there hasn't been more PDO encouragement?


title: What are some general guidelines for setting up an iOS project I will want to personally publish but sell in the future?

text: I have an idea for a personal iOS project that I would like to write and release to the iOS store. I'm the type of developer who enjoys developing and publishing. I want to write quality software and take care of my customers. Assuming that I wrote an application that had reasonable success, there is a fair chance that I would want to sell the ownership rights of the app to another party and I'd use the proceeds to develop my next personal project which, in turn, I'd probably want to sell in the future. With that said, what are some general guidelines for creating, making and publishing an iOS project that I will eventually want to transfer to another company/developer? I know this is a bit of a broad question, but I request that the given advice be a general list of tips, suggestions and pitfalls to avoid. If any particular bullet point on your list needs more explanation, I'll either search for the answer or post a new question specific to that requirement. Thank you! **Note Regarding this Question** I am posting this question on Programmers.SO because I think that this is an issue of software architecting, seeking advice for setting a new application project and publishing a project to the Apple iOS store-- all within the requirements for questions on this site. **UPDATE** \- 2012-09-14 I would further like to request that if anyone is aware of a good article on a case study of such a transition, I would consider that a good answer as well. Such an article may not have all the answers, but it could outline quite a few of the pitfalls which should be avoided. Apps are sold to other holding companies on a semi-frequent basis. Often, it happens when a small app becomes a runaway success and a bigger company wants to purchase the ownership and rights. I've had difficulty finding any information on this topic (probably my poor googling skills.) Most keywords that I tend to search also relate to promoting an app so that people will download it. Thanks for your insight.


title: What are the three most important questions you should ask your team about your performance as their team leader?

text: I'm approaching the 1 year mark as a leader of a small development team (4 members, including myself) inside of a small software company. I'd like to give my team the opportunity to evaluate how I am doing as their team leader who is also a developer on the team. I find it's hard to get good feedback with an open ended 'How am I doing?' question, so what specific questions are the most important to ask? Ideally I'd like to be able to provide 3 simple questions that my team would be able to answer. Which are the most important parts that you would like to give your team leader feedback on? My initial thought was to allow my team to answer these questions anonymously? Is this a good idea?


title: statistics for checking imported data?

text: I'm working on a data migration of several hundred nodes from a Drupal 6 to a Drupal 7 site. I've got the data exported to the new site and I want to check it. Harkening back to my statistics classes, I recall that there is some way to figure out a random number of nodes to check to give me some percentage of confidence that the whole process was correct. Can anyone enlighten me as to this practical application of statistics? For any given number of units, how big must the sample be to have a given confidence interval?


title: Is it legal to reuse code from a "programming cookbook"?

text: I have just found a perfect fit solution for a problem I was having in O'Reilly's _Perl Cookbook._ The problem is, the book is copyrighted, and I could not find anything that looked like a license to reuse the code. On the other hand, I suppose "programming cookbooks" are more or less explicitly made with the intent that the reader will reuse some of the code that is provided. Legally, can I just reuse the code, or do I have to rewrite it? If this is relevant, my intent was to release the project I am working on under the AL/GPL dual license, which is the norm for Perl. I suppose this question could apply equally well to any programming cookbook with no explicit license.


title: Naming test methods in Java

text: Over at codereview a comment hinted that using snake_case to name test methods is a good idea. This contradicted my views and I did some research and there seem to be a lot of examples that actually use snake_case for this. Myself, I use classic camelCase names like `testXyz` for unit tests or a BDD approach `givenXyzWhenXyzThenXyz` for integration tests. There also is a third option that combines both ways, e.g. `useCase_WhenSomething_ThenAssertion`. # _My question is_ : What are good arguments for either using snake_case or camelCase to name test methods? I'd like to start this with a few arguments from my experience and work: ## In Favor of camelCase   * It follows the general Java coding conventions of using camelCase.   * It is _consistent_ with production code.   * I _personally_ find camelCase no harder to read than snake_case – I'm used to descriptive names from production code anyway.   * IDE support suffers when using snake_case (at least Eclipse). ## In Favor of snake_case   * Some frameworks can generate reports from tests and using snake_case allows such frameworks to create correct sentences from the test names. ## In Favor of a combination of both   * ? What are other arguments? How does maybe the pattern in which the test methods are named affect the arguments? Little disclaimer: Of course, ultimatively it comes down to team conventions. However, it might be worth discussing pros and cons for certain conventions.


title: Do you write bad code when under pressure?

text: When you are under pressure, the deadline is approaching, and a manager is breathing down your neck do you find yourself starting to write bad code? Do TDD and best practices slip by the wayside in order to get things done? What do you do in situations like that? What were your experiences?


title: Avoid having an initialization method

text: I have this existing code where they have a class and an initialization method in that class. It is expected that once the object of the class is created, they need to call initialize on it. **Reason why the initialize method exist** The object gets created early to have a global scope and then the initialize method gets called later after loading a dll which it depends on. **Issue with having the initialize** The class now has this bool isInitialized which needs to be checked in every method before it proceeds and returns error if it is not initialized. Simply put, it is a big pain. **One possible solution** Initialize in the constructor. Have just a pointer to the object in the global scope. Create the actual object after the dll is loaded. **Issue with the above solution** Anyone who creates an object of this class needs to know that it needs to be created only after the dll is loaded or else it will fail. Is this acceptable?


title: What does the author of Code Complete mean when talking about hiding global data?

text: In section 6.4 of Code Complete 2nd Edition there is a paragraph about hiding global data. What I am particularly interested in, is that McConnell (the author of the book) gives examples of the benefits of hiding global data. There is one example that I cannot understand. I don't have the English version of the book, so I'll try to translate the text. > **Hiding global data.** (...) You can change the structure of the data > without modifying the program. What does McConnell mean by that? Is he talking about changing global data? If so, why wouldn't you have to modify your program when you are using methods to retreive that data? Or maybe he is referring to something else here? I would greatly appreciate if someone could clear up my confusion. If you could also provide an example, it would be great (examples are awesome, you know).


title: most concise reference for organizing code for sharing?

text: My colleagues and I are a bunch of scientists (i.e., untrained in programming) hacking code for data processing. Is there a concise and simple reference that documents idioms, conventions, or guidelines for organizing code? For instance:   1. conventions for using global variables   2. documenting code that is distributed to others (e.g., at least listing all functions contained within a code document at the top of the file) and so on? I'm aware that this is big field and can get into security, unit testing, refactoring, and all these issues, but hopefully there is some primer out there that covers the bare minimum with (extremely) little programming experience? **Edit:** Thanks all -- I aware there are language specific guidelines for (and debates over) use of parentheses, camelcasing (or not) variable names, etc. but I was hoping for basic conventions that apply to most languages. **Edit2:** To narrow it down, these are mostly imperative or procedural languages (e.g., Fortran but one in particular that a lot of my colleagues use is a DSL called IGOR Pro by Wavemetrics if anyone has heard of this one).


title: When can I publish a software tool written at work?

text: I'm working on a software problem at work that is fairly generic, but I can't find a library I like to solve it, so I'm considering writing one myself (at least a bare-bones version). I'll be writing some if not all of the 1.0 version at work, since I need it for the project. If turns out well I might want to bring the work home and polish it up just for fun, and maybe release it as an open-source project. However, I'm concerned that if I wrote the 1.0 version at work I may not be allowed to do this from a legal sense. Obviously I could ask my boss (who probably won't care), but I'm curious how other programmers have dealt with this issue and where the law stands here. My one sentence question is, **When is it okay (legally/ethically) to open-source a software tool originally written by you for work at work? What if you have expanded the original source significantly during off-hours?** **Follow-up:** Suppose I write the whole thing at home on my time then simply use it at work, does that change things drastically? **Follow-up 2** : Note that I'm not trying to rip off my employer (I understand that they're paying me to build products that they own)--I'm just wondering if there's a fair way of doing this for all involved... It would be nice if some nonprofit down the road could use my code and save them some time. Also, there's another issue at stake. If I write the library for a very simple, generic thing (like HTML tables in Javascript), does that mean I can never again do so on my own time without putting myself at legal risk (even if it was a whole new fresh rewrite or a segment of a larger project). Am I surrendering my right to write code for this sort of project for the rest of my life (without this company's permission), since the code at work might still be somewhere in my brain influencing me? This seems related to software patents, as a side-note.


title: Database Schema Usage

text: I have a question regarding the appropriate use of SQL Server database schemas and was hoping that some database gurus might be able to offer some guidance around best practice. Just to give a bit of background, my team has recently shrunk to 2 people and we have just been merged with another 6 person team. My team had set up a SQL Server environment running off a desktop backing up to another desktop (and nightly to the network), whilst the new team has a formal SQL Server environment, running on a dedicated server, with backups and maintenance all handled by a dedicated team. So far it's good news for my team. Now to the query. My team designed all our tables to belong to a 3-letter schema name (e.g. User = USR, General = GEN, Account = ACC) which broadly speaking relate to specific applications, although there is a lot of overlap. My new team has come from an Access background and have implemented their tables within dbo with a 3-letter perfix followed by "_tbl" so the examples above would be dbo.USR_tblTableName, dbo.GEN_tblTableName and dbo.ACC_tblTableName. Further to this, neither my old team nor my new team has gone live with their SQL Servers yet (we're both coincidentally migrating away from Access environments) and the new team have said they're willing to consider adopting our approach if we can explain how this would be beneficial. We are not anticipating handling table permissions at schema level, as we will be using application-level logins and the 7-character prefixes are not an issue as we're using LINQ so the tables can simply be renamed in the DMBL (although I know that presents some challenges when we update the DBML). So therefore, given that both teams need to be aligned with one another, can anyone offer any convincing arguments either way?


title: Jenkins Paramerized Trigger + Copy Artifact

text: I'm working on setting up Jenkins to handle our release builds. A release build consists of a Windows installer that includes some binaries that must be built on Linux. Here's what I have so far:   * The Windows portion and Linux portion are set up as separate Jenkins projects.   * The Windows project is parameterized, taking the Subversion tag to build and release.   * As part of its build, the Windows project triggers a build of that same Subversion tag for the Linux project (using the Parameterized Trigger plugin) then copies the artifacts from the Linux project (using the Copy Artifact plugin) to the Windows project's workspace so that they can be included in the Windows installer. Where I'm stuck: Right now, Copy Artifact is set up to copy the last successful build. It seems more robust to configure Copy Artifact to copy from the exact build that Parameterized Trigger triggered, but I'm having trouble figuring out how to make that work. There's an option for a "build selector" parameter that I think is intended to help with this, but I can't figure out how it's supposed to be set up (and blindly experimenting with different possibilities is somewhat painful when the build takes an hour or two to find success or failure). How should I set this up? How does build selector work?


title: What is the basic process and tools needed for crawling a source code repository for the purpose of data mining?

text: This all is with respect to Microsoft project CodeBook: CodeBook There is huge amount of code in the repository, many classes , a call hierarchy of functions, testcases etc. I am interested in knowing how this crawling process takes place, and how this data is sorted?


title: Solo vs Team development and the consequences

text: I've been programming for a while on different languages. I never really studied programming at school nor worked on a team of more than two people (me included). Still, I've been a professional developer for over three years. Last year, I took over my first C# project and it ended up being fine. I can't help but think that because I learned and worked alone I must be missing some concepts/hints/edge. For those who've been solo developers before being part of a team, can you share your experience? Did you realize you were missing something? Did you find it hard? Did you learn faster after?


title: Sensitive Data Storage - Best Practices

text: I recently started working on a personal project where I was connecting to a database using Java. This got me thinking. I have to provide the login information for a database account on the DB server in order to access the database. But if I hard code it in then it would be possible for someone to decompile the program and extract that login info. If I store it in an external setup file then the same problem exists only it would be even easier for them to get it. I could encrypt the data before storing it in either place but it seems like that's not really a fail safe either and I'm no encryption expert by any means. So what are some best practices for storing sensitive setup data for a program?


title: How to signal that a method chain should not continue?

text: When doing method chaining, you have methods that return the object allowing you to continue the chain. However, you need to get values out of the object somehow. Usually I've added a method that returns a value at the end, but this complicates matters if you add to the chain and that return method may not be valid anymore. The way I view it each time you add a method onto a chain you are refining your result until you get your desired answer in the last method call. Having a final output method creates a restriction in that it needs to know about the last operation to know how to display the result. Maybe you have a method that results in a string and one that results in an array your output method has to deal with both those cases. What if you add a method that stores your string result somewhere new? Now you have to update the output method to handle that case too. Is there a way of letting a method know it's the last in the chain so should output its result?


title: Are EventHandler<T> and IObservable<T> interchangable?

text: I have an object which will periodically raise an event based on an action performed in an application. This will be heard by any listener(s) and acted upon accordingly. I do not wish to use a custom type for this and would like to make use of either `EventHandler<T>` or `IObservable<T>` to manage the pub/sub mechanism I am looking to put in place. I have had a play with both and they both do what I require. I have read through the MSDN Observer Design Pattern and MSDN Events Programming Guide, however, I remain uncertain as to if one mechanism is more appropriate than the other. Is one more suited for my scenario than the other or are both suitable and merely down to personal choice? **Edit 1** My pub/sub requirements are not at the UI layer at this point and are lower down. My publisher is monitoring network activity and raising an event based on certain network events. The subscriber is responsible for listening for raised events and performing an associated action. The UI is not involved at this point.


title: Debugging Facts and Statistics

text: I'm trying to find a research answering a question: "How much time developers spend on development vs debugging?". I found several interesting links on the Net but they are little too old. This 2002 RTI study states that software bugs cost U.S. economy $59.6 billion annually. And in this book Beizer (1990) reports that of the labor expended to develop a working program, 50% is typically spent on testing and debugging activities. I've seen this number is 80% but can't find the link.


title: Audio editing sdk

text: What's the best way to create an audio editing software? (edit, copy, paste audio - somehing like sound forge or audacity) My programming language is Delphi. Are there any good component or controls available so that i can buy it use it in project.


title: Difference between Idiom and Design Pattern?

text: What is the difference between idiom and design-pattern? It seems that these terminologies overlap somewhere; where exactly, I don't know. Are they interchangeable? When should I use what? Here is a list of C++ Idioms. Can I call them design patterns? Wikipedia defines, > Programming Idiom as a low-level Design Pattern What does it mean? What does _"low-level"_ mean here? This question is inspired from another question : Are the some design patterns language dependent?


title: Planning to write research paper - Tips or resources?

text: I am a junior in high school and I've developed an optimization system for functional languages that could be very powerful. My computer science professors at Boise State University believe I should write a paper and take my idea as far as I can. I've formalized my method, but I haven't had an expert look at it rigorously. I'm also being careful to retain intellectual property safety, so my options are a little limited. Where should I start? I have implemented the optimizer in Haskell (it doesn't actually compile and generate code, but it demonstrates the concept). I'm thinking that I need to finish the research paper focusing on the system itself and see if I can publish it to a journal. The doctor specializing in compiler optimizations at BSU said I might be able to present at Apple because I was planning to generate code with LLVM, which they want to encourage interesting projects for and demonstrate its versatility. This sounds like an exciting prospect, but I'm guessing writing a research paper comes before that. I feel slightly overwhelmed. I'm not sure if I should implement the compiler further to lend my paper credibility, or see if the idea takes off and gather a small community to fully implement it. I'd write the research paper (I have the methods section done), but I'm no expert at research papers, and I might need someone who knows about compiling functional languages that I can trust to look at it. Also, I'm worried that I'll be discriminated for my age (I'm 16 years old). What are some good resources on writing research papers, particularly computer science ones? Where should I start when I have it written? How would I develop interest and a community to implement and expand my idea?


title: What do you use to organize your team knowledge?

text: Last year, me and three good old friends of mine founded a small web/mobile development team. Things are going pretty well. We're learning a lot, and new people are joining the group. Keeping knowledge always updated and in-sync is vital for us. Long emails threads are simply not the way to go for us: too dispersing and confusing, and hard to retrieve after a while. How your team manages and organizes common knowledge? How do you collect and share useful resources (articles, links, libraries, etc) inside your team? **Update:** Thanks for the feedback. More than using a wiki to share team common procedures or informations, I'd like to share external links, articles, code libraries, and be able to comment them easily within my team.   I was particularly interested in knowing if you're aware of any way/webservice to share a reading list with a team. I mean, something like Readitlater/Instapaper, but for teams, maybe with some stats available, like "# of coworkers who read it".


title: Confusion about the first day of a burn down chart

text: I built a simple burn down chart with Google Spreadsheet, as shown below. ![enter image description here](http://i.stack.imgur.com/IfXtt.png) The project consists of 99 tasks. And the user finished 5 tasks on the first day. So the "Actual Tasks Remaining" point is below the "Ideal Tasks Remaining" point on the first day, which is different from the burn down chart shown in the Wikipedia at http://en.wikipedia.org/wiki/Burn_down_chart. I'm wondering whether I should add a date before the first date so that the "Actual Tasks Remaining" point will overlap the "Ideal Tasks Remaining" point on the first day.


title: is it possible to auto-generate annotated POJO from a table

text: I wonder is it possible or is there a tool to generate annotated POJOs from a table.To make it clear,for example,Person table has fields like ,id,name,surname etc and i wanna to generate a POJO named Person with mappings made with annotations.


title: What's a better name for this many-to-many table?

text: Part of one of my applications has `contracts` and `contract_types` tables, wherein a type may have many contracts but a contract may only be of one type. Now a new wrinkle has been introduced: a contract may change type over time (although it can, thankfully, still only be of one type at any one time). The simplest solution appears to be to introduce a new table with columns something like this:               contract_id     contract_type_id     from_date     to_date      But what to call the new table? `contract_type_allocations` is the best I can do so far and I can't say I'm impressed with myself. Suggestions gratefully received.


title: Should I parse XML on the server or provide a proxy and let the browser parse it?

text: I need to interface with a 3rd party API. With this API I make a GET request from within the end user's browser and receive an XML response. This data is to be used in a browser based application where the user can search through it, use it to make decisions, etc. The main issue is that most browsers have locked down cross-domain XML use, so I can't simply get the XML from the API. The overall data, though, is basically broken into two sets.   1. The first set of data is public and only needs to be updated every so often, so it can be cached for all users on the server side, lightening the traffic considerably.   2. The second set of data is private and individual to each user. This data is also updated in the API more frequently. This leads caching to be much less effective. For scalability reasons I would like to keep the server's load a small as possible. I see two options before me:   1. Provide a proxy that can be used to route XML requests to the 3rd party server and directly back and forth between client and 3rd party API.   2. Have the server do the conversion from XML to JSON and strip out unnecessary information. This essentially means making a new API for our server, which translates into requests from the 3rd party API What would be the best way to provide the data to the user? (Does not have to be one of the two options)


title: Why is my class worse than the hierarchy of classes in the book (beginner OOP)?

text: I am reading _PHP Objects, Patterns, and Practice_. The author is trying to model a lesson in a college. The goal is to output the lesson type (lecture or seminar), and the charges for the lesson depending on whether it is an hourly or fixed price lesson. So the output should be               Lesson charge 20. Charge type: hourly rate. Lesson type: seminar.     Lesson charge 30. Charge type: fixed rate. Lesson type: lecture.      when the input is as follows:               $lessons[] = new Lesson('hourly rate', 4, 'seminar');     $lessons[] = new Lesson('fixed rate', null, 'lecture');      I wrote this:               class Lesson {         private $chargeType;         private $duration;         private $lessonType;              public function __construct($chargeType, $duration, $lessonType) {             $this->chargeType = $chargeType;             $this->duration = $duration;             $this->lessonType = $lessonType;         }              public function getChargeType() {             return $this->getChargeType;         }              public function getLessonType() {             return $this->getLessonType;         }              public function cost() {             if($this->chargeType == 'fixed rate') {                 return "30";             } else {                 return $this->duration * 5;             }         }     }          $lessons[] = new Lesson('hourly rate', 4, 'seminar');     $lessons[] = new Lesson('fixed rate', null, 'lecture');          foreach($lessons as $lesson) {         print "Lesson charge {$lesson->cost()}.";         print " Charge type: {$lesson->getChargeType()}.";         print " Lesson type: {$lesson->getLessonType()}.";         print "<br />";     }      But according to the book, I am wrong (I am pretty sure I am, too). Instead, the author gave a large hierarchy of classes as the solution. In a previous chapter, the author stated the following 'four signposts' as the time when I should consider changing my class structure:   * Code duplication   * The class who knew too much about its context   * The jack of all trades \- classes that try to do many things   * Conditional statements The only problem I can see is conditional statements, and that too in a vague manner - so why refactor this? What problems do you think might arise in the future that I have not foreseen? **Update** : I forgot to mention - this is the class structure the author has provided as a solution - the strategy pattern: ![The strategy pattern](http://i.stack.imgur.com/RJbQZ.png)


title: How does a symbol table relate to a namespace?

text: The official tutorial uses the term _symbol table_ in a few places where I would expect the term _namespace_. 1\. Defining functions > The execution of a function introduces a new symbol table used for the local > variables of the function. More precisely, all variable assignments in a > function store the value in the local symbol table; whereas variable > references first look in the local symbol table, then in the local symbol > tables of enclosing functions, then in the global symbol table, and finally > in the table of built-in names. 2\. More on modules > Each module has its own private symbol table, which is used as the global > symbol table by all functions defined in the module. Thus, the author of a > module can use global variables in the module without worrying about > accidental clashes with a user’s global variables. I found Eli Bendersky's blog where he quotes the symtable module: > Symbol tables are generated by the compiler from AST just before bytecode is > generated. The symbol table is responsible for calculating the scope of > every identifier in the code. So it seems like a symbol table precedes a namespace. Yet another quote, from the first source, leads me to believe they also exist at the same time. > The actual parameters (arguments) to a function call are introduced in the > local symbol table of the called function when it is called; thus, arguments > are passed using call by value (where the value is always an object > reference, not the value of the object).1 Is a symbol table involved with the creation of a namespace? Does a symbol table "contain" a namespace or simply information that a namespace contains? In short, how does a symbol table relate to a namespace?


title: How do I explain to non-programers what .NET is?

text: I don't work at a software company, and I'm one of a small handful of people in the company that know anything about programming. I spend a lot of time automating other programs that are used in the office through public APIs, and I've also created a few stand alone applications. I work almost entirely in C#.NET as every application we seem to use in the office seems to have some form of .NET API. I've had a few people here ask me about learning "how to program", and where they should start. I think it makes a lot more sense to learn a .NET language as nearly all the programs they would want to automate have a .NET API, and it sounds like VBA is on it's way out and being replaced by VSTA. However, I'm trying to figure out how to explain what .NET is and why they should learn it to a someone that doesn't know anything about programming. It's not really a language, as there are a number of languages that are considered .NET languages. Plus I think there is a distinction between ".NET" and "The .NET framework" as the latter is more about the libraries provided by Microsoft.


title: Is a designer supposed to write CSS code?

text: I'm wondering if the CSS creation is supposed to be the job of the designer or the programmer. I'm not talking here about really complex CSS layout, I'm referring more to skinning. So is this supposed to be the responsibility of one or another?


title: How do I go about writing a programming language specification?

text: I really enjoy programming language design. Sometimes I think my language projects and their potential users would benefit from a comprehensive standards document. I've looked at many language standards, ranging from the very formal (C++) to the rather informal (ECMAScript), but I can't really get a handle on how I should break things down and organise such a document, even though I think I'm pretty good at technical writing in general. Should I write it like a long tutorial, or more like a formal math paper? How do I keep it up to date if I'm developing it alongside a reference implementation? Should I just give up and treat the implementation and documentation as the de facto standard? Further, is there really any significant benefit to having a standard? Does _requiring_ a standard mean that the language is needlessly complex?


title: Finding most Important Node(s) in a Directed Graph

text: I have a large (≈ 20 million nodes) directed Graph with in-edges & out-edges. I want to figure out which parts of of the graph deserve the most attention. Often most of the graph is boring, or at least it is already well understood. The way I am defining "attention" is by the concept of "connectedness" i.e. How can i find the most connected node(s) in the graph? In what follows, One can assume that nodes by themselves have no score, the edges have no weight & they are either connected or not. This website suggest some pretty complicated procedures like n-dimensional space, Eigen Vectors, graph centrality concepts, pageRank etc. Is this problem that complex? Can I not do a simple Breadth-First Traversal of the entire graph where at each node I figure out a way to find the number of in-edges. The node with most in-edges is the most important node in the graph. Am I missing something here?


title: Implementing a new coding standard to an existing application

text: Recently we have had some turnaround in the shop I work in, because of this comments in our source code were made hastily and explained very little. We have started working on the departments first draft of coding standards and one of the bigger questions is: Should we implement this standard across the existing source code? Since this is only our coding standards first draft (done to promote flexibility and future considerations), should we be implementing on new features and during maintenance? **Update:** I would like to say thank you for all of the answers and comments that were received on this topic. Our shop has started to move forward with developing a draft for our coding standards and we have taken bits and pieces from all of the comments and answers to work with throughout our process. Thank you for your time and experience on this matter.


title: Splitting user stories into smaller stories

text: I've been reading various techniques for splitting large user stories in helpful ways, such as by user workflow through the system etc. What I'm struggling with is how to word these smaller stories if all they achieve is facilitating the next step in the process and not delivering the application's main benefit to the user. For example, if my new system is split down into 3 smaller stories along the lines of;   1. Create a new account online   2. Create certain entities against my new online account   3. Have my mobile device query these entities against my account and act on them The system only really provides useful functionality to the end user when all stories are complete. So if following the traditional "As a [User] I would like [Functionality] so I can [Benefit]" The benefit of the first and second story is simply facilitating subsequent stories and not really providing the user with the main piece of functionality (the epic). Is this the correct way to do this?


title: What programming skills does someone in QA need to work effectively in extreme programming projects?

text: Well, the title really says it all, but to elaborate a bit, can you take a random, typically effective QA department and have them learn to work in an XP environment (with a learning curve to pick up the XP workflow of course) or would they need more programming skills to be effective? If so, what would they need to know?


title: How to share methods and properties between custom web controls

text: I'm building some custom web controls in .NET using C#. The controls inherit from the standard web controls, and add additional properties and functionality (e.g. I'm creating an 'extendedTextBox' and I'm adding a 'required' property, which if set to 'true' will add a .NET required field validator to the control automatically. I'm doing this for a number of web controls (e.g. radioButtonList, textArea). They share some common properties and methods, for example I have an AddRequiredFieldValidator method that uses some of the extended properties I've added. I'd like to share the common properties and methods. I've tried adding the methods to a separate class as extension methods for a web control. To achieve this I've implemented an interface that defines the additional shared properties, and am using it like this:               public interface IExtendendControl     {         string RequiredMessage { get; set; }         string ValidatorCssClass { get; set; }         bool ClientScript { get; set; }         RequiredFieldValidator rfv { get; set; }     }          public static class ExtendedControlExtensions : IExtendendControl     {         public static void AddRequiredFieldValidator(this IExtendendControl control)         {             control.rfv = new RequiredFieldValidator();             control.rfv.ErrorMessage = control.RequiredMessage;             ConfigureAndAddValidator(control, control.rfv);         }              public static void ConfigureAndAddValidator(this IExtendendControl control, BaseValidator validator)         {             validator.ControlToValidate = control.ID;             validator.Display = ValidatorDisplay.Dynamic;             validator.CssClass = "validationMessage ";             validator.CssClass += control.ValidatorCssClass;             validator.EnableClientScript = control.ClientScript;             control.Controls.Add(validator);         }     }      Trouble is that the 'ConfigureAndAddValidator' method now doesn't know anything about the 'ID' or 'ClientScript' properties of the control since 'IExtendedControl' only defines the custom properties, not the standard properties of a web control. So I tried adding a base class that inherits from WebControl and implements the interface, like this:               public interface IExtendendControl     {         string RequiredMessage { get; set; }         string ValidatorCssClass { get; set; }         bool ClientScript { get; set; }         RequiredFieldValidator rfv { get; set; }     }          public class BaseExtendedControl : WebControl, IExtendendControl     {         public string RequiredMessage { get; set; }         public string ValidatorCssClass { get; set; }         public bool ClientScript         {             get             { return ClientScript = true; }             set { }         }         public RequiredFieldValidator rfv         {             get             { return rfv = new RequiredFieldValidator(); }             set { }         }     }          public static class ExtendedControlHelper : IExtendendControl     {         public static void AddRequiredFieldValidator(this BaseExtendedControl control)         {             BaseExtendedControl extendedControl = (BaseExtendedControl)control;             extendedControl.rfv = new RequiredFieldValidator();             extendedControl.rfv.ErrorMessage = extendedControl.RequiredMessage;             ConfigureAndAddValidator(control, extendedControl.rfv);         }              public static void ConfigureAndAddValidator(this BaseExtendedControl control, BaseValidator validator)         {             validator.ControlToValidate = control.ID;             validator.Display = ValidatorDisplay.Dynamic;             validator.CssClass = "validationMessage ";             validator.CssClass += control.ValidatorCssClass;             validator.EnableClientScript = control.ClientScript;             control.Controls.Add(validator);         }     }      The trouble now is that in my extendedTextBox class I can't cast my extendedTextBox as a 'BaseExtendedControl' to use the extension methods, as the extendedTextBox inherits from the standard TextBox class like this:               public class ExtendedTextBox : TextBox, IExtendendControl      so there's no common base to cast ExtendedTextBox as 'BaseExtendedControl' as it doesn't inherit from it. I also can't just pass the extended web control objects as a parameter into the shared methods as the extended controls are of different types (e.g. they inherit from TextBox, RadioButtonList and so on). If I specify the expected type being passed into 'standard' methods as 'WebControl' it doesn't work as the extended controls have the additional properties. As I can't use true multiple inheritance in C#, how would I design this to be able to share the methods and properties?


title: When not to reuse software?

text: I'm working on an application that had basic requirements for authentication in the first version (i.e. think single administrator login), and now I have a requirement to extend this to allow for different users, roles, and permissions. It has been suggested that I attempt to integrate with an existing product we have that does this sort of thing as a separate server for basic authentication, or also extending to second factor authentication. The application I'm working on is a small, downloadable application that is supposed to be easy to set up and have running. The other product is large and 'enterprisy', requiring manual setup, which I could try to do automatically for what I need (maybe). The big problem is that when described as a feature set of what we'd like to do in my product, it maps up perfectly with what the other product does, but it's not in a form that I can use it. Management wants integration with the other product, because it seems intuitive that we could leverage that, but the other product isn't in a form that I could use. i.e. thinking of it in terms of MVC, I don't think there's a way to separate the view from the model. The other thing I'm concerned about, which has happened in the past, is that if I'm asked to integrate with this that I'm going to be the one doing all the integration work, and if something cannot be done from the other product, then I'm just out of luck. Integration with my product is secondary to anything the other team would want, and my team isn't a 'customer', so there's little motivation to get them to fix or add stuff for us. **So, in summary, my question is:** I don't want to reinvent the wheel, but should I attempt to force a square peg into a round hole by trying to use a product that does what I need, but not in a form that's easy to reuse? edit: I'm using Java, so Spring Security is an option.


title: Whats a better way of designing this class

text: Currently I have some code like this:               OntologyGenerator generator = new OntologyGenerator();     generator.AddOntologyHeader("Testing");     generator.AddClassDeclaration(owlBuilder);     generator.AddSubClass(owlBuilder);     generator.AddAnnotationAssertions(owlBuilder);      where that OwlBuilder param you see being passed has collections of objects like this:               public class OwlLBuilder: IOwlLBuilder     {            private ICollection<IOwlClass> owlClasses = new Collection<IOwlClass>();            private ICollection<IOwlRelation>  owlRelations = new Collection<IOwlRelation> ();     }      so for example when I say generator.AddClassDeclaration(owlBuilder); it will be looping through owlClasses collection of that owlBuilder param and do some stuff to it... I feel it is an ugly design. Do you have any other better design suggestions, well with some code sample so I can have the big picture of what I should do in my head!


title: When learning JS, what was your your Aha-moment?

text: **Do you remember when you were learning JavaScript? What was the moment that you suddenly "got it"?** (For example, my CSS aha-moment was when I learnt about the box model...) The reason I´m asking is that I´m learning JS for 6 weeks, but I still find it quite confusing. Here´s a quote from something I read recently on SO: > "..functions act similar to values, as method is a property of the object > that has a value of a function (which is also an object)." I´m curious if you were confused as well in the beginning and what was it that made you understand it. (I´m reading the Sitepoints "Simply JavaScript", the book "Eloquent JavaScript" and following Lynda´s Essential JavaScript tutorial. I don´t have any programming expeirence and was terrible at math ;) Thanks!


title: How to find entry level positions in a new city

text: I am just graduating from a computer science degree (tomorrow is my last exam). I have been thinking about job hunting this semester but I wanted to focus on my studies and part time job so I am a bit late on the job hunt. I want to find a job in a city that I have very little professional network in. **How would you go about job hunting in a new city?** I do not live there yet and I cannot easy go there so that makes finding places to apply a bit trickier. Normally I would ask people that I studied and worked with but I have few contacts in the city I want to work in. Where would you look to find jobs? I have been using   * Craigs-list   * My Universities job listings (but they are mostly focused on the east coast)   * This government job listing page Anyone have any great job finding resources?


title: Give a more formal definition for the term "pythonic" than PEP8?

text: For me as python programmer having a formal definition for the term "pythonic" would be much more important and less subjective compared to asking more rhetoric (non-formal) questions. This may lead to better communication by argumentation being less subjective (as discussed in here). PEP8 by Guido is assumed as a starting point despite of some religious dogmatism (e.g. PEP20 is more axiomatic, shorter and simpler, but has no code). Having identified _minimalism_ , _readability_ (human comprehension) and _unambiguity_ (explicit code) is actually the same as paraphrasing PEP20. But is it possible to rewrite zen of python in python? Obviously print('Beautiful is better than ugly') does not capture python in python ;-) Any thoughts on this? Ultimately I would like to get closer to more logical or mathematical interpretation of the matter. Argument in form of the code answering why family of snippets **A** is _pythonic_ compared to family of snippets **B** is also acceptable. **EDIT** If possible try to reduce your answer to the following outline. Let us consider all possible syntactically correct program texts generated by some procedure (e.g.). Please note that we a considering only programs written in python (which is a formal language with respective grammar). Also being syntactically correct does not mean semantical correctness (programs may be buggy or without any obvious purpose). Further we observe (assume) that ultimate family _POmega_ of all syntactically correct programs in python must contain a subset of programs which are called _Pythonic_. Now in order to argue about what does it mean to be pythonic we will use a formal method - another language called _Reason_ which would be less ambiguous (consistent, complete) than natural language. We will define a mapping from programs in _Omega_ into _Reason_. Such mapping we will call interpretation. We will also produce more mappings in similar manner (e.g. as in) for all individual symbols in _Python_ and their combinations (statements). Now if we would argue about images of such mappings, we would do so in form of proofs in _Reason_ language. The question would be if subset _Pythonic_ indeed exists can we follow that up from aximos in _Reason_ built/reformulated from "Zen of python" or other motivating set of concepts? In fact, the whole deductive core of the language _Reason_ would be built from "Zen" or PEP8. We will have to proof that each program from _Pythonic_ will consist only from statements for images of which in _Reason_ can be shown to satisfy initial axioms of the model language. Different outcomes are plausible:   1. Subset of _Pythonic_ programs could be empty. We have not found any programs that would satisfy our axioms in _Reason_.   2. It could happen that this set of axioms would turn out to be ambiguous (inconsistent or incomplete). Then our original assumption about existence of _Pythonic_ programs would be wrong.   3. Alternatively axiomatic "Zen" could be simple enough and so well-chosen that _Pythonic_ set is non-empty. Now the question is will such (consistent, complete) set be of practical value, i.e. can we say that such set of axioms is indeed a formal definition of "pythonic"? This is a draft of how one can try to approach answering the question in formal manner. I would appreciate recommendations on a more elegant approach for solution to the problem (everything except ignoring it). But at the end it matters to me to see how such set of axioms looks like. Hence it will allow in precise (quantitative) way to ask and try to explain questions like why programs have "pythonic" qualities once written according to following python "dogmas"? BTW One can built a more sophisticated model of _Reason_ by introducing an equivalent of "human factor" - a software developer of the programs. Then the question would be - can human formally claim the program he rights belongs to "Pythonic" subset?


title: Is there such a thing as staying in a job too long?

text: After reading through a few "job hopping" related threads recently, I've been thinking how the opposite of job hopping can also be a problem. I've known many people (especially in large, relatively sluggish companies) who got comfortable in a cushy and unchallenging role and stayed around for a very long time - say 10 or 15 years or even more. They might have moved around internally a little, but it was mostly a case of " _one year of experience 15 times over_ " as seasoned hiring managers would say. Or to put it another way, they were "Special Projects" cases. Just sitting in a comfortable role where no more learning is going on, but that might look okay on paper (on their CV) if the various stuff they were involved with is embellished a bit. What really got me thinking about this is that the longest role on my CV (almost 6 years) fits into this category somewhat, at least mildly. If I was being completely intellectually honest, I'd say I really only got 3 solid years of learning experience from it. The last 2-3 years were cushy maintenance mode. So I know first hand that it's quite possible than many "seniors" with 15 years experience (if they were in a job like that the whole time) might not be as broadly experienced and "senior" (in terms of having 15 years of quality experience) as they look on paper. So my question is - does hanging around in the same job for very long raise any red flags? For example: if you see a CV which has only one 15 year job on it after college, as opposed to an equally experienced person who has several 4-5 year stints instead, does the single-job guy look like a possible "Special Projects" case for only having had one very long job? My experience suggests that it's quite likely. Or at least that the guy with several 5 year stints is probably more dynamic and adaptable, from having experienced a variety of roles, environments and technologies (and different uses even if using the same technologies across all jobs). **EDIT:** Note that I am not personally worried that _my_ history looks like this. My longest role above just serves as a mini example of what can happen with cushy long term roles, which got me thinking about this in general terms (If anything, my actual employment history (except for that longest role) leans more towards being a bit too job hoppy).


title: Finding an agile coach

text: I'm hoping that this is the right place to ask this question, but my company has recently started a process to look at how we build software, from the tools we use to the methodology. As you can imagine we have the kind of endless meetings where we sit around a table and split hairs. In an effort to actually get something done I've suggested we hire in a professional to take a look at how we do what we do and maybe guide us into a more agile approach to delivering software. My problem is that I'm not sure how to find a consultant we could bring in and get us started? I was thinking of approaching someone like ThoughtWorks, but I think finding someone who isn't going to push an agenda or product on us would be better. In the meantime I've picked up a few books and will do a bit of reading on the beach over the holiday vacation.